diff --git a/awssqs/pkg/client/clientset/versioned/clientset.go b/awssqs/pkg/client/clientset/versioned/clientset.go index 9571092ff6..e09749271b 100644 --- a/awssqs/pkg/client/clientset/versioned/clientset.go +++ b/awssqs/pkg/client/clientset/versioned/clientset.go @@ -59,7 +59,7 @@ func NewForConfig(c *rest.Config) (*Clientset, error) { configShallowCopy := *c if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 { if configShallowCopy.Burst <= 0 { - return nil, fmt.Errorf("Burst is required to be greater than 0 when RateLimiter is not set and QPS is set to greater than 0") + return nil, fmt.Errorf("burst is required to be greater than 0 when RateLimiter is not set and QPS is set to greater than 0") } configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst) } diff --git a/awssqs/pkg/client/clientset/versioned/typed/sources/v1alpha1/awssqssource.go b/awssqs/pkg/client/clientset/versioned/typed/sources/v1alpha1/awssqssource.go index 841b6b2295..a7ea44ebc8 100644 --- a/awssqs/pkg/client/clientset/versioned/typed/sources/v1alpha1/awssqssource.go +++ b/awssqs/pkg/client/clientset/versioned/typed/sources/v1alpha1/awssqssource.go @@ -19,6 +19,7 @@ limitations under the License. package v1alpha1 import ( + "context" "time" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -37,15 +38,15 @@ type AwsSqsSourcesGetter interface { // AwsSqsSourceInterface has methods to work with AwsSqsSource resources. type AwsSqsSourceInterface interface { - Create(*v1alpha1.AwsSqsSource) (*v1alpha1.AwsSqsSource, error) - Update(*v1alpha1.AwsSqsSource) (*v1alpha1.AwsSqsSource, error) - UpdateStatus(*v1alpha1.AwsSqsSource) (*v1alpha1.AwsSqsSource, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*v1alpha1.AwsSqsSource, error) - List(opts v1.ListOptions) (*v1alpha1.AwsSqsSourceList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.AwsSqsSource, err error) + Create(ctx context.Context, awsSqsSource *v1alpha1.AwsSqsSource, opts v1.CreateOptions) (*v1alpha1.AwsSqsSource, error) + Update(ctx context.Context, awsSqsSource *v1alpha1.AwsSqsSource, opts v1.UpdateOptions) (*v1alpha1.AwsSqsSource, error) + UpdateStatus(ctx context.Context, awsSqsSource *v1alpha1.AwsSqsSource, opts v1.UpdateOptions) (*v1alpha1.AwsSqsSource, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.AwsSqsSource, error) + List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.AwsSqsSourceList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.AwsSqsSource, err error) AwsSqsSourceExpansion } @@ -64,20 +65,20 @@ func newAwsSqsSources(c *SourcesV1alpha1Client, namespace string) *awsSqsSources } // Get takes name of the awsSqsSource, and returns the corresponding awsSqsSource object, and an error if there is any. -func (c *awsSqsSources) Get(name string, options v1.GetOptions) (result *v1alpha1.AwsSqsSource, err error) { +func (c *awsSqsSources) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.AwsSqsSource, err error) { result = &v1alpha1.AwsSqsSource{} err = c.client.Get(). Namespace(c.ns). Resource("awssqssources"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of AwsSqsSources that match those selectors. -func (c *awsSqsSources) List(opts v1.ListOptions) (result *v1alpha1.AwsSqsSourceList, err error) { +func (c *awsSqsSources) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.AwsSqsSourceList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -88,13 +89,13 @@ func (c *awsSqsSources) List(opts v1.ListOptions) (result *v1alpha1.AwsSqsSource Resource("awssqssources"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested awsSqsSources. -func (c *awsSqsSources) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *awsSqsSources) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -105,87 +106,90 @@ func (c *awsSqsSources) Watch(opts v1.ListOptions) (watch.Interface, error) { Resource("awssqssources"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a awsSqsSource and creates it. Returns the server's representation of the awsSqsSource, and an error, if there is any. -func (c *awsSqsSources) Create(awsSqsSource *v1alpha1.AwsSqsSource) (result *v1alpha1.AwsSqsSource, err error) { +func (c *awsSqsSources) Create(ctx context.Context, awsSqsSource *v1alpha1.AwsSqsSource, opts v1.CreateOptions) (result *v1alpha1.AwsSqsSource, err error) { result = &v1alpha1.AwsSqsSource{} err = c.client.Post(). Namespace(c.ns). Resource("awssqssources"). + VersionedParams(&opts, scheme.ParameterCodec). Body(awsSqsSource). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a awsSqsSource and updates it. Returns the server's representation of the awsSqsSource, and an error, if there is any. -func (c *awsSqsSources) Update(awsSqsSource *v1alpha1.AwsSqsSource) (result *v1alpha1.AwsSqsSource, err error) { +func (c *awsSqsSources) Update(ctx context.Context, awsSqsSource *v1alpha1.AwsSqsSource, opts v1.UpdateOptions) (result *v1alpha1.AwsSqsSource, err error) { result = &v1alpha1.AwsSqsSource{} err = c.client.Put(). Namespace(c.ns). Resource("awssqssources"). Name(awsSqsSource.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(awsSqsSource). - Do(). + Do(ctx). Into(result) return } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *awsSqsSources) UpdateStatus(awsSqsSource *v1alpha1.AwsSqsSource) (result *v1alpha1.AwsSqsSource, err error) { +func (c *awsSqsSources) UpdateStatus(ctx context.Context, awsSqsSource *v1alpha1.AwsSqsSource, opts v1.UpdateOptions) (result *v1alpha1.AwsSqsSource, err error) { result = &v1alpha1.AwsSqsSource{} err = c.client.Put(). Namespace(c.ns). Resource("awssqssources"). Name(awsSqsSource.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(awsSqsSource). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the awsSqsSource and deletes it. Returns an error if one occurs. -func (c *awsSqsSources) Delete(name string, options *v1.DeleteOptions) error { +func (c *awsSqsSources) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("awssqssources"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *awsSqsSources) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *awsSqsSources) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Namespace(c.ns). Resource("awssqssources"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched awsSqsSource. -func (c *awsSqsSources) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.AwsSqsSource, err error) { +func (c *awsSqsSources) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.AwsSqsSource, err error) { result = &v1alpha1.AwsSqsSource{} err = c.client.Patch(pt). Namespace(c.ns). Resource("awssqssources"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/awssqs/pkg/client/clientset/versioned/typed/sources/v1alpha1/fake/fake_awssqssource.go b/awssqs/pkg/client/clientset/versioned/typed/sources/v1alpha1/fake/fake_awssqssource.go index 78f1beb1b4..67a162c351 100644 --- a/awssqs/pkg/client/clientset/versioned/typed/sources/v1alpha1/fake/fake_awssqssource.go +++ b/awssqs/pkg/client/clientset/versioned/typed/sources/v1alpha1/fake/fake_awssqssource.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -39,7 +41,7 @@ var awssqssourcesResource = schema.GroupVersionResource{Group: "sources.knative. var awssqssourcesKind = schema.GroupVersionKind{Group: "sources.knative.dev", Version: "v1alpha1", Kind: "AwsSqsSource"} // Get takes name of the awsSqsSource, and returns the corresponding awsSqsSource object, and an error if there is any. -func (c *FakeAwsSqsSources) Get(name string, options v1.GetOptions) (result *v1alpha1.AwsSqsSource, err error) { +func (c *FakeAwsSqsSources) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.AwsSqsSource, err error) { obj, err := c.Fake. Invokes(testing.NewGetAction(awssqssourcesResource, c.ns, name), &v1alpha1.AwsSqsSource{}) @@ -50,7 +52,7 @@ func (c *FakeAwsSqsSources) Get(name string, options v1.GetOptions) (result *v1a } // List takes label and field selectors, and returns the list of AwsSqsSources that match those selectors. -func (c *FakeAwsSqsSources) List(opts v1.ListOptions) (result *v1alpha1.AwsSqsSourceList, err error) { +func (c *FakeAwsSqsSources) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.AwsSqsSourceList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(awssqssourcesResource, awssqssourcesKind, c.ns, opts), &v1alpha1.AwsSqsSourceList{}) @@ -72,14 +74,14 @@ func (c *FakeAwsSqsSources) List(opts v1.ListOptions) (result *v1alpha1.AwsSqsSo } // Watch returns a watch.Interface that watches the requested awsSqsSources. -func (c *FakeAwsSqsSources) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeAwsSqsSources) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(awssqssourcesResource, c.ns, opts)) } // Create takes the representation of a awsSqsSource and creates it. Returns the server's representation of the awsSqsSource, and an error, if there is any. -func (c *FakeAwsSqsSources) Create(awsSqsSource *v1alpha1.AwsSqsSource) (result *v1alpha1.AwsSqsSource, err error) { +func (c *FakeAwsSqsSources) Create(ctx context.Context, awsSqsSource *v1alpha1.AwsSqsSource, opts v1.CreateOptions) (result *v1alpha1.AwsSqsSource, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(awssqssourcesResource, c.ns, awsSqsSource), &v1alpha1.AwsSqsSource{}) @@ -90,7 +92,7 @@ func (c *FakeAwsSqsSources) Create(awsSqsSource *v1alpha1.AwsSqsSource) (result } // Update takes the representation of a awsSqsSource and updates it. Returns the server's representation of the awsSqsSource, and an error, if there is any. -func (c *FakeAwsSqsSources) Update(awsSqsSource *v1alpha1.AwsSqsSource) (result *v1alpha1.AwsSqsSource, err error) { +func (c *FakeAwsSqsSources) Update(ctx context.Context, awsSqsSource *v1alpha1.AwsSqsSource, opts v1.UpdateOptions) (result *v1alpha1.AwsSqsSource, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(awssqssourcesResource, c.ns, awsSqsSource), &v1alpha1.AwsSqsSource{}) @@ -102,7 +104,7 @@ func (c *FakeAwsSqsSources) Update(awsSqsSource *v1alpha1.AwsSqsSource) (result // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeAwsSqsSources) UpdateStatus(awsSqsSource *v1alpha1.AwsSqsSource) (*v1alpha1.AwsSqsSource, error) { +func (c *FakeAwsSqsSources) UpdateStatus(ctx context.Context, awsSqsSource *v1alpha1.AwsSqsSource, opts v1.UpdateOptions) (*v1alpha1.AwsSqsSource, error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(awssqssourcesResource, "status", c.ns, awsSqsSource), &v1alpha1.AwsSqsSource{}) @@ -113,7 +115,7 @@ func (c *FakeAwsSqsSources) UpdateStatus(awsSqsSource *v1alpha1.AwsSqsSource) (* } // Delete takes name of the awsSqsSource and deletes it. Returns an error if one occurs. -func (c *FakeAwsSqsSources) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeAwsSqsSources) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewDeleteAction(awssqssourcesResource, c.ns, name), &v1alpha1.AwsSqsSource{}) @@ -121,15 +123,15 @@ func (c *FakeAwsSqsSources) Delete(name string, options *v1.DeleteOptions) error } // DeleteCollection deletes a collection of objects. -func (c *FakeAwsSqsSources) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(awssqssourcesResource, c.ns, listOptions) +func (c *FakeAwsSqsSources) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(awssqssourcesResource, c.ns, listOpts) _, err := c.Fake.Invokes(action, &v1alpha1.AwsSqsSourceList{}) return err } // Patch applies the patch and returns the patched awsSqsSource. -func (c *FakeAwsSqsSources) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.AwsSqsSource, err error) { +func (c *FakeAwsSqsSources) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.AwsSqsSource, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(awssqssourcesResource, c.ns, name, pt, data, subresources...), &v1alpha1.AwsSqsSource{}) diff --git a/awssqs/pkg/client/informers/externalversions/sources/v1alpha1/awssqssource.go b/awssqs/pkg/client/informers/externalversions/sources/v1alpha1/awssqssource.go index 4a59983898..bdbb0abe34 100644 --- a/awssqs/pkg/client/informers/externalversions/sources/v1alpha1/awssqssource.go +++ b/awssqs/pkg/client/informers/externalversions/sources/v1alpha1/awssqssource.go @@ -19,6 +19,7 @@ limitations under the License. package v1alpha1 import ( + "context" time "time" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -61,13 +62,13 @@ func NewFilteredAwsSqsSourceInformer(client versioned.Interface, namespace strin if tweakListOptions != nil { tweakListOptions(&options) } - return client.SourcesV1alpha1().AwsSqsSources(namespace).List(options) + return client.SourcesV1alpha1().AwsSqsSources(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.SourcesV1alpha1().AwsSqsSources(namespace).Watch(options) + return client.SourcesV1alpha1().AwsSqsSources(namespace).Watch(context.TODO(), options) }, }, &sourcesv1alpha1.AwsSqsSource{}, diff --git a/awssqs/pkg/client/injection/reconciler/sources/v1alpha1/awssqssource/reconciler.go b/awssqs/pkg/client/injection/reconciler/sources/v1alpha1/awssqssource/reconciler.go index a8b5ed96e5..07e5675476 100644 --- a/awssqs/pkg/client/injection/reconciler/sources/v1alpha1/awssqssource/reconciler.go +++ b/awssqs/pkg/client/injection/reconciler/sources/v1alpha1/awssqssource/reconciler.go @@ -315,7 +315,7 @@ func (r *reconcilerImpl) updateStatus(ctx context.Context, existing *v1alpha1.Aw getter := r.Client.SourcesV1alpha1().AwsSqsSources(desired.Namespace) - existing, err = getter.Get(desired.Name, metav1.GetOptions{}) + existing, err = getter.Get(ctx, desired.Name, metav1.GetOptions{}) if err != nil { return err } @@ -334,7 +334,7 @@ func (r *reconcilerImpl) updateStatus(ctx context.Context, existing *v1alpha1.Aw updater := r.Client.SourcesV1alpha1().AwsSqsSources(existing.Namespace) - _, err = updater.UpdateStatus(existing) + _, err = updater.UpdateStatus(ctx, existing, metav1.UpdateOptions{}) return err }) } @@ -392,7 +392,7 @@ func (r *reconcilerImpl) updateFinalizersFiltered(ctx context.Context, resource patcher := r.Client.SourcesV1alpha1().AwsSqsSources(resource.Namespace) resourceName := resource.Name - resource, err = patcher.Patch(resourceName, types.MergePatchType, patch) + resource, err = patcher.Patch(ctx, resourceName, types.MergePatchType, patch, metav1.PatchOptions{}) if err != nil { r.Recorder.Eventf(resource, v1.EventTypeWarning, "FinalizerUpdateFailed", "Failed to update finalizers for %q: %v", resourceName, err) diff --git a/awssqs/pkg/reconciler/awssqssource.go b/awssqs/pkg/reconciler/awssqssource.go index 74be869c63..835963ead0 100644 --- a/awssqs/pkg/reconciler/awssqssource.go +++ b/awssqs/pkg/reconciler/awssqssource.go @@ -78,7 +78,7 @@ func (r *Reconciler) ReconcileKind(ctx context.Context, src *v1alpha1.AwsSqsSour APIVersion: src.Spec.Sink.APIVersion, }, } - sinkURI, err := r.sinkResolver.URIFromDestinationV1(*dest, src) + sinkURI, err := r.sinkResolver.URIFromDestinationV1(ctx, *dest, src) if err != nil { src.Status.MarkNoSink("NotFound", "") return err @@ -123,13 +123,13 @@ func (r *Reconciler) createReceiveAdapter(ctx context.Context, src *v1alpha1.Aws SinkURI: src.Status.SinkURI.String(), }) - ra, err = r.kubeClientSet.AppsV1().Deployments(src.Namespace).Create(expected) + ra, err = r.kubeClientSet.AppsV1().Deployments(src.Namespace).Create(ctx, expected, metav1.CreateOptions{}) logging.FromContext(ctx).Desugar().Info("Receive Adapter created.", zap.Error(err), zap.Any("receiveAdapter", ra)) return ra, err } func (r *Reconciler) getReceiveAdapter(ctx context.Context, src *v1alpha1.AwsSqsSource) (*appsv1.Deployment, error) { - dl, err := r.kubeClientSet.AppsV1().Deployments(src.Namespace).List(metav1.ListOptions{ + dl, err := r.kubeClientSet.AppsV1().Deployments(src.Namespace).List(ctx, metav1.ListOptions{ LabelSelector: r.getLabelSelector(src).String(), }) diff --git a/camel/OWNERS b/camel/OWNERS deleted file mode 100644 index 67f1ccfff8..0000000000 --- a/camel/OWNERS +++ /dev/null @@ -1,9 +0,0 @@ -approvers: - - camel-approvers - -reviewers: - - camel-reviewers - -labels: - - area/Camel - diff --git a/camel/source/PROJECT b/camel/source/PROJECT deleted file mode 100644 index ef9cea0ebe..0000000000 --- a/camel/source/PROJECT +++ /dev/null @@ -1,3 +0,0 @@ -version: "1" -domain: eventing.knative.dev -repo: knative.dev/eventing-contrib diff --git a/camel/source/cmd/controller/main.go b/camel/source/cmd/controller/main.go deleted file mode 100644 index b1bed64e01..0000000000 --- a/camel/source/cmd/controller/main.go +++ /dev/null @@ -1,28 +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. -*/ - -package main - -import ( - "knative.dev/eventing-contrib/camel/source/pkg/reconciler" - "knative.dev/pkg/injection/sharedmain" -) - -func main() { - sharedmain.Main("camel-k-controller", - reconciler.NewController, - ) -} diff --git a/camel/source/config/100-namespace.yaml b/camel/source/config/100-namespace.yaml deleted file mode 100644 index 191577e146..0000000000 --- a/camel/source/config/100-namespace.yaml +++ /dev/null @@ -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. - -apiVersion: v1 -kind: Namespace -metadata: - name: knative-sources - labels: - contrib.eventing.knative.dev/release: devel diff --git a/camel/source/config/200-serviceaccount.yaml b/camel/source/config/200-serviceaccount.yaml deleted file mode 100644 index b1b00e1f98..0000000000 --- a/camel/source/config/200-serviceaccount.yaml +++ /dev/null @@ -1,21 +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. - -apiVersion: v1 -kind: ServiceAccount -metadata: - name: camel-controller-manager - namespace: knative-sources - labels: - contrib.eventing.knative.dev/release: devel diff --git a/camel/source/config/201-clusterrole.yaml b/camel/source/config/201-clusterrole.yaml deleted file mode 100644 index 1f20ab9f80..0000000000 --- a/camel/source/config/201-clusterrole.yaml +++ /dev/null @@ -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. - -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: camel-controller - labels: - contrib.eventing.knative.dev/release: devel -rules: -- apiGroups: - - apps - resources: - - deployments - verbs: &everything - - get - - list - - watch - - create - - update - - patch - - delete -- apiGroups: - - rbac.authorization.k8s.io - resources: - - clusterroles - verbs: - - list - -- apiGroups: - - "" - resources: - - events - - configmaps - verbs: *everything - -- apiGroups: - - sources.knative.dev - resources: - - camelsources - verbs: *everything - -- apiGroups: - - sources.knative.dev - resources: - - camelsources/status - - camelsources/finalizers - verbs: - - get - - update - - patch - -- apiGroups: - - "coordination.k8s.io" - resources: - - leases - verbs: *everything - -- apiGroups: - - camel.apache.org - resources: - - '*' - verbs: *everything - ---- -# The role is needed for the aggregated role source-observer in knative-eventing to provide readonly access to "Sources". -# Ref: https://github.com/knative/eventing/tree/master/config/core/rolessource-observer-clusterrole.yaml. -kind: ClusterRole -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: eventing-contrib-camel-source-observer - labels: - eventing.knative.dev/release: devel - duck.knative.dev/source: "true" -rules: - - apiGroups: - - "sources.knative.dev" - resources: - - "camelsources" - verbs: - - get - - list - - watch diff --git a/camel/source/config/202-clusterrolebinding.yaml b/camel/source/config/202-clusterrolebinding.yaml deleted file mode 100644 index fd87ee56fe..0000000000 --- a/camel/source/config/202-clusterrolebinding.yaml +++ /dev/null @@ -1,48 +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. - -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: camel-controller-rolebinding - labels: - contrib.eventing.knative.dev/release: devel -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: camel-controller -subjects: -- kind: ServiceAccount - name: camel-controller-manager - namespace: knative-sources - ---- - -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: eventing-sources-camel-controller-addressable-resolver - labels: - contrib.eventing.knative.dev/release: devel -subjects: -- kind: ServiceAccount - name: camel-controller-manager - namespace: knative-sources -# An aggregated ClusterRole for all Addressable CRDs. -# Ref: https://github.com/knative/eventing/tree/master/config/core/rolesaddressable-resolvers-clusterrole.yaml -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: addressable-resolver - diff --git a/camel/source/config/203-camel-source-observer-cluster-role.yaml b/camel/source/config/203-camel-source-observer-cluster-role.yaml deleted file mode 100644 index 412e2e3203..0000000000 --- a/camel/source/config/203-camel-source-observer-cluster-role.yaml +++ /dev/null @@ -1,30 +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. - -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: camel-source-observer - labels: - contrib.eventing.knative.dev/release: devel - duck.knative.dev/source: "true" -rules: -- apiGroups: - - sources.knative.dev - resources: - - camelsources - verbs: - - get - - list - - watch diff --git a/camel/source/config/300-camelsource.yaml b/camel/source/config/300-camelsource.yaml deleted file mode 100644 index 5ebf38c9cc..0000000000 --- a/camel/source/config/300-camelsource.yaml +++ /dev/null @@ -1,99 +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. - -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - labels: - contrib.eventing.knative.dev/release: devel - eventing.knative.dev/source: "true" - duck.knative.dev/source: "true" - knative.dev/crd-install: "true" - name: camelsources.sources.knative.dev -spec: - group: sources.knative.dev - names: - categories: - - all - - knative - - eventing - - sources - kind: CamelSource - plural: camelsources - scope: Namespaced - subresources: - status: {} - additionalPrinterColumns: - - name: Ready - type: string - JSONPath: '.status.conditions[?(@.type=="Ready")].status' - - name: Reason - type: string - JSONPath: '.status.conditions[?(@.type=="Ready")].reason' - - name: Age - type: date - JSONPath: .metadata.creationTimestamp - validation: - openAPIV3Schema: - properties: - apiVersion: - type: string - kind: - type: string - metadata: - type: object - spec: - properties: - sink: - type: object - description: "Reference to an object that will resolve to a domain name to use as the sink." - ceOverrides: - type: object - description: "Defines overrides to control modifications of the event sent to the sink." - source: - properties: - flow: - type: object - integration: - type: object - type: object - required: - - source - type: object - status: - properties: - conditions: - items: - properties: - lastTransitionTime: - type: string - message: - type: string - reason: - type: string - severity: - type: string - status: - type: string - type: - type: string - required: - - type - - status - type: object - type: array - sinkUri: - type: string - type: object - version: v1alpha1 diff --git a/camel/source/config/400-controller-service.yaml b/camel/source/config/400-controller-service.yaml deleted file mode 100644 index 196fb0a4eb..0000000000 --- a/camel/source/config/400-controller-service.yaml +++ /dev/null @@ -1,28 +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. - -apiVersion: v1 -kind: Service -metadata: - labels: - contrib.eventing.knative.dev/release: devel - control-plane: camel-controller-manager - name: camel-controller-manager - namespace: knative-sources -spec: - selector: - control-plane: camel-controller-manager - ports: - - name: https-camel - port: 443 diff --git a/camel/source/config/500-controller.yaml b/camel/source/config/500-controller.yaml deleted file mode 100644 index 3659ec1d63..0000000000 --- a/camel/source/config/500-controller.yaml +++ /dev/null @@ -1,57 +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. - -apiVersion: apps/v1 -kind: StatefulSet -metadata: - labels: - contrib.eventing.knative.dev/release: devel - control-plane: camel-controller-manager - name: camel-controller-manager - namespace: knative-sources -spec: - selector: - matchLabels: - control-plane: camel-controller-manager - serviceName: camel-controller-manager - template: - metadata: - labels: - control-plane: camel-controller-manager - spec: - containers: - - image: ko://knative.dev/eventing-contrib/camel/source/cmd/controller - name: manager - - resources: - requests: - cpu: 20m - memory: 20Mi - - env: - - name: SYSTEM_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - - name: CONFIG_LOGGING_NAME - value: config-logging - - name: CONFIG_OBSERVABILITY_NAME - value: config-observability - - name: CONFIG_LEADERELECTION_NAME - value: config-leader-election-camel - - name: METRICS_DOMAIN - value: knative.dev/sources - - serviceAccount: camel-controller-manager - terminationGracePeriodSeconds: 10 diff --git a/camel/source/config/dummy.go b/camel/source/config/dummy.go deleted file mode 100644 index ec36cc370d..0000000000 --- a/camel/source/config/dummy.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -Copyright 2020 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 - - https://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. -*/ - -// Package config is a placeholder that allows us to pull in config files -// via go mod vendor. -package config diff --git a/camel/source/config/logging.yaml b/camel/source/config/logging.yaml deleted file mode 100644 index 9e7893372e..0000000000 --- a/camel/source/config/logging.yaml +++ /dev/null @@ -1,49 +0,0 @@ -# Copyright 2020 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 -# -# https://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. - -apiVersion: v1 -kind: ConfigMap -metadata: - name: config-logging - namespace: knative-sources - labels: - contrib.eventing.knative.dev/release: devel -data: - # Common configuration for all Knative codebase - zap-logger-config: | - { - "level": "info", - "development": false, - "outputPaths": ["stdout"], - "errorOutputPaths": ["stderr"], - "encoding": "json", - "encoderConfig": { - "timeKey": "ts", - "levelKey": "level", - "nameKey": "logger", - "callerKey": "caller", - "messageKey": "msg", - "stacktraceKey": "stacktrace", - "lineEnding": "", - "levelEncoder": "", - "timeEncoder": "iso8601", - "durationEncoder": "", - "callerEncoder": "" - } - } - - # Log level overrides - # For all components changes are be picked up immediately. - loglevel.controller: "info" - loglevel.webhook: "info" diff --git a/camel/source/config/observability.yaml b/camel/source/config/observability.yaml deleted file mode 100644 index c7c3ee9f91..0000000000 --- a/camel/source/config/observability.yaml +++ /dev/null @@ -1,65 +0,0 @@ -# Copyright 2020 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 -# -# https://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. - -apiVersion: v1 -kind: ConfigMap -metadata: - name: config-observability - namespace: knative-sources - labels: - contrib.eventing.knative.dev/release: devel -data: - _example: | - ################################ - # # - # EXAMPLE CONFIGURATION # - # # - ################################ - - # This block is not actually functional configuration, - # but serves to illustrate the available configuration - # options and document them in a way that is accessible - # to users that `kubectl edit` this config map. - # - # These sample configuration options may be copied out of - # this example block and unindented to be in the data block - # to actually change the configuration. - - # metrics.backend-destination field specifies the system metrics destination. - # It supports either prometheus (the default) or stackdriver. - # Note: Using stackdriver will incur additional charges - metrics.backend-destination: prometheus - - # metrics.request-metrics-backend-destination specifies the request metrics - # destination. If non-empty, it enables queue proxy to send request metrics. - # Currently supported values: prometheus, stackdriver. - metrics.request-metrics-backend-destination: prometheus - - # metrics.stackdriver-project-id field specifies the stackdriver project ID. This - # field is optional. When running on GCE, application default credentials will be - # used if this field is not provided. - metrics.stackdriver-project-id: "" - - # metrics.allow-stackdriver-custom-metrics indicates whether it is allowed to send metrics to - # Stackdriver using "global" resource type and custom metric type if the - # metrics are not supported by "knative_broker", "knative_trigger", and "knative_source" resource types. - # Setting this flag to "true" could cause extra Stackdriver charge. - # If metrics.backend-destination is not Stackdriver, this is ignored. - metrics.allow-stackdriver-custom-metrics: "false" - - # profiling.enable indicates whether it is allowed to retrieve runtime profiling data from - # the pods via an HTTP server in the format expected by the pprof visualization tool. When - # enabled, the Knative Eventing pods expose the profiling data on an alternate HTTP port 8008. - # The HTTP context root for profiling is then /debug/pprof/. - profiling.enable: "false" diff --git a/camel/source/pkg/apis/addtoscheme_sources_v1alpha1.go b/camel/source/pkg/apis/addtoscheme_sources_v1alpha1.go deleted file mode 100644 index d7bfcb623f..0000000000 --- a/camel/source/pkg/apis/addtoscheme_sources_v1alpha1.go +++ /dev/null @@ -1,26 +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. -*/ - -package apis - -import ( - "knative.dev/eventing-contrib/camel/source/pkg/apis/sources/v1alpha1" -) - -func init() { - // Register the types with the Scheme so the components can map objects to GroupVersionKinds and back - AddToSchemes = append(AddToSchemes, v1alpha1.SchemeBuilder.AddToScheme) -} diff --git a/camel/source/pkg/apis/apis.go b/camel/source/pkg/apis/apis.go deleted file mode 100644 index cf74318d24..0000000000 --- a/camel/source/pkg/apis/apis.go +++ /dev/null @@ -1,30 +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. -*/ - -// Package apis contains Kubernetes API groups. -package apis - -import ( - "k8s.io/apimachinery/pkg/runtime" -) - -// AddToSchemes may be used to add all resources defined in the project to a Scheme -var AddToSchemes runtime.SchemeBuilder - -// AddToScheme adds all Resources to the Scheme -func AddToScheme(s *runtime.Scheme) error { - return AddToSchemes.AddToScheme(s) -} diff --git a/camel/source/pkg/apis/sources/group.go b/camel/source/pkg/apis/sources/group.go deleted file mode 100644 index dacb4955e3..0000000000 --- a/camel/source/pkg/apis/sources/group.go +++ /dev/null @@ -1,18 +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. -*/ - -// Package sources contains sources API versions -package sources diff --git a/camel/source/pkg/apis/sources/v1alpha1/camelsource_types.go b/camel/source/pkg/apis/sources/v1alpha1/camelsource_types.go deleted file mode 100644 index efdebe0e24..0000000000 --- a/camel/source/pkg/apis/sources/v1alpha1/camelsource_types.go +++ /dev/null @@ -1,199 +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. -*/ - -package v1alpha1 - -import ( - camelv1 "github.com/apache/camel-k/pkg/apis/camel/v1" - corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" - "knative.dev/pkg/apis" - "knative.dev/pkg/apis/duck" - duckv1 "knative.dev/pkg/apis/duck/v1" - duckv1beta1 "knative.dev/pkg/apis/duck/v1beta1" - "knative.dev/pkg/kmeta" -) - -// +genclient -// +genreconciler -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// CamelSource is the Schema for the camelsources API -// +k8s:openapi-gen=true -type CamelSource struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - Spec CamelSourceSpec `json:"spec,omitempty"` - Status CamelSourceStatus `json:"status,omitempty"` -} - -// Check that CamelSource can be validated and can be defaulted. -var _ runtime.Object = (*CamelSource)(nil) -var _ kmeta.OwnerRefable = (*CamelSource)(nil) -var _ duckv1.KRShaped = (*CamelSource)(nil) - -// Check that CamelSource implements the Conditions duck type. -var _ = duck.VerifyType(&CamelSource{}, &duckv1.Conditions{}) - -const ( - // CamelSourceConditionReady has status True when the CamelSource is ready to send events. - CamelConditionReady = apis.ConditionReady - - // CamelConditionSinkProvided has status True when the CamelSource has been configured with a sink target. - CamelConditionSinkProvided apis.ConditionType = "SinkProvided" - - // CamelConditionDeployed has status True when the CamelSource has had it's deployment created. - CamelConditionDeployed apis.ConditionType = "Deployed" -) - -var camelCondSet = apis.NewLivingConditionSet( - CamelConditionSinkProvided, - CamelConditionDeployed, -) - -// CamelSourceSpec defines the desired state of CamelSource -type CamelSourceSpec struct { - // Source is the reference to the integration flow to run. - Source CamelSourceOriginSpec `json:"source"` - - // Sink is a reference to an object that will resolve to a domain name to use as the sink. - // +optional - Sink *duckv1beta1.Destination `json:"sink,omitempty"` - - // CloudEventOverrides defines overrides to control the output format and - // modifications of the event sent to the sink. - // +optional - CloudEventOverrides *duckv1.CloudEventOverrides `json:"ceOverrides,omitempty"` -} - -// CamelSourceOriginSpec is the integration flow to run -type CamelSourceOriginSpec struct { - // Integration is a kind of source that contains a Camel K integration - Integration *camelv1.IntegrationSpec `json:"integration,omitempty"` - // Flow is a kind of source that contains a single Camel YAML flow route - Flow *Flow `json:"flow,omitempty"` -} - -// Flow is an unstructured object representing a Camel Flow in YAML/JSON DSL -type Flow map[string]interface{} - -// DeepCopy copies the receiver, creating a new Flow. -func (in *Flow) DeepCopy() *Flow { - if in == nil { - return nil - } - out := Flow(runtime.DeepCopyJSON(*in)) - return &out -} - -// CamelSourceStatus defines the observed state of CamelSource -type CamelSourceStatus struct { - // inherits duck/v1alpha1 Status, which currently provides: - // * ObservedGeneration - the 'Generation' of the Service that was last processed by the controller. - // * Conditions - the latest available observations of a resource's current state. - duckv1.Status `json:",inline"` - - // SinkURI is the current active sink URI that has been configured for the CamelSource. - // +optional - SinkURI string `json:"sinkUri,omitempty"` -} - -// GetConditionSet retrieves the condition set for this resource. Implements the KRShaped interface. -func (*CamelSource) GetConditionSet() apis.ConditionSet { - return camelCondSet -} - -// GetStatus retrieves the duck status for this resource. Implements the KRShaped interface. -func (c *CamelSource) GetStatus() *duckv1.Status { - return &c.Status.Status -} - -// GetCondition returns the condition currently associated with the given type, or nil. -func (s *CamelSourceStatus) GetCondition(t apis.ConditionType) *apis.Condition { - return camelCondSet.Manage(s).GetCondition(t) -} - -// IsReady returns true if the resource is ready overall. -func (s *CamelSourceStatus) IsReady() bool { - return camelCondSet.Manage(s).IsHappy() -} - -// InitializeConditions sets relevant unset conditions to Unknown state. -func (s *CamelSourceStatus) InitializeConditions() { - camelCondSet.Manage(s).InitializeConditions() -} - -// MarSink sets the condition that the source has a sink configured. -func (s *CamelSourceStatus) MarkSink(uri string) { - s.SinkURI = uri - if len(uri) > 0 { - camelCondSet.Manage(s).MarkTrue(CamelConditionSinkProvided) - } else { - camelCondSet.Manage(s).MarkUnknown(CamelConditionSinkProvided, "SinkEmpty", "Sink has resolved to empty.") - } -} - -// MarkSinkWarnDeprecated sets the condition that the source has a sink configured and warns ref is deprecated. -func (s *CamelSourceStatus) MarkSinkWarnRefDeprecated(uri string) { - s.SinkURI = uri - if len(uri) > 0 { - c := apis.Condition{ - Type: CamelConditionSinkProvided, - Status: corev1.ConditionTrue, - Severity: apis.ConditionSeverityError, - Message: "Using deprecated object ref fields when specifying spec.sink. Update to spec.sink.ref. These will be removed in a future release.", - } - camelCondSet.Manage(s).SetCondition(c) - } else { - camelCondSet.Manage(s).MarkUnknown(CamelConditionSinkProvided, "SinkEmpty", "Sink has resolved to empty.") - } -} - -// MarkNoSink sets the condition that the source does not have a sink configured. -func (s *CamelSourceStatus) MarkNoSink(reason, messageFormat string, messageA ...interface{}) { - camelCondSet.Manage(s).MarkFalse(CamelConditionSinkProvided, reason, messageFormat, messageA...) -} - -// MarkDeployed sets the condition that the source has been deployed. -func (s *CamelSourceStatus) MarkDeployed() { - camelCondSet.Manage(s).MarkTrue(CamelConditionDeployed) -} - -// MarkDeploying sets the condition that the source is deploying. -func (s *CamelSourceStatus) MarkDeploying(reason, messageFormat string, messageA ...interface{}) { - camelCondSet.Manage(s).MarkUnknown(CamelConditionDeployed, reason, messageFormat, messageA...) -} - -// MarkNotDeployed sets the condition that the source has not been deployed. -func (s *CamelSourceStatus) MarkNotDeployed(reason, messageFormat string, messageA ...interface{}) { - camelCondSet.Manage(s).MarkFalse(CamelConditionDeployed, reason, messageFormat, messageA...) -} - -func (s *CamelSource) GetGroupVersionKind() schema.GroupVersionKind { - return SchemeGroupVersion.WithKind("CamelSource") -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// CamelSourceList contains a list of CamelSource -type CamelSourceList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []CamelSource `json:"items"` -} diff --git a/camel/source/pkg/apis/sources/v1alpha1/camelsource_types_test.go b/camel/source/pkg/apis/sources/v1alpha1/camelsource_types_test.go deleted file mode 100644 index 2d8f3c3d7f..0000000000 --- a/camel/source/pkg/apis/sources/v1alpha1/camelsource_types_test.go +++ /dev/null @@ -1,347 +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. -*/ - -package v1alpha1 - -import ( - "testing" - - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" - corev1 "k8s.io/api/core/v1" - "knative.dev/pkg/apis" - duckapis "knative.dev/pkg/apis" - duckv1 "knative.dev/pkg/apis/duck/v1" -) - -func TestCamelSourceGetConditionSet(t *testing.T) { - r := &CamelSource{} - - if got, want := r.GetConditionSet().GetTopLevelConditionType(), apis.ConditionReady; got != want { - t.Errorf("GetTopLevelCondition=%v, want=%v", got, want) - } -} - -func TestCamelSourceSourceGetStatus(t *testing.T) { - status := &duckv1.Status{} - config := CamelSource{ - Status: CamelSourceStatus{ - Status: *status, - }, - } - - if !cmp.Equal(config.GetStatus(), status) { - t.Errorf("GetStatus did not retrieve status. Got=%v Want=%v", config.GetStatus(), status) - } -} - -func TestCamelSourceStatusIsReady(t *testing.T) { - tests := []struct { - name string - s *CamelSourceStatus - want bool - }{{ - name: "uninitialized", - s: &CamelSourceStatus{}, - want: false, - }, { - name: "initialized", - s: func() *CamelSourceStatus { - s := &CamelSourceStatus{} - s.InitializeConditions() - return s - }(), - want: false, - }, { - name: "mark deployed", - s: func() *CamelSourceStatus { - s := &CamelSourceStatus{} - s.InitializeConditions() - s.MarkDeployed() - return s - }(), - want: false, - }, { - name: "mark sink", - s: func() *CamelSourceStatus { - s := &CamelSourceStatus{} - s.InitializeConditions() - s.MarkSink("uri://example") - return s - }(), - want: false, - }, { - name: "mark sink and deployed", - s: func() *CamelSourceStatus { - s := &CamelSourceStatus{} - s.InitializeConditions() - s.MarkSink("uri://example") - s.MarkDeployed() - return s - }(), - want: true, - }, { - name: "mark sink and deployed then no sink", - s: func() *CamelSourceStatus { - s := &CamelSourceStatus{} - s.InitializeConditions() - s.MarkSink("uri://example") - s.MarkDeployed() - s.MarkNoSink("Testing", "") - return s - }(), - want: false, - }, { - name: "mark sink and deployed then deploying", - s: func() *CamelSourceStatus { - s := &CamelSourceStatus{} - s.InitializeConditions() - s.MarkSink("uri://example") - s.MarkDeployed() - s.MarkDeploying("Testing", "") - return s - }(), - want: false, - }, { - name: "mark sink and deployed then not deployed", - s: func() *CamelSourceStatus { - s := &CamelSourceStatus{} - s.InitializeConditions() - s.MarkSink("uri://example") - s.MarkDeployed() - s.MarkNotDeployed("Testing", "") - return s - }(), - want: false, - }, { - name: "mark sink and not deployed then deploying then deployed", - s: func() *CamelSourceStatus { - s := &CamelSourceStatus{} - s.InitializeConditions() - s.MarkSink("uri://example") - s.MarkNotDeployed("MarkNotDeployed", "") - s.MarkDeploying("MarkDeploying", "") - s.MarkDeployed() - return s - }(), - want: true, - }, { - name: "mark sink empty and deployed", - s: func() *CamelSourceStatus { - s := &CamelSourceStatus{} - s.InitializeConditions() - s.MarkSink("") - s.MarkDeployed() - return s - }(), - want: false, - }, { - name: "mark sink empty and deployed then sink", - s: func() *CamelSourceStatus { - s := &CamelSourceStatus{} - s.InitializeConditions() - s.MarkSink("") - s.MarkDeployed() - s.MarkSink("uri://example") - return s - }(), - want: true, - }} - - for _, test := range tests { - t.Run(test.name, func(t *testing.T) { - got := test.s.IsReady() - if diff := cmp.Diff(test.want, got); diff != "" { - t.Errorf("%s: unexpected condition (-want, +got) = %v", test.name, diff) - } - }) - } -} - -func TestCamelSourceStatusGetCondition(t *testing.T) { - tests := []struct { - name string - s *CamelSourceStatus - condQuery duckapis.ConditionType - want *duckapis.Condition - }{{ - name: "uninitialized", - s: &CamelSourceStatus{}, - condQuery: CamelConditionReady, - want: nil, - }, { - name: "initialized", - s: func() *CamelSourceStatus { - s := &CamelSourceStatus{} - s.InitializeConditions() - return s - }(), - condQuery: CamelConditionReady, - want: &duckapis.Condition{ - Type: CamelConditionReady, - Status: corev1.ConditionUnknown, - }, - }, { - name: "mark deployed", - s: func() *CamelSourceStatus { - s := &CamelSourceStatus{} - s.InitializeConditions() - s.MarkDeployed() - return s - }(), - condQuery: CamelConditionReady, - want: &duckapis.Condition{ - Type: CamelConditionReady, - Status: corev1.ConditionUnknown, - }, - }, { - name: "mark sink", - s: func() *CamelSourceStatus { - s := &CamelSourceStatus{} - s.InitializeConditions() - s.MarkSink("uri://example") - return s - }(), - condQuery: CamelConditionReady, - want: &duckapis.Condition{ - Type: CamelConditionReady, - Status: corev1.ConditionUnknown, - }, - }, { - name: "mark sink and deployed", - s: func() *CamelSourceStatus { - s := &CamelSourceStatus{} - s.InitializeConditions() - s.MarkSink("uri://example") - s.MarkDeployed() - return s - }(), - condQuery: CamelConditionReady, - want: &duckapis.Condition{ - Type: CamelConditionReady, - Status: corev1.ConditionTrue, - }, - }, { - name: "mark sink and deployed then no sink", - s: func() *CamelSourceStatus { - s := &CamelSourceStatus{} - s.InitializeConditions() - s.MarkSink("uri://example") - s.MarkDeployed() - s.MarkNoSink("Testing", "hi%s", "") - return s - }(), - condQuery: CamelConditionReady, - want: &duckapis.Condition{ - Type: CamelConditionReady, - Status: corev1.ConditionFalse, - Reason: "Testing", - Message: "hi", - }, - }, { - name: "mark sink and deployed then deploying", - s: func() *CamelSourceStatus { - s := &CamelSourceStatus{} - s.InitializeConditions() - s.MarkSink("uri://example") - s.MarkDeployed() - s.MarkDeploying("Testing", "hi%s", "") - return s - }(), - condQuery: CamelConditionReady, - want: &duckapis.Condition{ - Type: CamelConditionReady, - Status: corev1.ConditionUnknown, - Reason: "Testing", - Message: "hi", - }, - }, { - name: "mark sink and deployed then not deployed", - s: func() *CamelSourceStatus { - s := &CamelSourceStatus{} - s.InitializeConditions() - s.MarkSink("uri://example") - s.MarkDeployed() - s.MarkNotDeployed("Testing", "hi%s", "") - return s - }(), - condQuery: CamelConditionReady, - want: &duckapis.Condition{ - Type: CamelConditionReady, - Status: corev1.ConditionFalse, - Reason: "Testing", - Message: "hi", - }, - }, { - name: "mark sink and not deployed then deploying then deployed", - s: func() *CamelSourceStatus { - s := &CamelSourceStatus{} - s.InitializeConditions() - s.MarkSink("uri://example") - s.MarkNotDeployed("MarkNotDeployed", "%s", "") - s.MarkDeploying("MarkDeploying", "%s", "") - s.MarkDeployed() - return s - }(), - condQuery: CamelConditionReady, - want: &duckapis.Condition{ - Type: CamelConditionReady, - Status: corev1.ConditionTrue, - }, - }, { - name: "mark sink empty and deployed", - s: func() *CamelSourceStatus { - s := &CamelSourceStatus{} - s.InitializeConditions() - s.MarkSink("") - s.MarkDeployed() - return s - }(), - condQuery: CamelConditionReady, - want: &duckapis.Condition{ - Type: CamelConditionReady, - Status: corev1.ConditionUnknown, - Reason: "SinkEmpty", - Message: "Sink has resolved to empty.", - }, - }, { - name: "mark sink empty and deployed then sink", - s: func() *CamelSourceStatus { - s := &CamelSourceStatus{} - s.InitializeConditions() - s.MarkSink("") - s.MarkDeployed() - s.MarkSink("uri://example") - return s - }(), - condQuery: CamelConditionReady, - want: &duckapis.Condition{ - Type: CamelConditionReady, - Status: corev1.ConditionTrue, - }, - }} - - for _, test := range tests { - t.Run(test.name, func(t *testing.T) { - got := test.s.GetCondition(test.condQuery) - ignoreTime := cmpopts.IgnoreFields(duckapis.Condition{}, - "LastTransitionTime", "Severity") - if diff := cmp.Diff(test.want, got, ignoreTime); diff != "" { - t.Errorf("unexpected condition (-want, +got) = %v", diff) - } - }) - } -} diff --git a/camel/source/pkg/apis/sources/v1alpha1/register.go b/camel/source/pkg/apis/sources/v1alpha1/register.go deleted file mode 100644 index 5a3fcfc20c..0000000000 --- a/camel/source/pkg/apis/sources/v1alpha1/register.go +++ /dev/null @@ -1,58 +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. -*/ - -// Package v1alpha1 contains API Schema definitions for the sources v1alpha1 API group -// +k8s:openapi-gen=true -// +k8s:deepcopy-gen=package,register -// +k8s:defaulter-gen=TypeMeta -// +groupName=sources.knative.dev -package v1alpha1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -var ( - // SchemeGroupVersion is group version used to register these objects - SchemeGroupVersion = schema.GroupVersion{Group: "sources.knative.dev", Version: "v1alpha1"} - - // SchemeBuilder is used to add go types to the GroupVersionKind scheme - SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) - - AddToScheme = SchemeBuilder.AddToScheme -) - -// Resource takes an unqualified resource and returns a Group qualified GroupResource -func Resource(resource string) schema.GroupResource { - return SchemeGroupVersion.WithResource(resource).GroupResource() -} - -// Kind takes an unqualified kind and returns back a Group qualified GroupKind -func Kind(kind string) schema.GroupKind { - return SchemeGroupVersion.WithKind(kind).GroupKind() -} - -// Adds the list of known types to Scheme. -func addKnownTypes(scheme *runtime.Scheme) error { - scheme.AddKnownTypes(SchemeGroupVersion, - &CamelSource{}, - &CamelSourceList{}, - ) - metav1.AddToGroupVersion(scheme, SchemeGroupVersion) - return nil -} diff --git a/camel/source/pkg/apis/sources/v1alpha1/register_test.go b/camel/source/pkg/apis/sources/v1alpha1/register_test.go deleted file mode 100644 index bfc3c771d8..0000000000 --- a/camel/source/pkg/apis/sources/v1alpha1/register_test.go +++ /dev/null @@ -1,37 +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. -*/ -package v1alpha1 - -import ( - "testing" - - "github.com/google/go-cmp/cmp" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -// Resource takes an unqualified resource and returns a Group qualified GroupResource -func TestResource(t *testing.T) { - want := schema.GroupResource{ - Group: "sources.knative.dev", - Resource: "foo", - } - - got := Resource("foo") - - if diff := cmp.Diff(want, got); diff != "" { - t.Errorf("unexpected resource (-want, +got) = %v", diff) - } -} diff --git a/camel/source/pkg/apis/sources/v1alpha1/zz_generated.deepcopy.go b/camel/source/pkg/apis/sources/v1alpha1/zz_generated.deepcopy.go deleted file mode 100644 index b60adb866a..0000000000 --- a/camel/source/pkg/apis/sources/v1alpha1/zz_generated.deepcopy.go +++ /dev/null @@ -1,168 +0,0 @@ -// +build !ignore_autogenerated - -/* -Copyright 2020 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 deepcopy-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - v1 "github.com/apache/camel-k/pkg/apis/camel/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - duckv1 "knative.dev/pkg/apis/duck/v1" - v1beta1 "knative.dev/pkg/apis/duck/v1beta1" -) - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CamelSource) DeepCopyInto(out *CamelSource) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CamelSource. -func (in *CamelSource) DeepCopy() *CamelSource { - if in == nil { - return nil - } - out := new(CamelSource) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *CamelSource) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CamelSourceList) DeepCopyInto(out *CamelSourceList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]CamelSource, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CamelSourceList. -func (in *CamelSourceList) DeepCopy() *CamelSourceList { - if in == nil { - return nil - } - out := new(CamelSourceList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *CamelSourceList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CamelSourceOriginSpec) DeepCopyInto(out *CamelSourceOriginSpec) { - *out = *in - if in.Integration != nil { - in, out := &in.Integration, &out.Integration - *out = new(v1.IntegrationSpec) - (*in).DeepCopyInto(*out) - } - if in.Flow != nil { - in, out := &in.Flow, &out.Flow - *out = (*in).DeepCopy() - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CamelSourceOriginSpec. -func (in *CamelSourceOriginSpec) DeepCopy() *CamelSourceOriginSpec { - if in == nil { - return nil - } - out := new(CamelSourceOriginSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CamelSourceSpec) DeepCopyInto(out *CamelSourceSpec) { - *out = *in - in.Source.DeepCopyInto(&out.Source) - if in.Sink != nil { - in, out := &in.Sink, &out.Sink - *out = new(v1beta1.Destination) - (*in).DeepCopyInto(*out) - } - if in.CloudEventOverrides != nil { - in, out := &in.CloudEventOverrides, &out.CloudEventOverrides - *out = new(duckv1.CloudEventOverrides) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CamelSourceSpec. -func (in *CamelSourceSpec) DeepCopy() *CamelSourceSpec { - if in == nil { - return nil - } - out := new(CamelSourceSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CamelSourceStatus) DeepCopyInto(out *CamelSourceStatus) { - *out = *in - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CamelSourceStatus. -func (in *CamelSourceStatus) DeepCopy() *CamelSourceStatus { - if in == nil { - return nil - } - out := new(CamelSourceStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in Flow) DeepCopyInto(out *Flow) { - { - in := &in - clone := in.DeepCopy() - *out = *clone - return - } -} diff --git a/camel/source/pkg/camel-k/injection/client/client.go b/camel/source/pkg/camel-k/injection/client/client.go deleted file mode 100644 index 123597c210..0000000000 --- a/camel/source/pkg/camel-k/injection/client/client.go +++ /dev/null @@ -1,49 +0,0 @@ -/* -Copyright 2020 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 "context" - - versioned "github.com/apache/camel-k/pkg/client/camel/clientset/versioned" - rest "k8s.io/client-go/rest" - 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 github.com/apache/camel-k/pkg/client/camel/clientset/versioned.Interface from context.") - } - return untyped.(versioned.Interface) -} diff --git a/camel/source/pkg/camel-k/injection/client/fake/fake.go b/camel/source/pkg/camel-k/injection/client/fake/fake.go deleted file mode 100644 index f5419dbf48..0000000000 --- a/camel/source/pkg/camel-k/injection/client/fake/fake.go +++ /dev/null @@ -1,54 +0,0 @@ -/* -Copyright 2020 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 "context" - - fake "github.com/apache/camel-k/pkg/client/camel/clientset/versioned/fake" - runtime "k8s.io/apimachinery/pkg/runtime" - rest "k8s.io/client-go/rest" - client "knative.dev/eventing-contrib/camel/source/pkg/camel-k/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 github.com/apache/camel-k/pkg/client/camel/clientset/versioned/fake.Clientset from context.") - } - return untyped.(*fake.Clientset) -} diff --git a/camel/source/pkg/camel-k/injection/informers/camel/v1/build/build.go b/camel/source/pkg/camel-k/injection/informers/camel/v1/build/build.go deleted file mode 100644 index 07c056feb2..0000000000 --- a/camel/source/pkg/camel-k/injection/informers/camel/v1/build/build.go +++ /dev/null @@ -1,52 +0,0 @@ -/* -Copyright 2020 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 build - -import ( - context "context" - - v1 "github.com/apache/camel-k/pkg/client/camel/informers/externalversions/camel/v1" - factory "knative.dev/eventing-contrib/camel/source/pkg/camel-k/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.Camel().V1().Builds() - return context.WithValue(ctx, Key{}, inf), inf.Informer() -} - -// Get extracts the typed informer from the context. -func Get(ctx context.Context) v1.BuildInformer { - untyped := ctx.Value(Key{}) - if untyped == nil { - logging.FromContext(ctx).Panic( - "Unable to fetch github.com/apache/camel-k/pkg/client/camel/informers/externalversions/camel/v1.BuildInformer from context.") - } - return untyped.(v1.BuildInformer) -} diff --git a/camel/source/pkg/camel-k/injection/informers/camel/v1/build/fake/fake.go b/camel/source/pkg/camel-k/injection/informers/camel/v1/build/fake/fake.go deleted file mode 100644 index 20bd758776..0000000000 --- a/camel/source/pkg/camel-k/injection/informers/camel/v1/build/fake/fake.go +++ /dev/null @@ -1,40 +0,0 @@ -/* -Copyright 2020 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 "context" - - build "knative.dev/eventing-contrib/camel/source/pkg/camel-k/injection/informers/camel/v1/build" - fake "knative.dev/eventing-contrib/camel/source/pkg/camel-k/injection/informers/factory/fake" - controller "knative.dev/pkg/controller" - injection "knative.dev/pkg/injection" -) - -var Get = build.Get - -func init() { - injection.Fake.RegisterInformer(withInformer) -} - -func withInformer(ctx context.Context) (context.Context, controller.Informer) { - f := fake.Get(ctx) - inf := f.Camel().V1().Builds() - return context.WithValue(ctx, build.Key{}, inf), inf.Informer() -} diff --git a/camel/source/pkg/camel-k/injection/informers/camel/v1/camelcatalog/camelcatalog.go b/camel/source/pkg/camel-k/injection/informers/camel/v1/camelcatalog/camelcatalog.go deleted file mode 100644 index 8a0e226f72..0000000000 --- a/camel/source/pkg/camel-k/injection/informers/camel/v1/camelcatalog/camelcatalog.go +++ /dev/null @@ -1,52 +0,0 @@ -/* -Copyright 2020 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 camelcatalog - -import ( - context "context" - - v1 "github.com/apache/camel-k/pkg/client/camel/informers/externalversions/camel/v1" - factory "knative.dev/eventing-contrib/camel/source/pkg/camel-k/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.Camel().V1().CamelCatalogs() - return context.WithValue(ctx, Key{}, inf), inf.Informer() -} - -// Get extracts the typed informer from the context. -func Get(ctx context.Context) v1.CamelCatalogInformer { - untyped := ctx.Value(Key{}) - if untyped == nil { - logging.FromContext(ctx).Panic( - "Unable to fetch github.com/apache/camel-k/pkg/client/camel/informers/externalversions/camel/v1.CamelCatalogInformer from context.") - } - return untyped.(v1.CamelCatalogInformer) -} diff --git a/camel/source/pkg/camel-k/injection/informers/camel/v1/camelcatalog/fake/fake.go b/camel/source/pkg/camel-k/injection/informers/camel/v1/camelcatalog/fake/fake.go deleted file mode 100644 index 4f58cb138e..0000000000 --- a/camel/source/pkg/camel-k/injection/informers/camel/v1/camelcatalog/fake/fake.go +++ /dev/null @@ -1,40 +0,0 @@ -/* -Copyright 2020 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 "context" - - camelcatalog "knative.dev/eventing-contrib/camel/source/pkg/camel-k/injection/informers/camel/v1/camelcatalog" - fake "knative.dev/eventing-contrib/camel/source/pkg/camel-k/injection/informers/factory/fake" - controller "knative.dev/pkg/controller" - injection "knative.dev/pkg/injection" -) - -var Get = camelcatalog.Get - -func init() { - injection.Fake.RegisterInformer(withInformer) -} - -func withInformer(ctx context.Context) (context.Context, controller.Informer) { - f := fake.Get(ctx) - inf := f.Camel().V1().CamelCatalogs() - return context.WithValue(ctx, camelcatalog.Key{}, inf), inf.Informer() -} diff --git a/camel/source/pkg/camel-k/injection/informers/camel/v1/integration/fake/fake.go b/camel/source/pkg/camel-k/injection/informers/camel/v1/integration/fake/fake.go deleted file mode 100644 index 1534c31422..0000000000 --- a/camel/source/pkg/camel-k/injection/informers/camel/v1/integration/fake/fake.go +++ /dev/null @@ -1,40 +0,0 @@ -/* -Copyright 2020 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 "context" - - integration "knative.dev/eventing-contrib/camel/source/pkg/camel-k/injection/informers/camel/v1/integration" - fake "knative.dev/eventing-contrib/camel/source/pkg/camel-k/injection/informers/factory/fake" - controller "knative.dev/pkg/controller" - injection "knative.dev/pkg/injection" -) - -var Get = integration.Get - -func init() { - injection.Fake.RegisterInformer(withInformer) -} - -func withInformer(ctx context.Context) (context.Context, controller.Informer) { - f := fake.Get(ctx) - inf := f.Camel().V1().Integrations() - return context.WithValue(ctx, integration.Key{}, inf), inf.Informer() -} diff --git a/camel/source/pkg/camel-k/injection/informers/camel/v1/integration/integration.go b/camel/source/pkg/camel-k/injection/informers/camel/v1/integration/integration.go deleted file mode 100644 index 97790149b8..0000000000 --- a/camel/source/pkg/camel-k/injection/informers/camel/v1/integration/integration.go +++ /dev/null @@ -1,52 +0,0 @@ -/* -Copyright 2020 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 integration - -import ( - context "context" - - v1 "github.com/apache/camel-k/pkg/client/camel/informers/externalversions/camel/v1" - factory "knative.dev/eventing-contrib/camel/source/pkg/camel-k/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.Camel().V1().Integrations() - return context.WithValue(ctx, Key{}, inf), inf.Informer() -} - -// Get extracts the typed informer from the context. -func Get(ctx context.Context) v1.IntegrationInformer { - untyped := ctx.Value(Key{}) - if untyped == nil { - logging.FromContext(ctx).Panic( - "Unable to fetch github.com/apache/camel-k/pkg/client/camel/informers/externalversions/camel/v1.IntegrationInformer from context.") - } - return untyped.(v1.IntegrationInformer) -} diff --git a/camel/source/pkg/camel-k/injection/informers/camel/v1/integrationkit/fake/fake.go b/camel/source/pkg/camel-k/injection/informers/camel/v1/integrationkit/fake/fake.go deleted file mode 100644 index 40e7b8fb76..0000000000 --- a/camel/source/pkg/camel-k/injection/informers/camel/v1/integrationkit/fake/fake.go +++ /dev/null @@ -1,40 +0,0 @@ -/* -Copyright 2020 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 "context" - - integrationkit "knative.dev/eventing-contrib/camel/source/pkg/camel-k/injection/informers/camel/v1/integrationkit" - fake "knative.dev/eventing-contrib/camel/source/pkg/camel-k/injection/informers/factory/fake" - controller "knative.dev/pkg/controller" - injection "knative.dev/pkg/injection" -) - -var Get = integrationkit.Get - -func init() { - injection.Fake.RegisterInformer(withInformer) -} - -func withInformer(ctx context.Context) (context.Context, controller.Informer) { - f := fake.Get(ctx) - inf := f.Camel().V1().IntegrationKits() - return context.WithValue(ctx, integrationkit.Key{}, inf), inf.Informer() -} diff --git a/camel/source/pkg/camel-k/injection/informers/camel/v1/integrationkit/integrationkit.go b/camel/source/pkg/camel-k/injection/informers/camel/v1/integrationkit/integrationkit.go deleted file mode 100644 index 1fab557d06..0000000000 --- a/camel/source/pkg/camel-k/injection/informers/camel/v1/integrationkit/integrationkit.go +++ /dev/null @@ -1,52 +0,0 @@ -/* -Copyright 2020 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 integrationkit - -import ( - context "context" - - v1 "github.com/apache/camel-k/pkg/client/camel/informers/externalversions/camel/v1" - factory "knative.dev/eventing-contrib/camel/source/pkg/camel-k/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.Camel().V1().IntegrationKits() - return context.WithValue(ctx, Key{}, inf), inf.Informer() -} - -// Get extracts the typed informer from the context. -func Get(ctx context.Context) v1.IntegrationKitInformer { - untyped := ctx.Value(Key{}) - if untyped == nil { - logging.FromContext(ctx).Panic( - "Unable to fetch github.com/apache/camel-k/pkg/client/camel/informers/externalversions/camel/v1.IntegrationKitInformer from context.") - } - return untyped.(v1.IntegrationKitInformer) -} diff --git a/camel/source/pkg/camel-k/injection/informers/camel/v1/integrationplatform/fake/fake.go b/camel/source/pkg/camel-k/injection/informers/camel/v1/integrationplatform/fake/fake.go deleted file mode 100644 index d0bea1394a..0000000000 --- a/camel/source/pkg/camel-k/injection/informers/camel/v1/integrationplatform/fake/fake.go +++ /dev/null @@ -1,40 +0,0 @@ -/* -Copyright 2020 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 "context" - - integrationplatform "knative.dev/eventing-contrib/camel/source/pkg/camel-k/injection/informers/camel/v1/integrationplatform" - fake "knative.dev/eventing-contrib/camel/source/pkg/camel-k/injection/informers/factory/fake" - controller "knative.dev/pkg/controller" - injection "knative.dev/pkg/injection" -) - -var Get = integrationplatform.Get - -func init() { - injection.Fake.RegisterInformer(withInformer) -} - -func withInformer(ctx context.Context) (context.Context, controller.Informer) { - f := fake.Get(ctx) - inf := f.Camel().V1().IntegrationPlatforms() - return context.WithValue(ctx, integrationplatform.Key{}, inf), inf.Informer() -} diff --git a/camel/source/pkg/camel-k/injection/informers/camel/v1/integrationplatform/integrationplatform.go b/camel/source/pkg/camel-k/injection/informers/camel/v1/integrationplatform/integrationplatform.go deleted file mode 100644 index 192fb322e3..0000000000 --- a/camel/source/pkg/camel-k/injection/informers/camel/v1/integrationplatform/integrationplatform.go +++ /dev/null @@ -1,52 +0,0 @@ -/* -Copyright 2020 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 integrationplatform - -import ( - context "context" - - v1 "github.com/apache/camel-k/pkg/client/camel/informers/externalversions/camel/v1" - factory "knative.dev/eventing-contrib/camel/source/pkg/camel-k/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.Camel().V1().IntegrationPlatforms() - return context.WithValue(ctx, Key{}, inf), inf.Informer() -} - -// Get extracts the typed informer from the context. -func Get(ctx context.Context) v1.IntegrationPlatformInformer { - untyped := ctx.Value(Key{}) - if untyped == nil { - logging.FromContext(ctx).Panic( - "Unable to fetch github.com/apache/camel-k/pkg/client/camel/informers/externalversions/camel/v1.IntegrationPlatformInformer from context.") - } - return untyped.(v1.IntegrationPlatformInformer) -} diff --git a/camel/source/pkg/camel-k/injection/informers/factory/factory.go b/camel/source/pkg/camel-k/injection/informers/factory/factory.go deleted file mode 100644 index d7db9a97be..0000000000 --- a/camel/source/pkg/camel-k/injection/informers/factory/factory.go +++ /dev/null @@ -1,56 +0,0 @@ -/* -Copyright 2020 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 "context" - - externalversions "github.com/apache/camel-k/pkg/client/camel/informers/externalversions" - client "knative.dev/eventing-contrib/camel/source/pkg/camel-k/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 github.com/apache/camel-k/pkg/client/camel/informers/externalversions.SharedInformerFactory from context.") - } - return untyped.(externalversions.SharedInformerFactory) -} diff --git a/camel/source/pkg/camel-k/injection/informers/factory/fake/fake.go b/camel/source/pkg/camel-k/injection/informers/factory/fake/fake.go deleted file mode 100644 index bafa10c758..0000000000 --- a/camel/source/pkg/camel-k/injection/informers/factory/fake/fake.go +++ /dev/null @@ -1,45 +0,0 @@ -/* -Copyright 2020 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 "context" - - externalversions "github.com/apache/camel-k/pkg/client/camel/informers/externalversions" - fake "knative.dev/eventing-contrib/camel/source/pkg/camel-k/injection/client/fake" - factory "knative.dev/eventing-contrib/camel/source/pkg/camel-k/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...)) -} diff --git a/camel/source/pkg/client/clientset/versioned/clientset.go b/camel/source/pkg/client/clientset/versioned/clientset.go deleted file mode 100644 index 164b5545cb..0000000000 --- a/camel/source/pkg/client/clientset/versioned/clientset.go +++ /dev/null @@ -1,97 +0,0 @@ -/* -Copyright 2020 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 ( - "fmt" - - discovery "k8s.io/client-go/discovery" - rest "k8s.io/client-go/rest" - flowcontrol "k8s.io/client-go/util/flowcontrol" - sourcesv1alpha1 "knative.dev/eventing-contrib/camel/source/pkg/client/clientset/versioned/typed/sources/v1alpha1" -) - -type Interface interface { - Discovery() discovery.DiscoveryInterface - SourcesV1alpha1() sourcesv1alpha1.SourcesV1alpha1Interface -} - -// Clientset contains the clients for groups. Each group has exactly one -// version included in a Clientset. -type Clientset struct { - *discovery.DiscoveryClient - sourcesV1alpha1 *sourcesv1alpha1.SourcesV1alpha1Client -} - -// SourcesV1alpha1 retrieves the SourcesV1alpha1Client -func (c *Clientset) SourcesV1alpha1() sourcesv1alpha1.SourcesV1alpha1Interface { - return c.sourcesV1alpha1 -} - -// 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. -// If config's RateLimiter is not set and QPS and Burst are acceptable, -// NewForConfig will generate a rate-limiter in configShallowCopy. -func NewForConfig(c *rest.Config) (*Clientset, error) { - configShallowCopy := *c - if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 { - if configShallowCopy.Burst <= 0 { - return nil, fmt.Errorf("Burst is required to be greater than 0 when RateLimiter is not set and QPS is set to greater than 0") - } - configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst) - } - var cs Clientset - var err error - cs.sourcesV1alpha1, err = sourcesv1alpha1.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.sourcesV1alpha1 = sourcesv1alpha1.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.sourcesV1alpha1 = sourcesv1alpha1.New(c) - - cs.DiscoveryClient = discovery.NewDiscoveryClient(c) - return &cs -} diff --git a/camel/source/pkg/client/clientset/versioned/doc.go b/camel/source/pkg/client/clientset/versioned/doc.go deleted file mode 100644 index e48c2aa446..0000000000 --- a/camel/source/pkg/client/clientset/versioned/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright 2020 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 diff --git a/camel/source/pkg/client/clientset/versioned/fake/clientset_generated.go b/camel/source/pkg/client/clientset/versioned/fake/clientset_generated.go deleted file mode 100644 index 5963f23983..0000000000 --- a/camel/source/pkg/client/clientset/versioned/fake/clientset_generated.go +++ /dev/null @@ -1,82 +0,0 @@ -/* -Copyright 2020 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/eventing-contrib/camel/source/pkg/client/clientset/versioned" - sourcesv1alpha1 "knative.dev/eventing-contrib/camel/source/pkg/client/clientset/versioned/typed/sources/v1alpha1" - fakesourcesv1alpha1 "knative.dev/eventing-contrib/camel/source/pkg/client/clientset/versioned/typed/sources/v1alpha1/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{} - -// SourcesV1alpha1 retrieves the SourcesV1alpha1Client -func (c *Clientset) SourcesV1alpha1() sourcesv1alpha1.SourcesV1alpha1Interface { - return &fakesourcesv1alpha1.FakeSourcesV1alpha1{Fake: &c.Fake} -} diff --git a/camel/source/pkg/client/clientset/versioned/fake/doc.go b/camel/source/pkg/client/clientset/versioned/fake/doc.go deleted file mode 100644 index 2c4903250c..0000000000 --- a/camel/source/pkg/client/clientset/versioned/fake/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright 2020 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 diff --git a/camel/source/pkg/client/clientset/versioned/fake/register.go b/camel/source/pkg/client/clientset/versioned/fake/register.go deleted file mode 100644 index 62f716986c..0000000000 --- a/camel/source/pkg/client/clientset/versioned/fake/register.go +++ /dev/null @@ -1,56 +0,0 @@ -/* -Copyright 2020 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 ( - 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" - sourcesv1alpha1 "knative.dev/eventing-contrib/camel/source/pkg/apis/sources/v1alpha1" -) - -var scheme = runtime.NewScheme() -var codecs = serializer.NewCodecFactory(scheme) -var parameterCodec = runtime.NewParameterCodec(scheme) -var localSchemeBuilder = runtime.SchemeBuilder{ - sourcesv1alpha1.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)) -} diff --git a/camel/source/pkg/client/clientset/versioned/scheme/doc.go b/camel/source/pkg/client/clientset/versioned/scheme/doc.go deleted file mode 100644 index 7acc2dcf25..0000000000 --- a/camel/source/pkg/client/clientset/versioned/scheme/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright 2020 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 diff --git a/camel/source/pkg/client/clientset/versioned/scheme/register.go b/camel/source/pkg/client/clientset/versioned/scheme/register.go deleted file mode 100644 index 528cfd1c24..0000000000 --- a/camel/source/pkg/client/clientset/versioned/scheme/register.go +++ /dev/null @@ -1,56 +0,0 @@ -/* -Copyright 2020 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 ( - 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" - sourcesv1alpha1 "knative.dev/eventing-contrib/camel/source/pkg/apis/sources/v1alpha1" -) - -var Scheme = runtime.NewScheme() -var Codecs = serializer.NewCodecFactory(Scheme) -var ParameterCodec = runtime.NewParameterCodec(Scheme) -var localSchemeBuilder = runtime.SchemeBuilder{ - sourcesv1alpha1.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)) -} diff --git a/camel/source/pkg/client/clientset/versioned/typed/sources/v1alpha1/camelsource.go b/camel/source/pkg/client/clientset/versioned/typed/sources/v1alpha1/camelsource.go deleted file mode 100644 index 8f881c1b48..0000000000 --- a/camel/source/pkg/client/clientset/versioned/typed/sources/v1alpha1/camelsource.go +++ /dev/null @@ -1,191 +0,0 @@ -/* -Copyright 2020 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 v1alpha1 - -import ( - "time" - - 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" - v1alpha1 "knative.dev/eventing-contrib/camel/source/pkg/apis/sources/v1alpha1" - scheme "knative.dev/eventing-contrib/camel/source/pkg/client/clientset/versioned/scheme" -) - -// CamelSourcesGetter has a method to return a CamelSourceInterface. -// A group's client should implement this interface. -type CamelSourcesGetter interface { - CamelSources(namespace string) CamelSourceInterface -} - -// CamelSourceInterface has methods to work with CamelSource resources. -type CamelSourceInterface interface { - Create(*v1alpha1.CamelSource) (*v1alpha1.CamelSource, error) - Update(*v1alpha1.CamelSource) (*v1alpha1.CamelSource, error) - UpdateStatus(*v1alpha1.CamelSource) (*v1alpha1.CamelSource, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*v1alpha1.CamelSource, error) - List(opts v1.ListOptions) (*v1alpha1.CamelSourceList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.CamelSource, err error) - CamelSourceExpansion -} - -// camelSources implements CamelSourceInterface -type camelSources struct { - client rest.Interface - ns string -} - -// newCamelSources returns a CamelSources -func newCamelSources(c *SourcesV1alpha1Client, namespace string) *camelSources { - return &camelSources{ - client: c.RESTClient(), - ns: namespace, - } -} - -// Get takes name of the camelSource, and returns the corresponding camelSource object, and an error if there is any. -func (c *camelSources) Get(name string, options v1.GetOptions) (result *v1alpha1.CamelSource, err error) { - result = &v1alpha1.CamelSource{} - err = c.client.Get(). - Namespace(c.ns). - Resource("camelsources"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of CamelSources that match those selectors. -func (c *camelSources) List(opts v1.ListOptions) (result *v1alpha1.CamelSourceList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v1alpha1.CamelSourceList{} - err = c.client.Get(). - Namespace(c.ns). - Resource("camelsources"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested camelSources. -func (c *camelSources) 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("camelsources"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch() -} - -// Create takes the representation of a camelSource and creates it. Returns the server's representation of the camelSource, and an error, if there is any. -func (c *camelSources) Create(camelSource *v1alpha1.CamelSource) (result *v1alpha1.CamelSource, err error) { - result = &v1alpha1.CamelSource{} - err = c.client.Post(). - Namespace(c.ns). - Resource("camelsources"). - Body(camelSource). - Do(). - Into(result) - return -} - -// Update takes the representation of a camelSource and updates it. Returns the server's representation of the camelSource, and an error, if there is any. -func (c *camelSources) Update(camelSource *v1alpha1.CamelSource) (result *v1alpha1.CamelSource, err error) { - result = &v1alpha1.CamelSource{} - err = c.client.Put(). - Namespace(c.ns). - Resource("camelsources"). - Name(camelSource.Name). - Body(camelSource). - Do(). - Into(result) - return -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *camelSources) UpdateStatus(camelSource *v1alpha1.CamelSource) (result *v1alpha1.CamelSource, err error) { - result = &v1alpha1.CamelSource{} - err = c.client.Put(). - Namespace(c.ns). - Resource("camelsources"). - Name(camelSource.Name). - SubResource("status"). - Body(camelSource). - Do(). - Into(result) - return -} - -// Delete takes name of the camelSource and deletes it. Returns an error if one occurs. -func (c *camelSources) Delete(name string, options *v1.DeleteOptions) error { - return c.client.Delete(). - Namespace(c.ns). - Resource("camelsources"). - Name(name). - Body(options). - Do(). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *camelSources) 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("camelsources"). - VersionedParams(&listOptions, scheme.ParameterCodec). - Timeout(timeout). - Body(options). - Do(). - Error() -} - -// Patch applies the patch and returns the patched camelSource. -func (c *camelSources) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.CamelSource, err error) { - result = &v1alpha1.CamelSource{} - err = c.client.Patch(pt). - Namespace(c.ns). - Resource("camelsources"). - SubResource(subresources...). - Name(name). - Body(data). - Do(). - Into(result) - return -} diff --git a/camel/source/pkg/client/clientset/versioned/typed/sources/v1alpha1/doc.go b/camel/source/pkg/client/clientset/versioned/typed/sources/v1alpha1/doc.go deleted file mode 100644 index 41e872fe9a..0000000000 --- a/camel/source/pkg/client/clientset/versioned/typed/sources/v1alpha1/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright 2020 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 v1alpha1 diff --git a/camel/source/pkg/client/clientset/versioned/typed/sources/v1alpha1/fake/doc.go b/camel/source/pkg/client/clientset/versioned/typed/sources/v1alpha1/fake/doc.go deleted file mode 100644 index c7f6e65cab..0000000000 --- a/camel/source/pkg/client/clientset/versioned/typed/sources/v1alpha1/fake/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright 2020 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 diff --git a/camel/source/pkg/client/clientset/versioned/typed/sources/v1alpha1/fake/fake_camelsource.go b/camel/source/pkg/client/clientset/versioned/typed/sources/v1alpha1/fake/fake_camelsource.go deleted file mode 100644 index 551272bc22..0000000000 --- a/camel/source/pkg/client/clientset/versioned/typed/sources/v1alpha1/fake/fake_camelsource.go +++ /dev/null @@ -1,140 +0,0 @@ -/* -Copyright 2020 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 ( - 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" - v1alpha1 "knative.dev/eventing-contrib/camel/source/pkg/apis/sources/v1alpha1" -) - -// FakeCamelSources implements CamelSourceInterface -type FakeCamelSources struct { - Fake *FakeSourcesV1alpha1 - ns string -} - -var camelsourcesResource = schema.GroupVersionResource{Group: "sources.knative.dev", Version: "v1alpha1", Resource: "camelsources"} - -var camelsourcesKind = schema.GroupVersionKind{Group: "sources.knative.dev", Version: "v1alpha1", Kind: "CamelSource"} - -// Get takes name of the camelSource, and returns the corresponding camelSource object, and an error if there is any. -func (c *FakeCamelSources) Get(name string, options v1.GetOptions) (result *v1alpha1.CamelSource, err error) { - obj, err := c.Fake. - Invokes(testing.NewGetAction(camelsourcesResource, c.ns, name), &v1alpha1.CamelSource{}) - - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.CamelSource), err -} - -// List takes label and field selectors, and returns the list of CamelSources that match those selectors. -func (c *FakeCamelSources) List(opts v1.ListOptions) (result *v1alpha1.CamelSourceList, err error) { - obj, err := c.Fake. - Invokes(testing.NewListAction(camelsourcesResource, camelsourcesKind, c.ns, opts), &v1alpha1.CamelSourceList{}) - - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1alpha1.CamelSourceList{ListMeta: obj.(*v1alpha1.CamelSourceList).ListMeta} - for _, item := range obj.(*v1alpha1.CamelSourceList).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 camelSources. -func (c *FakeCamelSources) Watch(opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewWatchAction(camelsourcesResource, c.ns, opts)) - -} - -// Create takes the representation of a camelSource and creates it. Returns the server's representation of the camelSource, and an error, if there is any. -func (c *FakeCamelSources) Create(camelSource *v1alpha1.CamelSource) (result *v1alpha1.CamelSource, err error) { - obj, err := c.Fake. - Invokes(testing.NewCreateAction(camelsourcesResource, c.ns, camelSource), &v1alpha1.CamelSource{}) - - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.CamelSource), err -} - -// Update takes the representation of a camelSource and updates it. Returns the server's representation of the camelSource, and an error, if there is any. -func (c *FakeCamelSources) Update(camelSource *v1alpha1.CamelSource) (result *v1alpha1.CamelSource, err error) { - obj, err := c.Fake. - Invokes(testing.NewUpdateAction(camelsourcesResource, c.ns, camelSource), &v1alpha1.CamelSource{}) - - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.CamelSource), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeCamelSources) UpdateStatus(camelSource *v1alpha1.CamelSource) (*v1alpha1.CamelSource, error) { - obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceAction(camelsourcesResource, "status", c.ns, camelSource), &v1alpha1.CamelSource{}) - - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.CamelSource), err -} - -// Delete takes name of the camelSource and deletes it. Returns an error if one occurs. -func (c *FakeCamelSources) Delete(name string, options *v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewDeleteAction(camelsourcesResource, c.ns, name), &v1alpha1.CamelSource{}) - - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeCamelSources) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(camelsourcesResource, c.ns, listOptions) - - _, err := c.Fake.Invokes(action, &v1alpha1.CamelSourceList{}) - return err -} - -// Patch applies the patch and returns the patched camelSource. -func (c *FakeCamelSources) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.CamelSource, err error) { - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(camelsourcesResource, c.ns, name, pt, data, subresources...), &v1alpha1.CamelSource{}) - - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.CamelSource), err -} diff --git a/camel/source/pkg/client/clientset/versioned/typed/sources/v1alpha1/fake/fake_sources_client.go b/camel/source/pkg/client/clientset/versioned/typed/sources/v1alpha1/fake/fake_sources_client.go deleted file mode 100644 index 80fb0c0845..0000000000 --- a/camel/source/pkg/client/clientset/versioned/typed/sources/v1alpha1/fake/fake_sources_client.go +++ /dev/null @@ -1,40 +0,0 @@ -/* -Copyright 2020 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" - v1alpha1 "knative.dev/eventing-contrib/camel/source/pkg/client/clientset/versioned/typed/sources/v1alpha1" -) - -type FakeSourcesV1alpha1 struct { - *testing.Fake -} - -func (c *FakeSourcesV1alpha1) CamelSources(namespace string) v1alpha1.CamelSourceInterface { - return &FakeCamelSources{c, namespace} -} - -// RESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *FakeSourcesV1alpha1) RESTClient() rest.Interface { - var ret *rest.RESTClient - return ret -} diff --git a/camel/source/pkg/client/clientset/versioned/typed/sources/v1alpha1/generated_expansion.go b/camel/source/pkg/client/clientset/versioned/typed/sources/v1alpha1/generated_expansion.go deleted file mode 100644 index 2880db7871..0000000000 --- a/camel/source/pkg/client/clientset/versioned/typed/sources/v1alpha1/generated_expansion.go +++ /dev/null @@ -1,21 +0,0 @@ -/* -Copyright 2020 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 v1alpha1 - -type CamelSourceExpansion interface{} diff --git a/camel/source/pkg/client/clientset/versioned/typed/sources/v1alpha1/sources_client.go b/camel/source/pkg/client/clientset/versioned/typed/sources/v1alpha1/sources_client.go deleted file mode 100644 index 36f8ca569b..0000000000 --- a/camel/source/pkg/client/clientset/versioned/typed/sources/v1alpha1/sources_client.go +++ /dev/null @@ -1,89 +0,0 @@ -/* -Copyright 2020 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 v1alpha1 - -import ( - rest "k8s.io/client-go/rest" - v1alpha1 "knative.dev/eventing-contrib/camel/source/pkg/apis/sources/v1alpha1" - "knative.dev/eventing-contrib/camel/source/pkg/client/clientset/versioned/scheme" -) - -type SourcesV1alpha1Interface interface { - RESTClient() rest.Interface - CamelSourcesGetter -} - -// SourcesV1alpha1Client is used to interact with features provided by the sources.knative.dev group. -type SourcesV1alpha1Client struct { - restClient rest.Interface -} - -func (c *SourcesV1alpha1Client) CamelSources(namespace string) CamelSourceInterface { - return newCamelSources(c, namespace) -} - -// NewForConfig creates a new SourcesV1alpha1Client for the given config. -func NewForConfig(c *rest.Config) (*SourcesV1alpha1Client, error) { - config := *c - if err := setConfigDefaults(&config); err != nil { - return nil, err - } - client, err := rest.RESTClientFor(&config) - if err != nil { - return nil, err - } - return &SourcesV1alpha1Client{client}, nil -} - -// NewForConfigOrDie creates a new SourcesV1alpha1Client for the given config and -// panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *SourcesV1alpha1Client { - client, err := NewForConfig(c) - if err != nil { - panic(err) - } - return client -} - -// New creates a new SourcesV1alpha1Client for the given RESTClient. -func New(c rest.Interface) *SourcesV1alpha1Client { - return &SourcesV1alpha1Client{c} -} - -func setConfigDefaults(config *rest.Config) error { - gv := v1alpha1.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 *SourcesV1alpha1Client) RESTClient() rest.Interface { - if c == nil { - return nil - } - return c.restClient -} diff --git a/camel/source/pkg/client/informers/externalversions/factory.go b/camel/source/pkg/client/informers/externalversions/factory.go deleted file mode 100644 index ffcc5780f9..0000000000 --- a/camel/source/pkg/client/informers/externalversions/factory.go +++ /dev/null @@ -1,180 +0,0 @@ -/* -Copyright 2020 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/eventing-contrib/camel/source/pkg/client/clientset/versioned" - internalinterfaces "knative.dev/eventing-contrib/camel/source/pkg/client/informers/externalversions/internalinterfaces" - sources "knative.dev/eventing-contrib/camel/source/pkg/client/informers/externalversions/sources" -) - -// 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 - - Sources() sources.Interface -} - -func (f *sharedInformerFactory) Sources() sources.Interface { - return sources.New(f, f.namespace, f.tweakListOptions) -} diff --git a/camel/source/pkg/client/informers/externalversions/generic.go b/camel/source/pkg/client/informers/externalversions/generic.go deleted file mode 100644 index 12b38afe36..0000000000 --- a/camel/source/pkg/client/informers/externalversions/generic.go +++ /dev/null @@ -1,62 +0,0 @@ -/* -Copyright 2020 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" - - schema "k8s.io/apimachinery/pkg/runtime/schema" - cache "k8s.io/client-go/tools/cache" - v1alpha1 "knative.dev/eventing-contrib/camel/source/pkg/apis/sources/v1alpha1" -) - -// 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=sources.knative.dev, Version=v1alpha1 - case v1alpha1.SchemeGroupVersion.WithResource("camelsources"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Sources().V1alpha1().CamelSources().Informer()}, nil - - } - - return nil, fmt.Errorf("no informer found for %v", resource) -} diff --git a/camel/source/pkg/client/informers/externalversions/internalinterfaces/factory_interfaces.go b/camel/source/pkg/client/informers/externalversions/internalinterfaces/factory_interfaces.go deleted file mode 100644 index 957182a3c1..0000000000 --- a/camel/source/pkg/client/informers/externalversions/internalinterfaces/factory_interfaces.go +++ /dev/null @@ -1,40 +0,0 @@ -/* -Copyright 2020 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/eventing-contrib/camel/source/pkg/client/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) diff --git a/camel/source/pkg/client/informers/externalversions/sources/interface.go b/camel/source/pkg/client/informers/externalversions/sources/interface.go deleted file mode 100644 index 3d2bbe8249..0000000000 --- a/camel/source/pkg/client/informers/externalversions/sources/interface.go +++ /dev/null @@ -1,46 +0,0 @@ -/* -Copyright 2020 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 sources - -import ( - internalinterfaces "knative.dev/eventing-contrib/camel/source/pkg/client/informers/externalversions/internalinterfaces" - v1alpha1 "knative.dev/eventing-contrib/camel/source/pkg/client/informers/externalversions/sources/v1alpha1" -) - -// Interface provides access to each of this group's versions. -type Interface interface { - // V1alpha1 provides access to shared informers for resources in V1alpha1. - V1alpha1() v1alpha1.Interface -} - -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} -} - -// V1alpha1 returns a new v1alpha1.Interface. -func (g *group) V1alpha1() v1alpha1.Interface { - return v1alpha1.New(g.factory, g.namespace, g.tweakListOptions) -} diff --git a/camel/source/pkg/client/informers/externalversions/sources/v1alpha1/camelsource.go b/camel/source/pkg/client/informers/externalversions/sources/v1alpha1/camelsource.go deleted file mode 100644 index 28d6ed32c9..0000000000 --- a/camel/source/pkg/client/informers/externalversions/sources/v1alpha1/camelsource.go +++ /dev/null @@ -1,89 +0,0 @@ -/* -Copyright 2020 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 v1alpha1 - -import ( - time "time" - - 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" - sourcesv1alpha1 "knative.dev/eventing-contrib/camel/source/pkg/apis/sources/v1alpha1" - versioned "knative.dev/eventing-contrib/camel/source/pkg/client/clientset/versioned" - internalinterfaces "knative.dev/eventing-contrib/camel/source/pkg/client/informers/externalversions/internalinterfaces" - v1alpha1 "knative.dev/eventing-contrib/camel/source/pkg/client/listers/sources/v1alpha1" -) - -// CamelSourceInformer provides access to a shared informer and lister for -// CamelSources. -type CamelSourceInformer interface { - Informer() cache.SharedIndexInformer - Lister() v1alpha1.CamelSourceLister -} - -type camelSourceInformer struct { - factory internalinterfaces.SharedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc - namespace string -} - -// NewCamelSourceInformer constructs a new informer for CamelSource 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 NewCamelSourceInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return NewFilteredCamelSourceInformer(client, namespace, resyncPeriod, indexers, nil) -} - -// NewFilteredCamelSourceInformer constructs a new informer for CamelSource 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 NewFilteredCamelSourceInformer(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.SourcesV1alpha1().CamelSources(namespace).List(options) - }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.SourcesV1alpha1().CamelSources(namespace).Watch(options) - }, - }, - &sourcesv1alpha1.CamelSource{}, - resyncPeriod, - indexers, - ) -} - -func (f *camelSourceInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewFilteredCamelSourceInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) -} - -func (f *camelSourceInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&sourcesv1alpha1.CamelSource{}, f.defaultInformer) -} - -func (f *camelSourceInformer) Lister() v1alpha1.CamelSourceLister { - return v1alpha1.NewCamelSourceLister(f.Informer().GetIndexer()) -} diff --git a/camel/source/pkg/client/informers/externalversions/sources/v1alpha1/interface.go b/camel/source/pkg/client/informers/externalversions/sources/v1alpha1/interface.go deleted file mode 100644 index b2b221c1f6..0000000000 --- a/camel/source/pkg/client/informers/externalversions/sources/v1alpha1/interface.go +++ /dev/null @@ -1,45 +0,0 @@ -/* -Copyright 2020 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 v1alpha1 - -import ( - internalinterfaces "knative.dev/eventing-contrib/camel/source/pkg/client/informers/externalversions/internalinterfaces" -) - -// Interface provides access to all the informers in this group version. -type Interface interface { - // CamelSources returns a CamelSourceInformer. - CamelSources() CamelSourceInformer -} - -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} -} - -// CamelSources returns a CamelSourceInformer. -func (v *version) CamelSources() CamelSourceInformer { - return &camelSourceInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} -} diff --git a/camel/source/pkg/client/injection/client/client.go b/camel/source/pkg/client/injection/client/client.go deleted file mode 100644 index d20472ddc7..0000000000 --- a/camel/source/pkg/client/injection/client/client.go +++ /dev/null @@ -1,49 +0,0 @@ -/* -Copyright 2020 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 "context" - - rest "k8s.io/client-go/rest" - versioned "knative.dev/eventing-contrib/camel/source/pkg/client/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/eventing-contrib/camel/source/pkg/client/clientset/versioned.Interface from context.") - } - return untyped.(versioned.Interface) -} diff --git a/camel/source/pkg/client/injection/client/fake/fake.go b/camel/source/pkg/client/injection/client/fake/fake.go deleted file mode 100644 index 75f5eb3336..0000000000 --- a/camel/source/pkg/client/injection/client/fake/fake.go +++ /dev/null @@ -1,54 +0,0 @@ -/* -Copyright 2020 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 "context" - - runtime "k8s.io/apimachinery/pkg/runtime" - rest "k8s.io/client-go/rest" - fake "knative.dev/eventing-contrib/camel/source/pkg/client/clientset/versioned/fake" - client "knative.dev/eventing-contrib/camel/source/pkg/client/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/eventing-contrib/camel/source/pkg/client/clientset/versioned/fake.Clientset from context.") - } - return untyped.(*fake.Clientset) -} diff --git a/camel/source/pkg/client/injection/informers/factory/factory.go b/camel/source/pkg/client/injection/informers/factory/factory.go deleted file mode 100644 index 2ac9af846e..0000000000 --- a/camel/source/pkg/client/injection/informers/factory/factory.go +++ /dev/null @@ -1,56 +0,0 @@ -/* -Copyright 2020 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 "context" - - externalversions "knative.dev/eventing-contrib/camel/source/pkg/client/informers/externalversions" - client "knative.dev/eventing-contrib/camel/source/pkg/client/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/eventing-contrib/camel/source/pkg/client/informers/externalversions.SharedInformerFactory from context.") - } - return untyped.(externalversions.SharedInformerFactory) -} diff --git a/camel/source/pkg/client/injection/informers/factory/fake/fake.go b/camel/source/pkg/client/injection/informers/factory/fake/fake.go deleted file mode 100644 index 5db83f7349..0000000000 --- a/camel/source/pkg/client/injection/informers/factory/fake/fake.go +++ /dev/null @@ -1,45 +0,0 @@ -/* -Copyright 2020 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 "context" - - externalversions "knative.dev/eventing-contrib/camel/source/pkg/client/informers/externalversions" - fake "knative.dev/eventing-contrib/camel/source/pkg/client/injection/client/fake" - factory "knative.dev/eventing-contrib/camel/source/pkg/client/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...)) -} diff --git a/camel/source/pkg/client/injection/informers/sources/v1alpha1/camelsource/camelsource.go b/camel/source/pkg/client/injection/informers/sources/v1alpha1/camelsource/camelsource.go deleted file mode 100644 index a7e05dac66..0000000000 --- a/camel/source/pkg/client/injection/informers/sources/v1alpha1/camelsource/camelsource.go +++ /dev/null @@ -1,52 +0,0 @@ -/* -Copyright 2020 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 camelsource - -import ( - context "context" - - v1alpha1 "knative.dev/eventing-contrib/camel/source/pkg/client/informers/externalversions/sources/v1alpha1" - factory "knative.dev/eventing-contrib/camel/source/pkg/client/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.Sources().V1alpha1().CamelSources() - return context.WithValue(ctx, Key{}, inf), inf.Informer() -} - -// Get extracts the typed informer from the context. -func Get(ctx context.Context) v1alpha1.CamelSourceInformer { - untyped := ctx.Value(Key{}) - if untyped == nil { - logging.FromContext(ctx).Panic( - "Unable to fetch knative.dev/eventing-contrib/camel/source/pkg/client/informers/externalversions/sources/v1alpha1.CamelSourceInformer from context.") - } - return untyped.(v1alpha1.CamelSourceInformer) -} diff --git a/camel/source/pkg/client/injection/informers/sources/v1alpha1/camelsource/fake/fake.go b/camel/source/pkg/client/injection/informers/sources/v1alpha1/camelsource/fake/fake.go deleted file mode 100644 index 4886ae5833..0000000000 --- a/camel/source/pkg/client/injection/informers/sources/v1alpha1/camelsource/fake/fake.go +++ /dev/null @@ -1,40 +0,0 @@ -/* -Copyright 2020 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 "context" - - fake "knative.dev/eventing-contrib/camel/source/pkg/client/injection/informers/factory/fake" - camelsource "knative.dev/eventing-contrib/camel/source/pkg/client/injection/informers/sources/v1alpha1/camelsource" - controller "knative.dev/pkg/controller" - injection "knative.dev/pkg/injection" -) - -var Get = camelsource.Get - -func init() { - injection.Fake.RegisterInformer(withInformer) -} - -func withInformer(ctx context.Context) (context.Context, controller.Informer) { - f := fake.Get(ctx) - inf := f.Sources().V1alpha1().CamelSources() - return context.WithValue(ctx, camelsource.Key{}, inf), inf.Informer() -} diff --git a/camel/source/pkg/client/injection/reconciler/sources/v1alpha1/camelsource/controller.go b/camel/source/pkg/client/injection/reconciler/sources/v1alpha1/camelsource/controller.go deleted file mode 100644 index 6e2608bd09..0000000000 --- a/camel/source/pkg/client/injection/reconciler/sources/v1alpha1/camelsource/controller.go +++ /dev/null @@ -1,142 +0,0 @@ -/* -Copyright 2020 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 camelsource - -import ( - context "context" - fmt "fmt" - reflect "reflect" - strings "strings" - - corev1 "k8s.io/api/core/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - scheme "k8s.io/client-go/kubernetes/scheme" - v1 "k8s.io/client-go/kubernetes/typed/core/v1" - record "k8s.io/client-go/tools/record" - versionedscheme "knative.dev/eventing-contrib/camel/source/pkg/client/clientset/versioned/scheme" - client "knative.dev/eventing-contrib/camel/source/pkg/client/injection/client" - camelsource "knative.dev/eventing-contrib/camel/source/pkg/client/injection/informers/sources/v1alpha1/camelsource" - kubeclient "knative.dev/pkg/client/injection/kube/client" - controller "knative.dev/pkg/controller" - logging "knative.dev/pkg/logging" - reconciler "knative.dev/pkg/reconciler" -) - -const ( - defaultControllerAgentName = "camelsource-controller" - defaultFinalizerName = "camelsources.sources.knative.dev" -) - -// NewImpl returns a controller.Impl that handles queuing and feeding work from -// the queue through an implementation of controller.Reconciler, delegating to -// the provided Interface and optional Finalizer methods. OptionsFn is used to return -// controller.Options to be used but the internal reconciler. -func NewImpl(ctx context.Context, r Interface, optionsFns ...controller.OptionsFn) *controller.Impl { - logger := logging.FromContext(ctx) - - // Check the options function input. It should be 0 or 1. - if len(optionsFns) > 1 { - logger.Fatalf("up to one options function is supported, found %d", len(optionsFns)) - } - - camelsourceInformer := camelsource.Get(ctx) - - lister := camelsourceInformer.Lister() - - rec := &reconcilerImpl{ - LeaderAwareFuncs: reconciler.LeaderAwareFuncs{ - PromoteFunc: func(bkt reconciler.Bucket, enq func(reconciler.Bucket, types.NamespacedName)) error { - all, err := lister.List(labels.Everything()) - if err != nil { - return err - } - for _, elt := range all { - // TODO: Consider letting users specify a filter in options. - enq(bkt, types.NamespacedName{ - Namespace: elt.GetNamespace(), - Name: elt.GetName(), - }) - } - return nil - }, - }, - Client: client.Get(ctx), - Lister: lister, - reconciler: r, - finalizerName: defaultFinalizerName, - } - - t := reflect.TypeOf(r).Elem() - queueName := fmt.Sprintf("%s.%s", strings.ReplaceAll(t.PkgPath(), "/", "-"), t.Name()) - - impl := controller.NewImpl(rec, logger, queueName) - agentName := defaultControllerAgentName - - // Pass impl to the options. Save any optional results. - for _, fn := range optionsFns { - opts := fn(impl) - if opts.ConfigStore != nil { - rec.configStore = opts.ConfigStore - } - if opts.FinalizerName != "" { - rec.finalizerName = opts.FinalizerName - } - if opts.AgentName != "" { - agentName = opts.AgentName - } - if opts.SkipStatusUpdates { - rec.skipStatusUpdates = true - } - } - - rec.Recorder = createRecorder(ctx, agentName) - - return impl -} - -func createRecorder(ctx context.Context, agentName string) record.EventRecorder { - logger := logging.FromContext(ctx) - - recorder := controller.GetEventRecorder(ctx) - if recorder == nil { - // Create event broadcaster - logger.Debug("Creating event broadcaster") - eventBroadcaster := record.NewBroadcaster() - watches := []watch.Interface{ - eventBroadcaster.StartLogging(logger.Named("event-broadcaster").Infof), - eventBroadcaster.StartRecordingToSink( - &v1.EventSinkImpl{Interface: kubeclient.Get(ctx).CoreV1().Events("")}), - } - recorder = eventBroadcaster.NewRecorder(scheme.Scheme, corev1.EventSource{Component: agentName}) - go func() { - <-ctx.Done() - for _, w := range watches { - w.Stop() - } - }() - } - - return recorder -} - -func init() { - versionedscheme.AddToScheme(scheme.Scheme) -} diff --git a/camel/source/pkg/client/injection/reconciler/sources/v1alpha1/camelsource/reconciler.go b/camel/source/pkg/client/injection/reconciler/sources/v1alpha1/camelsource/reconciler.go deleted file mode 100644 index 398e0953a1..0000000000 --- a/camel/source/pkg/client/injection/reconciler/sources/v1alpha1/camelsource/reconciler.go +++ /dev/null @@ -1,449 +0,0 @@ -/* -Copyright 2020 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 camelsource - -import ( - context "context" - json "encoding/json" - fmt "fmt" - reflect "reflect" - - zap "go.uber.org/zap" - v1 "k8s.io/api/core/v1" - equality "k8s.io/apimachinery/pkg/api/equality" - errors "k8s.io/apimachinery/pkg/api/errors" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - sets "k8s.io/apimachinery/pkg/util/sets" - record "k8s.io/client-go/tools/record" - v1alpha1 "knative.dev/eventing-contrib/camel/source/pkg/apis/sources/v1alpha1" - versioned "knative.dev/eventing-contrib/camel/source/pkg/client/clientset/versioned" - sourcesv1alpha1 "knative.dev/eventing-contrib/camel/source/pkg/client/listers/sources/v1alpha1" - controller "knative.dev/pkg/controller" - kmp "knative.dev/pkg/kmp" - logging "knative.dev/pkg/logging" - reconciler "knative.dev/pkg/reconciler" -) - -// Interface defines the strongly typed interfaces to be implemented by a -// controller reconciling v1alpha1.CamelSource. -type Interface interface { - // ReconcileKind implements custom logic to reconcile v1alpha1.CamelSource. Any changes - // to the objects .Status or .Finalizers will be propagated to the stored - // object. It is recommended that implementors do not call any update calls - // for the Kind inside of ReconcileKind, it is the responsibility of the calling - // controller to propagate those properties. The resource passed to ReconcileKind - // will always have an empty deletion timestamp. - ReconcileKind(ctx context.Context, o *v1alpha1.CamelSource) reconciler.Event -} - -// Finalizer defines the strongly typed interfaces to be implemented by a -// controller finalizing v1alpha1.CamelSource. -type Finalizer interface { - // FinalizeKind implements custom logic to finalize v1alpha1.CamelSource. Any changes - // to the objects .Status or .Finalizers will be ignored. Returning a nil or - // Normal type reconciler.Event will allow the finalizer to be deleted on - // the resource. The resource passed to FinalizeKind will always have a set - // deletion timestamp. - FinalizeKind(ctx context.Context, o *v1alpha1.CamelSource) reconciler.Event -} - -// ReadOnlyInterface defines the strongly typed interfaces to be implemented by a -// controller reconciling v1alpha1.CamelSource if they want to process resources for which -// they are not the leader. -type ReadOnlyInterface interface { - // ObserveKind implements logic to observe v1alpha1.CamelSource. - // This method should not write to the API. - ObserveKind(ctx context.Context, o *v1alpha1.CamelSource) reconciler.Event -} - -// ReadOnlyFinalizer defines the strongly typed interfaces to be implemented by a -// controller finalizing v1alpha1.CamelSource if they want to process tombstoned resources -// even when they are not the leader. Due to the nature of how finalizers are handled -// there are no guarantees that this will be called. -type ReadOnlyFinalizer interface { - // ObserveFinalizeKind implements custom logic to observe the final state of v1alpha1.CamelSource. - // This method should not write to the API. - ObserveFinalizeKind(ctx context.Context, o *v1alpha1.CamelSource) reconciler.Event -} - -type doReconcile func(ctx context.Context, o *v1alpha1.CamelSource) reconciler.Event - -// reconcilerImpl implements controller.Reconciler for v1alpha1.CamelSource resources. -type reconcilerImpl struct { - // LeaderAwareFuncs is inlined to help us implement reconciler.LeaderAware - reconciler.LeaderAwareFuncs - - // Client is used to write back status updates. - Client versioned.Interface - - // Listers index properties about resources - Lister sourcesv1alpha1.CamelSourceLister - - // Recorder is an event recorder for recording Event resources to the - // Kubernetes API. - Recorder record.EventRecorder - - // configStore allows for decorating a context with config maps. - // +optional - configStore reconciler.ConfigStore - - // reconciler is the implementation of the business logic of the resource. - reconciler Interface - - // finalizerName is the name of the finalizer to reconcile. - finalizerName string - - // skipStatusUpdates configures whether or not this reconciler automatically updates - // the status of the reconciled resource. - skipStatusUpdates bool -} - -// Check that our Reconciler implements controller.Reconciler -var _ controller.Reconciler = (*reconcilerImpl)(nil) - -// Check that our generated Reconciler is always LeaderAware. -var _ reconciler.LeaderAware = (*reconcilerImpl)(nil) - -func NewReconciler(ctx context.Context, logger *zap.SugaredLogger, client versioned.Interface, lister sourcesv1alpha1.CamelSourceLister, recorder record.EventRecorder, r Interface, options ...controller.Options) controller.Reconciler { - // Check the options function input. It should be 0 or 1. - if len(options) > 1 { - logger.Fatalf("up to one options struct is supported, found %d", len(options)) - } - - // Fail fast when users inadvertently implement the other LeaderAware interface. - // For the typed reconcilers, Promote shouldn't take any arguments. - if _, ok := r.(reconciler.LeaderAware); ok { - logger.Fatalf("%T implements the incorrect LeaderAware interface. Promote() should not take an argument as genreconciler handles the enqueuing automatically.", r) - } - // TODO: Consider validating when folks implement ReadOnlyFinalizer, but not Finalizer. - - rec := &reconcilerImpl{ - LeaderAwareFuncs: reconciler.LeaderAwareFuncs{ - PromoteFunc: func(bkt reconciler.Bucket, enq func(reconciler.Bucket, types.NamespacedName)) error { - all, err := lister.List(labels.Everything()) - if err != nil { - return err - } - for _, elt := range all { - // TODO: Consider letting users specify a filter in options. - enq(bkt, types.NamespacedName{ - Namespace: elt.GetNamespace(), - Name: elt.GetName(), - }) - } - return nil - }, - }, - Client: client, - Lister: lister, - Recorder: recorder, - reconciler: r, - finalizerName: defaultFinalizerName, - } - - for _, opts := range options { - if opts.ConfigStore != nil { - rec.configStore = opts.ConfigStore - } - if opts.FinalizerName != "" { - rec.finalizerName = opts.FinalizerName - } - if opts.SkipStatusUpdates { - rec.skipStatusUpdates = true - } - } - - return rec -} - -// Reconcile implements controller.Reconciler -func (r *reconcilerImpl) Reconcile(ctx context.Context, key string) error { - logger := logging.FromContext(ctx) - - // Initialize the reconciler state. This will convert the namespace/name - // string into a distinct namespace and name, determin if this instance of - // the reconciler is the leader, and any additional interfaces implemented - // by the reconciler. Returns an error is the resource key is invalid. - s, err := newState(key, r) - if err != nil { - logger.Errorf("invalid resource key: %s", key) - return nil - } - - // If we are not the leader, and we don't implement either ReadOnly - // observer interfaces, then take a fast-path out. - if s.isNotLeaderNorObserver() { - return nil - } - - // If configStore is set, attach the frozen configuration to the context. - if r.configStore != nil { - ctx = r.configStore.ToContext(ctx) - } - - // Add the recorder to context. - ctx = controller.WithEventRecorder(ctx, r.Recorder) - - // Get the resource with this namespace/name. - - getter := r.Lister.CamelSources(s.namespace) - - original, err := getter.Get(s.name) - - if errors.IsNotFound(err) { - // The resource may no longer exist, in which case we stop processing. - logger.Debugf("resource %q no longer exists", key) - return nil - } else if err != nil { - return err - } - - // Don't modify the informers copy. - resource := original.DeepCopy() - - var reconcileEvent reconciler.Event - - name, do := s.reconcileMethodFor(resource) - // Append the target method to the logger. - logger = logger.With(zap.String("targetMethod", name)) - switch name { - case reconciler.DoReconcileKind: - // Append the target method to the logger. - logger = logger.With(zap.String("targetMethod", "ReconcileKind")) - - // Set and update the finalizer on resource if r.reconciler - // implements Finalizer. - if resource, err = r.setFinalizerIfFinalizer(ctx, resource); err != nil { - return fmt.Errorf("failed to set finalizers: %w", err) - } - - if !r.skipStatusUpdates { - reconciler.PreProcessReconcile(ctx, resource) - } - - // Reconcile this copy of the resource and then write back any status - // updates regardless of whether the reconciliation errored out. - reconcileEvent = do(ctx, resource) - - if !r.skipStatusUpdates { - reconciler.PostProcessReconcile(ctx, resource, original) - } - - case reconciler.DoFinalizeKind: - // For finalizing reconcilers, if this resource being marked for deletion - // and reconciled cleanly (nil or normal event), remove the finalizer. - reconcileEvent = do(ctx, resource) - - if resource, err = r.clearFinalizer(ctx, resource, reconcileEvent); err != nil { - return fmt.Errorf("failed to clear finalizers: %w", err) - } - - case reconciler.DoObserveKind, reconciler.DoObserveFinalizeKind: - // Observe any changes to this resource, since we are not the leader. - reconcileEvent = do(ctx, resource) - - } - - // Synchronize the status. - switch { - case r.skipStatusUpdates: - // This reconciler implementation is configured to skip resource updates. - // This may mean this reconciler does not observe spec, but reconciles external changes. - case equality.Semantic.DeepEqual(original.Status, resource.Status): - // If we didn't change anything then don't call updateStatus. - // This is important because the copy we loaded from the injectionInformer's - // cache may be stale and we don't want to overwrite a prior update - // to status with this stale state. - case !s.isLeader: - // High-availability reconcilers may have many replicas watching the resource, but only - // the elected leader is expected to write modifications. - logger.Warn("Saw status changes when we aren't the leader!") - default: - if err = r.updateStatus(ctx, original, resource); err != nil { - logger.Warnw("Failed to update resource status", zap.Error(err)) - r.Recorder.Eventf(resource, v1.EventTypeWarning, "UpdateFailed", - "Failed to update status for %q: %v", resource.Name, err) - return err - } - } - - // Report the reconciler event, if any. - if reconcileEvent != nil { - var event *reconciler.ReconcilerEvent - if reconciler.EventAs(reconcileEvent, &event) { - logger.Infow("Returned an event", zap.Any("event", reconcileEvent)) - r.Recorder.Eventf(resource, event.EventType, event.Reason, event.Format, event.Args...) - - // the event was wrapped inside an error, consider the reconciliation as failed - if _, isEvent := reconcileEvent.(*reconciler.ReconcilerEvent); !isEvent { - return reconcileEvent - } - return nil - } - - logger.Errorw("Returned an error", zap.Error(reconcileEvent)) - r.Recorder.Event(resource, v1.EventTypeWarning, "InternalError", reconcileEvent.Error()) - return reconcileEvent - } - - return nil -} - -func (r *reconcilerImpl) updateStatus(ctx context.Context, existing *v1alpha1.CamelSource, desired *v1alpha1.CamelSource) error { - existing = existing.DeepCopy() - return reconciler.RetryUpdateConflicts(func(attempts int) (err error) { - // The first iteration tries to use the injectionInformer's state, subsequent attempts fetch the latest state via API. - if attempts > 0 { - - getter := r.Client.SourcesV1alpha1().CamelSources(desired.Namespace) - - existing, err = getter.Get(desired.Name, metav1.GetOptions{}) - if err != nil { - return err - } - } - - // If there's nothing to update, just return. - if reflect.DeepEqual(existing.Status, desired.Status) { - return nil - } - - if diff, err := kmp.SafeDiff(existing.Status, desired.Status); err == nil && diff != "" { - logging.FromContext(ctx).Debugf("Updating status with: %s", diff) - } - - existing.Status = desired.Status - - updater := r.Client.SourcesV1alpha1().CamelSources(existing.Namespace) - - _, err = updater.UpdateStatus(existing) - return err - }) -} - -// updateFinalizersFiltered will update the Finalizers of the resource. -// TODO: this method could be generic and sync all finalizers. For now it only -// updates defaultFinalizerName or its override. -func (r *reconcilerImpl) updateFinalizersFiltered(ctx context.Context, resource *v1alpha1.CamelSource) (*v1alpha1.CamelSource, error) { - - getter := r.Lister.CamelSources(resource.Namespace) - - actual, err := getter.Get(resource.Name) - if err != nil { - return resource, err - } - - // Don't modify the informers copy. - existing := actual.DeepCopy() - - var finalizers []string - - // If there's nothing to update, just return. - existingFinalizers := sets.NewString(existing.Finalizers...) - desiredFinalizers := sets.NewString(resource.Finalizers...) - - if desiredFinalizers.Has(r.finalizerName) { - if existingFinalizers.Has(r.finalizerName) { - // Nothing to do. - return resource, nil - } - // Add the finalizer. - finalizers = append(existing.Finalizers, r.finalizerName) - } else { - if !existingFinalizers.Has(r.finalizerName) { - // Nothing to do. - return resource, nil - } - // Remove the finalizer. - existingFinalizers.Delete(r.finalizerName) - finalizers = existingFinalizers.List() - } - - mergePatch := map[string]interface{}{ - "metadata": map[string]interface{}{ - "finalizers": finalizers, - "resourceVersion": existing.ResourceVersion, - }, - } - - patch, err := json.Marshal(mergePatch) - if err != nil { - return resource, err - } - - patcher := r.Client.SourcesV1alpha1().CamelSources(resource.Namespace) - - resourceName := resource.Name - resource, err = patcher.Patch(resourceName, types.MergePatchType, patch) - if err != nil { - r.Recorder.Eventf(resource, v1.EventTypeWarning, "FinalizerUpdateFailed", - "Failed to update finalizers for %q: %v", resourceName, err) - } else { - r.Recorder.Eventf(resource, v1.EventTypeNormal, "FinalizerUpdate", - "Updated %q finalizers", resource.GetName()) - } - return resource, err -} - -func (r *reconcilerImpl) setFinalizerIfFinalizer(ctx context.Context, resource *v1alpha1.CamelSource) (*v1alpha1.CamelSource, error) { - if _, ok := r.reconciler.(Finalizer); !ok { - return resource, nil - } - - finalizers := sets.NewString(resource.Finalizers...) - - // If this resource is not being deleted, mark the finalizer. - if resource.GetDeletionTimestamp().IsZero() { - finalizers.Insert(r.finalizerName) - } - - resource.Finalizers = finalizers.List() - - // Synchronize the finalizers filtered by r.finalizerName. - return r.updateFinalizersFiltered(ctx, resource) -} - -func (r *reconcilerImpl) clearFinalizer(ctx context.Context, resource *v1alpha1.CamelSource, reconcileEvent reconciler.Event) (*v1alpha1.CamelSource, error) { - if _, ok := r.reconciler.(Finalizer); !ok { - return resource, nil - } - if resource.GetDeletionTimestamp().IsZero() { - return resource, nil - } - - finalizers := sets.NewString(resource.Finalizers...) - - if reconcileEvent != nil { - var event *reconciler.ReconcilerEvent - if reconciler.EventAs(reconcileEvent, &event) { - if event.EventType == v1.EventTypeNormal { - finalizers.Delete(r.finalizerName) - } - } - } else { - finalizers.Delete(r.finalizerName) - } - - resource.Finalizers = finalizers.List() - - // Synchronize the finalizers filtered by r.finalizerName. - return r.updateFinalizersFiltered(ctx, resource) -} diff --git a/camel/source/pkg/client/injection/reconciler/sources/v1alpha1/camelsource/state.go b/camel/source/pkg/client/injection/reconciler/sources/v1alpha1/camelsource/state.go deleted file mode 100644 index 805e5fa591..0000000000 --- a/camel/source/pkg/client/injection/reconciler/sources/v1alpha1/camelsource/state.go +++ /dev/null @@ -1,106 +0,0 @@ -/* -Copyright 2020 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 camelsource - -import ( - fmt "fmt" - - types "k8s.io/apimachinery/pkg/types" - cache "k8s.io/client-go/tools/cache" - v1alpha1 "knative.dev/eventing-contrib/camel/source/pkg/apis/sources/v1alpha1" - reconciler "knative.dev/pkg/reconciler" -) - -// state is used to track the state of a reconciler in a single run. -type state struct { - // Key is the original reconciliation key from the queue. - key string - // Namespace is the namespace split from the reconciliation key. - namespace string - // Namespace is the name split from the reconciliation key. - name string - // reconciler is the reconciler. - reconciler Interface - // rof is the read only interface cast of the reconciler. - roi ReadOnlyInterface - // IsROI (Read Only Interface) the reconciler only observes reconciliation. - isROI bool - // rof is the read only finalizer cast of the reconciler. - rof ReadOnlyFinalizer - // IsROF (Read Only Finalizer) the reconciler only observes finalize. - isROF bool - // IsLeader the instance of the reconciler is the elected leader. - isLeader bool -} - -func newState(key string, r *reconcilerImpl) (*state, error) { - // Convert the namespace/name string into a distinct namespace and name - namespace, name, err := cache.SplitMetaNamespaceKey(key) - if err != nil { - return nil, fmt.Errorf("invalid resource key: %s", key) - } - - roi, isROI := r.reconciler.(ReadOnlyInterface) - rof, isROF := r.reconciler.(ReadOnlyFinalizer) - - isLeader := r.IsLeaderFor(types.NamespacedName{ - Namespace: namespace, - Name: name, - }) - - return &state{ - key: key, - namespace: namespace, - name: name, - reconciler: r.reconciler, - roi: roi, - isROI: isROI, - rof: rof, - isROF: isROF, - isLeader: isLeader, - }, nil -} - -// isNotLeaderNorObserver checks to see if this reconciler with the current -// state is enabled to do any work or not. -// isNotLeaderNorObserver returns true when there is no work possible for the -// reconciler. -func (s *state) isNotLeaderNorObserver() bool { - if !s.isLeader && !s.isROI && !s.isROF { - // If we are not the leader, and we don't implement either ReadOnly - // interface, then take a fast-path out. - return true - } - return false -} - -func (s *state) reconcileMethodFor(o *v1alpha1.CamelSource) (string, doReconcile) { - if o.GetDeletionTimestamp().IsZero() { - if s.isLeader { - return reconciler.DoReconcileKind, s.reconciler.ReconcileKind - } else if s.isROI { - return reconciler.DoObserveKind, s.roi.ObserveKind - } - } else if fin, ok := s.reconciler.(Finalizer); s.isLeader && ok { - return reconciler.DoFinalizeKind, fin.FinalizeKind - } else if !s.isLeader && s.isROF { - return reconciler.DoObserveFinalizeKind, s.rof.ObserveFinalizeKind - } - return "unknown", nil -} diff --git a/camel/source/pkg/client/injection/reconciler/sources/v1alpha1/camelsource/stub/controller.go b/camel/source/pkg/client/injection/reconciler/sources/v1alpha1/camelsource/stub/controller.go deleted file mode 100644 index 0b0e23f114..0000000000 --- a/camel/source/pkg/client/injection/reconciler/sources/v1alpha1/camelsource/stub/controller.go +++ /dev/null @@ -1,54 +0,0 @@ -/* -Copyright 2020 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 camelsource - -import ( - context "context" - - camelsource "knative.dev/eventing-contrib/camel/source/pkg/client/injection/informers/sources/v1alpha1/camelsource" - v1alpha1camelsource "knative.dev/eventing-contrib/camel/source/pkg/client/injection/reconciler/sources/v1alpha1/camelsource" - configmap "knative.dev/pkg/configmap" - controller "knative.dev/pkg/controller" - logging "knative.dev/pkg/logging" -) - -// TODO: PLEASE COPY AND MODIFY THIS FILE AS A STARTING POINT - -// NewController creates a Reconciler for CamelSource and returns the result of NewImpl. -func NewController( - ctx context.Context, - cmw configmap.Watcher, -) *controller.Impl { - logger := logging.FromContext(ctx) - - camelsourceInformer := camelsource.Get(ctx) - - // TODO: setup additional informers here. - - r := &Reconciler{} - impl := v1alpha1camelsource.NewImpl(ctx, r) - - logger.Info("Setting up event handlers.") - - camelsourceInformer.Informer().AddEventHandler(controller.HandleAll(impl.Enqueue)) - - // TODO: add additional informer event handlers here. - - return impl -} diff --git a/camel/source/pkg/client/injection/reconciler/sources/v1alpha1/camelsource/stub/reconciler.go b/camel/source/pkg/client/injection/reconciler/sources/v1alpha1/camelsource/stub/reconciler.go deleted file mode 100644 index c7c5b33107..0000000000 --- a/camel/source/pkg/client/injection/reconciler/sources/v1alpha1/camelsource/stub/reconciler.go +++ /dev/null @@ -1,87 +0,0 @@ -/* -Copyright 2020 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 camelsource - -import ( - context "context" - - v1 "k8s.io/api/core/v1" - v1alpha1 "knative.dev/eventing-contrib/camel/source/pkg/apis/sources/v1alpha1" - camelsource "knative.dev/eventing-contrib/camel/source/pkg/client/injection/reconciler/sources/v1alpha1/camelsource" - reconciler "knative.dev/pkg/reconciler" -) - -// TODO: PLEASE COPY AND MODIFY THIS FILE AS A STARTING POINT - -// newReconciledNormal makes a new reconciler event with event type Normal, and -// reason CamelSourceReconciled. -func newReconciledNormal(namespace, name string) reconciler.Event { - return reconciler.NewEvent(v1.EventTypeNormal, "CamelSourceReconciled", "CamelSource reconciled: \"%s/%s\"", namespace, name) -} - -// Reconciler implements controller.Reconciler for CamelSource resources. -type Reconciler struct { - // TODO: add additional requirements here. -} - -// Check that our Reconciler implements Interface -var _ camelsource.Interface = (*Reconciler)(nil) - -// Optionally check that our Reconciler implements Finalizer -//var _ camelsource.Finalizer = (*Reconciler)(nil) - -// Optionally check that our Reconciler implements ReadOnlyInterface -// Implement this to observe resources even when we are not the leader. -//var _ camelsource.ReadOnlyInterface = (*Reconciler)(nil) - -// Optionally check that our Reconciler implements ReadOnlyFinalizer -// Implement this to observe tombstoned resources even when we are not -// the leader (best effort). -//var _ camelsource.ReadOnlyFinalizer = (*Reconciler)(nil) - -// ReconcileKind implements Interface.ReconcileKind. -func (r *Reconciler) ReconcileKind(ctx context.Context, o *v1alpha1.CamelSource) reconciler.Event { - // TODO: use this if the resource implements InitializeConditions. - // o.Status.InitializeConditions() - - // TODO: add custom reconciliation logic here. - - // TODO: use this if the object has .status.ObservedGeneration. - // o.Status.ObservedGeneration = o.Generation - return newReconciledNormal(o.Namespace, o.Name) -} - -// Optionally, use FinalizeKind to add finalizers. FinalizeKind will be called -// when the resource is deleted. -//func (r *Reconciler) FinalizeKind(ctx context.Context, o *v1alpha1.CamelSource) reconciler.Event { -// // TODO: add custom finalization logic here. -// return nil -//} - -// Optionally, use ObserveKind to observe the resource when we are not the leader. -// func (r *Reconciler) ObserveKind(ctx context.Context, o *v1alpha1.CamelSource) reconciler.Event { -// // TODO: add custom observation logic here. -// return nil -// } - -// Optionally, use ObserveFinalizeKind to observe resources being finalized when we are no the leader. -//func (r *Reconciler) ObserveFinalizeKind(ctx context.Context, o *v1alpha1.CamelSource) reconciler.Event { -// // TODO: add custom observation logic here. -// return nil -//} diff --git a/camel/source/pkg/client/listers/sources/v1alpha1/camelsource.go b/camel/source/pkg/client/listers/sources/v1alpha1/camelsource.go deleted file mode 100644 index 2365afee3b..0000000000 --- a/camel/source/pkg/client/listers/sources/v1alpha1/camelsource.go +++ /dev/null @@ -1,94 +0,0 @@ -/* -Copyright 2020 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 v1alpha1 - -import ( - "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/tools/cache" - v1alpha1 "knative.dev/eventing-contrib/camel/source/pkg/apis/sources/v1alpha1" -) - -// CamelSourceLister helps list CamelSources. -type CamelSourceLister interface { - // List lists all CamelSources in the indexer. - List(selector labels.Selector) (ret []*v1alpha1.CamelSource, err error) - // CamelSources returns an object that can list and get CamelSources. - CamelSources(namespace string) CamelSourceNamespaceLister - CamelSourceListerExpansion -} - -// camelSourceLister implements the CamelSourceLister interface. -type camelSourceLister struct { - indexer cache.Indexer -} - -// NewCamelSourceLister returns a new CamelSourceLister. -func NewCamelSourceLister(indexer cache.Indexer) CamelSourceLister { - return &camelSourceLister{indexer: indexer} -} - -// List lists all CamelSources in the indexer. -func (s *camelSourceLister) List(selector labels.Selector) (ret []*v1alpha1.CamelSource, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1alpha1.CamelSource)) - }) - return ret, err -} - -// CamelSources returns an object that can list and get CamelSources. -func (s *camelSourceLister) CamelSources(namespace string) CamelSourceNamespaceLister { - return camelSourceNamespaceLister{indexer: s.indexer, namespace: namespace} -} - -// CamelSourceNamespaceLister helps list and get CamelSources. -type CamelSourceNamespaceLister interface { - // List lists all CamelSources in the indexer for a given namespace. - List(selector labels.Selector) (ret []*v1alpha1.CamelSource, err error) - // Get retrieves the CamelSource from the indexer for a given namespace and name. - Get(name string) (*v1alpha1.CamelSource, error) - CamelSourceNamespaceListerExpansion -} - -// camelSourceNamespaceLister implements the CamelSourceNamespaceLister -// interface. -type camelSourceNamespaceLister struct { - indexer cache.Indexer - namespace string -} - -// List lists all CamelSources in the indexer for a given namespace. -func (s camelSourceNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.CamelSource, err error) { - err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { - ret = append(ret, m.(*v1alpha1.CamelSource)) - }) - return ret, err -} - -// Get retrieves the CamelSource from the indexer for a given namespace and name. -func (s camelSourceNamespaceLister) Get(name string) (*v1alpha1.CamelSource, error) { - obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(v1alpha1.Resource("camelsource"), name) - } - return obj.(*v1alpha1.CamelSource), nil -} diff --git a/camel/source/pkg/reconciler/camelsource.go b/camel/source/pkg/reconciler/camelsource.go deleted file mode 100644 index ba31c074bd..0000000000 --- a/camel/source/pkg/reconciler/camelsource.go +++ /dev/null @@ -1,189 +0,0 @@ -/* -Copyright 2020 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. -*/ - -package reconciler - -import ( - context "context" - "fmt" - "strings" - - camelv1 "github.com/apache/camel-k/pkg/apis/camel/v1" - camelclientset "github.com/apache/camel-k/pkg/client/camel/clientset/versioned" - corev1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/api/equality" - k8serrors "k8s.io/apimachinery/pkg/api/errors" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime/schema" - v1alpha1 "knative.dev/eventing-contrib/camel/source/pkg/apis/sources/v1alpha1" - "knative.dev/eventing-contrib/camel/source/pkg/reconciler/resources" - "knative.dev/pkg/logging" - "knative.dev/pkg/reconciler" - "knative.dev/pkg/resolver" - - camelsource "knative.dev/eventing-contrib/camel/source/pkg/client/injection/reconciler/sources/v1alpha1/camelsource" -) - -// newReconciledNormal makes a new reconciler event with event type Normal, and -// reason CamelSourceReconciled. -func newReconciledNormal(namespace, name string) reconciler.Event { - return reconciler.NewEvent(corev1.EventTypeNormal, "CamelSourceReconciled", "CamelSource reconciled: \"%s/%s\"", namespace, name) -} - -// Reconciler implements controller.Reconciler for CamelSource resources. -type Reconciler struct { - sinkResolver *resolver.URIResolver - camelClientSet camelclientset.Interface -} - -// Check that our Reconciler implements Interface -var _ camelsource.Interface = (*Reconciler)(nil) - -// ReconcileKind implements Interface.ReconcileKind. -func (r *Reconciler) ReconcileKind(ctx context.Context, source *v1alpha1.CamelSource) reconciler.Event { - source.Status.InitializeConditions() - source.Status.ObservedGeneration = source.Generation - - if source.Spec.Sink == nil { - source.Status.MarkNoSink("SinkMissing", "") - return fmt.Errorf("spec.sink missing") - } - - dest := source.Spec.Sink.DeepCopy() - // fill optional data in destination - if dest.Ref != nil { - if dest.Ref.Namespace == "" { - dest.Ref.Namespace = source.GetNamespace() - } - } else if dest.DeprecatedName != "" && dest.DeprecatedNamespace == "" { - dest.DeprecatedNamespace = source.GetNamespace() - } - - sinkURI, err := r.sinkResolver.URIFromDestination(*dest, source) - if err != nil { - source.Status.MarkNoSink("NotFound", "") - return err - } - - if dest.DeprecatedAPIVersion != "" && - dest.DeprecatedKind != "" && - dest.DeprecatedName != "" { - source.Status.MarkSinkWarnRefDeprecated(sinkURI) - } else { - source.Status.MarkSink(sinkURI) - } - - // Reconcile and update integration status - if integration, err := r.reconcileIntegration(ctx, source, sinkURI); err != nil { - return err - } else if integration != nil && integration.Status.Phase == camelv1.IntegrationPhaseRunning { - source.Status.MarkDeployed() - } - - return newReconciledNormal(source.Namespace, source.Name) -} - -func (r *Reconciler) reconcileIntegration(ctx context.Context, source *v1alpha1.CamelSource, sinkURI string) (*camelv1.Integration, reconciler.Event) { - logger := logging.FromContext(ctx) - args := &resources.CamelArguments{ - Name: source.Name, - Namespace: source.Namespace, - Source: source.Spec.Source, - Owner: source, - SinkURL: sinkURI, - } - if source.Spec.CloudEventOverrides != nil { - args.Overrides = make(map[string]string) - for k, v := range source.Spec.CloudEventOverrides.Extensions { - args.Overrides[strings.ToLower(k)] = v - } - } - - integration, err := r.getIntegration(ctx, source) - if err != nil { - if k8serrors.IsNotFound(err) { - integration, err = r.createIntegration(ctx, source, args) - if err != nil { - return nil, reconciler.NewEvent(corev1.EventTypeWarning, "IntegrationBlocked", "waiting for %v", err) - } - - // Since the Deployment has just been created, there's nothing more - // to do until it gets a status. This CamelSource will be reconciled - // again when the Integration is updated. - name := integration.Name - if name == "" { - name = fmt.Sprintf("%s*", integration.GenerateName) - } - source.Status.MarkDeploying("Deploying", "Created integration %s", name) - return integration, reconciler.NewEvent(corev1.EventTypeNormal, "Deployed", "Created integration %q", name) - } - return nil, err - } - - // Update Integration spec if it's changed - expected, err := resources.MakeIntegration(args) - if err != nil { - return nil, err - } - // Since the Integration spec has fields defaulted by the webhook, it won't - // be equal to expected. Use DeepDerivative to compare only the fields that - // are set in expected. - if !equality.Semantic.DeepDerivative(expected.Spec, integration.Spec) { - logger.Infof("Integration %q in namespace %q has changed and needs to be updated", integration.Name, integration.Namespace) - integration.Spec = expected.Spec - - _, err := r.updateIntegration(ctx, integration) - // if no error, update the status. - name := integration.Name - if name == "" { - name = fmt.Sprintf("%s*", integration.GenerateName) - } - if err == nil { - source.Status.MarkDeploying("IntegrationUpdated", "Updated integration %s", name) - return nil, reconciler.NewEvent(corev1.EventTypeNormal, "IntegrationUpdated", "Updated integration %q", name) - } else { - source.Status.MarkDeploying("IntegrationNeedsUpdate", "Attempting to update integration %s", name) - return nil, reconciler.NewEvent(corev1.EventTypeWarning, "IntegrationNeedsUpdate", "Failed to update integration %q", name) - } - } - return integration, nil -} - -func (r *Reconciler) getIntegration(ctx context.Context, source *v1alpha1.CamelSource) (*camelv1.Integration, error) { - all, err := r.camelClientSet.CamelV1().Integrations(source.Namespace).List(metav1.ListOptions{}) - if err != nil { - return nil, err - } - for _, a := range all.Items { - if metav1.IsControlledBy(&a, source) { - return &a, nil - } - } - return nil, k8serrors.NewNotFound(schema.GroupResource{}, "") -} - -func (r *Reconciler) createIntegration(ctx context.Context, source *v1alpha1.CamelSource, args *resources.CamelArguments) (*camelv1.Integration, error) { - integration, err := resources.MakeIntegration(args) - if err != nil { - return nil, err - } - - return r.camelClientSet.CamelV1().Integrations(source.Namespace).Create(integration) -} - -func (r *Reconciler) updateIntegration(ctx context.Context, integration *camelv1.Integration) (*camelv1.Integration, error) { - return r.camelClientSet.CamelV1().Integrations(integration.Namespace).Update(integration) -} diff --git a/camel/source/pkg/reconciler/camelsource_test.go b/camel/source/pkg/reconciler/camelsource_test.go deleted file mode 100644 index a7b5962a4e..0000000000 --- a/camel/source/pkg/reconciler/camelsource_test.go +++ /dev/null @@ -1,477 +0,0 @@ -/* -Copyright 2019 The Knative Authors - -Licensed under the Apache License, Veroute.on 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. -*/ - -package reconciler - -import ( - "context" - "fmt" - "testing" - - camelv1 "github.com/apache/camel-k/pkg/apis/camel/v1" - "go.uber.org/zap" - v1 "k8s.io/api/apps/v1" - corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/types" - "k8s.io/client-go/kubernetes/scheme" - clientgotesting "k8s.io/client-go/testing" - sourcesv1alpha1 "knative.dev/eventing-contrib/camel/source/pkg/apis/sources/v1alpha1" - fakecamelclient "knative.dev/eventing-contrib/camel/source/pkg/camel-k/injection/client/fake" - fakesourceclient "knative.dev/eventing-contrib/camel/source/pkg/client/injection/client/fake" - "knative.dev/eventing-contrib/camel/source/pkg/client/injection/reconciler/sources/v1alpha1/camelsource" - "knative.dev/eventing-contrib/camel/source/pkg/reconciler/resources" - reconcilertesting "knative.dev/eventing-contrib/camel/source/pkg/reconciler/testing" - duckv1 "knative.dev/pkg/apis/duck/v1" - duckv1alpha1 "knative.dev/pkg/apis/duck/v1alpha1" - duckv1beta1 "knative.dev/pkg/apis/duck/v1beta1" - "knative.dev/pkg/client/injection/ducks/duck/v1/addressable" - "knative.dev/pkg/configmap" - "knative.dev/pkg/controller" - "knative.dev/pkg/logging" - "knative.dev/pkg/resolver" - - . "knative.dev/eventing-contrib/camel/source/pkg/reconciler/testing" - . "knative.dev/pkg/reconciler/testing" -) - -const ( - alternativeImage = "apache/camel-k-base-alternative" - alternativeKitName = "alternative-kit" - - sourceName = "test-camel-source" - testNS = "testnamespace" - generation = 1 - - addressableName = "testsink" - addressableKind = "Addressable" - addressableAPIVersion = "duck.knative.dev/v1" - addressableURI = "http://addressable.sink.svc.cluster.local" -) - -func init() { - // Add types to scheme - addToScheme( - v1.AddToScheme, - corev1.AddToScheme, - sourcesv1alpha1.SchemeBuilder.AddToScheme, - duckv1alpha1.AddToScheme, - duckv1beta1.AddToScheme, - camelv1.SchemeBuilder.AddToScheme, - duckv1.SchemeBuilder.AddToScheme, - ) -} - -func addToScheme(funcs ...func(*runtime.Scheme) error) { - for _, fun := range funcs { - if err := fun(scheme.Scheme); err != nil { - panic(fmt.Errorf("error during scheme registration: %v", zap.Error(err))) - } - } -} - -func TestReconcile(t *testing.T) { - key := testNS + "/" + sourceName - - table := TableTest{{ - Name: "bad workqueue key", - // Make sure Reconcile handles bad keys. - Key: "too/many/parts", - }, { - Name: "key not found", - // Make sure Reconcile handles good keys that don't exist. - Key: "not-found", - }, { - Name: "Deleted source", - Key: key, - Objects: []runtime.Object{ - NewCamelSource(sourceName, testNS, generation, - WithCamelSourceDeleted), - }, - }, { - Name: "Cannot get sink URI", - Key: key, - Objects: []runtime.Object{ - getBaseSource(), - }, - WantStatusUpdates: []clientgotesting.UpdateActionImpl{{ - Object: getBaseSource( - // Updates - WithInitCamelSource, - WithCamelSourceSinkNotFound()), - }}, - WantErr: true, - WantEvents: []string{ - Eventf(corev1.EventTypeWarning, "InternalError", `addressables.duck.knative.dev "testsink" not found`), - }, - }, { - Name: "Creating integration", - Key: key, - Objects: []runtime.Object{ - getBaseSource(), - getAddressable(), - }, - WantStatusUpdates: []clientgotesting.UpdateActionImpl{{ - Object: getBaseSource( - // Updates - WithInitCamelSource, - WithCamelSourceSink(addressableURI), - WithCamelSourceDeploying()), - }}, - WantCreates: []runtime.Object{ - NewIntegration("test-camel-source", testNS, getBaseSource(WithCamelSourceSink(addressableURI))), - }, - WantEvents: []string{ - Eventf(corev1.EventTypeNormal, "Deployed", `Created integration "test-camel-source-*"`), - }, - }, { - Name: "Source Deployed", - Key: key, - Objects: []runtime.Object{ - getBaseSource( - WithInitCamelSource, - WithCamelSourceSink(addressableURI), - WithCamelSourceDeploying()), - getAddressable(), - getRunningIntegration(), - }, - WantStatusUpdates: []clientgotesting.UpdateActionImpl{{ - Object: getBaseSource( - WithInitCamelSource, - WithCamelSourceSink(addressableURI), - WithCamelSourceDeploying(), - // Updates - WithCamelSourceDeployed(), - ), - }}, - WantEvents: []string{ - Eventf(corev1.EventTypeNormal, "CamelSourceReconciled", `CamelSource reconciled: "testnamespace/test-camel-source"`), - }, - }, { - Name: "Camel K Source Deployed", - Key: key, - Objects: []runtime.Object{ - getCamelKSource(), - getAddressable(), - getRunningCamelKIntegration(t), - }, - WantStatusUpdates: []clientgotesting.UpdateActionImpl{{ - Object: getCamelKSource( - // Updates - WithCamelSourceDeployed(), - ), - }}, - WantEvents: []string{ - Eventf(corev1.EventTypeNormal, "CamelSourceReconciled", `CamelSource reconciled: "testnamespace/test-camel-source"`), - }, - }, { - Name: "Source changed", - Key: key, - Objects: []runtime.Object{ - getBaseSource(), - getAddressable(), - getWrongIntegration(), - }, - WantUpdates: []clientgotesting.UpdateActionImpl{{ - Object: getRunningIntegration(), - }}, - WantStatusUpdates: []clientgotesting.UpdateActionImpl{{ - Object: getBaseSource( - // Updates - WithInitCamelSource, - WithCamelSourceSink(addressableURI), - WithCamelSourceIntegrationUpdated()), - }}, - WantEvents: []string{ - Eventf(corev1.EventTypeNormal, "IntegrationUpdated", `Updated integration "test-camel-source-*"`), - }, - }, { - Name: "Camel K Source changed", - Key: key, - Objects: []runtime.Object{ - getCamelKSource(), - getAddressable(), - getWrongIntegration(), - }, - WantUpdates: []clientgotesting.UpdateActionImpl{{ - Object: getRunningCamelKIntegration(t), - }}, - WantStatusUpdates: []clientgotesting.UpdateActionImpl{{ - Object: getCamelKSource(WithCamelSourceIntegrationUpdated()), - }}, - WantEvents: []string{ - Eventf(corev1.EventTypeNormal, "IntegrationUpdated", `Updated integration "test-camel-source-*"`), - }, - }, { - Name: "Source with context", Key: key, - Objects: []runtime.Object{ - withAlternativeContext(getBaseSource( - WithInitCamelSource, - WithCamelSourceSink(addressableURI))), - getAddressable(), - integrationWithAlternativeContext(getRunningIntegration()), - getAlternativeContext(), - }, - WantStatusUpdates: []clientgotesting.UpdateActionImpl{{ - Object: withAlternativeContext(getBaseSource( - WithInitCamelSource, - WithCamelSourceSink(addressableURI), - // Updates - WithCamelSourceDeployed(), - )), - }}, - WantEvents: []string{ - Eventf(corev1.EventTypeNormal, "CamelSourceReconciled", `CamelSource reconciled: "testnamespace/test-camel-source"`), - }, - }, { - Name: "Camel K Source with context", - Key: key, - Objects: []runtime.Object{ - withAlternativeContext(getCamelKSource()), - getAddressable(), - integrationWithAlternativeContext(getRunningCamelKIntegration(t)), - getAlternativeContext(), - }, - WantStatusUpdates: []clientgotesting.UpdateActionImpl{{ - Object: withAlternativeContext(getCamelKSource( - // Updates - WithCamelSourceDeployed(), - )), - }}, - WantEvents: []string{ - Eventf(corev1.EventTypeNormal, "CamelSourceReconciled", `CamelSource reconciled: "testnamespace/test-camel-source"`), - }, - }, { - Name: "Camel K Flow source", - Key: key, - Objects: []runtime.Object{ - getCamelKFlowSource(), - getAddressable(), - getRunningCamelKFlowIntegration(t), - }, - WantStatusUpdates: []clientgotesting.UpdateActionImpl{{ - Object: getCamelKFlowSource( - // Updates - WithCamelSourceDeployed(), - ), - }}, - WantEvents: []string{ - Eventf(corev1.EventTypeNormal, "CamelSourceReconciled", `CamelSource reconciled: "testnamespace/test-camel-source"`), - }, - }} - - table.Test(t, reconcilertesting.MakeFactory(func(ctx context.Context, listers *Listers, cmw configmap.Watcher) controller.Reconciler { - ctx = addressable.WithDuck(ctx) - r := &Reconciler{ - camelClientSet: fakecamelclient.Get(ctx), - sinkResolver: resolver.NewURIResolver(ctx, func(types.NamespacedName) {}), - } - return camelsource.NewReconciler(ctx, logging.FromContext(ctx), - fakesourceclient.Get(ctx), listers.GetCamelSourcesLister(), - controller.GetEventRecorder(ctx), r) - }, zap.L())) -} - -func getCamelKSource(opts ...CamelSourceOption) *sourcesv1alpha1.CamelSource { - opts = append([]CamelSourceOption{ - WithInitCamelSource, - WithCamelSourceSpec(sourcesv1alpha1.CamelSourceSpec{ - Source: sourcesv1alpha1.CamelSourceOriginSpec{ - Integration: &camelv1.IntegrationSpec{ - Sources: []camelv1.SourceSpec{{ - DataSpec: camelv1.DataSpec{ - Name: "integration.groovy", - Content: "from('timer:tick?period=3s').to('knative://endpoint/sink')", - }, - }}, - }, - }, - Sink: &duckv1beta1.Destination{ - Ref: &corev1.ObjectReference{ - Name: addressableName, - Kind: addressableKind, - APIVersion: addressableAPIVersion, - }, - }, - }), - WithCamelSourceSink(addressableURI), - WithCamelSourceDeploying()}, opts...) - - return getBaseSource(opts...) -} - -func getCamelKFlowSource(opts ...CamelSourceOption) *sourcesv1alpha1.CamelSource { - flow := sourcesv1alpha1.Flow{ - "from": map[string]interface{}{ - "uri": "timer:tick?period=3s", - "steps": []interface{}{ - map[string]interface{}{ - "set-body": map[string]interface{}{ - "constant": "Hello world", - }, - }, - }, - }, - } - - opts = append([]CamelSourceOption{ - WithInitCamelSource, - WithCamelSourceSpec(sourcesv1alpha1.CamelSourceSpec{ - Source: sourcesv1alpha1.CamelSourceOriginSpec{ - Flow: &flow, - }, - Sink: &duckv1beta1.Destination{ - Ref: &corev1.ObjectReference{ - Name: addressableName, - Kind: addressableKind, - APIVersion: addressableAPIVersion, - }, - }, - }), - WithCamelSourceSink(addressableURI), - WithCamelSourceDeploying()}, opts...) - - return getBaseSource(opts...) -} - -func withAlternativeContext(src *sourcesv1alpha1.CamelSource) *sourcesv1alpha1.CamelSource { - if src.Spec.Source.Integration == nil { - src.Spec.Source.Integration = &camelv1.IntegrationSpec{} - } - src.Spec.Source.Integration.Kit = alternativeKitName - return src -} - -func getAlternativeContext() *camelv1.IntegrationKit { - ctx := makeContext(testNS, alternativeImage) - ctx.Name = alternativeKitName - return ctx -} - -func makeContext(namespace string, image string) *camelv1.IntegrationKit { - ct := camelv1.IntegrationKit{ - TypeMeta: metav1.TypeMeta{ - Kind: "IntegrationKit", - APIVersion: "camel.apache.org/v1", - }, - ObjectMeta: metav1.ObjectMeta{ - GenerateName: "ctx-", - Namespace: namespace, - Labels: map[string]string{ - "app": "camel-k", - "camel.apache.org/kit.type": camelv1.IntegrationKitTypeExternal, - }, - }, - Spec: camelv1.IntegrationKitSpec{ - Image: image, - Profile: camelv1.TraitProfileKnative, - }, - } - return &ct -} - -func getRunningIntegration() *camelv1.Integration { - it := NewIntegration(sourceName, testNS, getBaseSource(WithCamelSourceSink(addressableURI))) - - it.Status.Phase = camelv1.IntegrationPhaseRunning - return it -} - -func integrationWithAlternativeContext(integration *camelv1.Integration) *camelv1.Integration { - integration.Spec.Kit = alternativeKitName - return integration -} - -func getRunningCamelKIntegration(t *testing.T) *camelv1.Integration { - src := getCamelKSource() - it, err := resources.MakeIntegration(&resources.CamelArguments{ - Name: sourceName, - Namespace: testNS, - SinkURL: addressableURI, - Owner: src, - Source: src.Spec.Source, - }) - if err != nil { - t.Error("failed to create integration", err) - } - it.Status.Phase = camelv1.IntegrationPhaseRunning - return it -} - -func getRunningCamelKFlowIntegration(t *testing.T) *camelv1.Integration { - src := getCamelKFlowSource() - it, err := resources.MakeIntegration(&resources.CamelArguments{ - Name: sourceName, - Namespace: testNS, - SinkURL: addressableURI, - Owner: src, - Source: src.Spec.Source, - }) - if err != nil { - t.Error("failed to create integration", err) - } - it.Status.Phase = camelv1.IntegrationPhaseRunning - return it -} - -func getWrongIntegration() *camelv1.Integration { - it := getRunningIntegration() - it.Spec.Sources[0].Content = "wrong" - return it -} - -func getBaseSource(opts ...CamelSourceOption) *sourcesv1alpha1.CamelSource { - opts = append([]CamelSourceOption{ - WithCamelSourceSpec(sourcesv1alpha1.CamelSourceSpec{ - Source: sourcesv1alpha1.CamelSourceOriginSpec{ - Flow: &sourcesv1alpha1.Flow{ - "from": map[string]interface{}{ - "uri": "timer:tick?period=3s", - }, - }, - }, - Sink: &duckv1beta1.Destination{ - Ref: &corev1.ObjectReference{ - Name: addressableName, - Kind: addressableKind, - APIVersion: addressableAPIVersion, - }, - }, - })}, opts...) - - return NewCamelSource(sourceName, testNS, generation, - opts...) -} - -func getAddressable() *unstructured.Unstructured { - return &unstructured.Unstructured{ - Object: map[string]interface{}{ - "apiVersion": addressableAPIVersion, - "kind": addressableKind, - "metadata": map[string]interface{}{ - "namespace": testNS, - "name": addressableName, - }, - "status": map[string]interface{}{ - "address": map[string]interface{}{ - "url": addressableURI, - }, - }, - }, - } -} diff --git a/camel/source/pkg/reconciler/controller.go b/camel/source/pkg/reconciler/controller.go deleted file mode 100644 index 16221dbd53..0000000000 --- a/camel/source/pkg/reconciler/controller.go +++ /dev/null @@ -1,65 +0,0 @@ -/* -Copyright 2020 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. -*/ - -package reconciler - -import ( - context "context" - - "k8s.io/client-go/tools/cache" - "knative.dev/eventing-contrib/camel/source/pkg/apis/sources/v1alpha1" - camelclientset "knative.dev/eventing-contrib/camel/source/pkg/camel-k/injection/client" - "knative.dev/eventing-contrib/camel/source/pkg/camel-k/injection/informers/camel/v1/integration" - camelsource "knative.dev/eventing-contrib/camel/source/pkg/client/injection/informers/sources/v1alpha1/camelsource" - v1alpha1camelsource "knative.dev/eventing-contrib/camel/source/pkg/client/injection/reconciler/sources/v1alpha1/camelsource" - configmap "knative.dev/pkg/configmap" - controller "knative.dev/pkg/controller" - logging "knative.dev/pkg/logging" - "knative.dev/pkg/resolver" -) - -// NewController creates a Reconciler for CamelSource and returns the result of NewImpl. -func NewController( - ctx context.Context, - cmw configmap.Watcher, -) *controller.Impl { - logger := logging.FromContext(ctx) - - camelsourceInformer := camelsource.Get(ctx) - camelIntegrationInformer := integration.Get(ctx) - - // TODO: setup additional informers here. - - r := &Reconciler{ - camelClientSet: camelclientset.Get(ctx), - } - impl := v1alpha1camelsource.NewImpl(ctx, r) - - // Set sink resolver. - r.sinkResolver = resolver.NewURIResolver(ctx, impl.EnqueueKey) - - logger.Info("Setting up event handlers.") - - camelsourceInformer.Informer().AddEventHandler(controller.HandleAll(impl.Enqueue)) - - _ = camelIntegrationInformer - camelIntegrationInformer.Informer().AddEventHandler(cache.FilteringResourceEventHandler{ - FilterFunc: controller.FilterControllerGK(v1alpha1.Kind("CamelSource")), - Handler: controller.HandleAll(impl.EnqueueControllerOf), - }) - - return impl -} diff --git a/camel/source/pkg/reconciler/doc.go b/camel/source/pkg/reconciler/doc.go deleted file mode 100644 index 14b3dd6734..0000000000 --- a/camel/source/pkg/reconciler/doc.go +++ /dev/null @@ -1,18 +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. -*/ - -// Package reconciler implements the CamelSource reconciler. -package reconciler diff --git a/camel/source/pkg/reconciler/resources/arguments.go b/camel/source/pkg/reconciler/resources/arguments.go deleted file mode 100644 index ec0fd97a8f..0000000000 --- a/camel/source/pkg/reconciler/resources/arguments.go +++ /dev/null @@ -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. -*/ - -package resources - -import ( - "knative.dev/eventing-contrib/camel/source/pkg/apis/sources/v1alpha1" - "knative.dev/pkg/kmeta" -) - -type CamelArguments struct { - Name string - Namespace string - Owner kmeta.OwnerRefable - Source v1alpha1.CamelSourceOriginSpec - SinkURL string - Overrides map[string]string -} diff --git a/camel/source/pkg/reconciler/resources/flow.go b/camel/source/pkg/reconciler/resources/flow.go deleted file mode 100644 index 512ea7396e..0000000000 --- a/camel/source/pkg/reconciler/resources/flow.go +++ /dev/null @@ -1,34 +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. -*/ - -package resources - -import ( - yaml "gopkg.in/yaml.v2" -) - -// MarshalCamelFlows marshals a list of flows into their standard yaml representation -func MarshalCamelFlows(flows []map[string]interface{}) (string, error) { - return marshalCamelFlowStruct(flows) -} - -func marshalCamelFlowStruct(flow interface{}) (string, error) { - b, err := yaml.Marshal(flow) - if err != nil { - return "", err - } - return string(b), nil -} diff --git a/camel/source/pkg/reconciler/resources/integration.go b/camel/source/pkg/reconciler/resources/integration.go deleted file mode 100644 index b8dd6cb3b8..0000000000 --- a/camel/source/pkg/reconciler/resources/integration.go +++ /dev/null @@ -1,130 +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. -*/ - -package resources - -import ( - "encoding/json" - "errors" - "fmt" - "net/url" - - "knative.dev/pkg/kmeta" - - camelv1 "github.com/apache/camel-k/pkg/apis/camel/v1" - camelknativev1 "github.com/apache/camel-k/pkg/apis/camel/v1/knative" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -func MakeIntegration(args *CamelArguments) (*camelv1.Integration, error) { - if args.Source.Integration == nil && args.Source.Flow == nil { - return nil, errors.New("empty sources") - } - - if _, present := args.Overrides["source"]; !present { - if args.Overrides == nil { - args.Overrides = make(map[string]string) - } - args.Overrides["source"] = fmt.Sprintf("camel-source:%s/%s", args.Namespace, args.Name) - } - - environment, err := makeCamelEnvironment(args.SinkURL, args.Overrides) - if err != nil { - return nil, err - } - - var spec *camelv1.IntegrationSpec - if args.Source.Integration != nil { - spec = args.Source.Integration.DeepCopy() - } else { - spec = &camelv1.IntegrationSpec{} - } - - if args.Source.Flow != nil { - flows := []map[string]interface{}{*args.Source.Flow} - flowData, err := MarshalCamelFlows(flows) - if err != nil { - return nil, err - } - spec.Sources = append(spec.Sources, camelv1.SourceSpec{ - Interceptors: []string{"knative-source"}, - DataSpec: camelv1.DataSpec{ - Name: "flow.yaml", - Content: flowData, - }, - }) - } - - if spec.Traits == nil { - spec.Traits = make(map[string]camelv1.TraitSpec) - } - config := map[string]string{ - "configuration": environment, - } - jsonConfig, err := json.Marshal(config) - if err != nil { - return nil, err - } - spec.Traits["knative"] = camelv1.TraitSpec{ - Configuration: camelv1.TraitConfiguration{ - RawMessage: json.RawMessage(jsonConfig), - }, - } - - integration := camelv1.Integration{ - TypeMeta: metav1.TypeMeta{ - APIVersion: camelv1.SchemeGroupVersion.String(), - Kind: "Integration", - }, - ObjectMeta: metav1.ObjectMeta{ - GenerateName: args.Name + "-", - Namespace: args.Namespace, - OwnerReferences: []metav1.OwnerReference{ - *kmeta.NewControllerRef(args.Owner), - }, - }, - Spec: *spec, - } - - return &integration, nil -} - -func makeCamelEnvironment(sinkURIString string, overrides map[string]string) (string, error) { - sinkURI, err := url.Parse(sinkURIString) - if err != nil { - return "", err - } - env := camelknativev1.NewCamelEnvironment() - svc, err := camelknativev1.BuildCamelServiceDefinition( - "sink", - camelknativev1.CamelEndpointKindSink, - camelknativev1.CamelServiceTypeEndpoint, - *sinkURI, - "", - "", - ) - if err != nil { - return "", err - } - if svc.Metadata == nil { - svc.Metadata = make(map[string]string) - } - for k, v := range overrides { - svc.Metadata["ce.override.ce-"+k] = v - } - env.Services = append(env.Services, svc) - return env.Serialize() -} diff --git a/camel/source/pkg/reconciler/resources/integration_test.go b/camel/source/pkg/reconciler/resources/integration_test.go deleted file mode 100644 index 683959df08..0000000000 --- a/camel/source/pkg/reconciler/resources/integration_test.go +++ /dev/null @@ -1,133 +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. -*/ - -package resources - -import ( - "encoding/json" - "testing" - - "knative.dev/pkg/ptr" - - "knative.dev/eventing-contrib/camel/source/pkg/apis/sources/v1alpha1" - - camelv1 "github.com/apache/camel-k/pkg/apis/camel/v1" - "github.com/google/go-cmp/cmp" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -func TestMakeDeployment_sink(t *testing.T) { - got, err := MakeIntegration(&CamelArguments{ - Name: "test-name", - Namespace: "test-namespace", - Owner: &v1alpha1.CamelSource{ - ObjectMeta: metav1.ObjectMeta{ - Name: "foo", - Namespace: "bar", - UID: "abc-123", - }, - }, - Source: v1alpha1.CamelSourceOriginSpec{ - Flow: &v1alpha1.Flow{ - "from": map[string]interface{}{ - "uri": "timer:tick", - }, - }, - Integration: &camelv1.IntegrationSpec{ - ServiceAccountName: "test-service-account", - Kit: "test-kit", - Configuration: []camelv1.ConfigurationSpec{ - { - Type: "property", - Value: "k=v", - }, - { - Type: "property", - Value: "k2=v2", - }, - }, - }, - }, - SinkURL: "http://test-sink", - Overrides: map[string]string{ - "a": "b", - }, - }) - if err != nil { - t.Error(err) - } - - config := map[string]string{ - "configuration": `{"services":[{"type":"endpoint","name":"sink","host":"test-sink","port":80,"metadata":{"camel.endpoint.kind":"sink","ce.override.ce-a":"b","ce.override.ce-source":"camel-source:test-namespace/test-name","knative.apiVersion":"","knative.kind":""}}]}`, - } - jsonConfig, err := json.Marshal(config) - if err != nil { - t.Error(err) - } - - want := &camelv1.Integration{ - TypeMeta: metav1.TypeMeta{ - APIVersion: "camel.apache.org/v1", - Kind: "Integration", - }, - ObjectMeta: metav1.ObjectMeta{ - GenerateName: "test-name-", - Namespace: "test-namespace", - OwnerReferences: []metav1.OwnerReference{{ - Kind: "CamelSource", - Name: "foo", - UID: "abc-123", - APIVersion: "sources.knative.dev/v1alpha1", - Controller: ptr.Bool(true), - BlockOwnerDeletion: ptr.Bool(true), - }}, - }, - Spec: camelv1.IntegrationSpec{ - ServiceAccountName: "test-service-account", - Kit: "test-kit", - Sources: []camelv1.SourceSpec{ - { - Interceptors: []string{"knative-source"}, - DataSpec: camelv1.DataSpec{ - Name: "flow.yaml", - Content: "- from:\n uri: timer:tick\n", - }, - }, - }, - Configuration: []camelv1.ConfigurationSpec{ - { - Type: "property", - Value: "k=v", - }, - { - Type: "property", - Value: "k2=v2", - }, - }, - Traits: map[string]camelv1.TraitSpec{ - "knative": { - Configuration: camelv1.TraitConfiguration{ - RawMessage: json.RawMessage(jsonConfig), - }, - }, - }, - }, - } - - if diff := cmp.Diff(want, got); diff != "" { - t.Errorf("unexpected integration (-want, +got) = %v", diff) - } -} diff --git a/camel/source/pkg/reconciler/testing/camelsource.go b/camel/source/pkg/reconciler/testing/camelsource.go deleted file mode 100644 index 01338d89fa..0000000000 --- a/camel/source/pkg/reconciler/testing/camelsource.go +++ /dev/null @@ -1,164 +0,0 @@ -/* -Copyright 2020 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. -*/ - -package testing - -import ( - "time" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "knative.dev/eventing-contrib/camel/source/pkg/apis/sources/v1alpha1" -) - -// CamelSourceOption enables further configuration of a CamelSource. -type CamelSourceOption func(*v1alpha1.CamelSource) - -// NewCamelSource creates an CamelSource with CamelSourceOptions. -func NewCamelSource(name, namespace string, generation int64, ncopt ...CamelSourceOption) *v1alpha1.CamelSource { - nc := &v1alpha1.CamelSource{ - ObjectMeta: metav1.ObjectMeta{ - Name: name, - Namespace: namespace, - Generation: generation, - UID: "abc-123", - }, - Spec: v1alpha1.CamelSourceSpec{}, - } - for _, opt := range ncopt { - opt(nc) - } - return nc -} - -func WithInitCamelSource(nc *v1alpha1.CamelSource) { - nc.Status.InitializeConditions() - nc.Status.ObservedGeneration = nc.Generation -} - -func WithCamelSourceDeleted(nc *v1alpha1.CamelSource) { - deleteTime := metav1.NewTime(time.Unix(1e9, 0)) - nc.ObjectMeta.SetDeletionTimestamp(&deleteTime) -} - -func WithCamelSourceSpec(spec v1alpha1.CamelSourceSpec) CamelSourceOption { - return func(nc *v1alpha1.CamelSource) { - nc.Spec = spec - } -} - -func WithCamelSourceSink(uri string) CamelSourceOption { - return func(nc *v1alpha1.CamelSource) { - nc.Status.MarkSink(uri) - } -} - -func WithCamelSourceSinkNotFound() CamelSourceOption { - return func(nc *v1alpha1.CamelSource) { - nc.Status.MarkNoSink("NotFound", "") - } -} - -func WithCamelSourceDeploying() CamelSourceOption { - return func(nc *v1alpha1.CamelSource) { - nc.Status.MarkDeploying("Deploying", "Created integration test-camel-source-*") - } -} - -func WithCamelSourceIntegrationUpdated() CamelSourceOption { - return func(nc *v1alpha1.CamelSource) { - nc.Status.MarkDeploying("IntegrationUpdated", "Updated integration test-camel-source-*") - } -} - -func WithCamelSourceDeployed() CamelSourceOption { - return func(nc *v1alpha1.CamelSource) { - nc.Status.MarkDeployed() - } -} - -// TODO: -// -// -//func WithCamelSourceConfigReady() CamelSourceOption { -// return func(nc *v1alpha1.CamelSource) { -// nc.Status.MarkConfigTrue() -// } -//} -// -//func WithCamelSourceDeploymentNotReady(reason, message string) CamelSourceOption { -// return func(nc *v1alpha1.CamelSource) { -// nc.Status.MarkDispatcherFailed(reason, message) -// } -//} -// -//func WithCamelSourceDeploymentReady() CamelSourceOption { -// return func(nc *v1alpha1.CamelSource) { -// nc.Status.PropagateDispatcherStatus(&appsv1.DeploymentStatus{Conditions: []appsv1.DeploymentCondition{{Type: appsv1.DeploymentAvailable, Status: corev1.ConditionTrue}}}) -// } -//} -// -//func WithCamelSourceServicetNotReady(reason, message string) CamelSourceOption { -// return func(nc *v1alpha1.CamelSource) { -// nc.Status.MarkServiceFailed(reason, message) -// } -//} -// -//func WithCamelSourceServiceReady() CamelSourceOption { -// return func(nc *v1alpha1.CamelSource) { -// nc.Status.MarkServiceTrue() -// } -//} -// -//func WithCamelSourceChannelServicetNotReady(reason, message string) CamelSourceOption { -// return func(nc *v1alpha1.CamelSource) { -// nc.Status.MarkChannelServiceFailed(reason, message) -// } -//} -// -//func WithCamelSourceChannelServiceReady() CamelSourceOption { -// return func(nc *v1alpha1.CamelSource) { -// nc.Status.MarkChannelServiceTrue() -// } -//} -// -//func WithCamelSourceEndpointsNotReady(reason, message string) CamelSourceOption { -// return func(nc *v1alpha1.CamelSource) { -// nc.Status.MarkEndpointsFailed(reason, message) -// } -//} -// -//func WithCamelSourceEndpointsReady() CamelSourceOption { -// return func(nc *v1alpha1.CamelSource) { -// nc.Status.MarkEndpointsTrue() -// } -//} -// -//func WithCamelSourceAddress(a string) CamelSourceOption { -// return func(nc *v1alpha1.CamelSource) { -// nc.Status.SetAddress(&apis.URL{ -// Scheme: "http", -// Host: a, -// }) -// } -//} -// -//func WithKafkaFinalizer(finalizerName string) CamelSourceOption { -// return func(nc *v1alpha1.CamelSource) { -// finalizers := sets.NewString(nc.Finalizers...) -// finalizers.Insert(finalizerName) -// nc.SetFinalizers(finalizers.List()) -// } -//} diff --git a/camel/source/pkg/reconciler/testing/factory.go b/camel/source/pkg/reconciler/testing/factory.go deleted file mode 100644 index 3df59e9ba9..0000000000 --- a/camel/source/pkg/reconciler/testing/factory.go +++ /dev/null @@ -1,96 +0,0 @@ -/* -Copyright 2020 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. -*/ - -package testing - -import ( - "context" - "testing" - - "go.uber.org/zap" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/types" - clientgotesting "k8s.io/client-go/testing" - "k8s.io/client-go/tools/record" - fakecamelkclient "knative.dev/eventing-contrib/camel/source/pkg/camel-k/injection/client/fake" - fakesourceclient "knative.dev/eventing-contrib/camel/source/pkg/client/injection/client/fake" - "knative.dev/pkg/configmap" - "knative.dev/pkg/controller" - fakedynamicclient "knative.dev/pkg/injection/clients/dynamicclient/fake" - "knative.dev/pkg/logging" - "knative.dev/pkg/reconciler" - - . "knative.dev/pkg/reconciler/testing" -) - -const ( - // maxEventBufferSize is the estimated max number of event notifications that - // can be buffered during reconciliation. - maxEventBufferSize = 10 -) - -// Ctor functions create a k8s controller with given params. -type Ctor func(context.Context, *Listers, configmap.Watcher) controller.Reconciler - -// MakeFactory creates a reconciler factory with fake clients and controller created by `ctor`. -func MakeFactory(ctor Ctor, logger *zap.Logger) Factory { - return func(t *testing.T, r *TableRow) (controller.Reconciler, ActionRecorderList, EventList) { - ls := NewListers(r.Objects) - - ctx := context.Background() - ctx = logging.WithLogger(ctx, logger.Sugar()) - - ctx, camelClient := fakecamelkclient.With(ctx, ls.GetCamelkObjects()...) - ctx, sourceClient := fakesourceclient.With(ctx, ls.GetSourceObjects()...) - - dynamicScheme := runtime.NewScheme() - for _, addTo := range clientSetSchemes { - addTo(dynamicScheme) - } - - ctx, dynamicClient := fakedynamicclient.With(ctx, dynamicScheme, ls.GetAllObjects()...) - - eventRecorder := record.NewFakeRecorder(maxEventBufferSize) - ctx = controller.WithEventRecorder(ctx, eventRecorder) - - // Set up our Controller from the fakes. - c := ctor(ctx, &ls, configmap.NewStaticWatcher()) - - // The Reconciler won't do any work until it becomes the leader. - if la, ok := c.(reconciler.LeaderAware); ok { - la.Promote(reconciler.UniversalBucket(), func(reconciler.Bucket, types.NamespacedName) {}) - } - - for _, reactor := range r.WithReactors { - camelClient.PrependReactor("*", "*", reactor) - sourceClient.PrependReactor("*", "*", reactor) - dynamicClient.PrependReactor("*", "*", reactor) - } - - // Validate all Create operations through the eventing client. - sourceClient.PrependReactor("create", "*", func(action clientgotesting.Action) (handled bool, ret runtime.Object, err error) { - return ValidateCreates(context.Background(), action) - }) - sourceClient.PrependReactor("update", "*", func(action clientgotesting.Action) (handled bool, ret runtime.Object, err error) { - return ValidateUpdates(context.Background(), action) - }) - - actionRecorderList := ActionRecorderList{camelClient, sourceClient, dynamicClient} - eventList := EventList{Recorder: eventRecorder} - - return c, actionRecorderList, eventList - } -} diff --git a/camel/source/pkg/reconciler/testing/integration.go b/camel/source/pkg/reconciler/testing/integration.go deleted file mode 100644 index 2456bcbcec..0000000000 --- a/camel/source/pkg/reconciler/testing/integration.go +++ /dev/null @@ -1,49 +0,0 @@ -/* -Copyright 2020 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. -*/ - -package testing - -import ( - v1 "github.com/apache/camel-k/pkg/apis/camel/v1" - "knative.dev/eventing-contrib/camel/source/pkg/apis/sources/v1alpha1" - "knative.dev/eventing-contrib/camel/source/pkg/reconciler/resources" -) - -// CamelkIntegrationOption enables further configuration of a Integration. -type CamelkIntegrationOption func(*v1.Integration) - -// NewIntegration creates an CamelSource with CamelkIntegrationOption. -func NewIntegration(name, namespace string, src *v1alpha1.CamelSource, ncopt ...CamelkIntegrationOption) *v1.Integration { - i, _ := resources.MakeIntegration(&resources.CamelArguments{ - Name: name, - Namespace: namespace, - Owner: src, - Source: src.Spec.Source, - SinkURL: src.Status.SinkURI, - //Overrides: nil, ??? - }) - - for _, opt := range ncopt { - opt(i) - } - return i -} - -func WithIntegrationStatus(status v1.IntegrationStatus) CamelkIntegrationOption { - return func(nc *v1.Integration) { - nc.Status = status - } -} diff --git a/camel/source/pkg/reconciler/testing/listers.go b/camel/source/pkg/reconciler/testing/listers.go deleted file mode 100644 index f9a8835040..0000000000 --- a/camel/source/pkg/reconciler/testing/listers.go +++ /dev/null @@ -1,98 +0,0 @@ -/* -Copyright 2020 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. -*/ - -package testing - -import ( - camelv1 "github.com/apache/camel-k/pkg/apis/camel/v1" - "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" - fakekubeclientset "k8s.io/client-go/kubernetes/fake" - "k8s.io/client-go/tools/cache" - fakeeventingclientset "knative.dev/eventing/pkg/client/clientset/versioned/fake" - "knative.dev/pkg/reconciler/testing" - - fakecamelclientset "github.com/apache/camel-k/pkg/client/camel/clientset/versioned/fake" - camellisters "github.com/apache/camel-k/pkg/client/camel/listers/camel/v1" - sourcesv1alpha1 "knative.dev/eventing-contrib/camel/source/pkg/apis/sources/v1alpha1" - fakesourcesclientset "knative.dev/eventing-contrib/camel/source/pkg/client/clientset/versioned/fake" - sourceslisters "knative.dev/eventing-contrib/camel/source/pkg/client/listers/sources/v1alpha1" -) - -var addressableAddToScheme = func(scheme *runtime.Scheme) error { - scheme.AddKnownTypeWithName(schema.GroupVersionKind{Group: "duck.knative.dev", Version: "v1", Kind: "Addressable"}, &unstructured.Unstructured{}) - return nil -} - -var clientSetSchemes = []func(*runtime.Scheme) error{ - fakekubeclientset.AddToScheme, - fakesourcesclientset.AddToScheme, - fakecamelclientset.AddToScheme, - fakeeventingclientset.AddToScheme, - addressableAddToScheme, -} - -type Listers struct { - sorter testing.ObjectSorter -} - -func NewListers(objs []runtime.Object) Listers { - scheme := runtime.NewScheme() - - for _, addTo := range clientSetSchemes { - addTo(scheme) - } - - ls := Listers{ - sorter: testing.NewObjectSorter(scheme), - } - - ls.sorter.AddObjects(objs...) - - return ls -} - -func (l *Listers) indexerFor(obj runtime.Object) cache.Indexer { - return l.sorter.IndexerForObjectType(obj) -} - -func (l *Listers) GetCamelkObjects() []runtime.Object { - return l.sorter.ObjectsForSchemeFunc(fakecamelclientset.AddToScheme) -} - -func (l *Listers) GetSourceObjects() []runtime.Object { - return l.sorter.ObjectsForSchemeFunc(fakesourcesclientset.AddToScheme) -} - -func (l *Listers) GetAddressableObjects() []runtime.Object { - return l.sorter.ObjectsForSchemeFunc(addressableAddToScheme) -} - -func (l *Listers) GetAllObjects() []runtime.Object { - all := l.GetSourceObjects() - all = append(all, l.GetAddressableObjects()...) - all = append(all, l.GetCamelkObjects()...) - return all -} - -func (l *Listers) GetCamelSourcesLister() sourceslisters.CamelSourceLister { - return sourceslisters.NewCamelSourceLister(l.indexerFor(&sourcesv1alpha1.CamelSource{})) -} - -func (l *Listers) GetCamelkIntegrationLister() camellisters.IntegrationLister { - return camellisters.NewIntegrationLister(l.indexerFor(&camelv1.Integration{})) -} diff --git a/camel/source/samples/README.md b/camel/source/samples/README.md deleted file mode 100644 index ef3949f511..0000000000 --- a/camel/source/samples/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Camel Source - -Samples and instructions have been moved to -[CamelSource section of the Knative docs](https://knative.dev/docs/eventing/samples/apache-camel-source/). diff --git a/camel/source/samples/camel_source_hello_world.yaml b/camel/source/samples/camel_source_hello_world.yaml deleted file mode 100644 index 91651b9ed0..0000000000 --- a/camel/source/samples/camel_source_hello_world.yaml +++ /dev/null @@ -1,29 +0,0 @@ -# Apache Camel Source "Hello World" -# -# Full documentation and other examples at: https://knative.dev/docs/eventing/samples/apache-camel-source/ -# -apiVersion: sources.knative.dev/v1alpha1 -kind: CamelSource -metadata: - name: camel-timer-source -spec: - source: - flow: - from: - uri: timer:tick - parameters: - period: 3000 - steps: - - set-header: - name: Content-Type - constant: text/plain - - set-body: - constant: Hello world! - ceOverrides: - extensions: - kind: hello-world - sink: - ref: - apiVersion: messaging.knative.dev/v1beta1 - kind: InMemoryChannel - name: camel-test diff --git a/couchdb/source/pkg/client/clientset/versioned/clientset.go b/couchdb/source/pkg/client/clientset/versioned/clientset.go index 7daebd2ba5..401a53e4b1 100644 --- a/couchdb/source/pkg/client/clientset/versioned/clientset.go +++ b/couchdb/source/pkg/client/clientset/versioned/clientset.go @@ -59,7 +59,7 @@ func NewForConfig(c *rest.Config) (*Clientset, error) { configShallowCopy := *c if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 { if configShallowCopy.Burst <= 0 { - return nil, fmt.Errorf("Burst is required to be greater than 0 when RateLimiter is not set and QPS is set to greater than 0") + return nil, fmt.Errorf("burst is required to be greater than 0 when RateLimiter is not set and QPS is set to greater than 0") } configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst) } diff --git a/couchdb/source/pkg/client/clientset/versioned/typed/sources/v1alpha1/couchdbsource.go b/couchdb/source/pkg/client/clientset/versioned/typed/sources/v1alpha1/couchdbsource.go index 90edbf2a08..d92de0a2b9 100644 --- a/couchdb/source/pkg/client/clientset/versioned/typed/sources/v1alpha1/couchdbsource.go +++ b/couchdb/source/pkg/client/clientset/versioned/typed/sources/v1alpha1/couchdbsource.go @@ -19,6 +19,7 @@ limitations under the License. package v1alpha1 import ( + "context" "time" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -37,15 +38,15 @@ type CouchDbSourcesGetter interface { // CouchDbSourceInterface has methods to work with CouchDbSource resources. type CouchDbSourceInterface interface { - Create(*v1alpha1.CouchDbSource) (*v1alpha1.CouchDbSource, error) - Update(*v1alpha1.CouchDbSource) (*v1alpha1.CouchDbSource, error) - UpdateStatus(*v1alpha1.CouchDbSource) (*v1alpha1.CouchDbSource, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*v1alpha1.CouchDbSource, error) - List(opts v1.ListOptions) (*v1alpha1.CouchDbSourceList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.CouchDbSource, err error) + Create(ctx context.Context, couchDbSource *v1alpha1.CouchDbSource, opts v1.CreateOptions) (*v1alpha1.CouchDbSource, error) + Update(ctx context.Context, couchDbSource *v1alpha1.CouchDbSource, opts v1.UpdateOptions) (*v1alpha1.CouchDbSource, error) + UpdateStatus(ctx context.Context, couchDbSource *v1alpha1.CouchDbSource, opts v1.UpdateOptions) (*v1alpha1.CouchDbSource, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.CouchDbSource, error) + List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.CouchDbSourceList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.CouchDbSource, err error) CouchDbSourceExpansion } @@ -64,20 +65,20 @@ func newCouchDbSources(c *SourcesV1alpha1Client, namespace string) *couchDbSourc } // Get takes name of the couchDbSource, and returns the corresponding couchDbSource object, and an error if there is any. -func (c *couchDbSources) Get(name string, options v1.GetOptions) (result *v1alpha1.CouchDbSource, err error) { +func (c *couchDbSources) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.CouchDbSource, err error) { result = &v1alpha1.CouchDbSource{} err = c.client.Get(). Namespace(c.ns). Resource("couchdbsources"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of CouchDbSources that match those selectors. -func (c *couchDbSources) List(opts v1.ListOptions) (result *v1alpha1.CouchDbSourceList, err error) { +func (c *couchDbSources) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.CouchDbSourceList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -88,13 +89,13 @@ func (c *couchDbSources) List(opts v1.ListOptions) (result *v1alpha1.CouchDbSour Resource("couchdbsources"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested couchDbSources. -func (c *couchDbSources) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *couchDbSources) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -105,87 +106,90 @@ func (c *couchDbSources) Watch(opts v1.ListOptions) (watch.Interface, error) { Resource("couchdbsources"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a couchDbSource and creates it. Returns the server's representation of the couchDbSource, and an error, if there is any. -func (c *couchDbSources) Create(couchDbSource *v1alpha1.CouchDbSource) (result *v1alpha1.CouchDbSource, err error) { +func (c *couchDbSources) Create(ctx context.Context, couchDbSource *v1alpha1.CouchDbSource, opts v1.CreateOptions) (result *v1alpha1.CouchDbSource, err error) { result = &v1alpha1.CouchDbSource{} err = c.client.Post(). Namespace(c.ns). Resource("couchdbsources"). + VersionedParams(&opts, scheme.ParameterCodec). Body(couchDbSource). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a couchDbSource and updates it. Returns the server's representation of the couchDbSource, and an error, if there is any. -func (c *couchDbSources) Update(couchDbSource *v1alpha1.CouchDbSource) (result *v1alpha1.CouchDbSource, err error) { +func (c *couchDbSources) Update(ctx context.Context, couchDbSource *v1alpha1.CouchDbSource, opts v1.UpdateOptions) (result *v1alpha1.CouchDbSource, err error) { result = &v1alpha1.CouchDbSource{} err = c.client.Put(). Namespace(c.ns). Resource("couchdbsources"). Name(couchDbSource.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(couchDbSource). - Do(). + Do(ctx). Into(result) return } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *couchDbSources) UpdateStatus(couchDbSource *v1alpha1.CouchDbSource) (result *v1alpha1.CouchDbSource, err error) { +func (c *couchDbSources) UpdateStatus(ctx context.Context, couchDbSource *v1alpha1.CouchDbSource, opts v1.UpdateOptions) (result *v1alpha1.CouchDbSource, err error) { result = &v1alpha1.CouchDbSource{} err = c.client.Put(). Namespace(c.ns). Resource("couchdbsources"). Name(couchDbSource.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(couchDbSource). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the couchDbSource and deletes it. Returns an error if one occurs. -func (c *couchDbSources) Delete(name string, options *v1.DeleteOptions) error { +func (c *couchDbSources) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("couchdbsources"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *couchDbSources) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *couchDbSources) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Namespace(c.ns). Resource("couchdbsources"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched couchDbSource. -func (c *couchDbSources) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.CouchDbSource, err error) { +func (c *couchDbSources) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.CouchDbSource, err error) { result = &v1alpha1.CouchDbSource{} err = c.client.Patch(pt). Namespace(c.ns). Resource("couchdbsources"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/couchdb/source/pkg/client/clientset/versioned/typed/sources/v1alpha1/fake/fake_couchdbsource.go b/couchdb/source/pkg/client/clientset/versioned/typed/sources/v1alpha1/fake/fake_couchdbsource.go index b7b2979fd9..bf58940808 100644 --- a/couchdb/source/pkg/client/clientset/versioned/typed/sources/v1alpha1/fake/fake_couchdbsource.go +++ b/couchdb/source/pkg/client/clientset/versioned/typed/sources/v1alpha1/fake/fake_couchdbsource.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -39,7 +41,7 @@ var couchdbsourcesResource = schema.GroupVersionResource{Group: "sources.knative var couchdbsourcesKind = schema.GroupVersionKind{Group: "sources.knative.dev", Version: "v1alpha1", Kind: "CouchDbSource"} // Get takes name of the couchDbSource, and returns the corresponding couchDbSource object, and an error if there is any. -func (c *FakeCouchDbSources) Get(name string, options v1.GetOptions) (result *v1alpha1.CouchDbSource, err error) { +func (c *FakeCouchDbSources) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.CouchDbSource, err error) { obj, err := c.Fake. Invokes(testing.NewGetAction(couchdbsourcesResource, c.ns, name), &v1alpha1.CouchDbSource{}) @@ -50,7 +52,7 @@ func (c *FakeCouchDbSources) Get(name string, options v1.GetOptions) (result *v1 } // List takes label and field selectors, and returns the list of CouchDbSources that match those selectors. -func (c *FakeCouchDbSources) List(opts v1.ListOptions) (result *v1alpha1.CouchDbSourceList, err error) { +func (c *FakeCouchDbSources) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.CouchDbSourceList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(couchdbsourcesResource, couchdbsourcesKind, c.ns, opts), &v1alpha1.CouchDbSourceList{}) @@ -72,14 +74,14 @@ func (c *FakeCouchDbSources) List(opts v1.ListOptions) (result *v1alpha1.CouchDb } // Watch returns a watch.Interface that watches the requested couchDbSources. -func (c *FakeCouchDbSources) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeCouchDbSources) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(couchdbsourcesResource, c.ns, opts)) } // Create takes the representation of a couchDbSource and creates it. Returns the server's representation of the couchDbSource, and an error, if there is any. -func (c *FakeCouchDbSources) Create(couchDbSource *v1alpha1.CouchDbSource) (result *v1alpha1.CouchDbSource, err error) { +func (c *FakeCouchDbSources) Create(ctx context.Context, couchDbSource *v1alpha1.CouchDbSource, opts v1.CreateOptions) (result *v1alpha1.CouchDbSource, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(couchdbsourcesResource, c.ns, couchDbSource), &v1alpha1.CouchDbSource{}) @@ -90,7 +92,7 @@ func (c *FakeCouchDbSources) Create(couchDbSource *v1alpha1.CouchDbSource) (resu } // Update takes the representation of a couchDbSource and updates it. Returns the server's representation of the couchDbSource, and an error, if there is any. -func (c *FakeCouchDbSources) Update(couchDbSource *v1alpha1.CouchDbSource) (result *v1alpha1.CouchDbSource, err error) { +func (c *FakeCouchDbSources) Update(ctx context.Context, couchDbSource *v1alpha1.CouchDbSource, opts v1.UpdateOptions) (result *v1alpha1.CouchDbSource, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(couchdbsourcesResource, c.ns, couchDbSource), &v1alpha1.CouchDbSource{}) @@ -102,7 +104,7 @@ func (c *FakeCouchDbSources) Update(couchDbSource *v1alpha1.CouchDbSource) (resu // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeCouchDbSources) UpdateStatus(couchDbSource *v1alpha1.CouchDbSource) (*v1alpha1.CouchDbSource, error) { +func (c *FakeCouchDbSources) UpdateStatus(ctx context.Context, couchDbSource *v1alpha1.CouchDbSource, opts v1.UpdateOptions) (*v1alpha1.CouchDbSource, error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(couchdbsourcesResource, "status", c.ns, couchDbSource), &v1alpha1.CouchDbSource{}) @@ -113,7 +115,7 @@ func (c *FakeCouchDbSources) UpdateStatus(couchDbSource *v1alpha1.CouchDbSource) } // Delete takes name of the couchDbSource and deletes it. Returns an error if one occurs. -func (c *FakeCouchDbSources) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeCouchDbSources) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewDeleteAction(couchdbsourcesResource, c.ns, name), &v1alpha1.CouchDbSource{}) @@ -121,15 +123,15 @@ func (c *FakeCouchDbSources) Delete(name string, options *v1.DeleteOptions) erro } // DeleteCollection deletes a collection of objects. -func (c *FakeCouchDbSources) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(couchdbsourcesResource, c.ns, listOptions) +func (c *FakeCouchDbSources) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(couchdbsourcesResource, c.ns, listOpts) _, err := c.Fake.Invokes(action, &v1alpha1.CouchDbSourceList{}) return err } // Patch applies the patch and returns the patched couchDbSource. -func (c *FakeCouchDbSources) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.CouchDbSource, err error) { +func (c *FakeCouchDbSources) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.CouchDbSource, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(couchdbsourcesResource, c.ns, name, pt, data, subresources...), &v1alpha1.CouchDbSource{}) diff --git a/couchdb/source/pkg/client/informers/externalversions/sources/v1alpha1/couchdbsource.go b/couchdb/source/pkg/client/informers/externalversions/sources/v1alpha1/couchdbsource.go index 34dcb9e4bf..b6545d5664 100644 --- a/couchdb/source/pkg/client/informers/externalversions/sources/v1alpha1/couchdbsource.go +++ b/couchdb/source/pkg/client/informers/externalversions/sources/v1alpha1/couchdbsource.go @@ -19,6 +19,7 @@ limitations under the License. package v1alpha1 import ( + "context" time "time" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -61,13 +62,13 @@ func NewFilteredCouchDbSourceInformer(client versioned.Interface, namespace stri if tweakListOptions != nil { tweakListOptions(&options) } - return client.SourcesV1alpha1().CouchDbSources(namespace).List(options) + return client.SourcesV1alpha1().CouchDbSources(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.SourcesV1alpha1().CouchDbSources(namespace).Watch(options) + return client.SourcesV1alpha1().CouchDbSources(namespace).Watch(context.TODO(), options) }, }, &sourcesv1alpha1.CouchDbSource{}, diff --git a/couchdb/source/pkg/client/injection/reconciler/sources/v1alpha1/couchdbsource/reconciler.go b/couchdb/source/pkg/client/injection/reconciler/sources/v1alpha1/couchdbsource/reconciler.go index eb2ddb7c64..c5727715d0 100644 --- a/couchdb/source/pkg/client/injection/reconciler/sources/v1alpha1/couchdbsource/reconciler.go +++ b/couchdb/source/pkg/client/injection/reconciler/sources/v1alpha1/couchdbsource/reconciler.go @@ -315,7 +315,7 @@ func (r *reconcilerImpl) updateStatus(ctx context.Context, existing *v1alpha1.Co getter := r.Client.SourcesV1alpha1().CouchDbSources(desired.Namespace) - existing, err = getter.Get(desired.Name, metav1.GetOptions{}) + existing, err = getter.Get(ctx, desired.Name, metav1.GetOptions{}) if err != nil { return err } @@ -334,7 +334,7 @@ func (r *reconcilerImpl) updateStatus(ctx context.Context, existing *v1alpha1.Co updater := r.Client.SourcesV1alpha1().CouchDbSources(existing.Namespace) - _, err = updater.UpdateStatus(existing) + _, err = updater.UpdateStatus(ctx, existing, metav1.UpdateOptions{}) return err }) } @@ -392,7 +392,7 @@ func (r *reconcilerImpl) updateFinalizersFiltered(ctx context.Context, resource patcher := r.Client.SourcesV1alpha1().CouchDbSources(resource.Namespace) resourceName := resource.Name - resource, err = patcher.Patch(resourceName, types.MergePatchType, patch) + resource, err = patcher.Patch(ctx, resourceName, types.MergePatchType, patch, metav1.PatchOptions{}) if err != nil { r.Recorder.Eventf(resource, v1.EventTypeWarning, "FinalizerUpdateFailed", "Failed to update finalizers for %q: %v", resourceName, err) diff --git a/couchdb/source/pkg/client/listers/v1alpha1/internalversion/couchdbsource.go b/couchdb/source/pkg/client/listers/v1alpha1/internalversion/couchdbsource.go new file mode 100644 index 0000000000..f87d4953d0 --- /dev/null +++ b/couchdb/source/pkg/client/listers/v1alpha1/internalversion/couchdbsource.go @@ -0,0 +1,94 @@ +/* +Copyright 2020 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 internalversion + +import ( + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/tools/cache" + v1alpha1 "knative.dev/eventing-contrib/couchdb/source/pkg/apis/sources/v1alpha1" +) + +// CouchDbSourceLister helps list CouchDbSources. +type CouchDbSourceLister interface { + // List lists all CouchDbSources in the indexer. + List(selector labels.Selector) (ret []*v1alpha1.CouchDbSource, err error) + // CouchDbSources returns an object that can list and get CouchDbSources. + CouchDbSources(namespace string) CouchDbSourceNamespaceLister + CouchDbSourceListerExpansion +} + +// couchDbSourceLister implements the CouchDbSourceLister interface. +type couchDbSourceLister struct { + indexer cache.Indexer +} + +// NewCouchDbSourceLister returns a new CouchDbSourceLister. +func NewCouchDbSourceLister(indexer cache.Indexer) CouchDbSourceLister { + return &couchDbSourceLister{indexer: indexer} +} + +// List lists all CouchDbSources in the indexer. +func (s *couchDbSourceLister) List(selector labels.Selector) (ret []*v1alpha1.CouchDbSource, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1alpha1.CouchDbSource)) + }) + return ret, err +} + +// CouchDbSources returns an object that can list and get CouchDbSources. +func (s *couchDbSourceLister) CouchDbSources(namespace string) CouchDbSourceNamespaceLister { + return couchDbSourceNamespaceLister{indexer: s.indexer, namespace: namespace} +} + +// CouchDbSourceNamespaceLister helps list and get CouchDbSources. +type CouchDbSourceNamespaceLister interface { + // List lists all CouchDbSources in the indexer for a given namespace. + List(selector labels.Selector) (ret []*v1alpha1.CouchDbSource, err error) + // Get retrieves the CouchDbSource from the indexer for a given namespace and name. + Get(name string) (*v1alpha1.CouchDbSource, error) + CouchDbSourceNamespaceListerExpansion +} + +// couchDbSourceNamespaceLister implements the CouchDbSourceNamespaceLister +// interface. +type couchDbSourceNamespaceLister struct { + indexer cache.Indexer + namespace string +} + +// List lists all CouchDbSources in the indexer for a given namespace. +func (s couchDbSourceNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.CouchDbSource, err error) { + err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { + ret = append(ret, m.(*v1alpha1.CouchDbSource)) + }) + return ret, err +} + +// Get retrieves the CouchDbSource from the indexer for a given namespace and name. +func (s couchDbSourceNamespaceLister) Get(name string) (*v1alpha1.CouchDbSource, error) { + obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(v1alpha1.Resource("couchdbsource"), name) + } + return obj.(*v1alpha1.CouchDbSource), nil +} diff --git a/camel/source/pkg/client/listers/sources/v1alpha1/expansion_generated.go b/couchdb/source/pkg/client/listers/v1alpha1/internalversion/expansion_generated.go similarity index 65% rename from camel/source/pkg/client/listers/sources/v1alpha1/expansion_generated.go rename to couchdb/source/pkg/client/listers/v1alpha1/internalversion/expansion_generated.go index 01713298ec..6752f0b64b 100644 --- a/camel/source/pkg/client/listers/sources/v1alpha1/expansion_generated.go +++ b/couchdb/source/pkg/client/listers/v1alpha1/internalversion/expansion_generated.go @@ -16,12 +16,12 @@ limitations under the License. // Code generated by lister-gen. DO NOT EDIT. -package v1alpha1 +package internalversion -// CamelSourceListerExpansion allows custom methods to be added to -// CamelSourceLister. -type CamelSourceListerExpansion interface{} +// CouchDbSourceListerExpansion allows custom methods to be added to +// CouchDbSourceLister. +type CouchDbSourceListerExpansion interface{} -// CamelSourceNamespaceListerExpansion allows custom methods to be added to -// CamelSourceNamespaceLister. -type CamelSourceNamespaceListerExpansion interface{} +// CouchDbSourceNamespaceListerExpansion allows custom methods to be added to +// CouchDbSourceNamespaceLister. +type CouchDbSourceNamespaceListerExpansion interface{} diff --git a/couchdb/source/pkg/reconciler/couchdbsource.go b/couchdb/source/pkg/reconciler/couchdbsource.go index bce8e726ed..f36465e21a 100644 --- a/couchdb/source/pkg/reconciler/couchdbsource.go +++ b/couchdb/source/pkg/reconciler/couchdbsource.go @@ -87,7 +87,7 @@ func (r *Reconciler) ReconcileKind(ctx context.Context, source *v1alpha1.CouchDb } } - sinkURI, err := r.sinkResolver.URIFromDestinationV1(*dest, source) + sinkURI, err := r.sinkResolver.URIFromDestinationV1(ctx, *dest, source) if err != nil { source.Status.MarkNoSink("NotFound", "") return fmt.Errorf("getting sink URI: %v", err) @@ -129,9 +129,9 @@ func (r *Reconciler) createReceiveAdapter(ctx context.Context, src *v1alpha1.Cou } expected := resources.MakeReceiveAdapter(&adapterArgs) - ra, err := r.kubeClientSet.AppsV1().Deployments(src.Namespace).Get(expected.Name, metav1.GetOptions{}) + ra, err := r.kubeClientSet.AppsV1().Deployments(src.Namespace).Get(ctx, expected.Name, metav1.GetOptions{}) if apierrors.IsNotFound(err) { - ra, err = r.kubeClientSet.AppsV1().Deployments(src.Namespace).Create(expected) + ra, err = r.kubeClientSet.AppsV1().Deployments(src.Namespace).Create(ctx, expected, metav1.CreateOptions{}) controller.GetEventRecorder(ctx).Eventf(src, corev1.EventTypeNormal, couchdbsourceDeploymentCreated, "Deployment created, error: %v", err) return ra, err } else if err != nil { @@ -140,7 +140,7 @@ func (r *Reconciler) createReceiveAdapter(ctx context.Context, src *v1alpha1.Cou return nil, fmt.Errorf("deployment %q is not owned by CouchDbSource %q", ra.Name, src.Name) } else if r.podSpecChanged(ra.Spec.Template.Spec, expected.Spec.Template.Spec) { ra.Spec.Template.Spec = expected.Spec.Template.Spec - if ra, err = r.kubeClientSet.AppsV1().Deployments(src.Namespace).Update(ra); err != nil { + if ra, err = r.kubeClientSet.AppsV1().Deployments(src.Namespace).Update(ctx, ra, metav1.UpdateOptions{}); err != nil { return ra, err } controller.GetEventRecorder(ctx).Eventf(src, corev1.EventTypeNormal, couchdbsourceDeploymentUpdated, "Deployment updated") @@ -173,7 +173,7 @@ func (r *Reconciler) makeEventSource(ctx context.Context, src *v1alpha1.CouchDbS namespace = src.Namespace } - secret, err := r.kubeClientSet.CoreV1().Secrets(namespace).Get(src.Spec.CouchDbCredentials.Name, metav1.GetOptions{}) + secret, err := r.kubeClientSet.CoreV1().Secrets(namespace).Get(ctx, src.Spec.CouchDbCredentials.Name, metav1.GetOptions{}) if err != nil { logging.FromContext(ctx).Errorw("Unable to read CouchDB credentials secret", zap.Error(err)) return "", err diff --git a/github/pkg/client/clientset/versioned/clientset.go b/github/pkg/client/clientset/versioned/clientset.go index cd168f44fd..a8ee08ff24 100644 --- a/github/pkg/client/clientset/versioned/clientset.go +++ b/github/pkg/client/clientset/versioned/clientset.go @@ -67,7 +67,7 @@ func NewForConfig(c *rest.Config) (*Clientset, error) { configShallowCopy := *c if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 { if configShallowCopy.Burst <= 0 { - return nil, fmt.Errorf("Burst is required to be greater than 0 when RateLimiter is not set and QPS is set to greater than 0") + return nil, fmt.Errorf("burst is required to be greater than 0 when RateLimiter is not set and QPS is set to greater than 0") } configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst) } diff --git a/github/pkg/client/clientset/versioned/typed/bindings/v1alpha1/fake/fake_githubbinding.go b/github/pkg/client/clientset/versioned/typed/bindings/v1alpha1/fake/fake_githubbinding.go index 4267d8d4cc..58c4fecb90 100644 --- a/github/pkg/client/clientset/versioned/typed/bindings/v1alpha1/fake/fake_githubbinding.go +++ b/github/pkg/client/clientset/versioned/typed/bindings/v1alpha1/fake/fake_githubbinding.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -39,7 +41,7 @@ var githubbindingsResource = schema.GroupVersionResource{Group: "bindings.knativ var githubbindingsKind = schema.GroupVersionKind{Group: "bindings.knative.dev", Version: "v1alpha1", Kind: "GitHubBinding"} // Get takes name of the gitHubBinding, and returns the corresponding gitHubBinding object, and an error if there is any. -func (c *FakeGitHubBindings) Get(name string, options v1.GetOptions) (result *v1alpha1.GitHubBinding, err error) { +func (c *FakeGitHubBindings) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.GitHubBinding, err error) { obj, err := c.Fake. Invokes(testing.NewGetAction(githubbindingsResource, c.ns, name), &v1alpha1.GitHubBinding{}) @@ -50,7 +52,7 @@ func (c *FakeGitHubBindings) Get(name string, options v1.GetOptions) (result *v1 } // List takes label and field selectors, and returns the list of GitHubBindings that match those selectors. -func (c *FakeGitHubBindings) List(opts v1.ListOptions) (result *v1alpha1.GitHubBindingList, err error) { +func (c *FakeGitHubBindings) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.GitHubBindingList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(githubbindingsResource, githubbindingsKind, c.ns, opts), &v1alpha1.GitHubBindingList{}) @@ -72,14 +74,14 @@ func (c *FakeGitHubBindings) List(opts v1.ListOptions) (result *v1alpha1.GitHubB } // Watch returns a watch.Interface that watches the requested gitHubBindings. -func (c *FakeGitHubBindings) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeGitHubBindings) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(githubbindingsResource, c.ns, opts)) } // Create takes the representation of a gitHubBinding and creates it. Returns the server's representation of the gitHubBinding, and an error, if there is any. -func (c *FakeGitHubBindings) Create(gitHubBinding *v1alpha1.GitHubBinding) (result *v1alpha1.GitHubBinding, err error) { +func (c *FakeGitHubBindings) Create(ctx context.Context, gitHubBinding *v1alpha1.GitHubBinding, opts v1.CreateOptions) (result *v1alpha1.GitHubBinding, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(githubbindingsResource, c.ns, gitHubBinding), &v1alpha1.GitHubBinding{}) @@ -90,7 +92,7 @@ func (c *FakeGitHubBindings) Create(gitHubBinding *v1alpha1.GitHubBinding) (resu } // Update takes the representation of a gitHubBinding and updates it. Returns the server's representation of the gitHubBinding, and an error, if there is any. -func (c *FakeGitHubBindings) Update(gitHubBinding *v1alpha1.GitHubBinding) (result *v1alpha1.GitHubBinding, err error) { +func (c *FakeGitHubBindings) Update(ctx context.Context, gitHubBinding *v1alpha1.GitHubBinding, opts v1.UpdateOptions) (result *v1alpha1.GitHubBinding, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(githubbindingsResource, c.ns, gitHubBinding), &v1alpha1.GitHubBinding{}) @@ -102,7 +104,7 @@ func (c *FakeGitHubBindings) Update(gitHubBinding *v1alpha1.GitHubBinding) (resu // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeGitHubBindings) UpdateStatus(gitHubBinding *v1alpha1.GitHubBinding) (*v1alpha1.GitHubBinding, error) { +func (c *FakeGitHubBindings) UpdateStatus(ctx context.Context, gitHubBinding *v1alpha1.GitHubBinding, opts v1.UpdateOptions) (*v1alpha1.GitHubBinding, error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(githubbindingsResource, "status", c.ns, gitHubBinding), &v1alpha1.GitHubBinding{}) @@ -113,7 +115,7 @@ func (c *FakeGitHubBindings) UpdateStatus(gitHubBinding *v1alpha1.GitHubBinding) } // Delete takes name of the gitHubBinding and deletes it. Returns an error if one occurs. -func (c *FakeGitHubBindings) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeGitHubBindings) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewDeleteAction(githubbindingsResource, c.ns, name), &v1alpha1.GitHubBinding{}) @@ -121,15 +123,15 @@ func (c *FakeGitHubBindings) Delete(name string, options *v1.DeleteOptions) erro } // DeleteCollection deletes a collection of objects. -func (c *FakeGitHubBindings) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(githubbindingsResource, c.ns, listOptions) +func (c *FakeGitHubBindings) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(githubbindingsResource, c.ns, listOpts) _, err := c.Fake.Invokes(action, &v1alpha1.GitHubBindingList{}) return err } // Patch applies the patch and returns the patched gitHubBinding. -func (c *FakeGitHubBindings) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.GitHubBinding, err error) { +func (c *FakeGitHubBindings) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.GitHubBinding, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(githubbindingsResource, c.ns, name, pt, data, subresources...), &v1alpha1.GitHubBinding{}) diff --git a/github/pkg/client/clientset/versioned/typed/bindings/v1alpha1/githubbinding.go b/github/pkg/client/clientset/versioned/typed/bindings/v1alpha1/githubbinding.go index c834171fce..d17cd5774b 100644 --- a/github/pkg/client/clientset/versioned/typed/bindings/v1alpha1/githubbinding.go +++ b/github/pkg/client/clientset/versioned/typed/bindings/v1alpha1/githubbinding.go @@ -19,6 +19,7 @@ limitations under the License. package v1alpha1 import ( + "context" "time" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -37,15 +38,15 @@ type GitHubBindingsGetter interface { // GitHubBindingInterface has methods to work with GitHubBinding resources. type GitHubBindingInterface interface { - Create(*v1alpha1.GitHubBinding) (*v1alpha1.GitHubBinding, error) - Update(*v1alpha1.GitHubBinding) (*v1alpha1.GitHubBinding, error) - UpdateStatus(*v1alpha1.GitHubBinding) (*v1alpha1.GitHubBinding, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*v1alpha1.GitHubBinding, error) - List(opts v1.ListOptions) (*v1alpha1.GitHubBindingList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.GitHubBinding, err error) + Create(ctx context.Context, gitHubBinding *v1alpha1.GitHubBinding, opts v1.CreateOptions) (*v1alpha1.GitHubBinding, error) + Update(ctx context.Context, gitHubBinding *v1alpha1.GitHubBinding, opts v1.UpdateOptions) (*v1alpha1.GitHubBinding, error) + UpdateStatus(ctx context.Context, gitHubBinding *v1alpha1.GitHubBinding, opts v1.UpdateOptions) (*v1alpha1.GitHubBinding, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.GitHubBinding, error) + List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.GitHubBindingList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.GitHubBinding, err error) GitHubBindingExpansion } @@ -64,20 +65,20 @@ func newGitHubBindings(c *BindingsV1alpha1Client, namespace string) *gitHubBindi } // Get takes name of the gitHubBinding, and returns the corresponding gitHubBinding object, and an error if there is any. -func (c *gitHubBindings) Get(name string, options v1.GetOptions) (result *v1alpha1.GitHubBinding, err error) { +func (c *gitHubBindings) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.GitHubBinding, err error) { result = &v1alpha1.GitHubBinding{} err = c.client.Get(). Namespace(c.ns). Resource("githubbindings"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of GitHubBindings that match those selectors. -func (c *gitHubBindings) List(opts v1.ListOptions) (result *v1alpha1.GitHubBindingList, err error) { +func (c *gitHubBindings) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.GitHubBindingList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -88,13 +89,13 @@ func (c *gitHubBindings) List(opts v1.ListOptions) (result *v1alpha1.GitHubBindi Resource("githubbindings"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested gitHubBindings. -func (c *gitHubBindings) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *gitHubBindings) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -105,87 +106,90 @@ func (c *gitHubBindings) Watch(opts v1.ListOptions) (watch.Interface, error) { Resource("githubbindings"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a gitHubBinding and creates it. Returns the server's representation of the gitHubBinding, and an error, if there is any. -func (c *gitHubBindings) Create(gitHubBinding *v1alpha1.GitHubBinding) (result *v1alpha1.GitHubBinding, err error) { +func (c *gitHubBindings) Create(ctx context.Context, gitHubBinding *v1alpha1.GitHubBinding, opts v1.CreateOptions) (result *v1alpha1.GitHubBinding, err error) { result = &v1alpha1.GitHubBinding{} err = c.client.Post(). Namespace(c.ns). Resource("githubbindings"). + VersionedParams(&opts, scheme.ParameterCodec). Body(gitHubBinding). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a gitHubBinding and updates it. Returns the server's representation of the gitHubBinding, and an error, if there is any. -func (c *gitHubBindings) Update(gitHubBinding *v1alpha1.GitHubBinding) (result *v1alpha1.GitHubBinding, err error) { +func (c *gitHubBindings) Update(ctx context.Context, gitHubBinding *v1alpha1.GitHubBinding, opts v1.UpdateOptions) (result *v1alpha1.GitHubBinding, err error) { result = &v1alpha1.GitHubBinding{} err = c.client.Put(). Namespace(c.ns). Resource("githubbindings"). Name(gitHubBinding.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(gitHubBinding). - Do(). + Do(ctx). Into(result) return } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *gitHubBindings) UpdateStatus(gitHubBinding *v1alpha1.GitHubBinding) (result *v1alpha1.GitHubBinding, err error) { +func (c *gitHubBindings) UpdateStatus(ctx context.Context, gitHubBinding *v1alpha1.GitHubBinding, opts v1.UpdateOptions) (result *v1alpha1.GitHubBinding, err error) { result = &v1alpha1.GitHubBinding{} err = c.client.Put(). Namespace(c.ns). Resource("githubbindings"). Name(gitHubBinding.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(gitHubBinding). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the gitHubBinding and deletes it. Returns an error if one occurs. -func (c *gitHubBindings) Delete(name string, options *v1.DeleteOptions) error { +func (c *gitHubBindings) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("githubbindings"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *gitHubBindings) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *gitHubBindings) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Namespace(c.ns). Resource("githubbindings"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched gitHubBinding. -func (c *gitHubBindings) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.GitHubBinding, err error) { +func (c *gitHubBindings) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.GitHubBinding, err error) { result = &v1alpha1.GitHubBinding{} err = c.client.Patch(pt). Namespace(c.ns). Resource("githubbindings"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/github/pkg/client/clientset/versioned/typed/sources/v1alpha1/fake/fake_githubsource.go b/github/pkg/client/clientset/versioned/typed/sources/v1alpha1/fake/fake_githubsource.go index 3ce54b11b2..83f49642e6 100644 --- a/github/pkg/client/clientset/versioned/typed/sources/v1alpha1/fake/fake_githubsource.go +++ b/github/pkg/client/clientset/versioned/typed/sources/v1alpha1/fake/fake_githubsource.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -39,7 +41,7 @@ var githubsourcesResource = schema.GroupVersionResource{Group: "sources.knative. var githubsourcesKind = schema.GroupVersionKind{Group: "sources.knative.dev", Version: "v1alpha1", Kind: "GitHubSource"} // Get takes name of the gitHubSource, and returns the corresponding gitHubSource object, and an error if there is any. -func (c *FakeGitHubSources) Get(name string, options v1.GetOptions) (result *v1alpha1.GitHubSource, err error) { +func (c *FakeGitHubSources) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.GitHubSource, err error) { obj, err := c.Fake. Invokes(testing.NewGetAction(githubsourcesResource, c.ns, name), &v1alpha1.GitHubSource{}) @@ -50,7 +52,7 @@ func (c *FakeGitHubSources) Get(name string, options v1.GetOptions) (result *v1a } // List takes label and field selectors, and returns the list of GitHubSources that match those selectors. -func (c *FakeGitHubSources) List(opts v1.ListOptions) (result *v1alpha1.GitHubSourceList, err error) { +func (c *FakeGitHubSources) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.GitHubSourceList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(githubsourcesResource, githubsourcesKind, c.ns, opts), &v1alpha1.GitHubSourceList{}) @@ -72,14 +74,14 @@ func (c *FakeGitHubSources) List(opts v1.ListOptions) (result *v1alpha1.GitHubSo } // Watch returns a watch.Interface that watches the requested gitHubSources. -func (c *FakeGitHubSources) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeGitHubSources) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(githubsourcesResource, c.ns, opts)) } // Create takes the representation of a gitHubSource and creates it. Returns the server's representation of the gitHubSource, and an error, if there is any. -func (c *FakeGitHubSources) Create(gitHubSource *v1alpha1.GitHubSource) (result *v1alpha1.GitHubSource, err error) { +func (c *FakeGitHubSources) Create(ctx context.Context, gitHubSource *v1alpha1.GitHubSource, opts v1.CreateOptions) (result *v1alpha1.GitHubSource, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(githubsourcesResource, c.ns, gitHubSource), &v1alpha1.GitHubSource{}) @@ -90,7 +92,7 @@ func (c *FakeGitHubSources) Create(gitHubSource *v1alpha1.GitHubSource) (result } // Update takes the representation of a gitHubSource and updates it. Returns the server's representation of the gitHubSource, and an error, if there is any. -func (c *FakeGitHubSources) Update(gitHubSource *v1alpha1.GitHubSource) (result *v1alpha1.GitHubSource, err error) { +func (c *FakeGitHubSources) Update(ctx context.Context, gitHubSource *v1alpha1.GitHubSource, opts v1.UpdateOptions) (result *v1alpha1.GitHubSource, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(githubsourcesResource, c.ns, gitHubSource), &v1alpha1.GitHubSource{}) @@ -102,7 +104,7 @@ func (c *FakeGitHubSources) Update(gitHubSource *v1alpha1.GitHubSource) (result // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeGitHubSources) UpdateStatus(gitHubSource *v1alpha1.GitHubSource) (*v1alpha1.GitHubSource, error) { +func (c *FakeGitHubSources) UpdateStatus(ctx context.Context, gitHubSource *v1alpha1.GitHubSource, opts v1.UpdateOptions) (*v1alpha1.GitHubSource, error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(githubsourcesResource, "status", c.ns, gitHubSource), &v1alpha1.GitHubSource{}) @@ -113,7 +115,7 @@ func (c *FakeGitHubSources) UpdateStatus(gitHubSource *v1alpha1.GitHubSource) (* } // Delete takes name of the gitHubSource and deletes it. Returns an error if one occurs. -func (c *FakeGitHubSources) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeGitHubSources) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewDeleteAction(githubsourcesResource, c.ns, name), &v1alpha1.GitHubSource{}) @@ -121,15 +123,15 @@ func (c *FakeGitHubSources) Delete(name string, options *v1.DeleteOptions) error } // DeleteCollection deletes a collection of objects. -func (c *FakeGitHubSources) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(githubsourcesResource, c.ns, listOptions) +func (c *FakeGitHubSources) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(githubsourcesResource, c.ns, listOpts) _, err := c.Fake.Invokes(action, &v1alpha1.GitHubSourceList{}) return err } // Patch applies the patch and returns the patched gitHubSource. -func (c *FakeGitHubSources) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.GitHubSource, err error) { +func (c *FakeGitHubSources) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.GitHubSource, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(githubsourcesResource, c.ns, name, pt, data, subresources...), &v1alpha1.GitHubSource{}) diff --git a/github/pkg/client/clientset/versioned/typed/sources/v1alpha1/githubsource.go b/github/pkg/client/clientset/versioned/typed/sources/v1alpha1/githubsource.go index ef0bc233c2..6fea616a14 100644 --- a/github/pkg/client/clientset/versioned/typed/sources/v1alpha1/githubsource.go +++ b/github/pkg/client/clientset/versioned/typed/sources/v1alpha1/githubsource.go @@ -19,6 +19,7 @@ limitations under the License. package v1alpha1 import ( + "context" "time" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -37,15 +38,15 @@ type GitHubSourcesGetter interface { // GitHubSourceInterface has methods to work with GitHubSource resources. type GitHubSourceInterface interface { - Create(*v1alpha1.GitHubSource) (*v1alpha1.GitHubSource, error) - Update(*v1alpha1.GitHubSource) (*v1alpha1.GitHubSource, error) - UpdateStatus(*v1alpha1.GitHubSource) (*v1alpha1.GitHubSource, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*v1alpha1.GitHubSource, error) - List(opts v1.ListOptions) (*v1alpha1.GitHubSourceList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.GitHubSource, err error) + Create(ctx context.Context, gitHubSource *v1alpha1.GitHubSource, opts v1.CreateOptions) (*v1alpha1.GitHubSource, error) + Update(ctx context.Context, gitHubSource *v1alpha1.GitHubSource, opts v1.UpdateOptions) (*v1alpha1.GitHubSource, error) + UpdateStatus(ctx context.Context, gitHubSource *v1alpha1.GitHubSource, opts v1.UpdateOptions) (*v1alpha1.GitHubSource, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.GitHubSource, error) + List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.GitHubSourceList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.GitHubSource, err error) GitHubSourceExpansion } @@ -64,20 +65,20 @@ func newGitHubSources(c *SourcesV1alpha1Client, namespace string) *gitHubSources } // Get takes name of the gitHubSource, and returns the corresponding gitHubSource object, and an error if there is any. -func (c *gitHubSources) Get(name string, options v1.GetOptions) (result *v1alpha1.GitHubSource, err error) { +func (c *gitHubSources) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.GitHubSource, err error) { result = &v1alpha1.GitHubSource{} err = c.client.Get(). Namespace(c.ns). Resource("githubsources"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of GitHubSources that match those selectors. -func (c *gitHubSources) List(opts v1.ListOptions) (result *v1alpha1.GitHubSourceList, err error) { +func (c *gitHubSources) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.GitHubSourceList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -88,13 +89,13 @@ func (c *gitHubSources) List(opts v1.ListOptions) (result *v1alpha1.GitHubSource Resource("githubsources"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested gitHubSources. -func (c *gitHubSources) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *gitHubSources) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -105,87 +106,90 @@ func (c *gitHubSources) Watch(opts v1.ListOptions) (watch.Interface, error) { Resource("githubsources"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a gitHubSource and creates it. Returns the server's representation of the gitHubSource, and an error, if there is any. -func (c *gitHubSources) Create(gitHubSource *v1alpha1.GitHubSource) (result *v1alpha1.GitHubSource, err error) { +func (c *gitHubSources) Create(ctx context.Context, gitHubSource *v1alpha1.GitHubSource, opts v1.CreateOptions) (result *v1alpha1.GitHubSource, err error) { result = &v1alpha1.GitHubSource{} err = c.client.Post(). Namespace(c.ns). Resource("githubsources"). + VersionedParams(&opts, scheme.ParameterCodec). Body(gitHubSource). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a gitHubSource and updates it. Returns the server's representation of the gitHubSource, and an error, if there is any. -func (c *gitHubSources) Update(gitHubSource *v1alpha1.GitHubSource) (result *v1alpha1.GitHubSource, err error) { +func (c *gitHubSources) Update(ctx context.Context, gitHubSource *v1alpha1.GitHubSource, opts v1.UpdateOptions) (result *v1alpha1.GitHubSource, err error) { result = &v1alpha1.GitHubSource{} err = c.client.Put(). Namespace(c.ns). Resource("githubsources"). Name(gitHubSource.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(gitHubSource). - Do(). + Do(ctx). Into(result) return } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *gitHubSources) UpdateStatus(gitHubSource *v1alpha1.GitHubSource) (result *v1alpha1.GitHubSource, err error) { +func (c *gitHubSources) UpdateStatus(ctx context.Context, gitHubSource *v1alpha1.GitHubSource, opts v1.UpdateOptions) (result *v1alpha1.GitHubSource, err error) { result = &v1alpha1.GitHubSource{} err = c.client.Put(). Namespace(c.ns). Resource("githubsources"). Name(gitHubSource.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(gitHubSource). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the gitHubSource and deletes it. Returns an error if one occurs. -func (c *gitHubSources) Delete(name string, options *v1.DeleteOptions) error { +func (c *gitHubSources) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("githubsources"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *gitHubSources) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *gitHubSources) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Namespace(c.ns). Resource("githubsources"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched gitHubSource. -func (c *gitHubSources) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.GitHubSource, err error) { +func (c *gitHubSources) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.GitHubSource, err error) { result = &v1alpha1.GitHubSource{} err = c.client.Patch(pt). Namespace(c.ns). Resource("githubsources"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/github/pkg/client/informers/externalversions/bindings/v1alpha1/githubbinding.go b/github/pkg/client/informers/externalversions/bindings/v1alpha1/githubbinding.go index 3f310387ec..b1112489d0 100644 --- a/github/pkg/client/informers/externalversions/bindings/v1alpha1/githubbinding.go +++ b/github/pkg/client/informers/externalversions/bindings/v1alpha1/githubbinding.go @@ -19,6 +19,7 @@ limitations under the License. package v1alpha1 import ( + "context" time "time" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -61,13 +62,13 @@ func NewFilteredGitHubBindingInformer(client versioned.Interface, namespace stri if tweakListOptions != nil { tweakListOptions(&options) } - return client.BindingsV1alpha1().GitHubBindings(namespace).List(options) + return client.BindingsV1alpha1().GitHubBindings(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.BindingsV1alpha1().GitHubBindings(namespace).Watch(options) + return client.BindingsV1alpha1().GitHubBindings(namespace).Watch(context.TODO(), options) }, }, &bindingsv1alpha1.GitHubBinding{}, diff --git a/github/pkg/client/informers/externalversions/sources/v1alpha1/githubsource.go b/github/pkg/client/informers/externalversions/sources/v1alpha1/githubsource.go index e32dd640f1..5e936597df 100644 --- a/github/pkg/client/informers/externalversions/sources/v1alpha1/githubsource.go +++ b/github/pkg/client/informers/externalversions/sources/v1alpha1/githubsource.go @@ -19,6 +19,7 @@ limitations under the License. package v1alpha1 import ( + "context" time "time" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -61,13 +62,13 @@ func NewFilteredGitHubSourceInformer(client versioned.Interface, namespace strin if tweakListOptions != nil { tweakListOptions(&options) } - return client.SourcesV1alpha1().GitHubSources(namespace).List(options) + return client.SourcesV1alpha1().GitHubSources(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.SourcesV1alpha1().GitHubSources(namespace).Watch(options) + return client.SourcesV1alpha1().GitHubSources(namespace).Watch(context.TODO(), options) }, }, &sourcesv1alpha1.GitHubSource{}, diff --git a/github/pkg/client/injection/reconciler/sources/v1alpha1/githubsource/reconciler.go b/github/pkg/client/injection/reconciler/sources/v1alpha1/githubsource/reconciler.go index e4760b2cd4..5e8f93b431 100644 --- a/github/pkg/client/injection/reconciler/sources/v1alpha1/githubsource/reconciler.go +++ b/github/pkg/client/injection/reconciler/sources/v1alpha1/githubsource/reconciler.go @@ -315,7 +315,7 @@ func (r *reconcilerImpl) updateStatus(ctx context.Context, existing *v1alpha1.Gi getter := r.Client.SourcesV1alpha1().GitHubSources(desired.Namespace) - existing, err = getter.Get(desired.Name, metav1.GetOptions{}) + existing, err = getter.Get(ctx, desired.Name, metav1.GetOptions{}) if err != nil { return err } @@ -334,7 +334,7 @@ func (r *reconcilerImpl) updateStatus(ctx context.Context, existing *v1alpha1.Gi updater := r.Client.SourcesV1alpha1().GitHubSources(existing.Namespace) - _, err = updater.UpdateStatus(existing) + _, err = updater.UpdateStatus(ctx, existing, metav1.UpdateOptions{}) return err }) } @@ -392,7 +392,7 @@ func (r *reconcilerImpl) updateFinalizersFiltered(ctx context.Context, resource patcher := r.Client.SourcesV1alpha1().GitHubSources(resource.Namespace) resourceName := resource.Name - resource, err = patcher.Patch(resourceName, types.MergePatchType, patch) + resource, err = patcher.Patch(ctx, resourceName, types.MergePatchType, patch, metav1.PatchOptions{}) if err != nil { r.Recorder.Eventf(resource, v1.EventTypeWarning, "FinalizerUpdateFailed", "Failed to update finalizers for %q: %v", resourceName, err) diff --git a/github/pkg/common/secret.go b/github/pkg/common/secret.go index 6c89bca4a3..76ade5a4dd 100644 --- a/github/pkg/common/secret.go +++ b/github/pkg/common/secret.go @@ -17,6 +17,7 @@ limitations under the License. package common import ( + "context" "errors" "fmt" @@ -25,12 +26,12 @@ import ( "k8s.io/client-go/kubernetes" ) -func SecretFrom(kubeClientSet kubernetes.Interface, namespace string, secretKeySelector *corev1.SecretKeySelector) (string, error) { +func SecretFrom(ctx context.Context, kubeClientSet kubernetes.Interface, namespace string, secretKeySelector *corev1.SecretKeySelector) (string, error) { if secretKeySelector == nil { return "", errors.New("missing secret key selector") } - secret, err := kubeClientSet.CoreV1().Secrets(namespace).Get(secretKeySelector.Name, metav1.GetOptions{}) + secret, err := kubeClientSet.CoreV1().Secrets(namespace).Get(ctx, secretKeySelector.Name, metav1.GetOptions{}) if err != nil { return "", err } diff --git a/github/pkg/mtadapter/githubsource.go b/github/pkg/mtadapter/githubsource.go index 9b193cc557..fa9de8693a 100644 --- a/github/pkg/mtadapter/githubsource.go +++ b/github/pkg/mtadapter/githubsource.go @@ -55,7 +55,7 @@ func (r *Reconciler) ReconcileKind(ctx context.Context, source *v1alpha1.GitHubS } func (r *Reconciler) reconcile(ctx context.Context, source *v1alpha1.GitHubSource) error { - secretToken, err := common.SecretFrom(r.kubeClientSet, source.Namespace, source.Spec.SecretToken.SecretKeyRef) + secretToken, err := common.SecretFrom(ctx, r.kubeClientSet, source.Namespace, source.Spec.SecretToken.SecretKeyRef) if err != nil { return err } diff --git a/github/pkg/reconciler/source/githubsource.go b/github/pkg/reconciler/source/githubsource.go index bfd4d13731..f80af34a8b 100644 --- a/github/pkg/reconciler/source/githubsource.go +++ b/github/pkg/reconciler/source/githubsource.go @@ -114,7 +114,7 @@ func (r *Reconciler) ReconcileKind(ctx context.Context, source *sourcesv1alpha1. } } - uri, err := r.sinkResolver.URIFromDestinationV1(*dest, source) + uri, err := r.sinkResolver.URIFromDestinationV1(ctx, *dest, source) if err != nil { source.Status.MarkNoSink("NotFound", "%s", err) return err @@ -217,7 +217,7 @@ func (r *Reconciler) reconcileReceiveAdapter(ctx context.Context, source *source Source: source, ReceiveAdapterImage: r.receiveAdapterImage, }) - ksvc, err = r.servingClientSet.ServingV1().Services(source.Namespace).Create(ksvc) + ksvc, err = r.servingClientSet.ServingV1().Services(source.Namespace).Create(ctx, ksvc, metav1.CreateOptions{}) if err != nil { return nil, err } @@ -349,7 +349,7 @@ func (r *Reconciler) deleteWebhook(ctx context.Context, args *webhookArgs) error } func (r *Reconciler) secretFrom(ctx context.Context, namespace string, secretKeySelector *corev1.SecretKeySelector) (string, error) { - secret, err := r.kubeClientSet.CoreV1().Secrets(namespace).Get(secretKeySelector.Name, metav1.GetOptions{}) + secret, err := r.kubeClientSet.CoreV1().Secrets(namespace).Get(ctx, secretKeySelector.Name, metav1.GetOptions{}) if err != nil { return "", err } diff --git a/gitlab/pkg/client/clientset/versioned/clientset.go b/gitlab/pkg/client/clientset/versioned/clientset.go index b5b9956507..99777d303c 100644 --- a/gitlab/pkg/client/clientset/versioned/clientset.go +++ b/gitlab/pkg/client/clientset/versioned/clientset.go @@ -67,7 +67,7 @@ func NewForConfig(c *rest.Config) (*Clientset, error) { configShallowCopy := *c if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 { if configShallowCopy.Burst <= 0 { - return nil, fmt.Errorf("Burst is required to be greater than 0 when RateLimiter is not set and QPS is set to greater than 0") + return nil, fmt.Errorf("burst is required to be greater than 0 when RateLimiter is not set and QPS is set to greater than 0") } configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst) } diff --git a/gitlab/pkg/client/clientset/versioned/typed/bindings/v1alpha1/fake/fake_gitlabbinding.go b/gitlab/pkg/client/clientset/versioned/typed/bindings/v1alpha1/fake/fake_gitlabbinding.go index 1c1c75155b..f59cfd10a5 100644 --- a/gitlab/pkg/client/clientset/versioned/typed/bindings/v1alpha1/fake/fake_gitlabbinding.go +++ b/gitlab/pkg/client/clientset/versioned/typed/bindings/v1alpha1/fake/fake_gitlabbinding.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -39,7 +41,7 @@ var gitlabbindingsResource = schema.GroupVersionResource{Group: "bindings.knativ var gitlabbindingsKind = schema.GroupVersionKind{Group: "bindings.knative.dev", Version: "v1alpha1", Kind: "GitLabBinding"} // Get takes name of the gitLabBinding, and returns the corresponding gitLabBinding object, and an error if there is any. -func (c *FakeGitLabBindings) Get(name string, options v1.GetOptions) (result *v1alpha1.GitLabBinding, err error) { +func (c *FakeGitLabBindings) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.GitLabBinding, err error) { obj, err := c.Fake. Invokes(testing.NewGetAction(gitlabbindingsResource, c.ns, name), &v1alpha1.GitLabBinding{}) @@ -50,7 +52,7 @@ func (c *FakeGitLabBindings) Get(name string, options v1.GetOptions) (result *v1 } // List takes label and field selectors, and returns the list of GitLabBindings that match those selectors. -func (c *FakeGitLabBindings) List(opts v1.ListOptions) (result *v1alpha1.GitLabBindingList, err error) { +func (c *FakeGitLabBindings) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.GitLabBindingList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(gitlabbindingsResource, gitlabbindingsKind, c.ns, opts), &v1alpha1.GitLabBindingList{}) @@ -72,14 +74,14 @@ func (c *FakeGitLabBindings) List(opts v1.ListOptions) (result *v1alpha1.GitLabB } // Watch returns a watch.Interface that watches the requested gitLabBindings. -func (c *FakeGitLabBindings) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeGitLabBindings) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(gitlabbindingsResource, c.ns, opts)) } // Create takes the representation of a gitLabBinding and creates it. Returns the server's representation of the gitLabBinding, and an error, if there is any. -func (c *FakeGitLabBindings) Create(gitLabBinding *v1alpha1.GitLabBinding) (result *v1alpha1.GitLabBinding, err error) { +func (c *FakeGitLabBindings) Create(ctx context.Context, gitLabBinding *v1alpha1.GitLabBinding, opts v1.CreateOptions) (result *v1alpha1.GitLabBinding, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(gitlabbindingsResource, c.ns, gitLabBinding), &v1alpha1.GitLabBinding{}) @@ -90,7 +92,7 @@ func (c *FakeGitLabBindings) Create(gitLabBinding *v1alpha1.GitLabBinding) (resu } // Update takes the representation of a gitLabBinding and updates it. Returns the server's representation of the gitLabBinding, and an error, if there is any. -func (c *FakeGitLabBindings) Update(gitLabBinding *v1alpha1.GitLabBinding) (result *v1alpha1.GitLabBinding, err error) { +func (c *FakeGitLabBindings) Update(ctx context.Context, gitLabBinding *v1alpha1.GitLabBinding, opts v1.UpdateOptions) (result *v1alpha1.GitLabBinding, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(gitlabbindingsResource, c.ns, gitLabBinding), &v1alpha1.GitLabBinding{}) @@ -102,7 +104,7 @@ func (c *FakeGitLabBindings) Update(gitLabBinding *v1alpha1.GitLabBinding) (resu // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeGitLabBindings) UpdateStatus(gitLabBinding *v1alpha1.GitLabBinding) (*v1alpha1.GitLabBinding, error) { +func (c *FakeGitLabBindings) UpdateStatus(ctx context.Context, gitLabBinding *v1alpha1.GitLabBinding, opts v1.UpdateOptions) (*v1alpha1.GitLabBinding, error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(gitlabbindingsResource, "status", c.ns, gitLabBinding), &v1alpha1.GitLabBinding{}) @@ -113,7 +115,7 @@ func (c *FakeGitLabBindings) UpdateStatus(gitLabBinding *v1alpha1.GitLabBinding) } // Delete takes name of the gitLabBinding and deletes it. Returns an error if one occurs. -func (c *FakeGitLabBindings) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeGitLabBindings) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewDeleteAction(gitlabbindingsResource, c.ns, name), &v1alpha1.GitLabBinding{}) @@ -121,15 +123,15 @@ func (c *FakeGitLabBindings) Delete(name string, options *v1.DeleteOptions) erro } // DeleteCollection deletes a collection of objects. -func (c *FakeGitLabBindings) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(gitlabbindingsResource, c.ns, listOptions) +func (c *FakeGitLabBindings) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(gitlabbindingsResource, c.ns, listOpts) _, err := c.Fake.Invokes(action, &v1alpha1.GitLabBindingList{}) return err } // Patch applies the patch and returns the patched gitLabBinding. -func (c *FakeGitLabBindings) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.GitLabBinding, err error) { +func (c *FakeGitLabBindings) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.GitLabBinding, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(gitlabbindingsResource, c.ns, name, pt, data, subresources...), &v1alpha1.GitLabBinding{}) diff --git a/gitlab/pkg/client/clientset/versioned/typed/bindings/v1alpha1/gitlabbinding.go b/gitlab/pkg/client/clientset/versioned/typed/bindings/v1alpha1/gitlabbinding.go index 58c5f787be..371042be20 100644 --- a/gitlab/pkg/client/clientset/versioned/typed/bindings/v1alpha1/gitlabbinding.go +++ b/gitlab/pkg/client/clientset/versioned/typed/bindings/v1alpha1/gitlabbinding.go @@ -19,6 +19,7 @@ limitations under the License. package v1alpha1 import ( + "context" "time" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -37,15 +38,15 @@ type GitLabBindingsGetter interface { // GitLabBindingInterface has methods to work with GitLabBinding resources. type GitLabBindingInterface interface { - Create(*v1alpha1.GitLabBinding) (*v1alpha1.GitLabBinding, error) - Update(*v1alpha1.GitLabBinding) (*v1alpha1.GitLabBinding, error) - UpdateStatus(*v1alpha1.GitLabBinding) (*v1alpha1.GitLabBinding, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*v1alpha1.GitLabBinding, error) - List(opts v1.ListOptions) (*v1alpha1.GitLabBindingList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.GitLabBinding, err error) + Create(ctx context.Context, gitLabBinding *v1alpha1.GitLabBinding, opts v1.CreateOptions) (*v1alpha1.GitLabBinding, error) + Update(ctx context.Context, gitLabBinding *v1alpha1.GitLabBinding, opts v1.UpdateOptions) (*v1alpha1.GitLabBinding, error) + UpdateStatus(ctx context.Context, gitLabBinding *v1alpha1.GitLabBinding, opts v1.UpdateOptions) (*v1alpha1.GitLabBinding, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.GitLabBinding, error) + List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.GitLabBindingList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.GitLabBinding, err error) GitLabBindingExpansion } @@ -64,20 +65,20 @@ func newGitLabBindings(c *BindingsV1alpha1Client, namespace string) *gitLabBindi } // Get takes name of the gitLabBinding, and returns the corresponding gitLabBinding object, and an error if there is any. -func (c *gitLabBindings) Get(name string, options v1.GetOptions) (result *v1alpha1.GitLabBinding, err error) { +func (c *gitLabBindings) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.GitLabBinding, err error) { result = &v1alpha1.GitLabBinding{} err = c.client.Get(). Namespace(c.ns). Resource("gitlabbindings"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of GitLabBindings that match those selectors. -func (c *gitLabBindings) List(opts v1.ListOptions) (result *v1alpha1.GitLabBindingList, err error) { +func (c *gitLabBindings) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.GitLabBindingList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -88,13 +89,13 @@ func (c *gitLabBindings) List(opts v1.ListOptions) (result *v1alpha1.GitLabBindi Resource("gitlabbindings"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested gitLabBindings. -func (c *gitLabBindings) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *gitLabBindings) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -105,87 +106,90 @@ func (c *gitLabBindings) Watch(opts v1.ListOptions) (watch.Interface, error) { Resource("gitlabbindings"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a gitLabBinding and creates it. Returns the server's representation of the gitLabBinding, and an error, if there is any. -func (c *gitLabBindings) Create(gitLabBinding *v1alpha1.GitLabBinding) (result *v1alpha1.GitLabBinding, err error) { +func (c *gitLabBindings) Create(ctx context.Context, gitLabBinding *v1alpha1.GitLabBinding, opts v1.CreateOptions) (result *v1alpha1.GitLabBinding, err error) { result = &v1alpha1.GitLabBinding{} err = c.client.Post(). Namespace(c.ns). Resource("gitlabbindings"). + VersionedParams(&opts, scheme.ParameterCodec). Body(gitLabBinding). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a gitLabBinding and updates it. Returns the server's representation of the gitLabBinding, and an error, if there is any. -func (c *gitLabBindings) Update(gitLabBinding *v1alpha1.GitLabBinding) (result *v1alpha1.GitLabBinding, err error) { +func (c *gitLabBindings) Update(ctx context.Context, gitLabBinding *v1alpha1.GitLabBinding, opts v1.UpdateOptions) (result *v1alpha1.GitLabBinding, err error) { result = &v1alpha1.GitLabBinding{} err = c.client.Put(). Namespace(c.ns). Resource("gitlabbindings"). Name(gitLabBinding.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(gitLabBinding). - Do(). + Do(ctx). Into(result) return } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *gitLabBindings) UpdateStatus(gitLabBinding *v1alpha1.GitLabBinding) (result *v1alpha1.GitLabBinding, err error) { +func (c *gitLabBindings) UpdateStatus(ctx context.Context, gitLabBinding *v1alpha1.GitLabBinding, opts v1.UpdateOptions) (result *v1alpha1.GitLabBinding, err error) { result = &v1alpha1.GitLabBinding{} err = c.client.Put(). Namespace(c.ns). Resource("gitlabbindings"). Name(gitLabBinding.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(gitLabBinding). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the gitLabBinding and deletes it. Returns an error if one occurs. -func (c *gitLabBindings) Delete(name string, options *v1.DeleteOptions) error { +func (c *gitLabBindings) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("gitlabbindings"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *gitLabBindings) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *gitLabBindings) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Namespace(c.ns). Resource("gitlabbindings"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched gitLabBinding. -func (c *gitLabBindings) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.GitLabBinding, err error) { +func (c *gitLabBindings) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.GitLabBinding, err error) { result = &v1alpha1.GitLabBinding{} err = c.client.Patch(pt). Namespace(c.ns). Resource("gitlabbindings"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/gitlab/pkg/client/clientset/versioned/typed/sources/v1alpha1/fake/fake_gitlabsource.go b/gitlab/pkg/client/clientset/versioned/typed/sources/v1alpha1/fake/fake_gitlabsource.go index c3f4d779e3..705cf25a51 100644 --- a/gitlab/pkg/client/clientset/versioned/typed/sources/v1alpha1/fake/fake_gitlabsource.go +++ b/gitlab/pkg/client/clientset/versioned/typed/sources/v1alpha1/fake/fake_gitlabsource.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -39,7 +41,7 @@ var gitlabsourcesResource = schema.GroupVersionResource{Group: "sources.knative. var gitlabsourcesKind = schema.GroupVersionKind{Group: "sources.knative.dev", Version: "v1alpha1", Kind: "GitLabSource"} // Get takes name of the gitLabSource, and returns the corresponding gitLabSource object, and an error if there is any. -func (c *FakeGitLabSources) Get(name string, options v1.GetOptions) (result *v1alpha1.GitLabSource, err error) { +func (c *FakeGitLabSources) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.GitLabSource, err error) { obj, err := c.Fake. Invokes(testing.NewGetAction(gitlabsourcesResource, c.ns, name), &v1alpha1.GitLabSource{}) @@ -50,7 +52,7 @@ func (c *FakeGitLabSources) Get(name string, options v1.GetOptions) (result *v1a } // List takes label and field selectors, and returns the list of GitLabSources that match those selectors. -func (c *FakeGitLabSources) List(opts v1.ListOptions) (result *v1alpha1.GitLabSourceList, err error) { +func (c *FakeGitLabSources) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.GitLabSourceList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(gitlabsourcesResource, gitlabsourcesKind, c.ns, opts), &v1alpha1.GitLabSourceList{}) @@ -72,14 +74,14 @@ func (c *FakeGitLabSources) List(opts v1.ListOptions) (result *v1alpha1.GitLabSo } // Watch returns a watch.Interface that watches the requested gitLabSources. -func (c *FakeGitLabSources) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeGitLabSources) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(gitlabsourcesResource, c.ns, opts)) } // Create takes the representation of a gitLabSource and creates it. Returns the server's representation of the gitLabSource, and an error, if there is any. -func (c *FakeGitLabSources) Create(gitLabSource *v1alpha1.GitLabSource) (result *v1alpha1.GitLabSource, err error) { +func (c *FakeGitLabSources) Create(ctx context.Context, gitLabSource *v1alpha1.GitLabSource, opts v1.CreateOptions) (result *v1alpha1.GitLabSource, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(gitlabsourcesResource, c.ns, gitLabSource), &v1alpha1.GitLabSource{}) @@ -90,7 +92,7 @@ func (c *FakeGitLabSources) Create(gitLabSource *v1alpha1.GitLabSource) (result } // Update takes the representation of a gitLabSource and updates it. Returns the server's representation of the gitLabSource, and an error, if there is any. -func (c *FakeGitLabSources) Update(gitLabSource *v1alpha1.GitLabSource) (result *v1alpha1.GitLabSource, err error) { +func (c *FakeGitLabSources) Update(ctx context.Context, gitLabSource *v1alpha1.GitLabSource, opts v1.UpdateOptions) (result *v1alpha1.GitLabSource, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(gitlabsourcesResource, c.ns, gitLabSource), &v1alpha1.GitLabSource{}) @@ -102,7 +104,7 @@ func (c *FakeGitLabSources) Update(gitLabSource *v1alpha1.GitLabSource) (result // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeGitLabSources) UpdateStatus(gitLabSource *v1alpha1.GitLabSource) (*v1alpha1.GitLabSource, error) { +func (c *FakeGitLabSources) UpdateStatus(ctx context.Context, gitLabSource *v1alpha1.GitLabSource, opts v1.UpdateOptions) (*v1alpha1.GitLabSource, error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(gitlabsourcesResource, "status", c.ns, gitLabSource), &v1alpha1.GitLabSource{}) @@ -113,7 +115,7 @@ func (c *FakeGitLabSources) UpdateStatus(gitLabSource *v1alpha1.GitLabSource) (* } // Delete takes name of the gitLabSource and deletes it. Returns an error if one occurs. -func (c *FakeGitLabSources) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeGitLabSources) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewDeleteAction(gitlabsourcesResource, c.ns, name), &v1alpha1.GitLabSource{}) @@ -121,15 +123,15 @@ func (c *FakeGitLabSources) Delete(name string, options *v1.DeleteOptions) error } // DeleteCollection deletes a collection of objects. -func (c *FakeGitLabSources) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(gitlabsourcesResource, c.ns, listOptions) +func (c *FakeGitLabSources) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(gitlabsourcesResource, c.ns, listOpts) _, err := c.Fake.Invokes(action, &v1alpha1.GitLabSourceList{}) return err } // Patch applies the patch and returns the patched gitLabSource. -func (c *FakeGitLabSources) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.GitLabSource, err error) { +func (c *FakeGitLabSources) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.GitLabSource, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(gitlabsourcesResource, c.ns, name, pt, data, subresources...), &v1alpha1.GitLabSource{}) diff --git a/gitlab/pkg/client/clientset/versioned/typed/sources/v1alpha1/gitlabsource.go b/gitlab/pkg/client/clientset/versioned/typed/sources/v1alpha1/gitlabsource.go index cea8278780..c3e9a9c5af 100644 --- a/gitlab/pkg/client/clientset/versioned/typed/sources/v1alpha1/gitlabsource.go +++ b/gitlab/pkg/client/clientset/versioned/typed/sources/v1alpha1/gitlabsource.go @@ -19,6 +19,7 @@ limitations under the License. package v1alpha1 import ( + "context" "time" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -37,15 +38,15 @@ type GitLabSourcesGetter interface { // GitLabSourceInterface has methods to work with GitLabSource resources. type GitLabSourceInterface interface { - Create(*v1alpha1.GitLabSource) (*v1alpha1.GitLabSource, error) - Update(*v1alpha1.GitLabSource) (*v1alpha1.GitLabSource, error) - UpdateStatus(*v1alpha1.GitLabSource) (*v1alpha1.GitLabSource, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*v1alpha1.GitLabSource, error) - List(opts v1.ListOptions) (*v1alpha1.GitLabSourceList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.GitLabSource, err error) + Create(ctx context.Context, gitLabSource *v1alpha1.GitLabSource, opts v1.CreateOptions) (*v1alpha1.GitLabSource, error) + Update(ctx context.Context, gitLabSource *v1alpha1.GitLabSource, opts v1.UpdateOptions) (*v1alpha1.GitLabSource, error) + UpdateStatus(ctx context.Context, gitLabSource *v1alpha1.GitLabSource, opts v1.UpdateOptions) (*v1alpha1.GitLabSource, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.GitLabSource, error) + List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.GitLabSourceList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.GitLabSource, err error) GitLabSourceExpansion } @@ -64,20 +65,20 @@ func newGitLabSources(c *SourcesV1alpha1Client, namespace string) *gitLabSources } // Get takes name of the gitLabSource, and returns the corresponding gitLabSource object, and an error if there is any. -func (c *gitLabSources) Get(name string, options v1.GetOptions) (result *v1alpha1.GitLabSource, err error) { +func (c *gitLabSources) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.GitLabSource, err error) { result = &v1alpha1.GitLabSource{} err = c.client.Get(). Namespace(c.ns). Resource("gitlabsources"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of GitLabSources that match those selectors. -func (c *gitLabSources) List(opts v1.ListOptions) (result *v1alpha1.GitLabSourceList, err error) { +func (c *gitLabSources) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.GitLabSourceList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -88,13 +89,13 @@ func (c *gitLabSources) List(opts v1.ListOptions) (result *v1alpha1.GitLabSource Resource("gitlabsources"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested gitLabSources. -func (c *gitLabSources) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *gitLabSources) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -105,87 +106,90 @@ func (c *gitLabSources) Watch(opts v1.ListOptions) (watch.Interface, error) { Resource("gitlabsources"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a gitLabSource and creates it. Returns the server's representation of the gitLabSource, and an error, if there is any. -func (c *gitLabSources) Create(gitLabSource *v1alpha1.GitLabSource) (result *v1alpha1.GitLabSource, err error) { +func (c *gitLabSources) Create(ctx context.Context, gitLabSource *v1alpha1.GitLabSource, opts v1.CreateOptions) (result *v1alpha1.GitLabSource, err error) { result = &v1alpha1.GitLabSource{} err = c.client.Post(). Namespace(c.ns). Resource("gitlabsources"). + VersionedParams(&opts, scheme.ParameterCodec). Body(gitLabSource). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a gitLabSource and updates it. Returns the server's representation of the gitLabSource, and an error, if there is any. -func (c *gitLabSources) Update(gitLabSource *v1alpha1.GitLabSource) (result *v1alpha1.GitLabSource, err error) { +func (c *gitLabSources) Update(ctx context.Context, gitLabSource *v1alpha1.GitLabSource, opts v1.UpdateOptions) (result *v1alpha1.GitLabSource, err error) { result = &v1alpha1.GitLabSource{} err = c.client.Put(). Namespace(c.ns). Resource("gitlabsources"). Name(gitLabSource.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(gitLabSource). - Do(). + Do(ctx). Into(result) return } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *gitLabSources) UpdateStatus(gitLabSource *v1alpha1.GitLabSource) (result *v1alpha1.GitLabSource, err error) { +func (c *gitLabSources) UpdateStatus(ctx context.Context, gitLabSource *v1alpha1.GitLabSource, opts v1.UpdateOptions) (result *v1alpha1.GitLabSource, err error) { result = &v1alpha1.GitLabSource{} err = c.client.Put(). Namespace(c.ns). Resource("gitlabsources"). Name(gitLabSource.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(gitLabSource). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the gitLabSource and deletes it. Returns an error if one occurs. -func (c *gitLabSources) Delete(name string, options *v1.DeleteOptions) error { +func (c *gitLabSources) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("gitlabsources"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *gitLabSources) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *gitLabSources) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Namespace(c.ns). Resource("gitlabsources"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched gitLabSource. -func (c *gitLabSources) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.GitLabSource, err error) { +func (c *gitLabSources) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.GitLabSource, err error) { result = &v1alpha1.GitLabSource{} err = c.client.Patch(pt). Namespace(c.ns). Resource("gitlabsources"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/gitlab/pkg/client/informers/externalversions/bindings/v1alpha1/gitlabbinding.go b/gitlab/pkg/client/informers/externalversions/bindings/v1alpha1/gitlabbinding.go index 1c2df2f447..bac7b85b95 100644 --- a/gitlab/pkg/client/informers/externalversions/bindings/v1alpha1/gitlabbinding.go +++ b/gitlab/pkg/client/informers/externalversions/bindings/v1alpha1/gitlabbinding.go @@ -19,6 +19,7 @@ limitations under the License. package v1alpha1 import ( + "context" time "time" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -61,13 +62,13 @@ func NewFilteredGitLabBindingInformer(client versioned.Interface, namespace stri if tweakListOptions != nil { tweakListOptions(&options) } - return client.BindingsV1alpha1().GitLabBindings(namespace).List(options) + return client.BindingsV1alpha1().GitLabBindings(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.BindingsV1alpha1().GitLabBindings(namespace).Watch(options) + return client.BindingsV1alpha1().GitLabBindings(namespace).Watch(context.TODO(), options) }, }, &bindingsv1alpha1.GitLabBinding{}, diff --git a/gitlab/pkg/client/informers/externalversions/sources/v1alpha1/gitlabsource.go b/gitlab/pkg/client/informers/externalversions/sources/v1alpha1/gitlabsource.go index 9408310174..28902034ba 100644 --- a/gitlab/pkg/client/informers/externalversions/sources/v1alpha1/gitlabsource.go +++ b/gitlab/pkg/client/informers/externalversions/sources/v1alpha1/gitlabsource.go @@ -19,6 +19,7 @@ limitations under the License. package v1alpha1 import ( + "context" time "time" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -61,13 +62,13 @@ func NewFilteredGitLabSourceInformer(client versioned.Interface, namespace strin if tweakListOptions != nil { tweakListOptions(&options) } - return client.SourcesV1alpha1().GitLabSources(namespace).List(options) + return client.SourcesV1alpha1().GitLabSources(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.SourcesV1alpha1().GitLabSources(namespace).Watch(options) + return client.SourcesV1alpha1().GitLabSources(namespace).Watch(context.TODO(), options) }, }, &sourcesv1alpha1.GitLabSource{}, diff --git a/gitlab/pkg/client/injection/reconciler/sources/v1alpha1/gitlabsource/reconciler.go b/gitlab/pkg/client/injection/reconciler/sources/v1alpha1/gitlabsource/reconciler.go index 4dbf50d57d..3b2a68588c 100644 --- a/gitlab/pkg/client/injection/reconciler/sources/v1alpha1/gitlabsource/reconciler.go +++ b/gitlab/pkg/client/injection/reconciler/sources/v1alpha1/gitlabsource/reconciler.go @@ -315,7 +315,7 @@ func (r *reconcilerImpl) updateStatus(ctx context.Context, existing *v1alpha1.Gi getter := r.Client.SourcesV1alpha1().GitLabSources(desired.Namespace) - existing, err = getter.Get(desired.Name, metav1.GetOptions{}) + existing, err = getter.Get(ctx, desired.Name, metav1.GetOptions{}) if err != nil { return err } @@ -334,7 +334,7 @@ func (r *reconcilerImpl) updateStatus(ctx context.Context, existing *v1alpha1.Gi updater := r.Client.SourcesV1alpha1().GitLabSources(existing.Namespace) - _, err = updater.UpdateStatus(existing) + _, err = updater.UpdateStatus(ctx, existing, metav1.UpdateOptions{}) return err }) } @@ -392,7 +392,7 @@ func (r *reconcilerImpl) updateFinalizersFiltered(ctx context.Context, resource patcher := r.Client.SourcesV1alpha1().GitLabSources(resource.Namespace) resourceName := resource.Name - resource, err = patcher.Patch(resourceName, types.MergePatchType, patch) + resource, err = patcher.Patch(ctx, resourceName, types.MergePatchType, patch, metav1.PatchOptions{}) if err != nil { r.Recorder.Eventf(resource, v1.EventTypeWarning, "FinalizerUpdateFailed", "Failed to update finalizers for %q: %v", resourceName, err) diff --git a/gitlab/pkg/reconciler/source/gitlabsource.go b/gitlab/pkg/reconciler/source/gitlabsource.go index a32fd398c0..9a9e9eabb0 100644 --- a/gitlab/pkg/reconciler/source/gitlabsource.go +++ b/gitlab/pkg/reconciler/source/gitlabsource.go @@ -103,12 +103,12 @@ func (r *Reconciler) ReconcileKind(ctx context.Context, source *sourcesv1alpha1. hookOptions.NoteEvents = true } } - hookOptions.accessToken, err = r.secretFrom(source.Namespace, source.Spec.AccessToken.SecretKeyRef) + hookOptions.accessToken, err = r.secretFrom(ctx, source.Namespace, source.Spec.AccessToken.SecretKeyRef) if err != nil { source.Status.MarkNoSecret("NotFound", "%s", err) return err } - hookOptions.secretToken, err = r.secretFrom(source.Namespace, source.Spec.SecretToken.SecretKeyRef) + hookOptions.secretToken, err = r.secretFrom(ctx, source.Namespace, source.Spec.SecretToken.SecretKeyRef) if err != nil { source.Status.MarkNoSecret("NotFound", "%s", err) return err @@ -127,18 +127,18 @@ func (r *Reconciler) ReconcileKind(ctx context.Context, source *sourcesv1alpha1. } } - uri, err := r.sinkResolver.URIFromDestinationV1(*sink, source) + uri, err := r.sinkResolver.URIFromDestinationV1(ctx, *sink, source) if err != nil { source.Status.MarkNoSink("NotFound", "%s", err) return err } source.Status.MarkSink(uri) - ksvc, err := r.getOwnedKnativeService(source) + ksvc, err := r.getOwnedKnativeService(ctx, source) if err != nil { if apierrors.IsNotFound(err) { ksvc = r.generateKnativeServiceObject(source, r.receiveAdapterImage) - ksvc, err = r.servingClientSet.ServingV1().Services(ksvc.GetNamespace()).Create(ksvc) + ksvc, err = r.servingClientSet.ServingV1().Services(ksvc.GetNamespace()).Create(ctx, ksvc, metav1.CreateOptions{}) if err != nil { source.Status.MarkNotDeployed("ReceiveAdapterCreationError", "%s", err) return err @@ -185,7 +185,7 @@ func (r *Reconciler) FinalizeKind(ctx context.Context, source *sourcesv1alpha1.G } hookOptions.project = projectName hookOptions.id = source.Status.Id - hookOptions.accessToken, err = r.secretFrom(source.Namespace, source.Spec.AccessToken.SecretKeyRef) + hookOptions.accessToken, err = r.secretFrom(ctx, source.Namespace, source.Spec.AccessToken.SecretKeyRef) if err != nil { return err } @@ -222,8 +222,8 @@ func getProjectName(projectUrl string) (string, error) { return projectName, nil } -func (r *Reconciler) secretFrom(namespace string, secretKeySelector *corev1.SecretKeySelector) (string, error) { - secret, err := r.kubeClientSet.CoreV1().Secrets(namespace).Get(secretKeySelector.Name, metav1.GetOptions{}) +func (r *Reconciler) secretFrom(ctx context.Context, namespace string, secretKeySelector *corev1.SecretKeySelector) (string, error) { + secret, err := r.kubeClientSet.CoreV1().Secrets(namespace).Get(ctx, secretKeySelector.Name, metav1.GetOptions{}) if err != nil { return "", err } @@ -289,8 +289,8 @@ func (r *Reconciler) generateKnativeServiceObject(source *sourcesv1alpha1.GitLab } } -func (r *Reconciler) getOwnedKnativeService(source *sourcesv1alpha1.GitLabSource) (*servingv1.Service, error) { - list, err := r.servingClientSet.ServingV1().Services(source.GetNamespace()).List(metav1.ListOptions{ +func (r *Reconciler) getOwnedKnativeService(ctx context.Context, source *sourcesv1alpha1.GitLabSource) (*servingv1.Service, error) { + list, err := r.servingClientSet.ServingV1().Services(source.GetNamespace()).List(ctx, metav1.ListOptions{ LabelSelector: labels.Everything().String(), }) diff --git a/go.mod b/go.mod index 0d7a79eace..c0b901a372 100644 --- a/go.mod +++ b/go.mod @@ -4,8 +4,6 @@ go 1.14 require ( github.com/Shopify/sarama v1.27.0 - github.com/apache/camel-k/pkg/apis/camel v1.1.0 - github.com/apache/camel-k/pkg/client/camel v1.1.0 github.com/aws/aws-sdk-go v1.31.12 github.com/cloudevents/sdk-go/protocol/kafka_sarama/v2 v2.2.0 github.com/cloudevents/sdk-go/protocol/stan/v2 v2.2.0 @@ -32,17 +30,16 @@ require ( go.opencensus.io v0.22.5-0.20200716030834-3456e1d174b2 go.opentelemetry.io/otel v0.4.2 // indirect go.uber.org/zap v1.15.0 - golang.org/x/net v0.0.0-20200707034311-ab3426394381 + golang.org/x/net v0.0.0-20200822124328-c89045814202 golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d gopkg.in/go-playground/webhooks.v5 v5.13.0 - gopkg.in/yaml.v2 v2.3.0 - k8s.io/api v0.18.7-rc.0 - k8s.io/apimachinery v0.18.7-rc.0 + k8s.io/api v0.18.8 + k8s.io/apimachinery v0.18.8 k8s.io/client-go v11.0.1-0.20190805182717-6502b5e7b1b5+incompatible k8s.io/utils v0.0.0-20200603063816-c1c6865ac451 - knative.dev/eventing v0.17.1-0.20200911130100-1fec6b5212c0 - knative.dev/pkg v0.0.0-20200910143251-0761d6b47e4d - knative.dev/serving v0.17.1-0.20200910185451-e82b666ecbbb + knative.dev/eventing v0.17.1-0.20200911202500-2a052dbdc2fb + knative.dev/pkg v0.0.0-20200911145400-2d4efecc6bc1 + knative.dev/serving v0.17.1-0.20200911183800-3e7b71d67f00 knative.dev/test-infra v0.0.0-20200910231400-cfba2288403d ) @@ -50,10 +47,10 @@ replace ( github.com/Azure/go-autorest/autorest => github.com/Azure/go-autorest/autorest v0.9.6 github.com/googleapis/gnostic => github.com/googleapis/gnostic v0.3.1 github.com/prometheus/client_golang => github.com/prometheus/client_golang v0.9.2 - k8s.io/api => k8s.io/api v0.17.6 - k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.17.6 - k8s.io/apimachinery => k8s.io/apimachinery v0.17.6 - k8s.io/apiserver => k8s.io/apiserver v0.17.6 - k8s.io/client-go => k8s.io/client-go v0.17.6 - k8s.io/code-generator => k8s.io/code-generator v0.17.6 + k8s.io/api => k8s.io/api v0.18.8 + k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.18.8 + k8s.io/apimachinery => k8s.io/apimachinery v0.18.8 + k8s.io/apiserver => k8s.io/apiserver v0.18.8 + k8s.io/client-go => k8s.io/client-go v0.18.8 + k8s.io/code-generator => k8s.io/code-generator v0.18.8 ) diff --git a/go.sum b/go.sum index af08c6b7eb..3494aa589b 100644 --- a/go.sum +++ b/go.sum @@ -179,10 +179,6 @@ github.com/andygrunwald/go-gerrit v0.0.0-20190120104749-174420ebee6c/go.mod h1:0 github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c= github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6/go.mod h1:V8iCPQYkqmusNa815XgQio277wI47sdRh1dUOLdyC6Q= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/apache/camel-k/pkg/apis/camel v1.1.0 h1:+1fVAcE7Q80FLeEbBMXKgD38hRaUiSHcF+bziU2CItE= -github.com/apache/camel-k/pkg/apis/camel v1.1.0/go.mod h1:6P14OiO5gopr9irgeNkH63uJbePxXQtGTFye7m+DOgk= -github.com/apache/camel-k/pkg/client/camel v1.1.0 h1:s++wEv2Fw0Nvfrj/yQDRoLVHCNaQm3FjwkMbVZivkKA= -github.com/apache/camel-k/pkg/client/camel v1.1.0/go.mod h1:/2HNH1pADlUEsXaKddkUqnuYcSsMqNqWI55CRjF71bA= github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/apex/log v1.1.4/go.mod h1:AlpoD9aScyQfJDVHmLMEcx4oU6LqzkWp4Mg9GdAcEvQ= github.com/apex/log v1.3.0/go.mod h1:jd8Vpsr46WAe3EZSQ/IUMs2qQD/GOycT5rPWCO1yGcs= @@ -361,7 +357,7 @@ github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21 h1:YEetp8 github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= github.com/eapache/queue v1.1.0 h1:YOEu7KNc61ntiQlcEeUIoDTJ2o8mQznoNvUhiigpIqc= github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= -github.com/elazarl/goproxy v0.0.0-20170405201442-c4fc26588b6e/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= +github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/emicklei/go-restful v2.9.5+incompatible h1:spTtZBk5DYEvbxMVutUuTyh1Ao2r4iyvLdACqsl/Ljk= github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= @@ -373,6 +369,7 @@ github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.m github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/erikstmartin/go-testdb v0.0.0-20160219214506-8d10e4a1bae5/go.mod h1:a2zkGnVExMxdzMo3M0Hi/3sEU+cWnZpSni0O6/Yb/P0= +github.com/evanphx/json-patch v0.0.0-20200808040245-162e5629780b/go.mod h1:NAJj0yf/KaRKURN6nyi7A9IZydMivZEm9oQLWNjfKDc= github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v4.5.0+incompatible h1:ouOWdg56aJriqS0huScTkVXPC5IcNrDCXZ6OoTAWu7M= github.com/evanphx/json-patch v4.5.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= @@ -513,11 +510,11 @@ github.com/go-toolsmith/typep v1.0.0/go.mod h1:JSQCQMUPdRlMZFswiq3TGpNp1GMktqkR2 github.com/go-toolsmith/typep v1.0.2/go.mod h1:JSQCQMUPdRlMZFswiq3TGpNp1GMktqkR2Ns5AIQkATU= github.com/go-xmlfmt/xmlfmt v0.0.0-20191208150333-d5b6f63a941b/go.mod h1:aUCEOzzezBEjDBbFBoSiya/gduyIiWYRP6CnSFIV8AM= github.com/go-yaml/yaml v2.1.0+incompatible/go.mod h1:w2MrLa16VYP0jy6N7M5kHaCkaLENm+P+Tv+MfurjSw0= +github.com/gobuffalo/envy v1.6.5 h1:X3is06x7v0nW2xiy2yFbbIjwHz57CD6z6MkvqULTCm8= github.com/gobuffalo/envy v1.6.5/go.mod h1:N+GkhhZ/93bGZc6ZKhJLP6+m+tCNPKwgSpH9kaifseQ= github.com/gobuffalo/envy v1.7.0/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI= github.com/gobuffalo/envy v1.7.1 h1:OQl5ys5MBea7OGCdvPbBJWRgnhC/fGona6QKfvFeau8= github.com/gobuffalo/envy v1.7.1/go.mod h1:FurDp9+EDPE4aIUS3ZLyD+7/9fpx7YRt/ukY6jIHf0w= -github.com/gobuffalo/flect v0.2.0/go.mod h1:W3K3X9ksuZfir8f/LrfVtWmCDQFfayuylOJ7sz/Fj80= github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= github.com/godbus/dbus v0.0.0-20190422162347-ade71ed3457e/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= github.com/gofrs/flock v0.0.0-20190320160742-5135e617513b/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= @@ -613,8 +610,8 @@ github.com/google/go-containerregistry v0.0.0-20200115214256-379933c9c22b/go.mod github.com/google/go-containerregistry v0.0.0-20200123184029-53ce695e4179/go.mod h1:Wtl/v6YdQxv397EREtzwgd9+Ud7Q5D8XMbi3Zazgkrs= github.com/google/go-containerregistry v0.0.0-20200331213917-3d03ed9b1ca2/go.mod h1:pD1UFYs7MCAx+ZLShBdttcaOSbyc8F9Na/9IZLNwJeA= github.com/google/go-containerregistry v0.1.1/go.mod h1:npTSyywOeILcgWqd+rvtzGWflIPPcBQhYoOONaY4ltM= -github.com/google/go-containerregistry v0.1.2-0.20200717224239-a84993334b27 h1:UE29caIXS8tGBSgWvLOnFdOqV5fv672bfvkCS/9EHo0= -github.com/google/go-containerregistry v0.1.2-0.20200717224239-a84993334b27/go.mod h1:npTSyywOeILcgWqd+rvtzGWflIPPcBQhYoOONaY4ltM= +github.com/google/go-containerregistry v0.1.3-0.20200910230023-d42b6a2ddfd1 h1:v9CWGV7SZQ0ckDcz7AyZosdTrZp+Vs50XRcoTbkv5dk= +github.com/google/go-containerregistry v0.1.3-0.20200910230023-d42b6a2ddfd1/go.mod h1:5s8ngJYjVAwkC9MKbOtxmRphO/ZvIKZ5b2vsobilblI= github.com/google/go-github v17.0.0+incompatible h1:N0LgJ1j65A7kfXrZnUDaYCs/Sf4rEjNlfyDHW9dolSY= github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ= github.com/google/go-github/v27 v27.0.6 h1:oiOZuBmGHvrGM1X9uNUAUlLgp5r1UUO/M/KnbHnLRlQ= @@ -1123,7 +1120,6 @@ github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqn github.com/rcrowley/go-metrics v0.0.0-20190706150252-9beb055b7962/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0 h1:MkV+77GLUNo5oJ0jf870itWm3D0Sjh7+Za9gazKc5LQ= github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= -github.com/remyoudompheng/bigfft v0.0.0-20170806203942-52369c62f446/go.mod h1:uYEyJGbgTkfkS4+E/PavXkNJcbFIpEtjt2B0KDQ5+9M= github.com/rickb777/date v1.13.0 h1:+8AmwLuY1d/rldzdqvqTEg7107bZ8clW37x4nsdG3Hs= github.com/rickb777/date v1.13.0/go.mod h1:GZf3LoGnxPWjX+/1TXOuzHefZFDovTyNLHDMd3qH70k= github.com/rickb777/plural v1.2.1 h1:UitRAgR70+yHFt26Tmj/F9dU9aV6UfjGXSbO1DcC9/U= @@ -1157,7 +1153,6 @@ github.com/securego/gosec v0.0.0-20200103095621-79fbf3af8d83/go.mod h1:vvbZ2Ae7A github.com/securego/gosec v0.0.0-20200401082031-e946c8c39989/go.mod h1:i9l/TNj+yDFh9SZXUTvspXTjbFXgZGP/UvhU1S65A4A= github.com/securego/gosec/v2 v2.3.0/go.mod h1:UzeVyUXbxukhLeHKV3VVqo7HdoQR9MrRfFmZYotn8ME= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= -github.com/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0= github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= github.com/shirou/gopsutil v0.0.0-20190901111213-e4ec7b275ada/go.mod h1:WWnYX4lzhCH5h/3YBfyVA3VbLYjlMZZAQcW9ojMexNc= github.com/shirou/w32 v0.0.0-20160930032740-bb4de0191aa4/go.mod h1:qsXQc7+bwAM3Q1u/4XEfrquwF8Lw7D7y5cD8CuHnfIc= @@ -1303,6 +1298,7 @@ github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1: github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yvasiyarov/go-metrics v0.0.0-20140926110328-57bccd1ccd43/go.mod h1:aX5oPXxHm3bOH+xeAttToC8pqch2ScQN/JoXYupl6xs= github.com/yvasiyarov/gorelic v0.0.0-20141212073537-a9bba5b9ab50/go.mod h1:NUSPSUX/bi6SeDMUh6brw0nXpxHnc96TguQh0+r/ssA= github.com/yvasiyarov/newrelic_platform_go v0.0.0-20140908184405-b21fdbd4370f/go.mod h1:GlGEuHIJweS1mbCqG+7vt2nvWLzLLnRHbXz5JKd/Qbg= @@ -1403,9 +1399,7 @@ golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de h1:ikNHVSjEfnvz6sxdSPCaPt golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190125153040-c74c464bbbf2/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190312203227-4b39c73a6495/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= golang.org/x/exp v0.0.0-20190731235908-ec7cb31e5a56/go.mod h1:JhuoJpWY28nO4Vef9tZUw9qufEGTyX1+7lmHxV5q5G4= golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= @@ -1493,6 +1487,8 @@ golang.org/x/net v0.0.0-20200528225125-3c3fba18258b/go.mod h1:qpuaurCH72eLCgpAm/ golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200707034311-ab3426394381 h1:VXak5I6aEWmAXeQjA+QSZzlgNrpq9mjcfDemuexIKsU= golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200822124328-c89045814202 h1:VvcQYSHwXgi7W+TpUR6A9g6Up98WAHf3f/ulnJ62IyA= +golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/oauth2 v0.0.0-20180724155351-3d292e4d0cdc/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181017192945-9dcd33a902f4/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -1558,6 +1554,7 @@ golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191010194322-b09406accb47/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191022100944-742c48ecaeb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191112214154-59a1497f0cea/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191113165036-4c7a9d0fe056/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1613,7 +1610,6 @@ golang.org/x/tools v0.0.0-20181117154741-2ddaf7f79a09/go.mod h1:n7NCudcB/nEzxVGm golang.org/x/tools v0.0.0-20190110163146-51295c7ec13a/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190125232054-d66bd3c5d5a6/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190206041539-40960b6deb8e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190221204921-83362c3779f5/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= @@ -1699,21 +1695,22 @@ golang.org/x/tools v0.0.0-20200725200936-102e7d357031/go.mod h1:njjCfa9FT2d7l9Bc golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200731060945-b5fad4ed8dd6 h1:qKpj8TpV+LEhel7H/fR788J+KvhWZ3o3V6N2fU/iuLU= golang.org/x/tools v0.0.0-20200731060945-b5fad4ed8dd6/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200910222312-571a207697e7 h1:SJWJaZU+0cpPpc8YPrjwTiNrjlqgNl09cAFXuSijD2k= +golang.org/x/tools v0.0.0-20200910222312-571a207697e7/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gomodules.xyz/jsonpatch/v2 v2.0.1 h1:xyiBuvkD2g5n7cYzx6u2sxQvsAy4QJsZFCzGVdzOXZ0= gomodules.xyz/jsonpatch/v2 v2.0.1/go.mod h1:IhYNNY4jnS53ZnfE4PAmpKtDpTCj1JFXc+3mwe7XcUU= gomodules.xyz/jsonpatch/v2 v2.1.0 h1:Phva6wqu+xR//Njw6iorylFFgn/z547tw5Ne3HZPQ+k= gomodules.xyz/jsonpatch/v2 v2.1.0/go.mod h1:IhYNNY4jnS53ZnfE4PAmpKtDpTCj1JFXc+3mwe7XcUU= +gonum.org/v1/gonum v0.0.0-20181121035319-3f7ecaa7e8ca h1:PupagGYwj8+I4ubCxcmcBRk3VlUWtTg5huQpZR9flmE= gonum.org/v1/gonum v0.0.0-20181121035319-3f7ecaa7e8ca/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= -gonum.org/v1/gonum v0.0.0-20190331200053-3d26580ed485 h1:OB/uP/Puiu5vS5QMRPrXCDWUPb+kt8f1KW8oQzFejQw= -gonum.org/v1/gonum v0.0.0-20190331200053-3d26580ed485/go.mod h1:2ltnJ7xHfj0zHS40VVPYEAAMTa3ZGguvHGBSJeRWqE0= +gonum.org/v1/netlib v0.0.0-20181029234149-ec6d1f5cefe6 h1:4WsZyVtkthqrHTbDCJfiTs8IWNYE4uvsSDgaV6xpp+o= gonum.org/v1/netlib v0.0.0-20181029234149-ec6d1f5cefe6/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= -gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= -gonum.org/v1/netlib v0.0.0-20190331212654-76723241ea4e h1:jRyg0XfpwWlhEV8mDfdNGBeSJM2fuyh9Yjrnd8kF2Ts= -gonum.org/v1/netlib v0.0.0-20190331212654-76723241ea4e/go.mod h1:kS+toOQn6AQKjmKJ7gzohV1XkqsFehRA2FbsbkopSuQ= google.golang.org/api v0.0.0-20160322025152-9bf6e6e569ff/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= google.golang.org/api v0.0.0-20180910000450-7ca32eb868bf/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= google.golang.org/api v0.0.0-20181021000519-a2651947f503/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= @@ -1909,7 +1906,6 @@ gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v3 v3.0.0-20190709130402-674ba3eaed22/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20190905181640-827449938966/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20191026110619-0b21df46bc1d/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200601152816-913338de1bd2 h1:VEmvx0P+GVTgkNu2EdTN988YCZPcD3lo9AoczZpucwc= @@ -1927,35 +1923,37 @@ honnef.co/go/tools v0.0.1-2020.1.3 h1:sXmLre5bzIR6ypkjXCDI3jHPssRhc8KD/Ome589sc3 honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4 h1:UoveltGrhghAA7ePc+e+QYDHXrBps2PqFZiHkGR/xK8= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +honnef.co/go/tools v0.0.1-2020.1.5 h1:nI5egYTGJakVyOryqLs1cQO5dO0ksin5XXs2pspk75k= +honnef.co/go/tools v0.0.1-2020.1.5/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= istio.io/api v0.0.0-20200512234804-e5412c253ffe/go.mod h1:kyq3g5w42zl/AKlbzDGppYpGMQYMYMyZKeq0/eexML8= istio.io/client-go v0.0.0-20200513000250-b1d6e9886b7b/go.mod h1:aUDVNCOKom8n53OPEb7JxKucbKVNveDY4WJj7PGQb14= istio.io/gogo-genproto v0.0.0-20190930162913-45029607206a/go.mod h1:OzpAts7jljZceG4Vqi5/zXy/pOg1b209T3jb7Nv5wIs= -k8s.io/api v0.17.6 h1:S6qZSkjdOU0N/TYBZKoR1o7YVSiWMGFU0XXDoqs2ioA= -k8s.io/api v0.17.6/go.mod h1:1jKVwkj0UZ4huak/yRt3MFfU5wc32+B41SkNN5HhyFg= -k8s.io/apiextensions-apiserver v0.17.6 h1:o5JWDya65ApIVez+RfR40PGrqjPUZHhlSmwAHCvL20E= -k8s.io/apiextensions-apiserver v0.17.6/go.mod h1:Z3CHLP3Tha+Rbav7JR3S+ye427UaJkHBomK2c4XtZ3A= -k8s.io/apimachinery v0.17.6 h1:P0MNfucrmKLPsOSRbhDuG0Tplrpg7hVY4fJHh5sUIUw= -k8s.io/apimachinery v0.17.6/go.mod h1:Lg8zZ5iC/O8UjCqW6DNhcQG2m4TdjF9kwG3891OWbbA= -k8s.io/apiserver v0.17.6 h1:P1fEOotHOL+kuH8HGKSsos8L+GdORppaY6fBkGW1zHY= -k8s.io/apiserver v0.17.6/go.mod h1:sAYqm8hUDNA9aj/TzqwsJoExWrxprKv0tqs/z88qym0= +k8s.io/api v0.18.8 h1:aIKUzJPb96f3fKec2lxtY7acZC9gQNDLVhfSGpxBAC4= +k8s.io/api v0.18.8/go.mod h1:d/CXqwWv+Z2XEG1LgceeDmHQwpUJhROPx16SlxJgERY= +k8s.io/apiextensions-apiserver v0.18.8 h1:pkqYPKTHa0/3lYwH7201RpF9eFm0lmZDFBNzhN+k/sA= +k8s.io/apiextensions-apiserver v0.18.8/go.mod h1:7f4ySEkkvifIr4+BRrRWriKKIJjPyg9mb/p63dJKnlM= +k8s.io/apimachinery v0.18.8 h1:jimPrycCqgx2QPearX3to1JePz7wSbVLq+7PdBTTwQ0= +k8s.io/apimachinery v0.18.8/go.mod h1:6sQd+iHEqmOtALqOFjSWp2KZ9F0wlU/nWm0ZgsYWMig= +k8s.io/apiserver v0.18.8 h1:Au4kMn8sb1zFdyKqc8iMHLsYLxRI6Y+iAhRNKKQtlBY= +k8s.io/apiserver v0.18.8/go.mod h1:12u5FuGql8Cc497ORNj79rhPdiXQC4bf53X/skR/1YM= k8s.io/cli-runtime v0.17.2/go.mod h1:aa8t9ziyQdbkuizkNLAw3qe3srSyWh9zlSB7zTqRNPI= k8s.io/cli-runtime v0.17.3/go.mod h1:X7idckYphH4SZflgNpOOViSxetiMj6xI0viMAjM81TA= -k8s.io/client-go v0.17.6 h1:W/JkbAcIZUPb9vENRTC75ymjQQO3qEJAZyYhOIEOifM= -k8s.io/client-go v0.17.6/go.mod h1:tX5eAbQR/Kbqv+5R93rzHQoyRnPjjW2mm9i0lXnW218= +k8s.io/client-go v0.18.8 h1:SdbLpIxk5j5YbFr1b7fq8S7mDgDjYmUxSbszyoesoDM= +k8s.io/client-go v0.18.8/go.mod h1:HqFqMllQ5NnQJNwjro9k5zMyfhZlOwpuTLVrxjkYSxU= k8s.io/cloud-provider v0.17.0/go.mod h1:Ze4c3w2C0bRsjkBUoHpFi+qWe3ob1wI2/7cUn+YQIDE= k8s.io/cloud-provider v0.17.4/go.mod h1:XEjKDzfD+b9MTLXQFlDGkk6Ho8SGMpaU8Uugx/KNK9U= -k8s.io/code-generator v0.17.6 h1:2e0zgYsJmkc66HHEq7MoG1HgCEDCYLT08Y4VBcdzTkk= -k8s.io/code-generator v0.17.6/go.mod h1:iiHz51+oTx+Z9D0vB3CH3O4HDDPWrvZyUgUYaIE9h9M= +k8s.io/code-generator v0.18.8 h1:lgO1P1wjikEtzNvj7ia+x1VC4svJ28a/r0wnOLhhOTU= +k8s.io/code-generator v0.18.8/go.mod h1:TgNEVx9hCyPGpdtCWA34olQYLkh3ok9ar7XfSsr8b6c= k8s.io/component-base v0.17.0/go.mod h1:rKuRAokNMY2nn2A6LP/MiwpoaMRHpfRnrPaUJJj1Yoc= k8s.io/component-base v0.17.2/go.mod h1:zMPW3g5aH7cHJpKYQ/ZsGMcgbsA/VyhEugF3QT1awLs= k8s.io/component-base v0.17.4/go.mod h1:5BRqHMbbQPm2kKu35v3G+CpVq4K0RJKC7TRioF0I9lE= -k8s.io/component-base v0.17.6/go.mod h1:jgRLWl0B0rOzFNtxQ9E4BphPmDqoMafujdau6AdG2Xo= +k8s.io/component-base v0.18.8/go.mod h1:00frPRDas29rx58pPCxNkhUfPbwajlyyvu8ruNgSErU= k8s.io/csi-translation-lib v0.17.0/go.mod h1:HEF7MEz7pOLJCnxabi45IPkhSsE/KmxPQksuCrHKWls= k8s.io/csi-translation-lib v0.17.4/go.mod h1:CsxmjwxEI0tTNMzffIAcgR9lX4wOh6AKHdxQrT7L0oo= k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20190306031000-7a1b7fb0289f/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= -k8s.io/gengo v0.0.0-20190822140433-26a664648505/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20191108084044-e500ee069b5c/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= +k8s.io/gengo v0.0.0-20200114144118-36b2048a9120/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20200205140755-e0e292d8aa12 h1:pZzawYyz6VRNPVYpqGv61LWCimQv1BihyeqFrp50/G4= k8s.io/gengo v0.0.0-20200205140755-e0e292d8aa12/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= @@ -1968,6 +1966,7 @@ k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/kube-openapi v0.0.0-20180731170545-e3762e86a74c/go.mod h1:BXM9ceUBTj2QnfH2MK1odQs778ajze1RxcmP6S8RVVc= k8s.io/kube-openapi v0.0.0-20190816220812-743ec37842bf/go.mod h1:1TqjTSzOxsLGIKfj0lK8EeCP7K1iUG65v09OM0/WG5E= k8s.io/kube-openapi v0.0.0-20191107075043-30be4d16710a/go.mod h1:1TqjTSzOxsLGIKfj0lK8EeCP7K1iUG65v09OM0/WG5E= +k8s.io/kube-openapi v0.0.0-20200410145947-61e04a5be9a6/go.mod h1:GRQhZsXIAJ1xR0C9bd8UpWHZ5plfAS9fzPjJuQ6JL3E= k8s.io/kube-openapi v0.0.0-20200410145947-bcb3869e6f29 h1:NeQXVJ2XFSkRoPzRo8AId01ZER+j8oV4SZADT4iBOXQ= k8s.io/kube-openapi v0.0.0-20200410145947-bcb3869e6f29/go.mod h1:F+5wygcW0wmRTnM3cOgIqGivxkwSWIWT5YdsDbeAOaU= k8s.io/kubectl v0.17.2/go.mod h1:y4rfLV0n6aPmvbRCqZQjvOp3ezxsFgpqL+zF5jH/lxk= @@ -1990,17 +1989,20 @@ k8s.io/utils v0.0.0-20190907131718-3d4f5b7dea0b/go.mod h1:sZAwmy6armz5eXlNoLmJcl k8s.io/utils v0.0.0-20191114184206-e782cd3c129f/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= k8s.io/utils v0.0.0-20200124190032-861946025e34 h1:HjlUD6M0K3P8nRXmr2B9o4F9dUy9TCj/aEpReeyi6+k= k8s.io/utils v0.0.0-20200124190032-861946025e34/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= +k8s.io/utils v0.0.0-20200324210504-a9aa75ae1b89/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= k8s.io/utils v0.0.0-20200603063816-c1c6865ac451 h1:v8ud2Up6QK1lNOKFgiIVrZdMg7MpmSnvtrOieolJKoE= k8s.io/utils v0.0.0-20200603063816-c1c6865ac451/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= knative.dev/caching v0.0.0-20190719140829-2032732871ff/go.mod h1:dHXFU6CGlLlbzaWc32g80cR92iuBSpsslDNBWI8C7eg= knative.dev/caching v0.0.0-20200116200605-67bca2c83dfa/go.mod h1:dHXFU6CGlLlbzaWc32g80cR92iuBSpsslDNBWI8C7eg= -knative.dev/caching v0.0.0-20200909143351-1c094a1d6eb7/go.mod h1:nYF4RioVWBBmESrsFxoHagAdIrRmwce5VqYfAdnaRRs= -knative.dev/eventing v0.17.1-0.20200911130100-1fec6b5212c0 h1:4hgOKW36n6MxJBN85L4BI1Vy6GekkFqBb48K57AAJEA= -knative.dev/eventing v0.17.1-0.20200911130100-1fec6b5212c0/go.mod h1:0T4I4GhHIJDTxSRcTdCSr+4Gfe53Mf7lrsqSUX7mz+c= +knative.dev/caching v0.0.0-20200911153201-58627457dc58/go.mod h1:P5WXVMZ8HDtt1mTmtlT8/tULj/v4JPZGaz7v5PKl7vc= +knative.dev/eventing v0.17.1-0.20200911202500-2a052dbdc2fb h1:1BlehML3J2zMgeE5TA5IrIc1adKTOOD1/fht6kyTNSA= +knative.dev/eventing v0.17.1-0.20200911202500-2a052dbdc2fb/go.mod h1:aa/wrnpX6Xa+sdVUso9K//0j8rvrAjURSkMzvvt4Vuo= +knative.dev/eventing-contrib v0.6.1-0.20190723221543-5ce18048c08b/go.mod h1:SnXZgSGgMSMLNFTwTnpaOH7hXDzTFtw0J8OmHflNx3g= +knative.dev/eventing-contrib v0.6.1-0.20190723221543-5ce18048c08b/go.mod h1:SnXZgSGgMSMLNFTwTnpaOH7hXDzTFtw0J8OmHflNx3g= knative.dev/eventing-contrib v0.6.1-0.20190723221543-5ce18048c08b/go.mod h1:SnXZgSGgMSMLNFTwTnpaOH7hXDzTFtw0J8OmHflNx3g= knative.dev/eventing-contrib v0.11.2/go.mod h1:SnXZgSGgMSMLNFTwTnpaOH7hXDzTFtw0J8OmHflNx3g= -knative.dev/networking v0.0.0-20200910005051-91f8ce8c55f7 h1:i94Mj0Z+HinkfQs8qeH/mtomgKTTl/SNhXKV1oA9+G8= -knative.dev/networking v0.0.0-20200910005051-91f8ce8c55f7/go.mod h1:dvbKqbY4Fa54TecwSESpJmrKUTOTAir/XLpBzuA45sY= +knative.dev/networking v0.0.0-20200911160100-731bfc03416d h1:k7JEoZjLVO6DYw8tXe1F+BtaIYrtz0IWXoQ9z6gwJG0= +knative.dev/networking v0.0.0-20200911160100-731bfc03416d/go.mod h1:KJABtBUM4OycelvzpPxaGEucfWDUkKlDp0tL0rWfars= knative.dev/pkg v0.0.0-20191101194912-56c2594e4f11/go.mod h1:pgODObA1dTyhNoFxPZTTjNWfx6F0aKsKzn+vaT9XO/Q= knative.dev/pkg v0.0.0-20191111150521-6d806b998379/go.mod h1:pgODObA1dTyhNoFxPZTTjNWfx6F0aKsKzn+vaT9XO/Q= knative.dev/pkg v0.0.0-20200207155214-fef852970f43/go.mod h1:pgODObA1dTyhNoFxPZTTjNWfx6F0aKsKzn+vaT9XO/Q= @@ -2009,31 +2011,19 @@ knative.dev/pkg v0.0.0-20200505191044-3da93ebb24c2/go.mod h1:Q6sL35DdGs8hIQZKdaC knative.dev/pkg v0.0.0-20200515002500-16d7b963416f/go.mod h1:tMOHGbxtRz8zYFGEGpV/bpoTEM1o89MwYFC4YJXl3GY= knative.dev/pkg v0.0.0-20200528142800-1c6815d7e4c9/go.mod h1:QgNZTxnwpB/oSpNcfnLVlw+WpEwwyKAvJlvR3hgeltA= knative.dev/pkg v0.0.0-20200711004937-22502028e31a/go.mod h1:AqAJV6rYi8IGikDjJ/9ZQd9qKdkXVlesVnVjwx62YB8= -knative.dev/pkg v0.0.0-20200908235250-56fba14ba7df h1:5J1YYhiU5g8a2pdnPFiRy+vtPsUHbdoLflJe1RqZnHk= -knative.dev/pkg v0.0.0-20200908235250-56fba14ba7df/go.mod h1:q+4+Cm768P6vsAvsD9J+cZ1hoy4aHyHSfRTvaFyPd3g= -knative.dev/pkg v0.0.0-20200909225950-616884240072/go.mod h1:q+4+Cm768P6vsAvsD9J+cZ1hoy4aHyHSfRTvaFyPd3g= -knative.dev/pkg v0.0.0-20200910010051-a79a813ce123/go.mod h1:q+4+Cm768P6vsAvsD9J+cZ1hoy4aHyHSfRTvaFyPd3g= -knative.dev/pkg v0.0.0-20200910143251-0761d6b47e4d h1:YaJAscqbcmSMKnnswsg58EigQFCz4fmXVEAVbOjWmkw= -knative.dev/pkg v0.0.0-20200910143251-0761d6b47e4d/go.mod h1:4rxnb/Cvzv0C2JFsqYAkpqeT392Y7ui6qy7UiSrrYDg= -knative.dev/serving v0.17.1-0.20200910185451-e82b666ecbbb h1:WNzOWbeyWE+nJG8sUT+/4HYJt+c0fUfg45qMC7LlhH4= -knative.dev/serving v0.17.1-0.20200910185451-e82b666ecbbb/go.mod h1:jhTtvYNheAdAd1T3EQr/V7rcsKpS80TRaHx2dF43k40= +knative.dev/pkg v0.0.0-20200911145400-2d4efecc6bc1 h1:YO9A5F0xo6sTeJZyrV9/IIeVNfKqNz9udsWsofe9eQk= +knative.dev/pkg v0.0.0-20200911145400-2d4efecc6bc1/go.mod h1:igZfLQk2QpRo+cxbH4NfsgbdavqsXr1rMr818/xVu3c= +knative.dev/serving v0.17.1-0.20200911183800-3e7b71d67f00 h1:pUe8g6tXbxDYLQoppCTWmfuMGvKUY+HYj6LD4YKcvcE= +knative.dev/serving v0.17.1-0.20200911183800-3e7b71d67f00/go.mod h1:AAAGuCEbJjbxvR9CmyxMu/cLFIa9eTRhbOgOaPk+aSk= knative.dev/test-infra v0.0.0-20200407185800-1b88cb3b45a5/go.mod h1:xcdUkMJrLlBswIZqL5zCuBFOC22WIPMQoVX1L35i0vQ= knative.dev/test-infra v0.0.0-20200505052144-5ea2f705bb55/go.mod h1:WqF1Azka+FxPZ20keR2zCNtiQA1MP9ZB4BH4HuI+SIU= knative.dev/test-infra v0.0.0-20200513011557-d03429a76034/go.mod h1:aMif0KXL4g19YCYwsy4Ocjjz5xgPlseYV+B95Oo4JGE= knative.dev/test-infra v0.0.0-20200519015156-82551620b0a9/go.mod h1:A5b2OAXTOeHT3hHhVQm3dmtbuWvIDP7qzgtqxA3/2pE= knative.dev/test-infra v0.0.0-20200707183444-aed09e56ddc7/go.mod h1:RjYAhXnZqeHw9+B0zsbqSPlae0lCvjekO/nw5ZMpLCs= -knative.dev/test-infra v0.0.0-20200828211307-9d4372c9b1c7 h1:yIzao6i9Hu51SCdpyqBEnhpt7G12FqFrxHK6ZnQnu8o= -knative.dev/test-infra v0.0.0-20200828211307-9d4372c9b1c7/go.mod h1:Pmg2c7Z7q7BGFUV/GOpU5BlrD3ePJft4MPqx8AYBplc= -knative.dev/test-infra v0.0.0-20200908182932-5a8105609141 h1:bgtLzFLtOYETW03Dm4i9TLZ7m9ycYNTAGZixsZdcn7Q= -knative.dev/test-infra v0.0.0-20200908182932-5a8105609141/go.mod h1:Pmg2c7Z7q7BGFUV/GOpU5BlrD3ePJft4MPqx8AYBplc= +knative.dev/test-infra v0.0.0-20200909211651-72eb6ae3c773 h1:R/kYdvSoein2a6BwY1FSZH8wk0aHQ9gN3GQf94AGqcs= knative.dev/test-infra v0.0.0-20200909211651-72eb6ae3c773/go.mod h1:Pmg2c7Z7q7BGFUV/GOpU5BlrD3ePJft4MPqx8AYBplc= knative.dev/test-infra v0.0.0-20200910231400-cfba2288403d h1:0rvMkMqr6RYsIn4iL/G71FC7B6srbUj59dyuPecuzsI= knative.dev/test-infra v0.0.0-20200910231400-cfba2288403d/go.mod h1:Pmg2c7Z7q7BGFUV/GOpU5BlrD3ePJft4MPqx8AYBplc= -modernc.org/cc v1.0.0/go.mod h1:1Sk4//wdnYJiUIxnW8ddKpaOJCF37yAdqYnkxUpaYxw= -modernc.org/golex v1.0.0/go.mod h1:b/QX9oBD/LhixY6NDh+IdGv17hgB+51fET1i2kPSmvk= -modernc.org/mathutil v1.0.0/go.mod h1:wU0vUrJsVWBZ4P6e7xtFJEhFSNsfRLJ8H458uRjg03k= -modernc.org/strutil v1.0.0/go.mod h1:lstksw84oURvj9y3tn8lGvRxyRC1S2+g5uuIzNfIOBs= -modernc.org/xc v1.0.0/go.mod h1:mRNCo0bvLjGhHO9WsyuKVU4q0ceiDDDoEeWDJHrNx8I= mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed/go.mod h1:Xkxe497xwlCKkIaQYRfC7CSLworTXY9RMqwhhCm+8Nc= mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b/go.mod h1:2odslEg/xrtNQqCYg2/jCoyKnw3vv5biOc3JnIcYfL4= mvdan.cc/unparam v0.0.0-20190720180237-d51796306d8f/go.mod h1:4G1h5nDURzA3bwVMZIVpwbkw+04kSxk3rAtzlimaUJw= @@ -2045,6 +2035,7 @@ rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8 rsc.io/letsencrypt v0.0.3/go.mod h1:buyQKZ6IXrRnB7TdkHP0RyEybLx18HHyOSoTyoOLqNY= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= +sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.7/go.mod h1:PHgbrJT7lCHcxMU+mDHEm+nx46H4zuuHZkDP6icnhu0= sigs.k8s.io/boskos v0.0.0-20200526191642-45fc818e2d00/go.mod h1:L1ubP7d1CCMSQSjKiZv6dGbh7b4kfoG+dFPj8cfYDnI= sigs.k8s.io/boskos v0.0.0-20200617235605-f289ba6555ba/go.mod h1:ZO5RV+VxJS9mb6DvZ1yAjywoyq/wQ8b0vDoZxcIA5kE= sigs.k8s.io/boskos v0.0.0-20200729174948-794df80db9c9/go.mod h1:ZO5RV+VxJS9mb6DvZ1yAjywoyq/wQ8b0vDoZxcIA5kE= @@ -2052,10 +2043,13 @@ sigs.k8s.io/controller-runtime v0.3.0/go.mod h1:Cw6PkEg0Sa7dAYovGT4R0tRkGhHXpYij sigs.k8s.io/controller-runtime v0.5.0/go.mod h1:REiJzC7Y00U+2YkMbT8wxgrsX5USpXKGhb2sCtAXiT8= sigs.k8s.io/controller-runtime v0.5.4/go.mod h1:JZUwSMVbxDupo0lTJSSFP5pimEyxGynROImSsqIOx1A= sigs.k8s.io/controller-runtime v0.6.1/go.mod h1:XRYBPdbf5XJu9kpS84VJiZ7h/u1hF3gEORz0efEja7A= -sigs.k8s.io/controller-tools v0.0.0-20200528125929-5c0c6ae3b64b/go.mod h1:enhtKGfxZD1GFEoMgP8Fdbu+uKQ/cq1/WGJhdVChfvI= sigs.k8s.io/kustomize v2.0.3+incompatible/go.mod h1:MkjgH3RdOWrievjo6c9T245dYlB5QeXV4WCbnt/PEpU= +sigs.k8s.io/structured-merge-diff v0.0.0-20190525122527-15d366b2352e h1:4Z09Hglb792X0kfOBBJUPFEyvVfQWrYT/l8h5EKA6JQ= sigs.k8s.io/structured-merge-diff v0.0.0-20190525122527-15d366b2352e/go.mod h1:wWxsB5ozmmv/SG7nM11ayaAW51xMvak/t1r0CSlcokI= sigs.k8s.io/structured-merge-diff/v2 v2.0.1/go.mod h1:Wb7vfKAodbKgf6tn1Kl0VvGj7mRH6DGaRcixXEJXTsE= +sigs.k8s.io/structured-merge-diff/v3 v3.0.0-20200116222232-67a7b8c61874/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw= +sigs.k8s.io/structured-merge-diff/v3 v3.0.0/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw= +sigs.k8s.io/structured-merge-diff/v3 v3.0.1-0.20200706213357-43c19bbb7fba h1:AAbnc5KQuTWKuh2QSnyghKIOTFzB0Jayv7/OFDn3Cy4= sigs.k8s.io/structured-merge-diff/v3 v3.0.1-0.20200706213357-43c19bbb7fba/go.mod h1:V06abazjHneE37ZdSY/UUwPVgcJMKI/jU5XGUjgIKoc= sigs.k8s.io/testing_frameworks v0.1.1/go.mod h1:VVBKrHmJ6Ekkfz284YKhQePcdycOzNH9qL6ht1zEr/U= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= diff --git a/hack/update-codegen.sh b/hack/update-codegen.sh index a271b50439..12fabdff0b 100755 --- a/hack/update-codegen.sh +++ b/hack/update-codegen.sh @@ -35,19 +35,8 @@ KNATIVE_CODEGEN_PKG=${KNATIVE_CODEGEN_PKG:-$(cd ${REPO_ROOT_DIR}; ls -d -1 $(dir chmod +x ${CODEGEN_PKG}/generate-groups.sh chmod +x ${KNATIVE_CODEGEN_PKG}/hack/generate-knative.sh -( - # External Camel API - OUTPUT_PKG="knative.dev/eventing-contrib/camel/source/pkg/camel-k/injection" \ - VERSIONED_CLIENTSET_PKG="github.com/apache/camel-k/pkg/client/camel/clientset/versioned" \ - EXTERNAL_INFORMER_PKG="github.com/apache/camel-k/pkg/client/camel/informers/externalversions" \ - ${KNATIVE_CODEGEN_PKG}/hack/generate-knative.sh "injection" \ - "knative.dev/eventing-contrib/camel/source/pkg/client/camel" "github.com/apache/camel-k/pkg/apis" \ - "camel:v1" \ - --go-header-file ${REPO_ROOT_DIR}/hack/boilerplate.go.txt -) - # Just Sources -API_DIRS_SOURCES=(camel/source/pkg awssqs/pkg couchdb/source/pkg prometheus/pkg) +API_DIRS_SOURCES=(awssqs/pkg couchdb/source/pkg prometheus/pkg) for DIR in "${API_DIRS_SOURCES[@]}"; do # generate the code with: @@ -153,7 +142,6 @@ ${GOPATH}/bin/deepcopy-gen \ -i knative.dev/eventing-contrib/prometheus/pkg/apis \ -i knative.dev/eventing-contrib/awssqs/pkg/apis \ -i knative.dev/eventing-contrib/couchdb/source/pkg/apis \ - -i knative.dev/eventing-contrib/camel/source/pkg/apis \ -i knative.dev/eventing-contrib/github/pkg/apis \ -i knative.dev/eventing-contrib/gitlab/pkg/apis diff --git a/kafka/channel/pkg/client/clientset/versioned/clientset.go b/kafka/channel/pkg/client/clientset/versioned/clientset.go index b3c5b8b136..0fcf06a5dd 100644 --- a/kafka/channel/pkg/client/clientset/versioned/clientset.go +++ b/kafka/channel/pkg/client/clientset/versioned/clientset.go @@ -67,7 +67,7 @@ func NewForConfig(c *rest.Config) (*Clientset, error) { configShallowCopy := *c if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 { if configShallowCopy.Burst <= 0 { - return nil, fmt.Errorf("Burst is required to be greater than 0 when RateLimiter is not set and QPS is set to greater than 0") + return nil, fmt.Errorf("burst is required to be greater than 0 when RateLimiter is not set and QPS is set to greater than 0") } configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst) } diff --git a/kafka/channel/pkg/client/clientset/versioned/typed/messaging/v1alpha1/fake/fake_kafkachannel.go b/kafka/channel/pkg/client/clientset/versioned/typed/messaging/v1alpha1/fake/fake_kafkachannel.go index b61a5f52cf..3aaa4d4f94 100644 --- a/kafka/channel/pkg/client/clientset/versioned/typed/messaging/v1alpha1/fake/fake_kafkachannel.go +++ b/kafka/channel/pkg/client/clientset/versioned/typed/messaging/v1alpha1/fake/fake_kafkachannel.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -39,7 +41,7 @@ var kafkachannelsResource = schema.GroupVersionResource{Group: "messaging.knativ var kafkachannelsKind = schema.GroupVersionKind{Group: "messaging.knative.dev", Version: "v1alpha1", Kind: "KafkaChannel"} // Get takes name of the kafkaChannel, and returns the corresponding kafkaChannel object, and an error if there is any. -func (c *FakeKafkaChannels) Get(name string, options v1.GetOptions) (result *v1alpha1.KafkaChannel, err error) { +func (c *FakeKafkaChannels) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.KafkaChannel, err error) { obj, err := c.Fake. Invokes(testing.NewGetAction(kafkachannelsResource, c.ns, name), &v1alpha1.KafkaChannel{}) @@ -50,7 +52,7 @@ func (c *FakeKafkaChannels) Get(name string, options v1.GetOptions) (result *v1a } // List takes label and field selectors, and returns the list of KafkaChannels that match those selectors. -func (c *FakeKafkaChannels) List(opts v1.ListOptions) (result *v1alpha1.KafkaChannelList, err error) { +func (c *FakeKafkaChannels) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.KafkaChannelList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(kafkachannelsResource, kafkachannelsKind, c.ns, opts), &v1alpha1.KafkaChannelList{}) @@ -72,14 +74,14 @@ func (c *FakeKafkaChannels) List(opts v1.ListOptions) (result *v1alpha1.KafkaCha } // Watch returns a watch.Interface that watches the requested kafkaChannels. -func (c *FakeKafkaChannels) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeKafkaChannels) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(kafkachannelsResource, c.ns, opts)) } // Create takes the representation of a kafkaChannel and creates it. Returns the server's representation of the kafkaChannel, and an error, if there is any. -func (c *FakeKafkaChannels) Create(kafkaChannel *v1alpha1.KafkaChannel) (result *v1alpha1.KafkaChannel, err error) { +func (c *FakeKafkaChannels) Create(ctx context.Context, kafkaChannel *v1alpha1.KafkaChannel, opts v1.CreateOptions) (result *v1alpha1.KafkaChannel, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(kafkachannelsResource, c.ns, kafkaChannel), &v1alpha1.KafkaChannel{}) @@ -90,7 +92,7 @@ func (c *FakeKafkaChannels) Create(kafkaChannel *v1alpha1.KafkaChannel) (result } // Update takes the representation of a kafkaChannel and updates it. Returns the server's representation of the kafkaChannel, and an error, if there is any. -func (c *FakeKafkaChannels) Update(kafkaChannel *v1alpha1.KafkaChannel) (result *v1alpha1.KafkaChannel, err error) { +func (c *FakeKafkaChannels) Update(ctx context.Context, kafkaChannel *v1alpha1.KafkaChannel, opts v1.UpdateOptions) (result *v1alpha1.KafkaChannel, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(kafkachannelsResource, c.ns, kafkaChannel), &v1alpha1.KafkaChannel{}) @@ -102,7 +104,7 @@ func (c *FakeKafkaChannels) Update(kafkaChannel *v1alpha1.KafkaChannel) (result // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeKafkaChannels) UpdateStatus(kafkaChannel *v1alpha1.KafkaChannel) (*v1alpha1.KafkaChannel, error) { +func (c *FakeKafkaChannels) UpdateStatus(ctx context.Context, kafkaChannel *v1alpha1.KafkaChannel, opts v1.UpdateOptions) (*v1alpha1.KafkaChannel, error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(kafkachannelsResource, "status", c.ns, kafkaChannel), &v1alpha1.KafkaChannel{}) @@ -113,7 +115,7 @@ func (c *FakeKafkaChannels) UpdateStatus(kafkaChannel *v1alpha1.KafkaChannel) (* } // Delete takes name of the kafkaChannel and deletes it. Returns an error if one occurs. -func (c *FakeKafkaChannels) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeKafkaChannels) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewDeleteAction(kafkachannelsResource, c.ns, name), &v1alpha1.KafkaChannel{}) @@ -121,15 +123,15 @@ func (c *FakeKafkaChannels) Delete(name string, options *v1.DeleteOptions) error } // DeleteCollection deletes a collection of objects. -func (c *FakeKafkaChannels) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(kafkachannelsResource, c.ns, listOptions) +func (c *FakeKafkaChannels) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(kafkachannelsResource, c.ns, listOpts) _, err := c.Fake.Invokes(action, &v1alpha1.KafkaChannelList{}) return err } // Patch applies the patch and returns the patched kafkaChannel. -func (c *FakeKafkaChannels) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.KafkaChannel, err error) { +func (c *FakeKafkaChannels) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.KafkaChannel, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(kafkachannelsResource, c.ns, name, pt, data, subresources...), &v1alpha1.KafkaChannel{}) diff --git a/kafka/channel/pkg/client/clientset/versioned/typed/messaging/v1alpha1/kafkachannel.go b/kafka/channel/pkg/client/clientset/versioned/typed/messaging/v1alpha1/kafkachannel.go index d5d65824aa..e296b20a29 100644 --- a/kafka/channel/pkg/client/clientset/versioned/typed/messaging/v1alpha1/kafkachannel.go +++ b/kafka/channel/pkg/client/clientset/versioned/typed/messaging/v1alpha1/kafkachannel.go @@ -19,6 +19,7 @@ limitations under the License. package v1alpha1 import ( + "context" "time" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -37,15 +38,15 @@ type KafkaChannelsGetter interface { // KafkaChannelInterface has methods to work with KafkaChannel resources. type KafkaChannelInterface interface { - Create(*v1alpha1.KafkaChannel) (*v1alpha1.KafkaChannel, error) - Update(*v1alpha1.KafkaChannel) (*v1alpha1.KafkaChannel, error) - UpdateStatus(*v1alpha1.KafkaChannel) (*v1alpha1.KafkaChannel, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*v1alpha1.KafkaChannel, error) - List(opts v1.ListOptions) (*v1alpha1.KafkaChannelList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.KafkaChannel, err error) + Create(ctx context.Context, kafkaChannel *v1alpha1.KafkaChannel, opts v1.CreateOptions) (*v1alpha1.KafkaChannel, error) + Update(ctx context.Context, kafkaChannel *v1alpha1.KafkaChannel, opts v1.UpdateOptions) (*v1alpha1.KafkaChannel, error) + UpdateStatus(ctx context.Context, kafkaChannel *v1alpha1.KafkaChannel, opts v1.UpdateOptions) (*v1alpha1.KafkaChannel, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.KafkaChannel, error) + List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.KafkaChannelList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.KafkaChannel, err error) KafkaChannelExpansion } @@ -64,20 +65,20 @@ func newKafkaChannels(c *MessagingV1alpha1Client, namespace string) *kafkaChanne } // Get takes name of the kafkaChannel, and returns the corresponding kafkaChannel object, and an error if there is any. -func (c *kafkaChannels) Get(name string, options v1.GetOptions) (result *v1alpha1.KafkaChannel, err error) { +func (c *kafkaChannels) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.KafkaChannel, err error) { result = &v1alpha1.KafkaChannel{} err = c.client.Get(). Namespace(c.ns). Resource("kafkachannels"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of KafkaChannels that match those selectors. -func (c *kafkaChannels) List(opts v1.ListOptions) (result *v1alpha1.KafkaChannelList, err error) { +func (c *kafkaChannels) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.KafkaChannelList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -88,13 +89,13 @@ func (c *kafkaChannels) List(opts v1.ListOptions) (result *v1alpha1.KafkaChannel Resource("kafkachannels"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested kafkaChannels. -func (c *kafkaChannels) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *kafkaChannels) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -105,87 +106,90 @@ func (c *kafkaChannels) Watch(opts v1.ListOptions) (watch.Interface, error) { Resource("kafkachannels"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a kafkaChannel and creates it. Returns the server's representation of the kafkaChannel, and an error, if there is any. -func (c *kafkaChannels) Create(kafkaChannel *v1alpha1.KafkaChannel) (result *v1alpha1.KafkaChannel, err error) { +func (c *kafkaChannels) Create(ctx context.Context, kafkaChannel *v1alpha1.KafkaChannel, opts v1.CreateOptions) (result *v1alpha1.KafkaChannel, err error) { result = &v1alpha1.KafkaChannel{} err = c.client.Post(). Namespace(c.ns). Resource("kafkachannels"). + VersionedParams(&opts, scheme.ParameterCodec). Body(kafkaChannel). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a kafkaChannel and updates it. Returns the server's representation of the kafkaChannel, and an error, if there is any. -func (c *kafkaChannels) Update(kafkaChannel *v1alpha1.KafkaChannel) (result *v1alpha1.KafkaChannel, err error) { +func (c *kafkaChannels) Update(ctx context.Context, kafkaChannel *v1alpha1.KafkaChannel, opts v1.UpdateOptions) (result *v1alpha1.KafkaChannel, err error) { result = &v1alpha1.KafkaChannel{} err = c.client.Put(). Namespace(c.ns). Resource("kafkachannels"). Name(kafkaChannel.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(kafkaChannel). - Do(). + Do(ctx). Into(result) return } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *kafkaChannels) UpdateStatus(kafkaChannel *v1alpha1.KafkaChannel) (result *v1alpha1.KafkaChannel, err error) { +func (c *kafkaChannels) UpdateStatus(ctx context.Context, kafkaChannel *v1alpha1.KafkaChannel, opts v1.UpdateOptions) (result *v1alpha1.KafkaChannel, err error) { result = &v1alpha1.KafkaChannel{} err = c.client.Put(). Namespace(c.ns). Resource("kafkachannels"). Name(kafkaChannel.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(kafkaChannel). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the kafkaChannel and deletes it. Returns an error if one occurs. -func (c *kafkaChannels) Delete(name string, options *v1.DeleteOptions) error { +func (c *kafkaChannels) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("kafkachannels"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *kafkaChannels) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *kafkaChannels) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Namespace(c.ns). Resource("kafkachannels"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched kafkaChannel. -func (c *kafkaChannels) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.KafkaChannel, err error) { +func (c *kafkaChannels) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.KafkaChannel, err error) { result = &v1alpha1.KafkaChannel{} err = c.client.Patch(pt). Namespace(c.ns). Resource("kafkachannels"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/kafka/channel/pkg/client/clientset/versioned/typed/messaging/v1beta1/fake/fake_kafkachannel.go b/kafka/channel/pkg/client/clientset/versioned/typed/messaging/v1beta1/fake/fake_kafkachannel.go index 851165449d..76f1edd60c 100644 --- a/kafka/channel/pkg/client/clientset/versioned/typed/messaging/v1beta1/fake/fake_kafkachannel.go +++ b/kafka/channel/pkg/client/clientset/versioned/typed/messaging/v1beta1/fake/fake_kafkachannel.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -39,7 +41,7 @@ var kafkachannelsResource = schema.GroupVersionResource{Group: "messaging.knativ var kafkachannelsKind = schema.GroupVersionKind{Group: "messaging.knative.dev", Version: "v1beta1", Kind: "KafkaChannel"} // Get takes name of the kafkaChannel, and returns the corresponding kafkaChannel object, and an error if there is any. -func (c *FakeKafkaChannels) Get(name string, options v1.GetOptions) (result *v1beta1.KafkaChannel, err error) { +func (c *FakeKafkaChannels) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.KafkaChannel, err error) { obj, err := c.Fake. Invokes(testing.NewGetAction(kafkachannelsResource, c.ns, name), &v1beta1.KafkaChannel{}) @@ -50,7 +52,7 @@ func (c *FakeKafkaChannels) Get(name string, options v1.GetOptions) (result *v1b } // List takes label and field selectors, and returns the list of KafkaChannels that match those selectors. -func (c *FakeKafkaChannels) List(opts v1.ListOptions) (result *v1beta1.KafkaChannelList, err error) { +func (c *FakeKafkaChannels) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.KafkaChannelList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(kafkachannelsResource, kafkachannelsKind, c.ns, opts), &v1beta1.KafkaChannelList{}) @@ -72,14 +74,14 @@ func (c *FakeKafkaChannels) List(opts v1.ListOptions) (result *v1beta1.KafkaChan } // Watch returns a watch.Interface that watches the requested kafkaChannels. -func (c *FakeKafkaChannels) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeKafkaChannels) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(kafkachannelsResource, c.ns, opts)) } // Create takes the representation of a kafkaChannel and creates it. Returns the server's representation of the kafkaChannel, and an error, if there is any. -func (c *FakeKafkaChannels) Create(kafkaChannel *v1beta1.KafkaChannel) (result *v1beta1.KafkaChannel, err error) { +func (c *FakeKafkaChannels) Create(ctx context.Context, kafkaChannel *v1beta1.KafkaChannel, opts v1.CreateOptions) (result *v1beta1.KafkaChannel, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(kafkachannelsResource, c.ns, kafkaChannel), &v1beta1.KafkaChannel{}) @@ -90,7 +92,7 @@ func (c *FakeKafkaChannels) Create(kafkaChannel *v1beta1.KafkaChannel) (result * } // Update takes the representation of a kafkaChannel and updates it. Returns the server's representation of the kafkaChannel, and an error, if there is any. -func (c *FakeKafkaChannels) Update(kafkaChannel *v1beta1.KafkaChannel) (result *v1beta1.KafkaChannel, err error) { +func (c *FakeKafkaChannels) Update(ctx context.Context, kafkaChannel *v1beta1.KafkaChannel, opts v1.UpdateOptions) (result *v1beta1.KafkaChannel, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(kafkachannelsResource, c.ns, kafkaChannel), &v1beta1.KafkaChannel{}) @@ -102,7 +104,7 @@ func (c *FakeKafkaChannels) Update(kafkaChannel *v1beta1.KafkaChannel) (result * // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeKafkaChannels) UpdateStatus(kafkaChannel *v1beta1.KafkaChannel) (*v1beta1.KafkaChannel, error) { +func (c *FakeKafkaChannels) UpdateStatus(ctx context.Context, kafkaChannel *v1beta1.KafkaChannel, opts v1.UpdateOptions) (*v1beta1.KafkaChannel, error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(kafkachannelsResource, "status", c.ns, kafkaChannel), &v1beta1.KafkaChannel{}) @@ -113,7 +115,7 @@ func (c *FakeKafkaChannels) UpdateStatus(kafkaChannel *v1beta1.KafkaChannel) (*v } // Delete takes name of the kafkaChannel and deletes it. Returns an error if one occurs. -func (c *FakeKafkaChannels) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeKafkaChannels) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewDeleteAction(kafkachannelsResource, c.ns, name), &v1beta1.KafkaChannel{}) @@ -121,15 +123,15 @@ func (c *FakeKafkaChannels) Delete(name string, options *v1.DeleteOptions) error } // DeleteCollection deletes a collection of objects. -func (c *FakeKafkaChannels) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(kafkachannelsResource, c.ns, listOptions) +func (c *FakeKafkaChannels) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(kafkachannelsResource, c.ns, listOpts) _, err := c.Fake.Invokes(action, &v1beta1.KafkaChannelList{}) return err } // Patch applies the patch and returns the patched kafkaChannel. -func (c *FakeKafkaChannels) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.KafkaChannel, err error) { +func (c *FakeKafkaChannels) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.KafkaChannel, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(kafkachannelsResource, c.ns, name, pt, data, subresources...), &v1beta1.KafkaChannel{}) diff --git a/kafka/channel/pkg/client/clientset/versioned/typed/messaging/v1beta1/kafkachannel.go b/kafka/channel/pkg/client/clientset/versioned/typed/messaging/v1beta1/kafkachannel.go index afac4ad46f..ff082cb2a5 100644 --- a/kafka/channel/pkg/client/clientset/versioned/typed/messaging/v1beta1/kafkachannel.go +++ b/kafka/channel/pkg/client/clientset/versioned/typed/messaging/v1beta1/kafkachannel.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" "time" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -37,15 +38,15 @@ type KafkaChannelsGetter interface { // KafkaChannelInterface has methods to work with KafkaChannel resources. type KafkaChannelInterface interface { - Create(*v1beta1.KafkaChannel) (*v1beta1.KafkaChannel, error) - Update(*v1beta1.KafkaChannel) (*v1beta1.KafkaChannel, error) - UpdateStatus(*v1beta1.KafkaChannel) (*v1beta1.KafkaChannel, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*v1beta1.KafkaChannel, error) - List(opts v1.ListOptions) (*v1beta1.KafkaChannelList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.KafkaChannel, err error) + Create(ctx context.Context, kafkaChannel *v1beta1.KafkaChannel, opts v1.CreateOptions) (*v1beta1.KafkaChannel, error) + Update(ctx context.Context, kafkaChannel *v1beta1.KafkaChannel, opts v1.UpdateOptions) (*v1beta1.KafkaChannel, error) + UpdateStatus(ctx context.Context, kafkaChannel *v1beta1.KafkaChannel, opts v1.UpdateOptions) (*v1beta1.KafkaChannel, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.KafkaChannel, error) + List(ctx context.Context, opts v1.ListOptions) (*v1beta1.KafkaChannelList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.KafkaChannel, err error) KafkaChannelExpansion } @@ -64,20 +65,20 @@ func newKafkaChannels(c *MessagingV1beta1Client, namespace string) *kafkaChannel } // Get takes name of the kafkaChannel, and returns the corresponding kafkaChannel object, and an error if there is any. -func (c *kafkaChannels) Get(name string, options v1.GetOptions) (result *v1beta1.KafkaChannel, err error) { +func (c *kafkaChannels) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.KafkaChannel, err error) { result = &v1beta1.KafkaChannel{} err = c.client.Get(). Namespace(c.ns). Resource("kafkachannels"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of KafkaChannels that match those selectors. -func (c *kafkaChannels) List(opts v1.ListOptions) (result *v1beta1.KafkaChannelList, err error) { +func (c *kafkaChannels) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.KafkaChannelList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -88,13 +89,13 @@ func (c *kafkaChannels) List(opts v1.ListOptions) (result *v1beta1.KafkaChannelL Resource("kafkachannels"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested kafkaChannels. -func (c *kafkaChannels) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *kafkaChannels) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -105,87 +106,90 @@ func (c *kafkaChannels) Watch(opts v1.ListOptions) (watch.Interface, error) { Resource("kafkachannels"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a kafkaChannel and creates it. Returns the server's representation of the kafkaChannel, and an error, if there is any. -func (c *kafkaChannels) Create(kafkaChannel *v1beta1.KafkaChannel) (result *v1beta1.KafkaChannel, err error) { +func (c *kafkaChannels) Create(ctx context.Context, kafkaChannel *v1beta1.KafkaChannel, opts v1.CreateOptions) (result *v1beta1.KafkaChannel, err error) { result = &v1beta1.KafkaChannel{} err = c.client.Post(). Namespace(c.ns). Resource("kafkachannels"). + VersionedParams(&opts, scheme.ParameterCodec). Body(kafkaChannel). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a kafkaChannel and updates it. Returns the server's representation of the kafkaChannel, and an error, if there is any. -func (c *kafkaChannels) Update(kafkaChannel *v1beta1.KafkaChannel) (result *v1beta1.KafkaChannel, err error) { +func (c *kafkaChannels) Update(ctx context.Context, kafkaChannel *v1beta1.KafkaChannel, opts v1.UpdateOptions) (result *v1beta1.KafkaChannel, err error) { result = &v1beta1.KafkaChannel{} err = c.client.Put(). Namespace(c.ns). Resource("kafkachannels"). Name(kafkaChannel.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(kafkaChannel). - Do(). + Do(ctx). Into(result) return } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *kafkaChannels) UpdateStatus(kafkaChannel *v1beta1.KafkaChannel) (result *v1beta1.KafkaChannel, err error) { +func (c *kafkaChannels) UpdateStatus(ctx context.Context, kafkaChannel *v1beta1.KafkaChannel, opts v1.UpdateOptions) (result *v1beta1.KafkaChannel, err error) { result = &v1beta1.KafkaChannel{} err = c.client.Put(). Namespace(c.ns). Resource("kafkachannels"). Name(kafkaChannel.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(kafkaChannel). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the kafkaChannel and deletes it. Returns an error if one occurs. -func (c *kafkaChannels) Delete(name string, options *v1.DeleteOptions) error { +func (c *kafkaChannels) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("kafkachannels"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *kafkaChannels) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *kafkaChannels) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Namespace(c.ns). Resource("kafkachannels"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched kafkaChannel. -func (c *kafkaChannels) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.KafkaChannel, err error) { +func (c *kafkaChannels) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.KafkaChannel, err error) { result = &v1beta1.KafkaChannel{} err = c.client.Patch(pt). Namespace(c.ns). Resource("kafkachannels"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/kafka/channel/pkg/client/informers/externalversions/messaging/v1alpha1/kafkachannel.go b/kafka/channel/pkg/client/informers/externalversions/messaging/v1alpha1/kafkachannel.go index 977796ea49..f6a3e9d518 100644 --- a/kafka/channel/pkg/client/informers/externalversions/messaging/v1alpha1/kafkachannel.go +++ b/kafka/channel/pkg/client/informers/externalversions/messaging/v1alpha1/kafkachannel.go @@ -19,6 +19,7 @@ limitations under the License. package v1alpha1 import ( + "context" time "time" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -61,13 +62,13 @@ func NewFilteredKafkaChannelInformer(client versioned.Interface, namespace strin if tweakListOptions != nil { tweakListOptions(&options) } - return client.MessagingV1alpha1().KafkaChannels(namespace).List(options) + return client.MessagingV1alpha1().KafkaChannels(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.MessagingV1alpha1().KafkaChannels(namespace).Watch(options) + return client.MessagingV1alpha1().KafkaChannels(namespace).Watch(context.TODO(), options) }, }, &messagingv1alpha1.KafkaChannel{}, diff --git a/kafka/channel/pkg/client/informers/externalversions/messaging/v1beta1/kafkachannel.go b/kafka/channel/pkg/client/informers/externalversions/messaging/v1beta1/kafkachannel.go index b28096a9f3..ab86cff65f 100644 --- a/kafka/channel/pkg/client/informers/externalversions/messaging/v1beta1/kafkachannel.go +++ b/kafka/channel/pkg/client/informers/externalversions/messaging/v1beta1/kafkachannel.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" time "time" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -61,13 +62,13 @@ func NewFilteredKafkaChannelInformer(client versioned.Interface, namespace strin if tweakListOptions != nil { tweakListOptions(&options) } - return client.MessagingV1beta1().KafkaChannels(namespace).List(options) + return client.MessagingV1beta1().KafkaChannels(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.MessagingV1beta1().KafkaChannels(namespace).Watch(options) + return client.MessagingV1beta1().KafkaChannels(namespace).Watch(context.TODO(), options) }, }, &messagingv1beta1.KafkaChannel{}, diff --git a/kafka/channel/pkg/client/injection/reconciler/messaging/v1alpha1/kafkachannel/reconciler.go b/kafka/channel/pkg/client/injection/reconciler/messaging/v1alpha1/kafkachannel/reconciler.go index b3ec98e7f0..680204d288 100644 --- a/kafka/channel/pkg/client/injection/reconciler/messaging/v1alpha1/kafkachannel/reconciler.go +++ b/kafka/channel/pkg/client/injection/reconciler/messaging/v1alpha1/kafkachannel/reconciler.go @@ -315,7 +315,7 @@ func (r *reconcilerImpl) updateStatus(ctx context.Context, existing *v1alpha1.Ka getter := r.Client.MessagingV1alpha1().KafkaChannels(desired.Namespace) - existing, err = getter.Get(desired.Name, metav1.GetOptions{}) + existing, err = getter.Get(ctx, desired.Name, metav1.GetOptions{}) if err != nil { return err } @@ -334,7 +334,7 @@ func (r *reconcilerImpl) updateStatus(ctx context.Context, existing *v1alpha1.Ka updater := r.Client.MessagingV1alpha1().KafkaChannels(existing.Namespace) - _, err = updater.UpdateStatus(existing) + _, err = updater.UpdateStatus(ctx, existing, metav1.UpdateOptions{}) return err }) } @@ -392,7 +392,7 @@ func (r *reconcilerImpl) updateFinalizersFiltered(ctx context.Context, resource patcher := r.Client.MessagingV1alpha1().KafkaChannels(resource.Namespace) resourceName := resource.Name - resource, err = patcher.Patch(resourceName, types.MergePatchType, patch) + resource, err = patcher.Patch(ctx, resourceName, types.MergePatchType, patch, metav1.PatchOptions{}) if err != nil { r.Recorder.Eventf(resource, v1.EventTypeWarning, "FinalizerUpdateFailed", "Failed to update finalizers for %q: %v", resourceName, err) diff --git a/kafka/channel/pkg/client/injection/reconciler/messaging/v1beta1/kafkachannel/reconciler.go b/kafka/channel/pkg/client/injection/reconciler/messaging/v1beta1/kafkachannel/reconciler.go index accd3aa73f..11457a135e 100644 --- a/kafka/channel/pkg/client/injection/reconciler/messaging/v1beta1/kafkachannel/reconciler.go +++ b/kafka/channel/pkg/client/injection/reconciler/messaging/v1beta1/kafkachannel/reconciler.go @@ -315,7 +315,7 @@ func (r *reconcilerImpl) updateStatus(ctx context.Context, existing *v1beta1.Kaf getter := r.Client.MessagingV1beta1().KafkaChannels(desired.Namespace) - existing, err = getter.Get(desired.Name, metav1.GetOptions{}) + existing, err = getter.Get(ctx, desired.Name, metav1.GetOptions{}) if err != nil { return err } @@ -334,7 +334,7 @@ func (r *reconcilerImpl) updateStatus(ctx context.Context, existing *v1beta1.Kaf updater := r.Client.MessagingV1beta1().KafkaChannels(existing.Namespace) - _, err = updater.UpdateStatus(existing) + _, err = updater.UpdateStatus(ctx, existing, metav1.UpdateOptions{}) return err }) } @@ -392,7 +392,7 @@ func (r *reconcilerImpl) updateFinalizersFiltered(ctx context.Context, resource patcher := r.Client.MessagingV1beta1().KafkaChannels(resource.Namespace) resourceName := resource.Name - resource, err = patcher.Patch(resourceName, types.MergePatchType, patch) + resource, err = patcher.Patch(ctx, resourceName, types.MergePatchType, patch, metav1.PatchOptions{}) if err != nil { r.Recorder.Eventf(resource, v1.EventTypeWarning, "FinalizerUpdateFailed", "Failed to update finalizers for %q: %v", resourceName, err) diff --git a/kafka/channel/pkg/reconciler/controller/controller.go b/kafka/channel/pkg/reconciler/controller/controller.go index b736b77026..394e8d0e5f 100644 --- a/kafka/channel/pkg/reconciler/controller/controller.go +++ b/kafka/channel/pkg/reconciler/controller/controller.go @@ -87,7 +87,7 @@ func NewController( impl := kafkaChannelReconciler.NewImpl(ctx, r) // Get and Watch the Kakfa config map and dynamically update Kafka configuration. - if _, err := kubeclient.Get(ctx).CoreV1().ConfigMaps(system.Namespace()).Get("config-kafka", metav1.GetOptions{}); err == nil { + if _, err := kubeclient.Get(ctx).CoreV1().ConfigMaps(system.Namespace()).Get(ctx, "config-kafka", metav1.GetOptions{}); err == nil { cmw.Watch("config-kafka", func(configMap *v1.ConfigMap) { r.updateKafkaConfig(ctx, configMap) }) diff --git a/kafka/channel/pkg/reconciler/controller/kafkachannel.go b/kafka/channel/pkg/reconciler/controller/kafkachannel.go index d734840153..ea5683c9d7 100644 --- a/kafka/channel/pkg/reconciler/controller/kafkachannel.go +++ b/kafka/channel/pkg/reconciler/controller/kafkachannel.go @@ -282,7 +282,7 @@ func (r *Reconciler) reconcileDispatcher(ctx context.Context, scope string, disp d, err := r.deploymentLister.Deployments(dispatcherNamespace).Get(dispatcherName) if err != nil { if apierrs.IsNotFound(err) { - d, err := r.KubeClientSet.AppsV1().Deployments(dispatcherNamespace).Create(expected) + d, err := r.KubeClientSet.AppsV1().Deployments(dispatcherNamespace).Create(ctx, expected, metav1.CreateOptions{}) if err == nil { controller.GetEventRecorder(ctx).Event(kc, corev1.EventTypeNormal, dispatcherDeploymentCreated, "Dispatcher deployment created") kc.Status.PropagateDispatcherStatus(&d.Status) @@ -300,7 +300,7 @@ func (r *Reconciler) reconcileDispatcher(ctx context.Context, scope string, disp existing := utils.FindContainer(d, resources.DispatcherContainerName) if existing == nil { logging.FromContext(ctx).Errorw("Container %s does not exist in existing dispatcher deployment. Updating the deployment", resources.DispatcherContainerName) - d, err := r.KubeClientSet.AppsV1().Deployments(dispatcherNamespace).Update(expected) + d, err := r.KubeClientSet.AppsV1().Deployments(dispatcherNamespace).Update(ctx, expected, metav1.UpdateOptions{}) if err == nil { controller.GetEventRecorder(ctx).Event(kc, corev1.EventTypeNormal, dispatcherDeploymentUpdated, "Dispatcher deployment updated") kc.Status.PropagateDispatcherStatus(&d.Status) @@ -331,7 +331,7 @@ func (r *Reconciler) reconcileDispatcher(ctx context.Context, scope string, disp } if needsUpdate { - d, err := r.KubeClientSet.AppsV1().Deployments(dispatcherNamespace).Update(d) + d, err := r.KubeClientSet.AppsV1().Deployments(dispatcherNamespace).Update(ctx, d, metav1.UpdateOptions{}) if err == nil { controller.GetEventRecorder(ctx).Event(kc, corev1.EventTypeNormal, dispatcherDeploymentUpdated, "Dispatcher deployment updated") kc.Status.PropagateDispatcherStatus(&d.Status) @@ -352,7 +352,7 @@ func (r *Reconciler) reconcileServiceAccount(ctx context.Context, dispatcherName if err != nil { if apierrs.IsNotFound(err) { expected := resources.MakeServiceAccount(dispatcherNamespace, dispatcherName) - sa, err := r.KubeClientSet.CoreV1().ServiceAccounts(dispatcherNamespace).Create(expected) + sa, err := r.KubeClientSet.CoreV1().ServiceAccounts(dispatcherNamespace).Create(ctx, expected, metav1.CreateOptions{}) if err == nil { controller.GetEventRecorder(ctx).Event(kc, corev1.EventTypeNormal, dispatcherServiceAccountCreated, "Dispatcher service account created") return sa, nil @@ -373,7 +373,7 @@ func (r *Reconciler) reconcileRoleBinding(ctx context.Context, name string, ns s if err != nil { if apierrs.IsNotFound(err) { expected := resources.MakeRoleBinding(ns, name, sa, clusterRoleName) - rb, err := r.KubeClientSet.RbacV1().RoleBindings(ns).Create(expected) + rb, err := r.KubeClientSet.RbacV1().RoleBindings(ns).Create(ctx, expected, metav1.CreateOptions{}) if err == nil { controller.GetEventRecorder(ctx).Event(kc, corev1.EventTypeNormal, dispatcherRoleBindingCreated, "Dispatcher role binding created") return rb, nil @@ -393,7 +393,7 @@ func (r *Reconciler) reconcileDispatcherService(ctx context.Context, dispatcherN if err != nil { if apierrs.IsNotFound(err) { expected := resources.MakeDispatcherService(dispatcherNamespace) - svc, err := r.KubeClientSet.CoreV1().Services(dispatcherNamespace).Create(expected) + svc, err := r.KubeClientSet.CoreV1().Services(dispatcherNamespace).Create(ctx, expected, metav1.CreateOptions{}) if err == nil { controller.GetEventRecorder(ctx).Event(kc, corev1.EventTypeNormal, dispatcherServiceCreated, "Dispatcher service created") @@ -432,7 +432,7 @@ func (r *Reconciler) reconcileChannelService(ctx context.Context, dispatcherName svc, err := r.serviceLister.Services(channel.Namespace).Get(resources.MakeChannelServiceName(channel.Name)) if err != nil { if apierrs.IsNotFound(err) { - svc, err = r.KubeClientSet.CoreV1().Services(channel.Namespace).Create(expected) + svc, err = r.KubeClientSet.CoreV1().Services(channel.Namespace).Create(ctx, expected, metav1.CreateOptions{}) if err != nil { logger.Errorw("failed to create the channel service object", zap.Error(err)) channel.Status.MarkChannelServiceFailed("ChannelServiceFailed", fmt.Sprintf("Channel Service failed: %s", err)) @@ -446,7 +446,7 @@ func (r *Reconciler) reconcileChannelService(ctx context.Context, dispatcherName svc = svc.DeepCopy() svc.Spec = expected.Spec - svc, err = r.KubeClientSet.CoreV1().Services(channel.Namespace).Update(svc) + svc, err = r.KubeClientSet.CoreV1().Services(channel.Namespace).Update(ctx, svc, metav1.UpdateOptions{}) if err != nil { logger.Errorw("Failed to update the channel service", zap.Error(err)) return nil, err diff --git a/kafka/source/pkg/client/clientset/versioned/clientset.go b/kafka/source/pkg/client/clientset/versioned/clientset.go index 6e1fdfe8e4..0b7564c487 100644 --- a/kafka/source/pkg/client/clientset/versioned/clientset.go +++ b/kafka/source/pkg/client/clientset/versioned/clientset.go @@ -83,7 +83,7 @@ func NewForConfig(c *rest.Config) (*Clientset, error) { configShallowCopy := *c if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 { if configShallowCopy.Burst <= 0 { - return nil, fmt.Errorf("Burst is required to be greater than 0 when RateLimiter is not set and QPS is set to greater than 0") + return nil, fmt.Errorf("burst is required to be greater than 0 when RateLimiter is not set and QPS is set to greater than 0") } configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst) } diff --git a/kafka/source/pkg/client/clientset/versioned/typed/bindings/v1alpha1/fake/fake_kafkabinding.go b/kafka/source/pkg/client/clientset/versioned/typed/bindings/v1alpha1/fake/fake_kafkabinding.go index 984b5c31a5..7eeb0d868b 100644 --- a/kafka/source/pkg/client/clientset/versioned/typed/bindings/v1alpha1/fake/fake_kafkabinding.go +++ b/kafka/source/pkg/client/clientset/versioned/typed/bindings/v1alpha1/fake/fake_kafkabinding.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -39,7 +41,7 @@ var kafkabindingsResource = schema.GroupVersionResource{Group: "bindings.knative var kafkabindingsKind = schema.GroupVersionKind{Group: "bindings.knative.dev", Version: "v1alpha1", Kind: "KafkaBinding"} // Get takes name of the kafkaBinding, and returns the corresponding kafkaBinding object, and an error if there is any. -func (c *FakeKafkaBindings) Get(name string, options v1.GetOptions) (result *v1alpha1.KafkaBinding, err error) { +func (c *FakeKafkaBindings) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.KafkaBinding, err error) { obj, err := c.Fake. Invokes(testing.NewGetAction(kafkabindingsResource, c.ns, name), &v1alpha1.KafkaBinding{}) @@ -50,7 +52,7 @@ func (c *FakeKafkaBindings) Get(name string, options v1.GetOptions) (result *v1a } // List takes label and field selectors, and returns the list of KafkaBindings that match those selectors. -func (c *FakeKafkaBindings) List(opts v1.ListOptions) (result *v1alpha1.KafkaBindingList, err error) { +func (c *FakeKafkaBindings) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.KafkaBindingList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(kafkabindingsResource, kafkabindingsKind, c.ns, opts), &v1alpha1.KafkaBindingList{}) @@ -72,14 +74,14 @@ func (c *FakeKafkaBindings) List(opts v1.ListOptions) (result *v1alpha1.KafkaBin } // Watch returns a watch.Interface that watches the requested kafkaBindings. -func (c *FakeKafkaBindings) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeKafkaBindings) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(kafkabindingsResource, c.ns, opts)) } // Create takes the representation of a kafkaBinding and creates it. Returns the server's representation of the kafkaBinding, and an error, if there is any. -func (c *FakeKafkaBindings) Create(kafkaBinding *v1alpha1.KafkaBinding) (result *v1alpha1.KafkaBinding, err error) { +func (c *FakeKafkaBindings) Create(ctx context.Context, kafkaBinding *v1alpha1.KafkaBinding, opts v1.CreateOptions) (result *v1alpha1.KafkaBinding, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(kafkabindingsResource, c.ns, kafkaBinding), &v1alpha1.KafkaBinding{}) @@ -90,7 +92,7 @@ func (c *FakeKafkaBindings) Create(kafkaBinding *v1alpha1.KafkaBinding) (result } // Update takes the representation of a kafkaBinding and updates it. Returns the server's representation of the kafkaBinding, and an error, if there is any. -func (c *FakeKafkaBindings) Update(kafkaBinding *v1alpha1.KafkaBinding) (result *v1alpha1.KafkaBinding, err error) { +func (c *FakeKafkaBindings) Update(ctx context.Context, kafkaBinding *v1alpha1.KafkaBinding, opts v1.UpdateOptions) (result *v1alpha1.KafkaBinding, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(kafkabindingsResource, c.ns, kafkaBinding), &v1alpha1.KafkaBinding{}) @@ -102,7 +104,7 @@ func (c *FakeKafkaBindings) Update(kafkaBinding *v1alpha1.KafkaBinding) (result // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeKafkaBindings) UpdateStatus(kafkaBinding *v1alpha1.KafkaBinding) (*v1alpha1.KafkaBinding, error) { +func (c *FakeKafkaBindings) UpdateStatus(ctx context.Context, kafkaBinding *v1alpha1.KafkaBinding, opts v1.UpdateOptions) (*v1alpha1.KafkaBinding, error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(kafkabindingsResource, "status", c.ns, kafkaBinding), &v1alpha1.KafkaBinding{}) @@ -113,7 +115,7 @@ func (c *FakeKafkaBindings) UpdateStatus(kafkaBinding *v1alpha1.KafkaBinding) (* } // Delete takes name of the kafkaBinding and deletes it. Returns an error if one occurs. -func (c *FakeKafkaBindings) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeKafkaBindings) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewDeleteAction(kafkabindingsResource, c.ns, name), &v1alpha1.KafkaBinding{}) @@ -121,15 +123,15 @@ func (c *FakeKafkaBindings) Delete(name string, options *v1.DeleteOptions) error } // DeleteCollection deletes a collection of objects. -func (c *FakeKafkaBindings) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(kafkabindingsResource, c.ns, listOptions) +func (c *FakeKafkaBindings) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(kafkabindingsResource, c.ns, listOpts) _, err := c.Fake.Invokes(action, &v1alpha1.KafkaBindingList{}) return err } // Patch applies the patch and returns the patched kafkaBinding. -func (c *FakeKafkaBindings) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.KafkaBinding, err error) { +func (c *FakeKafkaBindings) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.KafkaBinding, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(kafkabindingsResource, c.ns, name, pt, data, subresources...), &v1alpha1.KafkaBinding{}) diff --git a/kafka/source/pkg/client/clientset/versioned/typed/bindings/v1alpha1/kafkabinding.go b/kafka/source/pkg/client/clientset/versioned/typed/bindings/v1alpha1/kafkabinding.go index 8f053ed48b..8c3c98c5ad 100644 --- a/kafka/source/pkg/client/clientset/versioned/typed/bindings/v1alpha1/kafkabinding.go +++ b/kafka/source/pkg/client/clientset/versioned/typed/bindings/v1alpha1/kafkabinding.go @@ -19,6 +19,7 @@ limitations under the License. package v1alpha1 import ( + "context" "time" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -37,15 +38,15 @@ type KafkaBindingsGetter interface { // KafkaBindingInterface has methods to work with KafkaBinding resources. type KafkaBindingInterface interface { - Create(*v1alpha1.KafkaBinding) (*v1alpha1.KafkaBinding, error) - Update(*v1alpha1.KafkaBinding) (*v1alpha1.KafkaBinding, error) - UpdateStatus(*v1alpha1.KafkaBinding) (*v1alpha1.KafkaBinding, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*v1alpha1.KafkaBinding, error) - List(opts v1.ListOptions) (*v1alpha1.KafkaBindingList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.KafkaBinding, err error) + Create(ctx context.Context, kafkaBinding *v1alpha1.KafkaBinding, opts v1.CreateOptions) (*v1alpha1.KafkaBinding, error) + Update(ctx context.Context, kafkaBinding *v1alpha1.KafkaBinding, opts v1.UpdateOptions) (*v1alpha1.KafkaBinding, error) + UpdateStatus(ctx context.Context, kafkaBinding *v1alpha1.KafkaBinding, opts v1.UpdateOptions) (*v1alpha1.KafkaBinding, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.KafkaBinding, error) + List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.KafkaBindingList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.KafkaBinding, err error) KafkaBindingExpansion } @@ -64,20 +65,20 @@ func newKafkaBindings(c *BindingsV1alpha1Client, namespace string) *kafkaBinding } // Get takes name of the kafkaBinding, and returns the corresponding kafkaBinding object, and an error if there is any. -func (c *kafkaBindings) Get(name string, options v1.GetOptions) (result *v1alpha1.KafkaBinding, err error) { +func (c *kafkaBindings) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.KafkaBinding, err error) { result = &v1alpha1.KafkaBinding{} err = c.client.Get(). Namespace(c.ns). Resource("kafkabindings"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of KafkaBindings that match those selectors. -func (c *kafkaBindings) List(opts v1.ListOptions) (result *v1alpha1.KafkaBindingList, err error) { +func (c *kafkaBindings) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.KafkaBindingList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -88,13 +89,13 @@ func (c *kafkaBindings) List(opts v1.ListOptions) (result *v1alpha1.KafkaBinding Resource("kafkabindings"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested kafkaBindings. -func (c *kafkaBindings) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *kafkaBindings) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -105,87 +106,90 @@ func (c *kafkaBindings) Watch(opts v1.ListOptions) (watch.Interface, error) { Resource("kafkabindings"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a kafkaBinding and creates it. Returns the server's representation of the kafkaBinding, and an error, if there is any. -func (c *kafkaBindings) Create(kafkaBinding *v1alpha1.KafkaBinding) (result *v1alpha1.KafkaBinding, err error) { +func (c *kafkaBindings) Create(ctx context.Context, kafkaBinding *v1alpha1.KafkaBinding, opts v1.CreateOptions) (result *v1alpha1.KafkaBinding, err error) { result = &v1alpha1.KafkaBinding{} err = c.client.Post(). Namespace(c.ns). Resource("kafkabindings"). + VersionedParams(&opts, scheme.ParameterCodec). Body(kafkaBinding). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a kafkaBinding and updates it. Returns the server's representation of the kafkaBinding, and an error, if there is any. -func (c *kafkaBindings) Update(kafkaBinding *v1alpha1.KafkaBinding) (result *v1alpha1.KafkaBinding, err error) { +func (c *kafkaBindings) Update(ctx context.Context, kafkaBinding *v1alpha1.KafkaBinding, opts v1.UpdateOptions) (result *v1alpha1.KafkaBinding, err error) { result = &v1alpha1.KafkaBinding{} err = c.client.Put(). Namespace(c.ns). Resource("kafkabindings"). Name(kafkaBinding.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(kafkaBinding). - Do(). + Do(ctx). Into(result) return } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *kafkaBindings) UpdateStatus(kafkaBinding *v1alpha1.KafkaBinding) (result *v1alpha1.KafkaBinding, err error) { +func (c *kafkaBindings) UpdateStatus(ctx context.Context, kafkaBinding *v1alpha1.KafkaBinding, opts v1.UpdateOptions) (result *v1alpha1.KafkaBinding, err error) { result = &v1alpha1.KafkaBinding{} err = c.client.Put(). Namespace(c.ns). Resource("kafkabindings"). Name(kafkaBinding.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(kafkaBinding). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the kafkaBinding and deletes it. Returns an error if one occurs. -func (c *kafkaBindings) Delete(name string, options *v1.DeleteOptions) error { +func (c *kafkaBindings) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("kafkabindings"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *kafkaBindings) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *kafkaBindings) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Namespace(c.ns). Resource("kafkabindings"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched kafkaBinding. -func (c *kafkaBindings) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.KafkaBinding, err error) { +func (c *kafkaBindings) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.KafkaBinding, err error) { result = &v1alpha1.KafkaBinding{} err = c.client.Patch(pt). Namespace(c.ns). Resource("kafkabindings"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/kafka/source/pkg/client/clientset/versioned/typed/bindings/v1beta1/fake/fake_kafkabinding.go b/kafka/source/pkg/client/clientset/versioned/typed/bindings/v1beta1/fake/fake_kafkabinding.go index bb20172059..fa336f60fc 100644 --- a/kafka/source/pkg/client/clientset/versioned/typed/bindings/v1beta1/fake/fake_kafkabinding.go +++ b/kafka/source/pkg/client/clientset/versioned/typed/bindings/v1beta1/fake/fake_kafkabinding.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -39,7 +41,7 @@ var kafkabindingsResource = schema.GroupVersionResource{Group: "bindings.knative var kafkabindingsKind = schema.GroupVersionKind{Group: "bindings.knative.dev", Version: "v1beta1", Kind: "KafkaBinding"} // Get takes name of the kafkaBinding, and returns the corresponding kafkaBinding object, and an error if there is any. -func (c *FakeKafkaBindings) Get(name string, options v1.GetOptions) (result *v1beta1.KafkaBinding, err error) { +func (c *FakeKafkaBindings) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.KafkaBinding, err error) { obj, err := c.Fake. Invokes(testing.NewGetAction(kafkabindingsResource, c.ns, name), &v1beta1.KafkaBinding{}) @@ -50,7 +52,7 @@ func (c *FakeKafkaBindings) Get(name string, options v1.GetOptions) (result *v1b } // List takes label and field selectors, and returns the list of KafkaBindings that match those selectors. -func (c *FakeKafkaBindings) List(opts v1.ListOptions) (result *v1beta1.KafkaBindingList, err error) { +func (c *FakeKafkaBindings) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.KafkaBindingList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(kafkabindingsResource, kafkabindingsKind, c.ns, opts), &v1beta1.KafkaBindingList{}) @@ -72,14 +74,14 @@ func (c *FakeKafkaBindings) List(opts v1.ListOptions) (result *v1beta1.KafkaBind } // Watch returns a watch.Interface that watches the requested kafkaBindings. -func (c *FakeKafkaBindings) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeKafkaBindings) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(kafkabindingsResource, c.ns, opts)) } // Create takes the representation of a kafkaBinding and creates it. Returns the server's representation of the kafkaBinding, and an error, if there is any. -func (c *FakeKafkaBindings) Create(kafkaBinding *v1beta1.KafkaBinding) (result *v1beta1.KafkaBinding, err error) { +func (c *FakeKafkaBindings) Create(ctx context.Context, kafkaBinding *v1beta1.KafkaBinding, opts v1.CreateOptions) (result *v1beta1.KafkaBinding, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(kafkabindingsResource, c.ns, kafkaBinding), &v1beta1.KafkaBinding{}) @@ -90,7 +92,7 @@ func (c *FakeKafkaBindings) Create(kafkaBinding *v1beta1.KafkaBinding) (result * } // Update takes the representation of a kafkaBinding and updates it. Returns the server's representation of the kafkaBinding, and an error, if there is any. -func (c *FakeKafkaBindings) Update(kafkaBinding *v1beta1.KafkaBinding) (result *v1beta1.KafkaBinding, err error) { +func (c *FakeKafkaBindings) Update(ctx context.Context, kafkaBinding *v1beta1.KafkaBinding, opts v1.UpdateOptions) (result *v1beta1.KafkaBinding, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(kafkabindingsResource, c.ns, kafkaBinding), &v1beta1.KafkaBinding{}) @@ -102,7 +104,7 @@ func (c *FakeKafkaBindings) Update(kafkaBinding *v1beta1.KafkaBinding) (result * // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeKafkaBindings) UpdateStatus(kafkaBinding *v1beta1.KafkaBinding) (*v1beta1.KafkaBinding, error) { +func (c *FakeKafkaBindings) UpdateStatus(ctx context.Context, kafkaBinding *v1beta1.KafkaBinding, opts v1.UpdateOptions) (*v1beta1.KafkaBinding, error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(kafkabindingsResource, "status", c.ns, kafkaBinding), &v1beta1.KafkaBinding{}) @@ -113,7 +115,7 @@ func (c *FakeKafkaBindings) UpdateStatus(kafkaBinding *v1beta1.KafkaBinding) (*v } // Delete takes name of the kafkaBinding and deletes it. Returns an error if one occurs. -func (c *FakeKafkaBindings) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeKafkaBindings) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewDeleteAction(kafkabindingsResource, c.ns, name), &v1beta1.KafkaBinding{}) @@ -121,15 +123,15 @@ func (c *FakeKafkaBindings) Delete(name string, options *v1.DeleteOptions) error } // DeleteCollection deletes a collection of objects. -func (c *FakeKafkaBindings) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(kafkabindingsResource, c.ns, listOptions) +func (c *FakeKafkaBindings) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(kafkabindingsResource, c.ns, listOpts) _, err := c.Fake.Invokes(action, &v1beta1.KafkaBindingList{}) return err } // Patch applies the patch and returns the patched kafkaBinding. -func (c *FakeKafkaBindings) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.KafkaBinding, err error) { +func (c *FakeKafkaBindings) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.KafkaBinding, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(kafkabindingsResource, c.ns, name, pt, data, subresources...), &v1beta1.KafkaBinding{}) diff --git a/kafka/source/pkg/client/clientset/versioned/typed/bindings/v1beta1/kafkabinding.go b/kafka/source/pkg/client/clientset/versioned/typed/bindings/v1beta1/kafkabinding.go index ebeb1e7277..ee4985b55d 100644 --- a/kafka/source/pkg/client/clientset/versioned/typed/bindings/v1beta1/kafkabinding.go +++ b/kafka/source/pkg/client/clientset/versioned/typed/bindings/v1beta1/kafkabinding.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" "time" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -37,15 +38,15 @@ type KafkaBindingsGetter interface { // KafkaBindingInterface has methods to work with KafkaBinding resources. type KafkaBindingInterface interface { - Create(*v1beta1.KafkaBinding) (*v1beta1.KafkaBinding, error) - Update(*v1beta1.KafkaBinding) (*v1beta1.KafkaBinding, error) - UpdateStatus(*v1beta1.KafkaBinding) (*v1beta1.KafkaBinding, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*v1beta1.KafkaBinding, error) - List(opts v1.ListOptions) (*v1beta1.KafkaBindingList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.KafkaBinding, err error) + Create(ctx context.Context, kafkaBinding *v1beta1.KafkaBinding, opts v1.CreateOptions) (*v1beta1.KafkaBinding, error) + Update(ctx context.Context, kafkaBinding *v1beta1.KafkaBinding, opts v1.UpdateOptions) (*v1beta1.KafkaBinding, error) + UpdateStatus(ctx context.Context, kafkaBinding *v1beta1.KafkaBinding, opts v1.UpdateOptions) (*v1beta1.KafkaBinding, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.KafkaBinding, error) + List(ctx context.Context, opts v1.ListOptions) (*v1beta1.KafkaBindingList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.KafkaBinding, err error) KafkaBindingExpansion } @@ -64,20 +65,20 @@ func newKafkaBindings(c *BindingsV1beta1Client, namespace string) *kafkaBindings } // Get takes name of the kafkaBinding, and returns the corresponding kafkaBinding object, and an error if there is any. -func (c *kafkaBindings) Get(name string, options v1.GetOptions) (result *v1beta1.KafkaBinding, err error) { +func (c *kafkaBindings) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.KafkaBinding, err error) { result = &v1beta1.KafkaBinding{} err = c.client.Get(). Namespace(c.ns). Resource("kafkabindings"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of KafkaBindings that match those selectors. -func (c *kafkaBindings) List(opts v1.ListOptions) (result *v1beta1.KafkaBindingList, err error) { +func (c *kafkaBindings) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.KafkaBindingList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -88,13 +89,13 @@ func (c *kafkaBindings) List(opts v1.ListOptions) (result *v1beta1.KafkaBindingL Resource("kafkabindings"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested kafkaBindings. -func (c *kafkaBindings) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *kafkaBindings) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -105,87 +106,90 @@ func (c *kafkaBindings) Watch(opts v1.ListOptions) (watch.Interface, error) { Resource("kafkabindings"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a kafkaBinding and creates it. Returns the server's representation of the kafkaBinding, and an error, if there is any. -func (c *kafkaBindings) Create(kafkaBinding *v1beta1.KafkaBinding) (result *v1beta1.KafkaBinding, err error) { +func (c *kafkaBindings) Create(ctx context.Context, kafkaBinding *v1beta1.KafkaBinding, opts v1.CreateOptions) (result *v1beta1.KafkaBinding, err error) { result = &v1beta1.KafkaBinding{} err = c.client.Post(). Namespace(c.ns). Resource("kafkabindings"). + VersionedParams(&opts, scheme.ParameterCodec). Body(kafkaBinding). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a kafkaBinding and updates it. Returns the server's representation of the kafkaBinding, and an error, if there is any. -func (c *kafkaBindings) Update(kafkaBinding *v1beta1.KafkaBinding) (result *v1beta1.KafkaBinding, err error) { +func (c *kafkaBindings) Update(ctx context.Context, kafkaBinding *v1beta1.KafkaBinding, opts v1.UpdateOptions) (result *v1beta1.KafkaBinding, err error) { result = &v1beta1.KafkaBinding{} err = c.client.Put(). Namespace(c.ns). Resource("kafkabindings"). Name(kafkaBinding.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(kafkaBinding). - Do(). + Do(ctx). Into(result) return } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *kafkaBindings) UpdateStatus(kafkaBinding *v1beta1.KafkaBinding) (result *v1beta1.KafkaBinding, err error) { +func (c *kafkaBindings) UpdateStatus(ctx context.Context, kafkaBinding *v1beta1.KafkaBinding, opts v1.UpdateOptions) (result *v1beta1.KafkaBinding, err error) { result = &v1beta1.KafkaBinding{} err = c.client.Put(). Namespace(c.ns). Resource("kafkabindings"). Name(kafkaBinding.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(kafkaBinding). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the kafkaBinding and deletes it. Returns an error if one occurs. -func (c *kafkaBindings) Delete(name string, options *v1.DeleteOptions) error { +func (c *kafkaBindings) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("kafkabindings"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *kafkaBindings) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *kafkaBindings) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Namespace(c.ns). Resource("kafkabindings"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched kafkaBinding. -func (c *kafkaBindings) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.KafkaBinding, err error) { +func (c *kafkaBindings) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.KafkaBinding, err error) { result = &v1beta1.KafkaBinding{} err = c.client.Patch(pt). Namespace(c.ns). Resource("kafkabindings"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/kafka/source/pkg/client/clientset/versioned/typed/sources/v1alpha1/fake/fake_kafkasource.go b/kafka/source/pkg/client/clientset/versioned/typed/sources/v1alpha1/fake/fake_kafkasource.go index ad1d027897..0d817eed78 100644 --- a/kafka/source/pkg/client/clientset/versioned/typed/sources/v1alpha1/fake/fake_kafkasource.go +++ b/kafka/source/pkg/client/clientset/versioned/typed/sources/v1alpha1/fake/fake_kafkasource.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -39,7 +41,7 @@ var kafkasourcesResource = schema.GroupVersionResource{Group: "sources.knative.d var kafkasourcesKind = schema.GroupVersionKind{Group: "sources.knative.dev", Version: "v1alpha1", Kind: "KafkaSource"} // Get takes name of the kafkaSource, and returns the corresponding kafkaSource object, and an error if there is any. -func (c *FakeKafkaSources) Get(name string, options v1.GetOptions) (result *v1alpha1.KafkaSource, err error) { +func (c *FakeKafkaSources) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.KafkaSource, err error) { obj, err := c.Fake. Invokes(testing.NewGetAction(kafkasourcesResource, c.ns, name), &v1alpha1.KafkaSource{}) @@ -50,7 +52,7 @@ func (c *FakeKafkaSources) Get(name string, options v1.GetOptions) (result *v1al } // List takes label and field selectors, and returns the list of KafkaSources that match those selectors. -func (c *FakeKafkaSources) List(opts v1.ListOptions) (result *v1alpha1.KafkaSourceList, err error) { +func (c *FakeKafkaSources) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.KafkaSourceList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(kafkasourcesResource, kafkasourcesKind, c.ns, opts), &v1alpha1.KafkaSourceList{}) @@ -72,14 +74,14 @@ func (c *FakeKafkaSources) List(opts v1.ListOptions) (result *v1alpha1.KafkaSour } // Watch returns a watch.Interface that watches the requested kafkaSources. -func (c *FakeKafkaSources) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeKafkaSources) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(kafkasourcesResource, c.ns, opts)) } // Create takes the representation of a kafkaSource and creates it. Returns the server's representation of the kafkaSource, and an error, if there is any. -func (c *FakeKafkaSources) Create(kafkaSource *v1alpha1.KafkaSource) (result *v1alpha1.KafkaSource, err error) { +func (c *FakeKafkaSources) Create(ctx context.Context, kafkaSource *v1alpha1.KafkaSource, opts v1.CreateOptions) (result *v1alpha1.KafkaSource, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(kafkasourcesResource, c.ns, kafkaSource), &v1alpha1.KafkaSource{}) @@ -90,7 +92,7 @@ func (c *FakeKafkaSources) Create(kafkaSource *v1alpha1.KafkaSource) (result *v1 } // Update takes the representation of a kafkaSource and updates it. Returns the server's representation of the kafkaSource, and an error, if there is any. -func (c *FakeKafkaSources) Update(kafkaSource *v1alpha1.KafkaSource) (result *v1alpha1.KafkaSource, err error) { +func (c *FakeKafkaSources) Update(ctx context.Context, kafkaSource *v1alpha1.KafkaSource, opts v1.UpdateOptions) (result *v1alpha1.KafkaSource, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(kafkasourcesResource, c.ns, kafkaSource), &v1alpha1.KafkaSource{}) @@ -102,7 +104,7 @@ func (c *FakeKafkaSources) Update(kafkaSource *v1alpha1.KafkaSource) (result *v1 // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeKafkaSources) UpdateStatus(kafkaSource *v1alpha1.KafkaSource) (*v1alpha1.KafkaSource, error) { +func (c *FakeKafkaSources) UpdateStatus(ctx context.Context, kafkaSource *v1alpha1.KafkaSource, opts v1.UpdateOptions) (*v1alpha1.KafkaSource, error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(kafkasourcesResource, "status", c.ns, kafkaSource), &v1alpha1.KafkaSource{}) @@ -113,7 +115,7 @@ func (c *FakeKafkaSources) UpdateStatus(kafkaSource *v1alpha1.KafkaSource) (*v1a } // Delete takes name of the kafkaSource and deletes it. Returns an error if one occurs. -func (c *FakeKafkaSources) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeKafkaSources) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewDeleteAction(kafkasourcesResource, c.ns, name), &v1alpha1.KafkaSource{}) @@ -121,15 +123,15 @@ func (c *FakeKafkaSources) Delete(name string, options *v1.DeleteOptions) error } // DeleteCollection deletes a collection of objects. -func (c *FakeKafkaSources) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(kafkasourcesResource, c.ns, listOptions) +func (c *FakeKafkaSources) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(kafkasourcesResource, c.ns, listOpts) _, err := c.Fake.Invokes(action, &v1alpha1.KafkaSourceList{}) return err } // Patch applies the patch and returns the patched kafkaSource. -func (c *FakeKafkaSources) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.KafkaSource, err error) { +func (c *FakeKafkaSources) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.KafkaSource, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(kafkasourcesResource, c.ns, name, pt, data, subresources...), &v1alpha1.KafkaSource{}) diff --git a/kafka/source/pkg/client/clientset/versioned/typed/sources/v1alpha1/kafkasource.go b/kafka/source/pkg/client/clientset/versioned/typed/sources/v1alpha1/kafkasource.go index e90cfd7d68..756f899d70 100644 --- a/kafka/source/pkg/client/clientset/versioned/typed/sources/v1alpha1/kafkasource.go +++ b/kafka/source/pkg/client/clientset/versioned/typed/sources/v1alpha1/kafkasource.go @@ -19,6 +19,7 @@ limitations under the License. package v1alpha1 import ( + "context" "time" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -37,15 +38,15 @@ type KafkaSourcesGetter interface { // KafkaSourceInterface has methods to work with KafkaSource resources. type KafkaSourceInterface interface { - Create(*v1alpha1.KafkaSource) (*v1alpha1.KafkaSource, error) - Update(*v1alpha1.KafkaSource) (*v1alpha1.KafkaSource, error) - UpdateStatus(*v1alpha1.KafkaSource) (*v1alpha1.KafkaSource, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*v1alpha1.KafkaSource, error) - List(opts v1.ListOptions) (*v1alpha1.KafkaSourceList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.KafkaSource, err error) + Create(ctx context.Context, kafkaSource *v1alpha1.KafkaSource, opts v1.CreateOptions) (*v1alpha1.KafkaSource, error) + Update(ctx context.Context, kafkaSource *v1alpha1.KafkaSource, opts v1.UpdateOptions) (*v1alpha1.KafkaSource, error) + UpdateStatus(ctx context.Context, kafkaSource *v1alpha1.KafkaSource, opts v1.UpdateOptions) (*v1alpha1.KafkaSource, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.KafkaSource, error) + List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.KafkaSourceList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.KafkaSource, err error) KafkaSourceExpansion } @@ -64,20 +65,20 @@ func newKafkaSources(c *SourcesV1alpha1Client, namespace string) *kafkaSources { } // Get takes name of the kafkaSource, and returns the corresponding kafkaSource object, and an error if there is any. -func (c *kafkaSources) Get(name string, options v1.GetOptions) (result *v1alpha1.KafkaSource, err error) { +func (c *kafkaSources) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.KafkaSource, err error) { result = &v1alpha1.KafkaSource{} err = c.client.Get(). Namespace(c.ns). Resource("kafkasources"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of KafkaSources that match those selectors. -func (c *kafkaSources) List(opts v1.ListOptions) (result *v1alpha1.KafkaSourceList, err error) { +func (c *kafkaSources) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.KafkaSourceList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -88,13 +89,13 @@ func (c *kafkaSources) List(opts v1.ListOptions) (result *v1alpha1.KafkaSourceLi Resource("kafkasources"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested kafkaSources. -func (c *kafkaSources) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *kafkaSources) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -105,87 +106,90 @@ func (c *kafkaSources) Watch(opts v1.ListOptions) (watch.Interface, error) { Resource("kafkasources"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a kafkaSource and creates it. Returns the server's representation of the kafkaSource, and an error, if there is any. -func (c *kafkaSources) Create(kafkaSource *v1alpha1.KafkaSource) (result *v1alpha1.KafkaSource, err error) { +func (c *kafkaSources) Create(ctx context.Context, kafkaSource *v1alpha1.KafkaSource, opts v1.CreateOptions) (result *v1alpha1.KafkaSource, err error) { result = &v1alpha1.KafkaSource{} err = c.client.Post(). Namespace(c.ns). Resource("kafkasources"). + VersionedParams(&opts, scheme.ParameterCodec). Body(kafkaSource). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a kafkaSource and updates it. Returns the server's representation of the kafkaSource, and an error, if there is any. -func (c *kafkaSources) Update(kafkaSource *v1alpha1.KafkaSource) (result *v1alpha1.KafkaSource, err error) { +func (c *kafkaSources) Update(ctx context.Context, kafkaSource *v1alpha1.KafkaSource, opts v1.UpdateOptions) (result *v1alpha1.KafkaSource, err error) { result = &v1alpha1.KafkaSource{} err = c.client.Put(). Namespace(c.ns). Resource("kafkasources"). Name(kafkaSource.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(kafkaSource). - Do(). + Do(ctx). Into(result) return } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *kafkaSources) UpdateStatus(kafkaSource *v1alpha1.KafkaSource) (result *v1alpha1.KafkaSource, err error) { +func (c *kafkaSources) UpdateStatus(ctx context.Context, kafkaSource *v1alpha1.KafkaSource, opts v1.UpdateOptions) (result *v1alpha1.KafkaSource, err error) { result = &v1alpha1.KafkaSource{} err = c.client.Put(). Namespace(c.ns). Resource("kafkasources"). Name(kafkaSource.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(kafkaSource). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the kafkaSource and deletes it. Returns an error if one occurs. -func (c *kafkaSources) Delete(name string, options *v1.DeleteOptions) error { +func (c *kafkaSources) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("kafkasources"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *kafkaSources) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *kafkaSources) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Namespace(c.ns). Resource("kafkasources"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched kafkaSource. -func (c *kafkaSources) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.KafkaSource, err error) { +func (c *kafkaSources) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.KafkaSource, err error) { result = &v1alpha1.KafkaSource{} err = c.client.Patch(pt). Namespace(c.ns). Resource("kafkasources"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/kafka/source/pkg/client/clientset/versioned/typed/sources/v1beta1/fake/fake_kafkasource.go b/kafka/source/pkg/client/clientset/versioned/typed/sources/v1beta1/fake/fake_kafkasource.go index ea370d7af4..db22de3f7c 100644 --- a/kafka/source/pkg/client/clientset/versioned/typed/sources/v1beta1/fake/fake_kafkasource.go +++ b/kafka/source/pkg/client/clientset/versioned/typed/sources/v1beta1/fake/fake_kafkasource.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -39,7 +41,7 @@ var kafkasourcesResource = schema.GroupVersionResource{Group: "sources.knative.d var kafkasourcesKind = schema.GroupVersionKind{Group: "sources.knative.dev", Version: "v1beta1", Kind: "KafkaSource"} // Get takes name of the kafkaSource, and returns the corresponding kafkaSource object, and an error if there is any. -func (c *FakeKafkaSources) Get(name string, options v1.GetOptions) (result *v1beta1.KafkaSource, err error) { +func (c *FakeKafkaSources) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.KafkaSource, err error) { obj, err := c.Fake. Invokes(testing.NewGetAction(kafkasourcesResource, c.ns, name), &v1beta1.KafkaSource{}) @@ -50,7 +52,7 @@ func (c *FakeKafkaSources) Get(name string, options v1.GetOptions) (result *v1be } // List takes label and field selectors, and returns the list of KafkaSources that match those selectors. -func (c *FakeKafkaSources) List(opts v1.ListOptions) (result *v1beta1.KafkaSourceList, err error) { +func (c *FakeKafkaSources) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.KafkaSourceList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(kafkasourcesResource, kafkasourcesKind, c.ns, opts), &v1beta1.KafkaSourceList{}) @@ -72,14 +74,14 @@ func (c *FakeKafkaSources) List(opts v1.ListOptions) (result *v1beta1.KafkaSourc } // Watch returns a watch.Interface that watches the requested kafkaSources. -func (c *FakeKafkaSources) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeKafkaSources) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(kafkasourcesResource, c.ns, opts)) } // Create takes the representation of a kafkaSource and creates it. Returns the server's representation of the kafkaSource, and an error, if there is any. -func (c *FakeKafkaSources) Create(kafkaSource *v1beta1.KafkaSource) (result *v1beta1.KafkaSource, err error) { +func (c *FakeKafkaSources) Create(ctx context.Context, kafkaSource *v1beta1.KafkaSource, opts v1.CreateOptions) (result *v1beta1.KafkaSource, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(kafkasourcesResource, c.ns, kafkaSource), &v1beta1.KafkaSource{}) @@ -90,7 +92,7 @@ func (c *FakeKafkaSources) Create(kafkaSource *v1beta1.KafkaSource) (result *v1b } // Update takes the representation of a kafkaSource and updates it. Returns the server's representation of the kafkaSource, and an error, if there is any. -func (c *FakeKafkaSources) Update(kafkaSource *v1beta1.KafkaSource) (result *v1beta1.KafkaSource, err error) { +func (c *FakeKafkaSources) Update(ctx context.Context, kafkaSource *v1beta1.KafkaSource, opts v1.UpdateOptions) (result *v1beta1.KafkaSource, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(kafkasourcesResource, c.ns, kafkaSource), &v1beta1.KafkaSource{}) @@ -102,7 +104,7 @@ func (c *FakeKafkaSources) Update(kafkaSource *v1beta1.KafkaSource) (result *v1b // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeKafkaSources) UpdateStatus(kafkaSource *v1beta1.KafkaSource) (*v1beta1.KafkaSource, error) { +func (c *FakeKafkaSources) UpdateStatus(ctx context.Context, kafkaSource *v1beta1.KafkaSource, opts v1.UpdateOptions) (*v1beta1.KafkaSource, error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(kafkasourcesResource, "status", c.ns, kafkaSource), &v1beta1.KafkaSource{}) @@ -113,7 +115,7 @@ func (c *FakeKafkaSources) UpdateStatus(kafkaSource *v1beta1.KafkaSource) (*v1be } // Delete takes name of the kafkaSource and deletes it. Returns an error if one occurs. -func (c *FakeKafkaSources) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeKafkaSources) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewDeleteAction(kafkasourcesResource, c.ns, name), &v1beta1.KafkaSource{}) @@ -121,15 +123,15 @@ func (c *FakeKafkaSources) Delete(name string, options *v1.DeleteOptions) error } // DeleteCollection deletes a collection of objects. -func (c *FakeKafkaSources) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(kafkasourcesResource, c.ns, listOptions) +func (c *FakeKafkaSources) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(kafkasourcesResource, c.ns, listOpts) _, err := c.Fake.Invokes(action, &v1beta1.KafkaSourceList{}) return err } // Patch applies the patch and returns the patched kafkaSource. -func (c *FakeKafkaSources) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.KafkaSource, err error) { +func (c *FakeKafkaSources) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.KafkaSource, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(kafkasourcesResource, c.ns, name, pt, data, subresources...), &v1beta1.KafkaSource{}) diff --git a/kafka/source/pkg/client/clientset/versioned/typed/sources/v1beta1/kafkasource.go b/kafka/source/pkg/client/clientset/versioned/typed/sources/v1beta1/kafkasource.go index 94a2d36186..189dbfb49a 100644 --- a/kafka/source/pkg/client/clientset/versioned/typed/sources/v1beta1/kafkasource.go +++ b/kafka/source/pkg/client/clientset/versioned/typed/sources/v1beta1/kafkasource.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" "time" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -37,15 +38,15 @@ type KafkaSourcesGetter interface { // KafkaSourceInterface has methods to work with KafkaSource resources. type KafkaSourceInterface interface { - Create(*v1beta1.KafkaSource) (*v1beta1.KafkaSource, error) - Update(*v1beta1.KafkaSource) (*v1beta1.KafkaSource, error) - UpdateStatus(*v1beta1.KafkaSource) (*v1beta1.KafkaSource, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*v1beta1.KafkaSource, error) - List(opts v1.ListOptions) (*v1beta1.KafkaSourceList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.KafkaSource, err error) + Create(ctx context.Context, kafkaSource *v1beta1.KafkaSource, opts v1.CreateOptions) (*v1beta1.KafkaSource, error) + Update(ctx context.Context, kafkaSource *v1beta1.KafkaSource, opts v1.UpdateOptions) (*v1beta1.KafkaSource, error) + UpdateStatus(ctx context.Context, kafkaSource *v1beta1.KafkaSource, opts v1.UpdateOptions) (*v1beta1.KafkaSource, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.KafkaSource, error) + List(ctx context.Context, opts v1.ListOptions) (*v1beta1.KafkaSourceList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.KafkaSource, err error) KafkaSourceExpansion } @@ -64,20 +65,20 @@ func newKafkaSources(c *SourcesV1beta1Client, namespace string) *kafkaSources { } // Get takes name of the kafkaSource, and returns the corresponding kafkaSource object, and an error if there is any. -func (c *kafkaSources) Get(name string, options v1.GetOptions) (result *v1beta1.KafkaSource, err error) { +func (c *kafkaSources) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.KafkaSource, err error) { result = &v1beta1.KafkaSource{} err = c.client.Get(). Namespace(c.ns). Resource("kafkasources"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of KafkaSources that match those selectors. -func (c *kafkaSources) List(opts v1.ListOptions) (result *v1beta1.KafkaSourceList, err error) { +func (c *kafkaSources) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.KafkaSourceList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -88,13 +89,13 @@ func (c *kafkaSources) List(opts v1.ListOptions) (result *v1beta1.KafkaSourceLis Resource("kafkasources"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested kafkaSources. -func (c *kafkaSources) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *kafkaSources) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -105,87 +106,90 @@ func (c *kafkaSources) Watch(opts v1.ListOptions) (watch.Interface, error) { Resource("kafkasources"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a kafkaSource and creates it. Returns the server's representation of the kafkaSource, and an error, if there is any. -func (c *kafkaSources) Create(kafkaSource *v1beta1.KafkaSource) (result *v1beta1.KafkaSource, err error) { +func (c *kafkaSources) Create(ctx context.Context, kafkaSource *v1beta1.KafkaSource, opts v1.CreateOptions) (result *v1beta1.KafkaSource, err error) { result = &v1beta1.KafkaSource{} err = c.client.Post(). Namespace(c.ns). Resource("kafkasources"). + VersionedParams(&opts, scheme.ParameterCodec). Body(kafkaSource). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a kafkaSource and updates it. Returns the server's representation of the kafkaSource, and an error, if there is any. -func (c *kafkaSources) Update(kafkaSource *v1beta1.KafkaSource) (result *v1beta1.KafkaSource, err error) { +func (c *kafkaSources) Update(ctx context.Context, kafkaSource *v1beta1.KafkaSource, opts v1.UpdateOptions) (result *v1beta1.KafkaSource, err error) { result = &v1beta1.KafkaSource{} err = c.client.Put(). Namespace(c.ns). Resource("kafkasources"). Name(kafkaSource.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(kafkaSource). - Do(). + Do(ctx). Into(result) return } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *kafkaSources) UpdateStatus(kafkaSource *v1beta1.KafkaSource) (result *v1beta1.KafkaSource, err error) { +func (c *kafkaSources) UpdateStatus(ctx context.Context, kafkaSource *v1beta1.KafkaSource, opts v1.UpdateOptions) (result *v1beta1.KafkaSource, err error) { result = &v1beta1.KafkaSource{} err = c.client.Put(). Namespace(c.ns). Resource("kafkasources"). Name(kafkaSource.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(kafkaSource). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the kafkaSource and deletes it. Returns an error if one occurs. -func (c *kafkaSources) Delete(name string, options *v1.DeleteOptions) error { +func (c *kafkaSources) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("kafkasources"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *kafkaSources) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *kafkaSources) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Namespace(c.ns). Resource("kafkasources"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched kafkaSource. -func (c *kafkaSources) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.KafkaSource, err error) { +func (c *kafkaSources) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.KafkaSource, err error) { result = &v1beta1.KafkaSource{} err = c.client.Patch(pt). Namespace(c.ns). Resource("kafkasources"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/kafka/source/pkg/client/informers/externalversions/bindings/v1alpha1/kafkabinding.go b/kafka/source/pkg/client/informers/externalversions/bindings/v1alpha1/kafkabinding.go index c18e609068..ea16a75130 100644 --- a/kafka/source/pkg/client/informers/externalversions/bindings/v1alpha1/kafkabinding.go +++ b/kafka/source/pkg/client/informers/externalversions/bindings/v1alpha1/kafkabinding.go @@ -19,6 +19,7 @@ limitations under the License. package v1alpha1 import ( + "context" time "time" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -61,13 +62,13 @@ func NewFilteredKafkaBindingInformer(client versioned.Interface, namespace strin if tweakListOptions != nil { tweakListOptions(&options) } - return client.BindingsV1alpha1().KafkaBindings(namespace).List(options) + return client.BindingsV1alpha1().KafkaBindings(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.BindingsV1alpha1().KafkaBindings(namespace).Watch(options) + return client.BindingsV1alpha1().KafkaBindings(namespace).Watch(context.TODO(), options) }, }, &bindingsv1alpha1.KafkaBinding{}, diff --git a/kafka/source/pkg/client/informers/externalversions/bindings/v1beta1/kafkabinding.go b/kafka/source/pkg/client/informers/externalversions/bindings/v1beta1/kafkabinding.go index 8ece067014..fe2813d2f2 100644 --- a/kafka/source/pkg/client/informers/externalversions/bindings/v1beta1/kafkabinding.go +++ b/kafka/source/pkg/client/informers/externalversions/bindings/v1beta1/kafkabinding.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" time "time" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -61,13 +62,13 @@ func NewFilteredKafkaBindingInformer(client versioned.Interface, namespace strin if tweakListOptions != nil { tweakListOptions(&options) } - return client.BindingsV1beta1().KafkaBindings(namespace).List(options) + return client.BindingsV1beta1().KafkaBindings(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.BindingsV1beta1().KafkaBindings(namespace).Watch(options) + return client.BindingsV1beta1().KafkaBindings(namespace).Watch(context.TODO(), options) }, }, &bindingsv1beta1.KafkaBinding{}, diff --git a/kafka/source/pkg/client/informers/externalversions/sources/v1alpha1/kafkasource.go b/kafka/source/pkg/client/informers/externalversions/sources/v1alpha1/kafkasource.go index 5f1b9af413..5fcf2c9b5c 100644 --- a/kafka/source/pkg/client/informers/externalversions/sources/v1alpha1/kafkasource.go +++ b/kafka/source/pkg/client/informers/externalversions/sources/v1alpha1/kafkasource.go @@ -19,6 +19,7 @@ limitations under the License. package v1alpha1 import ( + "context" time "time" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -61,13 +62,13 @@ func NewFilteredKafkaSourceInformer(client versioned.Interface, namespace string if tweakListOptions != nil { tweakListOptions(&options) } - return client.SourcesV1alpha1().KafkaSources(namespace).List(options) + return client.SourcesV1alpha1().KafkaSources(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.SourcesV1alpha1().KafkaSources(namespace).Watch(options) + return client.SourcesV1alpha1().KafkaSources(namespace).Watch(context.TODO(), options) }, }, &sourcesv1alpha1.KafkaSource{}, diff --git a/kafka/source/pkg/client/informers/externalversions/sources/v1beta1/kafkasource.go b/kafka/source/pkg/client/informers/externalversions/sources/v1beta1/kafkasource.go index 748fe132dc..1fb8d8526e 100644 --- a/kafka/source/pkg/client/informers/externalversions/sources/v1beta1/kafkasource.go +++ b/kafka/source/pkg/client/informers/externalversions/sources/v1beta1/kafkasource.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" time "time" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -61,13 +62,13 @@ func NewFilteredKafkaSourceInformer(client versioned.Interface, namespace string if tweakListOptions != nil { tweakListOptions(&options) } - return client.SourcesV1beta1().KafkaSources(namespace).List(options) + return client.SourcesV1beta1().KafkaSources(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.SourcesV1beta1().KafkaSources(namespace).Watch(options) + return client.SourcesV1beta1().KafkaSources(namespace).Watch(context.TODO(), options) }, }, &sourcesv1beta1.KafkaSource{}, diff --git a/kafka/source/pkg/client/injection/reconciler/bindings/v1alpha1/kafkabinding/reconciler.go b/kafka/source/pkg/client/injection/reconciler/bindings/v1alpha1/kafkabinding/reconciler.go index 517a81c60c..4434bfd26a 100644 --- a/kafka/source/pkg/client/injection/reconciler/bindings/v1alpha1/kafkabinding/reconciler.go +++ b/kafka/source/pkg/client/injection/reconciler/bindings/v1alpha1/kafkabinding/reconciler.go @@ -315,7 +315,7 @@ func (r *reconcilerImpl) updateStatus(ctx context.Context, existing *v1alpha1.Ka getter := r.Client.BindingsV1alpha1().KafkaBindings(desired.Namespace) - existing, err = getter.Get(desired.Name, metav1.GetOptions{}) + existing, err = getter.Get(ctx, desired.Name, metav1.GetOptions{}) if err != nil { return err } @@ -334,7 +334,7 @@ func (r *reconcilerImpl) updateStatus(ctx context.Context, existing *v1alpha1.Ka updater := r.Client.BindingsV1alpha1().KafkaBindings(existing.Namespace) - _, err = updater.UpdateStatus(existing) + _, err = updater.UpdateStatus(ctx, existing, metav1.UpdateOptions{}) return err }) } @@ -392,7 +392,7 @@ func (r *reconcilerImpl) updateFinalizersFiltered(ctx context.Context, resource patcher := r.Client.BindingsV1alpha1().KafkaBindings(resource.Namespace) resourceName := resource.Name - resource, err = patcher.Patch(resourceName, types.MergePatchType, patch) + resource, err = patcher.Patch(ctx, resourceName, types.MergePatchType, patch, metav1.PatchOptions{}) if err != nil { r.Recorder.Eventf(resource, v1.EventTypeWarning, "FinalizerUpdateFailed", "Failed to update finalizers for %q: %v", resourceName, err) diff --git a/kafka/source/pkg/client/injection/reconciler/bindings/v1beta1/kafkabinding/reconciler.go b/kafka/source/pkg/client/injection/reconciler/bindings/v1beta1/kafkabinding/reconciler.go index 0187a3e624..c40b0f743f 100644 --- a/kafka/source/pkg/client/injection/reconciler/bindings/v1beta1/kafkabinding/reconciler.go +++ b/kafka/source/pkg/client/injection/reconciler/bindings/v1beta1/kafkabinding/reconciler.go @@ -315,7 +315,7 @@ func (r *reconcilerImpl) updateStatus(ctx context.Context, existing *v1beta1.Kaf getter := r.Client.BindingsV1beta1().KafkaBindings(desired.Namespace) - existing, err = getter.Get(desired.Name, metav1.GetOptions{}) + existing, err = getter.Get(ctx, desired.Name, metav1.GetOptions{}) if err != nil { return err } @@ -334,7 +334,7 @@ func (r *reconcilerImpl) updateStatus(ctx context.Context, existing *v1beta1.Kaf updater := r.Client.BindingsV1beta1().KafkaBindings(existing.Namespace) - _, err = updater.UpdateStatus(existing) + _, err = updater.UpdateStatus(ctx, existing, metav1.UpdateOptions{}) return err }) } @@ -392,7 +392,7 @@ func (r *reconcilerImpl) updateFinalizersFiltered(ctx context.Context, resource patcher := r.Client.BindingsV1beta1().KafkaBindings(resource.Namespace) resourceName := resource.Name - resource, err = patcher.Patch(resourceName, types.MergePatchType, patch) + resource, err = patcher.Patch(ctx, resourceName, types.MergePatchType, patch, metav1.PatchOptions{}) if err != nil { r.Recorder.Eventf(resource, v1.EventTypeWarning, "FinalizerUpdateFailed", "Failed to update finalizers for %q: %v", resourceName, err) diff --git a/kafka/source/pkg/client/injection/reconciler/sources/v1alpha1/kafkasource/reconciler.go b/kafka/source/pkg/client/injection/reconciler/sources/v1alpha1/kafkasource/reconciler.go index b381df4303..ac2ff67c6d 100644 --- a/kafka/source/pkg/client/injection/reconciler/sources/v1alpha1/kafkasource/reconciler.go +++ b/kafka/source/pkg/client/injection/reconciler/sources/v1alpha1/kafkasource/reconciler.go @@ -315,7 +315,7 @@ func (r *reconcilerImpl) updateStatus(ctx context.Context, existing *v1alpha1.Ka getter := r.Client.SourcesV1alpha1().KafkaSources(desired.Namespace) - existing, err = getter.Get(desired.Name, metav1.GetOptions{}) + existing, err = getter.Get(ctx, desired.Name, metav1.GetOptions{}) if err != nil { return err } @@ -334,7 +334,7 @@ func (r *reconcilerImpl) updateStatus(ctx context.Context, existing *v1alpha1.Ka updater := r.Client.SourcesV1alpha1().KafkaSources(existing.Namespace) - _, err = updater.UpdateStatus(existing) + _, err = updater.UpdateStatus(ctx, existing, metav1.UpdateOptions{}) return err }) } @@ -392,7 +392,7 @@ func (r *reconcilerImpl) updateFinalizersFiltered(ctx context.Context, resource patcher := r.Client.SourcesV1alpha1().KafkaSources(resource.Namespace) resourceName := resource.Name - resource, err = patcher.Patch(resourceName, types.MergePatchType, patch) + resource, err = patcher.Patch(ctx, resourceName, types.MergePatchType, patch, metav1.PatchOptions{}) if err != nil { r.Recorder.Eventf(resource, v1.EventTypeWarning, "FinalizerUpdateFailed", "Failed to update finalizers for %q: %v", resourceName, err) diff --git a/kafka/source/pkg/client/injection/reconciler/sources/v1beta1/kafkasource/reconciler.go b/kafka/source/pkg/client/injection/reconciler/sources/v1beta1/kafkasource/reconciler.go index a3071e5b19..977878414a 100644 --- a/kafka/source/pkg/client/injection/reconciler/sources/v1beta1/kafkasource/reconciler.go +++ b/kafka/source/pkg/client/injection/reconciler/sources/v1beta1/kafkasource/reconciler.go @@ -315,7 +315,7 @@ func (r *reconcilerImpl) updateStatus(ctx context.Context, existing *v1beta1.Kaf getter := r.Client.SourcesV1beta1().KafkaSources(desired.Namespace) - existing, err = getter.Get(desired.Name, metav1.GetOptions{}) + existing, err = getter.Get(ctx, desired.Name, metav1.GetOptions{}) if err != nil { return err } @@ -334,7 +334,7 @@ func (r *reconcilerImpl) updateStatus(ctx context.Context, existing *v1beta1.Kaf updater := r.Client.SourcesV1beta1().KafkaSources(existing.Namespace) - _, err = updater.UpdateStatus(existing) + _, err = updater.UpdateStatus(ctx, existing, metav1.UpdateOptions{}) return err }) } @@ -392,7 +392,7 @@ func (r *reconcilerImpl) updateFinalizersFiltered(ctx context.Context, resource patcher := r.Client.SourcesV1beta1().KafkaSources(resource.Namespace) resourceName := resource.Name - resource, err = patcher.Patch(resourceName, types.MergePatchType, patch) + resource, err = patcher.Patch(ctx, resourceName, types.MergePatchType, patch, metav1.PatchOptions{}) if err != nil { r.Recorder.Eventf(resource, v1.EventTypeWarning, "FinalizerUpdateFailed", "Failed to update finalizers for %q: %v", resourceName, err) diff --git a/kafka/source/pkg/reconciler/source/kafkasource.go b/kafka/source/pkg/reconciler/source/kafkasource.go index 994156662c..e293d668ef 100644 --- a/kafka/source/pkg/reconciler/source/kafkasource.go +++ b/kafka/source/pkg/reconciler/source/kafkasource.go @@ -110,7 +110,7 @@ func (r *Reconciler) ReconcileKind(ctx context.Context, src *v1beta1.KafkaSource dest.Ref.Namespace = src.GetNamespace() } } - sinkURI, err := r.sinkResolver.URIFromDestinationV1(*dest, src) + sinkURI, err := r.sinkResolver.URIFromDestinationV1(ctx, *dest, src) if err != nil { src.Status.MarkNoSink("NotFound", "") //delete adapter deployment if sink not found @@ -167,9 +167,9 @@ func (r *Reconciler) createReceiveAdapter(ctx context.Context, src *v1beta1.Kafk } expected := resources.MakeReceiveAdapter(&raArgs) - ra, err := r.KubeClientSet.AppsV1().Deployments(src.Namespace).Get(expected.Name, metav1.GetOptions{}) + ra, err := r.KubeClientSet.AppsV1().Deployments(src.Namespace).Get(ctx, expected.Name, metav1.GetOptions{}) if err != nil && apierrors.IsNotFound(err) { - ra, err = r.KubeClientSet.AppsV1().Deployments(src.Namespace).Create(expected) + ra, err = r.KubeClientSet.AppsV1().Deployments(src.Namespace).Create(ctx, expected, metav1.CreateOptions{}) if err != nil { return nil, newDeploymentFailed(ra.Namespace, ra.Name, err) } @@ -181,7 +181,7 @@ func (r *Reconciler) createReceiveAdapter(ctx context.Context, src *v1beta1.Kafk return nil, fmt.Errorf("deployment %q is not owned by KafkaSource %q", ra.Name, src.Name) } else if podSpecChanged(ra.Spec.Template.Spec, expected.Spec.Template.Spec) { ra.Spec.Template.Spec = expected.Spec.Template.Spec - if ra, err = r.KubeClientSet.AppsV1().Deployments(src.Namespace).Update(ra); err != nil { + if ra, err = r.KubeClientSet.AppsV1().Deployments(src.Namespace).Update(ctx, ra, metav1.UpdateOptions{}); err != nil { return ra, err } return ra, deploymentUpdated(ra.Namespace, ra.Name) @@ -195,7 +195,7 @@ func (r *Reconciler) createReceiveAdapter(ctx context.Context, src *v1beta1.Kafk func (r *Reconciler) deleteReceiveAdapter(ctx context.Context, src *v1beta1.KafkaSource) error { name := utils.GenerateFixedName(src, fmt.Sprintf("kafkasource-%s", src.Name)) - return r.KubeClientSet.AppsV1().Deployments(src.Namespace).Delete(name, &metav1.DeleteOptions{}) + return r.KubeClientSet.AppsV1().Deployments(src.Namespace).Delete(ctx, name, metav1.DeleteOptions{}) } func podSpecChanged(oldPodSpec corev1.PodSpec, newPodSpec corev1.PodSpec) bool { diff --git a/natss/pkg/client/clientset/versioned/clientset.go b/natss/pkg/client/clientset/versioned/clientset.go index 6c33ac6562..f3a6fcb07e 100644 --- a/natss/pkg/client/clientset/versioned/clientset.go +++ b/natss/pkg/client/clientset/versioned/clientset.go @@ -59,7 +59,7 @@ func NewForConfig(c *rest.Config) (*Clientset, error) { configShallowCopy := *c if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 { if configShallowCopy.Burst <= 0 { - return nil, fmt.Errorf("Burst is required to be greater than 0 when RateLimiter is not set and QPS is set to greater than 0") + return nil, fmt.Errorf("burst is required to be greater than 0 when RateLimiter is not set and QPS is set to greater than 0") } configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst) } diff --git a/natss/pkg/client/clientset/versioned/typed/messaging/v1alpha1/fake/fake_natsschannel.go b/natss/pkg/client/clientset/versioned/typed/messaging/v1alpha1/fake/fake_natsschannel.go index c3ead73153..d1f253b0de 100644 --- a/natss/pkg/client/clientset/versioned/typed/messaging/v1alpha1/fake/fake_natsschannel.go +++ b/natss/pkg/client/clientset/versioned/typed/messaging/v1alpha1/fake/fake_natsschannel.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -39,7 +41,7 @@ var natsschannelsResource = schema.GroupVersionResource{Group: "messaging.knativ var natsschannelsKind = schema.GroupVersionKind{Group: "messaging.knative.dev", Version: "v1alpha1", Kind: "NatssChannel"} // Get takes name of the natssChannel, and returns the corresponding natssChannel object, and an error if there is any. -func (c *FakeNatssChannels) Get(name string, options v1.GetOptions) (result *v1alpha1.NatssChannel, err error) { +func (c *FakeNatssChannels) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.NatssChannel, err error) { obj, err := c.Fake. Invokes(testing.NewGetAction(natsschannelsResource, c.ns, name), &v1alpha1.NatssChannel{}) @@ -50,7 +52,7 @@ func (c *FakeNatssChannels) Get(name string, options v1.GetOptions) (result *v1a } // List takes label and field selectors, and returns the list of NatssChannels that match those selectors. -func (c *FakeNatssChannels) List(opts v1.ListOptions) (result *v1alpha1.NatssChannelList, err error) { +func (c *FakeNatssChannels) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.NatssChannelList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(natsschannelsResource, natsschannelsKind, c.ns, opts), &v1alpha1.NatssChannelList{}) @@ -72,14 +74,14 @@ func (c *FakeNatssChannels) List(opts v1.ListOptions) (result *v1alpha1.NatssCha } // Watch returns a watch.Interface that watches the requested natssChannels. -func (c *FakeNatssChannels) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeNatssChannels) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(natsschannelsResource, c.ns, opts)) } // Create takes the representation of a natssChannel and creates it. Returns the server's representation of the natssChannel, and an error, if there is any. -func (c *FakeNatssChannels) Create(natssChannel *v1alpha1.NatssChannel) (result *v1alpha1.NatssChannel, err error) { +func (c *FakeNatssChannels) Create(ctx context.Context, natssChannel *v1alpha1.NatssChannel, opts v1.CreateOptions) (result *v1alpha1.NatssChannel, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(natsschannelsResource, c.ns, natssChannel), &v1alpha1.NatssChannel{}) @@ -90,7 +92,7 @@ func (c *FakeNatssChannels) Create(natssChannel *v1alpha1.NatssChannel) (result } // Update takes the representation of a natssChannel and updates it. Returns the server's representation of the natssChannel, and an error, if there is any. -func (c *FakeNatssChannels) Update(natssChannel *v1alpha1.NatssChannel) (result *v1alpha1.NatssChannel, err error) { +func (c *FakeNatssChannels) Update(ctx context.Context, natssChannel *v1alpha1.NatssChannel, opts v1.UpdateOptions) (result *v1alpha1.NatssChannel, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(natsschannelsResource, c.ns, natssChannel), &v1alpha1.NatssChannel{}) @@ -102,7 +104,7 @@ func (c *FakeNatssChannels) Update(natssChannel *v1alpha1.NatssChannel) (result // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeNatssChannels) UpdateStatus(natssChannel *v1alpha1.NatssChannel) (*v1alpha1.NatssChannel, error) { +func (c *FakeNatssChannels) UpdateStatus(ctx context.Context, natssChannel *v1alpha1.NatssChannel, opts v1.UpdateOptions) (*v1alpha1.NatssChannel, error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(natsschannelsResource, "status", c.ns, natssChannel), &v1alpha1.NatssChannel{}) @@ -113,7 +115,7 @@ func (c *FakeNatssChannels) UpdateStatus(natssChannel *v1alpha1.NatssChannel) (* } // Delete takes name of the natssChannel and deletes it. Returns an error if one occurs. -func (c *FakeNatssChannels) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeNatssChannels) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewDeleteAction(natsschannelsResource, c.ns, name), &v1alpha1.NatssChannel{}) @@ -121,15 +123,15 @@ func (c *FakeNatssChannels) Delete(name string, options *v1.DeleteOptions) error } // DeleteCollection deletes a collection of objects. -func (c *FakeNatssChannels) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(natsschannelsResource, c.ns, listOptions) +func (c *FakeNatssChannels) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(natsschannelsResource, c.ns, listOpts) _, err := c.Fake.Invokes(action, &v1alpha1.NatssChannelList{}) return err } // Patch applies the patch and returns the patched natssChannel. -func (c *FakeNatssChannels) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.NatssChannel, err error) { +func (c *FakeNatssChannels) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.NatssChannel, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(natsschannelsResource, c.ns, name, pt, data, subresources...), &v1alpha1.NatssChannel{}) diff --git a/natss/pkg/client/clientset/versioned/typed/messaging/v1alpha1/natsschannel.go b/natss/pkg/client/clientset/versioned/typed/messaging/v1alpha1/natsschannel.go index 3b0187873b..4535510c6e 100644 --- a/natss/pkg/client/clientset/versioned/typed/messaging/v1alpha1/natsschannel.go +++ b/natss/pkg/client/clientset/versioned/typed/messaging/v1alpha1/natsschannel.go @@ -19,6 +19,7 @@ limitations under the License. package v1alpha1 import ( + "context" "time" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -37,15 +38,15 @@ type NatssChannelsGetter interface { // NatssChannelInterface has methods to work with NatssChannel resources. type NatssChannelInterface interface { - Create(*v1alpha1.NatssChannel) (*v1alpha1.NatssChannel, error) - Update(*v1alpha1.NatssChannel) (*v1alpha1.NatssChannel, error) - UpdateStatus(*v1alpha1.NatssChannel) (*v1alpha1.NatssChannel, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*v1alpha1.NatssChannel, error) - List(opts v1.ListOptions) (*v1alpha1.NatssChannelList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.NatssChannel, err error) + Create(ctx context.Context, natssChannel *v1alpha1.NatssChannel, opts v1.CreateOptions) (*v1alpha1.NatssChannel, error) + Update(ctx context.Context, natssChannel *v1alpha1.NatssChannel, opts v1.UpdateOptions) (*v1alpha1.NatssChannel, error) + UpdateStatus(ctx context.Context, natssChannel *v1alpha1.NatssChannel, opts v1.UpdateOptions) (*v1alpha1.NatssChannel, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.NatssChannel, error) + List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.NatssChannelList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.NatssChannel, err error) NatssChannelExpansion } @@ -64,20 +65,20 @@ func newNatssChannels(c *MessagingV1alpha1Client, namespace string) *natssChanne } // Get takes name of the natssChannel, and returns the corresponding natssChannel object, and an error if there is any. -func (c *natssChannels) Get(name string, options v1.GetOptions) (result *v1alpha1.NatssChannel, err error) { +func (c *natssChannels) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.NatssChannel, err error) { result = &v1alpha1.NatssChannel{} err = c.client.Get(). Namespace(c.ns). Resource("natsschannels"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of NatssChannels that match those selectors. -func (c *natssChannels) List(opts v1.ListOptions) (result *v1alpha1.NatssChannelList, err error) { +func (c *natssChannels) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.NatssChannelList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -88,13 +89,13 @@ func (c *natssChannels) List(opts v1.ListOptions) (result *v1alpha1.NatssChannel Resource("natsschannels"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested natssChannels. -func (c *natssChannels) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *natssChannels) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -105,87 +106,90 @@ func (c *natssChannels) Watch(opts v1.ListOptions) (watch.Interface, error) { Resource("natsschannels"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a natssChannel and creates it. Returns the server's representation of the natssChannel, and an error, if there is any. -func (c *natssChannels) Create(natssChannel *v1alpha1.NatssChannel) (result *v1alpha1.NatssChannel, err error) { +func (c *natssChannels) Create(ctx context.Context, natssChannel *v1alpha1.NatssChannel, opts v1.CreateOptions) (result *v1alpha1.NatssChannel, err error) { result = &v1alpha1.NatssChannel{} err = c.client.Post(). Namespace(c.ns). Resource("natsschannels"). + VersionedParams(&opts, scheme.ParameterCodec). Body(natssChannel). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a natssChannel and updates it. Returns the server's representation of the natssChannel, and an error, if there is any. -func (c *natssChannels) Update(natssChannel *v1alpha1.NatssChannel) (result *v1alpha1.NatssChannel, err error) { +func (c *natssChannels) Update(ctx context.Context, natssChannel *v1alpha1.NatssChannel, opts v1.UpdateOptions) (result *v1alpha1.NatssChannel, err error) { result = &v1alpha1.NatssChannel{} err = c.client.Put(). Namespace(c.ns). Resource("natsschannels"). Name(natssChannel.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(natssChannel). - Do(). + Do(ctx). Into(result) return } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *natssChannels) UpdateStatus(natssChannel *v1alpha1.NatssChannel) (result *v1alpha1.NatssChannel, err error) { +func (c *natssChannels) UpdateStatus(ctx context.Context, natssChannel *v1alpha1.NatssChannel, opts v1.UpdateOptions) (result *v1alpha1.NatssChannel, err error) { result = &v1alpha1.NatssChannel{} err = c.client.Put(). Namespace(c.ns). Resource("natsschannels"). Name(natssChannel.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(natssChannel). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the natssChannel and deletes it. Returns an error if one occurs. -func (c *natssChannels) Delete(name string, options *v1.DeleteOptions) error { +func (c *natssChannels) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("natsschannels"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *natssChannels) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *natssChannels) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Namespace(c.ns). Resource("natsschannels"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched natssChannel. -func (c *natssChannels) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.NatssChannel, err error) { +func (c *natssChannels) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.NatssChannel, err error) { result = &v1alpha1.NatssChannel{} err = c.client.Patch(pt). Namespace(c.ns). Resource("natsschannels"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/natss/pkg/client/informers/externalversions/messaging/v1alpha1/natsschannel.go b/natss/pkg/client/informers/externalversions/messaging/v1alpha1/natsschannel.go index 8cc3435839..7e18939081 100644 --- a/natss/pkg/client/informers/externalversions/messaging/v1alpha1/natsschannel.go +++ b/natss/pkg/client/informers/externalversions/messaging/v1alpha1/natsschannel.go @@ -19,6 +19,7 @@ limitations under the License. package v1alpha1 import ( + "context" time "time" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -61,13 +62,13 @@ func NewFilteredNatssChannelInformer(client versioned.Interface, namespace strin if tweakListOptions != nil { tweakListOptions(&options) } - return client.MessagingV1alpha1().NatssChannels(namespace).List(options) + return client.MessagingV1alpha1().NatssChannels(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.MessagingV1alpha1().NatssChannels(namespace).Watch(options) + return client.MessagingV1alpha1().NatssChannels(namespace).Watch(context.TODO(), options) }, }, &messagingv1alpha1.NatssChannel{}, diff --git a/natss/pkg/client/injection/reconciler/messaging/v1alpha1/natsschannel/reconciler.go b/natss/pkg/client/injection/reconciler/messaging/v1alpha1/natsschannel/reconciler.go index 32719a6c0e..6134c2d926 100644 --- a/natss/pkg/client/injection/reconciler/messaging/v1alpha1/natsschannel/reconciler.go +++ b/natss/pkg/client/injection/reconciler/messaging/v1alpha1/natsschannel/reconciler.go @@ -315,7 +315,7 @@ func (r *reconcilerImpl) updateStatus(ctx context.Context, existing *v1alpha1.Na getter := r.Client.MessagingV1alpha1().NatssChannels(desired.Namespace) - existing, err = getter.Get(desired.Name, metav1.GetOptions{}) + existing, err = getter.Get(ctx, desired.Name, metav1.GetOptions{}) if err != nil { return err } @@ -334,7 +334,7 @@ func (r *reconcilerImpl) updateStatus(ctx context.Context, existing *v1alpha1.Na updater := r.Client.MessagingV1alpha1().NatssChannels(existing.Namespace) - _, err = updater.UpdateStatus(existing) + _, err = updater.UpdateStatus(ctx, existing, metav1.UpdateOptions{}) return err }) } @@ -392,7 +392,7 @@ func (r *reconcilerImpl) updateFinalizersFiltered(ctx context.Context, resource patcher := r.Client.MessagingV1alpha1().NatssChannels(resource.Namespace) resourceName := resource.Name - resource, err = patcher.Patch(resourceName, types.MergePatchType, patch) + resource, err = patcher.Patch(ctx, resourceName, types.MergePatchType, patch, metav1.PatchOptions{}) if err != nil { r.Recorder.Eventf(resource, v1.EventTypeWarning, "FinalizerUpdateFailed", "Failed to update finalizers for %q: %v", resourceName, err) diff --git a/natss/pkg/reconciler/controller/natsschannel.go b/natss/pkg/reconciler/controller/natsschannel.go index a33cbdfd3e..e3045f7c44 100644 --- a/natss/pkg/reconciler/controller/natsschannel.go +++ b/natss/pkg/reconciler/controller/natsschannel.go @@ -174,7 +174,7 @@ func (r *Reconciler) reconcileChannelService(ctx context.Context, channel *v1alp logger.Error("Failed to create the channel service object", zap.Error(err)) return nil, err } - svc, err = r.kubeClientSet.CoreV1().Services(channel.Namespace).Create(svc) + svc, err = r.kubeClientSet.CoreV1().Services(channel.Namespace).Create(ctx, svc, metav1.CreateOptions{}) if err != nil { logger.Error("Failed to create the channel service", zap.Error(err)) return nil, err diff --git a/prometheus/pkg/client/clientset/versioned/clientset.go b/prometheus/pkg/client/clientset/versioned/clientset.go index 6a21598922..b1098f5f39 100644 --- a/prometheus/pkg/client/clientset/versioned/clientset.go +++ b/prometheus/pkg/client/clientset/versioned/clientset.go @@ -59,7 +59,7 @@ func NewForConfig(c *rest.Config) (*Clientset, error) { configShallowCopy := *c if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 { if configShallowCopy.Burst <= 0 { - return nil, fmt.Errorf("Burst is required to be greater than 0 when RateLimiter is not set and QPS is set to greater than 0") + return nil, fmt.Errorf("burst is required to be greater than 0 when RateLimiter is not set and QPS is set to greater than 0") } configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst) } diff --git a/prometheus/pkg/client/clientset/versioned/typed/sources/v1alpha1/fake/fake_prometheussource.go b/prometheus/pkg/client/clientset/versioned/typed/sources/v1alpha1/fake/fake_prometheussource.go index 595937d7c0..ceb644d98d 100644 --- a/prometheus/pkg/client/clientset/versioned/typed/sources/v1alpha1/fake/fake_prometheussource.go +++ b/prometheus/pkg/client/clientset/versioned/typed/sources/v1alpha1/fake/fake_prometheussource.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -39,7 +41,7 @@ var prometheussourcesResource = schema.GroupVersionResource{Group: "sources.knat var prometheussourcesKind = schema.GroupVersionKind{Group: "sources.knative.dev", Version: "v1alpha1", Kind: "PrometheusSource"} // Get takes name of the prometheusSource, and returns the corresponding prometheusSource object, and an error if there is any. -func (c *FakePrometheusSources) Get(name string, options v1.GetOptions) (result *v1alpha1.PrometheusSource, err error) { +func (c *FakePrometheusSources) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.PrometheusSource, err error) { obj, err := c.Fake. Invokes(testing.NewGetAction(prometheussourcesResource, c.ns, name), &v1alpha1.PrometheusSource{}) @@ -50,7 +52,7 @@ func (c *FakePrometheusSources) Get(name string, options v1.GetOptions) (result } // List takes label and field selectors, and returns the list of PrometheusSources that match those selectors. -func (c *FakePrometheusSources) List(opts v1.ListOptions) (result *v1alpha1.PrometheusSourceList, err error) { +func (c *FakePrometheusSources) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.PrometheusSourceList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(prometheussourcesResource, prometheussourcesKind, c.ns, opts), &v1alpha1.PrometheusSourceList{}) @@ -72,14 +74,14 @@ func (c *FakePrometheusSources) List(opts v1.ListOptions) (result *v1alpha1.Prom } // Watch returns a watch.Interface that watches the requested prometheusSources. -func (c *FakePrometheusSources) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakePrometheusSources) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(prometheussourcesResource, c.ns, opts)) } // Create takes the representation of a prometheusSource and creates it. Returns the server's representation of the prometheusSource, and an error, if there is any. -func (c *FakePrometheusSources) Create(prometheusSource *v1alpha1.PrometheusSource) (result *v1alpha1.PrometheusSource, err error) { +func (c *FakePrometheusSources) Create(ctx context.Context, prometheusSource *v1alpha1.PrometheusSource, opts v1.CreateOptions) (result *v1alpha1.PrometheusSource, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(prometheussourcesResource, c.ns, prometheusSource), &v1alpha1.PrometheusSource{}) @@ -90,7 +92,7 @@ func (c *FakePrometheusSources) Create(prometheusSource *v1alpha1.PrometheusSour } // Update takes the representation of a prometheusSource and updates it. Returns the server's representation of the prometheusSource, and an error, if there is any. -func (c *FakePrometheusSources) Update(prometheusSource *v1alpha1.PrometheusSource) (result *v1alpha1.PrometheusSource, err error) { +func (c *FakePrometheusSources) Update(ctx context.Context, prometheusSource *v1alpha1.PrometheusSource, opts v1.UpdateOptions) (result *v1alpha1.PrometheusSource, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(prometheussourcesResource, c.ns, prometheusSource), &v1alpha1.PrometheusSource{}) @@ -102,7 +104,7 @@ func (c *FakePrometheusSources) Update(prometheusSource *v1alpha1.PrometheusSour // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakePrometheusSources) UpdateStatus(prometheusSource *v1alpha1.PrometheusSource) (*v1alpha1.PrometheusSource, error) { +func (c *FakePrometheusSources) UpdateStatus(ctx context.Context, prometheusSource *v1alpha1.PrometheusSource, opts v1.UpdateOptions) (*v1alpha1.PrometheusSource, error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(prometheussourcesResource, "status", c.ns, prometheusSource), &v1alpha1.PrometheusSource{}) @@ -113,7 +115,7 @@ func (c *FakePrometheusSources) UpdateStatus(prometheusSource *v1alpha1.Promethe } // Delete takes name of the prometheusSource and deletes it. Returns an error if one occurs. -func (c *FakePrometheusSources) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakePrometheusSources) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewDeleteAction(prometheussourcesResource, c.ns, name), &v1alpha1.PrometheusSource{}) @@ -121,15 +123,15 @@ func (c *FakePrometheusSources) Delete(name string, options *v1.DeleteOptions) e } // DeleteCollection deletes a collection of objects. -func (c *FakePrometheusSources) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(prometheussourcesResource, c.ns, listOptions) +func (c *FakePrometheusSources) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(prometheussourcesResource, c.ns, listOpts) _, err := c.Fake.Invokes(action, &v1alpha1.PrometheusSourceList{}) return err } // Patch applies the patch and returns the patched prometheusSource. -func (c *FakePrometheusSources) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.PrometheusSource, err error) { +func (c *FakePrometheusSources) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.PrometheusSource, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(prometheussourcesResource, c.ns, name, pt, data, subresources...), &v1alpha1.PrometheusSource{}) diff --git a/prometheus/pkg/client/clientset/versioned/typed/sources/v1alpha1/prometheussource.go b/prometheus/pkg/client/clientset/versioned/typed/sources/v1alpha1/prometheussource.go index 4e047a87b6..7c3016bfca 100644 --- a/prometheus/pkg/client/clientset/versioned/typed/sources/v1alpha1/prometheussource.go +++ b/prometheus/pkg/client/clientset/versioned/typed/sources/v1alpha1/prometheussource.go @@ -19,6 +19,7 @@ limitations under the License. package v1alpha1 import ( + "context" "time" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -37,15 +38,15 @@ type PrometheusSourcesGetter interface { // PrometheusSourceInterface has methods to work with PrometheusSource resources. type PrometheusSourceInterface interface { - Create(*v1alpha1.PrometheusSource) (*v1alpha1.PrometheusSource, error) - Update(*v1alpha1.PrometheusSource) (*v1alpha1.PrometheusSource, error) - UpdateStatus(*v1alpha1.PrometheusSource) (*v1alpha1.PrometheusSource, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*v1alpha1.PrometheusSource, error) - List(opts v1.ListOptions) (*v1alpha1.PrometheusSourceList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.PrometheusSource, err error) + Create(ctx context.Context, prometheusSource *v1alpha1.PrometheusSource, opts v1.CreateOptions) (*v1alpha1.PrometheusSource, error) + Update(ctx context.Context, prometheusSource *v1alpha1.PrometheusSource, opts v1.UpdateOptions) (*v1alpha1.PrometheusSource, error) + UpdateStatus(ctx context.Context, prometheusSource *v1alpha1.PrometheusSource, opts v1.UpdateOptions) (*v1alpha1.PrometheusSource, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.PrometheusSource, error) + List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.PrometheusSourceList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.PrometheusSource, err error) PrometheusSourceExpansion } @@ -64,20 +65,20 @@ func newPrometheusSources(c *SourcesV1alpha1Client, namespace string) *prometheu } // Get takes name of the prometheusSource, and returns the corresponding prometheusSource object, and an error if there is any. -func (c *prometheusSources) Get(name string, options v1.GetOptions) (result *v1alpha1.PrometheusSource, err error) { +func (c *prometheusSources) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.PrometheusSource, err error) { result = &v1alpha1.PrometheusSource{} err = c.client.Get(). Namespace(c.ns). Resource("prometheussources"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of PrometheusSources that match those selectors. -func (c *prometheusSources) List(opts v1.ListOptions) (result *v1alpha1.PrometheusSourceList, err error) { +func (c *prometheusSources) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.PrometheusSourceList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -88,13 +89,13 @@ func (c *prometheusSources) List(opts v1.ListOptions) (result *v1alpha1.Promethe Resource("prometheussources"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested prometheusSources. -func (c *prometheusSources) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *prometheusSources) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -105,87 +106,90 @@ func (c *prometheusSources) Watch(opts v1.ListOptions) (watch.Interface, error) Resource("prometheussources"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a prometheusSource and creates it. Returns the server's representation of the prometheusSource, and an error, if there is any. -func (c *prometheusSources) Create(prometheusSource *v1alpha1.PrometheusSource) (result *v1alpha1.PrometheusSource, err error) { +func (c *prometheusSources) Create(ctx context.Context, prometheusSource *v1alpha1.PrometheusSource, opts v1.CreateOptions) (result *v1alpha1.PrometheusSource, err error) { result = &v1alpha1.PrometheusSource{} err = c.client.Post(). Namespace(c.ns). Resource("prometheussources"). + VersionedParams(&opts, scheme.ParameterCodec). Body(prometheusSource). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a prometheusSource and updates it. Returns the server's representation of the prometheusSource, and an error, if there is any. -func (c *prometheusSources) Update(prometheusSource *v1alpha1.PrometheusSource) (result *v1alpha1.PrometheusSource, err error) { +func (c *prometheusSources) Update(ctx context.Context, prometheusSource *v1alpha1.PrometheusSource, opts v1.UpdateOptions) (result *v1alpha1.PrometheusSource, err error) { result = &v1alpha1.PrometheusSource{} err = c.client.Put(). Namespace(c.ns). Resource("prometheussources"). Name(prometheusSource.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(prometheusSource). - Do(). + Do(ctx). Into(result) return } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *prometheusSources) UpdateStatus(prometheusSource *v1alpha1.PrometheusSource) (result *v1alpha1.PrometheusSource, err error) { +func (c *prometheusSources) UpdateStatus(ctx context.Context, prometheusSource *v1alpha1.PrometheusSource, opts v1.UpdateOptions) (result *v1alpha1.PrometheusSource, err error) { result = &v1alpha1.PrometheusSource{} err = c.client.Put(). Namespace(c.ns). Resource("prometheussources"). Name(prometheusSource.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(prometheusSource). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the prometheusSource and deletes it. Returns an error if one occurs. -func (c *prometheusSources) Delete(name string, options *v1.DeleteOptions) error { +func (c *prometheusSources) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("prometheussources"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *prometheusSources) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *prometheusSources) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Namespace(c.ns). Resource("prometheussources"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched prometheusSource. -func (c *prometheusSources) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.PrometheusSource, err error) { +func (c *prometheusSources) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.PrometheusSource, err error) { result = &v1alpha1.PrometheusSource{} err = c.client.Patch(pt). Namespace(c.ns). Resource("prometheussources"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/prometheus/pkg/client/informers/externalversions/sources/v1alpha1/prometheussource.go b/prometheus/pkg/client/informers/externalversions/sources/v1alpha1/prometheussource.go index 826ba19944..e14511009b 100644 --- a/prometheus/pkg/client/informers/externalversions/sources/v1alpha1/prometheussource.go +++ b/prometheus/pkg/client/informers/externalversions/sources/v1alpha1/prometheussource.go @@ -19,6 +19,7 @@ limitations under the License. package v1alpha1 import ( + "context" time "time" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -61,13 +62,13 @@ func NewFilteredPrometheusSourceInformer(client versioned.Interface, namespace s if tweakListOptions != nil { tweakListOptions(&options) } - return client.SourcesV1alpha1().PrometheusSources(namespace).List(options) + return client.SourcesV1alpha1().PrometheusSources(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.SourcesV1alpha1().PrometheusSources(namespace).Watch(options) + return client.SourcesV1alpha1().PrometheusSources(namespace).Watch(context.TODO(), options) }, }, &sourcesv1alpha1.PrometheusSource{}, diff --git a/prometheus/pkg/client/injection/reconciler/sources/v1alpha1/prometheussource/reconciler.go b/prometheus/pkg/client/injection/reconciler/sources/v1alpha1/prometheussource/reconciler.go index 95965a74ab..fa32ab0abd 100644 --- a/prometheus/pkg/client/injection/reconciler/sources/v1alpha1/prometheussource/reconciler.go +++ b/prometheus/pkg/client/injection/reconciler/sources/v1alpha1/prometheussource/reconciler.go @@ -307,7 +307,7 @@ func (r *reconcilerImpl) updateStatus(ctx context.Context, existing *v1alpha1.Pr getter := r.Client.SourcesV1alpha1().PrometheusSources(desired.Namespace) - existing, err = getter.Get(desired.Name, metav1.GetOptions{}) + existing, err = getter.Get(ctx, desired.Name, metav1.GetOptions{}) if err != nil { return err } @@ -326,7 +326,7 @@ func (r *reconcilerImpl) updateStatus(ctx context.Context, existing *v1alpha1.Pr updater := r.Client.SourcesV1alpha1().PrometheusSources(existing.Namespace) - _, err = updater.UpdateStatus(existing) + _, err = updater.UpdateStatus(ctx, existing, metav1.UpdateOptions{}) return err }) } @@ -384,7 +384,7 @@ func (r *reconcilerImpl) updateFinalizersFiltered(ctx context.Context, resource patcher := r.Client.SourcesV1alpha1().PrometheusSources(resource.Namespace) resourceName := resource.Name - resource, err = patcher.Patch(resourceName, types.MergePatchType, patch) + resource, err = patcher.Patch(ctx, resourceName, types.MergePatchType, patch, metav1.PatchOptions{}) if err != nil { r.Recorder.Eventf(resource, v1.EventTypeWarning, "FinalizerUpdateFailed", "Failed to update finalizers for %q: %v", resourceName, err) diff --git a/prometheus/pkg/reconciler/prometheussource.go b/prometheus/pkg/reconciler/prometheussource.go index ac6d60b504..5233016fbc 100644 --- a/prometheus/pkg/reconciler/prometheussource.go +++ b/prometheus/pkg/reconciler/prometheussource.go @@ -85,7 +85,7 @@ func (r *Reconciler) ReconcileKind(ctx context.Context, source *v1alpha1.Prometh } } - sinkURI, err := r.sinkResolver.URIFromDestinationV1(*dest, source) + sinkURI, err := r.sinkResolver.URIFromDestinationV1(ctx, *dest, source) if err != nil { source.Status.MarkNoSink("NotFound", "") return err @@ -134,9 +134,9 @@ func (r *Reconciler) createReceiveAdapter(ctx context.Context, src *v1alpha1.Pro } expected := resources.MakeReceiveAdapter(&adapterArgs) - ra, err := r.kubeClientSet.AppsV1().Deployments(src.Namespace).Get(expected.Name, metav1.GetOptions{}) + ra, err := r.kubeClientSet.AppsV1().Deployments(src.Namespace).Get(ctx, expected.Name, metav1.GetOptions{}) if apierrors.IsNotFound(err) { - ra, err = r.kubeClientSet.AppsV1().Deployments(src.Namespace).Create(expected) + ra, err = r.kubeClientSet.AppsV1().Deployments(src.Namespace).Create(ctx, expected, metav1.CreateOptions{}) controller.GetEventRecorder(ctx).Eventf(src, corev1.EventTypeNormal, prometheussourceDeploymentCreated, "Deployment created, error: %v", err) return ra, err } else if err != nil { @@ -145,7 +145,7 @@ func (r *Reconciler) createReceiveAdapter(ctx context.Context, src *v1alpha1.Pro return nil, fmt.Errorf("deployment %q is not owned by PrometheusSource %q", ra.Name, src.Name) } else if r.podSpecChanged(ra.Spec.Template.Spec, expected.Spec.Template.Spec) { ra.Spec.Template.Spec = expected.Spec.Template.Spec - if ra, err = r.kubeClientSet.AppsV1().Deployments(src.Namespace).Update(ra); err != nil { + if ra, err = r.kubeClientSet.AppsV1().Deployments(src.Namespace).Update(ctx, ra, metav1.UpdateOptions{}); err != nil { return ra, err } controller.GetEventRecorder(ctx).Eventf(src, corev1.EventTypeNormal, prometheussourceDeploymentUpdated, "Deployment updated") diff --git a/test/config/100-camel-k-1.1.0.yaml b/test/config/100-camel-k-1.1.0.yaml deleted file mode 100644 index a874300e48..0000000000 --- a/test/config/100-camel-k-1.1.0.yaml +++ /dev/null @@ -1,5977 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: integrationplatforms.camel.apache.org - labels: - app: "camel-k" -spec: - additionalPrinterColumns: - - JSONPath: .status.phase - description: The integration platform phase - name: Phase - type: string - group: camel.apache.org - names: - kind: IntegrationPlatform - listKind: IntegrationPlatformList - plural: integrationplatforms - shortNames: - - ip - singular: integrationplatform - categories: - - kamel - - camel - scope: Namespaced - subresources: - status: {} - validation: - openAPIV3Schema: - description: IntegrationPlatform is the Schema for the integrationplatforms - API - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: IntegrationPlatformSpec defines the desired state of IntegrationPlatform - properties: - build: - description: IntegrationPlatformBuildSpec contains platform related - build information - properties: - baseImage: - type: string - buildStrategy: - description: IntegrationPlatformBuildStrategy enumerates all implemented - build strategies - type: string - httpProxySecret: - type: string - kanikoBuildCache: - type: boolean - maven: - description: MavenSpec -- - properties: - localRepository: - type: string - settings: - description: ValueSource -- - properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. - properties: - key: - description: The key to select. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - optional: - description: Specify whether the ConfigMap or its key - must be defined - type: boolean - required: - - key - type: object - secretKeyRef: - description: Selects a key of a secret. - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - optional: - description: Specify whether the Secret or its key must - be defined - type: boolean - required: - - key - type: object - type: object - timeout: - type: string - type: object - persistentVolumeClaim: - type: string - properties: - additionalProperties: - type: string - type: object - publishStrategy: - description: IntegrationPlatformBuildPublishStrategy enumerates - all implemented publish strategies - type: string - registry: - description: IntegrationPlatformRegistrySpec -- - properties: - address: - type: string - ca: - type: string - insecure: - type: boolean - organization: - type: string - secret: - type: string - type: object - runtimeProvider: - description: RuntimeProvider -- - type: string - runtimeVersion: - type: string - timeout: - type: string - type: object - cluster: - description: IntegrationPlatformCluster is the kind of orchestration - cluster the platform is installed into - type: string - configuration: - items: - description: ConfigurationSpec -- - properties: - type: - type: string - value: - type: string - required: - - type - - value - type: object - type: array - profile: - description: TraitProfile represents lists of traits that are enabled - for the specific installation/integration - type: string - resources: - description: IntegrationPlatformResourcesSpec contains platform related - resources - properties: - kits: - items: - type: string - type: array - type: object - traits: - additionalProperties: - type: object - type: object - type: object - status: - description: IntegrationPlatformStatus defines the observed state of IntegrationPlatform - properties: - build: - description: IntegrationPlatformBuildSpec contains platform related - build information - properties: - baseImage: - type: string - buildStrategy: - description: IntegrationPlatformBuildStrategy enumerates all implemented - build strategies - type: string - httpProxySecret: - type: string - kanikoBuildCache: - type: boolean - maven: - description: MavenSpec -- - properties: - localRepository: - type: string - settings: - description: ValueSource -- - properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. - properties: - key: - description: The key to select. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - optional: - description: Specify whether the ConfigMap or its key - must be defined - type: boolean - required: - - key - type: object - secretKeyRef: - description: Selects a key of a secret. - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - optional: - description: Specify whether the Secret or its key must - be defined - type: boolean - required: - - key - type: object - type: object - timeout: - type: string - type: object - persistentVolumeClaim: - type: string - properties: - additionalProperties: - type: string - type: object - publishStrategy: - description: IntegrationPlatformBuildPublishStrategy enumerates - all implemented publish strategies - type: string - registry: - description: IntegrationPlatformRegistrySpec -- - properties: - address: - type: string - ca: - type: string - insecure: - type: boolean - organization: - type: string - secret: - type: string - type: object - runtimeProvider: - description: RuntimeProvider -- - type: string - runtimeVersion: - type: string - timeout: - type: string - type: object - cluster: - description: IntegrationPlatformCluster is the kind of orchestration - cluster the platform is installed into - type: string - conditions: - items: - description: IntegrationPlatformCondition describes the state of a - resource at a certain point. - properties: - lastTransitionTime: - description: Last time the condition transitioned from one status - to another. - format: date-time - type: string - lastUpdateTime: - description: The last time this condition was updated. - format: date-time - type: string - message: - description: A human readable message indicating details about - the transition. - type: string - reason: - description: The reason for the condition's last transition. - type: string - status: - description: Status of the condition, one of True, False, Unknown. - type: string - type: - description: Type of integration condition. - type: string - required: - - status - - type - type: object - type: array - configuration: - items: - description: ConfigurationSpec -- - properties: - type: - type: string - value: - type: string - required: - - type - - value - type: object - type: array - phase: - description: IntegrationPlatformPhase -- - type: string - profile: - description: TraitProfile represents lists of traits that are enabled - for the specific installation/integration - type: string - resources: - description: IntegrationPlatformResourcesSpec contains platform related - resources - properties: - kits: - items: - type: string - type: array - type: object - traits: - additionalProperties: - type: object - type: object - version: - type: string - type: object - type: object - version: v1 - versions: - - name: v1 - served: true - storage: true - ---- - -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: integrationkits.camel.apache.org - labels: - app: "camel-k" -spec: - additionalPrinterColumns: - - JSONPath: .status.phase - description: The integration kit phase - name: Phase - type: string - - JSONPath: .metadata.labels.camel\.apache\.org\/kit\.type - description: The integration kit type - name: Type - type: string - - JSONPath: .status.image - description: The integration kit image - name: Image - type: string - group: camel.apache.org - names: - kind: IntegrationKit - listKind: IntegrationKitList - plural: integrationkits - shortNames: - - ik - singular: integrationkit - categories: - - kamel - - camel - scope: Namespaced - subresources: - status: {} - validation: - openAPIV3Schema: - description: IntegrationKit is the Schema for the integrationkits API - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: IntegrationKitSpec defines the desired state of IntegrationKit - properties: - configuration: - items: - description: ConfigurationSpec -- - properties: - type: - type: string - value: - type: string - required: - - type - - value - type: object - type: array - dependencies: - items: - type: string - type: array - image: - type: string - profile: - description: TraitProfile represents lists of traits that are enabled - for the specific installation/integration - type: string - repositories: - items: - type: string - type: array - traits: - additionalProperties: - type: object - type: object - type: object - status: - description: IntegrationKitStatus defines the observed state of IntegrationKit - properties: - artifacts: - items: - description: Artifact -- - properties: - checksum: - type: string - id: - type: string - location: - type: string - target: - type: string - required: - - id - type: object - type: array - baseImage: - type: string - conditions: - items: - description: IntegrationKitCondition describes the state of a resource - at a certain point. - properties: - lastTransitionTime: - description: Last time the condition transitioned from one status - to another. - format: date-time - type: string - lastUpdateTime: - description: The last time this condition was updated. - format: date-time - type: string - message: - description: A human readable message indicating details about - the transition. - type: string - reason: - description: The reason for the condition's last transition. - type: string - status: - description: Status of the condition, one of True, False, Unknown. - type: string - type: - description: Type of integration condition. - type: string - required: - - status - - type - type: object - type: array - digest: - type: string - failure: - description: Failure -- - properties: - reason: - type: string - recovery: - description: FailureRecovery -- - properties: - attempt: - type: integer - attemptMax: - type: integer - attemptTime: - format: date-time - type: string - required: - - attempt - - attemptMax - type: object - time: - format: date-time - type: string - required: - - reason - - recovery - - time - type: object - image: - type: string - phase: - description: IntegrationKitPhase -- - type: string - platform: - type: string - runtimeProvider: - description: RuntimeProvider -- - type: string - runtimeVersion: - type: string - version: - type: string - type: object - type: object - version: v1 - versions: - - name: v1 - served: true - storage: true - ---- - -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: integrations.camel.apache.org - labels: - app: "camel-k" -spec: - additionalPrinterColumns: - - JSONPath: .status.phase - description: The integration phase - name: Phase - type: string - - JSONPath: .status.kit - description: The integration kit - name: Kit - type: string - - JSONPath: .status.replicas - description: The number of pods - name: Replicas - type: integer - group: camel.apache.org - names: - kind: Integration - listKind: IntegrationList - plural: integrations - shortNames: - - it - singular: integration - categories: - - kamel - - camel - scope: Namespaced - subresources: - scale: - labelSelectorPath: .status.selector - specReplicasPath: .spec.replicas - statusReplicasPath: .status.replicas - status: {} - validation: - openAPIV3Schema: - description: Integration is the Schema for the integrations API - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: IntegrationSpec defines the desired state of Integration - properties: - configuration: - items: - description: ConfigurationSpec -- - properties: - type: - type: string - value: - type: string - required: - - type - - value - type: object - type: array - dependencies: - items: - type: string - type: array - flows: - items: - type: object - type: array - kit: - type: string - profile: - description: TraitProfile represents lists of traits that are enabled - for the specific installation/integration - type: string - replicas: - format: int32 - type: integer - repositories: - items: - type: string - type: array - resources: - items: - description: ResourceSpec -- - properties: - compression: - type: boolean - content: - type: string - contentKey: - type: string - contentRef: - type: string - mountPath: - type: string - name: - type: string - type: - description: ResourceType -- - type: string - type: object - type: array - serviceAccountName: - type: string - sources: - items: - description: SourceSpec -- - properties: - compression: - type: boolean - content: - type: string - contentKey: - type: string - contentRef: - type: string - interceptors: - description: Interceptors are optional identifiers the org.apache.camel.k.RoutesLoader - uses to pre/post process sources - items: - type: string - type: array - language: - description: Language -- - type: string - loader: - description: Loader is an optional id of the org.apache.camel.k.RoutesLoader - that will interpret this source at runtime - type: string - name: - type: string - type: object - type: array - traits: - additionalProperties: - description: A TraitSpec contains the configuration of a trait - properties: - configuration: - type: object - required: - - configuration - type: object - type: object - type: object - status: - description: IntegrationStatus defines the observed state of Integration - properties: - capabilities: - items: - type: string - type: array - conditions: - items: - description: IntegrationCondition describes the state of a resource - at a certain point. - properties: - lastTransitionTime: - description: Last time the condition transitioned from one status - to another. - format: date-time - type: string - lastUpdateTime: - description: The last time this condition was updated. - format: date-time - type: string - message: - description: A human readable message indicating details about - the transition. - type: string - reason: - description: The reason for the condition's last transition. - type: string - status: - description: Status of the condition, one of True, False, Unknown. - type: string - type: - description: Type of integration condition. - type: string - required: - - status - - type - type: object - type: array - configuration: - items: - description: ConfigurationSpec -- - properties: - type: - type: string - value: - type: string - required: - - type - - value - type: object - type: array - dependencies: - items: - type: string - type: array - digest: - type: string - failure: - description: Failure -- - properties: - reason: - type: string - recovery: - description: FailureRecovery -- - properties: - attempt: - type: integer - attemptMax: - type: integer - attemptTime: - format: date-time - type: string - required: - - attempt - - attemptMax - type: object - time: - format: date-time - type: string - required: - - reason - - recovery - - time - type: object - generatedResources: - items: - description: ResourceSpec -- - properties: - compression: - type: boolean - content: - type: string - contentKey: - type: string - contentRef: - type: string - mountPath: - type: string - name: - type: string - type: - description: ResourceType -- - type: string - type: object - type: array - generatedSources: - items: - description: SourceSpec -- - properties: - compression: - type: boolean - content: - type: string - contentKey: - type: string - contentRef: - type: string - interceptors: - description: Interceptors are optional identifiers the org.apache.camel.k.RoutesLoader - uses to pre/post process sources - items: - type: string - type: array - language: - description: Language -- - type: string - loader: - description: Loader is an optional id of the org.apache.camel.k.RoutesLoader - that will interpret this source at runtime - type: string - name: - type: string - type: object - type: array - image: - type: string - kit: - type: string - phase: - description: IntegrationPhase -- - type: string - platform: - type: string - profile: - description: TraitProfile represents lists of traits that are enabled - for the specific installation/integration - type: string - replicas: - format: int32 - type: integer - runtimeProvider: - description: RuntimeProvider -- - type: string - runtimeVersion: - type: string - selector: - type: string - version: - type: string - type: object - type: object - version: v1 - versions: - - name: v1 - served: true - storage: true - ---- - -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: camelcatalogs.camel.apache.org - labels: - app: "camel-k" -spec: - additionalPrinterColumns: - - JSONPath: .spec.runtime.version - description: The Camel K Runtime version - name: Runtime Version - type: string - - JSONPath: .spec.runtime.provider - description: The Camel K Runtime provider - name: Runtime Provider - type: string - group: camel.apache.org - names: - kind: CamelCatalog - listKind: CamelCatalogList - plural: camelcatalogs - shortNames: - - cc - singular: camelcatalog - categories: - - kamel - - camel - scope: Namespaced - subresources: - status: {} - validation: - openAPIV3Schema: - description: CamelCatalog is the Schema for the camelcatalogs API - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: CamelCatalogSpec defines the desired state of CamelCatalog - properties: - artifacts: - additionalProperties: - description: CamelArtifact -- - properties: - artifactId: - type: string - dataformats: - items: - type: string - type: array - dependencies: - items: - description: CamelArtifactDependency represent a maven's dependency - properties: - artifactId: - type: string - exclusions: - items: - description: CamelArtifactExclusion -- - properties: - artifactId: - type: string - groupId: - type: string - required: - - artifactId - - groupId - type: object - type: array - groupId: - type: string - version: - type: string - required: - - artifactId - - groupId - type: object - type: array - exclusions: - items: - description: CamelArtifactExclusion -- - properties: - artifactId: - type: string - groupId: - type: string - required: - - artifactId - - groupId - type: object - type: array - groupId: - type: string - javaTypes: - items: - type: string - type: array - languages: - items: - type: string - type: array - schemes: - items: - description: CamelScheme -- - properties: - http: - type: boolean - id: - type: string - passive: - type: boolean - required: - - http - - id - - passive - type: object - type: array - version: - type: string - required: - - artifactId - - groupId - type: object - type: object - loaders: - additionalProperties: - description: CamelLoader -- - properties: - artifactId: - type: string - dependencies: - items: - description: MavenArtifact -- - properties: - artifactId: - type: string - groupId: - type: string - version: - type: string - required: - - artifactId - - groupId - type: object - type: array - groupId: - type: string - languages: - items: - type: string - type: array - version: - type: string - required: - - artifactId - - groupId - type: object - type: object - runtime: - description: RuntimeSpec -- - properties: - applicationClass: - type: string - capabilities: - additionalProperties: - description: Capability -- - properties: - dependencies: - items: - description: MavenArtifact -- - properties: - artifactId: - type: string - groupId: - type: string - version: - type: string - required: - - artifactId - - groupId - type: object - type: array - metadata: - additionalProperties: - type: string - type: object - required: - - dependencies - type: object - type: object - dependencies: - items: - description: MavenArtifact -- - properties: - artifactId: - type: string - groupId: - type: string - version: - type: string - required: - - artifactId - - groupId - type: object - type: array - metadata: - additionalProperties: - type: string - type: object - provider: - description: RuntimeProvider -- - type: string - version: - type: string - required: - - applicationClass - - dependencies - - provider - - version - type: object - required: - - artifacts - - loaders - - runtime - type: object - status: - description: CamelCatalogStatus defines the observed state of CamelCatalog - type: object - type: object - version: v1 - versions: - - name: v1 - served: true - storage: true - ---- - -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: builds.camel.apache.org - labels: - app: "camel-k" -spec: - additionalPrinterColumns: - - JSONPath: .status.phase - description: The build phase - name: Phase - type: string - - JSONPath: .metadata.creationTimestamp - description: The time at which the build was created - name: Age - type: date - - JSONPath: .status.startedAt - description: The time at which the build was last (re-)started - name: Started - type: date - - JSONPath: .status.duration - description: The build last execution duration - name: Duration - type: string - - JSONPath: .status.failure.recovery.attempt - description: The number of execution attempts - name: Attempts - type: integer - group: camel.apache.org - names: - kind: Build - listKind: BuildList - plural: builds - shortNames: - - ikb - singular: build - categories: - - kamel - - camel - scope: Namespaced - subresources: - status: {} - validation: - openAPIV3Schema: - description: Build is the Schema for the builds API - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: BuildSpec defines the desired state of Build - properties: - tasks: - description: 'INSERT ADDITIONAL SPEC FIELDS - desired state of cluster - Important: Run "operator-sdk generate k8s" to regenerate code after - modifying this file' - items: - description: Task -- - properties: - builder: - description: BuilderTask -- - properties: - affinity: - description: Affinity is a group of affinity scheduling rules. - properties: - nodeAffinity: - description: Describes node affinity scheduling rules - for the pod. - properties: - preferredDuringSchedulingIgnoredDuringExecution: - description: The scheduler will prefer to schedule - pods to nodes that satisfy the affinity expressions - specified by this field, but it may choose a node - that violates one or more of the expressions. The - node that is most preferred is the one with the - greatest sum of weights, i.e. for each node that - meets all of the scheduling requirements (resource - request, requiredDuringScheduling affinity expressions, - etc.), compute a sum by iterating through the elements - of this field and adding "weight" to the sum if - the node matches the corresponding matchExpressions; - the node(s) with the highest sum are the most preferred. - items: - description: An empty preferred scheduling term - matches all objects with implicit weight 0 (i.e. - it's a no-op). A null preferred scheduling term - matches no objects (i.e. is also a no-op). - properties: - preference: - description: A node selector term, associated - with the corresponding weight. - properties: - matchExpressions: - description: A list of node selector requirements - by node's labels. - items: - description: A node selector requirement - is a selector that contains values, - a key, and an operator that relates - the key and values. - properties: - key: - description: The label key that the - selector applies to. - type: string - operator: - description: Represents a key's relationship - to a set of values. Valid operators - are In, NotIn, Exists, DoesNotExist. - Gt, and Lt. - type: string - values: - description: An array of string values. - If the operator is In or NotIn, - the values array must be non-empty. - If the operator is Exists or DoesNotExist, - the values array must be empty. - If the operator is Gt or Lt, the - values array must have a single - element, which will be interpreted - as an integer. This array is replaced - during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchFields: - description: A list of node selector requirements - by node's fields. - items: - description: A node selector requirement - is a selector that contains values, - a key, and an operator that relates - the key and values. - properties: - key: - description: The label key that the - selector applies to. - type: string - operator: - description: Represents a key's relationship - to a set of values. Valid operators - are In, NotIn, Exists, DoesNotExist. - Gt, and Lt. - type: string - values: - description: An array of string values. - If the operator is In or NotIn, - the values array must be non-empty. - If the operator is Exists or DoesNotExist, - the values array must be empty. - If the operator is Gt or Lt, the - values array must have a single - element, which will be interpreted - as an integer. This array is replaced - during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - type: object - weight: - description: Weight associated with matching - the corresponding nodeSelectorTerm, in the - range 1-100. - format: int32 - type: integer - required: - - preference - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - description: If the affinity requirements specified - by this field are not met at scheduling time, the - pod will not be scheduled onto the node. If the - affinity requirements specified by this field cease - to be met at some point during pod execution (e.g. - due to an update), the system may or may not try - to eventually evict the pod from its node. - properties: - nodeSelectorTerms: - description: Required. A list of node selector - terms. The terms are ORed. - items: - description: A null or empty node selector term - matches no objects. The requirements of them - are ANDed. The TopologySelectorTerm type implements - a subset of the NodeSelectorTerm. - properties: - matchExpressions: - description: A list of node selector requirements - by node's labels. - items: - description: A node selector requirement - is a selector that contains values, - a key, and an operator that relates - the key and values. - properties: - key: - description: The label key that the - selector applies to. - type: string - operator: - description: Represents a key's relationship - to a set of values. Valid operators - are In, NotIn, Exists, DoesNotExist. - Gt, and Lt. - type: string - values: - description: An array of string values. - If the operator is In or NotIn, - the values array must be non-empty. - If the operator is Exists or DoesNotExist, - the values array must be empty. - If the operator is Gt or Lt, the - values array must have a single - element, which will be interpreted - as an integer. This array is replaced - during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchFields: - description: A list of node selector requirements - by node's fields. - items: - description: A node selector requirement - is a selector that contains values, - a key, and an operator that relates - the key and values. - properties: - key: - description: The label key that the - selector applies to. - type: string - operator: - description: Represents a key's relationship - to a set of values. Valid operators - are In, NotIn, Exists, DoesNotExist. - Gt, and Lt. - type: string - values: - description: An array of string values. - If the operator is In or NotIn, - the values array must be non-empty. - If the operator is Exists or DoesNotExist, - the values array must be empty. - If the operator is Gt or Lt, the - values array must have a single - element, which will be interpreted - as an integer. This array is replaced - during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - type: object - type: array - required: - - nodeSelectorTerms - type: object - type: object - podAffinity: - description: Describes pod affinity scheduling rules (e.g. - co-locate this pod in the same node, zone, etc. as some - other pod(s)). - properties: - preferredDuringSchedulingIgnoredDuringExecution: - description: The scheduler will prefer to schedule - pods to nodes that satisfy the affinity expressions - specified by this field, but it may choose a node - that violates one or more of the expressions. The - node that is most preferred is the one with the - greatest sum of weights, i.e. for each node that - meets all of the scheduling requirements (resource - request, requiredDuringScheduling affinity expressions, - etc.), compute a sum by iterating through the elements - of this field and adding "weight" to the sum if - the node has pods which matches the corresponding - podAffinityTerm; the node(s) with the highest sum - are the most preferred. - items: - description: The weights of all of the matched WeightedPodAffinityTerm - fields are added per-node to find the most preferred - node(s) - properties: - podAffinityTerm: - description: Required. A pod affinity term, - associated with the corresponding weight. - properties: - labelSelector: - description: A label query over a set of - resources, in this case pods. - properties: - matchExpressions: - description: matchExpressions is a list - of label selector requirements. The - requirements are ANDed. - items: - description: A label selector requirement - is a selector that contains values, - a key, and an operator that relates - the key and values. - properties: - key: - description: key is the label - key that the selector applies - to. - type: string - operator: - description: operator represents - a key's relationship to a set - of values. Valid operators are - In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array - of string values. If the operator - is In or NotIn, the values array - must be non-empty. If the operator - is Exists or DoesNotExist, the - values array must be empty. - This array is replaced during - a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of - {key,value} pairs. A single {key,value} - in the matchLabels map is equivalent - to an element of matchExpressions, - whose key field is "key", the operator - is "In", and the values array contains - only "value". The requirements are - ANDed. - type: object - type: object - namespaces: - description: namespaces specifies which - namespaces the labelSelector applies to - (matches against); null or empty list - means "this pod's namespace" - items: - type: string - type: array - topologyKey: - description: This pod should be co-located - (affinity) or not co-located (anti-affinity) - with the pods matching the labelSelector - in the specified namespaces, where co-located - is defined as running on a node whose - value of the label with key topologyKey - matches that of any node on which any - of the selected pods is running. Empty - topologyKey is not allowed. - type: string - required: - - topologyKey - type: object - weight: - description: weight associated with matching - the corresponding podAffinityTerm, in the - range 1-100. - format: int32 - type: integer - required: - - podAffinityTerm - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - description: If the affinity requirements specified - by this field are not met at scheduling time, the - pod will not be scheduled onto the node. If the - affinity requirements specified by this field cease - to be met at some point during pod execution (e.g. - due to a pod label update), the system may or may - not try to eventually evict the pod from its node. - When there are multiple elements, the lists of nodes - corresponding to each podAffinityTerm are intersected, - i.e. all terms must be satisfied. - items: - description: Defines a set of pods (namely those - matching the labelSelector relative to the given - namespace(s)) that this pod should be co-located - (affinity) or not co-located (anti-affinity) with, - where co-located is defined as running on a node - whose value of the label with key - matches that of any node on which a pod of the - set of pods is running - properties: - labelSelector: - description: A label query over a set of resources, - in this case pods. - properties: - matchExpressions: - description: matchExpressions is a list - of label selector requirements. The requirements - are ANDed. - items: - description: A label selector requirement - is a selector that contains values, - a key, and an operator that relates - the key and values. - properties: - key: - description: key is the label key - that the selector applies to. - type: string - operator: - description: operator represents a - key's relationship to a set of values. - Valid operators are In, NotIn, Exists - and DoesNotExist. - type: string - values: - description: values is an array of - string values. If the operator is - In or NotIn, the values array must - be non-empty. If the operator is - Exists or DoesNotExist, the values - array must be empty. This array - is replaced during a strategic merge - patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} - pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, - whose key field is "key", the operator - is "In", and the values array contains - only "value". The requirements are ANDed. - type: object - type: object - namespaces: - description: namespaces specifies which namespaces - the labelSelector applies to (matches against); - null or empty list means "this pod's namespace" - items: - type: string - type: array - topologyKey: - description: This pod should be co-located (affinity) - or not co-located (anti-affinity) with the - pods matching the labelSelector in the specified - namespaces, where co-located is defined as - running on a node whose value of the label - with key topologyKey matches that of any node - on which any of the selected pods is running. - Empty topologyKey is not allowed. - type: string - required: - - topologyKey - type: object - type: array - type: object - podAntiAffinity: - description: Describes pod anti-affinity scheduling rules - (e.g. avoid putting this pod in the same node, zone, - etc. as some other pod(s)). - properties: - preferredDuringSchedulingIgnoredDuringExecution: - description: The scheduler will prefer to schedule - pods to nodes that satisfy the anti-affinity expressions - specified by this field, but it may choose a node - that violates one or more of the expressions. The - node that is most preferred is the one with the - greatest sum of weights, i.e. for each node that - meets all of the scheduling requirements (resource - request, requiredDuringScheduling anti-affinity - expressions, etc.), compute a sum by iterating through - the elements of this field and adding "weight" to - the sum if the node has pods which matches the corresponding - podAffinityTerm; the node(s) with the highest sum - are the most preferred. - items: - description: The weights of all of the matched WeightedPodAffinityTerm - fields are added per-node to find the most preferred - node(s) - properties: - podAffinityTerm: - description: Required. A pod affinity term, - associated with the corresponding weight. - properties: - labelSelector: - description: A label query over a set of - resources, in this case pods. - properties: - matchExpressions: - description: matchExpressions is a list - of label selector requirements. The - requirements are ANDed. - items: - description: A label selector requirement - is a selector that contains values, - a key, and an operator that relates - the key and values. - properties: - key: - description: key is the label - key that the selector applies - to. - type: string - operator: - description: operator represents - a key's relationship to a set - of values. Valid operators are - In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array - of string values. If the operator - is In or NotIn, the values array - must be non-empty. If the operator - is Exists or DoesNotExist, the - values array must be empty. - This array is replaced during - a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of - {key,value} pairs. A single {key,value} - in the matchLabels map is equivalent - to an element of matchExpressions, - whose key field is "key", the operator - is "In", and the values array contains - only "value". The requirements are - ANDed. - type: object - type: object - namespaces: - description: namespaces specifies which - namespaces the labelSelector applies to - (matches against); null or empty list - means "this pod's namespace" - items: - type: string - type: array - topologyKey: - description: This pod should be co-located - (affinity) or not co-located (anti-affinity) - with the pods matching the labelSelector - in the specified namespaces, where co-located - is defined as running on a node whose - value of the label with key topologyKey - matches that of any node on which any - of the selected pods is running. Empty - topologyKey is not allowed. - type: string - required: - - topologyKey - type: object - weight: - description: weight associated with matching - the corresponding podAffinityTerm, in the - range 1-100. - format: int32 - type: integer - required: - - podAffinityTerm - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - description: If the anti-affinity requirements specified - by this field are not met at scheduling time, the - pod will not be scheduled onto the node. If the - anti-affinity requirements specified by this field - cease to be met at some point during pod execution - (e.g. due to a pod label update), the system may - or may not try to eventually evict the pod from - its node. When there are multiple elements, the - lists of nodes corresponding to each podAffinityTerm - are intersected, i.e. all terms must be satisfied. - items: - description: Defines a set of pods (namely those - matching the labelSelector relative to the given - namespace(s)) that this pod should be co-located - (affinity) or not co-located (anti-affinity) with, - where co-located is defined as running on a node - whose value of the label with key - matches that of any node on which a pod of the - set of pods is running - properties: - labelSelector: - description: A label query over a set of resources, - in this case pods. - properties: - matchExpressions: - description: matchExpressions is a list - of label selector requirements. The requirements - are ANDed. - items: - description: A label selector requirement - is a selector that contains values, - a key, and an operator that relates - the key and values. - properties: - key: - description: key is the label key - that the selector applies to. - type: string - operator: - description: operator represents a - key's relationship to a set of values. - Valid operators are In, NotIn, Exists - and DoesNotExist. - type: string - values: - description: values is an array of - string values. If the operator is - In or NotIn, the values array must - be non-empty. If the operator is - Exists or DoesNotExist, the values - array must be empty. This array - is replaced during a strategic merge - patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} - pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, - whose key field is "key", the operator - is "In", and the values array contains - only "value". The requirements are ANDed. - type: object - type: object - namespaces: - description: namespaces specifies which namespaces - the labelSelector applies to (matches against); - null or empty list means "this pod's namespace" - items: - type: string - type: array - topologyKey: - description: This pod should be co-located (affinity) - or not co-located (anti-affinity) with the - pods matching the labelSelector in the specified - namespaces, where co-located is defined as - running on a node whose value of the label - with key topologyKey matches that of any node - on which any of the selected pods is running. - Empty topologyKey is not allowed. - type: string - required: - - topologyKey - type: object - type: array - type: object - type: object - baseImage: - type: string - buildDir: - type: string - dependencies: - items: - type: string - type: array - image: - type: string - maven: - description: MavenSpec -- - properties: - localRepository: - type: string - settings: - description: ValueSource -- - properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. - properties: - key: - description: The key to select. - type: string - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the ConfigMap or - its key must be defined - type: boolean - required: - - key - type: object - secretKeyRef: - description: Selects a key of a secret. - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the Secret or its - key must be defined - type: boolean - required: - - key - type: object - type: object - timeout: - type: string - type: object - meta: - description: This is required until https://github.com/kubernetes-sigs/controller-tools/pull/395 - gets merged - type: object - x-kubernetes-preserve-unknown-fields: true - name: - type: string - properties: - additionalProperties: - type: string - type: object - resources: - items: - description: ResourceSpec -- - properties: - compression: - type: boolean - content: - type: string - contentKey: - type: string - contentRef: - type: string - mountPath: - type: string - name: - type: string - type: - description: ResourceType -- - type: string - type: object - type: array - runtime: - description: RuntimeSpec -- - properties: - applicationClass: - type: string - capabilities: - additionalProperties: - description: Capability -- - properties: - dependencies: - items: - description: MavenArtifact -- - properties: - artifactId: - type: string - groupId: - type: string - version: - type: string - required: - - artifactId - - groupId - type: object - type: array - metadata: - additionalProperties: - type: string - type: object - required: - - dependencies - type: object - type: object - dependencies: - items: - description: MavenArtifact -- - properties: - artifactId: - type: string - groupId: - type: string - version: - type: string - required: - - artifactId - - groupId - type: object - type: array - metadata: - additionalProperties: - type: string - type: object - provider: - description: RuntimeProvider -- - type: string - version: - type: string - required: - - applicationClass - - dependencies - - provider - - version - type: object - sources: - items: - description: SourceSpec -- - properties: - compression: - type: boolean - content: - type: string - contentKey: - type: string - contentRef: - type: string - interceptors: - description: Interceptors are optional identifiers the - org.apache.camel.k.RoutesLoader uses to pre/post process - sources - items: - type: string - type: array - language: - description: Language -- - type: string - loader: - description: Loader is an optional id of the org.apache.camel.k.RoutesLoader - that will interpret this source at runtime - type: string - name: - type: string - type: object - type: array - steps: - items: - type: string - type: array - timeout: - type: string - volumeMounts: - items: - description: VolumeMount describes a mounting of a Volume - within a container. - properties: - mountPath: - description: Path within the container at which the - volume should be mounted. Must not contain ':'. - type: string - mountPropagation: - description: mountPropagation determines how mounts - are propagated from the host to container and the - other way around. When not set, MountPropagationNone - is used. This field is beta in 1.10. - type: string - name: - description: This must match the Name of a Volume. - type: string - readOnly: - description: Mounted read-only if true, read-write otherwise - (false or unspecified). Defaults to false. - type: boolean - subPath: - description: Path within the volume from which the container's - volume should be mounted. Defaults to "" (volume's - root). - type: string - subPathExpr: - description: Expanded path within the volume from which - the container's volume should be mounted. Behaves - similarly to SubPath but environment variable references - $(VAR_NAME) are expanded using the container's environment. - Defaults to "" (volume's root). SubPathExpr and SubPath - are mutually exclusive. - type: string - required: - - mountPath - - name - type: object - type: array - volumes: - items: - description: Volume represents a named volume in a pod that - may be accessed by any container in the pod. - properties: - awsElasticBlockStore: - description: 'AWSElasticBlockStore represents an AWS - Disk resource that is attached to a kubelet''s host - machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' - properties: - fsType: - description: 'Filesystem type of the volume that - you want to mount. Tip: Ensure that the filesystem - type is supported by the host operating system. - Examples: "ext4", "xfs", "ntfs". Implicitly inferred - to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore - TODO: how do we prevent errors in the filesystem - from compromising the machine' - type: string - partition: - description: 'The partition in the volume that you - want to mount. If omitted, the default is to mount - by volume name. Examples: For volume /dev/sda1, - you specify the partition as "1". Similarly, the - volume partition for /dev/sda is "0" (or you can - leave the property empty).' - format: int32 - type: integer - readOnly: - description: 'Specify "true" to force and set the - ReadOnly property in VolumeMounts to "true". If - omitted, the default is "false". More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' - type: boolean - volumeID: - description: 'Unique ID of the persistent disk resource - in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' - type: string - required: - - volumeID - type: object - azureDisk: - description: AzureDisk represents an Azure Data Disk - mount on the host and bind mount to the pod. - properties: - cachingMode: - description: 'Host Caching mode: None, Read Only, - Read Write.' - type: string - diskName: - description: The Name of the data disk in the blob - storage - type: string - diskURI: - description: The URI the data disk in the blob storage - type: string - fsType: - description: Filesystem type to mount. Must be a - filesystem type supported by the host operating - system. Ex. "ext4", "xfs", "ntfs". Implicitly - inferred to be "ext4" if unspecified. - type: string - kind: - description: 'Expected values Shared: multiple blob - disks per storage account Dedicated: single blob - disk per storage account Managed: azure managed - data disk (only in managed availability set). - defaults to shared' - type: string - readOnly: - description: Defaults to false (read/write). ReadOnly - here will force the ReadOnly setting in VolumeMounts. - type: boolean - required: - - diskName - - diskURI - type: object - azureFile: - description: AzureFile represents an Azure File Service - mount on the host and bind mount to the pod. - properties: - readOnly: - description: Defaults to false (read/write). ReadOnly - here will force the ReadOnly setting in VolumeMounts. - type: boolean - secretName: - description: the name of secret that contains Azure - Storage Account Name and Key - type: string - shareName: - description: Share Name - type: string - required: - - secretName - - shareName - type: object - cephfs: - description: CephFS represents a Ceph FS mount on the - host that shares a pod's lifetime - properties: - monitors: - description: 'Required: Monitors is a collection - of Ceph monitors More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' - items: - type: string - type: array - path: - description: 'Optional: Used as the mounted root, - rather than the full Ceph tree, default is /' - type: string - readOnly: - description: 'Optional: Defaults to false (read/write). - ReadOnly here will force the ReadOnly setting - in VolumeMounts. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' - type: boolean - secretFile: - description: 'Optional: SecretFile is the path to - key ring for User, default is /etc/ceph/user.secret - More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' - type: string - secretRef: - description: 'Optional: SecretRef is reference to - the authentication secret for User, default is - empty. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' - properties: - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' - type: string - type: object - user: - description: 'Optional: User is the rados user name, - default is admin More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' - type: string - required: - - monitors - type: object - cinder: - description: 'Cinder represents a cinder volume attached - and mounted on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' - properties: - fsType: - description: 'Filesystem type to mount. Must be - a filesystem type supported by the host operating - system. Examples: "ext4", "xfs", "ntfs". Implicitly - inferred to be "ext4" if unspecified. More info: - https://examples.k8s.io/mysql-cinder-pd/README.md' - type: string - readOnly: - description: 'Optional: Defaults to false (read/write). - ReadOnly here will force the ReadOnly setting - in VolumeMounts. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' - type: boolean - secretRef: - description: 'Optional: points to a secret object - containing parameters used to connect to OpenStack.' - properties: - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' - type: string - type: object - volumeID: - description: 'volume id used to identify the volume - in cinder. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' - type: string - required: - - volumeID - type: object - configMap: - description: ConfigMap represents a configMap that should - populate this volume - properties: - defaultMode: - description: 'Optional: mode bits to use on created - files by default. Must be a value between 0 and - 0777. Defaults to 0644. Directories within the - path are not affected by this setting. This might - be in conflict with other options that affect - the file mode, like fsGroup, and the result can - be other mode bits set.' - format: int32 - type: integer - items: - description: If unspecified, each key-value pair - in the Data field of the referenced ConfigMap - will be projected into the volume as a file whose - name is the key and content is the value. If specified, - the listed keys will be projected into the specified - paths, and unlisted keys will not be present. - If a key is specified which is not present in - the ConfigMap, the volume setup will error unless - it is marked optional. Paths must be relative - and may not contain the '..' path or start with - '..'. - items: - description: Maps a string key to a path within - a volume. - properties: - key: - description: The key to project. - type: string - mode: - description: 'Optional: mode bits to use on - this file, must be a value between 0 and - 0777. If not specified, the volume defaultMode - will be used. This might be in conflict - with other options that affect the file - mode, like fsGroup, and the result can be - other mode bits set.' - format: int32 - type: integer - path: - description: The relative path of the file - to map the key to. May not be an absolute - path. May not contain the path element '..'. - May not start with the string '..'. - type: string - required: - - key - - path - type: object - type: array - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the ConfigMap or its - keys must be defined - type: boolean - type: object - csi: - description: CSI (Container Storage Interface) represents - storage that is handled by an external CSI driver - (Alpha feature). - properties: - driver: - description: Driver is the name of the CSI driver - that handles this volume. Consult with your admin - for the correct name as registered in the cluster. - type: string - fsType: - description: Filesystem type to mount. Ex. "ext4", - "xfs", "ntfs". If not provided, the empty value - is passed to the associated CSI driver which will - determine the default filesystem to apply. - type: string - nodePublishSecretRef: - description: NodePublishSecretRef is a reference - to the secret object containing sensitive information - to pass to the CSI driver to complete the CSI - NodePublishVolume and NodeUnpublishVolume calls. - This field is optional, and may be empty if no - secret is required. If the secret object contains - more than one secret, all secret references are - passed. - properties: - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' - type: string - type: object - readOnly: - description: Specifies a read-only configuration - for the volume. Defaults to false (read/write). - type: boolean - volumeAttributes: - additionalProperties: - type: string - description: VolumeAttributes stores driver-specific - properties that are passed to the CSI driver. - Consult your driver's documentation for supported - values. - type: object - required: - - driver - type: object - downwardAPI: - description: DownwardAPI represents downward API about - the pod that should populate this volume - properties: - defaultMode: - description: 'Optional: mode bits to use on created - files by default. Must be a value between 0 and - 0777. Defaults to 0644. Directories within the - path are not affected by this setting. This might - be in conflict with other options that affect - the file mode, like fsGroup, and the result can - be other mode bits set.' - format: int32 - type: integer - items: - description: Items is a list of downward API volume - file - items: - description: DownwardAPIVolumeFile represents - information to create the file containing the - pod field - properties: - fieldRef: - description: 'Required: Selects a field of - the pod: only annotations, labels, name - and namespace are supported.' - properties: - apiVersion: - description: Version of the schema the - FieldPath is written in terms of, defaults - to "v1". - type: string - fieldPath: - description: Path of the field to select - in the specified API version. - type: string - required: - - fieldPath - type: object - mode: - description: 'Optional: mode bits to use on - this file, must be a value between 0 and - 0777. If not specified, the volume defaultMode - will be used. This might be in conflict - with other options that affect the file - mode, like fsGroup, and the result can be - other mode bits set.' - format: int32 - type: integer - path: - description: 'Required: Path is the relative - path name of the file to be created. Must - not be absolute or contain the ''..'' path. - Must be utf-8 encoded. The first item of - the relative path must not start with ''..''' - type: string - resourceFieldRef: - description: 'Selects a resource of the container: - only resources limits and requests (limits.cpu, - limits.memory, requests.cpu and requests.memory) - are currently supported.' - properties: - containerName: - description: 'Container name: required - for volumes, optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format - of the exposed resources, defaults to - "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - required: - - resource - type: object - required: - - path - type: object - type: array - type: object - emptyDir: - description: 'EmptyDir represents a temporary directory - that shares a pod''s lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' - properties: - medium: - description: 'What type of storage medium should - back this directory. The default is "" which means - to use the node''s default medium. Must be an - empty string (default) or Memory. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' - type: string - sizeLimit: - anyOf: - - type: integer - - type: string - description: 'Total amount of local storage required - for this EmptyDir volume. The size limit is also - applicable for memory medium. The maximum usage - on memory medium EmptyDir would be the minimum - value between the SizeLimit specified here and - the sum of memory limits of all containers in - a pod. The default is nil which means that the - limit is undefined. More info: http://kubernetes.io/docs/user-guide/volumes#emptydir' - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - fc: - description: FC represents a Fibre Channel resource - that is attached to a kubelet's host machine and then - exposed to the pod. - properties: - fsType: - description: 'Filesystem type to mount. Must be - a filesystem type supported by the host operating - system. Ex. "ext4", "xfs", "ntfs". Implicitly - inferred to be "ext4" if unspecified. TODO: how - do we prevent errors in the filesystem from compromising - the machine' - type: string - lun: - description: 'Optional: FC target lun number' - format: int32 - type: integer - readOnly: - description: 'Optional: Defaults to false (read/write). - ReadOnly here will force the ReadOnly setting - in VolumeMounts.' - type: boolean - targetWWNs: - description: 'Optional: FC target worldwide names - (WWNs)' - items: - type: string - type: array - wwids: - description: 'Optional: FC volume world wide identifiers - (wwids) Either wwids or combination of targetWWNs - and lun must be set, but not both simultaneously.' - items: - type: string - type: array - type: object - flexVolume: - description: FlexVolume represents a generic volume - resource that is provisioned/attached using an exec - based plugin. - properties: - driver: - description: Driver is the name of the driver to - use for this volume. - type: string - fsType: - description: Filesystem type to mount. Must be a - filesystem type supported by the host operating - system. Ex. "ext4", "xfs", "ntfs". The default - filesystem depends on FlexVolume script. - type: string - options: - additionalProperties: - type: string - description: 'Optional: Extra command options if - any.' - type: object - readOnly: - description: 'Optional: Defaults to false (read/write). - ReadOnly here will force the ReadOnly setting - in VolumeMounts.' - type: boolean - secretRef: - description: 'Optional: SecretRef is reference to - the secret object containing sensitive information - to pass to the plugin scripts. This may be empty - if no secret object is specified. If the secret - object contains more than one secret, all secrets - are passed to the plugin scripts.' - properties: - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' - type: string - type: object - required: - - driver - type: object - flocker: - description: Flocker represents a Flocker volume attached - to a kubelet's host machine. This depends on the Flocker - control service being running - properties: - datasetName: - description: Name of the dataset stored as metadata - -> name on the dataset for Flocker should be considered - as deprecated - type: string - datasetUUID: - description: UUID of the dataset. This is unique - identifier of a Flocker dataset - type: string - type: object - gcePersistentDisk: - description: 'GCEPersistentDisk represents a GCE Disk - resource that is attached to a kubelet''s host machine - and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' - properties: - fsType: - description: 'Filesystem type of the volume that - you want to mount. Tip: Ensure that the filesystem - type is supported by the host operating system. - Examples: "ext4", "xfs", "ntfs". Implicitly inferred - to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk - TODO: how do we prevent errors in the filesystem - from compromising the machine' - type: string - partition: - description: 'The partition in the volume that you - want to mount. If omitted, the default is to mount - by volume name. Examples: For volume /dev/sda1, - you specify the partition as "1". Similarly, the - volume partition for /dev/sda is "0" (or you can - leave the property empty). More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' - format: int32 - type: integer - pdName: - description: 'Unique name of the PD resource in - GCE. Used to identify the disk in GCE. More info: - https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' - type: string - readOnly: - description: 'ReadOnly here will force the ReadOnly - setting in VolumeMounts. Defaults to false. More - info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' - type: boolean - required: - - pdName - type: object - gitRepo: - description: 'GitRepo represents a git repository at - a particular revision. DEPRECATED: GitRepo is deprecated. - To provision a container with a git repo, mount an - EmptyDir into an InitContainer that clones the repo - using git, then mount the EmptyDir into the Pod''s - container.' - properties: - directory: - description: Target directory name. Must not contain - or start with '..'. If '.' is supplied, the volume - directory will be the git repository. Otherwise, - if specified, the volume will contain the git - repository in the subdirectory with the given - name. - type: string - repository: - description: Repository URL - type: string - revision: - description: Commit hash for the specified revision. - type: string - required: - - repository - type: object - glusterfs: - description: 'Glusterfs represents a Glusterfs mount - on the host that shares a pod''s lifetime. More info: - https://examples.k8s.io/volumes/glusterfs/README.md' - properties: - endpoints: - description: 'EndpointsName is the endpoint name - that details Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' - type: string - path: - description: 'Path is the Glusterfs volume path. - More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' - type: string - readOnly: - description: 'ReadOnly here will force the Glusterfs - volume to be mounted with read-only permissions. - Defaults to false. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' - type: boolean - required: - - endpoints - - path - type: object - hostPath: - description: 'HostPath represents a pre-existing file - or directory on the host machine that is directly - exposed to the container. This is generally used for - system agents or other privileged things that are - allowed to see the host machine. Most containers will - NOT need this. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath - --- TODO(jonesdl) We need to restrict who can use - host directory mounts and who can/can not mount host - directories as read/write.' - properties: - path: - description: 'Path of the directory on the host. - If the path is a symlink, it will follow the link - to the real path. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath' - type: string - type: - description: 'Type for HostPath Volume Defaults - to "" More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath' - type: string - required: - - path - type: object - iscsi: - description: 'ISCSI represents an ISCSI Disk resource - that is attached to a kubelet''s host machine and - then exposed to the pod. More info: https://examples.k8s.io/volumes/iscsi/README.md' - properties: - chapAuthDiscovery: - description: whether support iSCSI Discovery CHAP - authentication - type: boolean - chapAuthSession: - description: whether support iSCSI Session CHAP - authentication - type: boolean - fsType: - description: 'Filesystem type of the volume that - you want to mount. Tip: Ensure that the filesystem - type is supported by the host operating system. - Examples: "ext4", "xfs", "ntfs". Implicitly inferred - to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi - TODO: how do we prevent errors in the filesystem - from compromising the machine' - type: string - initiatorName: - description: Custom iSCSI Initiator Name. If initiatorName - is specified with iscsiInterface simultaneously, - new iSCSI interface : - will be created for the connection. - type: string - iqn: - description: Target iSCSI Qualified Name. - type: string - iscsiInterface: - description: iSCSI Interface Name that uses an iSCSI - transport. Defaults to 'default' (tcp). - type: string - lun: - description: iSCSI Target Lun number. - format: int32 - type: integer - portals: - description: iSCSI Target Portal List. The portal - is either an IP or ip_addr:port if the port is - other than default (typically TCP ports 860 and - 3260). - items: - type: string - type: array - readOnly: - description: ReadOnly here will force the ReadOnly - setting in VolumeMounts. Defaults to false. - type: boolean - secretRef: - description: CHAP Secret for iSCSI target and initiator - authentication - properties: - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' - type: string - type: object - targetPortal: - description: iSCSI Target Portal. The Portal is - either an IP or ip_addr:port if the port is other - than default (typically TCP ports 860 and 3260). - type: string - required: - - iqn - - lun - - targetPortal - type: object - name: - description: 'Volume''s name. Must be a DNS_LABEL and - unique within the pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - nfs: - description: 'NFS represents an NFS mount on the host - that shares a pod''s lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' - properties: - path: - description: 'Path that is exported by the NFS server. - More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' - type: string - readOnly: - description: 'ReadOnly here will force the NFS export - to be mounted with read-only permissions. Defaults - to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' - type: boolean - server: - description: 'Server is the hostname or IP address - of the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' - type: string - required: - - path - - server - type: object - persistentVolumeClaim: - description: 'PersistentVolumeClaimVolumeSource represents - a reference to a PersistentVolumeClaim in the same - namespace. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' - properties: - claimName: - description: 'ClaimName is the name of a PersistentVolumeClaim - in the same namespace as the pod using this volume. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' - type: string - readOnly: - description: Will force the ReadOnly setting in - VolumeMounts. Default false. - type: boolean - required: - - claimName - type: object - photonPersistentDisk: - description: PhotonPersistentDisk represents a PhotonController - persistent disk attached and mounted on kubelets host - machine - properties: - fsType: - description: Filesystem type to mount. Must be a - filesystem type supported by the host operating - system. Ex. "ext4", "xfs", "ntfs". Implicitly - inferred to be "ext4" if unspecified. - type: string - pdID: - description: ID that identifies Photon Controller - persistent disk - type: string - required: - - pdID - type: object - portworxVolume: - description: PortworxVolume represents a portworx volume - attached and mounted on kubelets host machine - properties: - fsType: - description: FSType represents the filesystem type - to mount Must be a filesystem type supported by - the host operating system. Ex. "ext4", "xfs". - Implicitly inferred to be "ext4" if unspecified. - type: string - readOnly: - description: Defaults to false (read/write). ReadOnly - here will force the ReadOnly setting in VolumeMounts. - type: boolean - volumeID: - description: VolumeID uniquely identifies a Portworx - volume - type: string - required: - - volumeID - type: object - projected: - description: Items for all in one resources secrets, - configmaps, and downward API - properties: - defaultMode: - description: Mode bits to use on created files by - default. Must be a value between 0 and 0777. Directories - within the path are not affected by this setting. - This might be in conflict with other options that - affect the file mode, like fsGroup, and the result - can be other mode bits set. - format: int32 - type: integer - sources: - description: list of volume projections - items: - description: Projection that may be projected - along with other supported volume types - properties: - configMap: - description: information about the configMap - data to project - properties: - items: - description: If unspecified, each key-value - pair in the Data field of the referenced - ConfigMap will be projected into the - volume as a file whose name is the key - and content is the value. If specified, - the listed keys will be projected into - the specified paths, and unlisted keys - will not be present. If a key is specified - which is not present in the ConfigMap, - the volume setup will error unless it - is marked optional. Paths must be relative - and may not contain the '..' path or - start with '..'. - items: - description: Maps a string key to a - path within a volume. - properties: - key: - description: The key to project. - type: string - mode: - description: 'Optional: mode bits - to use on this file, must be a - value between 0 and 0777. If not - specified, the volume defaultMode - will be used. This might be in - conflict with other options that - affect the file mode, like fsGroup, - and the result can be other mode - bits set.' - format: int32 - type: integer - path: - description: The relative path of - the file to map the key to. May - not be an absolute path. May not - contain the path element '..'. - May not start with the string - '..'. - type: string - required: - - key - - path - type: object - type: array - name: - description: 'Name of the referent. More - info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' - type: string - optional: - description: Specify whether the ConfigMap - or its keys must be defined - type: boolean - type: object - downwardAPI: - description: information about the downwardAPI - data to project - properties: - items: - description: Items is a list of DownwardAPIVolume - file - items: - description: DownwardAPIVolumeFile represents - information to create the file containing - the pod field - properties: - fieldRef: - description: 'Required: Selects - a field of the pod: only annotations, - labels, name and namespace are - supported.' - properties: - apiVersion: - description: Version of the - schema the FieldPath is written - in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field - to select in the specified - API version. - type: string - required: - - fieldPath - type: object - mode: - description: 'Optional: mode bits - to use on this file, must be a - value between 0 and 0777. If not - specified, the volume defaultMode - will be used. This might be in - conflict with other options that - affect the file mode, like fsGroup, - and the result can be other mode - bits set.' - format: int32 - type: integer - path: - description: 'Required: Path is the - relative path name of the file - to be created. Must not be absolute - or contain the ''..'' path. Must - be utf-8 encoded. The first item - of the relative path must not - start with ''..''' - type: string - resourceFieldRef: - description: 'Selects a resource - of the container: only resources - limits and requests (limits.cpu, - limits.memory, requests.cpu and - requests.memory) are currently - supported.' - properties: - containerName: - description: 'Container name: - required for volumes, optional - for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output - format of the exposed resources, - defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource - to select' - type: string - required: - - resource - type: object - required: - - path - type: object - type: array - type: object - secret: - description: information about the secret - data to project - properties: - items: - description: If unspecified, each key-value - pair in the Data field of the referenced - Secret will be projected into the volume - as a file whose name is the key and - content is the value. If specified, - the listed keys will be projected into - the specified paths, and unlisted keys - will not be present. If a key is specified - which is not present in the Secret, - the volume setup will error unless it - is marked optional. Paths must be relative - and may not contain the '..' path or - start with '..'. - items: - description: Maps a string key to a - path within a volume. - properties: - key: - description: The key to project. - type: string - mode: - description: 'Optional: mode bits - to use on this file, must be a - value between 0 and 0777. If not - specified, the volume defaultMode - will be used. This might be in - conflict with other options that - affect the file mode, like fsGroup, - and the result can be other mode - bits set.' - format: int32 - type: integer - path: - description: The relative path of - the file to map the key to. May - not be an absolute path. May not - contain the path element '..'. - May not start with the string - '..'. - type: string - required: - - key - - path - type: object - type: array - name: - description: 'Name of the referent. More - info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' - type: string - optional: - description: Specify whether the Secret - or its key must be defined - type: boolean - type: object - serviceAccountToken: - description: information about the serviceAccountToken - data to project - properties: - audience: - description: Audience is the intended - audience of the token. A recipient of - a token must identify itself with an - identifier specified in the audience - of the token, and otherwise should reject - the token. The audience defaults to - the identifier of the apiserver. - type: string - expirationSeconds: - description: ExpirationSeconds is the - requested duration of validity of the - service account token. As the token - approaches expiration, the kubelet volume - plugin will proactively rotate the service - account token. The kubelet will start - trying to rotate the token if the token - is older than 80 percent of its time - to live or if the token is older than - 24 hours.Defaults to 1 hour and must - be at least 10 minutes. - format: int64 - type: integer - path: - description: Path is the path relative - to the mount point of the file to project - the token into. - type: string - required: - - path - type: object - type: object - type: array - required: - - sources - type: object - quobyte: - description: Quobyte represents a Quobyte mount on the - host that shares a pod's lifetime - properties: - group: - description: Group to map volume access to Default - is no group - type: string - readOnly: - description: ReadOnly here will force the Quobyte - volume to be mounted with read-only permissions. - Defaults to false. - type: boolean - registry: - description: Registry represents a single or multiple - Quobyte Registry services specified as a string - as host:port pair (multiple entries are separated - with commas) which acts as the central registry - for volumes - type: string - tenant: - description: Tenant owning the given Quobyte volume - in the Backend Used with dynamically provisioned - Quobyte volumes, value is set by the plugin - type: string - user: - description: User to map volume access to Defaults - to serivceaccount user - type: string - volume: - description: Volume is a string that references - an already created Quobyte volume by name. - type: string - required: - - registry - - volume - type: object - rbd: - description: 'RBD represents a Rados Block Device mount - on the host that shares a pod''s lifetime. More info: - https://examples.k8s.io/volumes/rbd/README.md' - properties: - fsType: - description: 'Filesystem type of the volume that - you want to mount. Tip: Ensure that the filesystem - type is supported by the host operating system. - Examples: "ext4", "xfs", "ntfs". Implicitly inferred - to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#rbd - TODO: how do we prevent errors in the filesystem - from compromising the machine' - type: string - image: - description: 'The rados image name. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - type: string - keyring: - description: 'Keyring is the path to key ring for - RBDUser. Default is /etc/ceph/keyring. More info: - https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - type: string - monitors: - description: 'A collection of Ceph monitors. More - info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - items: - type: string - type: array - pool: - description: 'The rados pool name. Default is rbd. - More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - type: string - readOnly: - description: 'ReadOnly here will force the ReadOnly - setting in VolumeMounts. Defaults to false. More - info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - type: boolean - secretRef: - description: 'SecretRef is name of the authentication - secret for RBDUser. If provided overrides keyring. - Default is nil. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - properties: - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' - type: string - type: object - user: - description: 'The rados user name. Default is admin. - More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - type: string - required: - - image - - monitors - type: object - scaleIO: - description: ScaleIO represents a ScaleIO persistent - volume attached and mounted on Kubernetes nodes. - properties: - fsType: - description: Filesystem type to mount. Must be a - filesystem type supported by the host operating - system. Ex. "ext4", "xfs", "ntfs". Default is - "xfs". - type: string - gateway: - description: The host address of the ScaleIO API - Gateway. - type: string - protectionDomain: - description: The name of the ScaleIO Protection - Domain for the configured storage. - type: string - readOnly: - description: Defaults to false (read/write). ReadOnly - here will force the ReadOnly setting in VolumeMounts. - type: boolean - secretRef: - description: SecretRef references to the secret - for ScaleIO user and other sensitive information. - If this is not provided, Login operation will - fail. - properties: - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' - type: string - type: object - sslEnabled: - description: Flag to enable/disable SSL communication - with Gateway, default false - type: boolean - storageMode: - description: Indicates whether the storage for a - volume should be ThickProvisioned or ThinProvisioned. - Default is ThinProvisioned. - type: string - storagePool: - description: The ScaleIO Storage Pool associated - with the protection domain. - type: string - system: - description: The name of the storage system as configured - in ScaleIO. - type: string - volumeName: - description: The name of a volume already created - in the ScaleIO system that is associated with - this volume source. - type: string - required: - - gateway - - secretRef - - system - type: object - secret: - description: 'Secret represents a secret that should - populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' - properties: - defaultMode: - description: 'Optional: mode bits to use on created - files by default. Must be a value between 0 and - 0777. Defaults to 0644. Directories within the - path are not affected by this setting. This might - be in conflict with other options that affect - the file mode, like fsGroup, and the result can - be other mode bits set.' - format: int32 - type: integer - items: - description: If unspecified, each key-value pair - in the Data field of the referenced Secret will - be projected into the volume as a file whose name - is the key and content is the value. If specified, - the listed keys will be projected into the specified - paths, and unlisted keys will not be present. - If a key is specified which is not present in - the Secret, the volume setup will error unless - it is marked optional. Paths must be relative - and may not contain the '..' path or start with - '..'. - items: - description: Maps a string key to a path within - a volume. - properties: - key: - description: The key to project. - type: string - mode: - description: 'Optional: mode bits to use on - this file, must be a value between 0 and - 0777. If not specified, the volume defaultMode - will be used. This might be in conflict - with other options that affect the file - mode, like fsGroup, and the result can be - other mode bits set.' - format: int32 - type: integer - path: - description: The relative path of the file - to map the key to. May not be an absolute - path. May not contain the path element '..'. - May not start with the string '..'. - type: string - required: - - key - - path - type: object - type: array - optional: - description: Specify whether the Secret or its keys - must be defined - type: boolean - secretName: - description: 'Name of the secret in the pod''s namespace - to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' - type: string - type: object - storageos: - description: StorageOS represents a StorageOS volume - attached and mounted on Kubernetes nodes. - properties: - fsType: - description: Filesystem type to mount. Must be a - filesystem type supported by the host operating - system. Ex. "ext4", "xfs", "ntfs". Implicitly - inferred to be "ext4" if unspecified. - type: string - readOnly: - description: Defaults to false (read/write). ReadOnly - here will force the ReadOnly setting in VolumeMounts. - type: boolean - secretRef: - description: SecretRef specifies the secret to use - for obtaining the StorageOS API credentials. If - not specified, default values will be attempted. - properties: - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' - type: string - type: object - volumeName: - description: VolumeName is the human-readable name - of the StorageOS volume. Volume names are only - unique within a namespace. - type: string - volumeNamespace: - description: VolumeNamespace specifies the scope - of the volume within StorageOS. If no namespace - is specified then the Pod's namespace will be - used. This allows the Kubernetes name scoping - to be mirrored within StorageOS for tighter integration. - Set VolumeName to any name to override the default - behaviour. Set to "default" if you are not using - namespaces within StorageOS. Namespaces that do - not pre-exist within StorageOS will be created. - type: string - type: object - vsphereVolume: - description: VsphereVolume represents a vSphere volume - attached and mounted on kubelets host machine - properties: - fsType: - description: Filesystem type to mount. Must be a - filesystem type supported by the host operating - system. Ex. "ext4", "xfs", "ntfs". Implicitly - inferred to be "ext4" if unspecified. - type: string - storagePolicyID: - description: Storage Policy Based Management (SPBM) - profile ID associated with the StoragePolicyName. - type: string - storagePolicyName: - description: Storage Policy Based Management (SPBM) - profile name. - type: string - volumePath: - description: Path that identifies vSphere volume - vmdk - type: string - required: - - volumePath - type: object - required: - - name - type: object - type: array - type: object - image: - description: ImageTask -- - properties: - affinity: - description: Affinity is a group of affinity scheduling rules. - properties: - nodeAffinity: - description: Describes node affinity scheduling rules - for the pod. - properties: - preferredDuringSchedulingIgnoredDuringExecution: - description: The scheduler will prefer to schedule - pods to nodes that satisfy the affinity expressions - specified by this field, but it may choose a node - that violates one or more of the expressions. The - node that is most preferred is the one with the - greatest sum of weights, i.e. for each node that - meets all of the scheduling requirements (resource - request, requiredDuringScheduling affinity expressions, - etc.), compute a sum by iterating through the elements - of this field and adding "weight" to the sum if - the node matches the corresponding matchExpressions; - the node(s) with the highest sum are the most preferred. - items: - description: An empty preferred scheduling term - matches all objects with implicit weight 0 (i.e. - it's a no-op). A null preferred scheduling term - matches no objects (i.e. is also a no-op). - properties: - preference: - description: A node selector term, associated - with the corresponding weight. - properties: - matchExpressions: - description: A list of node selector requirements - by node's labels. - items: - description: A node selector requirement - is a selector that contains values, - a key, and an operator that relates - the key and values. - properties: - key: - description: The label key that the - selector applies to. - type: string - operator: - description: Represents a key's relationship - to a set of values. Valid operators - are In, NotIn, Exists, DoesNotExist. - Gt, and Lt. - type: string - values: - description: An array of string values. - If the operator is In or NotIn, - the values array must be non-empty. - If the operator is Exists or DoesNotExist, - the values array must be empty. - If the operator is Gt or Lt, the - values array must have a single - element, which will be interpreted - as an integer. This array is replaced - during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchFields: - description: A list of node selector requirements - by node's fields. - items: - description: A node selector requirement - is a selector that contains values, - a key, and an operator that relates - the key and values. - properties: - key: - description: The label key that the - selector applies to. - type: string - operator: - description: Represents a key's relationship - to a set of values. Valid operators - are In, NotIn, Exists, DoesNotExist. - Gt, and Lt. - type: string - values: - description: An array of string values. - If the operator is In or NotIn, - the values array must be non-empty. - If the operator is Exists or DoesNotExist, - the values array must be empty. - If the operator is Gt or Lt, the - values array must have a single - element, which will be interpreted - as an integer. This array is replaced - during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - type: object - weight: - description: Weight associated with matching - the corresponding nodeSelectorTerm, in the - range 1-100. - format: int32 - type: integer - required: - - preference - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - description: If the affinity requirements specified - by this field are not met at scheduling time, the - pod will not be scheduled onto the node. If the - affinity requirements specified by this field cease - to be met at some point during pod execution (e.g. - due to an update), the system may or may not try - to eventually evict the pod from its node. - properties: - nodeSelectorTerms: - description: Required. A list of node selector - terms. The terms are ORed. - items: - description: A null or empty node selector term - matches no objects. The requirements of them - are ANDed. The TopologySelectorTerm type implements - a subset of the NodeSelectorTerm. - properties: - matchExpressions: - description: A list of node selector requirements - by node's labels. - items: - description: A node selector requirement - is a selector that contains values, - a key, and an operator that relates - the key and values. - properties: - key: - description: The label key that the - selector applies to. - type: string - operator: - description: Represents a key's relationship - to a set of values. Valid operators - are In, NotIn, Exists, DoesNotExist. - Gt, and Lt. - type: string - values: - description: An array of string values. - If the operator is In or NotIn, - the values array must be non-empty. - If the operator is Exists or DoesNotExist, - the values array must be empty. - If the operator is Gt or Lt, the - values array must have a single - element, which will be interpreted - as an integer. This array is replaced - during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchFields: - description: A list of node selector requirements - by node's fields. - items: - description: A node selector requirement - is a selector that contains values, - a key, and an operator that relates - the key and values. - properties: - key: - description: The label key that the - selector applies to. - type: string - operator: - description: Represents a key's relationship - to a set of values. Valid operators - are In, NotIn, Exists, DoesNotExist. - Gt, and Lt. - type: string - values: - description: An array of string values. - If the operator is In or NotIn, - the values array must be non-empty. - If the operator is Exists or DoesNotExist, - the values array must be empty. - If the operator is Gt or Lt, the - values array must have a single - element, which will be interpreted - as an integer. This array is replaced - during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - type: object - type: array - required: - - nodeSelectorTerms - type: object - type: object - podAffinity: - description: Describes pod affinity scheduling rules (e.g. - co-locate this pod in the same node, zone, etc. as some - other pod(s)). - properties: - preferredDuringSchedulingIgnoredDuringExecution: - description: The scheduler will prefer to schedule - pods to nodes that satisfy the affinity expressions - specified by this field, but it may choose a node - that violates one or more of the expressions. The - node that is most preferred is the one with the - greatest sum of weights, i.e. for each node that - meets all of the scheduling requirements (resource - request, requiredDuringScheduling affinity expressions, - etc.), compute a sum by iterating through the elements - of this field and adding "weight" to the sum if - the node has pods which matches the corresponding - podAffinityTerm; the node(s) with the highest sum - are the most preferred. - items: - description: The weights of all of the matched WeightedPodAffinityTerm - fields are added per-node to find the most preferred - node(s) - properties: - podAffinityTerm: - description: Required. A pod affinity term, - associated with the corresponding weight. - properties: - labelSelector: - description: A label query over a set of - resources, in this case pods. - properties: - matchExpressions: - description: matchExpressions is a list - of label selector requirements. The - requirements are ANDed. - items: - description: A label selector requirement - is a selector that contains values, - a key, and an operator that relates - the key and values. - properties: - key: - description: key is the label - key that the selector applies - to. - type: string - operator: - description: operator represents - a key's relationship to a set - of values. Valid operators are - In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array - of string values. If the operator - is In or NotIn, the values array - must be non-empty. If the operator - is Exists or DoesNotExist, the - values array must be empty. - This array is replaced during - a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of - {key,value} pairs. A single {key,value} - in the matchLabels map is equivalent - to an element of matchExpressions, - whose key field is "key", the operator - is "In", and the values array contains - only "value". The requirements are - ANDed. - type: object - type: object - namespaces: - description: namespaces specifies which - namespaces the labelSelector applies to - (matches against); null or empty list - means "this pod's namespace" - items: - type: string - type: array - topologyKey: - description: This pod should be co-located - (affinity) or not co-located (anti-affinity) - with the pods matching the labelSelector - in the specified namespaces, where co-located - is defined as running on a node whose - value of the label with key topologyKey - matches that of any node on which any - of the selected pods is running. Empty - topologyKey is not allowed. - type: string - required: - - topologyKey - type: object - weight: - description: weight associated with matching - the corresponding podAffinityTerm, in the - range 1-100. - format: int32 - type: integer - required: - - podAffinityTerm - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - description: If the affinity requirements specified - by this field are not met at scheduling time, the - pod will not be scheduled onto the node. If the - affinity requirements specified by this field cease - to be met at some point during pod execution (e.g. - due to a pod label update), the system may or may - not try to eventually evict the pod from its node. - When there are multiple elements, the lists of nodes - corresponding to each podAffinityTerm are intersected, - i.e. all terms must be satisfied. - items: - description: Defines a set of pods (namely those - matching the labelSelector relative to the given - namespace(s)) that this pod should be co-located - (affinity) or not co-located (anti-affinity) with, - where co-located is defined as running on a node - whose value of the label with key - matches that of any node on which a pod of the - set of pods is running - properties: - labelSelector: - description: A label query over a set of resources, - in this case pods. - properties: - matchExpressions: - description: matchExpressions is a list - of label selector requirements. The requirements - are ANDed. - items: - description: A label selector requirement - is a selector that contains values, - a key, and an operator that relates - the key and values. - properties: - key: - description: key is the label key - that the selector applies to. - type: string - operator: - description: operator represents a - key's relationship to a set of values. - Valid operators are In, NotIn, Exists - and DoesNotExist. - type: string - values: - description: values is an array of - string values. If the operator is - In or NotIn, the values array must - be non-empty. If the operator is - Exists or DoesNotExist, the values - array must be empty. This array - is replaced during a strategic merge - patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} - pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, - whose key field is "key", the operator - is "In", and the values array contains - only "value". The requirements are ANDed. - type: object - type: object - namespaces: - description: namespaces specifies which namespaces - the labelSelector applies to (matches against); - null or empty list means "this pod's namespace" - items: - type: string - type: array - topologyKey: - description: This pod should be co-located (affinity) - or not co-located (anti-affinity) with the - pods matching the labelSelector in the specified - namespaces, where co-located is defined as - running on a node whose value of the label - with key topologyKey matches that of any node - on which any of the selected pods is running. - Empty topologyKey is not allowed. - type: string - required: - - topologyKey - type: object - type: array - type: object - podAntiAffinity: - description: Describes pod anti-affinity scheduling rules - (e.g. avoid putting this pod in the same node, zone, - etc. as some other pod(s)). - properties: - preferredDuringSchedulingIgnoredDuringExecution: - description: The scheduler will prefer to schedule - pods to nodes that satisfy the anti-affinity expressions - specified by this field, but it may choose a node - that violates one or more of the expressions. The - node that is most preferred is the one with the - greatest sum of weights, i.e. for each node that - meets all of the scheduling requirements (resource - request, requiredDuringScheduling anti-affinity - expressions, etc.), compute a sum by iterating through - the elements of this field and adding "weight" to - the sum if the node has pods which matches the corresponding - podAffinityTerm; the node(s) with the highest sum - are the most preferred. - items: - description: The weights of all of the matched WeightedPodAffinityTerm - fields are added per-node to find the most preferred - node(s) - properties: - podAffinityTerm: - description: Required. A pod affinity term, - associated with the corresponding weight. - properties: - labelSelector: - description: A label query over a set of - resources, in this case pods. - properties: - matchExpressions: - description: matchExpressions is a list - of label selector requirements. The - requirements are ANDed. - items: - description: A label selector requirement - is a selector that contains values, - a key, and an operator that relates - the key and values. - properties: - key: - description: key is the label - key that the selector applies - to. - type: string - operator: - description: operator represents - a key's relationship to a set - of values. Valid operators are - In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array - of string values. If the operator - is In or NotIn, the values array - must be non-empty. If the operator - is Exists or DoesNotExist, the - values array must be empty. - This array is replaced during - a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of - {key,value} pairs. A single {key,value} - in the matchLabels map is equivalent - to an element of matchExpressions, - whose key field is "key", the operator - is "In", and the values array contains - only "value". The requirements are - ANDed. - type: object - type: object - namespaces: - description: namespaces specifies which - namespaces the labelSelector applies to - (matches against); null or empty list - means "this pod's namespace" - items: - type: string - type: array - topologyKey: - description: This pod should be co-located - (affinity) or not co-located (anti-affinity) - with the pods matching the labelSelector - in the specified namespaces, where co-located - is defined as running on a node whose - value of the label with key topologyKey - matches that of any node on which any - of the selected pods is running. Empty - topologyKey is not allowed. - type: string - required: - - topologyKey - type: object - weight: - description: weight associated with matching - the corresponding podAffinityTerm, in the - range 1-100. - format: int32 - type: integer - required: - - podAffinityTerm - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - description: If the anti-affinity requirements specified - by this field are not met at scheduling time, the - pod will not be scheduled onto the node. If the - anti-affinity requirements specified by this field - cease to be met at some point during pod execution - (e.g. due to a pod label update), the system may - or may not try to eventually evict the pod from - its node. When there are multiple elements, the - lists of nodes corresponding to each podAffinityTerm - are intersected, i.e. all terms must be satisfied. - items: - description: Defines a set of pods (namely those - matching the labelSelector relative to the given - namespace(s)) that this pod should be co-located - (affinity) or not co-located (anti-affinity) with, - where co-located is defined as running on a node - whose value of the label with key - matches that of any node on which a pod of the - set of pods is running - properties: - labelSelector: - description: A label query over a set of resources, - in this case pods. - properties: - matchExpressions: - description: matchExpressions is a list - of label selector requirements. The requirements - are ANDed. - items: - description: A label selector requirement - is a selector that contains values, - a key, and an operator that relates - the key and values. - properties: - key: - description: key is the label key - that the selector applies to. - type: string - operator: - description: operator represents a - key's relationship to a set of values. - Valid operators are In, NotIn, Exists - and DoesNotExist. - type: string - values: - description: values is an array of - string values. If the operator is - In or NotIn, the values array must - be non-empty. If the operator is - Exists or DoesNotExist, the values - array must be empty. This array - is replaced during a strategic merge - patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} - pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, - whose key field is "key", the operator - is "In", and the values array contains - only "value". The requirements are ANDed. - type: object - type: object - namespaces: - description: namespaces specifies which namespaces - the labelSelector applies to (matches against); - null or empty list means "this pod's namespace" - items: - type: string - type: array - topologyKey: - description: This pod should be co-located (affinity) - or not co-located (anti-affinity) with the - pods matching the labelSelector in the specified - namespaces, where co-located is defined as - running on a node whose value of the label - with key topologyKey matches that of any node - on which any of the selected pods is running. - Empty topologyKey is not allowed. - type: string - required: - - topologyKey - type: object - type: array - type: object - type: object - args: - items: - type: string - type: array - builtImage: - type: string - command: - items: - type: string - type: array - env: - items: - description: EnvVar represents an environment variable present - in a Container. - properties: - name: - description: Name of the environment variable. Must - be a C_IDENTIFIER. - type: string - value: - description: 'Variable references $(VAR_NAME) are expanded - using the previous defined environment variables in - the container and any service environment variables. - If a variable cannot be resolved, the reference in - the input string will be unchanged. The $(VAR_NAME) - syntax can be escaped with a double $$, ie: $$(VAR_NAME). - Escaped references will never be expanded, regardless - of whether the variable exists or not. Defaults to - "".' - type: string - valueFrom: - description: Source for the environment variable's value. - Cannot be used if value is not empty. - properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. - properties: - key: - description: The key to select. - type: string - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' - type: string - optional: - description: Specify whether the ConfigMap or - its key must be defined - type: boolean - required: - - key - type: object - fieldRef: - description: 'Selects a field of the pod: supports - metadata.name, metadata.namespace, metadata.labels, - metadata.annotations, spec.nodeName, spec.serviceAccountName, - status.hostIP, status.podIP, status.podIPs.' - properties: - apiVersion: - description: Version of the schema the FieldPath - is written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in - the specified API version. - type: string - required: - - fieldPath - type: object - resourceFieldRef: - description: 'Selects a resource of the container: - only resources limits and requests (limits.cpu, - limits.memory, limits.ephemeral-storage, requests.cpu, - requests.memory and requests.ephemeral-storage) - are currently supported.' - properties: - containerName: - description: 'Container name: required for volumes, - optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of - the exposed resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - required: - - resource - type: object - secretKeyRef: - description: Selects a key of a secret in the pod's - namespace - properties: - key: - description: The key of the secret to select - from. Must be a valid secret key. - type: string - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' - type: string - optional: - description: Specify whether the Secret or its - key must be defined - type: boolean - required: - - key - type: object - type: object - required: - - name - type: object - type: array - image: - type: string - name: - type: string - securityContext: - description: SecurityContext holds security configuration - that will be applied to a container. Some fields are present - in both SecurityContext and PodSecurityContext. When both - are set, the values in SecurityContext take precedence. - properties: - allowPrivilegeEscalation: - description: 'AllowPrivilegeEscalation controls whether - a process can gain more privileges than its parent process. - This bool directly controls if the no_new_privs flag - will be set on the container process. AllowPrivilegeEscalation - is true always when the container is: 1) run as Privileged - 2) has CAP_SYS_ADMIN' - type: boolean - capabilities: - description: The capabilities to add/drop when running - containers. Defaults to the default set of capabilities - granted by the container runtime. - properties: - add: - description: Added capabilities - items: - description: Capability represent POSIX capabilities - type - type: string - type: array - drop: - description: Removed capabilities - items: - description: Capability represent POSIX capabilities - type - type: string - type: array - type: object - privileged: - description: Run container in privileged mode. Processes - in privileged containers are essentially equivalent - to root on the host. Defaults to false. - type: boolean - procMount: - description: procMount denotes the type of proc mount - to use for the containers. The default is DefaultProcMount - which uses the container runtime defaults for readonly - paths and masked paths. This requires the ProcMountType - feature flag to be enabled. - type: string - readOnlyRootFilesystem: - description: Whether this container has a read-only root - filesystem. Default is false. - type: boolean - runAsGroup: - description: The GID to run the entrypoint of the container - process. Uses runtime default if unset. May also be - set in PodSecurityContext. If set in both SecurityContext - and PodSecurityContext, the value specified in SecurityContext - takes precedence. - format: int64 - type: integer - runAsNonRoot: - description: Indicates that the container must run as - a non-root user. If true, the Kubelet will validate - the image at runtime to ensure that it does not run - as UID 0 (root) and fail to start the container if it - does. If unset or false, no such validation will be - performed. May also be set in PodSecurityContext. If - set in both SecurityContext and PodSecurityContext, - the value specified in SecurityContext takes precedence. - type: boolean - runAsUser: - description: The UID to run the entrypoint of the container - process. Defaults to user specified in image metadata - if unspecified. May also be set in PodSecurityContext. If - set in both SecurityContext and PodSecurityContext, - the value specified in SecurityContext takes precedence. - format: int64 - type: integer - seLinuxOptions: - description: The SELinux context to be applied to the - container. If unspecified, the container runtime will - allocate a random SELinux context for each container. May - also be set in PodSecurityContext. If set in both SecurityContext - and PodSecurityContext, the value specified in SecurityContext - takes precedence. - properties: - level: - description: Level is SELinux level label that applies - to the container. - type: string - role: - description: Role is a SELinux role label that applies - to the container. - type: string - type: - description: Type is a SELinux type label that applies - to the container. - type: string - user: - description: User is a SELinux user label that applies - to the container. - type: string - type: object - windowsOptions: - description: The Windows specific settings applied to - all containers. If unspecified, the options from the - PodSecurityContext will be used. If set in both SecurityContext - and PodSecurityContext, the value specified in SecurityContext - takes precedence. - properties: - gmsaCredentialSpec: - description: GMSACredentialSpec is where the GMSA - admission webhook (https://github.com/kubernetes-sigs/windows-gmsa) - inlines the contents of the GMSA credential spec - named by the GMSACredentialSpecName field. - type: string - gmsaCredentialSpecName: - description: GMSACredentialSpecName is the name of - the GMSA credential spec to use. - type: string - runAsUserName: - description: The UserName in Windows to run the entrypoint - of the container process. Defaults to the user specified - in image metadata if unspecified. May also be set - in PodSecurityContext. If set in both SecurityContext - and PodSecurityContext, the value specified in SecurityContext - takes precedence. - type: string - type: object - type: object - volumeMounts: - items: - description: VolumeMount describes a mounting of a Volume - within a container. - properties: - mountPath: - description: Path within the container at which the - volume should be mounted. Must not contain ':'. - type: string - mountPropagation: - description: mountPropagation determines how mounts - are propagated from the host to container and the - other way around. When not set, MountPropagationNone - is used. This field is beta in 1.10. - type: string - name: - description: This must match the Name of a Volume. - type: string - readOnly: - description: Mounted read-only if true, read-write otherwise - (false or unspecified). Defaults to false. - type: boolean - subPath: - description: Path within the volume from which the container's - volume should be mounted. Defaults to "" (volume's - root). - type: string - subPathExpr: - description: Expanded path within the volume from which - the container's volume should be mounted. Behaves - similarly to SubPath but environment variable references - $(VAR_NAME) are expanded using the container's environment. - Defaults to "" (volume's root). SubPathExpr and SubPath - are mutually exclusive. - type: string - required: - - mountPath - - name - type: object - type: array - volumes: - items: - description: Volume represents a named volume in a pod that - may be accessed by any container in the pod. - properties: - awsElasticBlockStore: - description: 'AWSElasticBlockStore represents an AWS - Disk resource that is attached to a kubelet''s host - machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' - properties: - fsType: - description: 'Filesystem type of the volume that - you want to mount. Tip: Ensure that the filesystem - type is supported by the host operating system. - Examples: "ext4", "xfs", "ntfs". Implicitly inferred - to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore - TODO: how do we prevent errors in the filesystem - from compromising the machine' - type: string - partition: - description: 'The partition in the volume that you - want to mount. If omitted, the default is to mount - by volume name. Examples: For volume /dev/sda1, - you specify the partition as "1". Similarly, the - volume partition for /dev/sda is "0" (or you can - leave the property empty).' - format: int32 - type: integer - readOnly: - description: 'Specify "true" to force and set the - ReadOnly property in VolumeMounts to "true". If - omitted, the default is "false". More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' - type: boolean - volumeID: - description: 'Unique ID of the persistent disk resource - in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' - type: string - required: - - volumeID - type: object - azureDisk: - description: AzureDisk represents an Azure Data Disk - mount on the host and bind mount to the pod. - properties: - cachingMode: - description: 'Host Caching mode: None, Read Only, - Read Write.' - type: string - diskName: - description: The Name of the data disk in the blob - storage - type: string - diskURI: - description: The URI the data disk in the blob storage - type: string - fsType: - description: Filesystem type to mount. Must be a - filesystem type supported by the host operating - system. Ex. "ext4", "xfs", "ntfs". Implicitly - inferred to be "ext4" if unspecified. - type: string - kind: - description: 'Expected values Shared: multiple blob - disks per storage account Dedicated: single blob - disk per storage account Managed: azure managed - data disk (only in managed availability set). - defaults to shared' - type: string - readOnly: - description: Defaults to false (read/write). ReadOnly - here will force the ReadOnly setting in VolumeMounts. - type: boolean - required: - - diskName - - diskURI - type: object - azureFile: - description: AzureFile represents an Azure File Service - mount on the host and bind mount to the pod. - properties: - readOnly: - description: Defaults to false (read/write). ReadOnly - here will force the ReadOnly setting in VolumeMounts. - type: boolean - secretName: - description: the name of secret that contains Azure - Storage Account Name and Key - type: string - shareName: - description: Share Name - type: string - required: - - secretName - - shareName - type: object - cephfs: - description: CephFS represents a Ceph FS mount on the - host that shares a pod's lifetime - properties: - monitors: - description: 'Required: Monitors is a collection - of Ceph monitors More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' - items: - type: string - type: array - path: - description: 'Optional: Used as the mounted root, - rather than the full Ceph tree, default is /' - type: string - readOnly: - description: 'Optional: Defaults to false (read/write). - ReadOnly here will force the ReadOnly setting - in VolumeMounts. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' - type: boolean - secretFile: - description: 'Optional: SecretFile is the path to - key ring for User, default is /etc/ceph/user.secret - More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' - type: string - secretRef: - description: 'Optional: SecretRef is reference to - the authentication secret for User, default is - empty. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' - properties: - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' - type: string - type: object - user: - description: 'Optional: User is the rados user name, - default is admin More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' - type: string - required: - - monitors - type: object - cinder: - description: 'Cinder represents a cinder volume attached - and mounted on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' - properties: - fsType: - description: 'Filesystem type to mount. Must be - a filesystem type supported by the host operating - system. Examples: "ext4", "xfs", "ntfs". Implicitly - inferred to be "ext4" if unspecified. More info: - https://examples.k8s.io/mysql-cinder-pd/README.md' - type: string - readOnly: - description: 'Optional: Defaults to false (read/write). - ReadOnly here will force the ReadOnly setting - in VolumeMounts. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' - type: boolean - secretRef: - description: 'Optional: points to a secret object - containing parameters used to connect to OpenStack.' - properties: - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' - type: string - type: object - volumeID: - description: 'volume id used to identify the volume - in cinder. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' - type: string - required: - - volumeID - type: object - configMap: - description: ConfigMap represents a configMap that should - populate this volume - properties: - defaultMode: - description: 'Optional: mode bits to use on created - files by default. Must be a value between 0 and - 0777. Defaults to 0644. Directories within the - path are not affected by this setting. This might - be in conflict with other options that affect - the file mode, like fsGroup, and the result can - be other mode bits set.' - format: int32 - type: integer - items: - description: If unspecified, each key-value pair - in the Data field of the referenced ConfigMap - will be projected into the volume as a file whose - name is the key and content is the value. If specified, - the listed keys will be projected into the specified - paths, and unlisted keys will not be present. - If a key is specified which is not present in - the ConfigMap, the volume setup will error unless - it is marked optional. Paths must be relative - and may not contain the '..' path or start with - '..'. - items: - description: Maps a string key to a path within - a volume. - properties: - key: - description: The key to project. - type: string - mode: - description: 'Optional: mode bits to use on - this file, must be a value between 0 and - 0777. If not specified, the volume defaultMode - will be used. This might be in conflict - with other options that affect the file - mode, like fsGroup, and the result can be - other mode bits set.' - format: int32 - type: integer - path: - description: The relative path of the file - to map the key to. May not be an absolute - path. May not contain the path element '..'. - May not start with the string '..'. - type: string - required: - - key - - path - type: object - type: array - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the ConfigMap or its - keys must be defined - type: boolean - type: object - csi: - description: CSI (Container Storage Interface) represents - storage that is handled by an external CSI driver - (Alpha feature). - properties: - driver: - description: Driver is the name of the CSI driver - that handles this volume. Consult with your admin - for the correct name as registered in the cluster. - type: string - fsType: - description: Filesystem type to mount. Ex. "ext4", - "xfs", "ntfs". If not provided, the empty value - is passed to the associated CSI driver which will - determine the default filesystem to apply. - type: string - nodePublishSecretRef: - description: NodePublishSecretRef is a reference - to the secret object containing sensitive information - to pass to the CSI driver to complete the CSI - NodePublishVolume and NodeUnpublishVolume calls. - This field is optional, and may be empty if no - secret is required. If the secret object contains - more than one secret, all secret references are - passed. - properties: - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' - type: string - type: object - readOnly: - description: Specifies a read-only configuration - for the volume. Defaults to false (read/write). - type: boolean - volumeAttributes: - additionalProperties: - type: string - description: VolumeAttributes stores driver-specific - properties that are passed to the CSI driver. - Consult your driver's documentation for supported - values. - type: object - required: - - driver - type: object - downwardAPI: - description: DownwardAPI represents downward API about - the pod that should populate this volume - properties: - defaultMode: - description: 'Optional: mode bits to use on created - files by default. Must be a value between 0 and - 0777. Defaults to 0644. Directories within the - path are not affected by this setting. This might - be in conflict with other options that affect - the file mode, like fsGroup, and the result can - be other mode bits set.' - format: int32 - type: integer - items: - description: Items is a list of downward API volume - file - items: - description: DownwardAPIVolumeFile represents - information to create the file containing the - pod field - properties: - fieldRef: - description: 'Required: Selects a field of - the pod: only annotations, labels, name - and namespace are supported.' - properties: - apiVersion: - description: Version of the schema the - FieldPath is written in terms of, defaults - to "v1". - type: string - fieldPath: - description: Path of the field to select - in the specified API version. - type: string - required: - - fieldPath - type: object - mode: - description: 'Optional: mode bits to use on - this file, must be a value between 0 and - 0777. If not specified, the volume defaultMode - will be used. This might be in conflict - with other options that affect the file - mode, like fsGroup, and the result can be - other mode bits set.' - format: int32 - type: integer - path: - description: 'Required: Path is the relative - path name of the file to be created. Must - not be absolute or contain the ''..'' path. - Must be utf-8 encoded. The first item of - the relative path must not start with ''..''' - type: string - resourceFieldRef: - description: 'Selects a resource of the container: - only resources limits and requests (limits.cpu, - limits.memory, requests.cpu and requests.memory) - are currently supported.' - properties: - containerName: - description: 'Container name: required - for volumes, optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format - of the exposed resources, defaults to - "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - required: - - resource - type: object - required: - - path - type: object - type: array - type: object - emptyDir: - description: 'EmptyDir represents a temporary directory - that shares a pod''s lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' - properties: - medium: - description: 'What type of storage medium should - back this directory. The default is "" which means - to use the node''s default medium. Must be an - empty string (default) or Memory. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' - type: string - sizeLimit: - anyOf: - - type: integer - - type: string - description: 'Total amount of local storage required - for this EmptyDir volume. The size limit is also - applicable for memory medium. The maximum usage - on memory medium EmptyDir would be the minimum - value between the SizeLimit specified here and - the sum of memory limits of all containers in - a pod. The default is nil which means that the - limit is undefined. More info: http://kubernetes.io/docs/user-guide/volumes#emptydir' - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - fc: - description: FC represents a Fibre Channel resource - that is attached to a kubelet's host machine and then - exposed to the pod. - properties: - fsType: - description: 'Filesystem type to mount. Must be - a filesystem type supported by the host operating - system. Ex. "ext4", "xfs", "ntfs". Implicitly - inferred to be "ext4" if unspecified. TODO: how - do we prevent errors in the filesystem from compromising - the machine' - type: string - lun: - description: 'Optional: FC target lun number' - format: int32 - type: integer - readOnly: - description: 'Optional: Defaults to false (read/write). - ReadOnly here will force the ReadOnly setting - in VolumeMounts.' - type: boolean - targetWWNs: - description: 'Optional: FC target worldwide names - (WWNs)' - items: - type: string - type: array - wwids: - description: 'Optional: FC volume world wide identifiers - (wwids) Either wwids or combination of targetWWNs - and lun must be set, but not both simultaneously.' - items: - type: string - type: array - type: object - flexVolume: - description: FlexVolume represents a generic volume - resource that is provisioned/attached using an exec - based plugin. - properties: - driver: - description: Driver is the name of the driver to - use for this volume. - type: string - fsType: - description: Filesystem type to mount. Must be a - filesystem type supported by the host operating - system. Ex. "ext4", "xfs", "ntfs". The default - filesystem depends on FlexVolume script. - type: string - options: - additionalProperties: - type: string - description: 'Optional: Extra command options if - any.' - type: object - readOnly: - description: 'Optional: Defaults to false (read/write). - ReadOnly here will force the ReadOnly setting - in VolumeMounts.' - type: boolean - secretRef: - description: 'Optional: SecretRef is reference to - the secret object containing sensitive information - to pass to the plugin scripts. This may be empty - if no secret object is specified. If the secret - object contains more than one secret, all secrets - are passed to the plugin scripts.' - properties: - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' - type: string - type: object - required: - - driver - type: object - flocker: - description: Flocker represents a Flocker volume attached - to a kubelet's host machine. This depends on the Flocker - control service being running - properties: - datasetName: - description: Name of the dataset stored as metadata - -> name on the dataset for Flocker should be considered - as deprecated - type: string - datasetUUID: - description: UUID of the dataset. This is unique - identifier of a Flocker dataset - type: string - type: object - gcePersistentDisk: - description: 'GCEPersistentDisk represents a GCE Disk - resource that is attached to a kubelet''s host machine - and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' - properties: - fsType: - description: 'Filesystem type of the volume that - you want to mount. Tip: Ensure that the filesystem - type is supported by the host operating system. - Examples: "ext4", "xfs", "ntfs". Implicitly inferred - to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk - TODO: how do we prevent errors in the filesystem - from compromising the machine' - type: string - partition: - description: 'The partition in the volume that you - want to mount. If omitted, the default is to mount - by volume name. Examples: For volume /dev/sda1, - you specify the partition as "1". Similarly, the - volume partition for /dev/sda is "0" (or you can - leave the property empty). More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' - format: int32 - type: integer - pdName: - description: 'Unique name of the PD resource in - GCE. Used to identify the disk in GCE. More info: - https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' - type: string - readOnly: - description: 'ReadOnly here will force the ReadOnly - setting in VolumeMounts. Defaults to false. More - info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' - type: boolean - required: - - pdName - type: object - gitRepo: - description: 'GitRepo represents a git repository at - a particular revision. DEPRECATED: GitRepo is deprecated. - To provision a container with a git repo, mount an - EmptyDir into an InitContainer that clones the repo - using git, then mount the EmptyDir into the Pod''s - container.' - properties: - directory: - description: Target directory name. Must not contain - or start with '..'. If '.' is supplied, the volume - directory will be the git repository. Otherwise, - if specified, the volume will contain the git - repository in the subdirectory with the given - name. - type: string - repository: - description: Repository URL - type: string - revision: - description: Commit hash for the specified revision. - type: string - required: - - repository - type: object - glusterfs: - description: 'Glusterfs represents a Glusterfs mount - on the host that shares a pod''s lifetime. More info: - https://examples.k8s.io/volumes/glusterfs/README.md' - properties: - endpoints: - description: 'EndpointsName is the endpoint name - that details Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' - type: string - path: - description: 'Path is the Glusterfs volume path. - More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' - type: string - readOnly: - description: 'ReadOnly here will force the Glusterfs - volume to be mounted with read-only permissions. - Defaults to false. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' - type: boolean - required: - - endpoints - - path - type: object - hostPath: - description: 'HostPath represents a pre-existing file - or directory on the host machine that is directly - exposed to the container. This is generally used for - system agents or other privileged things that are - allowed to see the host machine. Most containers will - NOT need this. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath - --- TODO(jonesdl) We need to restrict who can use - host directory mounts and who can/can not mount host - directories as read/write.' - properties: - path: - description: 'Path of the directory on the host. - If the path is a symlink, it will follow the link - to the real path. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath' - type: string - type: - description: 'Type for HostPath Volume Defaults - to "" More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath' - type: string - required: - - path - type: object - iscsi: - description: 'ISCSI represents an ISCSI Disk resource - that is attached to a kubelet''s host machine and - then exposed to the pod. More info: https://examples.k8s.io/volumes/iscsi/README.md' - properties: - chapAuthDiscovery: - description: whether support iSCSI Discovery CHAP - authentication - type: boolean - chapAuthSession: - description: whether support iSCSI Session CHAP - authentication - type: boolean - fsType: - description: 'Filesystem type of the volume that - you want to mount. Tip: Ensure that the filesystem - type is supported by the host operating system. - Examples: "ext4", "xfs", "ntfs". Implicitly inferred - to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi - TODO: how do we prevent errors in the filesystem - from compromising the machine' - type: string - initiatorName: - description: Custom iSCSI Initiator Name. If initiatorName - is specified with iscsiInterface simultaneously, - new iSCSI interface : - will be created for the connection. - type: string - iqn: - description: Target iSCSI Qualified Name. - type: string - iscsiInterface: - description: iSCSI Interface Name that uses an iSCSI - transport. Defaults to 'default' (tcp). - type: string - lun: - description: iSCSI Target Lun number. - format: int32 - type: integer - portals: - description: iSCSI Target Portal List. The portal - is either an IP or ip_addr:port if the port is - other than default (typically TCP ports 860 and - 3260). - items: - type: string - type: array - readOnly: - description: ReadOnly here will force the ReadOnly - setting in VolumeMounts. Defaults to false. - type: boolean - secretRef: - description: CHAP Secret for iSCSI target and initiator - authentication - properties: - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' - type: string - type: object - targetPortal: - description: iSCSI Target Portal. The Portal is - either an IP or ip_addr:port if the port is other - than default (typically TCP ports 860 and 3260). - type: string - required: - - iqn - - lun - - targetPortal - type: object - name: - description: 'Volume''s name. Must be a DNS_LABEL and - unique within the pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - nfs: - description: 'NFS represents an NFS mount on the host - that shares a pod''s lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' - properties: - path: - description: 'Path that is exported by the NFS server. - More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' - type: string - readOnly: - description: 'ReadOnly here will force the NFS export - to be mounted with read-only permissions. Defaults - to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' - type: boolean - server: - description: 'Server is the hostname or IP address - of the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' - type: string - required: - - path - - server - type: object - persistentVolumeClaim: - description: 'PersistentVolumeClaimVolumeSource represents - a reference to a PersistentVolumeClaim in the same - namespace. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' - properties: - claimName: - description: 'ClaimName is the name of a PersistentVolumeClaim - in the same namespace as the pod using this volume. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' - type: string - readOnly: - description: Will force the ReadOnly setting in - VolumeMounts. Default false. - type: boolean - required: - - claimName - type: object - photonPersistentDisk: - description: PhotonPersistentDisk represents a PhotonController - persistent disk attached and mounted on kubelets host - machine - properties: - fsType: - description: Filesystem type to mount. Must be a - filesystem type supported by the host operating - system. Ex. "ext4", "xfs", "ntfs". Implicitly - inferred to be "ext4" if unspecified. - type: string - pdID: - description: ID that identifies Photon Controller - persistent disk - type: string - required: - - pdID - type: object - portworxVolume: - description: PortworxVolume represents a portworx volume - attached and mounted on kubelets host machine - properties: - fsType: - description: FSType represents the filesystem type - to mount Must be a filesystem type supported by - the host operating system. Ex. "ext4", "xfs". - Implicitly inferred to be "ext4" if unspecified. - type: string - readOnly: - description: Defaults to false (read/write). ReadOnly - here will force the ReadOnly setting in VolumeMounts. - type: boolean - volumeID: - description: VolumeID uniquely identifies a Portworx - volume - type: string - required: - - volumeID - type: object - projected: - description: Items for all in one resources secrets, - configmaps, and downward API - properties: - defaultMode: - description: Mode bits to use on created files by - default. Must be a value between 0 and 0777. Directories - within the path are not affected by this setting. - This might be in conflict with other options that - affect the file mode, like fsGroup, and the result - can be other mode bits set. - format: int32 - type: integer - sources: - description: list of volume projections - items: - description: Projection that may be projected - along with other supported volume types - properties: - configMap: - description: information about the configMap - data to project - properties: - items: - description: If unspecified, each key-value - pair in the Data field of the referenced - ConfigMap will be projected into the - volume as a file whose name is the key - and content is the value. If specified, - the listed keys will be projected into - the specified paths, and unlisted keys - will not be present. If a key is specified - which is not present in the ConfigMap, - the volume setup will error unless it - is marked optional. Paths must be relative - and may not contain the '..' path or - start with '..'. - items: - description: Maps a string key to a - path within a volume. - properties: - key: - description: The key to project. - type: string - mode: - description: 'Optional: mode bits - to use on this file, must be a - value between 0 and 0777. If not - specified, the volume defaultMode - will be used. This might be in - conflict with other options that - affect the file mode, like fsGroup, - and the result can be other mode - bits set.' - format: int32 - type: integer - path: - description: The relative path of - the file to map the key to. May - not be an absolute path. May not - contain the path element '..'. - May not start with the string - '..'. - type: string - required: - - key - - path - type: object - type: array - name: - description: 'Name of the referent. More - info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' - type: string - optional: - description: Specify whether the ConfigMap - or its keys must be defined - type: boolean - type: object - downwardAPI: - description: information about the downwardAPI - data to project - properties: - items: - description: Items is a list of DownwardAPIVolume - file - items: - description: DownwardAPIVolumeFile represents - information to create the file containing - the pod field - properties: - fieldRef: - description: 'Required: Selects - a field of the pod: only annotations, - labels, name and namespace are - supported.' - properties: - apiVersion: - description: Version of the - schema the FieldPath is written - in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field - to select in the specified - API version. - type: string - required: - - fieldPath - type: object - mode: - description: 'Optional: mode bits - to use on this file, must be a - value between 0 and 0777. If not - specified, the volume defaultMode - will be used. This might be in - conflict with other options that - affect the file mode, like fsGroup, - and the result can be other mode - bits set.' - format: int32 - type: integer - path: - description: 'Required: Path is the - relative path name of the file - to be created. Must not be absolute - or contain the ''..'' path. Must - be utf-8 encoded. The first item - of the relative path must not - start with ''..''' - type: string - resourceFieldRef: - description: 'Selects a resource - of the container: only resources - limits and requests (limits.cpu, - limits.memory, requests.cpu and - requests.memory) are currently - supported.' - properties: - containerName: - description: 'Container name: - required for volumes, optional - for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output - format of the exposed resources, - defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource - to select' - type: string - required: - - resource - type: object - required: - - path - type: object - type: array - type: object - secret: - description: information about the secret - data to project - properties: - items: - description: If unspecified, each key-value - pair in the Data field of the referenced - Secret will be projected into the volume - as a file whose name is the key and - content is the value. If specified, - the listed keys will be projected into - the specified paths, and unlisted keys - will not be present. If a key is specified - which is not present in the Secret, - the volume setup will error unless it - is marked optional. Paths must be relative - and may not contain the '..' path or - start with '..'. - items: - description: Maps a string key to a - path within a volume. - properties: - key: - description: The key to project. - type: string - mode: - description: 'Optional: mode bits - to use on this file, must be a - value between 0 and 0777. If not - specified, the volume defaultMode - will be used. This might be in - conflict with other options that - affect the file mode, like fsGroup, - and the result can be other mode - bits set.' - format: int32 - type: integer - path: - description: The relative path of - the file to map the key to. May - not be an absolute path. May not - contain the path element '..'. - May not start with the string - '..'. - type: string - required: - - key - - path - type: object - type: array - name: - description: 'Name of the referent. More - info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' - type: string - optional: - description: Specify whether the Secret - or its key must be defined - type: boolean - type: object - serviceAccountToken: - description: information about the serviceAccountToken - data to project - properties: - audience: - description: Audience is the intended - audience of the token. A recipient of - a token must identify itself with an - identifier specified in the audience - of the token, and otherwise should reject - the token. The audience defaults to - the identifier of the apiserver. - type: string - expirationSeconds: - description: ExpirationSeconds is the - requested duration of validity of the - service account token. As the token - approaches expiration, the kubelet volume - plugin will proactively rotate the service - account token. The kubelet will start - trying to rotate the token if the token - is older than 80 percent of its time - to live or if the token is older than - 24 hours.Defaults to 1 hour and must - be at least 10 minutes. - format: int64 - type: integer - path: - description: Path is the path relative - to the mount point of the file to project - the token into. - type: string - required: - - path - type: object - type: object - type: array - required: - - sources - type: object - quobyte: - description: Quobyte represents a Quobyte mount on the - host that shares a pod's lifetime - properties: - group: - description: Group to map volume access to Default - is no group - type: string - readOnly: - description: ReadOnly here will force the Quobyte - volume to be mounted with read-only permissions. - Defaults to false. - type: boolean - registry: - description: Registry represents a single or multiple - Quobyte Registry services specified as a string - as host:port pair (multiple entries are separated - with commas) which acts as the central registry - for volumes - type: string - tenant: - description: Tenant owning the given Quobyte volume - in the Backend Used with dynamically provisioned - Quobyte volumes, value is set by the plugin - type: string - user: - description: User to map volume access to Defaults - to serivceaccount user - type: string - volume: - description: Volume is a string that references - an already created Quobyte volume by name. - type: string - required: - - registry - - volume - type: object - rbd: - description: 'RBD represents a Rados Block Device mount - on the host that shares a pod''s lifetime. More info: - https://examples.k8s.io/volumes/rbd/README.md' - properties: - fsType: - description: 'Filesystem type of the volume that - you want to mount. Tip: Ensure that the filesystem - type is supported by the host operating system. - Examples: "ext4", "xfs", "ntfs". Implicitly inferred - to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#rbd - TODO: how do we prevent errors in the filesystem - from compromising the machine' - type: string - image: - description: 'The rados image name. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - type: string - keyring: - description: 'Keyring is the path to key ring for - RBDUser. Default is /etc/ceph/keyring. More info: - https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - type: string - monitors: - description: 'A collection of Ceph monitors. More - info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - items: - type: string - type: array - pool: - description: 'The rados pool name. Default is rbd. - More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - type: string - readOnly: - description: 'ReadOnly here will force the ReadOnly - setting in VolumeMounts. Defaults to false. More - info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - type: boolean - secretRef: - description: 'SecretRef is name of the authentication - secret for RBDUser. If provided overrides keyring. - Default is nil. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - properties: - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' - type: string - type: object - user: - description: 'The rados user name. Default is admin. - More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - type: string - required: - - image - - monitors - type: object - scaleIO: - description: ScaleIO represents a ScaleIO persistent - volume attached and mounted on Kubernetes nodes. - properties: - fsType: - description: Filesystem type to mount. Must be a - filesystem type supported by the host operating - system. Ex. "ext4", "xfs", "ntfs". Default is - "xfs". - type: string - gateway: - description: The host address of the ScaleIO API - Gateway. - type: string - protectionDomain: - description: The name of the ScaleIO Protection - Domain for the configured storage. - type: string - readOnly: - description: Defaults to false (read/write). ReadOnly - here will force the ReadOnly setting in VolumeMounts. - type: boolean - secretRef: - description: SecretRef references to the secret - for ScaleIO user and other sensitive information. - If this is not provided, Login operation will - fail. - properties: - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' - type: string - type: object - sslEnabled: - description: Flag to enable/disable SSL communication - with Gateway, default false - type: boolean - storageMode: - description: Indicates whether the storage for a - volume should be ThickProvisioned or ThinProvisioned. - Default is ThinProvisioned. - type: string - storagePool: - description: The ScaleIO Storage Pool associated - with the protection domain. - type: string - system: - description: The name of the storage system as configured - in ScaleIO. - type: string - volumeName: - description: The name of a volume already created - in the ScaleIO system that is associated with - this volume source. - type: string - required: - - gateway - - secretRef - - system - type: object - secret: - description: 'Secret represents a secret that should - populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' - properties: - defaultMode: - description: 'Optional: mode bits to use on created - files by default. Must be a value between 0 and - 0777. Defaults to 0644. Directories within the - path are not affected by this setting. This might - be in conflict with other options that affect - the file mode, like fsGroup, and the result can - be other mode bits set.' - format: int32 - type: integer - items: - description: If unspecified, each key-value pair - in the Data field of the referenced Secret will - be projected into the volume as a file whose name - is the key and content is the value. If specified, - the listed keys will be projected into the specified - paths, and unlisted keys will not be present. - If a key is specified which is not present in - the Secret, the volume setup will error unless - it is marked optional. Paths must be relative - and may not contain the '..' path or start with - '..'. - items: - description: Maps a string key to a path within - a volume. - properties: - key: - description: The key to project. - type: string - mode: - description: 'Optional: mode bits to use on - this file, must be a value between 0 and - 0777. If not specified, the volume defaultMode - will be used. This might be in conflict - with other options that affect the file - mode, like fsGroup, and the result can be - other mode bits set.' - format: int32 - type: integer - path: - description: The relative path of the file - to map the key to. May not be an absolute - path. May not contain the path element '..'. - May not start with the string '..'. - type: string - required: - - key - - path - type: object - type: array - optional: - description: Specify whether the Secret or its keys - must be defined - type: boolean - secretName: - description: 'Name of the secret in the pod''s namespace - to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' - type: string - type: object - storageos: - description: StorageOS represents a StorageOS volume - attached and mounted on Kubernetes nodes. - properties: - fsType: - description: Filesystem type to mount. Must be a - filesystem type supported by the host operating - system. Ex. "ext4", "xfs", "ntfs". Implicitly - inferred to be "ext4" if unspecified. - type: string - readOnly: - description: Defaults to false (read/write). ReadOnly - here will force the ReadOnly setting in VolumeMounts. - type: boolean - secretRef: - description: SecretRef specifies the secret to use - for obtaining the StorageOS API credentials. If - not specified, default values will be attempted. - properties: - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' - type: string - type: object - volumeName: - description: VolumeName is the human-readable name - of the StorageOS volume. Volume names are only - unique within a namespace. - type: string - volumeNamespace: - description: VolumeNamespace specifies the scope - of the volume within StorageOS. If no namespace - is specified then the Pod's namespace will be - used. This allows the Kubernetes name scoping - to be mirrored within StorageOS for tighter integration. - Set VolumeName to any name to override the default - behaviour. Set to "default" if you are not using - namespaces within StorageOS. Namespaces that do - not pre-exist within StorageOS will be created. - type: string - type: object - vsphereVolume: - description: VsphereVolume represents a vSphere volume - attached and mounted on kubelets host machine - properties: - fsType: - description: Filesystem type to mount. Must be a - filesystem type supported by the host operating - system. Ex. "ext4", "xfs", "ntfs". Implicitly - inferred to be "ext4" if unspecified. - type: string - storagePolicyID: - description: Storage Policy Based Management (SPBM) - profile ID associated with the StoragePolicyName. - type: string - storagePolicyName: - description: Storage Policy Based Management (SPBM) - profile name. - type: string - volumePath: - description: Path that identifies vSphere volume - vmdk - type: string - required: - - volumePath - type: object - required: - - name - type: object - type: array - workingDir: - type: string - type: object - type: object - type: array - type: object - status: - description: BuildStatus defines the observed state of Build - properties: - artifacts: - items: - description: Artifact -- - properties: - checksum: - type: string - id: - type: string - location: - type: string - target: - type: string - required: - - id - type: object - type: array - baseImage: - type: string - conditions: - items: - description: BuildCondition describes the state of a resource at a - certain point. - properties: - lastTransitionTime: - description: Last time the condition transitioned from one status - to another. - format: date-time - type: string - lastUpdateTime: - description: The last time this condition was updated. - format: date-time - type: string - message: - description: A human readable message indicating details about - the transition. - type: string - reason: - description: The reason for the condition's last transition. - type: string - status: - description: Status of the condition, one of True, False, Unknown. - type: string - type: - description: Type of integration condition. - type: string - required: - - status - - type - type: object - type: array - digest: - type: string - duration: - description: Change to Duration / ISO 8601 when CRD uses OpenAPI spec - v3 https://github.com/OAI/OpenAPI-Specification/issues/845 - type: string - error: - type: string - failure: - description: Failure -- - properties: - reason: - type: string - recovery: - description: FailureRecovery -- - properties: - attempt: - type: integer - attemptMax: - type: integer - attemptTime: - format: date-time - type: string - required: - - attempt - - attemptMax - type: object - time: - format: date-time - type: string - required: - - reason - - recovery - - time - type: object - image: - type: string - phase: - description: BuildPhase -- - type: string - platform: - type: string - startedAt: - format: date-time - type: string - type: object - type: object - version: v1 - versions: - - name: v1 - served: true - storage: true - ---- - -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - creationTimestamp: null - labels: - app: camel-k - rbac.authorization.k8s.io/aggregate-to-admin: "true" - rbac.authorization.k8s.io/aggregate-to-edit: "true" - name: camel-k:edit -rules: -- apiGroups: - - camel.apache.org - resources: - - '*' - verbs: - - '*' - ---- - -apiVersion: v1 -kind: ServiceAccount -metadata: - creationTimestamp: null - labels: - app: camel-k - name: camel-k-operator - ---- - -apiVersion: rbac.authorization.k8s.io/v1beta1 -kind: ClusterRole -metadata: - creationTimestamp: null - labels: - app: camel-k - name: camel-k-operator -rules: -- apiGroups: - - camel.apache.org - resources: - - '*' - verbs: - - '*' -- apiGroups: - - "" - resources: - - pods - - services - - endpoints - - persistentvolumeclaims - - configmaps - - secrets - - serviceaccounts - verbs: - - create - - delete - - deletecollection - - get - - list - - patch - - update - - watch -- apiGroups: - - rbac.authorization.k8s.io - resources: - - roles - - rolebindings - verbs: - - create - - delete - - deletecollection - - get - - list - - patch - - update - - watch -- apiGroups: - - "" - resources: - - events - verbs: - - get - - list - - watch -- apiGroups: - - apps - resources: - - deployments - - replicasets - - statefulsets - verbs: - - create - - delete - - deletecollection - - get - - list - - patch - - update - - watch -- apiGroups: - - batch - resources: - - cronjobs - verbs: - - create - - delete - - deletecollection - - get - - list - - patch - - update - - watch -- apiGroups: - - apps - attributeRestrictions: null - resources: - - daemonsets - verbs: - - get - - list - - watch -- apiGroups: - - extensions - resources: - - ingresses - verbs: - - create - - delete - - deletecollection - - get - - list - - patch - - update - - watch - ---- - -apiVersion: rbac.authorization.k8s.io/v1beta1 -kind: ClusterRoleBinding -metadata: - creationTimestamp: null - labels: - app: camel-k - name: camel-k-operator -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: camel-k-operator -subjects: -- kind: ServiceAccount - name: camel-k-operator - namespace: camelk - ---- - -apiVersion: apps/v1 -kind: Deployment -metadata: - creationTimestamp: null - labels: - app: camel-k - camel.apache.org/component: operator - name: camel-k-operator -spec: - replicas: 1 - selector: - matchLabels: - name: camel-k-operator - strategy: - type: Recreate - template: - metadata: - creationTimestamp: null - labels: - app: camel-k - camel.apache.org/component: operator - name: camel-k-operator - spec: - containers: - - command: - - kamel - - operator - env: - - name: WATCH_NAMESPACE - value: "" - - name: OPERATOR_NAME - value: camel-k - - name: POD_NAME - valueFrom: - fieldRef: - fieldPath: metadata.name - - name: NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - image: docker.io/apache/camel-k:1.1.0 - imagePullPolicy: IfNotPresent - name: camel-k-operator - resources: {} - serviceAccountName: camel-k-operator - ---- - -apiVersion: rbac.authorization.k8s.io/v1beta1 -kind: ClusterRole -metadata: - creationTimestamp: null - labels: - app: camel-k - name: camel-k-operator-knative -rules: -- apiGroups: - - serving.knative.dev - resources: - - '*' - verbs: - - create - - delete - - deletecollection - - get - - list - - patch - - update - - watch -- apiGroups: - - eventing.knative.dev - - messaging.knative.dev - resources: - - '*' - verbs: - - create - - delete - - deletecollection - - get - - list - - patch - - update - - watch - ---- - -apiVersion: rbac.authorization.k8s.io/v1beta1 -kind: ClusterRoleBinding -metadata: - creationTimestamp: null - labels: - app: camel-k - name: camel-k-operator-knative -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: camel-k-operator-knative -subjects: -- kind: ServiceAccount - name: camel-k-operator - namespace: camelk diff --git a/test/conformance/channel_channelable_manipulator_cluster_role_test.go b/test/conformance/channel_channelable_manipulator_cluster_role_test.go index 8b4836f33d..333464ec73 100644 --- a/test/conformance/channel_channelable_manipulator_cluster_role_test.go +++ b/test/conformance/channel_channelable_manipulator_cluster_role_test.go @@ -19,6 +19,7 @@ limitations under the License. package conformance import ( + "context" "testing" eventingconformancehelpers "knative.dev/eventing/test/conformance/helpers" @@ -26,5 +27,5 @@ import ( ) func TestChannelChannelableManipulatorClusterRoleTest(t *testing.T) { - eventingconformancehelpers.TestChannelChannelableManipulatorClusterRoleTestRunner(t, channelTestRunner, testlib.SetupClientOptionNoop) + eventingconformancehelpers.TestChannelChannelableManipulatorClusterRoleTestRunner(context.Background(), t, channelTestRunner, testlib.SetupClientOptionNoop) } diff --git a/test/conformance/channel_status_subscriber_test.go b/test/conformance/channel_status_subscriber_test.go index 70dde4f512..d1e4a51373 100644 --- a/test/conformance/channel_status_subscriber_test.go +++ b/test/conformance/channel_status_subscriber_test.go @@ -19,6 +19,7 @@ limitations under the License. package conformance import ( + "context" "testing" eventingconformancehelpers "knative.dev/eventing/test/conformance/helpers" @@ -26,5 +27,5 @@ import ( ) func TestChannelStatusSubscriber(t *testing.T) { - eventingconformancehelpers.ChannelStatusSubscriberTestHelperWithChannelTestRunner(t, channelTestRunner, testlib.SetupClientOptionNoop) + eventingconformancehelpers.ChannelStatusSubscriberTestHelperWithChannelTestRunner(context.Background(), t, channelTestRunner, testlib.SetupClientOptionNoop) } diff --git a/test/conformance/channel_tracing_test.go b/test/conformance/channel_tracing_test.go index 63b36ee8e0..2015dff325 100644 --- a/test/conformance/channel_tracing_test.go +++ b/test/conformance/channel_tracing_test.go @@ -19,6 +19,7 @@ limitations under the License. package conformance import ( + "context" "testing" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -31,7 +32,7 @@ import ( func TestChannelTracingWithReply(t *testing.T) { // Enable this test only for Kafka - helpers.ChannelTracingTestHelperWithChannelTestRunner(t, testlib.ComponentsTestRunner{ + helpers.ChannelTracingTestHelperWithChannelTestRunner(context.Background(), t, testlib.ComponentsTestRunner{ ComponentFeatureMap: map[metav1.TypeMeta][]testlib.Feature{ { APIVersion: resources.MessagingAPIVersion, diff --git a/test/e2e-tests.sh b/test/e2e-tests.sh index 4c080062b1..cad533c4fe 100755 --- a/test/e2e-tests.sh +++ b/test/e2e-tests.sh @@ -71,12 +71,6 @@ readonly KAFKA_CRD_CONFIG_DIR="$(mktemp -d)" # Kafka channel CRD config template directory. readonly KAFKA_SOURCE_CRD_CONFIG_DIR="kafka/source/config" -# CamelK installation -readonly CAMELK_INSTALLATION_CONFIG="test/config/100-camel-k-1.1.0.yaml" -# Camel source CRD config template directory -readonly CAMEL_SOURCE_CRD_CONFIG_DIR="camel/source/config" - - function knative_setup() { if is_release_branch; then echo ">> Install Knative Eventing from ${KNATIVE_EVENTING_RELEASE}" @@ -138,7 +132,6 @@ function add_trap() { function test_setup() { natss_setup || return 1 kafka_setup || return 1 - camel_setup || return 1 install_channel_crds || return 1 install_sources_crds || return 1 @@ -169,7 +162,6 @@ function test_setup() { function test_teardown() { natss_teardown kafka_teardown - camel_teardown uninstall_channel_crds uninstall_sources_crds @@ -192,10 +184,6 @@ function install_sources_crds() { ko apply -f ${KAFKA_SOURCE_CRD_CONFIG_DIR} || return 1 wait_until_pods_running knative-eventing || fail_test "Failed to install the Kafka Source CRD" wait_until_pods_running knative-sources || fail_test "Failed to install the Kafka Source CRD" - - echo "Installing Camel Source CRD" - ko apply -f ${CAMEL_SOURCE_CRD_CONFIG_DIR} || return 1 - wait_until_pods_running knative-sources || fail_test "Failed to install the Camel Source CRD" } function uninstall_channel_crds() { @@ -243,23 +231,11 @@ function kafka_teardown() { kubectl delete namespace kafka } -function camel_setup() { - echo "Installing CamelK" - kubectl create namespace camelk || return 1 - kubectl apply -f "${CAMELK_INSTALLATION_CONFIG}" -n camelk -} - -function camel_teardown() { - echo "Uninstalling CamelK" - kubectl delete -f "${CAMELK_INSTALLATION_CONFIG}" -n camelk - kubectl delete namespace camelk -} - initialize $@ --skip-istio-addon go_test_e2e -timeout=30m -parallel=12 ./test/e2e -channels=messaging.knative.dev/v1alpha1:NatssChannel,messaging.knative.dev/v1alpha1:KafkaChannel,messaging.knative.dev/v1beta1:KafkaChannel || fail_test -go_test_e2e -timeout=5m -parallel=12 ./test/conformance -channels=messaging.knative.dev/v1alpha1:NatssChannel,messaging.knative.dev/v1beta1:KafkaChannel -sources=sources.knative.dev/v1alpha1:CamelSource,sources.knative.dev/v1beta1:KafkaSource || fail_test +go_test_e2e -timeout=5m -parallel=12 ./test/conformance -channels=messaging.knative.dev/v1alpha1:NatssChannel,messaging.knative.dev/v1beta1:KafkaChannel -sources=sources.knative.dev/v1beta1:KafkaSource || fail_test # If you wish to use this script just as test setup, *without* teardown, just uncomment this line and comment all go_test_e2e commands # trap - SIGINT SIGQUIT SIGTSTP EXIT diff --git a/test/e2e/broker_channel_flow_test.go b/test/e2e/broker_channel_flow_test.go index 6fb642b95d..43f9455edb 100644 --- a/test/e2e/broker_channel_flow_test.go +++ b/test/e2e/broker_channel_flow_test.go @@ -18,20 +18,21 @@ limitations under the License. package e2e import ( + "context" "testing" "knative.dev/eventing/test/e2e/helpers" ) func TestBrokerChannelFlowTriggerV1BrokerV1(t *testing.T) { - helpers.BrokerChannelFlowWithTransformation(t, "MTChannelBasedBroker", "v1", "v1", channelTestRunner) + helpers.BrokerChannelFlowWithTransformation(context.Background(), t, "MTChannelBasedBroker", "v1", "v1", channelTestRunner) } func TestBrokerChannelFlowV1Beta1BrokerV1(t *testing.T) { - helpers.BrokerChannelFlowWithTransformation(t, "MTChannelBasedBroker", "v1", "v1beta1", channelTestRunner) + helpers.BrokerChannelFlowWithTransformation(context.Background(), t, "MTChannelBasedBroker", "v1", "v1beta1", channelTestRunner) } func TestBrokerChannelFlowTriggerV1Beta1BrokerV1Beta1(t *testing.T) { - helpers.BrokerChannelFlowWithTransformation(t, "MTChannelBasedBroker", "v1beta1", "v1beta1", channelTestRunner) + helpers.BrokerChannelFlowWithTransformation(context.Background(), t, "MTChannelBasedBroker", "v1beta1", "v1beta1", channelTestRunner) } func TestBrokerChannelFlowTriggerV1BrokerV1Beta1(t *testing.T) { - helpers.BrokerChannelFlowWithTransformation(t, "MTChannelBasedBroker", "v1beta1", "v1", channelTestRunner) + helpers.BrokerChannelFlowWithTransformation(context.Background(), t, "MTChannelBasedBroker", "v1beta1", "v1", channelTestRunner) } diff --git a/test/e2e/broker_event_transformation_test.go b/test/e2e/broker_event_transformation_test.go index c976a59a1b..90b0ad2370 100644 --- a/test/e2e/broker_event_transformation_test.go +++ b/test/e2e/broker_event_transformation_test.go @@ -18,6 +18,7 @@ limitations under the License. package e2e import ( + "context" "testing" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -45,6 +46,7 @@ func runTest(t *testing.T, brokerVersion string, triggerVersion string) { channelTestRunner.RunTests(t, lib.FeatureBasic, func(t *testing.T, component metav1.TypeMeta) { helpers.EventTransformationForTriggerTestHelper( + context.Background(), t, brokerVersion, triggerVersion, diff --git a/test/e2e/broker_redelivery_test.go b/test/e2e/broker_redelivery_test.go index 55b4241398..228042094f 100644 --- a/test/e2e/broker_redelivery_test.go +++ b/test/e2e/broker_redelivery_test.go @@ -19,6 +19,7 @@ package e2e import ( + "context" "strings" "testing" @@ -64,6 +65,6 @@ func TestBrokerRedelivery(t *testing.T) { brokerCreator := ChannelBasedBrokerCreator(component, eventing.MTChannelBrokerClassValue) - helpers.BrokerRedelivery(t, brokerCreator) + helpers.BrokerRedelivery(context.Background(), t, brokerCreator) }) } diff --git a/test/e2e/camel_source_test.go b/test/e2e/camel_source_test.go deleted file mode 100644 index 7d6f110435..0000000000 --- a/test/e2e/camel_source_test.go +++ /dev/null @@ -1,201 +0,0 @@ -// +build e2e - -/* -Copyright 2020 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. -*/ - -package e2e - -import ( - "testing" - "time" - - camelv1 "github.com/apache/camel-k/pkg/apis/camel/v1" - camelclientset "github.com/apache/camel-k/pkg/client/camel/clientset/versioned" - "github.com/cloudevents/sdk-go/v2/test" - meta "k8s.io/apimachinery/pkg/apis/meta/v1" - testlib "knative.dev/eventing/test/lib" - "knative.dev/eventing/test/lib/recordevents" - "knative.dev/eventing/test/lib/resources" - knativeduck "knative.dev/pkg/apis/duck/v1beta1" - - "knative.dev/eventing-contrib/camel/source/pkg/apis/sources/v1alpha1" - camelsourceclient "knative.dev/eventing-contrib/camel/source/pkg/client/clientset/versioned" -) - -func TestCamelSource(t *testing.T) { - const ( - camelSourceName = "e2e-camelsource" - loggerPodName = "e2e-camelsource-logger-pod" - body = "Hello, world!" - ) - - client := testlib.Setup(t, true) - defer testlib.TearDown(client) - - t.Logf("Creating event record") - eventTracker, _ := recordevents.StartEventRecordOrFail(client, loggerPodName) - - camelClient := getCamelKClient(client) - - t.Logf("Creating Camel K IntegrationPlatform") - createCamelPlatformOrFail(client, camelClient, camelSourceName) - - t.Logf("Creating Camel K Kit (to skip build)") - createCamelKitOrFail(client, camelClient, camelSourceName) - - t.Logf("Creating CamelSource") - createCamelSourceOrFail(client, &v1alpha1.CamelSource{ - ObjectMeta: meta.ObjectMeta{ - Name: camelSourceName, - }, - Spec: v1alpha1.CamelSourceSpec{ - Source: v1alpha1.CamelSourceOriginSpec{ - Flow: &v1alpha1.Flow{ - "from": &map[string]interface{}{ - "uri": "timer:tick?period=1000", - "steps": []interface{}{ - &map[string]interface{}{ - "set-body": &map[string]interface{}{ - "constant": body, - }, - }, - &map[string]interface{}{ - "set-header": &map[string]interface{}{ - "name": "Content-Type", - "constant": "text/plain", - }, - }, - }, - }, - }, - }, - Sink: &knativeduck.Destination{ - Ref: resources.ServiceRef(loggerPodName), - }, - }, - }) - - t.Logf("Waiting for all resources ready") - client.WaitForAllTestResourcesReadyOrFail() - - t.Logf("Sleeping for 3s to let the timer tick at least once") - time.Sleep(3 * time.Second) - - pods, err := client.Kube.Kube.CoreV1().Pods(client.Namespace).List(meta.ListOptions{ - LabelSelector: "camel.apache.org/integration", - }) - if err != nil { - t.Fatalf("cannot get integration pod: %v", err) - } - if len(pods.Items) == 0 { - t.Fatalf("no integration pod found") - } - printPodLogs(t, client, pods.Items[0].Name, "integration") - - eventTracker.AssertAtLeast(1, recordevents.MatchEvent(test.AllOf( - test.HasData([]byte(body))), - test.HasType("org.apache.camel.event"), - )) -} - -func printPodLogs(t *testing.T, c *testlib.Client, podName, containerName string) { - logs, err := c.Kube.PodLogs(podName, containerName, c.Namespace) - if err == nil { - t.Log(string(logs)) - } - t.Logf("End of pod %s logs", podName) -} - -func createCamelSourceOrFail(c *testlib.Client, camelSource *v1alpha1.CamelSource) { - camelSourceClientSet, err := camelsourceclient.NewForConfig(c.Config) - if err != nil { - c.T.Fatalf("Failed to create CamelSource client: %v", err) - } - - cSources := camelSourceClientSet.SourcesV1alpha1().CamelSources(c.Namespace) - if createdCamelSource, err := cSources.Create(camelSource); err != nil { - c.T.Fatalf("Failed to create CamelSource %q: %v", camelSource.Name, err) - } else { - c.Tracker.AddObj(createdCamelSource) - } -} - -func createCamelPlatformOrFail(c *testlib.Client, camelClient camelclientset.Interface, camelSourceName string) { - platform := camelv1.IntegrationPlatform{ - ObjectMeta: meta.ObjectMeta{ - Name: "camel-k", - Namespace: c.Namespace, - }, - Spec: camelv1.IntegrationPlatformSpec{ - Profile: camelv1.TraitProfileKnative, - }, - } - - if _, err := camelClient.CamelV1().IntegrationPlatforms(c.Namespace).Create(&platform); err != nil { - c.T.Fatalf("Failed to create IntegrationPlatform for CamelSource %q: %v", camelSourceName, err) - } -} - -func createCamelKitOrFail(c *testlib.Client, camelClient camelclientset.Interface, camelSourceName string) { - // Creating this kit manually because the Camel K platform is not configured to do it on its own. - // Testing that Camel K works is not in scope for this test. - kit := camelv1.IntegrationKit{ - ObjectMeta: meta.ObjectMeta{ - Name: "test-kit", - Namespace: c.Namespace, - Labels: map[string]string{ - "camel.apache.org/kit.type": "external", - }, - }, - Spec: camelv1.IntegrationKitSpec{ - Dependencies: []string{ - "camel:core-languages", - "camel:timer", - "mvn:org.apache.camel.k/camel-k-loader-yaml", - "mvn:org.apache.camel.k/camel-k-runtime-http", - "mvn:org.apache.camel.k/camel-k-runtime-knative", - "mvn:org.apache.camel.k/camel-k-runtime-main", - "mvn:org.apache.camel.k/camel-knative", - }, - Image: "docker.io/testcamelk/camel-k-kit-knative-timer:1.1.0", - }, - } - - if _, err := camelClient.CamelV1().IntegrationKits(c.Namespace).Create(&kit); err != nil { - c.T.Fatalf("Failed to create IntegrationKit for CamelSource %q: %v", camelSourceName, err) - } - - // Wait for the kit to be "Ready" before creating other resources - var ik *camelv1.IntegrationKit - for i := 0; i < 30; i++ { - var err error - ik, err = camelClient.CamelV1().IntegrationKits(c.Namespace).Get(kit.Name, meta.GetOptions{}) - if err != nil { - c.T.Fatalf("Failed to retrieve IntegrationKit %q: %v", kit.Name, err) - } - if ik.Status.Phase == camelv1.IntegrationKitPhaseReady { - break - } - time.Sleep(1 * time.Second) - } - if ik == nil || ik.Status.Phase != camelv1.IntegrationKitPhaseReady { - c.T.Fatalf("IntegrationKit %q is not ready", kit.Name) - } -} - -func getCamelKClient(c *testlib.Client) camelclientset.Interface { - return camelclientset.NewForConfigOrDie(c.Config) -} diff --git a/test/e2e/channel_chain_test.go b/test/e2e/channel_chain_test.go index bd403ee0bb..17d17171a7 100644 --- a/test/e2e/channel_chain_test.go +++ b/test/e2e/channel_chain_test.go @@ -19,15 +19,16 @@ limitations under the License. package e2e import ( + "context" "testing" "knative.dev/eventing/test/e2e/helpers" ) func TestChannelChain(t *testing.T) { - helpers.ChannelChainTestHelper(t, helpers.SubscriptionV1beta1, channelTestRunner) + helpers.ChannelChainTestHelper(context.Background(), t, helpers.SubscriptionV1beta1, channelTestRunner) } func TestChannelChainV1(t *testing.T) { - helpers.ChannelChainTestHelper(t, helpers.SubscriptionV1, channelTestRunner) + helpers.ChannelChainTestHelper(context.Background(), t, helpers.SubscriptionV1, channelTestRunner) } diff --git a/test/e2e/channel_defaulter_test.go b/test/e2e/channel_defaulter_test.go index e028c39f87..5376a5b199 100644 --- a/test/e2e/channel_defaulter_test.go +++ b/test/e2e/channel_defaulter_test.go @@ -19,6 +19,7 @@ limitations under the License. package e2e import ( + "context" "testing" "knative.dev/eventing/test/e2e/helpers" @@ -28,12 +29,12 @@ import ( func TestChannelClusterDefaulter(t *testing.T) { // TODO(chizhg): reenable the test after solving https://github.com/knative/eventing-contrib/issues/627 t.Skip() - helpers.ChannelClusterDefaulterTestHelper(t, channelTestRunner) + helpers.ChannelClusterDefaulterTestHelper(context.Background(), t, channelTestRunner) } // TestChannelNamespaceDefaulter tests a namespace defaulted channel can be created with the template specified through configmap. func TestChannelNamespaceDefaulter(t *testing.T) { // TODO(chizhg): reenable the test after solving https://github.com/knative/eventing-contrib/issues/627 t.Skip() - helpers.ChannelNamespaceDefaulterTestHelper(t, channelTestRunner) + helpers.ChannelNamespaceDefaulterTestHelper(context.Background(), t, channelTestRunner) } diff --git a/test/e2e/channel_event_transformation_test.go b/test/e2e/channel_event_transformation_test.go index 123f4c668b..fcebc20a84 100644 --- a/test/e2e/channel_event_transformation_test.go +++ b/test/e2e/channel_event_transformation_test.go @@ -19,15 +19,16 @@ limitations under the License. package e2e import ( + "context" "testing" "knative.dev/eventing/test/e2e/helpers" ) func TestEventTransformationForSubscriptionV1Beta1(t *testing.T) { - helpers.EventTransformationForSubscriptionTestHelper(t, helpers.SubscriptionV1beta1, channelTestRunner) + helpers.EventTransformationForSubscriptionTestHelper(context.Background(), t, helpers.SubscriptionV1beta1, channelTestRunner) } func TestEventTransformationForSubscriptionV1(t *testing.T) { - helpers.EventTransformationForSubscriptionTestHelper(t, helpers.SubscriptionV1, channelTestRunner) + helpers.EventTransformationForSubscriptionTestHelper(context.Background(), t, helpers.SubscriptionV1, channelTestRunner) } diff --git a/test/e2e/channel_single_event_test.go b/test/e2e/channel_single_event_test.go index 60d0b7eadf..74b7a6b887 100644 --- a/test/e2e/channel_single_event_test.go +++ b/test/e2e/channel_single_event_test.go @@ -19,6 +19,7 @@ limitations under the License. package e2e import ( + "context" "testing" cloudevents "github.com/cloudevents/sdk-go/v2" @@ -26,17 +27,17 @@ import ( ) func TestSingleBinaryEventForChannelV1Beta1(t *testing.T) { - helpers.SingleEventForChannelTestHelper(t, cloudevents.EncodingBinary, helpers.SubscriptionV1beta1, "", channelTestRunner) + helpers.SingleEventForChannelTestHelper(context.Background(), t, cloudevents.EncodingBinary, helpers.SubscriptionV1beta1, "", channelTestRunner) } func TestSingleStructuredEventForChannelV1Beta1(t *testing.T) { - helpers.SingleEventForChannelTestHelper(t, cloudevents.EncodingStructured, helpers.SubscriptionV1beta1, "", channelTestRunner) + helpers.SingleEventForChannelTestHelper(context.Background(), t, cloudevents.EncodingStructured, helpers.SubscriptionV1beta1, "", channelTestRunner) } func TestSingleBinaryEventForChannelV1(t *testing.T) { - helpers.SingleEventForChannelTestHelper(t, cloudevents.EncodingBinary, helpers.SubscriptionV1, "", channelTestRunner) + helpers.SingleEventForChannelTestHelper(context.Background(), t, cloudevents.EncodingBinary, helpers.SubscriptionV1, "", channelTestRunner) } func TestSingleStructuredEventForChannelV1(t *testing.T) { - helpers.SingleEventForChannelTestHelper(t, cloudevents.EncodingStructured, helpers.SubscriptionV1, "", channelTestRunner) + helpers.SingleEventForChannelTestHelper(context.Background(), t, cloudevents.EncodingStructured, helpers.SubscriptionV1, "", channelTestRunner) } diff --git a/test/e2e/helpers/kafka_helper.go b/test/e2e/helpers/kafka_helper.go index 1b5056edfe..c5cb42d969 100644 --- a/test/e2e/helpers/kafka_helper.go +++ b/test/e2e/helpers/kafka_helper.go @@ -17,6 +17,7 @@ limitations under the License. package helpers import ( + "context" "fmt" "strings" "time" @@ -69,13 +70,13 @@ func MustPublishKafkaMessage(client *testlib.Client, bootstrapServer string, top "payload": payload, }, } - _, err := client.Kube.Kube.CoreV1().ConfigMaps(client.Namespace).Create(cm) + _, err := client.Kube.Kube.CoreV1().ConfigMaps(client.Namespace).Create(context.Background(), cm, metav1.CreateOptions{}) if err != nil { if !apierrs.IsAlreadyExists(err) { client.T.Fatalf("Failed to create configmap %q: %v", cgName, err) return } - if _, err = client.Kube.Kube.CoreV1().ConfigMaps(client.Namespace).Update(cm); err != nil { + if _, err = client.Kube.Kube.CoreV1().ConfigMaps(client.Namespace).Update(context.Background(), cm, metav1.UpdateOptions{}); err != nil { client.T.Fatalf("failed to update configmap: %q: %v", cgName, err) } } @@ -122,7 +123,7 @@ func MustPublishKafkaMessage(client *testlib.Client, bootstrapServer string, top } client.CreatePodOrFail(&pod) - err = pkgtest.WaitForPodState(client.Kube, func(pod *corev1.Pod) (b bool, e error) { + err = pkgtest.WaitForPodState(context.Background(), client.Kube, func(pod *corev1.Pod) (b bool, e error) { if pod.Status.Phase == corev1.PodFailed { return true, fmt.Errorf("aggregator pod failed with message %s", pod.Status.Message) } else if pod.Status.Phase != corev1.PodSucceeded { @@ -176,9 +177,9 @@ func MustPublishKafkaMessageViaBinding(client *testlib.Client, selector map[stri } pkgtest.CleanupOnInterrupt(func() { - client.Kube.Kube.BatchV1().Jobs(job.Namespace).Delete(job.Name, &metav1.DeleteOptions{}) + client.Kube.Kube.BatchV1().Jobs(job.Namespace).Delete(context.Background(), job.Name, metav1.DeleteOptions{}) }, client.T.Logf) - job, err := client.Kube.Kube.BatchV1().Jobs(job.Namespace).Create(job) + job, err := client.Kube.Kube.BatchV1().Jobs(job.Namespace).Create(context.Background(), job, metav1.CreateOptions{}) if err != nil { client.T.Fatalf("Error creating Job: %v", err) } @@ -188,7 +189,7 @@ func MustPublishKafkaMessageViaBinding(client *testlib.Client, selector map[stri client.T.Log("", "job", spew.Sprint(job)) defer func() { - err := client.Kube.Kube.BatchV1().Jobs(job.Namespace).Delete(job.Name, &metav1.DeleteOptions{}) + err := client.Kube.Kube.BatchV1().Jobs(job.Namespace).Delete(context.Background(), job.Name, metav1.DeleteOptions{}) if err != nil { client.T.Errorf("Error cleaning up Job %s", job.Name) } @@ -196,7 +197,7 @@ func MustPublishKafkaMessageViaBinding(client *testlib.Client, selector map[stri // Wait for the Job to report a successful execution. waitErr := wait.PollImmediate(1*time.Second, 2*time.Minute, func() (bool, error) { - js, err := client.Kube.Kube.BatchV1().Jobs(job.Namespace).Get(job.Name, metav1.GetOptions{}) + js, err := client.Kube.Kube.BatchV1().Jobs(job.Namespace).Get(context.Background(), job.Name, metav1.GetOptions{}) if apierrs.IsNotFound(err) { return false, nil } else if err != nil { @@ -231,7 +232,7 @@ func MustCreateTopic(client *testlib.Client, clusterName string, clusterNamespac }, } - _, err := client.Dynamic.Resource(topicGVR).Namespace(clusterNamespace).Create(&obj, metav1.CreateOptions{}) + _, err := client.Dynamic.Resource(topicGVR).Namespace(clusterNamespace).Create(context.Background(), &obj, metav1.CreateOptions{}) if err != nil { client.T.Fatalf("Error while creating the topic %s: %v", topicName, err) @@ -242,7 +243,7 @@ func MustCreateTopic(client *testlib.Client, clusterName string, clusterNamespac //CheckKafkaSourceState waits for specified kafka source resource state //On timeout reports error -func CheckKafkaSourceState(c *testlib.Client, name string, inState func(ks *sourcesv1beta1.KafkaSource) (bool, error)) error { +func CheckKafkaSourceState(ctx context.Context, c *testlib.Client, name string, inState func(ks *sourcesv1beta1.KafkaSource) (bool, error)) error { kafkaSourceClientSet, err := kafkaclientset.NewForConfig(c.Config) if err != nil { return err @@ -251,7 +252,7 @@ func CheckKafkaSourceState(c *testlib.Client, name string, inState func(ks *sour var lastState *sourcesv1beta1.KafkaSource waitErr := wait.PollImmediate(interval, timeout, func() (bool, error) { var err error - lastState, err = kSources.Get(name, metav1.GetOptions{}) + lastState, err = kSources.Get(ctx, name, metav1.GetOptions{}) if err != nil { return true, err } @@ -265,7 +266,7 @@ func CheckKafkaSourceState(c *testlib.Client, name string, inState func(ks *sour //CheckRADeployment waits for desired state of receiver adapter //On timeout reports error -func CheckRADeployment(c *testlib.Client, name string, inState func(deps *appsv1.DeploymentList) (bool, error)) error { +func CheckRADeployment(ctx context.Context, c *testlib.Client, name string, inState func(deps *appsv1.DeploymentList) (bool, error)) error { listOptions := metav1.ListOptions{ LabelSelector: fmt.Sprintf("%s=%s", "eventing.knative.dev/SourceName", name), } @@ -273,7 +274,7 @@ func CheckRADeployment(c *testlib.Client, name string, inState func(deps *appsv1 var lastState *appsv1.DeploymentList waitErr := wait.PollImmediate(interval, timeout, func() (bool, error) { var err error - lastState, err = kDeps.List(listOptions) + lastState, err = kDeps.List(ctx, listOptions) if err != nil { return true, err } diff --git a/test/e2e/kafka_binding_test.go b/test/e2e/kafka_binding_test.go index 213a0c8829..815bc01077 100644 --- a/test/e2e/kafka_binding_test.go +++ b/test/e2e/kafka_binding_test.go @@ -19,6 +19,7 @@ limitations under the License. package e2e import ( + "context" "testing" "github.com/cloudevents/sdk-go/v2/test" @@ -45,7 +46,7 @@ func testKafkaBinding(t *testing.T, version string, messageKey string, messageHe helpers.MustCreateTopic(client, kafkaClusterName, kafkaClusterNamespace, kafkaTopicName) t.Logf("Creating EventRecord") - eventTracker, _ := recordevents.StartEventRecordOrFail(client, loggerPodName) + eventTracker, _ := recordevents.StartEventRecordOrFail(context.Background(), client, loggerPodName) t.Logf("Creating KafkaSource %s", version) switch version { @@ -96,7 +97,7 @@ func testKafkaBinding(t *testing.T, version string, messageKey string, messageHe t.Fatalf("Unknown KafkaSource version %s", version) } - client.WaitForAllTestResourcesReadyOrFail() + client.WaitForAllTestResourcesReadyOrFail(context.Background()) helpers.MustPublishKafkaMessageViaBinding(client, selector, kafkaTopicName, messageKey, messageHeaders, messagePayload) diff --git a/test/e2e/kafka_source_reconciler_test.go b/test/e2e/kafka_source_reconciler_test.go index 8930b7b73e..036a2a2814 100644 --- a/test/e2e/kafka_source_reconciler_test.go +++ b/test/e2e/kafka_source_reconciler_test.go @@ -19,6 +19,7 @@ limitations under the License. package e2e import ( + "context" "testing" appsv1 "k8s.io/api/apps/v1" @@ -84,7 +85,7 @@ func TestKafkaSourceReconciler(t *testing.T) { func testKafkaSourceReconciler(c *testlib.Client, name string, doAction func(c *testlib.Client), expectedStatuses sets.String, wantRADepCount int) { doAction(c) - if err := helpers.CheckKafkaSourceState(c, rtKafkaSourceName, func(ks *sourcesv1beta1.KafkaSource) (bool, error) { + if err := helpers.CheckKafkaSourceState(context.Background(), c, rtKafkaSourceName, func(ks *sourcesv1beta1.KafkaSource) (bool, error) { ready := ks.Status.GetCondition(apis.ConditionReady) if ready != nil { if expectedStatuses.Has(ready.Reason) { @@ -96,7 +97,7 @@ func testKafkaSourceReconciler(c *testlib.Client, name string, doAction func(c * c.T.Fatalf("Failed to validate kafkasource state, expected status : %v, err : %v", expectedStatuses.UnsortedList(), err) } - if err := helpers.CheckRADeployment(c, rtKafkaSourceName, func(deps *appsv1.DeploymentList) (bool, error) { + if err := helpers.CheckRADeployment(context.Background(), c, rtKafkaSourceName, func(deps *appsv1.DeploymentList) (bool, error) { if len(deps.Items) == wantRADepCount { return true, nil } @@ -123,9 +124,9 @@ func createChannel(c *testlib.Client) { APIVersion: resources.MessagingAPIVersion, Kind: resources.InMemoryChannelKind, }) - c.WaitForAllTestResourcesReadyOrFail() + c.WaitForAllTestResourcesReadyOrFail(context.Background()) } func deleteChannel(c *testlib.Client) { - contribtestlib.DeleteResourceOrFail(c, rtChannelName, helpers.ImcGVR) + contribtestlib.DeleteResourceOrFail(context.Background(), c, rtChannelName, helpers.ImcGVR) } diff --git a/test/e2e/kafka_source_test.go b/test/e2e/kafka_source_test.go index 2e0b17bff3..9f168d01dd 100644 --- a/test/e2e/kafka_source_test.go +++ b/test/e2e/kafka_source_test.go @@ -19,6 +19,7 @@ limitations under the License. package e2e import ( + "context" "encoding/json" "fmt" "strings" @@ -61,7 +62,7 @@ func testKafkaSource(t *testing.T, name string, version string, messageKey strin helpers.MustCreateTopic(client, kafkaClusterName, kafkaClusterNamespace, kafkaTopicName) - eventTracker, _ := recordevents.StartEventRecordOrFail(client, recordEventPodName) + eventTracker, _ := recordevents.StartEventRecordOrFail(context.Background(), client, recordEventPodName) var ( cloudEventsSourceName string @@ -94,7 +95,7 @@ func testKafkaSource(t *testing.T, name string, version string, messageKey strin t.Fatalf("Unknown KafkaSource version %s", version) } - client.WaitForAllTestResourcesReadyOrFail() + client.WaitForAllTestResourcesReadyOrFail(context.Background()) helpers.MustPublishKafkaMessage(client, kafkaBootstrapUrl, kafkaTopicName, messageKey, messageHeaders, messagePayload) diff --git a/test/lib/creation.go b/test/lib/creation.go index d408695c33..4e19c2f359 100644 --- a/test/lib/creation.go +++ b/test/lib/creation.go @@ -17,8 +17,12 @@ limitations under the License. package lib import ( + "context" + testlib "knative.dev/eventing/test/lib" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + bindingsv1alpha1 "knative.dev/eventing-contrib/kafka/source/pkg/apis/bindings/v1alpha1" bindingsv1beta1 "knative.dev/eventing-contrib/kafka/source/pkg/apis/bindings/v1beta1" sourcesv1alpha1 "knative.dev/eventing-contrib/kafka/source/pkg/apis/sources/v1alpha1" @@ -33,7 +37,7 @@ func CreateKafkaSourceV1Alpha1OrFail(c *testlib.Client, kafkaSource *sourcesv1al } kSources := kafkaSourceClientSet.SourcesV1alpha1().KafkaSources(c.Namespace) - if createdKafkaSource, err := kSources.Create(kafkaSource); err != nil { + if createdKafkaSource, err := kSources.Create(context.Background(), kafkaSource, metav1.CreateOptions{}); err != nil { c.T.Fatalf("Failed to create v1alpha1 KafkaSource %q: %v", kafkaSource.Name, err) } else { c.Tracker.AddObj(createdKafkaSource) @@ -47,7 +51,7 @@ func CreateKafkaSourceV1Beta1OrFail(c *testlib.Client, kafkaSource *sourcesv1bet } kSources := kafkaSourceClientSet.SourcesV1beta1().KafkaSources(c.Namespace) - if createdKafkaSource, err := kSources.Create(kafkaSource); err != nil { + if createdKafkaSource, err := kSources.Create(context.Background(), kafkaSource, metav1.CreateOptions{}); err != nil { c.T.Fatalf("Failed to create v1beta1 KafkaSource %q: %v", kafkaSource.Name, err) } else { c.Tracker.AddObj(createdKafkaSource) @@ -61,7 +65,7 @@ func CreateKafkaBindingV1Alpha1OrFail(c *testlib.Client, kafkaBinding *bindingsv } kBindings := kafkaBindingClientSet.BindingsV1alpha1().KafkaBindings(c.Namespace) - if createdKafkaBinding, err := kBindings.Create(kafkaBinding); err != nil { + if createdKafkaBinding, err := kBindings.Create(context.Background(), kafkaBinding, metav1.CreateOptions{}); err != nil { c.T.Fatalf("Failed to create v1alpha1 KafkaBinding %q: %v", kafkaBinding.Name, err) } else { c.Tracker.AddObj(createdKafkaBinding) @@ -75,7 +79,7 @@ func CreateKafkaBindingV1Beta1OrFail(c *testlib.Client, kafkaBinding *bindingsv1 } kBindings := kafkaBindingClientSet.BindingsV1beta1().KafkaBindings(c.Namespace) - if createdKafkaBinding, err := kBindings.Create(kafkaBinding); err != nil { + if createdKafkaBinding, err := kBindings.Create(context.Background(), kafkaBinding, metav1.CreateOptions{}); err != nil { c.T.Fatalf("Failed to create v1beta1 KafkaBinding %q: %v", kafkaBinding.Name, err) } else { c.Tracker.AddObj(createdKafkaBinding) diff --git a/test/lib/deletion.go b/test/lib/deletion.go index 4dde0f8b08..09cfb7cb21 100644 --- a/test/lib/deletion.go +++ b/test/lib/deletion.go @@ -17,14 +17,17 @@ limitations under the License. package lib import ( + "context" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/schema" testlib "knative.dev/eventing/test/lib" ) -func DeleteResourceOrFail(c *testlib.Client, name string, gvr schema.GroupVersionResource) { +func DeleteResourceOrFail(ctx context.Context, c *testlib.Client, name string, gvr schema.GroupVersionResource) { unstructured := c.Dynamic.Resource(gvr).Namespace(c.Namespace) - if err := unstructured.Delete(name, nil); err != nil { + if err := unstructured.Delete(ctx, name, metav1.DeleteOptions{}); err != nil { c.T.Fatalf("Failed to delete the resource %q : %v", name, err) } } diff --git a/test/lib/listers.go b/test/lib/listers.go index 9ee1650a9f..d1574b8bd1 100644 --- a/test/lib/listers.go +++ b/test/lib/listers.go @@ -20,7 +20,6 @@ import ( "k8s.io/apimachinery/pkg/runtime" fakekubeclientset "k8s.io/client-go/kubernetes/fake" "k8s.io/client-go/tools/cache" - fakesourcesclientset "knative.dev/eventing-contrib/camel/source/pkg/client/clientset/versioned/fake" fakeeventingclientset "knative.dev/eventing/pkg/client/clientset/versioned/fake" "knative.dev/pkg/reconciler/testing" @@ -76,13 +75,8 @@ func (l Listers) GetEventingObjects() []runtime.Object { return l.sorter.ObjectsForSchemeFunc(fakeeventingclientset.AddToScheme) } -func (l Listers) GetSourcesObjects() []runtime.Object { - return l.sorter.ObjectsForSchemeFunc(fakesourcesclientset.AddToScheme) -} - func (l Listers) GetAllObjects() []runtime.Object { - all := l.GetSourcesObjects() - all = append(all, l.GetEventingObjects()...) + all := l.GetEventingObjects() all = append(all, l.GetKubeObjects()...) return all } diff --git a/test/lib/setupclientoptions/sources.go b/test/lib/setupclientoptions/sources.go index d7d27f2df3..061d38011a 100644 --- a/test/lib/setupclientoptions/sources.go +++ b/test/lib/setupclientoptions/sources.go @@ -17,6 +17,8 @@ limitations under the License. package setupclientoptions import ( + "context" + "github.com/google/uuid" "knative.dev/eventing-contrib/test/e2e/helpers" @@ -42,7 +44,7 @@ func KafkaSourceV1B1ClientSetupOption(name string, kafkaClusterName string, kafk helpers.MustCreateTopic(client, kafkaClusterName, kafkaClusterNamespace, kafkaTopicName) - recordevents.StartEventRecordOrFail(client, recordEventsPodName) + recordevents.StartEventRecordOrFail(context.Background(), client, recordEventsPodName) contribtestlib.CreateKafkaSourceV1Beta1OrFail(client, contribresources.KafkaSourceV1Beta1( kafkaBootstrapUrl, @@ -52,6 +54,6 @@ func KafkaSourceV1B1ClientSetupOption(name string, kafkaClusterName string, kafk contribresources.WithConsumerGroupV1Beta1(consumerGroup), )) - client.WaitForAllTestResourcesReadyOrFail() + client.WaitForAllTestResourcesReadyOrFail(context.Background()) } } diff --git a/third_party/VENDOR-LICENSE/github.com/apache/camel-k/pkg/client/camel/LICENSE b/third_party/VENDOR-LICENSE/github.com/apache/camel-k/pkg/client/camel/LICENSE deleted file mode 100644 index 6b0b1270ff..0000000000 --- a/third_party/VENDOR-LICENSE/github.com/apache/camel-k/pkg/client/camel/LICENSE +++ /dev/null @@ -1,203 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - 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. - diff --git a/vendor/github.com/apache/camel-k/pkg/client/camel/LICENSE b/third_party/VENDOR-LICENSE/sigs.k8s.io/structured-merge-diff/v3/value/LICENSE similarity index 99% rename from vendor/github.com/apache/camel-k/pkg/client/camel/LICENSE rename to third_party/VENDOR-LICENSE/sigs.k8s.io/structured-merge-diff/v3/value/LICENSE index 6b0b1270ff..8dada3edaf 100644 --- a/vendor/github.com/apache/camel-k/pkg/client/camel/LICENSE +++ b/third_party/VENDOR-LICENSE/sigs.k8s.io/structured-merge-diff/v3/value/LICENSE @@ -1,4 +1,3 @@ - Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ @@ -179,7 +178,7 @@ APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" + boilerplate notice, with the fields enclosed by brackets "{}" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a @@ -187,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright [yyyy] [name of copyright owner] + Copyright {yyyy} {name of copyright owner} Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -200,4 +199,3 @@ 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. - diff --git a/vendor/github.com/apache/camel-k/pkg/apis/camel/LICENSE b/vendor/github.com/apache/camel-k/pkg/apis/camel/LICENSE deleted file mode 100644 index 6b0b1270ff..0000000000 --- a/vendor/github.com/apache/camel-k/pkg/apis/camel/LICENSE +++ /dev/null @@ -1,203 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - 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. - diff --git a/vendor/github.com/apache/camel-k/pkg/apis/camel/v1/build_types.go b/vendor/github.com/apache/camel-k/pkg/apis/camel/v1/build_types.go deleted file mode 100644 index 0ca018c9b9..0000000000 --- a/vendor/github.com/apache/camel-k/pkg/apis/camel/v1/build_types.go +++ /dev/null @@ -1,183 +0,0 @@ -/* -Licensed to the Apache Software Foundation (ASF) under one or more -contributor license agreements. See the NOTICE file distributed with -this work for additional information regarding copyright ownership. -The ASF licenses this file to You 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. -*/ - -package v1 - -import ( - corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN! -// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized. - -// BuildSpec defines the desired state of Build -type BuildSpec struct { - // INSERT ADDITIONAL SPEC FIELDS - desired state of cluster - // Important: Run "operator-sdk generate k8s" to regenerate code after modifying this file - Tasks []Task `json:"tasks,omitempty"` -} - -// Task -- -type Task struct { - Builder *BuilderTask `json:"builder,omitempty"` - Image *ImageTask `json:"image,omitempty"` -} - -// BaseTask -- -type BaseTask struct { - Name string `json:"name,omitempty"` - Affinity *corev1.Affinity `json:"affinity,omitempty"` - Volumes []corev1.Volume `json:"volumes,omitempty"` - VolumeMounts []corev1.VolumeMount `json:"volumeMounts,omitempty"` -} - -// ContainerTask -- -type ContainerTask struct { - BaseTask `json:",inline"` - Image string `json:"image,omitempty"` - Command []string `json:"command,omitempty"` - Args []string `json:"args,omitempty"` - Env []corev1.EnvVar `json:"env,omitempty"` - WorkingDir string `json:"workingDir,omitempty"` - SecurityContext *corev1.SecurityContext `json:"securityContext,omitempty"` -} - -// ImageTask -- -type ImageTask struct { - ContainerTask `json:",inline"` - BuiltImage string `json:"builtImage,omitempty"` -} - -// BuilderTask -- -type BuilderTask struct { - BaseTask `json:",inline"` - // This is required until https://github.com/kubernetes-sigs/controller-tools/pull/395 gets merged - // +kubebuilder:pruning:PreserveUnknownFields - Meta metav1.ObjectMeta `json:"meta,omitempty"` - Image string `json:"image,omitempty"` - BaseImage string `json:"baseImage,omitempty"` - Runtime RuntimeSpec `json:"runtime,omitempty"` - Sources []SourceSpec `json:"sources,omitempty"` - Resources []ResourceSpec `json:"resources,omitempty"` - Dependencies []string `json:"dependencies,omitempty"` - Steps []string `json:"steps,omitempty"` - Maven MavenSpec `json:"maven,omitempty"` - BuildDir string `json:"buildDir,omitempty"` - Properties map[string]string `json:"properties,omitempty"` - Timeout metav1.Duration `json:"timeout,omitempty"` -} - -// BuildStatus defines the observed state of Build -type BuildStatus struct { - Phase BuildPhase `json:"phase,omitempty"` - Image string `json:"image,omitempty"` - Digest string `json:"digest,omitempty"` - BaseImage string `json:"baseImage,omitempty"` - Artifacts []Artifact `json:"artifacts,omitempty"` - Error string `json:"error,omitempty"` - Failure *Failure `json:"failure,omitempty"` - StartedAt *metav1.Time `json:"startedAt,omitempty"` - Platform string `json:"platform,omitempty"` - Conditions []BuildCondition `json:"conditions,omitempty"` - // Change to Duration / ISO 8601 when CRD uses OpenAPI spec v3 - // https://github.com/OAI/OpenAPI-Specification/issues/845 - Duration string `json:"duration,omitempty"` -} - -// BuildPhase -- -type BuildPhase string - -// BuildConditionType -- -type BuildConditionType string - -const ( - // BuildKind -- - BuildKind string = "Build" - - // BuildPhaseNone -- - BuildPhaseNone BuildPhase = "" - // BuildPhaseInitialization -- - BuildPhaseInitialization BuildPhase = "Initialization" - // BuildPhaseWaitingForPlatform -- - BuildPhaseWaitingForPlatform BuildPhase = "Waiting For Platform" - // BuildPhaseScheduling -- - BuildPhaseScheduling BuildPhase = "Scheduling" - // BuildPhasePending -- - BuildPhasePending BuildPhase = "Pending" - // BuildPhaseRunning -- - BuildPhaseRunning BuildPhase = "Running" - // BuildPhaseSucceeded -- - BuildPhaseSucceeded BuildPhase = "Succeeded" - // BuildPhaseFailed -- - BuildPhaseFailed BuildPhase = "Failed" - // BuildPhaseInterrupted -- - BuildPhaseInterrupted = "Interrupted" - // BuildPhaseError -- - BuildPhaseError BuildPhase = "Error" - - // BuildConditionPlatformAvailable -- - BuildConditionPlatformAvailable BuildConditionType = "IntegrationPlatformAvailable" - // BuildConditionPlatformAvailableReason -- - BuildConditionPlatformAvailableReason string = "IntegrationPlatformAvailable" -) - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +k8s:openapi-gen=true -// +genclient -// +kubebuilder:resource:path=builds,scope=Namespaced,shortName=ikb,categories=kamel;camel -// +kubebuilder:subresource:status -// +kubebuilder:printcolumn:name="Phase",type=string,JSONPath=`.status.phase`,description="The build phase" -// +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp`,description="The time at which the build was created" -// +kubebuilder:printcolumn:name="Started",type=date,JSONPath=`.status.startedAt`,description="The time at which the build was last (re-)started" -// Change format to 'duration' when CRD uses OpenAPI spec v3 (https://github.com/OAI/OpenAPI-Specification/issues/845) -// +kubebuilder:printcolumn:name="Duration",type=string,JSONPath=`.status.duration`,description="The build last execution duration" -// +kubebuilder:printcolumn:name="Attempts",type=integer,JSONPath=`.status.failure.recovery.attempt`,description="The number of execution attempts" - -// Build is the Schema for the builds API -type Build struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - Spec BuildSpec `json:"spec,omitempty"` - Status BuildStatus `json:"status,omitempty"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// BuildList contains a list of Build -type BuildList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []Build `json:"items"` -} - -// BuildCondition describes the state of a resource at a certain point. -type BuildCondition struct { - // Type of integration condition. - Type BuildConditionType `json:"type"` - // Status of the condition, one of True, False, Unknown. - Status corev1.ConditionStatus `json:"status"` - // The last time this condition was updated. - LastUpdateTime metav1.Time `json:"lastUpdateTime,omitempty"` - // Last time the condition transitioned from one status to another. - LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"` - // The reason for the condition's last transition. - Reason string `json:"reason,omitempty"` - // A human readable message indicating details about the transition. - Message string `json:"message,omitempty"` -} diff --git a/vendor/github.com/apache/camel-k/pkg/apis/camel/v1/build_types_support.go b/vendor/github.com/apache/camel-k/pkg/apis/camel/v1/build_types_support.go deleted file mode 100644 index 2c8243bdf7..0000000000 --- a/vendor/github.com/apache/camel-k/pkg/apis/camel/v1/build_types_support.go +++ /dev/null @@ -1,185 +0,0 @@ -/* -Licensed to the Apache Software Foundation (ASF) under one or more -contributor license agreements. See the NOTICE file distributed with -this work for additional information regarding copyright ownership. -The ASF licenses this file to You 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. -*/ - -package v1 - -import ( - corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// GetName -- -func (t *Task) GetName() string { - if t.Builder != nil { - return t.Builder.Name - } else if t.Image != nil { - return t.Image.Name - } - return "" -} - -// NewBuild -- -func NewBuild(namespace string, name string) Build { - return Build{ - TypeMeta: metav1.TypeMeta{ - APIVersion: SchemeGroupVersion.String(), - Kind: BuildKind, - }, - ObjectMeta: metav1.ObjectMeta{ - Namespace: namespace, - Name: name, - }, - } -} - -// NewBuildList -- -func NewBuildList() BuildList { - return BuildList{ - TypeMeta: metav1.TypeMeta{ - APIVersion: SchemeGroupVersion.String(), - Kind: BuildKind, - }, - } -} - -// SetIntegrationPlatform -- -func (in *Build) SetIntegrationPlatform(platform *IntegrationPlatform) { - cs := corev1.ConditionTrue - - if platform.Status.Phase != IntegrationPlatformPhaseReady { - cs = corev1.ConditionFalse - } - - in.Status.SetCondition(BuildConditionPlatformAvailable, cs, BuildConditionPlatformAvailableReason, platform.Name) - in.Status.Platform = platform.Name -} - -// GetCondition returns the condition with the provided type. -func (in *BuildStatus) GetCondition(condType BuildConditionType) *BuildCondition { - for i := range in.Conditions { - c := in.Conditions[i] - if c.Type == condType { - return &c - } - } - return nil -} - -// SetCondition -- -func (in *BuildStatus) SetCondition(condType BuildConditionType, status corev1.ConditionStatus, reason string, message string) { - in.SetConditions(BuildCondition{ - Type: condType, - Status: status, - LastUpdateTime: metav1.Now(), - LastTransitionTime: metav1.Now(), - Reason: reason, - Message: message, - }) -} - -// SetErrorCondition -- -func (in *BuildStatus) SetErrorCondition(condType BuildConditionType, reason string, err error) { - in.SetConditions(BuildCondition{ - Type: condType, - Status: corev1.ConditionFalse, - LastUpdateTime: metav1.Now(), - LastTransitionTime: metav1.Now(), - Reason: reason, - Message: err.Error(), - }) -} - -// SetConditions updates the resource to include the provided conditions. -// -// If a condition that we are about to add already exists and has the same status and -// reason then we are not going to update. -func (in *BuildStatus) SetConditions(conditions ...BuildCondition) { - for _, condition := range conditions { - if condition.LastUpdateTime.IsZero() { - condition.LastUpdateTime = metav1.Now() - } - if condition.LastTransitionTime.IsZero() { - condition.LastTransitionTime = metav1.Now() - } - - currentCond := in.GetCondition(condition.Type) - - if currentCond != nil && currentCond.Status == condition.Status && currentCond.Reason == condition.Reason { - return - } - // Do not update lastTransitionTime if the status of the condition doesn't change. - if currentCond != nil && currentCond.Status == condition.Status { - condition.LastTransitionTime = currentCond.LastTransitionTime - } - - in.RemoveCondition(condition.Type) - in.Conditions = append(in.Conditions, condition) - } -} - -// RemoveCondition removes the resource condition with the provided type. -func (in *BuildStatus) RemoveCondition(condType BuildConditionType) { - newConditions := in.Conditions[:0] - for _, c := range in.Conditions { - if c.Type != condType { - newConditions = append(newConditions, c) - } - } - - in.Conditions = newConditions -} - -var _ ResourceCondition = BuildCondition{} - -// GetConditions -- -func (in *BuildStatus) GetConditions() []ResourceCondition { - res := make([]ResourceCondition, 0, len(in.Conditions)) - for _, c := range in.Conditions { - res = append(res, c) - } - return res -} - -// GetType -- -func (c BuildCondition) GetType() string { - return string(c.Type) -} - -// GetStatus -- -func (c BuildCondition) GetStatus() corev1.ConditionStatus { - return c.Status -} - -// GetLastUpdateTime -- -func (c BuildCondition) GetLastUpdateTime() metav1.Time { - return c.LastUpdateTime -} - -// GetLastTransitionTime -- -func (c BuildCondition) GetLastTransitionTime() metav1.Time { - return c.LastTransitionTime -} - -// GetReason -- -func (c BuildCondition) GetReason() string { - return c.Reason -} - -// GetMessage -- -func (c BuildCondition) GetMessage() string { - return c.Message -} diff --git a/vendor/github.com/apache/camel-k/pkg/apis/camel/v1/camelcatalog_types.go b/vendor/github.com/apache/camel-k/pkg/apis/camel/v1/camelcatalog_types.go deleted file mode 100644 index 8c95dd5408..0000000000 --- a/vendor/github.com/apache/camel-k/pkg/apis/camel/v1/camelcatalog_types.go +++ /dev/null @@ -1,108 +0,0 @@ -/* -Licensed to the Apache Software Foundation (ASF) under one or more -contributor license agreements. See the NOTICE file distributed with -this work for additional information regarding copyright ownership. -The ASF licenses this file to You 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. -*/ - -package v1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// CamelScheme -- -type CamelScheme struct { - ID string `json:"id" yaml:"id"` - Passive bool `json:"passive" yaml:"passive"` - HTTP bool `json:"http" yaml:"http"` -} - -// CamelArtifactExclusion -- -type CamelArtifactExclusion struct { - GroupID string `json:"groupId" yaml:"groupId"` - ArtifactID string `json:"artifactId" yaml:"artifactId"` -} - -// CamelArtifactDependency represent a maven's dependency -type CamelArtifactDependency struct { - MavenArtifact `json:",inline" yaml:",inline"` - Exclusions []CamelArtifactExclusion `json:"exclusions,omitempty" yaml:"exclusions,omitempty"` -} - -// CamelArtifact -- -type CamelArtifact struct { - CamelArtifactDependency `json:",inline" yaml:",inline"` - Schemes []CamelScheme `json:"schemes,omitempty" yaml:"schemes,omitempty"` - Languages []string `json:"languages,omitempty" yaml:"languages,omitempty"` - DataFormats []string `json:"dataformats,omitempty" yaml:"dataformats,omitempty"` - Dependencies []CamelArtifactDependency `json:"dependencies,omitempty" yaml:"dependencies,omitempty"` - JavaTypes []string `json:"javaTypes,omitempty" yaml:"javaTypes,omitempty"` -} - -// CamelLoader -- -type CamelLoader struct { - MavenArtifact `json:",inline" yaml:",inline"` - Languages []string `json:"languages,omitempty" yaml:"languages,omitempty"` - Dependencies []MavenArtifact `json:"dependencies,omitempty" yaml:"dependencies,omitempty"` -} - -// CamelCatalogSpec defines the desired state of CamelCatalog -type CamelCatalogSpec struct { - Runtime RuntimeSpec `json:"runtime" yaml:"runtime"` - Artifacts map[string]CamelArtifact `json:"artifacts" yaml:"artifacts"` - Loaders map[string]CamelLoader `json:"loaders" yaml:"loaders"` -} - -// CamelCatalogStatus defines the observed state of CamelCatalog -type CamelCatalogStatus struct { -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +k8s:openapi-gen=true -// +genclient -// +kubebuilder:resource:path=camelcatalogs,scope=Namespaced,shortName=cc,categories=kamel;camel -// +kubebuilder:subresource:status -// +kubebuilder:printcolumn:name="Runtime Version",type=string,JSONPath=`.spec.runtime.version`,description="The Camel K Runtime version" -// +kubebuilder:printcolumn:name="Runtime Provider",type=string,JSONPath=`.spec.runtime.provider`,description="The Camel K Runtime provider" - -// CamelCatalog is the Schema for the camelcatalogs API -type CamelCatalog struct { - metav1.TypeMeta `json:",inline" yaml:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty" yaml:"metadata,omitempty"` - - Status CamelCatalogStatus `json:"status,omitempty" yaml:"status,omitempty"` - Spec CamelCatalogSpec `json:"spec,omitempty" yaml:"spec,omitempty"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// CamelCatalogList contains a list of CamelCatalog -type CamelCatalogList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []CamelCatalog `json:"items"` -} - -// RuntimeProvider -- -type RuntimeProvider string - -const ( - // CamelCatalogKind -- - CamelCatalogKind string = "CamelCatalog" - - // RuntimeProviderMain -- - RuntimeProviderMain RuntimeProvider = "main" - // RuntimeProviderQuarkus -- - RuntimeProviderQuarkus RuntimeProvider = "quarkus" -) diff --git a/vendor/github.com/apache/camel-k/pkg/apis/camel/v1/camelcatalog_types_support.go b/vendor/github.com/apache/camel-k/pkg/apis/camel/v1/camelcatalog_types_support.go deleted file mode 100644 index 83fcc68b6f..0000000000 --- a/vendor/github.com/apache/camel-k/pkg/apis/camel/v1/camelcatalog_types_support.go +++ /dev/null @@ -1,77 +0,0 @@ -/* -Licensed to the Apache Software Foundation (ASF) under one or more -contributor license agreements. See the NOTICE file distributed with -this work for additional information regarding copyright ownership. -The ASF licenses this file to You 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. -*/ - -package v1 - -import ( - "strings" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// NewCamelCatalog -- -func NewCamelCatalog(namespace string, name string) CamelCatalog { - return CamelCatalog{ - TypeMeta: metav1.TypeMeta{ - APIVersion: SchemeGroupVersion.String(), - Kind: CamelCatalogKind, - }, - ObjectMeta: metav1.ObjectMeta{ - Namespace: namespace, - Name: name, - }, - } -} - -// NewCamelCatalogWithSpecs -- -func NewCamelCatalogWithSpecs(namespace string, name string, spec CamelCatalogSpec) CamelCatalog { - return CamelCatalog{ - TypeMeta: metav1.TypeMeta{ - APIVersion: SchemeGroupVersion.String(), - Kind: CamelCatalogKind, - }, - ObjectMeta: metav1.ObjectMeta{ - Namespace: namespace, - Name: name, - }, - Spec: spec, - } -} - -// NewCamelCatalogList -- -func NewCamelCatalogList() CamelCatalogList { - return CamelCatalogList{ - TypeMeta: metav1.TypeMeta{ - APIVersion: SchemeGroupVersion.String(), - Kind: CamelCatalogKind, - }, - } -} - -// GetDependencyID returns a Camel K recognizable maven dependency for the artifact -func (in *CamelArtifact) GetDependencyID() string { - switch { - case in.GroupID == "org.apache.camel" && strings.HasPrefix(in.ArtifactID, "camel-"): - return "camel:" + in.ArtifactID[6:] - case in.GroupID == "org.apache.camel.quarkus" && strings.HasPrefix(in.ArtifactID, "camel-quarkus-"): - return "camel-quarkus:" + in.ArtifactID[14:] - case in.Version == "": - return "mvn:" + in.GroupID + ":" + in.ArtifactID - default: - return "mvn:" + in.GroupID + ":" + in.ArtifactID + ":" + in.Version - } -} diff --git a/vendor/github.com/apache/camel-k/pkg/apis/camel/v1/common_types.go b/vendor/github.com/apache/camel-k/pkg/apis/camel/v1/common_types.go deleted file mode 100644 index d7b9e353a5..0000000000 --- a/vendor/github.com/apache/camel-k/pkg/apis/camel/v1/common_types.go +++ /dev/null @@ -1,148 +0,0 @@ -/* -Licensed to the Apache Software Foundation (ASF) under one or more -contributor license agreements. See the NOTICE file distributed with -this work for additional information regarding copyright ownership. -The ASF licenses this file to You 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. -*/ - -package v1 - -import ( - "encoding/json" - - corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// ConfigurationSpec -- -type ConfigurationSpec struct { - Type string `json:"type"` - Value string `json:"value"` -} - -// Artifact -- -type Artifact struct { - ID string `json:"id" yaml:"id"` - Location string `json:"location,omitempty" yaml:"location,omitempty"` - Target string `json:"target,omitempty" yaml:"target,omitempty"` - Checksum string `json:"checksum,omitempty" yaml:"checksum,omitempty"` -} - -// Failure -- -type Failure struct { - Reason string `json:"reason"` - Time metav1.Time `json:"time"` - Recovery FailureRecovery `json:"recovery"` -} - -// FailureRecovery -- -type FailureRecovery struct { - Attempt int `json:"attempt"` - AttemptMax int `json:"attemptMax"` - // +optional - AttemptTime metav1.Time `json:"attemptTime"` -} - -// A TraitSpec contains the configuration of a trait -type TraitSpec struct { - Configuration TraitConfiguration `json:"configuration"` -} - -// +kubebuilder:validation:Type=object - -// TraitConfiguration -- -type TraitConfiguration struct { - json.RawMessage `json:",inline"` -} - -// Configurable -- -type Configurable interface { - Configurations() []ConfigurationSpec -} - -// PlatformInjectable -- -type PlatformInjectable interface { - SetIntegrationPlatform(platform *IntegrationPlatform) -} - -// MavenSpec -- -type MavenSpec struct { - LocalRepository string `json:"localRepository,omitempty"` - Settings ValueSource `json:"settings,omitempty"` - Timeout *metav1.Duration `json:"timeout,omitempty"` -} - -// ValueSource -- -type ValueSource struct { - // Selects a key of a ConfigMap. - ConfigMapKeyRef *corev1.ConfigMapKeySelector `json:"configMapKeyRef,omitempty"` - // Selects a key of a secret. - SecretKeyRef *corev1.SecretKeySelector `json:"secretKeyRef,omitempty"` -} - -// MavenArtifact -- -type MavenArtifact struct { - GroupID string `json:"groupId" yaml:"groupId"` - ArtifactID string `json:"artifactId" yaml:"artifactId"` - Version string `json:"version,omitempty" yaml:"version,omitempty"` -} - -// RuntimeSpec -- -type RuntimeSpec struct { - Version string `json:"version" yaml:"version"` - Provider RuntimeProvider `json:"provider" yaml:"provider"` - ApplicationClass string `json:"applicationClass" yaml:"applicationClass"` - Dependencies []MavenArtifact `json:"dependencies" yaml:"dependencies"` - Metadata map[string]string `json:"metadata,omitempty" yaml:"metadata,omitempty"` - Capabilities map[string]Capability `json:"capabilities,omitempty" yaml:"capabilities,omitempty"` -} - -// Capability -- -type Capability struct { - Dependencies []MavenArtifact `json:"dependencies" yaml:"dependencies"` - Metadata map[string]string `json:"metadata,omitempty" yaml:"metadata,omitempty"` -} - -const ( - // ServiceTypeUser -- - ServiceTypeUser = "user" - - // CapabilityRest -- - CapabilityRest = "rest" - // CapabilityHealth -- - CapabilityHealth = "health" - // CapabilityCron -- - CapabilityCron = "cron" - // CapabilityPlatformHTTP -- - CapabilityPlatformHTTP = "platform-http" - // CapabilityCircuitBreaker - CapabilityCircuitBreaker = "circuit-breaker" - // CapabilityTracing -- - CapabilityTracing = "tracing" -) - -// ResourceCondition is a common type for all conditions -type ResourceCondition interface { - GetType() string - GetStatus() corev1.ConditionStatus - GetLastUpdateTime() metav1.Time - GetLastTransitionTime() metav1.Time - GetReason() string - GetMessage() string -} - -// Flow is an unstructured object representing a Camel Flow in YAML/JSON DSL -// +kubebuilder:validation:Type=object -type Flow struct { - json.RawMessage `json:",inline"` -} diff --git a/vendor/github.com/apache/camel-k/pkg/apis/camel/v1/common_types_support.go b/vendor/github.com/apache/camel-k/pkg/apis/camel/v1/common_types_support.go deleted file mode 100644 index cf06cb863f..0000000000 --- a/vendor/github.com/apache/camel-k/pkg/apis/camel/v1/common_types_support.go +++ /dev/null @@ -1,41 +0,0 @@ -/* -Licensed to the Apache Software Foundation (ASF) under one or more -contributor license agreements. See the NOTICE file distributed with -this work for additional information regarding copyright ownership. -The ASF licenses this file to You 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. -*/ - -package v1 - -import ( - "fmt" -) - -func (in *Artifact) String() string { - return in.ID -} - -func (in *ConfigurationSpec) String() string { - return fmt.Sprintf("%s=%s", in.Type, in.Value) -} - -// CapabilityDependencies --- -func (in *RuntimeSpec) CapabilityDependencies(capability string) []MavenArtifact { - deps := make([]MavenArtifact, 0) - - if capability, ok := in.Capabilities[capability]; ok { - deps = append(deps, capability.Dependencies...) - } - - return deps -} diff --git a/vendor/github.com/apache/camel-k/pkg/apis/camel/v1/doc.go b/vendor/github.com/apache/camel-k/pkg/apis/camel/v1/doc.go deleted file mode 100644 index 452afb38eb..0000000000 --- a/vendor/github.com/apache/camel-k/pkg/apis/camel/v1/doc.go +++ /dev/null @@ -1,21 +0,0 @@ -/* -Licensed to the Apache Software Foundation (ASF) under one or more -contributor license agreements. See the NOTICE file distributed with -this work for additional information regarding copyright ownership. -The ASF licenses this file to You 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. -*/ - -// Package v1 contains API Schema definitions for the camel v1 API group -// +k8s:deepcopy-gen=package,register -// +groupName=camel.apache.org -package v1 diff --git a/vendor/github.com/apache/camel-k/pkg/apis/camel/v1/integration_types.go b/vendor/github.com/apache/camel-k/pkg/apis/camel/v1/integration_types.go deleted file mode 100644 index 1f473d5c22..0000000000 --- a/vendor/github.com/apache/camel-k/pkg/apis/camel/v1/integration_types.go +++ /dev/null @@ -1,270 +0,0 @@ -/* -Licensed to the Apache Software Foundation (ASF) under one or more -contributor license agreements. See the NOTICE file distributed with -this work for additional information regarding copyright ownership. -The ASF licenses this file to You 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. -*/ - -package v1 - -import ( - corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized. - -// IntegrationSpec defines the desired state of Integration -type IntegrationSpec struct { - Replicas *int32 `json:"replicas,omitempty"` - Sources []SourceSpec `json:"sources,omitempty"` - Flows []Flow `json:"flows,omitempty"` - Resources []ResourceSpec `json:"resources,omitempty"` - Kit string `json:"kit,omitempty"` - Dependencies []string `json:"dependencies,omitempty"` - Profile TraitProfile `json:"profile,omitempty"` - Traits map[string]TraitSpec `json:"traits,omitempty"` - Configuration []ConfigurationSpec `json:"configuration,omitempty"` - Repositories []string `json:"repositories,omitempty"` - ServiceAccountName string `json:"serviceAccountName,omitempty"` -} - -// IntegrationStatus defines the observed state of Integration -type IntegrationStatus struct { - Phase IntegrationPhase `json:"phase,omitempty"` - Digest string `json:"digest,omitempty"` - Image string `json:"image,omitempty"` - Dependencies []string `json:"dependencies,omitempty"` - Profile TraitProfile `json:"profile,omitempty"` - Kit string `json:"kit,omitempty"` - Platform string `json:"platform,omitempty"` - GeneratedSources []SourceSpec `json:"generatedSources,omitempty"` - GeneratedResources []ResourceSpec `json:"generatedResources,omitempty"` - Failure *Failure `json:"failure,omitempty"` - RuntimeVersion string `json:"runtimeVersion,omitempty"` - RuntimeProvider RuntimeProvider `json:"runtimeProvider,omitempty"` - Configuration []ConfigurationSpec `json:"configuration,omitempty"` - Conditions []IntegrationCondition `json:"conditions,omitempty"` - Version string `json:"version,omitempty"` - Replicas *int32 `json:"replicas,omitempty"` - Selector string `json:"selector,omitempty"` - Capabilities []string `json:"capabilities,omitempty"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +k8s:openapi-gen=true -// +genclient -// +kubebuilder:resource:path=integrations,scope=Namespaced,shortName=it,categories=kamel;camel -// +kubebuilder:subresource:status -// +kubebuilder:subresource:scale:specpath=.spec.replicas,statuspath=.status.replicas,selectorpath=.status.selector -// +kubebuilder:printcolumn:name="Phase",type=string,JSONPath=`.status.phase`,description="The integration phase" -// +kubebuilder:printcolumn:name="Kit",type=string,JSONPath=`.status.kit`,description="The integration kit" -// +kubebuilder:printcolumn:name="Replicas",type=integer,JSONPath=`.status.replicas`,description="The number of pods" - -// Integration is the Schema for the integrations API -type Integration struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - Spec IntegrationSpec `json:"spec,omitempty"` - Status IntegrationStatus `json:"status,omitempty"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// IntegrationList contains a list of Integration -type IntegrationList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []Integration `json:"items"` -} - -// DataSpec -- -type DataSpec struct { - Name string `json:"name,omitempty"` - Content string `json:"content,omitempty"` - ContentRef string `json:"contentRef,omitempty"` - ContentKey string `json:"contentKey,omitempty"` - Compression bool `json:"compression,omitempty"` -} - -// ResourceType -- -type ResourceType string - -// ResourceSpec -- -type ResourceSpec struct { - DataSpec `json:",inline"` - Type ResourceType `json:"type,omitempty"` - MountPath string `json:"mountPath,omitempty"` -} - -const ( - // ResourceTypeData -- - ResourceTypeData ResourceType = "data" - // ResourceTypeOpenAPI -- - ResourceTypeOpenAPI ResourceType = "openapi" -) - -// SourceSpec -- -type SourceSpec struct { - DataSpec `json:",inline"` - Language Language `json:"language,omitempty"` - // Loader is an optional id of the org.apache.camel.k.RoutesLoader that will - // interpret this source at runtime - Loader string `json:"loader,omitempty"` - // Interceptors are optional identifiers the org.apache.camel.k.RoutesLoader - // uses to pre/post process sources - Interceptors []string `json:"interceptors,omitempty"` -} - -// Language -- -type Language string - -const ( - // LanguageJavaSource -- - LanguageJavaSource Language = "java" - // LanguageGroovy -- - LanguageGroovy Language = "groovy" - // LanguageJavaScript -- - LanguageJavaScript Language = "js" - // LanguageXML -- - LanguageXML Language = "xml" - // LanguageKotlin -- - LanguageKotlin Language = "kts" - // LanguageYaml -- - LanguageYaml Language = "yaml" -) - -// Languages is the list of all supported languages -var Languages = []Language{ - LanguageJavaSource, - LanguageGroovy, - LanguageJavaScript, - LanguageXML, - LanguageKotlin, - LanguageYaml, -} - -// IntegrationPhase -- -type IntegrationPhase string - -// IntegrationConditionType -- -type IntegrationConditionType string - -const ( - // IntegrationKind -- - IntegrationKind string = "Integration" - - // IntegrationPhaseNone -- - IntegrationPhaseNone IntegrationPhase = "" - // IntegrationPhaseInitialization -- - IntegrationPhaseInitialization IntegrationPhase = "Initialization" - // IntegrationPhaseWaitingForPlatform -- - IntegrationPhaseWaitingForPlatform IntegrationPhase = "Waiting For Platform" - // IntegrationPhaseBuildingKit -- - IntegrationPhaseBuildingKit IntegrationPhase = "Building Kit" - // IntegrationPhaseResolvingKit -- - IntegrationPhaseResolvingKit IntegrationPhase = "Resolving Kit" - // IntegrationPhaseDeploying -- - IntegrationPhaseDeploying IntegrationPhase = "Deploying" - // IntegrationPhaseRunning -- - IntegrationPhaseRunning IntegrationPhase = "Running" - // IntegrationPhaseUpdating is a phase where the operator is not supposed to interact with the resource - IntegrationPhaseUpdating IntegrationPhase = "Updating" - // IntegrationPhaseError -- - IntegrationPhaseError IntegrationPhase = "Error" - - // IntegrationConditionKitAvailable -- - IntegrationConditionKitAvailable IntegrationConditionType = "IntegrationKitAvailable" - // IntegrationConditionPlatformAvailable -- - IntegrationConditionPlatformAvailable IntegrationConditionType = "IntegrationPlatformAvailable" - // IntegrationConditionDeploymentAvailable -- - IntegrationConditionDeploymentAvailable IntegrationConditionType = "DeploymentAvailable" - // IntegrationConditionServiceAvailable -- - IntegrationConditionServiceAvailable IntegrationConditionType = "ServiceAvailable" - // IntegrationConditionKnativeServiceAvailable -- - IntegrationConditionKnativeServiceAvailable IntegrationConditionType = "KnativeServiceAvailable" - // IntegrationConditionCronJobAvailable -- - IntegrationConditionCronJobAvailable IntegrationConditionType = "CronJobAvailable" - // IntegrationConditionExposureAvailable -- - IntegrationConditionExposureAvailable IntegrationConditionType = "ExposureAvailable" - // IntegrationConditionPrometheusAvailable -- - IntegrationConditionPrometheusAvailable IntegrationConditionType = "PrometheusAvailable" - // IntegrationConditionJolokiaAvailable -- - IntegrationConditionJolokiaAvailable IntegrationConditionType = "JolokiaAvailable" - // IntegrationConditionProbesAvailable -- - IntegrationConditionProbesAvailable IntegrationConditionType = "ProbesAvailable" - // IntegrationConditionReady -- - IntegrationConditionReady IntegrationConditionType = "Ready" - - // IntegrationConditionKitAvailableReason -- - IntegrationConditionKitAvailableReason string = "IntegrationKitAvailable" - // IntegrationConditionPlatformAvailableReason -- - IntegrationConditionPlatformAvailableReason string = "IntegrationPlatformAvailable" - // IntegrationConditionDeploymentAvailableReason -- - IntegrationConditionDeploymentAvailableReason string = "DeploymentAvailable" - // IntegrationConditionDeploymentNotAvailableReason -- - IntegrationConditionDeploymentNotAvailableReason string = "DeploymentNotAvailable" - // IntegrationConditionServiceAvailableReason -- - IntegrationConditionServiceAvailableReason string = "ServiceAvailable" - // IntegrationConditionServiceNotAvailableReason -- - IntegrationConditionServiceNotAvailableReason string = "ServiceNotAvailable" - // IntegrationConditionContainerNotAvailableReason -- - IntegrationConditionContainerNotAvailableReason string = "ContainerNotAvailable" - // IntegrationConditionRouteAvailableReason -- - IntegrationConditionRouteAvailableReason string = "RouteAvailable" - // IntegrationConditionRouteNotAvailableReason -- - IntegrationConditionRouteNotAvailableReason string = "RouteNotAvailable" - // IntegrationConditionIngressAvailableReason -- - IntegrationConditionIngressAvailableReason string = "IngressAvailable" - // IntegrationConditionIngressNotAvailableReason -- - IntegrationConditionIngressNotAvailableReason string = "IngressNotAvailable" - // IntegrationConditionKnativeServiceAvailableReason -- - IntegrationConditionKnativeServiceAvailableReason string = "KnativeServiceAvailable" - // IntegrationConditionKnativeServiceNotAvailableReason -- - IntegrationConditionKnativeServiceNotAvailableReason string = "KnativeServiceNotAvailable" - // IntegrationConditionCronJobAvailableReason -- - IntegrationConditionCronJobAvailableReason string = "CronJobAvailableReason" - // IntegrationConditionCronJobNotAvailableReason -- - IntegrationConditionCronJobNotAvailableReason string = "CronJobNotAvailableReason" - // IntegrationConditionPrometheusAvailableReason -- - IntegrationConditionPrometheusAvailableReason string = "PrometheusAvailable" - // IntegrationConditionJolokiaAvailableReason -- - IntegrationConditionJolokiaAvailableReason string = "JolokiaAvailable" - // IntegrationConditionProbesAvailableReason -- - IntegrationConditionProbesAvailableReason string = "ProbesAvailable" - // IntegrationConditionErrorReason -- - IntegrationConditionErrorReason string = "Error" - // IntegrationConditionCronJobCreatedReason -- - IntegrationConditionCronJobCreatedReason string = "CronJobCreated" - // IntegrationConditionReplicaSetReadyReason -- - IntegrationConditionReplicaSetReadyReason string = "ReplicaSetReady" - // IntegrationConditionReplicaSetNotReadyReason -- - IntegrationConditionReplicaSetNotReadyReason string = "ReplicaSetNotReady" -) - -// IntegrationCondition describes the state of a resource at a certain point. -type IntegrationCondition struct { - // Type of integration condition. - Type IntegrationConditionType `json:"type"` - // Status of the condition, one of True, False, Unknown. - Status corev1.ConditionStatus `json:"status"` - // The last time this condition was updated. - LastUpdateTime metav1.Time `json:"lastUpdateTime,omitempty"` - // Last time the condition transitioned from one status to another. - LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"` - // The reason for the condition's last transition. - Reason string `json:"reason,omitempty"` - // A human readable message indicating details about the transition. - Message string `json:"message,omitempty"` -} diff --git a/vendor/github.com/apache/camel-k/pkg/apis/camel/v1/integration_types_support.go b/vendor/github.com/apache/camel-k/pkg/apis/camel/v1/integration_types_support.go deleted file mode 100644 index dd848f0be3..0000000000 --- a/vendor/github.com/apache/camel-k/pkg/apis/camel/v1/integration_types_support.go +++ /dev/null @@ -1,369 +0,0 @@ -/* -Licensed to the Apache Software Foundation (ASF) under one or more -contributor license agreements. See the NOTICE file distributed with -this work for additional information regarding copyright ownership. -The ASF licenses this file to You 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. -*/ - -package v1 - -import ( - "fmt" - "strings" - - corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -const IntegrationLabel = "camel.apache.org/integration" - -// NewIntegration -- -func NewIntegration(namespace string, name string) Integration { - return Integration{ - TypeMeta: metav1.TypeMeta{ - APIVersion: SchemeGroupVersion.String(), - Kind: IntegrationKind, - }, - ObjectMeta: metav1.ObjectMeta{ - Namespace: namespace, - Name: name, - }, - } -} - -// NewIntegrationList -- -func NewIntegrationList() IntegrationList { - return IntegrationList{ - TypeMeta: metav1.TypeMeta{ - APIVersion: SchemeGroupVersion.String(), - Kind: IntegrationKind, - }, - } -} - -// Sources return a new slice containing all the sources associated to the integration -func (in *Integration) Sources() []SourceSpec { - sources := make([]SourceSpec, 0, len(in.Spec.Sources)+len(in.Status.GeneratedSources)) - sources = append(sources, in.Spec.Sources...) - sources = append(sources, in.Status.GeneratedSources...) - - return sources -} - -// Resources return a new slice containing all the resources associated to the integration -func (in *Integration) Resources() []ResourceSpec { - resources := make([]ResourceSpec, 0, len(in.Spec.Resources)+len(in.Status.GeneratedResources)) - resources = append(resources, in.Spec.Resources...) - resources = append(resources, in.Status.GeneratedResources...) - - return resources -} - -// AddSource -- -func (in *IntegrationSpec) AddSource(name string, content string, language Language) { - in.Sources = append(in.Sources, NewSourceSpec(name, content, language)) -} - -// AddSources -- -func (in *IntegrationSpec) AddSources(sources ...SourceSpec) { - in.Sources = append(in.Sources, sources...) -} - -// AddResources -- -func (in *IntegrationSpec) AddResources(resources ...ResourceSpec) { - in.Resources = append(in.Resources, resources...) -} - -// AddFlows -- -func (in *IntegrationSpec) AddFlows(flows ...Flow) { - in.Flows = append(in.Flows, flows...) -} - -// AddConfiguration -- -func (in *IntegrationSpec) AddConfiguration(confType string, confValue string) { - in.Configuration = append(in.Configuration, ConfigurationSpec{ - Type: confType, - Value: confValue, - }) -} - -// AddDependency -- -func (in *IntegrationSpec) AddDependency(dependency string) { - if in.Dependencies == nil { - in.Dependencies = make([]string, 0) - } - newDep := dependency - if strings.HasPrefix(newDep, "camel-quarkus") { - newDep = "camel-quarkus:" + strings.TrimPrefix(dependency, "camel-quarkus-") - } else if strings.HasPrefix(newDep, "camel-") { - newDep = "camel:" + strings.TrimPrefix(dependency, "camel-") - } - for _, d := range in.Dependencies { - if d == newDep { - return - } - } - in.Dependencies = append(in.Dependencies, newDep) -} - -// AddOrReplaceGeneratedResources -- -func (in *IntegrationStatus) AddOrReplaceGeneratedResources(resources ...ResourceSpec) { - newResources := make([]ResourceSpec, 0) - for _, resource := range resources { - replaced := false - for i, r := range in.GeneratedResources { - if r.Name == resource.Name { - in.GeneratedResources[i] = resource - replaced = true - break - } - } - if !replaced { - newResources = append(newResources, resource) - } - } - - in.GeneratedResources = append(in.GeneratedResources, newResources...) -} - -// AddOrReplaceGeneratedSources -- -func (in *IntegrationStatus) AddOrReplaceGeneratedSources(sources ...SourceSpec) { - newSources := make([]SourceSpec, 0) - for _, source := range sources { - replaced := false - for i, r := range in.GeneratedSources { - if r.Name == source.Name { - in.GeneratedSources[i] = source - replaced = true - break - } - } - if !replaced { - newSources = append(newSources, source) - } - } - - in.GeneratedSources = append(in.GeneratedSources, newSources...) -} - -// Configurations -- -func (in *IntegrationSpec) Configurations() []ConfigurationSpec { - if in == nil { - return []ConfigurationSpec{} - } - - return in.Configuration -} - -// Configurations -- -func (in *IntegrationStatus) Configurations() []ConfigurationSpec { - if in == nil { - return []ConfigurationSpec{} - } - - return in.Configuration -} - -// Configurations -- -func (in *Integration) Configurations() []ConfigurationSpec { - if in == nil { - return []ConfigurationSpec{} - } - - answer := make([]ConfigurationSpec, 0) - answer = append(answer, in.Status.Configuration...) - answer = append(answer, in.Spec.Configuration...) - - return answer -} - -// NewSourceSpec -- -func NewSourceSpec(name string, content string, language Language) SourceSpec { - return SourceSpec{ - DataSpec: DataSpec{ - Name: name, - Content: content, - }, - Language: language, - } -} - -// NewResourceSpec -- -func NewResourceSpec(name string, content string, destination string, resourceType ResourceType) ResourceSpec { - return ResourceSpec{ - DataSpec: DataSpec{ - Name: name, - Content: content, - }, - Type: resourceType, - } -} - -// InferLanguage returns the language of the source or discovers it from file extension if not set -func (in *SourceSpec) InferLanguage() Language { - if in.Language != "" { - return in.Language - } - for _, l := range Languages { - if strings.HasSuffix(in.Name, "."+string(l)) { - return l - } - } - return "" -} - -// SetIntegrationPlatform -- -func (in *Integration) SetIntegrationPlatform(platform *IntegrationPlatform) { - cs := corev1.ConditionTrue - - if platform.Status.Phase != IntegrationPlatformPhaseReady { - cs = corev1.ConditionFalse - } - - in.Status.SetCondition(IntegrationConditionPlatformAvailable, cs, IntegrationConditionPlatformAvailableReason, platform.Name) - in.Status.Platform = platform.Name -} - -// SetIntegrationKit -- -func (in *Integration) SetIntegrationKit(kit *IntegrationKit) { - cs := corev1.ConditionTrue - message := kit.Name - if kit.Status.Phase != IntegrationKitPhaseReady { - cs = corev1.ConditionFalse - if kit.Status.Phase == IntegrationKitPhaseNone { - message = fmt.Sprintf("creating a new integration kit") - } else { - message = fmt.Sprintf("integration kit %s is in state %q", kit.Name, kit.Status.Phase) - } - } - - in.Status.SetCondition(IntegrationConditionKitAvailable, cs, IntegrationConditionKitAvailableReason, message) - in.Status.Kit = kit.Name - in.Status.Image = kit.Status.Image -} - -// GetCondition returns the condition with the provided type. -func (in *IntegrationStatus) GetCondition(condType IntegrationConditionType) *IntegrationCondition { - for i := range in.Conditions { - c := in.Conditions[i] - if c.Type == condType { - return &c - } - } - return nil -} - -// SetCondition -- -func (in *IntegrationStatus) SetCondition(condType IntegrationConditionType, status corev1.ConditionStatus, reason string, message string) { - in.SetConditions(IntegrationCondition{ - Type: condType, - Status: status, - LastUpdateTime: metav1.Now(), - LastTransitionTime: metav1.Now(), - Reason: reason, - Message: message, - }) -} - -// SetErrorCondition -- -func (in *IntegrationStatus) SetErrorCondition(condType IntegrationConditionType, reason string, err error) { - in.SetConditions(IntegrationCondition{ - Type: condType, - Status: corev1.ConditionFalse, - LastUpdateTime: metav1.Now(), - LastTransitionTime: metav1.Now(), - Reason: reason, - Message: err.Error(), - }) -} - -// SetConditions updates the resource to include the provided conditions. -// -// If a condition that we are about to add already exists and has the same status and -// reason then we are not going to update. -func (in *IntegrationStatus) SetConditions(conditions ...IntegrationCondition) { - for _, condition := range conditions { - if condition.LastUpdateTime.IsZero() { - condition.LastUpdateTime = metav1.Now() - } - if condition.LastTransitionTime.IsZero() { - condition.LastTransitionTime = metav1.Now() - } - - currentCond := in.GetCondition(condition.Type) - - if currentCond != nil && currentCond.Status == condition.Status && currentCond.Reason == condition.Reason { - return - } - // Do not update lastTransitionTime if the status of the condition doesn't change. - if currentCond != nil && currentCond.Status == condition.Status { - condition.LastTransitionTime = currentCond.LastTransitionTime - } - - in.RemoveCondition(condition.Type) - in.Conditions = append(in.Conditions, condition) - } -} - -// RemoveCondition removes the resource condition with the provided type. -func (in *IntegrationStatus) RemoveCondition(condType IntegrationConditionType) { - newConditions := in.Conditions[:0] - for _, c := range in.Conditions { - if c.Type != condType { - newConditions = append(newConditions, c) - } - } - - in.Conditions = newConditions -} - -var _ ResourceCondition = IntegrationCondition{} - -// GetConditions -- -func (in *IntegrationStatus) GetConditions() []ResourceCondition { - res := make([]ResourceCondition, 0, len(in.Conditions)) - for _, c := range in.Conditions { - res = append(res, c) - } - return res -} - -// GetType -- -func (c IntegrationCondition) GetType() string { - return string(c.Type) -} - -// GetStatus -- -func (c IntegrationCondition) GetStatus() corev1.ConditionStatus { - return c.Status -} - -// GetLastUpdateTime -- -func (c IntegrationCondition) GetLastUpdateTime() metav1.Time { - return c.LastUpdateTime -} - -// GetLastTransitionTime -- -func (c IntegrationCondition) GetLastTransitionTime() metav1.Time { - return c.LastTransitionTime -} - -// GetReason -- -func (c IntegrationCondition) GetReason() string { - return c.Reason -} - -// GetMessage -- -func (c IntegrationCondition) GetMessage() string { - return c.Message -} diff --git a/vendor/github.com/apache/camel-k/pkg/apis/camel/v1/integrationkit_types.go b/vendor/github.com/apache/camel-k/pkg/apis/camel/v1/integrationkit_types.go deleted file mode 100644 index deead1a943..0000000000 --- a/vendor/github.com/apache/camel-k/pkg/apis/camel/v1/integrationkit_types.go +++ /dev/null @@ -1,133 +0,0 @@ -/* -Licensed to the Apache Software Foundation (ASF) under one or more -contributor license agreements. See the NOTICE file distributed with -this work for additional information regarding copyright ownership. -The ASF licenses this file to You 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. -*/ - -package v1 - -import ( - corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized. - -// IntegrationKitSpec defines the desired state of IntegrationKit -type IntegrationKitSpec struct { - Image string `json:"image,omitempty"` - Dependencies []string `json:"dependencies,omitempty"` - Profile TraitProfile `json:"profile,omitempty"` - Traits map[string]TraitSpec `json:"traits,omitempty"` - Configuration []ConfigurationSpec `json:"configuration,omitempty"` - Repositories []string `json:"repositories,omitempty"` -} - -// IntegrationKitStatus defines the observed state of IntegrationKit -type IntegrationKitStatus struct { - Phase IntegrationKitPhase `json:"phase,omitempty"` - BaseImage string `json:"baseImage,omitempty"` - Image string `json:"image,omitempty"` - Digest string `json:"digest,omitempty"` - Artifacts []Artifact `json:"artifacts,omitempty"` - Failure *Failure `json:"failure,omitempty"` - RuntimeVersion string `json:"runtimeVersion,omitempty"` - RuntimeProvider RuntimeProvider `json:"runtimeProvider,omitempty"` - Platform string `json:"platform,omitempty"` - Conditions []IntegrationKitCondition `json:"conditions,omitempty"` - Version string `json:"version,omitempty"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +k8s:openapi-gen=true -// +genclient -// +kubebuilder:resource:path=integrationkits,scope=Namespaced,shortName=ik,categories=kamel;camel -// +kubebuilder:subresource:status -// +kubebuilder:printcolumn:name="Phase",type=string,JSONPath=`.status.phase`,description="The integration kit phase" -// +kubebuilder:printcolumn:name="Type",type=string,JSONPath=`.metadata.labels.camel\.apache\.org\/kit\.type`,description="The integration kit type" -// +kubebuilder:printcolumn:name="Image",type=string,JSONPath=`.status.image`,description="The integration kit image" - -// IntegrationKit is the Schema for the integrationkits API -type IntegrationKit struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - Spec IntegrationKitSpec `json:"spec,omitempty"` - Status IntegrationKitStatus `json:"status,omitempty"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// IntegrationKitList contains a list of IntegrationKit -type IntegrationKitList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []IntegrationKit `json:"items"` -} - -// IntegrationKitPhase -- -type IntegrationKitPhase string - -// IntegrationKitConditionType -- -type IntegrationKitConditionType string - -const ( - // IntegrationKitKind -- - IntegrationKitKind string = "IntegrationKit" - - // IntegrationKitTypePlatform -- - IntegrationKitTypePlatform = "platform" - - // IntegrationKitTypeUser -- - IntegrationKitTypeUser = "user" - - // IntegrationKitTypeExternal -- - IntegrationKitTypeExternal = "external" - - // IntegrationKitPhaseNone -- - IntegrationKitPhaseNone IntegrationKitPhase = "" - // IntegrationKitPhaseInitialization -- - IntegrationKitPhaseInitialization IntegrationKitPhase = "Initialization" - // IntegrationKitPhaseWaitingForPlatform -- - IntegrationKitPhaseWaitingForPlatform IntegrationKitPhase = "Waiting For Platform" - // IntegrationKitPhaseBuildSubmitted -- - IntegrationKitPhaseBuildSubmitted IntegrationKitPhase = "Build Submitted" - // IntegrationKitPhaseBuildRunning -- - IntegrationKitPhaseBuildRunning IntegrationKitPhase = "Build Running" - // IntegrationKitPhaseReady -- - IntegrationKitPhaseReady IntegrationKitPhase = "Ready" - // IntegrationKitPhaseError -- - IntegrationKitPhaseError IntegrationKitPhase = "Error" - - // IntegrationKitConditionPlatformAvailable -- - IntegrationKitConditionPlatformAvailable IntegrationKitConditionType = "IntegrationPlatformAvailable" - // IntegrationKitConditionPlatformAvailableReason -- - IntegrationKitConditionPlatformAvailableReason string = "IntegrationPlatformAvailable" -) - -// IntegrationKitCondition describes the state of a resource at a certain point. -type IntegrationKitCondition struct { - // Type of integration condition. - Type IntegrationKitConditionType `json:"type"` - // Status of the condition, one of True, False, Unknown. - Status corev1.ConditionStatus `json:"status"` - // The last time this condition was updated. - LastUpdateTime metav1.Time `json:"lastUpdateTime,omitempty"` - // Last time the condition transitioned from one status to another. - LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"` - // The reason for the condition's last transition. - Reason string `json:"reason,omitempty"` - // A human readable message indicating details about the transition. - Message string `json:"message,omitempty"` -} diff --git a/vendor/github.com/apache/camel-k/pkg/apis/camel/v1/integrationkit_types_support.go b/vendor/github.com/apache/camel-k/pkg/apis/camel/v1/integrationkit_types_support.go deleted file mode 100644 index fb310df5b6..0000000000 --- a/vendor/github.com/apache/camel-k/pkg/apis/camel/v1/integrationkit_types_support.go +++ /dev/null @@ -1,198 +0,0 @@ -/* -Licensed to the Apache Software Foundation (ASF) under one or more -contributor license agreements. See the NOTICE file distributed with -this work for additional information regarding copyright ownership. -The ASF licenses this file to You 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. -*/ - -package v1 - -import ( - corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// NewIntegrationKit -- -func NewIntegrationKit(namespace string, name string) IntegrationKit { - return IntegrationKit{ - TypeMeta: metav1.TypeMeta{ - APIVersion: SchemeGroupVersion.String(), - Kind: IntegrationKitKind, - }, - ObjectMeta: metav1.ObjectMeta{ - Namespace: namespace, - Name: name, - }, - } -} - -// NewIntegrationKitList -- -func NewIntegrationKitList() IntegrationKitList { - return IntegrationKitList{ - TypeMeta: metav1.TypeMeta{ - APIVersion: SchemeGroupVersion.String(), - Kind: IntegrationKitKind, - }, - } -} - -// Configurations -- -func (in *IntegrationKitSpec) Configurations() []ConfigurationSpec { - if in == nil { - return []ConfigurationSpec{} - } - - return in.Configuration -} - -// Configurations -- -func (in *IntegrationKit) Configurations() []ConfigurationSpec { - if in == nil { - return []ConfigurationSpec{} - } - - return in.Spec.Configuration -} - -// SetIntegrationPlatform -- -func (in *IntegrationKit) SetIntegrationPlatform(platform *IntegrationPlatform) { - cs := corev1.ConditionTrue - - if platform.Status.Phase != IntegrationPlatformPhaseReady { - cs = corev1.ConditionFalse - } - - var message string - if platform.Name != "" { - message = "IntegrationPlatform (" + platform.Name + ")" - } - - in.Status.SetCondition(IntegrationKitConditionPlatformAvailable, cs, IntegrationKitConditionPlatformAvailableReason, message) - in.Status.Platform = platform.Name -} - -// GetCondition returns the condition with the provided type. -func (in *IntegrationKitStatus) GetCondition(condType IntegrationKitConditionType) *IntegrationKitCondition { - for i := range in.Conditions { - c := in.Conditions[i] - if c.Type == condType { - return &c - } - } - return nil -} - -// SetCondition -- -func (in *IntegrationKitStatus) SetCondition(condType IntegrationKitConditionType, status corev1.ConditionStatus, reason string, message string) { - in.SetConditions(IntegrationKitCondition{ - Type: condType, - Status: status, - LastUpdateTime: metav1.Now(), - LastTransitionTime: metav1.Now(), - Reason: reason, - Message: message, - }) -} - -// SetErrorCondition -- -func (in *IntegrationKitStatus) SetErrorCondition(condType IntegrationKitConditionType, reason string, err error) { - in.SetConditions(IntegrationKitCondition{ - Type: condType, - Status: corev1.ConditionFalse, - LastUpdateTime: metav1.Now(), - LastTransitionTime: metav1.Now(), - Reason: reason, - Message: err.Error(), - }) -} - -// SetConditions updates the resource to include the provided conditions. -// -// If a condition that we are about to add already exists and has the same status and -// reason then we are not going to update. -func (in *IntegrationKitStatus) SetConditions(conditions ...IntegrationKitCondition) { - for _, condition := range conditions { - if condition.LastUpdateTime.IsZero() { - condition.LastUpdateTime = metav1.Now() - } - if condition.LastTransitionTime.IsZero() { - condition.LastTransitionTime = metav1.Now() - } - - currentCond := in.GetCondition(condition.Type) - - if currentCond != nil && currentCond.Status == condition.Status && currentCond.Reason == condition.Reason { - return - } - // Do not update lastTransitionTime if the status of the condition doesn't change. - if currentCond != nil && currentCond.Status == condition.Status { - condition.LastTransitionTime = currentCond.LastTransitionTime - } - - in.RemoveCondition(condition.Type) - in.Conditions = append(in.Conditions, condition) - } -} - -// RemoveCondition removes the resource condition with the provided type. -func (in *IntegrationKitStatus) RemoveCondition(condType IntegrationKitConditionType) { - newConditions := in.Conditions[:0] - for _, c := range in.Conditions { - if c.Type != condType { - newConditions = append(newConditions, c) - } - } - - in.Conditions = newConditions -} - -var _ ResourceCondition = IntegrationKitCondition{} - -// GetConditions -- -func (in *IntegrationKitStatus) GetConditions() []ResourceCondition { - res := make([]ResourceCondition, 0, len(in.Conditions)) - for _, c := range in.Conditions { - res = append(res, c) - } - return res -} - -// GetType -- -func (c IntegrationKitCondition) GetType() string { - return string(c.Type) -} - -// GetStatus -- -func (c IntegrationKitCondition) GetStatus() corev1.ConditionStatus { - return c.Status -} - -// GetLastUpdateTime -- -func (c IntegrationKitCondition) GetLastUpdateTime() metav1.Time { - return c.LastUpdateTime -} - -// GetLastTransitionTime -- -func (c IntegrationKitCondition) GetLastTransitionTime() metav1.Time { - return c.LastTransitionTime -} - -// GetReason -- -func (c IntegrationKitCondition) GetReason() string { - return c.Reason -} - -// GetMessage -- -func (c IntegrationKitCondition) GetMessage() string { - return c.Message -} diff --git a/vendor/github.com/apache/camel-k/pkg/apis/camel/v1/integrationplatform_types.go b/vendor/github.com/apache/camel-k/pkg/apis/camel/v1/integrationplatform_types.go deleted file mode 100644 index 6f39073e44..0000000000 --- a/vendor/github.com/apache/camel-k/pkg/apis/camel/v1/integrationplatform_types.go +++ /dev/null @@ -1,207 +0,0 @@ -/* -Licensed to the Apache Software Foundation (ASF) under one or more -contributor license agreements. See the NOTICE file distributed with -this work for additional information regarding copyright ownership. -The ASF licenses this file to You 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. -*/ - -package v1 - -import ( - corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized. - -// IntegrationPlatformSpec defines the desired state of IntegrationPlatform -type IntegrationPlatformSpec struct { - Cluster IntegrationPlatformCluster `json:"cluster,omitempty"` - Profile TraitProfile `json:"profile,omitempty"` - Build IntegrationPlatformBuildSpec `json:"build,omitempty"` - Resources IntegrationPlatformResourcesSpec `json:"resources,omitempty"` - Traits map[string]TraitSpec `json:"traits,omitempty"` - Configuration []ConfigurationSpec `json:"configuration,omitempty"` -} - -// IntegrationPlatformResourcesSpec contains platform related resources -type IntegrationPlatformResourcesSpec struct { - Kits []string `json:"kits,omitempty"` -} - -// IntegrationPlatformStatus defines the observed state of IntegrationPlatform -type IntegrationPlatformStatus struct { - IntegrationPlatformSpec `json:",inline"` - - Phase IntegrationPlatformPhase `json:"phase,omitempty"` - Conditions []IntegrationPlatformCondition `json:"conditions,omitempty"` - Version string `json:"version,omitempty"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +k8s:openapi-gen=true -// +genclient -// +kubebuilder:resource:path=integrationplatforms,scope=Namespaced,shortName=ip,categories=kamel;camel -// +kubebuilder:subresource:status -// +kubebuilder:printcolumn:name="Phase",type=string,JSONPath=`.status.phase`,description="The integration platform phase" - -// IntegrationPlatform is the Schema for the integrationplatforms API -type IntegrationPlatform struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - Spec IntegrationPlatformSpec `json:"spec,omitempty"` - Status IntegrationPlatformStatus `json:"status,omitempty"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// IntegrationPlatformList contains a list of IntegrationPlatform -type IntegrationPlatformList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []IntegrationPlatform `json:"items"` -} - -// IntegrationPlatformCluster is the kind of orchestration cluster the platform is installed into -type IntegrationPlatformCluster string - -const ( - // IntegrationPlatformClusterOpenShift is used when targeting a OpenShift cluster - IntegrationPlatformClusterOpenShift IntegrationPlatformCluster = "OpenShift" - // IntegrationPlatformClusterKubernetes is used when targeting a Kubernetes cluster - IntegrationPlatformClusterKubernetes IntegrationPlatformCluster = "Kubernetes" -) - -// AllIntegrationPlatformClusters -- -var AllIntegrationPlatformClusters = []IntegrationPlatformCluster{IntegrationPlatformClusterOpenShift, IntegrationPlatformClusterKubernetes} - -// TraitProfile represents lists of traits that are enabled for the specific installation/integration -type TraitProfile string - -const ( - // TraitProfileOpenShift is used by default on OpenShift clusters - TraitProfileOpenShift TraitProfile = "OpenShift" - // TraitProfileKubernetes is used by default on Kubernetes clusters - TraitProfileKubernetes TraitProfile = "Kubernetes" - // TraitProfileKnative is used by default on OpenShift/Kubernetes clusters powered by Knative - TraitProfileKnative TraitProfile = "Knative" - // DefaultTraitProfile is the trait profile used as default when no other profile is set - DefaultTraitProfile = TraitProfileKubernetes -) - -// AllTraitProfiles contains all allowed profiles -var AllTraitProfiles = []TraitProfile{TraitProfileKubernetes, TraitProfileKnative, TraitProfileOpenShift} - -// IntegrationPlatformBuildSpec contains platform related build information -type IntegrationPlatformBuildSpec struct { - BuildStrategy IntegrationPlatformBuildStrategy `json:"buildStrategy,omitempty"` - PublishStrategy IntegrationPlatformBuildPublishStrategy `json:"publishStrategy,omitempty"` - RuntimeVersion string `json:"runtimeVersion,omitempty"` - RuntimeProvider RuntimeProvider `json:"runtimeProvider,omitempty"` - BaseImage string `json:"baseImage,omitempty"` - Properties map[string]string `json:"properties,omitempty"` - Registry IntegrationPlatformRegistrySpec `json:"registry,omitempty"` - Timeout *metav1.Duration `json:"timeout,omitempty"` - PersistentVolumeClaim string `json:"persistentVolumeClaim,omitempty"` - Maven MavenSpec `json:"maven,omitempty"` - HTTPProxySecret string `json:"httpProxySecret,omitempty"` - KanikoBuildCache *bool `json:"kanikoBuildCache,omitempty"` -} - -// IntegrationPlatformRegistrySpec -- -type IntegrationPlatformRegistrySpec struct { - Insecure bool `json:"insecure,omitempty"` - Address string `json:"address,omitempty"` - Secret string `json:"secret,omitempty"` - CA string `json:"ca,omitempty"` - Organization string `json:"organization,omitempty"` -} - -// IntegrationPlatformBuildStrategy enumerates all implemented build strategies -type IntegrationPlatformBuildStrategy string - -const ( - // IntegrationPlatformBuildStrategyRoutine performs the build in a routine - IntegrationPlatformBuildStrategyRoutine IntegrationPlatformBuildStrategy = "routine" - // IntegrationPlatformBuildStrategyPod performs the build in a pod - IntegrationPlatformBuildStrategyPod IntegrationPlatformBuildStrategy = "pod" -) - -// IntegrationPlatformBuildStrategies -- -var IntegrationPlatformBuildStrategies = []IntegrationPlatformBuildStrategy{ - IntegrationPlatformBuildStrategyRoutine, - IntegrationPlatformBuildStrategyPod, -} - -// IntegrationPlatformBuildPublishStrategy enumerates all implemented publish strategies -type IntegrationPlatformBuildPublishStrategy string - -const ( - // IntegrationPlatformBuildPublishStrategyBuildah -- - IntegrationPlatformBuildPublishStrategyBuildah IntegrationPlatformBuildPublishStrategy = "Buildah" - // IntegrationPlatformBuildPublishStrategyKaniko -- - IntegrationPlatformBuildPublishStrategyKaniko IntegrationPlatformBuildPublishStrategy = "Kaniko" - // IntegrationPlatformBuildPublishStrategyS2I -- - IntegrationPlatformBuildPublishStrategyS2I IntegrationPlatformBuildPublishStrategy = "S2I" - // IntegrationPlatformBuildPublishStrategySpectrum -- - IntegrationPlatformBuildPublishStrategySpectrum IntegrationPlatformBuildPublishStrategy = "Spectrum" -) - -// IntegrationPlatformBuildPublishStrategies -- -var IntegrationPlatformBuildPublishStrategies = []IntegrationPlatformBuildPublishStrategy{ - IntegrationPlatformBuildPublishStrategyBuildah, - IntegrationPlatformBuildPublishStrategyKaniko, - IntegrationPlatformBuildPublishStrategyS2I, - IntegrationPlatformBuildPublishStrategySpectrum, -} - -// IntegrationPlatformPhase -- -type IntegrationPlatformPhase string - -// IntegrationPlatformConditionType -- -type IntegrationPlatformConditionType string - -const ( - // IntegrationPlatformKind -- - IntegrationPlatformKind string = "IntegrationPlatform" - - // IntegrationPlatformPhaseNone -- - IntegrationPlatformPhaseNone IntegrationPlatformPhase = "" - // IntegrationPlatformPhaseCreating -- - IntegrationPlatformPhaseCreating IntegrationPlatformPhase = "Creating" - // IntegrationPlatformPhaseWarming -- - IntegrationPlatformPhaseWarming IntegrationPlatformPhase = "Warming" - // IntegrationPlatformPhaseReady -- - IntegrationPlatformPhaseReady IntegrationPlatformPhase = "Ready" - // IntegrationPlatformPhaseError -- - IntegrationPlatformPhaseError IntegrationPlatformPhase = "Error" - // IntegrationPlatformPhaseDuplicate -- - IntegrationPlatformPhaseDuplicate IntegrationPlatformPhase = "Duplicate" -) - -// IntegrationPlatformCondition describes the state of a resource at a certain point. -type IntegrationPlatformCondition struct { - // Type of integration condition. - Type IntegrationPlatformConditionType `json:"type"` - // Status of the condition, one of True, False, Unknown. - Status corev1.ConditionStatus `json:"status"` - // The last time this condition was updated. - LastUpdateTime metav1.Time `json:"lastUpdateTime,omitempty"` - // Last time the condition transitioned from one status to another. - LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"` - // The reason for the condition's last transition. - Reason string `json:"reason,omitempty"` - // A human readable message indicating details about the transition. - Message string `json:"message,omitempty"` -} diff --git a/vendor/github.com/apache/camel-k/pkg/apis/camel/v1/integrationplatform_types_support.go b/vendor/github.com/apache/camel-k/pkg/apis/camel/v1/integrationplatform_types_support.go deleted file mode 100644 index 23acc1ac8f..0000000000 --- a/vendor/github.com/apache/camel-k/pkg/apis/camel/v1/integrationplatform_types_support.go +++ /dev/null @@ -1,245 +0,0 @@ -/* -Licensed to the Apache Software Foundation (ASF) under one or more -contributor license agreements. See the NOTICE file distributed with -this work for additional information regarding copyright ownership. -The ASF licenses this file to You 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. -*/ - -package v1 - -import ( - "strings" - - corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// NewIntegrationPlatformList -- -func NewIntegrationPlatformList() IntegrationPlatformList { - return IntegrationPlatformList{ - TypeMeta: metav1.TypeMeta{ - APIVersion: SchemeGroupVersion.String(), - Kind: IntegrationPlatformKind, - }, - } -} - -// NewIntegrationPlatform -- -func NewIntegrationPlatform(namespace string, name string) IntegrationPlatform { - return IntegrationPlatform{ - TypeMeta: metav1.TypeMeta{ - APIVersion: SchemeGroupVersion.String(), - Kind: IntegrationPlatformKind, - }, - ObjectMeta: metav1.ObjectMeta{ - Namespace: namespace, - Name: name, - }, - } -} - -// TraitProfileByName returns the trait profile corresponding to the given name (case insensitive) -func TraitProfileByName(name string) TraitProfile { - for _, p := range AllTraitProfiles { - if strings.EqualFold(name, string(p)) { - return p - } - } - return "" -} - -// Configurations -- -func (in *IntegrationPlatformSpec) Configurations() []ConfigurationSpec { - if in == nil { - return []ConfigurationSpec{} - } - - return in.Configuration -} - -// Configurations -- -func (in *IntegrationPlatform) Configurations() []ConfigurationSpec { - if in == nil { - return []ConfigurationSpec{} - } - - if len(in.Status.Configuration) > 0 { - return in.Status.Configuration - } - - return in.Spec.Configuration -} - -// AddConfiguration -- -func (in *IntegrationPlatform) AddConfiguration(confType string, confValue string) { - in.Spec.Configuration = append(in.Spec.Configuration, ConfigurationSpec{ - Type: confType, - Value: confValue, - }) -} - -// GetActualValue can be used to extract information the platform spec or its derived config in the status -func (in *IntegrationPlatform) GetActualValue(extractor func(spec IntegrationPlatformSpec) string) string { - res := extractor(in.Status.IntegrationPlatformSpec) - if res == "" { - res = extractor(in.Spec) - } - return res -} - -// ResyncStatusFullConfig copies the spec configuration into the status field. -func (in *IntegrationPlatform) ResyncStatusFullConfig() { - cl := in.Spec.DeepCopy() - in.Status.IntegrationPlatformSpec = *cl -} - -// GetCondition returns the condition with the provided type. -func (in *IntegrationPlatformStatus) GetCondition(condType IntegrationPlatformConditionType) *IntegrationPlatformCondition { - for i := range in.Conditions { - c := in.Conditions[i] - if c.Type == condType { - return &c - } - } - return nil -} - -// SetCondition -- -func (in *IntegrationPlatformStatus) SetCondition(condType IntegrationPlatformConditionType, status corev1.ConditionStatus, reason string, message string) { - in.SetConditions(IntegrationPlatformCondition{ - Type: condType, - Status: status, - LastUpdateTime: metav1.Now(), - LastTransitionTime: metav1.Now(), - Reason: reason, - Message: message, - }) -} - -// SetErrorCondition -- -func (in *IntegrationPlatformStatus) SetErrorCondition(condType IntegrationPlatformConditionType, reason string, err error) { - in.SetConditions(IntegrationPlatformCondition{ - Type: condType, - Status: corev1.ConditionFalse, - LastUpdateTime: metav1.Now(), - LastTransitionTime: metav1.Now(), - Reason: reason, - Message: err.Error(), - }) -} - -// SetConditions updates the resource to include the provided conditions. -// -// If a condition that we are about to add already exists and has the same status and -// reason then we are not going to update. -func (in *IntegrationPlatformStatus) SetConditions(conditions ...IntegrationPlatformCondition) { - for _, condition := range conditions { - if condition.LastUpdateTime.IsZero() { - condition.LastUpdateTime = metav1.Now() - } - if condition.LastTransitionTime.IsZero() { - condition.LastTransitionTime = metav1.Now() - } - - currentCond := in.GetCondition(condition.Type) - - if currentCond != nil && currentCond.Status == condition.Status && currentCond.Reason == condition.Reason { - return - } - // Do not update lastTransitionTime if the status of the condition doesn't change. - if currentCond != nil && currentCond.Status == condition.Status { - condition.LastTransitionTime = currentCond.LastTransitionTime - } - - in.RemoveCondition(condition.Type) - in.Conditions = append(in.Conditions, condition) - } -} - -// RemoveCondition removes the resource condition with the provided type. -func (in *IntegrationPlatformStatus) RemoveCondition(condType IntegrationPlatformConditionType) { - newConditions := in.Conditions[:0] - for _, c := range in.Conditions { - if c.Type != condType { - newConditions = append(newConditions, c) - } - } - - in.Conditions = newConditions -} - -// IsKanikoCacheEnabled tells if the KanikoCache is enabled on the integration platform build spec -func (b IntegrationPlatformBuildSpec) IsKanikoCacheEnabled() bool { - if b.KanikoBuildCache == nil { - // Cache is disabled by default - return false - } - return *b.KanikoBuildCache -} - -// GetTimeout returns the specified duration or a default one -func (b IntegrationPlatformBuildSpec) GetTimeout() metav1.Duration { - if b.Timeout == nil { - return metav1.Duration{} - } - return *b.Timeout -} - -// GetTimeout returns the specified duration or a default one -func (m MavenSpec) GetTimeout() metav1.Duration { - if m.Timeout == nil { - return metav1.Duration{} - } - return *m.Timeout -} - -var _ ResourceCondition = IntegrationPlatformCondition{} - -// GetConditions -- -func (in *IntegrationPlatformStatus) GetConditions() []ResourceCondition { - res := make([]ResourceCondition, 0, len(in.Conditions)) - for _, c := range in.Conditions { - res = append(res, c) - } - return res -} - -// GetType -- -func (c IntegrationPlatformCondition) GetType() string { - return string(c.Type) -} - -// GetStatus -- -func (c IntegrationPlatformCondition) GetStatus() corev1.ConditionStatus { - return c.Status -} - -// GetLastUpdateTime -- -func (c IntegrationPlatformCondition) GetLastUpdateTime() metav1.Time { - return c.LastUpdateTime -} - -// GetLastTransitionTime -- -func (c IntegrationPlatformCondition) GetLastTransitionTime() metav1.Time { - return c.LastTransitionTime -} - -// GetReason -- -func (c IntegrationPlatformCondition) GetReason() string { - return c.Reason -} - -// GetMessage -- -func (c IntegrationPlatformCondition) GetMessage() string { - return c.Message -} diff --git a/vendor/github.com/apache/camel-k/pkg/apis/camel/v1/knative/types.go b/vendor/github.com/apache/camel-k/pkg/apis/camel/v1/knative/types.go deleted file mode 100644 index 430c2239a2..0000000000 --- a/vendor/github.com/apache/camel-k/pkg/apis/camel/v1/knative/types.go +++ /dev/null @@ -1,89 +0,0 @@ -/* -Licensed to the Apache Software Foundation (ASF) under one or more -contributor license agreements. See the NOTICE file distributed with -this work for additional information regarding copyright ownership. -The ASF licenses this file to You 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. -*/ - -package knative - -import "fmt" - -// CamelEnvironment is the top level configuration object expected by the Camel Knative component -type CamelEnvironment struct { - Services []CamelServiceDefinition `json:"services"` -} - -// NewCamelEnvironment creates a new env -func NewCamelEnvironment() CamelEnvironment { - return CamelEnvironment{ - Services: make([]CamelServiceDefinition, 0), - } -} - -// CamelServiceDefinition defines the parameters to connect to Knative service. It's also used for exposed services -type CamelServiceDefinition struct { - ServiceType CamelServiceType `json:"type"` - Name string `json:"name"` - Host string `json:"host,omitempty"` - Port *int `json:"port,omitempty"` - Metadata map[string]string `json:"metadata,omitempty"` -} - -// CamelEndpointKind -- -type CamelEndpointKind string - -const ( - // CamelEndpointKindSource is a service that can be used to consume events - CamelEndpointKindSource CamelEndpointKind = "source" - // CamelEndpointKindSink is a service that can be used to send events to - CamelEndpointKindSink CamelEndpointKind = "sink" -) - -// CamelServiceType -- -type CamelServiceType string - -const ( - // CamelServiceTypeEndpoint is a callable endpoint - CamelServiceTypeEndpoint CamelServiceType = "endpoint" - // CamelServiceTypeChannel is a callable endpoint that will be also associated to a subscription - CamelServiceTypeChannel CamelServiceType = "channel" - // CamelServiceTypeEvent is used when the target service is the Knative broker - CamelServiceTypeEvent CamelServiceType = "event" -) - -func (s CamelServiceType) ResourceDescription(subject string) string { - prefix := "" - if s == CamelServiceTypeEvent { - prefix = "broker for " - } - return fmt.Sprintf("%s%s %s", prefix, string(s), subject) -} - -// Meta Options -const ( - CamelMetaServicePath = "service.path" - CamelMetaServiceID = "service.id" - CamelMetaServiceName = "service.name" - CamelMetaServiceHost = "service.host" - CamelMetaServicePort = "service.port" - CamelMetaServiceZone = "service.zone" - - CamelMetaKnativeKind = "knative.kind" - CamelMetaKnativeAPIVersion = "knative.apiVersion" - CamelMetaKnativeReply = "knative.reply" - - CamelMetaEndpointKind = "camel.endpoint.kind" - - CamelMetaFilterPrefix = "filter." -) diff --git a/vendor/github.com/apache/camel-k/pkg/apis/camel/v1/knative/types_support.go b/vendor/github.com/apache/camel-k/pkg/apis/camel/v1/knative/types_support.go deleted file mode 100644 index 796b89d3b5..0000000000 --- a/vendor/github.com/apache/camel-k/pkg/apis/camel/v1/knative/types_support.go +++ /dev/null @@ -1,93 +0,0 @@ -/* -Licensed to the Apache Software Foundation (ASF) under one or more -contributor license agreements. See the NOTICE file distributed with -this work for additional information regarding copyright ownership. -The ASF licenses this file to You 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. -*/ - -package knative - -import ( - "encoding/json" - "net/url" - "strconv" -) - -// BuildCamelServiceDefinition creates a CamelServiceDefinition from a given URL -func BuildCamelServiceDefinition(name string, endpointKind CamelEndpointKind, serviceType CamelServiceType, - serviceURL url.URL, apiVersion, kind string) (CamelServiceDefinition, error) { - - port := 80 - - definition := CamelServiceDefinition{ - Name: name, - Host: serviceURL.Host, - Port: &port, - ServiceType: serviceType, - Metadata: map[string]string{ - CamelMetaEndpointKind: string(endpointKind), - CamelMetaKnativeAPIVersion: apiVersion, - CamelMetaKnativeKind: kind, - }, - } - portStr := serviceURL.Port() - if portStr != "" { - port, err := strconv.Atoi(portStr) - if err != nil { - return CamelServiceDefinition{}, err - } - definition.Port = &port - } - if serviceURL.Path != "" { - definition.Metadata[CamelMetaServicePath] = serviceURL.Path - } - - return definition, nil -} - -// Serialize serializes a CamelEnvironment -func (env *CamelEnvironment) Serialize() (string, error) { - res, err := json.Marshal(env) - if err != nil { - return "", err - } - return string(res), nil -} - -// Deserialize deserializes a camel environment into this struct -func (env *CamelEnvironment) Deserialize(str string) error { - if err := json.Unmarshal([]byte(str), env); err != nil { - return err - } - return nil -} - -// ContainsService tells if the environment contains a service with the given name and type -func (env *CamelEnvironment) ContainsService(name string, endpointKind CamelEndpointKind, serviceType CamelServiceType, apiVersion, kind string) bool { - return env.FindService(name, endpointKind, serviceType, apiVersion, kind) != nil -} - -// FindService -- -func (env *CamelEnvironment) FindService(name string, endpointKind CamelEndpointKind, serviceType CamelServiceType, apiVersion, kind string) *CamelServiceDefinition { - for _, svc := range env.Services { - svc := svc - if svc.Name == name && - svc.Metadata[CamelMetaEndpointKind] == string(endpointKind) && - svc.ServiceType == serviceType && - (apiVersion == "" || svc.Metadata[CamelMetaKnativeAPIVersion] == apiVersion) && - (kind == "" || svc.Metadata[CamelMetaKnativeKind] == kind) { - return &svc - } - } - return nil -} diff --git a/vendor/github.com/apache/camel-k/pkg/apis/camel/v1/register.go b/vendor/github.com/apache/camel-k/pkg/apis/camel/v1/register.go deleted file mode 100644 index d74c015858..0000000000 --- a/vendor/github.com/apache/camel-k/pkg/apis/camel/v1/register.go +++ /dev/null @@ -1,63 +0,0 @@ -/* -Licensed to the Apache Software Foundation (ASF) under one or more -contributor license agreements. See the NOTICE file distributed with -this work for additional information regarding copyright ownership. -The ASF licenses this file to You 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. -*/ - -// NOTE: Boilerplate only. Ignore this file. - -// Package v1 contains API Schema definitions for the camel v1 API group -// +k8s:deepcopy-gen=package,register -// +groupName=camel.apache.org -package v1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -var ( - // SchemeGroupVersion is group version used to register these objects - SchemeGroupVersion = schema.GroupVersion{Group: "camel.apache.org", Version: "v1"} - - // SchemeBuilder is used to add go types to the GroupVersionKind scheme - SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) - - // AddToScheme is a shortcut to SchemeBuilder.AddToScheme - AddToScheme = SchemeBuilder.AddToScheme -) - -// Resource takes an unqualified resource and returns a Group qualified GroupResource -func Resource(resource string) schema.GroupResource { - return SchemeGroupVersion.WithResource(resource).GroupResource() -} - -// Adds the list of known types to Scheme. -func addKnownTypes(scheme *runtime.Scheme) error { - scheme.AddKnownTypes(SchemeGroupVersion, - &Integration{}, - &IntegrationList{}, - &IntegrationKit{}, - &IntegrationKitList{}, - &IntegrationPlatform{}, - &IntegrationPlatformList{}, - &CamelCatalog{}, - &CamelCatalogList{}, - &Build{}, - &BuildList{}, - ) - metav1.AddToGroupVersion(scheme, SchemeGroupVersion) - return nil -} diff --git a/vendor/github.com/apache/camel-k/pkg/apis/camel/v1/zz_generated.deepcopy.go b/vendor/github.com/apache/camel-k/pkg/apis/camel/v1/zz_generated.deepcopy.go deleted file mode 100644 index d48aa415fa..0000000000 --- a/vendor/github.com/apache/camel-k/pkg/apis/camel/v1/zz_generated.deepcopy.go +++ /dev/null @@ -1,1416 +0,0 @@ -// +build !ignore_autogenerated - -// Code generated by operator-sdk. DO NOT EDIT. - -package v1 - -import ( - json "encoding/json" - - corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" -) - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Artifact) DeepCopyInto(out *Artifact) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Artifact. -func (in *Artifact) DeepCopy() *Artifact { - if in == nil { - return nil - } - out := new(Artifact) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *BaseTask) DeepCopyInto(out *BaseTask) { - *out = *in - if in.Affinity != nil { - in, out := &in.Affinity, &out.Affinity - *out = new(corev1.Affinity) - (*in).DeepCopyInto(*out) - } - if in.Volumes != nil { - in, out := &in.Volumes, &out.Volumes - *out = make([]corev1.Volume, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.VolumeMounts != nil { - in, out := &in.VolumeMounts, &out.VolumeMounts - *out = make([]corev1.VolumeMount, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BaseTask. -func (in *BaseTask) DeepCopy() *BaseTask { - if in == nil { - return nil - } - out := new(BaseTask) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Build) DeepCopyInto(out *Build) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Build. -func (in *Build) DeepCopy() *Build { - if in == nil { - return nil - } - out := new(Build) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *Build) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *BuildCondition) DeepCopyInto(out *BuildCondition) { - *out = *in - in.LastUpdateTime.DeepCopyInto(&out.LastUpdateTime) - in.LastTransitionTime.DeepCopyInto(&out.LastTransitionTime) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BuildCondition. -func (in *BuildCondition) DeepCopy() *BuildCondition { - if in == nil { - return nil - } - out := new(BuildCondition) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *BuildList) DeepCopyInto(out *BuildList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]Build, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BuildList. -func (in *BuildList) DeepCopy() *BuildList { - if in == nil { - return nil - } - out := new(BuildList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *BuildList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *BuildSpec) DeepCopyInto(out *BuildSpec) { - *out = *in - if in.Tasks != nil { - in, out := &in.Tasks, &out.Tasks - *out = make([]Task, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BuildSpec. -func (in *BuildSpec) DeepCopy() *BuildSpec { - if in == nil { - return nil - } - out := new(BuildSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *BuildStatus) DeepCopyInto(out *BuildStatus) { - *out = *in - if in.Artifacts != nil { - in, out := &in.Artifacts, &out.Artifacts - *out = make([]Artifact, len(*in)) - copy(*out, *in) - } - if in.Failure != nil { - in, out := &in.Failure, &out.Failure - *out = new(Failure) - (*in).DeepCopyInto(*out) - } - if in.StartedAt != nil { - in, out := &in.StartedAt, &out.StartedAt - *out = (*in).DeepCopy() - } - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]BuildCondition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BuildStatus. -func (in *BuildStatus) DeepCopy() *BuildStatus { - if in == nil { - return nil - } - out := new(BuildStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *BuilderTask) DeepCopyInto(out *BuilderTask) { - *out = *in - in.BaseTask.DeepCopyInto(&out.BaseTask) - in.Meta.DeepCopyInto(&out.Meta) - in.Runtime.DeepCopyInto(&out.Runtime) - if in.Sources != nil { - in, out := &in.Sources, &out.Sources - *out = make([]SourceSpec, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Resources != nil { - in, out := &in.Resources, &out.Resources - *out = make([]ResourceSpec, len(*in)) - copy(*out, *in) - } - if in.Dependencies != nil { - in, out := &in.Dependencies, &out.Dependencies - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Steps != nil { - in, out := &in.Steps, &out.Steps - *out = make([]string, len(*in)) - copy(*out, *in) - } - in.Maven.DeepCopyInto(&out.Maven) - if in.Properties != nil { - in, out := &in.Properties, &out.Properties - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - out.Timeout = in.Timeout - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BuilderTask. -func (in *BuilderTask) DeepCopy() *BuilderTask { - if in == nil { - return nil - } - out := new(BuilderTask) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CamelArtifact) DeepCopyInto(out *CamelArtifact) { - *out = *in - in.CamelArtifactDependency.DeepCopyInto(&out.CamelArtifactDependency) - if in.Schemes != nil { - in, out := &in.Schemes, &out.Schemes - *out = make([]CamelScheme, len(*in)) - copy(*out, *in) - } - if in.Languages != nil { - in, out := &in.Languages, &out.Languages - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.DataFormats != nil { - in, out := &in.DataFormats, &out.DataFormats - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Dependencies != nil { - in, out := &in.Dependencies, &out.Dependencies - *out = make([]CamelArtifactDependency, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.JavaTypes != nil { - in, out := &in.JavaTypes, &out.JavaTypes - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CamelArtifact. -func (in *CamelArtifact) DeepCopy() *CamelArtifact { - if in == nil { - return nil - } - out := new(CamelArtifact) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CamelArtifactDependency) DeepCopyInto(out *CamelArtifactDependency) { - *out = *in - out.MavenArtifact = in.MavenArtifact - if in.Exclusions != nil { - in, out := &in.Exclusions, &out.Exclusions - *out = make([]CamelArtifactExclusion, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CamelArtifactDependency. -func (in *CamelArtifactDependency) DeepCopy() *CamelArtifactDependency { - if in == nil { - return nil - } - out := new(CamelArtifactDependency) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CamelArtifactExclusion) DeepCopyInto(out *CamelArtifactExclusion) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CamelArtifactExclusion. -func (in *CamelArtifactExclusion) DeepCopy() *CamelArtifactExclusion { - if in == nil { - return nil - } - out := new(CamelArtifactExclusion) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CamelCatalog) DeepCopyInto(out *CamelCatalog) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - out.Status = in.Status - in.Spec.DeepCopyInto(&out.Spec) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CamelCatalog. -func (in *CamelCatalog) DeepCopy() *CamelCatalog { - if in == nil { - return nil - } - out := new(CamelCatalog) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *CamelCatalog) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CamelCatalogList) DeepCopyInto(out *CamelCatalogList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]CamelCatalog, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CamelCatalogList. -func (in *CamelCatalogList) DeepCopy() *CamelCatalogList { - if in == nil { - return nil - } - out := new(CamelCatalogList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *CamelCatalogList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CamelCatalogSpec) DeepCopyInto(out *CamelCatalogSpec) { - *out = *in - in.Runtime.DeepCopyInto(&out.Runtime) - if in.Artifacts != nil { - in, out := &in.Artifacts, &out.Artifacts - *out = make(map[string]CamelArtifact, len(*in)) - for key, val := range *in { - (*out)[key] = *val.DeepCopy() - } - } - if in.Loaders != nil { - in, out := &in.Loaders, &out.Loaders - *out = make(map[string]CamelLoader, len(*in)) - for key, val := range *in { - (*out)[key] = *val.DeepCopy() - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CamelCatalogSpec. -func (in *CamelCatalogSpec) DeepCopy() *CamelCatalogSpec { - if in == nil { - return nil - } - out := new(CamelCatalogSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CamelCatalogStatus) DeepCopyInto(out *CamelCatalogStatus) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CamelCatalogStatus. -func (in *CamelCatalogStatus) DeepCopy() *CamelCatalogStatus { - if in == nil { - return nil - } - out := new(CamelCatalogStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CamelLoader) DeepCopyInto(out *CamelLoader) { - *out = *in - out.MavenArtifact = in.MavenArtifact - if in.Languages != nil { - in, out := &in.Languages, &out.Languages - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Dependencies != nil { - in, out := &in.Dependencies, &out.Dependencies - *out = make([]MavenArtifact, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CamelLoader. -func (in *CamelLoader) DeepCopy() *CamelLoader { - if in == nil { - return nil - } - out := new(CamelLoader) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CamelScheme) DeepCopyInto(out *CamelScheme) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CamelScheme. -func (in *CamelScheme) DeepCopy() *CamelScheme { - if in == nil { - return nil - } - out := new(CamelScheme) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Capability) DeepCopyInto(out *Capability) { - *out = *in - if in.Dependencies != nil { - in, out := &in.Dependencies, &out.Dependencies - *out = make([]MavenArtifact, len(*in)) - copy(*out, *in) - } - if in.Metadata != nil { - in, out := &in.Metadata, &out.Metadata - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Capability. -func (in *Capability) DeepCopy() *Capability { - if in == nil { - return nil - } - out := new(Capability) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ConfigurationSpec) DeepCopyInto(out *ConfigurationSpec) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigurationSpec. -func (in *ConfigurationSpec) DeepCopy() *ConfigurationSpec { - if in == nil { - return nil - } - out := new(ConfigurationSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ContainerTask) DeepCopyInto(out *ContainerTask) { - *out = *in - in.BaseTask.DeepCopyInto(&out.BaseTask) - if in.Command != nil { - in, out := &in.Command, &out.Command - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Args != nil { - in, out := &in.Args, &out.Args - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Env != nil { - in, out := &in.Env, &out.Env - *out = make([]corev1.EnvVar, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.SecurityContext != nil { - in, out := &in.SecurityContext, &out.SecurityContext - *out = new(corev1.SecurityContext) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ContainerTask. -func (in *ContainerTask) DeepCopy() *ContainerTask { - if in == nil { - return nil - } - out := new(ContainerTask) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DataSpec) DeepCopyInto(out *DataSpec) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DataSpec. -func (in *DataSpec) DeepCopy() *DataSpec { - if in == nil { - return nil - } - out := new(DataSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Failure) DeepCopyInto(out *Failure) { - *out = *in - in.Time.DeepCopyInto(&out.Time) - in.Recovery.DeepCopyInto(&out.Recovery) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Failure. -func (in *Failure) DeepCopy() *Failure { - if in == nil { - return nil - } - out := new(Failure) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *FailureRecovery) DeepCopyInto(out *FailureRecovery) { - *out = *in - in.AttemptTime.DeepCopyInto(&out.AttemptTime) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FailureRecovery. -func (in *FailureRecovery) DeepCopy() *FailureRecovery { - if in == nil { - return nil - } - out := new(FailureRecovery) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Flow) DeepCopyInto(out *Flow) { - *out = *in - if in.RawMessage != nil { - in, out := &in.RawMessage, &out.RawMessage - *out = make(json.RawMessage, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Flow. -func (in *Flow) DeepCopy() *Flow { - if in == nil { - return nil - } - out := new(Flow) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ImageTask) DeepCopyInto(out *ImageTask) { - *out = *in - in.ContainerTask.DeepCopyInto(&out.ContainerTask) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageTask. -func (in *ImageTask) DeepCopy() *ImageTask { - if in == nil { - return nil - } - out := new(ImageTask) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Integration) DeepCopyInto(out *Integration) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Integration. -func (in *Integration) DeepCopy() *Integration { - if in == nil { - return nil - } - out := new(Integration) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *Integration) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *IntegrationCondition) DeepCopyInto(out *IntegrationCondition) { - *out = *in - in.LastUpdateTime.DeepCopyInto(&out.LastUpdateTime) - in.LastTransitionTime.DeepCopyInto(&out.LastTransitionTime) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IntegrationCondition. -func (in *IntegrationCondition) DeepCopy() *IntegrationCondition { - if in == nil { - return nil - } - out := new(IntegrationCondition) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *IntegrationKit) DeepCopyInto(out *IntegrationKit) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IntegrationKit. -func (in *IntegrationKit) DeepCopy() *IntegrationKit { - if in == nil { - return nil - } - out := new(IntegrationKit) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *IntegrationKit) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *IntegrationKitCondition) DeepCopyInto(out *IntegrationKitCondition) { - *out = *in - in.LastUpdateTime.DeepCopyInto(&out.LastUpdateTime) - in.LastTransitionTime.DeepCopyInto(&out.LastTransitionTime) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IntegrationKitCondition. -func (in *IntegrationKitCondition) DeepCopy() *IntegrationKitCondition { - if in == nil { - return nil - } - out := new(IntegrationKitCondition) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *IntegrationKitList) DeepCopyInto(out *IntegrationKitList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]IntegrationKit, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IntegrationKitList. -func (in *IntegrationKitList) DeepCopy() *IntegrationKitList { - if in == nil { - return nil - } - out := new(IntegrationKitList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *IntegrationKitList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *IntegrationKitSpec) DeepCopyInto(out *IntegrationKitSpec) { - *out = *in - if in.Dependencies != nil { - in, out := &in.Dependencies, &out.Dependencies - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Traits != nil { - in, out := &in.Traits, &out.Traits - *out = make(map[string]TraitSpec, len(*in)) - for key, val := range *in { - (*out)[key] = *val.DeepCopy() - } - } - if in.Configuration != nil { - in, out := &in.Configuration, &out.Configuration - *out = make([]ConfigurationSpec, len(*in)) - copy(*out, *in) - } - if in.Repositories != nil { - in, out := &in.Repositories, &out.Repositories - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IntegrationKitSpec. -func (in *IntegrationKitSpec) DeepCopy() *IntegrationKitSpec { - if in == nil { - return nil - } - out := new(IntegrationKitSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *IntegrationKitStatus) DeepCopyInto(out *IntegrationKitStatus) { - *out = *in - if in.Artifacts != nil { - in, out := &in.Artifacts, &out.Artifacts - *out = make([]Artifact, len(*in)) - copy(*out, *in) - } - if in.Failure != nil { - in, out := &in.Failure, &out.Failure - *out = new(Failure) - (*in).DeepCopyInto(*out) - } - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]IntegrationKitCondition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IntegrationKitStatus. -func (in *IntegrationKitStatus) DeepCopy() *IntegrationKitStatus { - if in == nil { - return nil - } - out := new(IntegrationKitStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *IntegrationList) DeepCopyInto(out *IntegrationList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]Integration, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IntegrationList. -func (in *IntegrationList) DeepCopy() *IntegrationList { - if in == nil { - return nil - } - out := new(IntegrationList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *IntegrationList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *IntegrationPlatform) DeepCopyInto(out *IntegrationPlatform) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IntegrationPlatform. -func (in *IntegrationPlatform) DeepCopy() *IntegrationPlatform { - if in == nil { - return nil - } - out := new(IntegrationPlatform) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *IntegrationPlatform) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *IntegrationPlatformBuildSpec) DeepCopyInto(out *IntegrationPlatformBuildSpec) { - *out = *in - if in.Properties != nil { - in, out := &in.Properties, &out.Properties - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - out.Registry = in.Registry - if in.Timeout != nil { - in, out := &in.Timeout, &out.Timeout - *out = new(metav1.Duration) - **out = **in - } - in.Maven.DeepCopyInto(&out.Maven) - if in.KanikoBuildCache != nil { - in, out := &in.KanikoBuildCache, &out.KanikoBuildCache - *out = new(bool) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IntegrationPlatformBuildSpec. -func (in *IntegrationPlatformBuildSpec) DeepCopy() *IntegrationPlatformBuildSpec { - if in == nil { - return nil - } - out := new(IntegrationPlatformBuildSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *IntegrationPlatformCondition) DeepCopyInto(out *IntegrationPlatformCondition) { - *out = *in - in.LastUpdateTime.DeepCopyInto(&out.LastUpdateTime) - in.LastTransitionTime.DeepCopyInto(&out.LastTransitionTime) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IntegrationPlatformCondition. -func (in *IntegrationPlatformCondition) DeepCopy() *IntegrationPlatformCondition { - if in == nil { - return nil - } - out := new(IntegrationPlatformCondition) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *IntegrationPlatformList) DeepCopyInto(out *IntegrationPlatformList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]IntegrationPlatform, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IntegrationPlatformList. -func (in *IntegrationPlatformList) DeepCopy() *IntegrationPlatformList { - if in == nil { - return nil - } - out := new(IntegrationPlatformList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *IntegrationPlatformList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *IntegrationPlatformRegistrySpec) DeepCopyInto(out *IntegrationPlatformRegistrySpec) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IntegrationPlatformRegistrySpec. -func (in *IntegrationPlatformRegistrySpec) DeepCopy() *IntegrationPlatformRegistrySpec { - if in == nil { - return nil - } - out := new(IntegrationPlatformRegistrySpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *IntegrationPlatformResourcesSpec) DeepCopyInto(out *IntegrationPlatformResourcesSpec) { - *out = *in - if in.Kits != nil { - in, out := &in.Kits, &out.Kits - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IntegrationPlatformResourcesSpec. -func (in *IntegrationPlatformResourcesSpec) DeepCopy() *IntegrationPlatformResourcesSpec { - if in == nil { - return nil - } - out := new(IntegrationPlatformResourcesSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *IntegrationPlatformSpec) DeepCopyInto(out *IntegrationPlatformSpec) { - *out = *in - in.Build.DeepCopyInto(&out.Build) - in.Resources.DeepCopyInto(&out.Resources) - if in.Traits != nil { - in, out := &in.Traits, &out.Traits - *out = make(map[string]TraitSpec, len(*in)) - for key, val := range *in { - (*out)[key] = *val.DeepCopy() - } - } - if in.Configuration != nil { - in, out := &in.Configuration, &out.Configuration - *out = make([]ConfigurationSpec, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IntegrationPlatformSpec. -func (in *IntegrationPlatformSpec) DeepCopy() *IntegrationPlatformSpec { - if in == nil { - return nil - } - out := new(IntegrationPlatformSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *IntegrationPlatformStatus) DeepCopyInto(out *IntegrationPlatformStatus) { - *out = *in - in.IntegrationPlatformSpec.DeepCopyInto(&out.IntegrationPlatformSpec) - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]IntegrationPlatformCondition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IntegrationPlatformStatus. -func (in *IntegrationPlatformStatus) DeepCopy() *IntegrationPlatformStatus { - if in == nil { - return nil - } - out := new(IntegrationPlatformStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *IntegrationSpec) DeepCopyInto(out *IntegrationSpec) { - *out = *in - if in.Replicas != nil { - in, out := &in.Replicas, &out.Replicas - *out = new(int32) - **out = **in - } - if in.Sources != nil { - in, out := &in.Sources, &out.Sources - *out = make([]SourceSpec, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Flows != nil { - in, out := &in.Flows, &out.Flows - *out = make([]Flow, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Resources != nil { - in, out := &in.Resources, &out.Resources - *out = make([]ResourceSpec, len(*in)) - copy(*out, *in) - } - if in.Dependencies != nil { - in, out := &in.Dependencies, &out.Dependencies - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Traits != nil { - in, out := &in.Traits, &out.Traits - *out = make(map[string]TraitSpec, len(*in)) - for key, val := range *in { - (*out)[key] = *val.DeepCopy() - } - } - if in.Configuration != nil { - in, out := &in.Configuration, &out.Configuration - *out = make([]ConfigurationSpec, len(*in)) - copy(*out, *in) - } - if in.Repositories != nil { - in, out := &in.Repositories, &out.Repositories - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IntegrationSpec. -func (in *IntegrationSpec) DeepCopy() *IntegrationSpec { - if in == nil { - return nil - } - out := new(IntegrationSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *IntegrationStatus) DeepCopyInto(out *IntegrationStatus) { - *out = *in - if in.Dependencies != nil { - in, out := &in.Dependencies, &out.Dependencies - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.GeneratedSources != nil { - in, out := &in.GeneratedSources, &out.GeneratedSources - *out = make([]SourceSpec, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.GeneratedResources != nil { - in, out := &in.GeneratedResources, &out.GeneratedResources - *out = make([]ResourceSpec, len(*in)) - copy(*out, *in) - } - if in.Failure != nil { - in, out := &in.Failure, &out.Failure - *out = new(Failure) - (*in).DeepCopyInto(*out) - } - if in.Configuration != nil { - in, out := &in.Configuration, &out.Configuration - *out = make([]ConfigurationSpec, len(*in)) - copy(*out, *in) - } - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]IntegrationCondition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Replicas != nil { - in, out := &in.Replicas, &out.Replicas - *out = new(int32) - **out = **in - } - if in.Capabilities != nil { - in, out := &in.Capabilities, &out.Capabilities - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IntegrationStatus. -func (in *IntegrationStatus) DeepCopy() *IntegrationStatus { - if in == nil { - return nil - } - out := new(IntegrationStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *MavenArtifact) DeepCopyInto(out *MavenArtifact) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MavenArtifact. -func (in *MavenArtifact) DeepCopy() *MavenArtifact { - if in == nil { - return nil - } - out := new(MavenArtifact) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *MavenSpec) DeepCopyInto(out *MavenSpec) { - *out = *in - in.Settings.DeepCopyInto(&out.Settings) - if in.Timeout != nil { - in, out := &in.Timeout, &out.Timeout - *out = new(metav1.Duration) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MavenSpec. -func (in *MavenSpec) DeepCopy() *MavenSpec { - if in == nil { - return nil - } - out := new(MavenSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ResourceSpec) DeepCopyInto(out *ResourceSpec) { - *out = *in - out.DataSpec = in.DataSpec - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceSpec. -func (in *ResourceSpec) DeepCopy() *ResourceSpec { - if in == nil { - return nil - } - out := new(ResourceSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RuntimeSpec) DeepCopyInto(out *RuntimeSpec) { - *out = *in - if in.Dependencies != nil { - in, out := &in.Dependencies, &out.Dependencies - *out = make([]MavenArtifact, len(*in)) - copy(*out, *in) - } - if in.Metadata != nil { - in, out := &in.Metadata, &out.Metadata - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.Capabilities != nil { - in, out := &in.Capabilities, &out.Capabilities - *out = make(map[string]Capability, len(*in)) - for key, val := range *in { - (*out)[key] = *val.DeepCopy() - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RuntimeSpec. -func (in *RuntimeSpec) DeepCopy() *RuntimeSpec { - if in == nil { - return nil - } - out := new(RuntimeSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SourceSpec) DeepCopyInto(out *SourceSpec) { - *out = *in - out.DataSpec = in.DataSpec - if in.Interceptors != nil { - in, out := &in.Interceptors, &out.Interceptors - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SourceSpec. -func (in *SourceSpec) DeepCopy() *SourceSpec { - if in == nil { - return nil - } - out := new(SourceSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Task) DeepCopyInto(out *Task) { - *out = *in - if in.Builder != nil { - in, out := &in.Builder, &out.Builder - *out = new(BuilderTask) - (*in).DeepCopyInto(*out) - } - if in.Image != nil { - in, out := &in.Image, &out.Image - *out = new(ImageTask) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Task. -func (in *Task) DeepCopy() *Task { - if in == nil { - return nil - } - out := new(Task) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *TraitConfiguration) DeepCopyInto(out *TraitConfiguration) { - *out = *in - if in.RawMessage != nil { - in, out := &in.RawMessage, &out.RawMessage - *out = make(json.RawMessage, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TraitConfiguration. -func (in *TraitConfiguration) DeepCopy() *TraitConfiguration { - if in == nil { - return nil - } - out := new(TraitConfiguration) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *TraitSpec) DeepCopyInto(out *TraitSpec) { - *out = *in - in.Configuration.DeepCopyInto(&out.Configuration) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TraitSpec. -func (in *TraitSpec) DeepCopy() *TraitSpec { - if in == nil { - return nil - } - out := new(TraitSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ValueSource) DeepCopyInto(out *ValueSource) { - *out = *in - if in.ConfigMapKeyRef != nil { - in, out := &in.ConfigMapKeyRef, &out.ConfigMapKeyRef - *out = new(corev1.ConfigMapKeySelector) - (*in).DeepCopyInto(*out) - } - if in.SecretKeyRef != nil { - in, out := &in.SecretKeyRef, &out.SecretKeyRef - *out = new(corev1.SecretKeySelector) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValueSource. -func (in *ValueSource) DeepCopy() *ValueSource { - if in == nil { - return nil - } - out := new(ValueSource) - in.DeepCopyInto(out) - return out -} diff --git a/vendor/github.com/apache/camel-k/pkg/apis/camel/v1/zz_generated.defaults.go b/vendor/github.com/apache/camel-k/pkg/apis/camel/v1/zz_generated.defaults.go deleted file mode 100644 index 0b0c84e4a0..0000000000 --- a/vendor/github.com/apache/camel-k/pkg/apis/camel/v1/zz_generated.defaults.go +++ /dev/null @@ -1,16 +0,0 @@ -// +build !ignore_autogenerated - -// Code generated by defaulter-gen. DO NOT EDIT. - -package v1 - -import ( - runtime "k8s.io/apimachinery/pkg/runtime" -) - -// RegisterDefaults adds defaulters functions to the given scheme. -// Public to allow building arbitrary schemes. -// All generated defaulters are covering - they call all nested defaulters. -func RegisterDefaults(scheme *runtime.Scheme) error { - return nil -} diff --git a/vendor/github.com/apache/camel-k/pkg/client/camel/clientset/versioned/clientset.go b/vendor/github.com/apache/camel-k/pkg/client/camel/clientset/versioned/clientset.go deleted file mode 100644 index 146e653273..0000000000 --- a/vendor/github.com/apache/camel-k/pkg/client/camel/clientset/versioned/clientset.go +++ /dev/null @@ -1,98 +0,0 @@ -/* -Licensed to the Apache Software Foundation (ASF) under one or more -contributor license agreements. See the NOTICE file distributed with -this work for additional information regarding copyright ownership. -The ASF licenses this file to You 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 ( - "fmt" - - camelv1 "github.com/apache/camel-k/pkg/client/camel/clientset/versioned/typed/camel/v1" - discovery "k8s.io/client-go/discovery" - rest "k8s.io/client-go/rest" - flowcontrol "k8s.io/client-go/util/flowcontrol" -) - -type Interface interface { - Discovery() discovery.DiscoveryInterface - CamelV1() camelv1.CamelV1Interface -} - -// Clientset contains the clients for groups. Each group has exactly one -// version included in a Clientset. -type Clientset struct { - *discovery.DiscoveryClient - camelV1 *camelv1.CamelV1Client -} - -// CamelV1 retrieves the CamelV1Client -func (c *Clientset) CamelV1() camelv1.CamelV1Interface { - return c.camelV1 -} - -// 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. -// If config's RateLimiter is not set and QPS and Burst are acceptable, -// NewForConfig will generate a rate-limiter in configShallowCopy. -func NewForConfig(c *rest.Config) (*Clientset, error) { - configShallowCopy := *c - if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 { - if configShallowCopy.Burst <= 0 { - return nil, fmt.Errorf("Burst is required to be greater than 0 when RateLimiter is not set and QPS is set to greater than 0") - } - configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst) - } - var cs Clientset - var err error - cs.camelV1, err = camelv1.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.camelV1 = camelv1.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.camelV1 = camelv1.New(c) - - cs.DiscoveryClient = discovery.NewDiscoveryClient(c) - return &cs -} diff --git a/vendor/github.com/apache/camel-k/pkg/client/camel/clientset/versioned/doc.go b/vendor/github.com/apache/camel-k/pkg/client/camel/clientset/versioned/doc.go deleted file mode 100644 index c82aadf085..0000000000 --- a/vendor/github.com/apache/camel-k/pkg/client/camel/clientset/versioned/doc.go +++ /dev/null @@ -1,21 +0,0 @@ -/* -Licensed to the Apache Software Foundation (ASF) under one or more -contributor license agreements. See the NOTICE file distributed with -this work for additional information regarding copyright ownership. -The ASF licenses this file to You 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 diff --git a/vendor/github.com/apache/camel-k/pkg/client/camel/clientset/versioned/fake/clientset_generated.go b/vendor/github.com/apache/camel-k/pkg/client/camel/clientset/versioned/fake/clientset_generated.go deleted file mode 100644 index 093a8d826b..0000000000 --- a/vendor/github.com/apache/camel-k/pkg/client/camel/clientset/versioned/fake/clientset_generated.go +++ /dev/null @@ -1,83 +0,0 @@ -/* -Licensed to the Apache Software Foundation (ASF) under one or more -contributor license agreements. See the NOTICE file distributed with -this work for additional information regarding copyright ownership. -The ASF licenses this file to You 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 ( - clientset "github.com/apache/camel-k/pkg/client/camel/clientset/versioned" - camelv1 "github.com/apache/camel-k/pkg/client/camel/clientset/versioned/typed/camel/v1" - fakecamelv1 "github.com/apache/camel-k/pkg/client/camel/clientset/versioned/typed/camel/v1/fake" - "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" -) - -// 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{} - -// CamelV1 retrieves the CamelV1Client -func (c *Clientset) CamelV1() camelv1.CamelV1Interface { - return &fakecamelv1.FakeCamelV1{Fake: &c.Fake} -} diff --git a/vendor/github.com/apache/camel-k/pkg/client/camel/clientset/versioned/fake/doc.go b/vendor/github.com/apache/camel-k/pkg/client/camel/clientset/versioned/fake/doc.go deleted file mode 100644 index 9c6a5fa07a..0000000000 --- a/vendor/github.com/apache/camel-k/pkg/client/camel/clientset/versioned/fake/doc.go +++ /dev/null @@ -1,21 +0,0 @@ -/* -Licensed to the Apache Software Foundation (ASF) under one or more -contributor license agreements. See the NOTICE file distributed with -this work for additional information regarding copyright ownership. -The ASF licenses this file to You 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 diff --git a/vendor/github.com/apache/camel-k/pkg/client/camel/clientset/versioned/fake/register.go b/vendor/github.com/apache/camel-k/pkg/client/camel/clientset/versioned/fake/register.go deleted file mode 100644 index cea6d0a6e4..0000000000 --- a/vendor/github.com/apache/camel-k/pkg/client/camel/clientset/versioned/fake/register.go +++ /dev/null @@ -1,57 +0,0 @@ -/* -Licensed to the Apache Software Foundation (ASF) under one or more -contributor license agreements. See the NOTICE file distributed with -this work for additional information regarding copyright ownership. -The ASF licenses this file to You 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 ( - camelv1 "github.com/apache/camel-k/pkg/apis/camel/v1" - 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{ - camelv1.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)) -} diff --git a/vendor/github.com/apache/camel-k/pkg/client/camel/clientset/versioned/scheme/doc.go b/vendor/github.com/apache/camel-k/pkg/client/camel/clientset/versioned/scheme/doc.go deleted file mode 100644 index dd7d3b5889..0000000000 --- a/vendor/github.com/apache/camel-k/pkg/client/camel/clientset/versioned/scheme/doc.go +++ /dev/null @@ -1,21 +0,0 @@ -/* -Licensed to the Apache Software Foundation (ASF) under one or more -contributor license agreements. See the NOTICE file distributed with -this work for additional information regarding copyright ownership. -The ASF licenses this file to You 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 diff --git a/vendor/github.com/apache/camel-k/pkg/client/camel/clientset/versioned/scheme/register.go b/vendor/github.com/apache/camel-k/pkg/client/camel/clientset/versioned/scheme/register.go deleted file mode 100644 index dca9dcfe22..0000000000 --- a/vendor/github.com/apache/camel-k/pkg/client/camel/clientset/versioned/scheme/register.go +++ /dev/null @@ -1,57 +0,0 @@ -/* -Licensed to the Apache Software Foundation (ASF) under one or more -contributor license agreements. See the NOTICE file distributed with -this work for additional information regarding copyright ownership. -The ASF licenses this file to You 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 ( - camelv1 "github.com/apache/camel-k/pkg/apis/camel/v1" - 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{ - camelv1.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)) -} diff --git a/vendor/github.com/apache/camel-k/pkg/client/camel/clientset/versioned/typed/camel/v1/build.go b/vendor/github.com/apache/camel-k/pkg/client/camel/clientset/versioned/typed/camel/v1/build.go deleted file mode 100644 index 335a98e883..0000000000 --- a/vendor/github.com/apache/camel-k/pkg/client/camel/clientset/versioned/typed/camel/v1/build.go +++ /dev/null @@ -1,192 +0,0 @@ -/* -Licensed to the Apache Software Foundation (ASF) under one or more -contributor license agreements. See the NOTICE file distributed with -this work for additional information regarding copyright ownership. -The ASF licenses this file to You 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 v1 - -import ( - "time" - - v1 "github.com/apache/camel-k/pkg/apis/camel/v1" - scheme "github.com/apache/camel-k/pkg/client/camel/clientset/versioned/scheme" - metav1 "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" -) - -// BuildsGetter has a method to return a BuildInterface. -// A group's client should implement this interface. -type BuildsGetter interface { - Builds(namespace string) BuildInterface -} - -// BuildInterface has methods to work with Build resources. -type BuildInterface interface { - Create(*v1.Build) (*v1.Build, error) - Update(*v1.Build) (*v1.Build, error) - UpdateStatus(*v1.Build) (*v1.Build, error) - Delete(name string, options *metav1.DeleteOptions) error - DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error - Get(name string, options metav1.GetOptions) (*v1.Build, error) - List(opts metav1.ListOptions) (*v1.BuildList, error) - Watch(opts metav1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Build, err error) - BuildExpansion -} - -// builds implements BuildInterface -type builds struct { - client rest.Interface - ns string -} - -// newBuilds returns a Builds -func newBuilds(c *CamelV1Client, namespace string) *builds { - return &builds{ - client: c.RESTClient(), - ns: namespace, - } -} - -// Get takes name of the build, and returns the corresponding build object, and an error if there is any. -func (c *builds) Get(name string, options metav1.GetOptions) (result *v1.Build, err error) { - result = &v1.Build{} - err = c.client.Get(). - Namespace(c.ns). - Resource("builds"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of Builds that match those selectors. -func (c *builds) List(opts metav1.ListOptions) (result *v1.BuildList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v1.BuildList{} - err = c.client.Get(). - Namespace(c.ns). - Resource("builds"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested builds. -func (c *builds) Watch(opts metav1.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("builds"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch() -} - -// Create takes the representation of a build and creates it. Returns the server's representation of the build, and an error, if there is any. -func (c *builds) Create(build *v1.Build) (result *v1.Build, err error) { - result = &v1.Build{} - err = c.client.Post(). - Namespace(c.ns). - Resource("builds"). - Body(build). - Do(). - Into(result) - return -} - -// Update takes the representation of a build and updates it. Returns the server's representation of the build, and an error, if there is any. -func (c *builds) Update(build *v1.Build) (result *v1.Build, err error) { - result = &v1.Build{} - err = c.client.Put(). - Namespace(c.ns). - Resource("builds"). - Name(build.Name). - Body(build). - Do(). - Into(result) - return -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *builds) UpdateStatus(build *v1.Build) (result *v1.Build, err error) { - result = &v1.Build{} - err = c.client.Put(). - Namespace(c.ns). - Resource("builds"). - Name(build.Name). - SubResource("status"). - Body(build). - Do(). - Into(result) - return -} - -// Delete takes name of the build and deletes it. Returns an error if one occurs. -func (c *builds) Delete(name string, options *metav1.DeleteOptions) error { - return c.client.Delete(). - Namespace(c.ns). - Resource("builds"). - Name(name). - Body(options). - Do(). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *builds) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.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("builds"). - VersionedParams(&listOptions, scheme.ParameterCodec). - Timeout(timeout). - Body(options). - Do(). - Error() -} - -// Patch applies the patch and returns the patched build. -func (c *builds) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Build, err error) { - result = &v1.Build{} - err = c.client.Patch(pt). - Namespace(c.ns). - Resource("builds"). - SubResource(subresources...). - Name(name). - Body(data). - Do(). - Into(result) - return -} diff --git a/vendor/github.com/apache/camel-k/pkg/client/camel/clientset/versioned/typed/camel/v1/camel_client.go b/vendor/github.com/apache/camel-k/pkg/client/camel/clientset/versioned/typed/camel/v1/camel_client.go deleted file mode 100644 index 8fd6f8756f..0000000000 --- a/vendor/github.com/apache/camel-k/pkg/client/camel/clientset/versioned/typed/camel/v1/camel_client.go +++ /dev/null @@ -1,110 +0,0 @@ -/* -Licensed to the Apache Software Foundation (ASF) under one or more -contributor license agreements. See the NOTICE file distributed with -this work for additional information regarding copyright ownership. -The ASF licenses this file to You 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 v1 - -import ( - v1 "github.com/apache/camel-k/pkg/apis/camel/v1" - "github.com/apache/camel-k/pkg/client/camel/clientset/versioned/scheme" - rest "k8s.io/client-go/rest" -) - -type CamelV1Interface interface { - RESTClient() rest.Interface - BuildsGetter - CamelCatalogsGetter - IntegrationsGetter - IntegrationKitsGetter - IntegrationPlatformsGetter -} - -// CamelV1Client is used to interact with features provided by the camel.apache.org group. -type CamelV1Client struct { - restClient rest.Interface -} - -func (c *CamelV1Client) Builds(namespace string) BuildInterface { - return newBuilds(c, namespace) -} - -func (c *CamelV1Client) CamelCatalogs(namespace string) CamelCatalogInterface { - return newCamelCatalogs(c, namespace) -} - -func (c *CamelV1Client) Integrations(namespace string) IntegrationInterface { - return newIntegrations(c, namespace) -} - -func (c *CamelV1Client) IntegrationKits(namespace string) IntegrationKitInterface { - return newIntegrationKits(c, namespace) -} - -func (c *CamelV1Client) IntegrationPlatforms(namespace string) IntegrationPlatformInterface { - return newIntegrationPlatforms(c, namespace) -} - -// NewForConfig creates a new CamelV1Client for the given config. -func NewForConfig(c *rest.Config) (*CamelV1Client, error) { - config := *c - if err := setConfigDefaults(&config); err != nil { - return nil, err - } - client, err := rest.RESTClientFor(&config) - if err != nil { - return nil, err - } - return &CamelV1Client{client}, nil -} - -// NewForConfigOrDie creates a new CamelV1Client for the given config and -// panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *CamelV1Client { - client, err := NewForConfig(c) - if err != nil { - panic(err) - } - return client -} - -// New creates a new CamelV1Client for the given RESTClient. -func New(c rest.Interface) *CamelV1Client { - return &CamelV1Client{c} -} - -func setConfigDefaults(config *rest.Config) error { - gv := v1.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 *CamelV1Client) RESTClient() rest.Interface { - if c == nil { - return nil - } - return c.restClient -} diff --git a/vendor/github.com/apache/camel-k/pkg/client/camel/clientset/versioned/typed/camel/v1/camelcatalog.go b/vendor/github.com/apache/camel-k/pkg/client/camel/clientset/versioned/typed/camel/v1/camelcatalog.go deleted file mode 100644 index 566155aaf0..0000000000 --- a/vendor/github.com/apache/camel-k/pkg/client/camel/clientset/versioned/typed/camel/v1/camelcatalog.go +++ /dev/null @@ -1,192 +0,0 @@ -/* -Licensed to the Apache Software Foundation (ASF) under one or more -contributor license agreements. See the NOTICE file distributed with -this work for additional information regarding copyright ownership. -The ASF licenses this file to You 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 v1 - -import ( - "time" - - v1 "github.com/apache/camel-k/pkg/apis/camel/v1" - scheme "github.com/apache/camel-k/pkg/client/camel/clientset/versioned/scheme" - metav1 "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" -) - -// CamelCatalogsGetter has a method to return a CamelCatalogInterface. -// A group's client should implement this interface. -type CamelCatalogsGetter interface { - CamelCatalogs(namespace string) CamelCatalogInterface -} - -// CamelCatalogInterface has methods to work with CamelCatalog resources. -type CamelCatalogInterface interface { - Create(*v1.CamelCatalog) (*v1.CamelCatalog, error) - Update(*v1.CamelCatalog) (*v1.CamelCatalog, error) - UpdateStatus(*v1.CamelCatalog) (*v1.CamelCatalog, error) - Delete(name string, options *metav1.DeleteOptions) error - DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error - Get(name string, options metav1.GetOptions) (*v1.CamelCatalog, error) - List(opts metav1.ListOptions) (*v1.CamelCatalogList, error) - Watch(opts metav1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.CamelCatalog, err error) - CamelCatalogExpansion -} - -// camelCatalogs implements CamelCatalogInterface -type camelCatalogs struct { - client rest.Interface - ns string -} - -// newCamelCatalogs returns a CamelCatalogs -func newCamelCatalogs(c *CamelV1Client, namespace string) *camelCatalogs { - return &camelCatalogs{ - client: c.RESTClient(), - ns: namespace, - } -} - -// Get takes name of the camelCatalog, and returns the corresponding camelCatalog object, and an error if there is any. -func (c *camelCatalogs) Get(name string, options metav1.GetOptions) (result *v1.CamelCatalog, err error) { - result = &v1.CamelCatalog{} - err = c.client.Get(). - Namespace(c.ns). - Resource("camelcatalogs"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of CamelCatalogs that match those selectors. -func (c *camelCatalogs) List(opts metav1.ListOptions) (result *v1.CamelCatalogList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v1.CamelCatalogList{} - err = c.client.Get(). - Namespace(c.ns). - Resource("camelcatalogs"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested camelCatalogs. -func (c *camelCatalogs) Watch(opts metav1.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("camelcatalogs"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch() -} - -// Create takes the representation of a camelCatalog and creates it. Returns the server's representation of the camelCatalog, and an error, if there is any. -func (c *camelCatalogs) Create(camelCatalog *v1.CamelCatalog) (result *v1.CamelCatalog, err error) { - result = &v1.CamelCatalog{} - err = c.client.Post(). - Namespace(c.ns). - Resource("camelcatalogs"). - Body(camelCatalog). - Do(). - Into(result) - return -} - -// Update takes the representation of a camelCatalog and updates it. Returns the server's representation of the camelCatalog, and an error, if there is any. -func (c *camelCatalogs) Update(camelCatalog *v1.CamelCatalog) (result *v1.CamelCatalog, err error) { - result = &v1.CamelCatalog{} - err = c.client.Put(). - Namespace(c.ns). - Resource("camelcatalogs"). - Name(camelCatalog.Name). - Body(camelCatalog). - Do(). - Into(result) - return -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *camelCatalogs) UpdateStatus(camelCatalog *v1.CamelCatalog) (result *v1.CamelCatalog, err error) { - result = &v1.CamelCatalog{} - err = c.client.Put(). - Namespace(c.ns). - Resource("camelcatalogs"). - Name(camelCatalog.Name). - SubResource("status"). - Body(camelCatalog). - Do(). - Into(result) - return -} - -// Delete takes name of the camelCatalog and deletes it. Returns an error if one occurs. -func (c *camelCatalogs) Delete(name string, options *metav1.DeleteOptions) error { - return c.client.Delete(). - Namespace(c.ns). - Resource("camelcatalogs"). - Name(name). - Body(options). - Do(). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *camelCatalogs) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.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("camelcatalogs"). - VersionedParams(&listOptions, scheme.ParameterCodec). - Timeout(timeout). - Body(options). - Do(). - Error() -} - -// Patch applies the patch and returns the patched camelCatalog. -func (c *camelCatalogs) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.CamelCatalog, err error) { - result = &v1.CamelCatalog{} - err = c.client.Patch(pt). - Namespace(c.ns). - Resource("camelcatalogs"). - SubResource(subresources...). - Name(name). - Body(data). - Do(). - Into(result) - return -} diff --git a/vendor/github.com/apache/camel-k/pkg/client/camel/clientset/versioned/typed/camel/v1/doc.go b/vendor/github.com/apache/camel-k/pkg/client/camel/clientset/versioned/typed/camel/v1/doc.go deleted file mode 100644 index cbd710d63c..0000000000 --- a/vendor/github.com/apache/camel-k/pkg/client/camel/clientset/versioned/typed/camel/v1/doc.go +++ /dev/null @@ -1,21 +0,0 @@ -/* -Licensed to the Apache Software Foundation (ASF) under one or more -contributor license agreements. See the NOTICE file distributed with -this work for additional information regarding copyright ownership. -The ASF licenses this file to You 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 v1 diff --git a/vendor/github.com/apache/camel-k/pkg/client/camel/clientset/versioned/typed/camel/v1/fake/doc.go b/vendor/github.com/apache/camel-k/pkg/client/camel/clientset/versioned/typed/camel/v1/fake/doc.go deleted file mode 100644 index 5d1c76cc91..0000000000 --- a/vendor/github.com/apache/camel-k/pkg/client/camel/clientset/versioned/typed/camel/v1/fake/doc.go +++ /dev/null @@ -1,21 +0,0 @@ -/* -Licensed to the Apache Software Foundation (ASF) under one or more -contributor license agreements. See the NOTICE file distributed with -this work for additional information regarding copyright ownership. -The ASF licenses this file to You 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 diff --git a/vendor/github.com/apache/camel-k/pkg/client/camel/clientset/versioned/typed/camel/v1/fake/fake_build.go b/vendor/github.com/apache/camel-k/pkg/client/camel/clientset/versioned/typed/camel/v1/fake/fake_build.go deleted file mode 100644 index f459f5c0f4..0000000000 --- a/vendor/github.com/apache/camel-k/pkg/client/camel/clientset/versioned/typed/camel/v1/fake/fake_build.go +++ /dev/null @@ -1,141 +0,0 @@ -/* -Licensed to the Apache Software Foundation (ASF) under one or more -contributor license agreements. See the NOTICE file distributed with -this work for additional information regarding copyright ownership. -The ASF licenses this file to You 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 ( - camelv1 "github.com/apache/camel-k/pkg/apis/camel/v1" - 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" -) - -// FakeBuilds implements BuildInterface -type FakeBuilds struct { - Fake *FakeCamelV1 - ns string -} - -var buildsResource = schema.GroupVersionResource{Group: "camel.apache.org", Version: "v1", Resource: "builds"} - -var buildsKind = schema.GroupVersionKind{Group: "camel.apache.org", Version: "v1", Kind: "Build"} - -// Get takes name of the build, and returns the corresponding build object, and an error if there is any. -func (c *FakeBuilds) Get(name string, options v1.GetOptions) (result *camelv1.Build, err error) { - obj, err := c.Fake. - Invokes(testing.NewGetAction(buildsResource, c.ns, name), &camelv1.Build{}) - - if obj == nil { - return nil, err - } - return obj.(*camelv1.Build), err -} - -// List takes label and field selectors, and returns the list of Builds that match those selectors. -func (c *FakeBuilds) List(opts v1.ListOptions) (result *camelv1.BuildList, err error) { - obj, err := c.Fake. - Invokes(testing.NewListAction(buildsResource, buildsKind, c.ns, opts), &camelv1.BuildList{}) - - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &camelv1.BuildList{ListMeta: obj.(*camelv1.BuildList).ListMeta} - for _, item := range obj.(*camelv1.BuildList).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 builds. -func (c *FakeBuilds) Watch(opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewWatchAction(buildsResource, c.ns, opts)) - -} - -// Create takes the representation of a build and creates it. Returns the server's representation of the build, and an error, if there is any. -func (c *FakeBuilds) Create(build *camelv1.Build) (result *camelv1.Build, err error) { - obj, err := c.Fake. - Invokes(testing.NewCreateAction(buildsResource, c.ns, build), &camelv1.Build{}) - - if obj == nil { - return nil, err - } - return obj.(*camelv1.Build), err -} - -// Update takes the representation of a build and updates it. Returns the server's representation of the build, and an error, if there is any. -func (c *FakeBuilds) Update(build *camelv1.Build) (result *camelv1.Build, err error) { - obj, err := c.Fake. - Invokes(testing.NewUpdateAction(buildsResource, c.ns, build), &camelv1.Build{}) - - if obj == nil { - return nil, err - } - return obj.(*camelv1.Build), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeBuilds) UpdateStatus(build *camelv1.Build) (*camelv1.Build, error) { - obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceAction(buildsResource, "status", c.ns, build), &camelv1.Build{}) - - if obj == nil { - return nil, err - } - return obj.(*camelv1.Build), err -} - -// Delete takes name of the build and deletes it. Returns an error if one occurs. -func (c *FakeBuilds) Delete(name string, options *v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewDeleteAction(buildsResource, c.ns, name), &camelv1.Build{}) - - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeBuilds) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(buildsResource, c.ns, listOptions) - - _, err := c.Fake.Invokes(action, &camelv1.BuildList{}) - return err -} - -// Patch applies the patch and returns the patched build. -func (c *FakeBuilds) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *camelv1.Build, err error) { - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(buildsResource, c.ns, name, pt, data, subresources...), &camelv1.Build{}) - - if obj == nil { - return nil, err - } - return obj.(*camelv1.Build), err -} diff --git a/vendor/github.com/apache/camel-k/pkg/client/camel/clientset/versioned/typed/camel/v1/fake/fake_camel_client.go b/vendor/github.com/apache/camel-k/pkg/client/camel/clientset/versioned/typed/camel/v1/fake/fake_camel_client.go deleted file mode 100644 index 1117ef2767..0000000000 --- a/vendor/github.com/apache/camel-k/pkg/client/camel/clientset/versioned/typed/camel/v1/fake/fake_camel_client.go +++ /dev/null @@ -1,57 +0,0 @@ -/* -Licensed to the Apache Software Foundation (ASF) under one or more -contributor license agreements. See the NOTICE file distributed with -this work for additional information regarding copyright ownership. -The ASF licenses this file to You 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 ( - v1 "github.com/apache/camel-k/pkg/client/camel/clientset/versioned/typed/camel/v1" - rest "k8s.io/client-go/rest" - testing "k8s.io/client-go/testing" -) - -type FakeCamelV1 struct { - *testing.Fake -} - -func (c *FakeCamelV1) Builds(namespace string) v1.BuildInterface { - return &FakeBuilds{c, namespace} -} - -func (c *FakeCamelV1) CamelCatalogs(namespace string) v1.CamelCatalogInterface { - return &FakeCamelCatalogs{c, namespace} -} - -func (c *FakeCamelV1) Integrations(namespace string) v1.IntegrationInterface { - return &FakeIntegrations{c, namespace} -} - -func (c *FakeCamelV1) IntegrationKits(namespace string) v1.IntegrationKitInterface { - return &FakeIntegrationKits{c, namespace} -} - -func (c *FakeCamelV1) IntegrationPlatforms(namespace string) v1.IntegrationPlatformInterface { - return &FakeIntegrationPlatforms{c, namespace} -} - -// RESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *FakeCamelV1) RESTClient() rest.Interface { - var ret *rest.RESTClient - return ret -} diff --git a/vendor/github.com/apache/camel-k/pkg/client/camel/clientset/versioned/typed/camel/v1/fake/fake_camelcatalog.go b/vendor/github.com/apache/camel-k/pkg/client/camel/clientset/versioned/typed/camel/v1/fake/fake_camelcatalog.go deleted file mode 100644 index 1a30e411f3..0000000000 --- a/vendor/github.com/apache/camel-k/pkg/client/camel/clientset/versioned/typed/camel/v1/fake/fake_camelcatalog.go +++ /dev/null @@ -1,141 +0,0 @@ -/* -Licensed to the Apache Software Foundation (ASF) under one or more -contributor license agreements. See the NOTICE file distributed with -this work for additional information regarding copyright ownership. -The ASF licenses this file to You 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 ( - camelv1 "github.com/apache/camel-k/pkg/apis/camel/v1" - 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" -) - -// FakeCamelCatalogs implements CamelCatalogInterface -type FakeCamelCatalogs struct { - Fake *FakeCamelV1 - ns string -} - -var camelcatalogsResource = schema.GroupVersionResource{Group: "camel.apache.org", Version: "v1", Resource: "camelcatalogs"} - -var camelcatalogsKind = schema.GroupVersionKind{Group: "camel.apache.org", Version: "v1", Kind: "CamelCatalog"} - -// Get takes name of the camelCatalog, and returns the corresponding camelCatalog object, and an error if there is any. -func (c *FakeCamelCatalogs) Get(name string, options v1.GetOptions) (result *camelv1.CamelCatalog, err error) { - obj, err := c.Fake. - Invokes(testing.NewGetAction(camelcatalogsResource, c.ns, name), &camelv1.CamelCatalog{}) - - if obj == nil { - return nil, err - } - return obj.(*camelv1.CamelCatalog), err -} - -// List takes label and field selectors, and returns the list of CamelCatalogs that match those selectors. -func (c *FakeCamelCatalogs) List(opts v1.ListOptions) (result *camelv1.CamelCatalogList, err error) { - obj, err := c.Fake. - Invokes(testing.NewListAction(camelcatalogsResource, camelcatalogsKind, c.ns, opts), &camelv1.CamelCatalogList{}) - - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &camelv1.CamelCatalogList{ListMeta: obj.(*camelv1.CamelCatalogList).ListMeta} - for _, item := range obj.(*camelv1.CamelCatalogList).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 camelCatalogs. -func (c *FakeCamelCatalogs) Watch(opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewWatchAction(camelcatalogsResource, c.ns, opts)) - -} - -// Create takes the representation of a camelCatalog and creates it. Returns the server's representation of the camelCatalog, and an error, if there is any. -func (c *FakeCamelCatalogs) Create(camelCatalog *camelv1.CamelCatalog) (result *camelv1.CamelCatalog, err error) { - obj, err := c.Fake. - Invokes(testing.NewCreateAction(camelcatalogsResource, c.ns, camelCatalog), &camelv1.CamelCatalog{}) - - if obj == nil { - return nil, err - } - return obj.(*camelv1.CamelCatalog), err -} - -// Update takes the representation of a camelCatalog and updates it. Returns the server's representation of the camelCatalog, and an error, if there is any. -func (c *FakeCamelCatalogs) Update(camelCatalog *camelv1.CamelCatalog) (result *camelv1.CamelCatalog, err error) { - obj, err := c.Fake. - Invokes(testing.NewUpdateAction(camelcatalogsResource, c.ns, camelCatalog), &camelv1.CamelCatalog{}) - - if obj == nil { - return nil, err - } - return obj.(*camelv1.CamelCatalog), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeCamelCatalogs) UpdateStatus(camelCatalog *camelv1.CamelCatalog) (*camelv1.CamelCatalog, error) { - obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceAction(camelcatalogsResource, "status", c.ns, camelCatalog), &camelv1.CamelCatalog{}) - - if obj == nil { - return nil, err - } - return obj.(*camelv1.CamelCatalog), err -} - -// Delete takes name of the camelCatalog and deletes it. Returns an error if one occurs. -func (c *FakeCamelCatalogs) Delete(name string, options *v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewDeleteAction(camelcatalogsResource, c.ns, name), &camelv1.CamelCatalog{}) - - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeCamelCatalogs) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(camelcatalogsResource, c.ns, listOptions) - - _, err := c.Fake.Invokes(action, &camelv1.CamelCatalogList{}) - return err -} - -// Patch applies the patch and returns the patched camelCatalog. -func (c *FakeCamelCatalogs) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *camelv1.CamelCatalog, err error) { - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(camelcatalogsResource, c.ns, name, pt, data, subresources...), &camelv1.CamelCatalog{}) - - if obj == nil { - return nil, err - } - return obj.(*camelv1.CamelCatalog), err -} diff --git a/vendor/github.com/apache/camel-k/pkg/client/camel/clientset/versioned/typed/camel/v1/fake/fake_integration.go b/vendor/github.com/apache/camel-k/pkg/client/camel/clientset/versioned/typed/camel/v1/fake/fake_integration.go deleted file mode 100644 index 327576bce7..0000000000 --- a/vendor/github.com/apache/camel-k/pkg/client/camel/clientset/versioned/typed/camel/v1/fake/fake_integration.go +++ /dev/null @@ -1,141 +0,0 @@ -/* -Licensed to the Apache Software Foundation (ASF) under one or more -contributor license agreements. See the NOTICE file distributed with -this work for additional information regarding copyright ownership. -The ASF licenses this file to You 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 ( - camelv1 "github.com/apache/camel-k/pkg/apis/camel/v1" - 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" -) - -// FakeIntegrations implements IntegrationInterface -type FakeIntegrations struct { - Fake *FakeCamelV1 - ns string -} - -var integrationsResource = schema.GroupVersionResource{Group: "camel.apache.org", Version: "v1", Resource: "integrations"} - -var integrationsKind = schema.GroupVersionKind{Group: "camel.apache.org", Version: "v1", Kind: "Integration"} - -// Get takes name of the integration, and returns the corresponding integration object, and an error if there is any. -func (c *FakeIntegrations) Get(name string, options v1.GetOptions) (result *camelv1.Integration, err error) { - obj, err := c.Fake. - Invokes(testing.NewGetAction(integrationsResource, c.ns, name), &camelv1.Integration{}) - - if obj == nil { - return nil, err - } - return obj.(*camelv1.Integration), err -} - -// List takes label and field selectors, and returns the list of Integrations that match those selectors. -func (c *FakeIntegrations) List(opts v1.ListOptions) (result *camelv1.IntegrationList, err error) { - obj, err := c.Fake. - Invokes(testing.NewListAction(integrationsResource, integrationsKind, c.ns, opts), &camelv1.IntegrationList{}) - - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &camelv1.IntegrationList{ListMeta: obj.(*camelv1.IntegrationList).ListMeta} - for _, item := range obj.(*camelv1.IntegrationList).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 integrations. -func (c *FakeIntegrations) Watch(opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewWatchAction(integrationsResource, c.ns, opts)) - -} - -// Create takes the representation of a integration and creates it. Returns the server's representation of the integration, and an error, if there is any. -func (c *FakeIntegrations) Create(integration *camelv1.Integration) (result *camelv1.Integration, err error) { - obj, err := c.Fake. - Invokes(testing.NewCreateAction(integrationsResource, c.ns, integration), &camelv1.Integration{}) - - if obj == nil { - return nil, err - } - return obj.(*camelv1.Integration), err -} - -// Update takes the representation of a integration and updates it. Returns the server's representation of the integration, and an error, if there is any. -func (c *FakeIntegrations) Update(integration *camelv1.Integration) (result *camelv1.Integration, err error) { - obj, err := c.Fake. - Invokes(testing.NewUpdateAction(integrationsResource, c.ns, integration), &camelv1.Integration{}) - - if obj == nil { - return nil, err - } - return obj.(*camelv1.Integration), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeIntegrations) UpdateStatus(integration *camelv1.Integration) (*camelv1.Integration, error) { - obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceAction(integrationsResource, "status", c.ns, integration), &camelv1.Integration{}) - - if obj == nil { - return nil, err - } - return obj.(*camelv1.Integration), err -} - -// Delete takes name of the integration and deletes it. Returns an error if one occurs. -func (c *FakeIntegrations) Delete(name string, options *v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewDeleteAction(integrationsResource, c.ns, name), &camelv1.Integration{}) - - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeIntegrations) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(integrationsResource, c.ns, listOptions) - - _, err := c.Fake.Invokes(action, &camelv1.IntegrationList{}) - return err -} - -// Patch applies the patch and returns the patched integration. -func (c *FakeIntegrations) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *camelv1.Integration, err error) { - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(integrationsResource, c.ns, name, pt, data, subresources...), &camelv1.Integration{}) - - if obj == nil { - return nil, err - } - return obj.(*camelv1.Integration), err -} diff --git a/vendor/github.com/apache/camel-k/pkg/client/camel/clientset/versioned/typed/camel/v1/fake/fake_integrationkit.go b/vendor/github.com/apache/camel-k/pkg/client/camel/clientset/versioned/typed/camel/v1/fake/fake_integrationkit.go deleted file mode 100644 index 094da07f22..0000000000 --- a/vendor/github.com/apache/camel-k/pkg/client/camel/clientset/versioned/typed/camel/v1/fake/fake_integrationkit.go +++ /dev/null @@ -1,141 +0,0 @@ -/* -Licensed to the Apache Software Foundation (ASF) under one or more -contributor license agreements. See the NOTICE file distributed with -this work for additional information regarding copyright ownership. -The ASF licenses this file to You 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 ( - camelv1 "github.com/apache/camel-k/pkg/apis/camel/v1" - 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" -) - -// FakeIntegrationKits implements IntegrationKitInterface -type FakeIntegrationKits struct { - Fake *FakeCamelV1 - ns string -} - -var integrationkitsResource = schema.GroupVersionResource{Group: "camel.apache.org", Version: "v1", Resource: "integrationkits"} - -var integrationkitsKind = schema.GroupVersionKind{Group: "camel.apache.org", Version: "v1", Kind: "IntegrationKit"} - -// Get takes name of the integrationKit, and returns the corresponding integrationKit object, and an error if there is any. -func (c *FakeIntegrationKits) Get(name string, options v1.GetOptions) (result *camelv1.IntegrationKit, err error) { - obj, err := c.Fake. - Invokes(testing.NewGetAction(integrationkitsResource, c.ns, name), &camelv1.IntegrationKit{}) - - if obj == nil { - return nil, err - } - return obj.(*camelv1.IntegrationKit), err -} - -// List takes label and field selectors, and returns the list of IntegrationKits that match those selectors. -func (c *FakeIntegrationKits) List(opts v1.ListOptions) (result *camelv1.IntegrationKitList, err error) { - obj, err := c.Fake. - Invokes(testing.NewListAction(integrationkitsResource, integrationkitsKind, c.ns, opts), &camelv1.IntegrationKitList{}) - - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &camelv1.IntegrationKitList{ListMeta: obj.(*camelv1.IntegrationKitList).ListMeta} - for _, item := range obj.(*camelv1.IntegrationKitList).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 integrationKits. -func (c *FakeIntegrationKits) Watch(opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewWatchAction(integrationkitsResource, c.ns, opts)) - -} - -// Create takes the representation of a integrationKit and creates it. Returns the server's representation of the integrationKit, and an error, if there is any. -func (c *FakeIntegrationKits) Create(integrationKit *camelv1.IntegrationKit) (result *camelv1.IntegrationKit, err error) { - obj, err := c.Fake. - Invokes(testing.NewCreateAction(integrationkitsResource, c.ns, integrationKit), &camelv1.IntegrationKit{}) - - if obj == nil { - return nil, err - } - return obj.(*camelv1.IntegrationKit), err -} - -// Update takes the representation of a integrationKit and updates it. Returns the server's representation of the integrationKit, and an error, if there is any. -func (c *FakeIntegrationKits) Update(integrationKit *camelv1.IntegrationKit) (result *camelv1.IntegrationKit, err error) { - obj, err := c.Fake. - Invokes(testing.NewUpdateAction(integrationkitsResource, c.ns, integrationKit), &camelv1.IntegrationKit{}) - - if obj == nil { - return nil, err - } - return obj.(*camelv1.IntegrationKit), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeIntegrationKits) UpdateStatus(integrationKit *camelv1.IntegrationKit) (*camelv1.IntegrationKit, error) { - obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceAction(integrationkitsResource, "status", c.ns, integrationKit), &camelv1.IntegrationKit{}) - - if obj == nil { - return nil, err - } - return obj.(*camelv1.IntegrationKit), err -} - -// Delete takes name of the integrationKit and deletes it. Returns an error if one occurs. -func (c *FakeIntegrationKits) Delete(name string, options *v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewDeleteAction(integrationkitsResource, c.ns, name), &camelv1.IntegrationKit{}) - - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeIntegrationKits) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(integrationkitsResource, c.ns, listOptions) - - _, err := c.Fake.Invokes(action, &camelv1.IntegrationKitList{}) - return err -} - -// Patch applies the patch and returns the patched integrationKit. -func (c *FakeIntegrationKits) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *camelv1.IntegrationKit, err error) { - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(integrationkitsResource, c.ns, name, pt, data, subresources...), &camelv1.IntegrationKit{}) - - if obj == nil { - return nil, err - } - return obj.(*camelv1.IntegrationKit), err -} diff --git a/vendor/github.com/apache/camel-k/pkg/client/camel/clientset/versioned/typed/camel/v1/fake/fake_integrationplatform.go b/vendor/github.com/apache/camel-k/pkg/client/camel/clientset/versioned/typed/camel/v1/fake/fake_integrationplatform.go deleted file mode 100644 index 4847b9e21f..0000000000 --- a/vendor/github.com/apache/camel-k/pkg/client/camel/clientset/versioned/typed/camel/v1/fake/fake_integrationplatform.go +++ /dev/null @@ -1,141 +0,0 @@ -/* -Licensed to the Apache Software Foundation (ASF) under one or more -contributor license agreements. See the NOTICE file distributed with -this work for additional information regarding copyright ownership. -The ASF licenses this file to You 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 ( - camelv1 "github.com/apache/camel-k/pkg/apis/camel/v1" - 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" -) - -// FakeIntegrationPlatforms implements IntegrationPlatformInterface -type FakeIntegrationPlatforms struct { - Fake *FakeCamelV1 - ns string -} - -var integrationplatformsResource = schema.GroupVersionResource{Group: "camel.apache.org", Version: "v1", Resource: "integrationplatforms"} - -var integrationplatformsKind = schema.GroupVersionKind{Group: "camel.apache.org", Version: "v1", Kind: "IntegrationPlatform"} - -// Get takes name of the integrationPlatform, and returns the corresponding integrationPlatform object, and an error if there is any. -func (c *FakeIntegrationPlatforms) Get(name string, options v1.GetOptions) (result *camelv1.IntegrationPlatform, err error) { - obj, err := c.Fake. - Invokes(testing.NewGetAction(integrationplatformsResource, c.ns, name), &camelv1.IntegrationPlatform{}) - - if obj == nil { - return nil, err - } - return obj.(*camelv1.IntegrationPlatform), err -} - -// List takes label and field selectors, and returns the list of IntegrationPlatforms that match those selectors. -func (c *FakeIntegrationPlatforms) List(opts v1.ListOptions) (result *camelv1.IntegrationPlatformList, err error) { - obj, err := c.Fake. - Invokes(testing.NewListAction(integrationplatformsResource, integrationplatformsKind, c.ns, opts), &camelv1.IntegrationPlatformList{}) - - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &camelv1.IntegrationPlatformList{ListMeta: obj.(*camelv1.IntegrationPlatformList).ListMeta} - for _, item := range obj.(*camelv1.IntegrationPlatformList).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 integrationPlatforms. -func (c *FakeIntegrationPlatforms) Watch(opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewWatchAction(integrationplatformsResource, c.ns, opts)) - -} - -// Create takes the representation of a integrationPlatform and creates it. Returns the server's representation of the integrationPlatform, and an error, if there is any. -func (c *FakeIntegrationPlatforms) Create(integrationPlatform *camelv1.IntegrationPlatform) (result *camelv1.IntegrationPlatform, err error) { - obj, err := c.Fake. - Invokes(testing.NewCreateAction(integrationplatformsResource, c.ns, integrationPlatform), &camelv1.IntegrationPlatform{}) - - if obj == nil { - return nil, err - } - return obj.(*camelv1.IntegrationPlatform), err -} - -// Update takes the representation of a integrationPlatform and updates it. Returns the server's representation of the integrationPlatform, and an error, if there is any. -func (c *FakeIntegrationPlatforms) Update(integrationPlatform *camelv1.IntegrationPlatform) (result *camelv1.IntegrationPlatform, err error) { - obj, err := c.Fake. - Invokes(testing.NewUpdateAction(integrationplatformsResource, c.ns, integrationPlatform), &camelv1.IntegrationPlatform{}) - - if obj == nil { - return nil, err - } - return obj.(*camelv1.IntegrationPlatform), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeIntegrationPlatforms) UpdateStatus(integrationPlatform *camelv1.IntegrationPlatform) (*camelv1.IntegrationPlatform, error) { - obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceAction(integrationplatformsResource, "status", c.ns, integrationPlatform), &camelv1.IntegrationPlatform{}) - - if obj == nil { - return nil, err - } - return obj.(*camelv1.IntegrationPlatform), err -} - -// Delete takes name of the integrationPlatform and deletes it. Returns an error if one occurs. -func (c *FakeIntegrationPlatforms) Delete(name string, options *v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewDeleteAction(integrationplatformsResource, c.ns, name), &camelv1.IntegrationPlatform{}) - - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeIntegrationPlatforms) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(integrationplatformsResource, c.ns, listOptions) - - _, err := c.Fake.Invokes(action, &camelv1.IntegrationPlatformList{}) - return err -} - -// Patch applies the patch and returns the patched integrationPlatform. -func (c *FakeIntegrationPlatforms) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *camelv1.IntegrationPlatform, err error) { - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(integrationplatformsResource, c.ns, name, pt, data, subresources...), &camelv1.IntegrationPlatform{}) - - if obj == nil { - return nil, err - } - return obj.(*camelv1.IntegrationPlatform), err -} diff --git a/vendor/github.com/apache/camel-k/pkg/client/camel/clientset/versioned/typed/camel/v1/generated_expansion.go b/vendor/github.com/apache/camel-k/pkg/client/camel/clientset/versioned/typed/camel/v1/generated_expansion.go deleted file mode 100644 index 41a8b54e2c..0000000000 --- a/vendor/github.com/apache/camel-k/pkg/client/camel/clientset/versioned/typed/camel/v1/generated_expansion.go +++ /dev/null @@ -1,30 +0,0 @@ -/* -Licensed to the Apache Software Foundation (ASF) under one or more -contributor license agreements. See the NOTICE file distributed with -this work for additional information regarding copyright ownership. -The ASF licenses this file to You 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 v1 - -type BuildExpansion interface{} - -type CamelCatalogExpansion interface{} - -type IntegrationExpansion interface{} - -type IntegrationKitExpansion interface{} - -type IntegrationPlatformExpansion interface{} diff --git a/vendor/github.com/apache/camel-k/pkg/client/camel/clientset/versioned/typed/camel/v1/integration.go b/vendor/github.com/apache/camel-k/pkg/client/camel/clientset/versioned/typed/camel/v1/integration.go deleted file mode 100644 index 8e788a7699..0000000000 --- a/vendor/github.com/apache/camel-k/pkg/client/camel/clientset/versioned/typed/camel/v1/integration.go +++ /dev/null @@ -1,192 +0,0 @@ -/* -Licensed to the Apache Software Foundation (ASF) under one or more -contributor license agreements. See the NOTICE file distributed with -this work for additional information regarding copyright ownership. -The ASF licenses this file to You 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 v1 - -import ( - "time" - - v1 "github.com/apache/camel-k/pkg/apis/camel/v1" - scheme "github.com/apache/camel-k/pkg/client/camel/clientset/versioned/scheme" - metav1 "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" -) - -// IntegrationsGetter has a method to return a IntegrationInterface. -// A group's client should implement this interface. -type IntegrationsGetter interface { - Integrations(namespace string) IntegrationInterface -} - -// IntegrationInterface has methods to work with Integration resources. -type IntegrationInterface interface { - Create(*v1.Integration) (*v1.Integration, error) - Update(*v1.Integration) (*v1.Integration, error) - UpdateStatus(*v1.Integration) (*v1.Integration, error) - Delete(name string, options *metav1.DeleteOptions) error - DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error - Get(name string, options metav1.GetOptions) (*v1.Integration, error) - List(opts metav1.ListOptions) (*v1.IntegrationList, error) - Watch(opts metav1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Integration, err error) - IntegrationExpansion -} - -// integrations implements IntegrationInterface -type integrations struct { - client rest.Interface - ns string -} - -// newIntegrations returns a Integrations -func newIntegrations(c *CamelV1Client, namespace string) *integrations { - return &integrations{ - client: c.RESTClient(), - ns: namespace, - } -} - -// Get takes name of the integration, and returns the corresponding integration object, and an error if there is any. -func (c *integrations) Get(name string, options metav1.GetOptions) (result *v1.Integration, err error) { - result = &v1.Integration{} - err = c.client.Get(). - Namespace(c.ns). - Resource("integrations"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of Integrations that match those selectors. -func (c *integrations) List(opts metav1.ListOptions) (result *v1.IntegrationList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v1.IntegrationList{} - err = c.client.Get(). - Namespace(c.ns). - Resource("integrations"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested integrations. -func (c *integrations) Watch(opts metav1.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("integrations"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch() -} - -// Create takes the representation of a integration and creates it. Returns the server's representation of the integration, and an error, if there is any. -func (c *integrations) Create(integration *v1.Integration) (result *v1.Integration, err error) { - result = &v1.Integration{} - err = c.client.Post(). - Namespace(c.ns). - Resource("integrations"). - Body(integration). - Do(). - Into(result) - return -} - -// Update takes the representation of a integration and updates it. Returns the server's representation of the integration, and an error, if there is any. -func (c *integrations) Update(integration *v1.Integration) (result *v1.Integration, err error) { - result = &v1.Integration{} - err = c.client.Put(). - Namespace(c.ns). - Resource("integrations"). - Name(integration.Name). - Body(integration). - Do(). - Into(result) - return -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *integrations) UpdateStatus(integration *v1.Integration) (result *v1.Integration, err error) { - result = &v1.Integration{} - err = c.client.Put(). - Namespace(c.ns). - Resource("integrations"). - Name(integration.Name). - SubResource("status"). - Body(integration). - Do(). - Into(result) - return -} - -// Delete takes name of the integration and deletes it. Returns an error if one occurs. -func (c *integrations) Delete(name string, options *metav1.DeleteOptions) error { - return c.client.Delete(). - Namespace(c.ns). - Resource("integrations"). - Name(name). - Body(options). - Do(). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *integrations) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.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("integrations"). - VersionedParams(&listOptions, scheme.ParameterCodec). - Timeout(timeout). - Body(options). - Do(). - Error() -} - -// Patch applies the patch and returns the patched integration. -func (c *integrations) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Integration, err error) { - result = &v1.Integration{} - err = c.client.Patch(pt). - Namespace(c.ns). - Resource("integrations"). - SubResource(subresources...). - Name(name). - Body(data). - Do(). - Into(result) - return -} diff --git a/vendor/github.com/apache/camel-k/pkg/client/camel/clientset/versioned/typed/camel/v1/integrationkit.go b/vendor/github.com/apache/camel-k/pkg/client/camel/clientset/versioned/typed/camel/v1/integrationkit.go deleted file mode 100644 index a75affd8bf..0000000000 --- a/vendor/github.com/apache/camel-k/pkg/client/camel/clientset/versioned/typed/camel/v1/integrationkit.go +++ /dev/null @@ -1,192 +0,0 @@ -/* -Licensed to the Apache Software Foundation (ASF) under one or more -contributor license agreements. See the NOTICE file distributed with -this work for additional information regarding copyright ownership. -The ASF licenses this file to You 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 v1 - -import ( - "time" - - v1 "github.com/apache/camel-k/pkg/apis/camel/v1" - scheme "github.com/apache/camel-k/pkg/client/camel/clientset/versioned/scheme" - metav1 "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" -) - -// IntegrationKitsGetter has a method to return a IntegrationKitInterface. -// A group's client should implement this interface. -type IntegrationKitsGetter interface { - IntegrationKits(namespace string) IntegrationKitInterface -} - -// IntegrationKitInterface has methods to work with IntegrationKit resources. -type IntegrationKitInterface interface { - Create(*v1.IntegrationKit) (*v1.IntegrationKit, error) - Update(*v1.IntegrationKit) (*v1.IntegrationKit, error) - UpdateStatus(*v1.IntegrationKit) (*v1.IntegrationKit, error) - Delete(name string, options *metav1.DeleteOptions) error - DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error - Get(name string, options metav1.GetOptions) (*v1.IntegrationKit, error) - List(opts metav1.ListOptions) (*v1.IntegrationKitList, error) - Watch(opts metav1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.IntegrationKit, err error) - IntegrationKitExpansion -} - -// integrationKits implements IntegrationKitInterface -type integrationKits struct { - client rest.Interface - ns string -} - -// newIntegrationKits returns a IntegrationKits -func newIntegrationKits(c *CamelV1Client, namespace string) *integrationKits { - return &integrationKits{ - client: c.RESTClient(), - ns: namespace, - } -} - -// Get takes name of the integrationKit, and returns the corresponding integrationKit object, and an error if there is any. -func (c *integrationKits) Get(name string, options metav1.GetOptions) (result *v1.IntegrationKit, err error) { - result = &v1.IntegrationKit{} - err = c.client.Get(). - Namespace(c.ns). - Resource("integrationkits"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of IntegrationKits that match those selectors. -func (c *integrationKits) List(opts metav1.ListOptions) (result *v1.IntegrationKitList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v1.IntegrationKitList{} - err = c.client.Get(). - Namespace(c.ns). - Resource("integrationkits"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested integrationKits. -func (c *integrationKits) Watch(opts metav1.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("integrationkits"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch() -} - -// Create takes the representation of a integrationKit and creates it. Returns the server's representation of the integrationKit, and an error, if there is any. -func (c *integrationKits) Create(integrationKit *v1.IntegrationKit) (result *v1.IntegrationKit, err error) { - result = &v1.IntegrationKit{} - err = c.client.Post(). - Namespace(c.ns). - Resource("integrationkits"). - Body(integrationKit). - Do(). - Into(result) - return -} - -// Update takes the representation of a integrationKit and updates it. Returns the server's representation of the integrationKit, and an error, if there is any. -func (c *integrationKits) Update(integrationKit *v1.IntegrationKit) (result *v1.IntegrationKit, err error) { - result = &v1.IntegrationKit{} - err = c.client.Put(). - Namespace(c.ns). - Resource("integrationkits"). - Name(integrationKit.Name). - Body(integrationKit). - Do(). - Into(result) - return -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *integrationKits) UpdateStatus(integrationKit *v1.IntegrationKit) (result *v1.IntegrationKit, err error) { - result = &v1.IntegrationKit{} - err = c.client.Put(). - Namespace(c.ns). - Resource("integrationkits"). - Name(integrationKit.Name). - SubResource("status"). - Body(integrationKit). - Do(). - Into(result) - return -} - -// Delete takes name of the integrationKit and deletes it. Returns an error if one occurs. -func (c *integrationKits) Delete(name string, options *metav1.DeleteOptions) error { - return c.client.Delete(). - Namespace(c.ns). - Resource("integrationkits"). - Name(name). - Body(options). - Do(). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *integrationKits) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.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("integrationkits"). - VersionedParams(&listOptions, scheme.ParameterCodec). - Timeout(timeout). - Body(options). - Do(). - Error() -} - -// Patch applies the patch and returns the patched integrationKit. -func (c *integrationKits) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.IntegrationKit, err error) { - result = &v1.IntegrationKit{} - err = c.client.Patch(pt). - Namespace(c.ns). - Resource("integrationkits"). - SubResource(subresources...). - Name(name). - Body(data). - Do(). - Into(result) - return -} diff --git a/vendor/github.com/apache/camel-k/pkg/client/camel/clientset/versioned/typed/camel/v1/integrationplatform.go b/vendor/github.com/apache/camel-k/pkg/client/camel/clientset/versioned/typed/camel/v1/integrationplatform.go deleted file mode 100644 index 1da0e2b793..0000000000 --- a/vendor/github.com/apache/camel-k/pkg/client/camel/clientset/versioned/typed/camel/v1/integrationplatform.go +++ /dev/null @@ -1,192 +0,0 @@ -/* -Licensed to the Apache Software Foundation (ASF) under one or more -contributor license agreements. See the NOTICE file distributed with -this work for additional information regarding copyright ownership. -The ASF licenses this file to You 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 v1 - -import ( - "time" - - v1 "github.com/apache/camel-k/pkg/apis/camel/v1" - scheme "github.com/apache/camel-k/pkg/client/camel/clientset/versioned/scheme" - metav1 "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" -) - -// IntegrationPlatformsGetter has a method to return a IntegrationPlatformInterface. -// A group's client should implement this interface. -type IntegrationPlatformsGetter interface { - IntegrationPlatforms(namespace string) IntegrationPlatformInterface -} - -// IntegrationPlatformInterface has methods to work with IntegrationPlatform resources. -type IntegrationPlatformInterface interface { - Create(*v1.IntegrationPlatform) (*v1.IntegrationPlatform, error) - Update(*v1.IntegrationPlatform) (*v1.IntegrationPlatform, error) - UpdateStatus(*v1.IntegrationPlatform) (*v1.IntegrationPlatform, error) - Delete(name string, options *metav1.DeleteOptions) error - DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error - Get(name string, options metav1.GetOptions) (*v1.IntegrationPlatform, error) - List(opts metav1.ListOptions) (*v1.IntegrationPlatformList, error) - Watch(opts metav1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.IntegrationPlatform, err error) - IntegrationPlatformExpansion -} - -// integrationPlatforms implements IntegrationPlatformInterface -type integrationPlatforms struct { - client rest.Interface - ns string -} - -// newIntegrationPlatforms returns a IntegrationPlatforms -func newIntegrationPlatforms(c *CamelV1Client, namespace string) *integrationPlatforms { - return &integrationPlatforms{ - client: c.RESTClient(), - ns: namespace, - } -} - -// Get takes name of the integrationPlatform, and returns the corresponding integrationPlatform object, and an error if there is any. -func (c *integrationPlatforms) Get(name string, options metav1.GetOptions) (result *v1.IntegrationPlatform, err error) { - result = &v1.IntegrationPlatform{} - err = c.client.Get(). - Namespace(c.ns). - Resource("integrationplatforms"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of IntegrationPlatforms that match those selectors. -func (c *integrationPlatforms) List(opts metav1.ListOptions) (result *v1.IntegrationPlatformList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v1.IntegrationPlatformList{} - err = c.client.Get(). - Namespace(c.ns). - Resource("integrationplatforms"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested integrationPlatforms. -func (c *integrationPlatforms) Watch(opts metav1.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("integrationplatforms"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch() -} - -// Create takes the representation of a integrationPlatform and creates it. Returns the server's representation of the integrationPlatform, and an error, if there is any. -func (c *integrationPlatforms) Create(integrationPlatform *v1.IntegrationPlatform) (result *v1.IntegrationPlatform, err error) { - result = &v1.IntegrationPlatform{} - err = c.client.Post(). - Namespace(c.ns). - Resource("integrationplatforms"). - Body(integrationPlatform). - Do(). - Into(result) - return -} - -// Update takes the representation of a integrationPlatform and updates it. Returns the server's representation of the integrationPlatform, and an error, if there is any. -func (c *integrationPlatforms) Update(integrationPlatform *v1.IntegrationPlatform) (result *v1.IntegrationPlatform, err error) { - result = &v1.IntegrationPlatform{} - err = c.client.Put(). - Namespace(c.ns). - Resource("integrationplatforms"). - Name(integrationPlatform.Name). - Body(integrationPlatform). - Do(). - Into(result) - return -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *integrationPlatforms) UpdateStatus(integrationPlatform *v1.IntegrationPlatform) (result *v1.IntegrationPlatform, err error) { - result = &v1.IntegrationPlatform{} - err = c.client.Put(). - Namespace(c.ns). - Resource("integrationplatforms"). - Name(integrationPlatform.Name). - SubResource("status"). - Body(integrationPlatform). - Do(). - Into(result) - return -} - -// Delete takes name of the integrationPlatform and deletes it. Returns an error if one occurs. -func (c *integrationPlatforms) Delete(name string, options *metav1.DeleteOptions) error { - return c.client.Delete(). - Namespace(c.ns). - Resource("integrationplatforms"). - Name(name). - Body(options). - Do(). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *integrationPlatforms) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.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("integrationplatforms"). - VersionedParams(&listOptions, scheme.ParameterCodec). - Timeout(timeout). - Body(options). - Do(). - Error() -} - -// Patch applies the patch and returns the patched integrationPlatform. -func (c *integrationPlatforms) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.IntegrationPlatform, err error) { - result = &v1.IntegrationPlatform{} - err = c.client.Patch(pt). - Namespace(c.ns). - Resource("integrationplatforms"). - SubResource(subresources...). - Name(name). - Body(data). - Do(). - Into(result) - return -} diff --git a/vendor/github.com/apache/camel-k/pkg/client/camel/informers/externalversions/camel/interface.go b/vendor/github.com/apache/camel-k/pkg/client/camel/informers/externalversions/camel/interface.go deleted file mode 100644 index b30940e15c..0000000000 --- a/vendor/github.com/apache/camel-k/pkg/client/camel/informers/externalversions/camel/interface.go +++ /dev/null @@ -1,47 +0,0 @@ -/* -Licensed to the Apache Software Foundation (ASF) under one or more -contributor license agreements. See the NOTICE file distributed with -this work for additional information regarding copyright ownership. -The ASF licenses this file to You 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 camel - -import ( - v1 "github.com/apache/camel-k/pkg/client/camel/informers/externalversions/camel/v1" - internalinterfaces "github.com/apache/camel-k/pkg/client/camel/informers/externalversions/internalinterfaces" -) - -// Interface provides access to each of this group's versions. -type Interface interface { - // V1 provides access to shared informers for resources in V1. - V1() v1.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} -} - -// V1 returns a new v1.Interface. -func (g *group) V1() v1.Interface { - return v1.New(g.factory, g.namespace, g.tweakListOptions) -} diff --git a/vendor/github.com/apache/camel-k/pkg/client/camel/informers/externalversions/camel/v1/build.go b/vendor/github.com/apache/camel-k/pkg/client/camel/informers/externalversions/camel/v1/build.go deleted file mode 100644 index 0c2e451240..0000000000 --- a/vendor/github.com/apache/camel-k/pkg/client/camel/informers/externalversions/camel/v1/build.go +++ /dev/null @@ -1,90 +0,0 @@ -/* -Licensed to the Apache Software Foundation (ASF) under one or more -contributor license agreements. See the NOTICE file distributed with -this work for additional information regarding copyright ownership. -The ASF licenses this file to You 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 v1 - -import ( - time "time" - - camelv1 "github.com/apache/camel-k/pkg/apis/camel/v1" - versioned "github.com/apache/camel-k/pkg/client/camel/clientset/versioned" - internalinterfaces "github.com/apache/camel-k/pkg/client/camel/informers/externalversions/internalinterfaces" - v1 "github.com/apache/camel-k/pkg/client/camel/listers/camel/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - watch "k8s.io/apimachinery/pkg/watch" - cache "k8s.io/client-go/tools/cache" -) - -// BuildInformer provides access to a shared informer and lister for -// Builds. -type BuildInformer interface { - Informer() cache.SharedIndexInformer - Lister() v1.BuildLister -} - -type buildInformer struct { - factory internalinterfaces.SharedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc - namespace string -} - -// NewBuildInformer constructs a new informer for Build 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 NewBuildInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return NewFilteredBuildInformer(client, namespace, resyncPeriod, indexers, nil) -} - -// NewFilteredBuildInformer constructs a new informer for Build 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 NewFilteredBuildInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { - return cache.NewSharedIndexInformer( - &cache.ListWatch{ - ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.CamelV1().Builds(namespace).List(options) - }, - WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.CamelV1().Builds(namespace).Watch(options) - }, - }, - &camelv1.Build{}, - resyncPeriod, - indexers, - ) -} - -func (f *buildInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewFilteredBuildInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) -} - -func (f *buildInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&camelv1.Build{}, f.defaultInformer) -} - -func (f *buildInformer) Lister() v1.BuildLister { - return v1.NewBuildLister(f.Informer().GetIndexer()) -} diff --git a/vendor/github.com/apache/camel-k/pkg/client/camel/informers/externalversions/camel/v1/camelcatalog.go b/vendor/github.com/apache/camel-k/pkg/client/camel/informers/externalversions/camel/v1/camelcatalog.go deleted file mode 100644 index 6c9faaf9e0..0000000000 --- a/vendor/github.com/apache/camel-k/pkg/client/camel/informers/externalversions/camel/v1/camelcatalog.go +++ /dev/null @@ -1,90 +0,0 @@ -/* -Licensed to the Apache Software Foundation (ASF) under one or more -contributor license agreements. See the NOTICE file distributed with -this work for additional information regarding copyright ownership. -The ASF licenses this file to You 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 v1 - -import ( - time "time" - - camelv1 "github.com/apache/camel-k/pkg/apis/camel/v1" - versioned "github.com/apache/camel-k/pkg/client/camel/clientset/versioned" - internalinterfaces "github.com/apache/camel-k/pkg/client/camel/informers/externalversions/internalinterfaces" - v1 "github.com/apache/camel-k/pkg/client/camel/listers/camel/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - watch "k8s.io/apimachinery/pkg/watch" - cache "k8s.io/client-go/tools/cache" -) - -// CamelCatalogInformer provides access to a shared informer and lister for -// CamelCatalogs. -type CamelCatalogInformer interface { - Informer() cache.SharedIndexInformer - Lister() v1.CamelCatalogLister -} - -type camelCatalogInformer struct { - factory internalinterfaces.SharedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc - namespace string -} - -// NewCamelCatalogInformer constructs a new informer for CamelCatalog 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 NewCamelCatalogInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return NewFilteredCamelCatalogInformer(client, namespace, resyncPeriod, indexers, nil) -} - -// NewFilteredCamelCatalogInformer constructs a new informer for CamelCatalog 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 NewFilteredCamelCatalogInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { - return cache.NewSharedIndexInformer( - &cache.ListWatch{ - ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.CamelV1().CamelCatalogs(namespace).List(options) - }, - WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.CamelV1().CamelCatalogs(namespace).Watch(options) - }, - }, - &camelv1.CamelCatalog{}, - resyncPeriod, - indexers, - ) -} - -func (f *camelCatalogInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewFilteredCamelCatalogInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) -} - -func (f *camelCatalogInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&camelv1.CamelCatalog{}, f.defaultInformer) -} - -func (f *camelCatalogInformer) Lister() v1.CamelCatalogLister { - return v1.NewCamelCatalogLister(f.Informer().GetIndexer()) -} diff --git a/vendor/github.com/apache/camel-k/pkg/client/camel/informers/externalversions/camel/v1/integration.go b/vendor/github.com/apache/camel-k/pkg/client/camel/informers/externalversions/camel/v1/integration.go deleted file mode 100644 index 50dd08e0d3..0000000000 --- a/vendor/github.com/apache/camel-k/pkg/client/camel/informers/externalversions/camel/v1/integration.go +++ /dev/null @@ -1,90 +0,0 @@ -/* -Licensed to the Apache Software Foundation (ASF) under one or more -contributor license agreements. See the NOTICE file distributed with -this work for additional information regarding copyright ownership. -The ASF licenses this file to You 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 v1 - -import ( - time "time" - - camelv1 "github.com/apache/camel-k/pkg/apis/camel/v1" - versioned "github.com/apache/camel-k/pkg/client/camel/clientset/versioned" - internalinterfaces "github.com/apache/camel-k/pkg/client/camel/informers/externalversions/internalinterfaces" - v1 "github.com/apache/camel-k/pkg/client/camel/listers/camel/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - watch "k8s.io/apimachinery/pkg/watch" - cache "k8s.io/client-go/tools/cache" -) - -// IntegrationInformer provides access to a shared informer and lister for -// Integrations. -type IntegrationInformer interface { - Informer() cache.SharedIndexInformer - Lister() v1.IntegrationLister -} - -type integrationInformer struct { - factory internalinterfaces.SharedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc - namespace string -} - -// NewIntegrationInformer constructs a new informer for Integration 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 NewIntegrationInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return NewFilteredIntegrationInformer(client, namespace, resyncPeriod, indexers, nil) -} - -// NewFilteredIntegrationInformer constructs a new informer for Integration 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 NewFilteredIntegrationInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { - return cache.NewSharedIndexInformer( - &cache.ListWatch{ - ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.CamelV1().Integrations(namespace).List(options) - }, - WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.CamelV1().Integrations(namespace).Watch(options) - }, - }, - &camelv1.Integration{}, - resyncPeriod, - indexers, - ) -} - -func (f *integrationInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewFilteredIntegrationInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) -} - -func (f *integrationInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&camelv1.Integration{}, f.defaultInformer) -} - -func (f *integrationInformer) Lister() v1.IntegrationLister { - return v1.NewIntegrationLister(f.Informer().GetIndexer()) -} diff --git a/vendor/github.com/apache/camel-k/pkg/client/camel/informers/externalversions/camel/v1/integrationkit.go b/vendor/github.com/apache/camel-k/pkg/client/camel/informers/externalversions/camel/v1/integrationkit.go deleted file mode 100644 index 760f29dc5b..0000000000 --- a/vendor/github.com/apache/camel-k/pkg/client/camel/informers/externalversions/camel/v1/integrationkit.go +++ /dev/null @@ -1,90 +0,0 @@ -/* -Licensed to the Apache Software Foundation (ASF) under one or more -contributor license agreements. See the NOTICE file distributed with -this work for additional information regarding copyright ownership. -The ASF licenses this file to You 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 v1 - -import ( - time "time" - - camelv1 "github.com/apache/camel-k/pkg/apis/camel/v1" - versioned "github.com/apache/camel-k/pkg/client/camel/clientset/versioned" - internalinterfaces "github.com/apache/camel-k/pkg/client/camel/informers/externalversions/internalinterfaces" - v1 "github.com/apache/camel-k/pkg/client/camel/listers/camel/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - watch "k8s.io/apimachinery/pkg/watch" - cache "k8s.io/client-go/tools/cache" -) - -// IntegrationKitInformer provides access to a shared informer and lister for -// IntegrationKits. -type IntegrationKitInformer interface { - Informer() cache.SharedIndexInformer - Lister() v1.IntegrationKitLister -} - -type integrationKitInformer struct { - factory internalinterfaces.SharedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc - namespace string -} - -// NewIntegrationKitInformer constructs a new informer for IntegrationKit 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 NewIntegrationKitInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return NewFilteredIntegrationKitInformer(client, namespace, resyncPeriod, indexers, nil) -} - -// NewFilteredIntegrationKitInformer constructs a new informer for IntegrationKit 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 NewFilteredIntegrationKitInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { - return cache.NewSharedIndexInformer( - &cache.ListWatch{ - ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.CamelV1().IntegrationKits(namespace).List(options) - }, - WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.CamelV1().IntegrationKits(namespace).Watch(options) - }, - }, - &camelv1.IntegrationKit{}, - resyncPeriod, - indexers, - ) -} - -func (f *integrationKitInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewFilteredIntegrationKitInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) -} - -func (f *integrationKitInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&camelv1.IntegrationKit{}, f.defaultInformer) -} - -func (f *integrationKitInformer) Lister() v1.IntegrationKitLister { - return v1.NewIntegrationKitLister(f.Informer().GetIndexer()) -} diff --git a/vendor/github.com/apache/camel-k/pkg/client/camel/informers/externalversions/camel/v1/integrationplatform.go b/vendor/github.com/apache/camel-k/pkg/client/camel/informers/externalversions/camel/v1/integrationplatform.go deleted file mode 100644 index a23ca6d76a..0000000000 --- a/vendor/github.com/apache/camel-k/pkg/client/camel/informers/externalversions/camel/v1/integrationplatform.go +++ /dev/null @@ -1,90 +0,0 @@ -/* -Licensed to the Apache Software Foundation (ASF) under one or more -contributor license agreements. See the NOTICE file distributed with -this work for additional information regarding copyright ownership. -The ASF licenses this file to You 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 v1 - -import ( - time "time" - - camelv1 "github.com/apache/camel-k/pkg/apis/camel/v1" - versioned "github.com/apache/camel-k/pkg/client/camel/clientset/versioned" - internalinterfaces "github.com/apache/camel-k/pkg/client/camel/informers/externalversions/internalinterfaces" - v1 "github.com/apache/camel-k/pkg/client/camel/listers/camel/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - watch "k8s.io/apimachinery/pkg/watch" - cache "k8s.io/client-go/tools/cache" -) - -// IntegrationPlatformInformer provides access to a shared informer and lister for -// IntegrationPlatforms. -type IntegrationPlatformInformer interface { - Informer() cache.SharedIndexInformer - Lister() v1.IntegrationPlatformLister -} - -type integrationPlatformInformer struct { - factory internalinterfaces.SharedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc - namespace string -} - -// NewIntegrationPlatformInformer constructs a new informer for IntegrationPlatform 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 NewIntegrationPlatformInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return NewFilteredIntegrationPlatformInformer(client, namespace, resyncPeriod, indexers, nil) -} - -// NewFilteredIntegrationPlatformInformer constructs a new informer for IntegrationPlatform 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 NewFilteredIntegrationPlatformInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { - return cache.NewSharedIndexInformer( - &cache.ListWatch{ - ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.CamelV1().IntegrationPlatforms(namespace).List(options) - }, - WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.CamelV1().IntegrationPlatforms(namespace).Watch(options) - }, - }, - &camelv1.IntegrationPlatform{}, - resyncPeriod, - indexers, - ) -} - -func (f *integrationPlatformInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewFilteredIntegrationPlatformInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) -} - -func (f *integrationPlatformInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&camelv1.IntegrationPlatform{}, f.defaultInformer) -} - -func (f *integrationPlatformInformer) Lister() v1.IntegrationPlatformLister { - return v1.NewIntegrationPlatformLister(f.Informer().GetIndexer()) -} diff --git a/vendor/github.com/apache/camel-k/pkg/client/camel/informers/externalversions/camel/v1/interface.go b/vendor/github.com/apache/camel-k/pkg/client/camel/informers/externalversions/camel/v1/interface.go deleted file mode 100644 index 144db8ee08..0000000000 --- a/vendor/github.com/apache/camel-k/pkg/client/camel/informers/externalversions/camel/v1/interface.go +++ /dev/null @@ -1,74 +0,0 @@ -/* -Licensed to the Apache Software Foundation (ASF) under one or more -contributor license agreements. See the NOTICE file distributed with -this work for additional information regarding copyright ownership. -The ASF licenses this file to You 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 v1 - -import ( - internalinterfaces "github.com/apache/camel-k/pkg/client/camel/informers/externalversions/internalinterfaces" -) - -// Interface provides access to all the informers in this group version. -type Interface interface { - // Builds returns a BuildInformer. - Builds() BuildInformer - // CamelCatalogs returns a CamelCatalogInformer. - CamelCatalogs() CamelCatalogInformer - // Integrations returns a IntegrationInformer. - Integrations() IntegrationInformer - // IntegrationKits returns a IntegrationKitInformer. - IntegrationKits() IntegrationKitInformer - // IntegrationPlatforms returns a IntegrationPlatformInformer. - IntegrationPlatforms() IntegrationPlatformInformer -} - -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} -} - -// Builds returns a BuildInformer. -func (v *version) Builds() BuildInformer { - return &buildInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} -} - -// CamelCatalogs returns a CamelCatalogInformer. -func (v *version) CamelCatalogs() CamelCatalogInformer { - return &camelCatalogInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} -} - -// Integrations returns a IntegrationInformer. -func (v *version) Integrations() IntegrationInformer { - return &integrationInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} -} - -// IntegrationKits returns a IntegrationKitInformer. -func (v *version) IntegrationKits() IntegrationKitInformer { - return &integrationKitInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} -} - -// IntegrationPlatforms returns a IntegrationPlatformInformer. -func (v *version) IntegrationPlatforms() IntegrationPlatformInformer { - return &integrationPlatformInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} -} diff --git a/vendor/github.com/apache/camel-k/pkg/client/camel/informers/externalversions/factory.go b/vendor/github.com/apache/camel-k/pkg/client/camel/informers/externalversions/factory.go deleted file mode 100644 index d2344c02d4..0000000000 --- a/vendor/github.com/apache/camel-k/pkg/client/camel/informers/externalversions/factory.go +++ /dev/null @@ -1,181 +0,0 @@ -/* -Licensed to the Apache Software Foundation (ASF) under one or more -contributor license agreements. See the NOTICE file distributed with -this work for additional information regarding copyright ownership. -The ASF licenses this file to You 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" - - versioned "github.com/apache/camel-k/pkg/client/camel/clientset/versioned" - camel "github.com/apache/camel-k/pkg/client/camel/informers/externalversions/camel" - internalinterfaces "github.com/apache/camel-k/pkg/client/camel/informers/externalversions/internalinterfaces" - 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" -) - -// 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 - - Camel() camel.Interface -} - -func (f *sharedInformerFactory) Camel() camel.Interface { - return camel.New(f, f.namespace, f.tweakListOptions) -} diff --git a/vendor/github.com/apache/camel-k/pkg/client/camel/informers/externalversions/generic.go b/vendor/github.com/apache/camel-k/pkg/client/camel/informers/externalversions/generic.go deleted file mode 100644 index 2e00c8d8f7..0000000000 --- a/vendor/github.com/apache/camel-k/pkg/client/camel/informers/externalversions/generic.go +++ /dev/null @@ -1,71 +0,0 @@ -/* -Licensed to the Apache Software Foundation (ASF) under one or more -contributor license agreements. See the NOTICE file distributed with -this work for additional information regarding copyright ownership. -The ASF licenses this file to You 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" - - v1 "github.com/apache/camel-k/pkg/apis/camel/v1" - 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=camel.apache.org, Version=v1 - case v1.SchemeGroupVersion.WithResource("builds"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Camel().V1().Builds().Informer()}, nil - case v1.SchemeGroupVersion.WithResource("camelcatalogs"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Camel().V1().CamelCatalogs().Informer()}, nil - case v1.SchemeGroupVersion.WithResource("integrations"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Camel().V1().Integrations().Informer()}, nil - case v1.SchemeGroupVersion.WithResource("integrationkits"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Camel().V1().IntegrationKits().Informer()}, nil - case v1.SchemeGroupVersion.WithResource("integrationplatforms"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Camel().V1().IntegrationPlatforms().Informer()}, nil - - } - - return nil, fmt.Errorf("no informer found for %v", resource) -} diff --git a/vendor/github.com/apache/camel-k/pkg/client/camel/informers/externalversions/internalinterfaces/factory_interfaces.go b/vendor/github.com/apache/camel-k/pkg/client/camel/informers/externalversions/internalinterfaces/factory_interfaces.go deleted file mode 100644 index 938ae115cf..0000000000 --- a/vendor/github.com/apache/camel-k/pkg/client/camel/informers/externalversions/internalinterfaces/factory_interfaces.go +++ /dev/null @@ -1,41 +0,0 @@ -/* -Licensed to the Apache Software Foundation (ASF) under one or more -contributor license agreements. See the NOTICE file distributed with -this work for additional information regarding copyright ownership. -The ASF licenses this file to You 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" - - versioned "github.com/apache/camel-k/pkg/client/camel/clientset/versioned" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - cache "k8s.io/client-go/tools/cache" -) - -// 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) diff --git a/vendor/github.com/apache/camel-k/pkg/client/camel/listers/camel/v1/build.go b/vendor/github.com/apache/camel-k/pkg/client/camel/listers/camel/v1/build.go deleted file mode 100644 index c8eeb044e1..0000000000 --- a/vendor/github.com/apache/camel-k/pkg/client/camel/listers/camel/v1/build.go +++ /dev/null @@ -1,95 +0,0 @@ -/* -Licensed to the Apache Software Foundation (ASF) under one or more -contributor license agreements. See the NOTICE file distributed with -this work for additional information regarding copyright ownership. -The ASF licenses this file to You 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 v1 - -import ( - v1 "github.com/apache/camel-k/pkg/apis/camel/v1" - "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/tools/cache" -) - -// BuildLister helps list Builds. -type BuildLister interface { - // List lists all Builds in the indexer. - List(selector labels.Selector) (ret []*v1.Build, err error) - // Builds returns an object that can list and get Builds. - Builds(namespace string) BuildNamespaceLister - BuildListerExpansion -} - -// buildLister implements the BuildLister interface. -type buildLister struct { - indexer cache.Indexer -} - -// NewBuildLister returns a new BuildLister. -func NewBuildLister(indexer cache.Indexer) BuildLister { - return &buildLister{indexer: indexer} -} - -// List lists all Builds in the indexer. -func (s *buildLister) List(selector labels.Selector) (ret []*v1.Build, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1.Build)) - }) - return ret, err -} - -// Builds returns an object that can list and get Builds. -func (s *buildLister) Builds(namespace string) BuildNamespaceLister { - return buildNamespaceLister{indexer: s.indexer, namespace: namespace} -} - -// BuildNamespaceLister helps list and get Builds. -type BuildNamespaceLister interface { - // List lists all Builds in the indexer for a given namespace. - List(selector labels.Selector) (ret []*v1.Build, err error) - // Get retrieves the Build from the indexer for a given namespace and name. - Get(name string) (*v1.Build, error) - BuildNamespaceListerExpansion -} - -// buildNamespaceLister implements the BuildNamespaceLister -// interface. -type buildNamespaceLister struct { - indexer cache.Indexer - namespace string -} - -// List lists all Builds in the indexer for a given namespace. -func (s buildNamespaceLister) List(selector labels.Selector) (ret []*v1.Build, err error) { - err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { - ret = append(ret, m.(*v1.Build)) - }) - return ret, err -} - -// Get retrieves the Build from the indexer for a given namespace and name. -func (s buildNamespaceLister) Get(name string) (*v1.Build, error) { - obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(v1.Resource("build"), name) - } - return obj.(*v1.Build), nil -} diff --git a/vendor/github.com/apache/camel-k/pkg/client/camel/listers/camel/v1/camelcatalog.go b/vendor/github.com/apache/camel-k/pkg/client/camel/listers/camel/v1/camelcatalog.go deleted file mode 100644 index a3d2ae8355..0000000000 --- a/vendor/github.com/apache/camel-k/pkg/client/camel/listers/camel/v1/camelcatalog.go +++ /dev/null @@ -1,95 +0,0 @@ -/* -Licensed to the Apache Software Foundation (ASF) under one or more -contributor license agreements. See the NOTICE file distributed with -this work for additional information regarding copyright ownership. -The ASF licenses this file to You 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 v1 - -import ( - v1 "github.com/apache/camel-k/pkg/apis/camel/v1" - "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/tools/cache" -) - -// CamelCatalogLister helps list CamelCatalogs. -type CamelCatalogLister interface { - // List lists all CamelCatalogs in the indexer. - List(selector labels.Selector) (ret []*v1.CamelCatalog, err error) - // CamelCatalogs returns an object that can list and get CamelCatalogs. - CamelCatalogs(namespace string) CamelCatalogNamespaceLister - CamelCatalogListerExpansion -} - -// camelCatalogLister implements the CamelCatalogLister interface. -type camelCatalogLister struct { - indexer cache.Indexer -} - -// NewCamelCatalogLister returns a new CamelCatalogLister. -func NewCamelCatalogLister(indexer cache.Indexer) CamelCatalogLister { - return &camelCatalogLister{indexer: indexer} -} - -// List lists all CamelCatalogs in the indexer. -func (s *camelCatalogLister) List(selector labels.Selector) (ret []*v1.CamelCatalog, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1.CamelCatalog)) - }) - return ret, err -} - -// CamelCatalogs returns an object that can list and get CamelCatalogs. -func (s *camelCatalogLister) CamelCatalogs(namespace string) CamelCatalogNamespaceLister { - return camelCatalogNamespaceLister{indexer: s.indexer, namespace: namespace} -} - -// CamelCatalogNamespaceLister helps list and get CamelCatalogs. -type CamelCatalogNamespaceLister interface { - // List lists all CamelCatalogs in the indexer for a given namespace. - List(selector labels.Selector) (ret []*v1.CamelCatalog, err error) - // Get retrieves the CamelCatalog from the indexer for a given namespace and name. - Get(name string) (*v1.CamelCatalog, error) - CamelCatalogNamespaceListerExpansion -} - -// camelCatalogNamespaceLister implements the CamelCatalogNamespaceLister -// interface. -type camelCatalogNamespaceLister struct { - indexer cache.Indexer - namespace string -} - -// List lists all CamelCatalogs in the indexer for a given namespace. -func (s camelCatalogNamespaceLister) List(selector labels.Selector) (ret []*v1.CamelCatalog, err error) { - err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { - ret = append(ret, m.(*v1.CamelCatalog)) - }) - return ret, err -} - -// Get retrieves the CamelCatalog from the indexer for a given namespace and name. -func (s camelCatalogNamespaceLister) Get(name string) (*v1.CamelCatalog, error) { - obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(v1.Resource("camelcatalog"), name) - } - return obj.(*v1.CamelCatalog), nil -} diff --git a/vendor/github.com/apache/camel-k/pkg/client/camel/listers/camel/v1/expansion_generated.go b/vendor/github.com/apache/camel-k/pkg/client/camel/listers/camel/v1/expansion_generated.go deleted file mode 100644 index 3595705c1b..0000000000 --- a/vendor/github.com/apache/camel-k/pkg/client/camel/listers/camel/v1/expansion_generated.go +++ /dev/null @@ -1,60 +0,0 @@ -/* -Licensed to the Apache Software Foundation (ASF) under one or more -contributor license agreements. See the NOTICE file distributed with -this work for additional information regarding copyright ownership. -The ASF licenses this file to You 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 v1 - -// BuildListerExpansion allows custom methods to be added to -// BuildLister. -type BuildListerExpansion interface{} - -// BuildNamespaceListerExpansion allows custom methods to be added to -// BuildNamespaceLister. -type BuildNamespaceListerExpansion interface{} - -// CamelCatalogListerExpansion allows custom methods to be added to -// CamelCatalogLister. -type CamelCatalogListerExpansion interface{} - -// CamelCatalogNamespaceListerExpansion allows custom methods to be added to -// CamelCatalogNamespaceLister. -type CamelCatalogNamespaceListerExpansion interface{} - -// IntegrationListerExpansion allows custom methods to be added to -// IntegrationLister. -type IntegrationListerExpansion interface{} - -// IntegrationNamespaceListerExpansion allows custom methods to be added to -// IntegrationNamespaceLister. -type IntegrationNamespaceListerExpansion interface{} - -// IntegrationKitListerExpansion allows custom methods to be added to -// IntegrationKitLister. -type IntegrationKitListerExpansion interface{} - -// IntegrationKitNamespaceListerExpansion allows custom methods to be added to -// IntegrationKitNamespaceLister. -type IntegrationKitNamespaceListerExpansion interface{} - -// IntegrationPlatformListerExpansion allows custom methods to be added to -// IntegrationPlatformLister. -type IntegrationPlatformListerExpansion interface{} - -// IntegrationPlatformNamespaceListerExpansion allows custom methods to be added to -// IntegrationPlatformNamespaceLister. -type IntegrationPlatformNamespaceListerExpansion interface{} diff --git a/vendor/github.com/apache/camel-k/pkg/client/camel/listers/camel/v1/integration.go b/vendor/github.com/apache/camel-k/pkg/client/camel/listers/camel/v1/integration.go deleted file mode 100644 index cacac07ad9..0000000000 --- a/vendor/github.com/apache/camel-k/pkg/client/camel/listers/camel/v1/integration.go +++ /dev/null @@ -1,95 +0,0 @@ -/* -Licensed to the Apache Software Foundation (ASF) under one or more -contributor license agreements. See the NOTICE file distributed with -this work for additional information regarding copyright ownership. -The ASF licenses this file to You 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 v1 - -import ( - v1 "github.com/apache/camel-k/pkg/apis/camel/v1" - "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/tools/cache" -) - -// IntegrationLister helps list Integrations. -type IntegrationLister interface { - // List lists all Integrations in the indexer. - List(selector labels.Selector) (ret []*v1.Integration, err error) - // Integrations returns an object that can list and get Integrations. - Integrations(namespace string) IntegrationNamespaceLister - IntegrationListerExpansion -} - -// integrationLister implements the IntegrationLister interface. -type integrationLister struct { - indexer cache.Indexer -} - -// NewIntegrationLister returns a new IntegrationLister. -func NewIntegrationLister(indexer cache.Indexer) IntegrationLister { - return &integrationLister{indexer: indexer} -} - -// List lists all Integrations in the indexer. -func (s *integrationLister) List(selector labels.Selector) (ret []*v1.Integration, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1.Integration)) - }) - return ret, err -} - -// Integrations returns an object that can list and get Integrations. -func (s *integrationLister) Integrations(namespace string) IntegrationNamespaceLister { - return integrationNamespaceLister{indexer: s.indexer, namespace: namespace} -} - -// IntegrationNamespaceLister helps list and get Integrations. -type IntegrationNamespaceLister interface { - // List lists all Integrations in the indexer for a given namespace. - List(selector labels.Selector) (ret []*v1.Integration, err error) - // Get retrieves the Integration from the indexer for a given namespace and name. - Get(name string) (*v1.Integration, error) - IntegrationNamespaceListerExpansion -} - -// integrationNamespaceLister implements the IntegrationNamespaceLister -// interface. -type integrationNamespaceLister struct { - indexer cache.Indexer - namespace string -} - -// List lists all Integrations in the indexer for a given namespace. -func (s integrationNamespaceLister) List(selector labels.Selector) (ret []*v1.Integration, err error) { - err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { - ret = append(ret, m.(*v1.Integration)) - }) - return ret, err -} - -// Get retrieves the Integration from the indexer for a given namespace and name. -func (s integrationNamespaceLister) Get(name string) (*v1.Integration, error) { - obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(v1.Resource("integration"), name) - } - return obj.(*v1.Integration), nil -} diff --git a/vendor/github.com/apache/camel-k/pkg/client/camel/listers/camel/v1/integrationkit.go b/vendor/github.com/apache/camel-k/pkg/client/camel/listers/camel/v1/integrationkit.go deleted file mode 100644 index c5fb4231fd..0000000000 --- a/vendor/github.com/apache/camel-k/pkg/client/camel/listers/camel/v1/integrationkit.go +++ /dev/null @@ -1,95 +0,0 @@ -/* -Licensed to the Apache Software Foundation (ASF) under one or more -contributor license agreements. See the NOTICE file distributed with -this work for additional information regarding copyright ownership. -The ASF licenses this file to You 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 v1 - -import ( - v1 "github.com/apache/camel-k/pkg/apis/camel/v1" - "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/tools/cache" -) - -// IntegrationKitLister helps list IntegrationKits. -type IntegrationKitLister interface { - // List lists all IntegrationKits in the indexer. - List(selector labels.Selector) (ret []*v1.IntegrationKit, err error) - // IntegrationKits returns an object that can list and get IntegrationKits. - IntegrationKits(namespace string) IntegrationKitNamespaceLister - IntegrationKitListerExpansion -} - -// integrationKitLister implements the IntegrationKitLister interface. -type integrationKitLister struct { - indexer cache.Indexer -} - -// NewIntegrationKitLister returns a new IntegrationKitLister. -func NewIntegrationKitLister(indexer cache.Indexer) IntegrationKitLister { - return &integrationKitLister{indexer: indexer} -} - -// List lists all IntegrationKits in the indexer. -func (s *integrationKitLister) List(selector labels.Selector) (ret []*v1.IntegrationKit, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1.IntegrationKit)) - }) - return ret, err -} - -// IntegrationKits returns an object that can list and get IntegrationKits. -func (s *integrationKitLister) IntegrationKits(namespace string) IntegrationKitNamespaceLister { - return integrationKitNamespaceLister{indexer: s.indexer, namespace: namespace} -} - -// IntegrationKitNamespaceLister helps list and get IntegrationKits. -type IntegrationKitNamespaceLister interface { - // List lists all IntegrationKits in the indexer for a given namespace. - List(selector labels.Selector) (ret []*v1.IntegrationKit, err error) - // Get retrieves the IntegrationKit from the indexer for a given namespace and name. - Get(name string) (*v1.IntegrationKit, error) - IntegrationKitNamespaceListerExpansion -} - -// integrationKitNamespaceLister implements the IntegrationKitNamespaceLister -// interface. -type integrationKitNamespaceLister struct { - indexer cache.Indexer - namespace string -} - -// List lists all IntegrationKits in the indexer for a given namespace. -func (s integrationKitNamespaceLister) List(selector labels.Selector) (ret []*v1.IntegrationKit, err error) { - err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { - ret = append(ret, m.(*v1.IntegrationKit)) - }) - return ret, err -} - -// Get retrieves the IntegrationKit from the indexer for a given namespace and name. -func (s integrationKitNamespaceLister) Get(name string) (*v1.IntegrationKit, error) { - obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(v1.Resource("integrationkit"), name) - } - return obj.(*v1.IntegrationKit), nil -} diff --git a/vendor/github.com/apache/camel-k/pkg/client/camel/listers/camel/v1/integrationplatform.go b/vendor/github.com/apache/camel-k/pkg/client/camel/listers/camel/v1/integrationplatform.go deleted file mode 100644 index b9a223eb1e..0000000000 --- a/vendor/github.com/apache/camel-k/pkg/client/camel/listers/camel/v1/integrationplatform.go +++ /dev/null @@ -1,95 +0,0 @@ -/* -Licensed to the Apache Software Foundation (ASF) under one or more -contributor license agreements. See the NOTICE file distributed with -this work for additional information regarding copyright ownership. -The ASF licenses this file to You 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 v1 - -import ( - v1 "github.com/apache/camel-k/pkg/apis/camel/v1" - "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/tools/cache" -) - -// IntegrationPlatformLister helps list IntegrationPlatforms. -type IntegrationPlatformLister interface { - // List lists all IntegrationPlatforms in the indexer. - List(selector labels.Selector) (ret []*v1.IntegrationPlatform, err error) - // IntegrationPlatforms returns an object that can list and get IntegrationPlatforms. - IntegrationPlatforms(namespace string) IntegrationPlatformNamespaceLister - IntegrationPlatformListerExpansion -} - -// integrationPlatformLister implements the IntegrationPlatformLister interface. -type integrationPlatformLister struct { - indexer cache.Indexer -} - -// NewIntegrationPlatformLister returns a new IntegrationPlatformLister. -func NewIntegrationPlatformLister(indexer cache.Indexer) IntegrationPlatformLister { - return &integrationPlatformLister{indexer: indexer} -} - -// List lists all IntegrationPlatforms in the indexer. -func (s *integrationPlatformLister) List(selector labels.Selector) (ret []*v1.IntegrationPlatform, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1.IntegrationPlatform)) - }) - return ret, err -} - -// IntegrationPlatforms returns an object that can list and get IntegrationPlatforms. -func (s *integrationPlatformLister) IntegrationPlatforms(namespace string) IntegrationPlatformNamespaceLister { - return integrationPlatformNamespaceLister{indexer: s.indexer, namespace: namespace} -} - -// IntegrationPlatformNamespaceLister helps list and get IntegrationPlatforms. -type IntegrationPlatformNamespaceLister interface { - // List lists all IntegrationPlatforms in the indexer for a given namespace. - List(selector labels.Selector) (ret []*v1.IntegrationPlatform, err error) - // Get retrieves the IntegrationPlatform from the indexer for a given namespace and name. - Get(name string) (*v1.IntegrationPlatform, error) - IntegrationPlatformNamespaceListerExpansion -} - -// integrationPlatformNamespaceLister implements the IntegrationPlatformNamespaceLister -// interface. -type integrationPlatformNamespaceLister struct { - indexer cache.Indexer - namespace string -} - -// List lists all IntegrationPlatforms in the indexer for a given namespace. -func (s integrationPlatformNamespaceLister) List(selector labels.Selector) (ret []*v1.IntegrationPlatform, err error) { - err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { - ret = append(ret, m.(*v1.IntegrationPlatform)) - }) - return ret, err -} - -// Get retrieves the IntegrationPlatform from the indexer for a given namespace and name. -func (s integrationPlatformNamespaceLister) Get(name string) (*v1.IntegrationPlatform, error) { - obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(v1.Resource("integrationplatform"), name) - } - return obj.(*v1.IntegrationPlatform), nil -} diff --git a/vendor/github.com/google/go-containerregistry/pkg/name/tag.go b/vendor/github.com/google/go-containerregistry/pkg/name/tag.go index eac9ad1480..89c2358d5a 100644 --- a/vendor/github.com/google/go-containerregistry/pkg/name/tag.go +++ b/vendor/github.com/google/go-containerregistry/pkg/name/tag.go @@ -69,7 +69,7 @@ func (t Tag) Scope(action string) string { } func checkTag(name string) error { - return checkElement("tag", name, tagChars, 1, 127) + return checkElement("tag", name, tagChars, 1, 128) } // NewTag returns a new Tag representing the given name, according to the given strictness. diff --git a/vendor/golang.org/x/net/http2/transport.go b/vendor/golang.org/x/net/http2/transport.go index 76a92e0ca6..2482f7bf92 100644 --- a/vendor/golang.org/x/net/http2/transport.go +++ b/vendor/golang.org/x/net/http2/transport.go @@ -2525,6 +2525,7 @@ func strSliceContains(ss []string, s string) bool { type erringRoundTripper struct{ err error } +func (rt erringRoundTripper) RoundTripErr() error { return rt.err } func (rt erringRoundTripper) RoundTrip(*http.Request) (*http.Response, error) { return nil, rt.err } // gzipReader wraps a response body so it can lazily diff --git a/vendor/golang.org/x/net/publicsuffix/table.go b/vendor/golang.org/x/net/publicsuffix/table.go index 8e1c9d3dd8..ec2bde8cb2 100644 --- a/vendor/golang.org/x/net/publicsuffix/table.go +++ b/vendor/golang.org/x/net/publicsuffix/table.go @@ -2,7 +2,7 @@ package publicsuffix -const version = "publicsuffix.org's public_suffix_list.dat, git revision dbe9da0a8abeab1b6257c57668d1ecb584189951 (2020-05-27T00:50:31Z)" +const version = "publicsuffix.org's public_suffix_list.dat, git revision bdbe9dfd268d040fc826766b1d4e27dc4416fe73 (2020-08-10T09:26:55Z)" const ( nodesBitsChildren = 10 @@ -23,490 +23,492 @@ const ( ) // numTLD is the number of top level domains. -const numTLD = 1525 +const numTLD = 1518 // Text is the combined text of all labels. -const text = "9guacuiababia-goracleaningroks-theatree12hpalermomahachijoinvill" + - "eksvikaracoldwarszawabogadobeaemcloud66bjarkoyusuharabjerkreimdb" + - "altimore-og-romsdalipayokozebizenakanotoddenavuotnarashinobninsk" + - "aragandaustevoll-o-g-i-naval-d-aosta-valleyboltateshinanomachimk" + - "entateyamagrocerybnikeisenbahn4tatarantours3-ap-northeast-2ix443" + - "2-balsan-suedtirolkuszczytnoipirangamvik12bjugnieznord-frontierb" + - "lackfridayusuisservehumourbloombergbauernishiazaindielddanuorrin" + - "digenamsosnowiechernihivgubs3-website-sa-east-1bloxcms3-website-" + - "us-east-1bluedaemoneyuu2-localhostoregontrailroadrayddnsfreebox-" + - "osascoli-picenordre-landraydns3-website-us-west-1bmoattachments3" + - "-website-us-west-2bms5yuzawabmwedeploybnrwegroweibolognagasakind" + - "eroybomloabathsbchernivtsiciliabondrivefsnillfjordrobaknoluoktac" + - "hikawakuyabukievennodesadoes-itvedestrandrudupontariobranconakan" + - "iikawatanagurabonnishigoddabookinghostfoldnavyboomlair-traffic-c" + - "ontrolleyboschaefflerdalivornohtawaramotoineppueblockbustermezja" + - "mpagefrontapparachutinglobalashovhachinohedmarkarpaczeladzlglobo" + - "avistanbulsan-sudtirolombardynaliaskimitsubatamibugattiffanycher" + - "novtsymantechnologybostikaruizawabostonakijinsekikogentappsselfi" + - "paraglidinglogoweirbotanicalgardenishiharabotanicgardenishiizuna" + - "zukindustriabotanynysagaeroclubmedecincinnationwidealerbouncemer" + - "ckmsdnipropetrovskjervoyageometre-experts-comptablesakyotanabell" + - "unord-aurdalpha-myqnapcloudaccesscambridgeiseiyoichippubetsubets" + - "ugarugbydgoszczecinemagentositecnologiabounty-fullensakerryprope" + - "rtiesalangenishikatakinoueboutiquebechirurgiens-dentistes-en-fra" + - "ncebozen-sudtirolomzaporizhzhegurindustriesteamfamberkeleybozen-" + - "suedtirolondrinapleskarumaifarmsteadurbanamexhibitionishikatsura" + - "git-reposalondonetskasaokamiminersaltdalorenskogloppenzaolbia-te" + - "mpio-olbiatempioolbialystokkepnogatagajobojinfinitintelligencebp" + - "lacedogawarabikomaezakirunorddalotenkawabrandywinevalleybrasilia" + - "brindisibenikindlebtimnetzparisor-fronishikawazukamisunagawabris" + - "toloseyouriparliamentjomeloyalistoragebritishcolumbialowiezagani" + - "shimerabroadcastleclerchiryukyuragifuchungbukharavennagatorodoyb" + - "roadwaybroke-itjxfinitybrokerbronnoysundurhamburglugmbhartipscbg" + - "minakamichiharabrothermesaverdealstahaugesunderseaportsinfolldal" + - "ottebrowsersafetymarketsaludweberbrumunddalottokonamegatakazakin" + - "ternationalfirearmsalvadordalibabalena-devicesalzburgmodellingmx" + - "javald-aostarnbergretakanabeautysvardoesntexisteingeekashibataka" + - "tsukiyosatokamachintaifun-dnsdojolsterbrunelastxn--0trq7p7nnishi" + - "nomiyashironomutashinaintuitkmaxxn--11b4c3dynathomebuiltwithdark" + - "ashiharabrusselsamegawabruxellesamnangerbryansklepparmattelekomm" + - "unikationishinoomotegobrynewhollandyndns-at-homedepotenzamamidsu" + - "ndyndns-at-workisboringrimstadyndns-blogdnsampalacebuskerudinewj" + - "erseybuzentsujiiebuzzwellbeingzonebwfarsundyndns-freeboxosloftra" + - "nakanojoetsuwanouchikujogaszkolancashirecreationishinoshimatsuur" + - "abzhitomirumalatvuopmicrolightingripebzzcommunexus-2community-pr" + - "ochowicecomoarekecomparemarkerryhotelsantacruzsantafedjejuifmetl" + - "ifeinsurancecompute-1computerhistoryofscience-fictioncomsecurity" + - "tacticsantamariakecondoshichinohealth-carereformitakeharaconfere" + - "nceconstructionconsuladonnaharimalopolskanlandyndns-remotewdyndn" + - "s-serverisignconsultanthropologyconsultingrpartycontactozsdeltaj" + - "irittogliattis-a-caterercontagematsubaracontemporaryarteducation" + - "alchikugodontexistmein-iservebeercontractorskenconventureshinode" + - "arthruherecipescaravantaacookingchannelsdvrdnsfor-better-thanawa" + - "tchandclockasukabedzin-berlindasdaburcooluroycooperativano-frank" + - "ivskolefrakkestadyndns-webhopencraftrani-andria-barletta-trani-a" + - "ndriacopenhagencyclopedichofunatoriginstitutemasekashiwaracoprod" + - "uctionsantoandreamhostersanukis-a-celticsfancorsicagliaricoharuo" + - "vatraniandriabarlettatraniandriacorvettemp-dnsaobernardocosenzak" + - "opanecosidnshome-webserverdalutskasumigaurawa-mazowszexnetnedalu" + - "xurycostumedicinakaiwamizawatchesaogoncartoonartdecologiacouchpo" + - "tatofriesaotomeldaluzerncouklugsmilegallocus-3councilvivanovolda" + - "couponsapporocq-acranbrookuwanalyticsardegnarusawacrdyndns-wikir" + - "kenesardiniacreditcardyndns-workshopitsitexaskoyabearalvahkikuch" + - "ikuseikarugalsacecreditunioncremonashgabadaddjaguarqcxn--12cfi8i" + - "xb8lcrewildlifedorainfracloudfrontdoorcricketrzyncrimeast-kazakh" + - "stanangercrotonecrownipasadenaritakurashikis-a-chefashioncrsvpas" + - "sagensarlcruisesarpsborgruecryptonomichigangwoncuisinellajollame" + - "ricanexpressexyculturalcentertainmentranoycuneocupcakecuritiback" + - "yardsarufutsunomiyawakasaikaitakofuefukihaboromskoguidegreecurva" + - "lled-aostaverncymrussiacyonabaruminamidaitomanchestercyouthachio" + - "jiyahooguyfetsundynnsasayamafgujohanamakinoharafhvalerfidoomdnst" + - "racefieldynservebbsasebofagemologicallyngenfigueresinstagingulen" + - "filateliafilegear-audnedalnfilegear-deatnulvikatowicefilegear-gb" + - "izfilegear-iefilegear-jpmorganfilegear-sgunmanxn--1ck2e1bananare" + - "publicasertairaumalborkarasjohkamikoaniikappuboliviajessheimemor" + - "ialaziobserverevistaples3-external-1filminamifuranofinalfinancef" + - "ineartsavonarutomobellevuelosangelesjabbottransurlfinlandynufcfa" + - "nfinnoyfirebaseappatriafirenzefirestonefirmdalegoldpoint2thisami" + - "tsukefishingolffansaxofitjarvodkafjordynv6fitnessettlementrapani" + - "izafjalerflesberguovdageaidnunusualpersonflickragerogerschoenbru" + - "nnflightschokokekschokoladenflirfloginlinefloraflorencefloridats" + - "unanjoburgushikamifuranorth-kazakhstanfloripaderbornfloristanoha" + - "takaharunzenflorokunohealthcareerscholarshipschoolschulezajskats" + - "ushikabeeldengeluidynvpnplus-4flowerschulserverfltravelchannelfl" + - "ynnhosting-clusterfndyroyrvikinguitarsaskatchewanfor-ourfor-some" + - "dizinhistorischeschwarzgwangjuniperfor-theaterforexrothachirogat" + - "akanezawaforgotdnschweizforli-cesena-forlicesenaforlillehammerfe" + - "ste-ipaviancarrdforsaleikangerforsandasuologoipfizerfortalfortmi" + - "ssoulancasterfortworthadanorthwesternmutualfosnesciencecentersci" + - "encehistoryfotaruis-a-cubicle-slavellinodeobjectscientistordalfo" + - "xfordebianfozorafredrikstadtvscjohnsonfreeddnsgeekgalaxyfreedesk" + - "topocznore-og-uvdalfreemasonryfreesitextileirfjordfreetlscotland" + - "freiburgwiddleitungsenfreseniuscountryestateofdelawareggio-calab" + - "riafribourgxn--1ctwolominamatarnobrzegyptianfriuli-v-giuliafriul" + - "i-ve-giuliafriuli-vegiuliafriuli-venezia-giuliafriuli-veneziagiu" + - "liafriuli-vgiuliafriuliv-giuliafriulive-giuliafriulivegiuliafriu" + - "livenezia-giuliafriuliveneziagiuliafriulivgiuliafrlfroganscrappe" + - "r-sitefrognfrolandfrom-akrehamnfrom-alfrom-arfrom-azfrom-capetow" + - "nnews-stagingfrom-coffeedbackplaneapplinzis-a-democratravelersin" + - "surancefrom-ctrdfrom-dchonanbulsan-suedtirolowiczest-le-patronis" + - "hitosashimizunaminamibosogndalpusercontentoyotapartsandnessjoeni" + - "shiwakinvestmentsandoyfrom-dedyn-berlincolnfrom-flanderscrapping" + - "from-gaulardalfrom-hichisochildrensgardenfrom-iafrom-idfrom-ilfr" + - "om-in-brbanzaicloudcontrolledekagaminombresciaustraliamusementdl" + - "lpages3-ap-south-1kappchizip6116-b-dataiji234lima-cityeatselinog" + - "radult3l3p0rtatamotors3-ap-northeast-1337from-kscrysechoseiroumu" + - "enchenissandiegofrom-kyowariasahikawafrom-lanciafrom-mamurogawaf" + - "rom-mdfrom-meeresistancefrom-mifunefrom-mnfrom-modalenfrom-mserv" + - "eirchoshibuyachiyodapliernewspaperfrom-mtnfrom-nctulangevagrigen" + - "tomologyeonggiehtavuoatnagahamaroyerfrom-ndfrom-nefrom-nh-serveb" + - "logsiteleafamilycompanyanagawafflecellclaimserveminecraftrentin-" + - "sud-tirolfrom-njaworznoticiasnesoddenmarkhangelskjakdnepropetrov" + - "skiervaapsteiermarkatsuyamarugame-hostrowiechoyodobashichikashuk" + - "ujitawarafrom-nminamiiserniafrom-nvalledaostargetmyiphostrodawar" + - "afrom-nyfrom-ohkurafrom-oketogurafrom-orfrom-padovaksdalfrom-pra" + - "tohmandalfrom-ris-a-designerfrom-schmidtre-gauldalfrom-sdfrom-tn" + - "from-txn--1lqs03nfrom-utsiracusaikisarazurecontainerdpolicefrom-" + - "val-daostavalleyfrom-vtrentin-sudtirolfrom-wafrom-wielunnerfrom-" + - "wvallee-aosteroyfrom-wyfrosinonefrostalowa-wolawafroyahikobierzy" + - "cefstcgroupgfoggiafujiiderafujikawaguchikonefujiminokamoenairlin" + - "edre-eikerfujinomiyadattowebcampinashikiminohostre-totendofinter" + - "net-dnsaliasiafujiokayamangonohejis-a-doctorayfujisatoshonairpor" + - "tland-4-salernoboribetsuckservemp3fujisawafujishiroishidakabirat" + - "oridefenseljordfujitsurugashimangyshlakasamatsudovre-eikerfujixe" + - "roxn--1lqs71dfujiyoshidavvenjargap-northeast-3fukayabeatservep2p" + - "harmacienservepicservequakefukuchiyamadavvesiidappnodebalancerti" + - "ficationfukudominichristiansburgrondarfukuis-a-financialadvisor-" + - "aurdalfukumitsubishigakishiwadazaifudaigojomedio-campidano-medio" + - "campidanomediofukuokazakisofukushimaniwakuratefukuroishikarikatu" + - "rindalfukusakisosakitagawafukuyamagatakahatakaishimoichinosekiga" + - "harafunabashiriuchinadafunagatakamatsukawafunahashikamiamakusats" + - "umasendaisennangooglecodespotrentin-sued-tirolfundaciofuoiskujuk" + - "uriyamannorfolkebibleirvikaufenfuosskoczowilliamhillfurnitureggi" + - "o-emilia-romagnakatombetsumitakagiizefurubirafurudonostiaafuruka" + - "wairtelebitbridgestonekobayashikshacknetcimbarcelonagawalmartatt" + - "oolforgehimejiitatebayashijonawatempresashibetsukuiiyamanouchiku" + - "hokuryugasakitaurayasudaustrheimatunduhrennesoyokosukanumazuryok" + - "oteastcoastaldefenceatonsbergjerdrumemergencyachts3-ca-central-1" + - "fusodegaurafussaintlouis-a-anarchistoireggiocalabriafutabayamagu" + - "chinomigawafutboldlygoingnowhere-for-morenakatsugawafuttsurugimp" + - "eriafuturecmservesarcasmatartanddesignfuturehostingfuturemailing" + - "fvgfylkesbiblackbaudcdn77-securebungoonord-odalfyresdalhangoutsy" + - "stemscloudhannanmokuizumodenaklodzkochikushinonsenergyhannosegaw" + - "ahanyuzenhapmircloudharstadharvestcelebrationhasamarburghasamina" + - "mi-alpsharis-a-hunterhashbanghasudahasura-appharmacysharphdfcban" + - "kazoologyhasvikazunow-dnshawaiijimaritimoduminamimakis-a-knightp" + - "ointtohobby-sitehatogayaitakaokalmykiahatoyamazakitakamiizumisan" + - "ofidelityhatsukaichikaiseiheijis-a-landscaperugiahattfjelldalhay" + - "ashimamotobungotakadagestangeorgeorgiahazuminobusells-for-usrcfa" + - "stlylbamblebesbyglandroverhalla-speziaustinnavigationavoizumizak" + - "ibigawajudaicable-modemocraciabruzzoologicalvinklein-addrammenuo" + - "rochesterimo-i-ranaamesjevuemielno-ipifonyaaarborteaches-yogasaw" + - "aracingdyniaetnabudapest-a-la-masion-riopretobamaceratabuseating" + - "-organic66helsinkitakatakarazukaluganskygearapphiladelphiaareadm" + - "yblogspotrentino-a-adigehembygdsforbundhemneshellaspeziahemsedal" + - "hepforgeherokussldheroyhgtvallee-d-aosteigenhidorahigashiagatsum" + - "agoianiahigashichichibunkyonanaoshimageandsoundandvisionthewifia" + - "tmallorcadaqueshimokawahigashihiroshimanehigashiizumozakitakyush" + - "uaiahigashikagawahigashikagurasoedahigashikawakitaaikitamihamada" + - "higashikurumeetrentino-aadigehigashimatsushimarcheapigeelvinckdd" + - "iethnologyhigashimatsuyamakitaakitadaitoigawahigashimurayamamoto" + - "rcycleshimokitayamahigashinarusells-itrentino-alto-adigehigashin" + - "ehigashiomihachimanagementrentino-altoadigehigashiosakasayamanak" + - "akogawahigashishirakawamatakasagoppdalhigashisumiyoshikawaminami" + - "aikitamotosumy-gatewayhigashitsunoshiroomurahigashiurausukitanak" + - "agusukumodernhigashiyamatokoriyamanashiibahccavuotnagareyamainte" + - "nancehigashiyodogawahigashiyoshinogaris-a-lawyerhiraizumisatohno" + - "shoooshikamaishimofusartshimonitayanagithubusercontentrentino-s-" + - "tirolhirakatashinagawahiranairtrafficplexus-1hirarahiratsukagawa" + - "hirayaizuwakamatsubushikusakadogawahistorichouseshimonosekikawah" + - "itachiomiyagildeskaliszhitachiotagotembaixadahitraeumtgeradelmen" + - "horstalbanshimosuwalkis-a-liberalhjartdalhjelmelandholeckodairah" + - "olidayhomeiphilatelyhomelinkitoolsztynsettlershimotsukehomelinux" + - "n--1qqw23ahomeofficehomesecuritymacaparecidahomesecuritypchristm" + - "aseratiresandvikcoromantovalle-d-aostatic-accessanfranciscofreak" + - "unemurorangehirnrtoyotomiyazakinzais-a-candidatehomesenseeringho" + - "meunixn--2m4a15ehondahongotpantheonsitehonjyoitakasakitashiobara" + - "hornindalhorsellsyourhomegoodshimotsumahorteneis-a-libertarianho" + - "spitalhoteleshinichinanhotmailhoyangerhoylandetroitskypehumaniti" + - "eshinjournalismailillesandefjordhurdalhurumajis-a-linux-useranis" + - "hiaritabashikaoirminamiminowahyllestadhyogoris-a-llamarriottrent" + - "ino-stirolhyugawarahyundaiwafuneis-very-badajozis-very-evillagei" + - "s-very-goodyearis-very-niceis-very-sweetpepperis-with-thebandois" + - "leofmanaustdaljevnakershuscultureggioemiliaromagnamsskoganeis-a-" + - "nascarfanjewelryjewishartgalleryjfkharkivalleedaostejgorajlljls-" + - "sto1jmphotographysiojnjcphonefosshintomikasaharajoyentrentino-su" + - "edtiroljoyokaichibajddarchitecturealtorlandjpnjprshiojirishirifu" + - "jiedajurkosherbrookegawakoshimizumakizunokunimimatakayamarylandk" + - "oshunantankhersonkosugekotohiradomainsurehabmerkotourakouhokutam" + - "akis-a-patsfankounosupplieshirakokaminokawanishiaizubangekouyama" + - "shikekouzushimashikis-a-personaltrainerkozagawakozakis-a-photogr" + - "apherokuapphilipsyno-dshinjukumanowtvalleeaosteinkjerusalembroid" + - "erykozowindmillkpnkppspdnshiranukamitsuekrasnikahokutokashikis-a" + - "-playershifteditchyouriphoenixn--2scrj9chromedicaltanissettaishi" + - "nomakinkobeardubaiduckdnsangokrasnodarkredstonekristiansandcatsh" + - "iraois-a-republicancerresearchaeologicaliforniakristiansundkrods" + - "heradkrokstadelvaldaostarostwodzislawindowskrakowinnershiraokamo" + - "gawakryminamioguni5kumatorinokumejimasoykumenantokigawakunisakis" + - "-a-rockstarachowicekunitachiarailwaykunitomigusukumamotoyamashik" + - "okuchuokunneppubtlshiratakahagitlaborkunstsammlungkunstunddesign" + - "kuokgroupilotshishikuis-a-socialistdlibestadkureisenkurgankurobe" + - "laudibleasingleshisognekurogiminamiashigarakuroisoftwarezzokurom" + - "atsunais-a-soxfankurotakikawasakis-a-studentalkushirogawakustana" + - "is-a-teacherkassyncloudkusupplykutchanelkutnokuzumakis-a-techiet" + - "is-a-musiciankvafjordkvalsundkvamlidlugolekadenagaivuotnagaokaky" + - "otambabyenebakkeshibechambagriculturennebudejjuedischesapeakebay" + - "ernukvanangenkvinesdalkvinnheradkviteseidatingkvitsoykwpspectrum" + - "inamisanrikubetsurfastvps-serveronakasatsunairguardiannakadomari" + - "nebraskauniversitychyattorneyagawakembuchikumagayagawakkanaibets" + - "ubamericanfamilydsclouderackmazerbaijan-mayen-rootaribeiraogashi" + - "madachicagoboatsassaris-a-conservativegarsheis-a-cpadualstackher" + - "o-networkinggroupassenger-associationkzmissileluxembourgmisugito" + - "kuyamatsumotofukemitourismolanxesshitaramamitoyoakemiuramiyazure" + - "websiteshikagamiishibukawamiyotamanomjondalenmlbfanmontrealestat" + - "efarmequipmentrentinoa-adigemonza-brianzapposhizukuishimogosenmo" + - "nza-e-della-brianzaptokyotangotsukitahatakamoriokakegawamonzabri" + - "anzaramonzaebrianzamonzaedellabrianzamoonscaleforcemordoviamoriy" + - "amatsunomoriyoshiminamiawajikis-an-actormormonstermoroyamatsusak" + - "ahoginankokubunjis-an-actresshinshinotsurgerymortgagemoscowioshi" + - "zuokanagawamoseushistorymosjoenmoskeneshoppingmosshopwarendalenu" + - "gmosvikhmelnytskyivaomoteginowaniihamatamakawajimansionshoujis-a" + - "n-anarchistoricalsocietymoviemovimientolgamozilla-iotrentinoaadi" + - "gemtranbymuenstermuginozawaonsenmuikamisatokaizukamikitayamatsur" + - "is-an-artistgorymukoebenhavnmulhouseoullensvanguardmunakatanemun" + - "cienciamuosattemupimientakkoelnmurmanskhplaystation-cloudmurotor" + - "craftrentinoalto-adigemusashimurayamatsushigemusashinoharamuseet" + - "rentinoaltoadigemuseumverenigingmusicargodaddyn-vpndnshowamutsuz" + - "awamy-vigorgemy-wanggouvichungnamdalseidfjordyndns-mailubindalub" + - "lindesnesanjotoyotsukaidomyactivedirectorymyasustor-elvdalmycdn7" + - "7-sslattuminamitanemydattolocalhistorymyddnskingmydissentrentino" + - "s-tirolmydobisshikis-an-engineeringmydroboehringerikemydshowtime" + - "lhusdecorativeartshriramsterdamnserverbaniamyeffectrentinostirol" + - "myfastly-terrariuminamiuonumasudamyfirewallonieruchomoscienceand" + - "industrynmyforuminamiyamashirokawanabelembetsukubankhmelnitskiya" + - "marumorimachidamyfritzmyftpaccesshwitdklabudhabikinokawabarthads" + - "electrentin-suedtirolmyhome-servermyjinomykolaivaporcloudmymaile" + - "rmymediapchurcharternidyndns-office-on-the-webhareidsbergentingr" + - "ongausdalucaniamyokohamamatsudamypepinkmpspbarclays3-sa-east-1my" + - "petsienarviikamishihoronobeauxartsandcraftsigdalmyphotoshibalati" + - "nogiftsilknx-serversailleshioyandexcloudmypictetrentinosud-tirol" + - "mypsxn--32vp30haebaruericssongdalenviknakayamaoris-a-geekautokei" + - "notteroymysecuritycamerakermyshopblocksimple-urlmytis-a-bookkeep" + - "erspectakasugais-an-entertainermytuleaprendemasakikonaikawachina" + - "ganoharamcoachampionshiphoptobishimadridvagsoygardendoftheintern" + - "etlifyis-bytomaritimekeepingmyvncircustomer-ociprianiigataitogit" + - "suldaluccarbonia-iglesias-carboniaiglesiascarboniamywirepbodynam" + - "ic-dnsirdalplatformshangrilapyplatter-appioneerplatterpippugliap" + - "lazaplcube-serversicherungplumbingoplurinacionalpodhalevangerpod" + - "lasiellaktyubinskiptveterinaireadthedocscappgafannefrankfurtrent" + - "inosudtirolpodzonepohlpoivronpokerpokrovskomakiyosunndalpolitica" + - "rrierpolitiendapolkowicepoltavalle-aostathellewismillerpomorzesz" + - "owithgoogleapiszponpesaro-urbino-pesarourbinopesaromasvuotnaroyp" + - "onypordenonepornporsangerporsangugeporsgrunnanyokoshibahikariwan" + - "umatamayufuelveruminanopoznanpraxis-a-bruinsfanprdpreservationpr" + - "esidioprgmrprimelbourneprincipeprivatizehealthinsuranceprofesion" + - "alprogressivenneslaskerrylogisticslupskomatsushimarylhurstjordal" + - "shalsenpromombetsurgeonshalloffameiwamassa-carrara-massacarraram" + - "assabusinessebyklecznagasukepropertyprotectionprotonetrentinosue" + - "d-tirolprudentialpruszkowithyoutuberspacekitagatargivestbytemark" + - "omforbarefootballooningjerstadotsuruokakamigaharauthordalandds3-" + - "eu-central-1prvcyberlevagangaviikanonjis-certifieducatorahimeshi" + - "mamateramobaraprzeworskogptplusgardenpulawypupittsburghofficialp" + - "vhagakhanamigawapvtrentinosuedtirolpwcistrondheimmobilienissayok" + - "kaichiropractichitachinakagawassamukawatarightathomeftparocherni" + - "governmentksatxn--12c1fe0bradescorporationrenderpzqhagebostadqld" + - "qponiatowadaqslingqualifioappiwatequickconnectrentinsud-tirolqui" + - "cksytestingquipelementslzqvcitadeliveryggeesusonosuzakanazawasuz" + - "ukaneyamazoesuzukis-into-animegurownprovidersvalbardunloppacific" + - "ivilaviationissedalucernesveiosvelvikomorotsukaminoyamaxunjargas" + - "vizzerasvn-reposologneswidnicasacamdvrcampinagrandebuilderschles" + - "ischesolundbeckommunalforbundswidnikkokonoeswiebodzin-butterswif" + - "tcoverswinoujscienceandhistoryswissmarterthanyousynology-disksta" + - "tionsynology-dsolutionsnoasakakinokiaturystykanmakiwientuscanytu" + - "shuissier-justicetuvalle-daostaticsootuxfamilytwmailvestnesopotr" + - "entinsudtirolvestre-slidreviewsaitoshimayfirstockholmestrandvest" + +const text = "9guacuiababia-goracleaningroks-theatree12hpalermomahachijolstere" + + "trosnubalsfjorddnslivelanddnss3-ap-south-1kappchizip6116-b-datai" + + "ji234lima-cityeatselinogradult3l3p0rtatamotors3-ap-northeast-133" + + "7birkenesoddtangenovaranzaninohekinannestadivttasvuotnakamuratak" + + "ahamalselvendrellimitediyukuhashimojindianapolis-a-bloggerbirthp" + + "lacebjarkoyurihonjournalistjohninomiyakonojorpelandnpanamatta-va" + + "rjjatjeldsundrangedalimoliseminebjerkreimdbamblebesbyglandroverh" + + "alla-speziaustevollaziobihirosakikamijimatsuzakibigawagrocerybni" + + "keisenbahnatuurwetenschappenaumburgdyniabogadobeaemcloud66bjugni" + + "eznord-frontierblackfridayusuharabloombergbauernirasakindianmark" + + "etingjesdalinkyard-cloudyclusterbloxcms3-website-us-west-2blueda" + + "gestangeologyusuisservehumourbmoattachments5yuulmemorialivornoce" + + "anographiquebmsakyotanabellunord-aurdalpha-myqnapcloudaccesscamb" + + "ridgeiseiyoichippubetsubetsugarugbydgoszczecinemagentositechnolo" + + "gyuzawabmweddingjovikariyameinforumzjampagexlombardynaliaskimits" + + "ubatamibugattiffanycateringebuildingladefinimakanegasakirabnrwed" + + "eploybomloabathsbcatholicaxiashorokanaiebondray-dnstracebonnishi" + + "azaindielddanuorrindigenaklodzkodairabookinghostedpictethnologyb" + + "oomlair-traffic-controlleyboschaefflerdalomzaporizhzhegurindustr" + + "iabostikarlsoybostonakijinsekikogentappsselfipanasonichernihivgu" + + "bsalangenishigocelotenkawabotanicalgardenishiharabotanicgardenis" + + "hiizunazukindustriesteamsterdamnserverbaniabotanynysagaeroclubme" + + "decincinnationwidealerbouncemerckmsdnipropetrovskjervoyagets-itj" + + "maxxxboxenapponazure-mobilebounty-fullensakerrypropertiesalondon" + + "etskarmoyboutiquebechernivtsiciliabozen-sudtirolondrinamsskogane" + + "infinitintelligencebozen-suedtirolorenskoglassassinationalherita" + + "gebplacedogawarabikomaezakirunorddalottebrandywinevalleybrasilia" + + "brindisibenikinderoybristoloseyouriparachutingleezebritishcolumb" + + "ialowiezaganishikatakinouebroadcastlebtimnetzlglitchattanooganor" + + "dlandrayddnsfreebox-osascoli-picenordre-landraydnsupdaternopilaw" + + "atchesaltdalottokonamegatakazakinternationalfirearmsaludrivefsni" + + "llfjordrobaknoluoktachikawakuyabukievennodesadoes-itvedestrandru" + + "dupontariobranconakaniikawatanagurabroadwaybroke-itjomeloyalisto" + + "ragebrokerbronnoysundurbanamexhibitionishikatsuragit-reposalvado" + + "rdalibabalena-devicesalzburgliwicebrothermesaverdealstahaugesund" + + "erseaportsinfolldalouvreisenishikawazukamisunagawabrowsersafetym" + + "arketsamegawabrumunddalowiczest-le-patronishimerabrunelastxfinit" + + "ybrusselsamnangerbruxellesampalacebryansklepparaglidinglobalasho" + + "vhachinohedmarkarpaczeladzparisor-fronishinomiyashironocparliame" + + "ntjxjavald-aostarnbergloboavistanbulsan-sudtirolpusercontentkmax" + + "xn--0trq7p7nnishinoomotegoddabrynewhollandurhamburglogowegroweib" + + "olognagareyamakeupowiathletajimabaridagawalbrzycharitydalaskanit" + + "tedallasalleangaviikaascolipicenodumemsettsupportksatxn--11b4c3d" + + "ynathomebuiltwithdarkaruizawabuskerudinewjerseybuzentsujiiebuzzw" + + "eirbwellbeingzonebzhitomirumalatvuopmicrolightingloppenzaolbia-t" + + "empio-olbiatempioolbialystokkepnogatagajobojintuitmparmattelekom" + + "munikationishinoshimatsuurabzzcolumbusheycommunexus-2community-p" + + "rochowicecomoarekecomparemarkerryhotelsaobernardocompute-1comput" + + "erhistoryofscience-fictioncomsecuritytacticsxn--12cfi8ixb8luxury" + + "condoshichinohealth-carereformitakeharaconferenceconstructioncon" + + "suladonnagatorodoyconsultanthropologyconsultingrondarcontactozsd" + + "eltajirittogliattis-a-chefashioncontagematsubaracontemporaryarte" + + "ducationalchikugodontexistmein-iservebeercontractorskenconventur" + + "eshinodearthruherecipescaravantaacookingchannelsdvrdnsdojoburgro" + + "ngausdaluzerncoolvivanovoldacooperativano-frankivskolefrakkestad" + + "yndns1copenhagencyclopedichitosetogakushimotoganewspapercoproduc" + + "tionsaogoncartoonartdecologiacorporationcorsicagliaricoharuovatm" + + "allorcadaquesaotomeldalcorvettemasekashiwazakiyosemitecosenzakop" + + "anelblagrarchaeologyeongbuk0cosidnsfor-better-thanawassamukawata" + + "rikuzentakatajimidorissagamiharacostumedicinaharimalopolskanland" + + "ynnsapporocouchpotatofriesardegnaroycouklugsmilegallocus-3counci" + + "lcouponsardiniacozoracq-acranbrookuwanalyticsarlcrdynservebbsarp" + + "sborgrossetouchihayaakasakawaharacreditcardynulvikasserversaille" + + "sarufutsunomiyawakasaikaitakofuefukihaboromskogroundhandlingrozn" + + "ycreditunioncremonashgabadaddjaguarqcxn--12co0c3b4evalleaostavan" + + "gercrewiencricketrzyncrimeast-kazakhstanangercrotonecrownipartsa" + + "sayamacrsvpartycruisesasebofageometre-experts-comptablesaskatche" + + "wancryptonomichigangwoncuisinellajollamericanexpressexyculturalc" + + "entertainmentrani-andria-barletta-trani-andriacuneocupcakecuriti" + + "backyardsassaris-a-conservativegarsheis-a-cpadualstackhero-netwo" + + "rkinggroupasadenarashinocurvalled-aostaverncymrussiacyonabarumet" + + "lifeinsurancecyouthachiojiyaitakanezawafetsundyroyrvikingrpassag" + + "ensaudafguidegreefhvalerfidoomdnsiskinkyotobetsulikes-piedmontic" + + "ellodingenfieldfigueresinstaginguitarsavonarusawafilateliafilege" + + "ar-audnedalnfilegear-deatnunusualpersonfilegear-gbizfilegear-ief" + + "ilegear-jpmorganfilegear-sgujoinvilleitungsenfilminamiechizenfin" + + "alfinancefineartsaxofinlandfinnoyfirebaseappassenger-association" + + "firenetranoyfirenzefirestonefirmdalegoldpoint2thisamitsukefishin" + + "golffanschoenbrunnfitjarvodkafjordvalledaostargetmyiphostre-tote" + + "ndofinternet-dnschokokekschokoladenfitnessettlementransportefjal" + + "erflesbergulenflickragerogerscholarshipschoolschulezajskasuyanai" + + "zunzenflightschulserverflirfloginlinefloraflorencefloridatsunanj" + + "oetsuwanouchikujogaszkolancashirecreationfloripaderbornfloristan" + + "ohatakaharuslivinghistoryflorokunohealthcareerschwarzgwangjunipe" + + "rflowerschweizfltransurlflynnhosting-clusterfndfor-ourfor-somedi" + + "zinhistorischesciencecentersciencehistoryfor-theaterforexrothach" + + "irogatakaokalmykiaforgotdnscientistordalforli-cesena-forlicesena" + + "forlillehammerfeste-ipatriaforsaleikangerforsandasuologoipavianc" + + "arrdfortalfortmissoulancasterfortworthadanorthwesternmutualfosne" + + "scjohnsonfotaruis-a-democratrapaniizafoxfordebianfozfredrikstadt" + + "vscrapper-sitefreeddnsgeekgalaxyfreedesktopensocialfreemasonryfr" + + "eesitexaskoyabearalvahkikuchikuseikarugalsaceofreetlscrappingunm" + + "anxn--1ctwolominamatarnobrzegyptianfreiburguovdageaidnusrcfastly" + + "lbananarepublicaseihicampobassociatest-iservecounterstrikehimeji" + + "itatebayashijonawatempresashibetsukuiiyamanouchikuhokuryugasakit" + + "auraustinnaval-d-aosta-valleyokosukanumazuryokoteastcoastaldefen" + + "ceatonsbergivingjemnes3-eu-central-1freseniuscountryestateofdela" + + "wareggio-calabriafribourgushikamifuranorth-kazakhstanfriuli-v-gi" + + "uliafriuli-ve-giuliafriuli-vegiuliafriuli-venezia-giuliafriuli-v" + + "eneziagiuliafriuli-vgiuliafriuliv-giuliafriulive-giuliafriuliveg" + + "iuliafriulivenezia-giuliafriuliveneziagiuliafriulivgiuliafrlfrog" + + "anscrysechocolatelemarkarumaifarsundyndns-homednsamsungmodelling" + + "mxn--12c1fe0bradescotlandyndns-iparochernigovernmentoyotaparsand" + + "nessjoenishiokoppegardyndns-mailubindalublindesnesandoyfrognfrol" + + "andfrom-akrehamnfrom-alfrom-arfrom-azfrom-capetownnews-stagingwi" + + "ddleksvikaszubyfrom-coffeedbackplaneapplinzis-a-designerfrom-ctr" + + "avelchannelfrom-dchofunatoriginstitutelevisionthewifiatoyotomiya" + + "zakinuyamashinatsukigatakashimarnardalucaniafrom-dedyn-berlincol" + + "nfrom-flanderserveirchonanbulsan-suedtiroluccarbonia-iglesias-ca" + + "rboniaiglesiascarboniafrom-gaulardalfrom-hichisochildrensgardenf" + + "rom-iafrom-idfrom-ilfrom-in-brbar0emmafann-arboretumbriamallamac" + + "eiobbcg12038from-kserveminecraftravelersinsurancefrom-kyowariasa" + + "hikawawiiheyakumoduminamifuranofrom-lanciafrom-mamurogawafrom-md" + + "from-meeresistancefrom-mifunefrom-mnfrom-modalenfrom-mservemp3fr" + + "om-mtnfrom-nctulangevagrigentomologyeonggiehtavuoatnabudapest-a-" + + "la-masion-riopretobamaceratabuseating-organichoseiroumuenchenish" + + "itosashimizunaminamibosogndalucernefrom-ndfrom-nefrom-nh-servebl" + + "ogsiteleafamilycompanyanagawafflecellclaimservep2pfizerfrom-njaw" + + "orznoticiasnesoddenmarkhangelskjakdnepropetrovskiervaapsteiermar" + + "katowicefrom-nminamiiserniafrom-nvallee-aosteroyfrom-nyfrom-ohku" + + "rafrom-oketogurafrom-orfrom-padovaksdalfrom-pratohmandalfrom-ris" + + "-a-doctorayfrom-schmidtre-gauldalfrom-sdfrom-tnfrom-txn--1lqs03n" + + "from-utsiracusaikisarazurecontainerdpolicefrom-val-daostavalleyf" + + "rom-vtrdfrom-wafrom-wiardwebhostingxn--1lqs71dfrom-wvallee-d-aos" + + "teigenfrom-wyfrosinonefrostalowa-wolawafroyahooguyfstcgroupgfogg" + + "iafujiiderafujikawaguchikonefujiminokamoenairguardiannakadomarin" + + "ebraskauniversitychyattorneyagawakembuchikumagayagawakkanaibetsu" + + "bamericanfamilydsclouderackmazerbaijan-mayen-rootaribeiraogashim" + + "adachicagoboatservepicservequakefujinomiyadattowebcampinashikimi" + + "nohostfoldnavyfujiokayamangonohejis-a-financialadvisor-aurdalfuj" + + "isatoshonairlinedre-eikerfujisawafujishiroishidakabiratoridefens" + + "eljordfujitsurugashimangyshlakasamatsudopaasiafujixeroxn--1qqw23" + + "afujiyoshidavvenjargap-northeast-3fukayabeatservesarcasmatartand" + + "designfukuchiyamadavvesiidappnodebalancertificationfukudomigawaf" + + "ukuis-a-geekatsushikabeeldengeluidfukumitsubishigakishiwadazaifu" + + "daigojomedio-campidano-mediocampidanomediofukuokazakisofukushima" + + "niwakuratextileirfjordfukuroishikarikaturindalfukusakisosakitaga" + + "wafukuyamagatakahatakaishimoichinosekigaharafunabashiriuchinadaf" + + "unagatakamatsukawafunahashikamiamakusatsumasendaisennangooglecod" + + "espotrentin-sud-tirolfundaciofunkfeuerfuoiskujukuriyamannore-og-" + + "uvdalfuosskoczowildlifedorainfracloudfrontdoorfurnitureggio-emil" + + "ia-romagnakasatsunairportland-4-salernoboribetsuckservicesevasto" + + "polefurubirafurudonostiaafurukawairtelebitbridgestonekobayashiks" + + "hacknetcimbar1fusodegaurafussaintlouis-a-anarchistoireggiocalabr" + + "iafutabayamaguchinomihachimanagementrentin-sudtirolfutboldlygoin" + + "gnowhere-for-morenakatombetsumitakagiizefuttsurugimperiafuturecm" + + "sevenassisicilyfuturehostingfuturemailingfvgfyresdalhangoutsyste" + + "mscloudhannanmokuizumodenakayamapartmentsharpharmacienshawaiijim" + + "aritimoldeloittemp-dnshellaspeziahannosegawahanyuzenhapmircloudh" + + "arstadharvestcelebrationhasamarburghasaminami-alpshimokawahashba" + + "nghasudahasura-appharmacyshimokitayamahasvikatsuyamarugame-hosty" + + "hostinghatogayaizuwakamatsubushikusakadogawahatoyamazakitakamiiz" + + "umisanofidelityhatsukaichikaiseiheijis-a-landscaperugiahattfjell" + + "dalhayashimamotobungotakadancehazuminobusells-for-utwentehelsink" + + "itakatakarazukaluganskygearapphdfcbankaufenhembygdsforbundhemnes" + + "himonitayanagithubusercontentrentin-suedtirolhemsedalhepforgeher" + + "okusslattuminamiizukaminoyamaxunjargaheroyhgtvalleeaosteinkjerus" + + "alembroideryhidorahigashiagatsumagoianiahigashichichibunkyonanao" + + "shimageandsoundandvisionrenderhigashihiroshimanehigashiizumozaki" + + "takyushuaiahigashikagawahigashikagurasoedahigashikawakitaaikitam" + + "ihamadahigashikurumeetrentino-a-adigehigashimatsushimarcheapigee" + + "lvinckautokeinotteroyhigashimatsuyamakitaakitadaitoigawahigashim" + + "urayamamotorcycleshimonosekikawahigashinarusells-itrentino-aadig" + + "ehigashinehigashiomitamamurausukitamotosumy-gatewayhigashiosakas" + + "ayamanakakogawahigashishirakawamatakasagopocznorfolkebibleirvika" + + "zoologyhigashisumiyoshikawaminamiaikitanakagusukumodernhigashits" + + "unoshiroomurahigashiurawa-mazowszexnetrentino-alto-adigehigashiy" + + "amatokoriyamanashiibahccavuotnagaraholtaleniwaizumiotsukumiyamaz" + + "onawsmpplanetariuminamimakis-a-lawyerhigashiyodogawahigashiyoshi" + + "nogaris-a-liberalhiraizumisatohnoshoooshikamaishimofusartshimosu" + + "walkis-a-libertarianhirakatashinagawahiranairtrafficplexus-1hira" + + "rahiratsukagawahirayakagehistorichouseshimotsukehitachiomiyagild" + + "eskaliszhitachiotagotembaixadahitraeumtgeradelmenhorstalbanshimo" + + "tsumahjartdalhjelmelandholeckochikushinonsenergyholidayhomegoods" + + "hinichinanhomeiphiladelphiaareadmyblogspotrentino-altoadigehomel" + + "inkitoolsztynsettlershinjournalismailillesandefjordhomelinuxn--2" + + "m4a15ehomeofficehomesecuritymacaparecidahomesecuritypchoshibuyac" + + "htsandvikcoromantovalle-d-aostatic-accessanfranciscofreakunemuro" + + "rangehirnrtoyotsukaidohtawaramotoineppueblockbustermezhomesensee" + + "ringhomeunixn--2scrj9choyodobashichikashukujitawarahondahongotpa" + + "ntheonsitehonjyoitakasakitashiobarahornindalhorsellsyourhomeftph" + + "ilatelyhorteneis-a-linux-useranishiaritabashikaoirminamiminowaho" + + "spitalhoteleshinjukumanowtvalleedaostehotmailhoyangerhoylandetro" + + "itskypehumanitieshinkamigotoyohashimototalhurdalhurumajis-a-llam" + + "arriottrentino-s-tirolhyllestadhyogoris-a-musicianhyugawarahyund" + + "aiwafuneis-very-evillageis-very-goodyearis-very-niceis-very-swee" + + "tpepperis-with-thebandownloadisleofmanaustdaljetztrentino-sudtir" + + "oljevnakershuscultureggioemiliaromagnamsosnowiechristiansburgret" + + "akanabeautysvardoesntexisteingeekasaokamikoaniikappuboliviajessh" + + "eimpertrixcdn77-ssldyndns-office-on-the-weberjewelryjewishartgal" + + "leryjfkfhappoujgorajlljls-sto1jmphotographysiojnjcloudjiffylkesb" + + "iblackbaudcdn77-securebungoonord-odaljoyentrentino-sued-tiroljoy" + + "okaichibajddarchitecturealtorlandjpnjprshirakokamiminershiranuka" + + "mitsuejurkosakaerodromegallupinbarclaycards3-sa-east-1koseis-a-p" + + "ainteractivegaskvollkosherbrookegawakoshimizumakizunokunimimatak" + + "ayamarylandkoshunantankharkivanylvenicekosugekotohiradomainsureg" + + "ruhostingkotourakouhokutamakis-a-patsfankounosupplieshiraois-a-p" + + "ersonaltrainerkouyamashikekouzushimashikis-a-photographerokuapph" + + "ilipsynology-diskstationkozagawakozakis-a-playershifteditchyouri" + + "phoenixn--30rr7ykozowinbarclays3-us-east-2kpnkppspdnshiraokamoga" + + "wakrasnikahokutokashikis-a-republicancerresearchaeologicaliforni" + + "akrasnodarkredstonekristiansandcatshiratakahagitlaborkristiansun" + + "dkrodsheradkrokstadelvaldaostarostwodzislawindmillkryminamioguni" + + "5kumatorinokumejimasoykumenantokigawakunisakis-a-rockstarachowic" + + "ekunitachiarailwaykunitomigusukumamotoyamashikokuchuokunneppubtl" + + "shishikuis-a-socialistdlibestadkunstsammlungkunstunddesignkuokgr" + + "oupilotshisognekurehabmerkurgankurobelaudibleasingleshisuifuette" + + "rtdasnetzkurogiminamiashigarakuroisoftwarezzokuromatsunais-a-sox" + + "fankurotakikawasakis-a-studentalkushirogawakustanais-a-teacherka" + + "ssyno-dshinshinotsurgerykusupplynxn--3bst00minamisanrikubetsurfa" + + "uskedsmokorsetagayaseralingenoamishirasatogokasells-for-lessauhe" + + "radynv6kutchanelkutnokuzumakis-a-techietis-a-nascarfankvafjordkv" + + "alsundkvamfamberkeleykvanangenkvinesdalkvinnheradkviteseidatingk" + + "vitsoykwpspectruminamitanekzmishimatsumaebashimodatemissileluxem" + + "bourgmisugitokuyamatsumotofukemitourismolanxesshitaramamitoyoake" + + "miuramiyazurewebsiteshikagamiishibukawamiyotamanomjondalenmlbfan" + + "montrealestatefarmequipmentrentinoa-adigemonza-brianzapposhizuku" + + "ishimogosenmonza-e-della-brianzaptokyotangotsukitahatakamoriokak" + + "egawamonzabrianzaramonzaebrianzamonzaedellabrianzamoonscaleforce" + + "mordoviamoriyamatsunomoriyoshiminamiawajikis-an-actormormonsterm" + + "oroyamatsusakahoginankokubunjis-an-actresshintokushimamortgagemo" + + "scowindowskrakowinnershizuokanagawamoseushistorymosjoenmoskenesh" + + "oppingmosshopwarendalenugmosvikhersonmoteginowaniihamatamakawaji" + + "mansionshoujis-an-anarchistoricalsocietymoviemovimientolgamozill" + + "a-iotrentinoaadigemtranbymuenstermuginozawaonsenmuikamiokameokam" + + "akurazakiwakunigamiharumukoebenhavnmulhouseoullensvanguardmunaka" + + "tanemuncienciamuosattemupimientakkoelnmurmanskhmelnitskiyamarumo" + + "rimachidamurotorcraftrentinoalto-adigemusashimurayamatsushigemus" + + "ashinoharamuseetrentinoaltoadigemuseumverenigingmusicargodaddyn-" + + "vpndnshowamutsuzawamy-vigorgemy-wanggouvichristmaseratiresangomu" + + "tashinainvestmentsanjotoyouramyactivedirectorymyasustor-elvdalmy" + + "cdmydattolocalhistorymyddnskingmydissentrentinos-tirolmydobisshi" + + "kis-an-artistgorymydroboehringerikemydshowtimelhusdecorativearts" + + "hriramlidlugolekadenagahamaroygardendoftheinternetlifyis-an-engi" + + "neeringmyeffectrentinostirolmyfastly-terrariuminamiuonumasudamyf" + + "irewallonieruchomoscienceandindustrynmyforuminamiyamashirokawana" + + "belembetsukubankharkovaomyfritzmyftpaccesshwiosienarutomobellevu" + + "elosangelesjabbottrentinosud-tirolmyhome-servermyjinomykolaivare" + + "servehalflifestylemymailermymediapchromedicaltanissettaishinomak" + + "inkobeardubaiduckdnsannanishiwakinzais-a-candidatemyokohamamatsu" + + "damypepinkhmelnytskyivaporcloudmypetsigdalmyphotoshibalatinogift" + + "silkhplaystation-cloudmypicturesimple-urlmypsxn--3ds443gmysecuri" + + "tycamerakermyshopblocksirdalmythic-beastsjcbnpparibaselburgmytis" + + "-a-bookkeeperspectakasugais-an-entertainermytuleaprendemasakikon" + + "aikawachinaganoharamcoachampionshiphoptobishimadridvagsoyermyvnc" + + "hungnamdalseidfjordyndns-picsannohelplfinancialukowhalingrimstad" + + "yndns-remotewdyndns-serverisignissandiegomywirepaircraftingvollo" + + "mbardiamondslupsklabudhabikinokawabarthadselectrentin-sued-tirol" + + "platformshangrilapyplatter-appioneerplatterpippugliaplazaplcube-" + + "serverplumbingoplurinacionalpodhalevangerpodlasiellaktyubinskipt" + + "veterinaireadthedocscappgafannefrankfurtrentinosudtirolpodzonepo" + + "hlpoivronpokerpokrovsknx-serversicherungpoliticarrierpolitiendap" + + "olkowicepoltavalle-aostathellewismillerpomorzeszowitdkomaganepon" + + "pesaro-urbino-pesarourbinopesaromasvuotnaritakurashikis-bytomari" + + "timekeepingponypordenonepornporsangerporsangugeporsgrunnanyokosh" + + "ibahikariwanumatamayufuelveruminanopoznanpraxis-a-bruinsfanprdpr" + + "eservationpresidioprgmrprimelbourneprincipeprivatizehealthinsura" + + "nceprofesionalprogressivenneslaskerrylogisticsnoasakakinokiaprom" + + "ombetsurgeonshalloffameiwamassa-carrara-massacarraramassabusines" + + "sebykleclerchurcharternidyndns-webhareidsbergentingripepropertyp" + + "rotectionprotonetrentinosued-tirolprudentialpruszkowithgoogleapi" + + "szprvcyberlevagangaviikanonjis-certifieducatorahimeshimamateramo" + + "baraprzeworskogptplusgardenpulawypupittsburghofficialpvhagakhana" + + "migawapvtrentinosuedtirolpwcircustomer-ociprianiigataitogitsulda" + + "luroypzqhagebostadqldqponiatowadaqslingqualifioappiwatequickconn" + + "ectrentinsud-tirolquicksytestingquipelementsokananiimihoboleslaw" + + "iecistrondheimmobilienissayokkaichiropractichernovtsyncloudyndns" + + "-at-homedepotenzamamidsundyndns-at-workisboringlugmbhartipscbgmi" + + "nakamichiharaqvcitadeliveryggeesusonosuzakanazawasuzukaneyamazoe" + + "suzukis-into-animegurownprovidersvalbardunloppacificitichirurgie" + + "ns-dentistes-en-francesvcivilaviationissedalutskashibatakatsukiy" + + "osatokamachintaifun-dnsaliasanokashiharasveiosvelvikommunalforbu" + + "ndsvizzerasvn-reposolutionsokndalswidnicasacamdvrcampinagrandebu" + + "ilderschlesischesomaswidnikkokonoeswiebodzin-butterswiftcoverswi" + + "noujscienceandhistoryswissmarterthanyousynology-dsomnarviikamisa" + + "tokaizukameyamatotakadatuscanytushuissier-justicetuvalle-daostat" + + "icsor-varangertuxfamilytwmailvestre-slidreportrevisohughesoovest" + "re-totennishiawakuravestvagoyvevelstadvibo-valentiavibovalentiav" + - "ideovillasor-odalvinnicasadelamonedancevinnytsiavipsinaappixolin" + - "ovirginiavirtual-userveftpizzavirtualservervirtualuservegame-ser" + - "vervirtueeldomein-vigorlicevirtuelvisakegawaviterboknowsitallviv" + - "olkenkundenvixn--3bst00miniservervlaanderenvladikavkazimierz-dol" + - "nyvladimirvlogintoyonezawavminnesotaketaketomisatokorozawavologd" + - "anskongsbergvolvolkswagentsor-varangervolyngdalvoorloperaunitero" + - "is-into-carshinshirovossevangenvotevotingvotoyonowmflabsorfoldwn" + - "extdirectroandinosaureplantationworldworse-thandawowiwatsukiyono" + - "tairestaurantritonwpdevcloudwritesthisblogsytewroclawloclawekong" + - "svingerwtcminterepaircraftingvollombardiamondshisuifuettertdasne" + - "tzwtfauskedsmokorsetagayaseralingenoamishirasatogokasells-for-le" + - "ssaudawuozuwzmiuwajimaxn--42c2d9axn--45br5cylxn--45brj9civilizat" + - "ionxn--45q11civilwarmiastagets-itoyouraxn--4gbriminingxn--4it168" + - "dxn--4it797konskowolayangroupictureshirahamatonbetsurnadalxn--4p" + - "vxs4allxn--54b7fta0cclanbibaidarmeniaxn--55qw42gxn--55qx5dxn--5j" + - "s045dxn--5rtp49cldmailovecollegefantasyleaguernseyxn--5rtq34kons" + - "ulatrobeepilepsykkylvenetodayxn--5su34j936bgsgxn--5tzm5gxn--6btw" + - "5axn--6frz82gxn--6orx2rxn--6qq986b3xlxn--7t0a264clic20001wwwhosw" + - "hokksundyndns-picsannohelplfinancialukowiiheyakagexn--80adxhksor" + - "ocabalestrandabergamo-siemensncfdxn--80ao21axn--80aqecdr1axn--80" + - "asehdbarreauction-webhostingjesdalillyolasitemrxn--80aswgxn--80a" + - "ugustowmcloudxn--8ltr62konyvelolipopiemontexn--8pvr4uxn--8y0a063" + - "axn--90a3academiamicaarpkomaganexn--90aeroportalabamagasakishima" + - "baraogakibichuoxn--90aishobarakawagoexn--90azhytomyravendbarrel-" + - "of-knowledgeapplicationcloudappspotagerxn--9dbhblg6digitalxn--9d" + - "bq2axn--9et52uxn--9krt00axn--andy-iraxn--aroport-byaotsurreyxn--" + - "asky-iraxn--aurskog-hland-jnbarrell-of-knowledgestackarasjokaras" + - "uyamarshallstatebankarateu-1xn--avery-yuasakuhokkaidownloadxn--b" + - "-5gaxn--b4w605ferdxn--balsan-sdtirol-nsbsorreisahayakawakamiichi" + - "kawamisatottoris-foundationxn--bck1b9a5dre4clickashiwazakiyosemi" + - "texn--bdddj-mrabdxn--bearalvhki-y4axn--berlevg-jxaxn--bhcavuotna" + - "-s4axn--bhccavuotna-k7axn--bidr-5nachikatsuuraxn--bievt-0qa2xn--" + - "bjarky-fyasakaiminatoyookaniepcexn--bjddar-ptarumizusawaxn--blt-" + - "elabourxn--bmlo-graingerxn--bod-2nativeamericanantiquesortlandxn" + - "--bozen-sdtirol-2obanazawaxn--brnny-wuacademy-firewall-gatewayxn" + - "--brnnysund-m8accident-investigation-aptibleadpagest-mon-blogueu" + - "rovision-k3sorumincomcastresindevicenzaporizhzhiaxn--brum-voagat" + - "rogstadxn--btsfjord-9zaxn--bulsan-sdtirol-nsbarsycenterprisesaki" + - "kugawaltervistaikimobetsuitainaioirasebastopologyeongnamegawakay" + - "amagazineat-urlimanowarudautomotiveconomiasakuchinotsuchiurakawa" + - "lesundeportevadsobetsumidatlanticaseihicampobassociatest-iservec" + - "ounterstrikebinagisoccertmgrazimutheworkpccwebredirectmembers3-e" + - "u-west-1xn--c1avgxn--c2br7gxn--c3s14misakis-a-therapistoiaxn--cc" + - "k2b3barsyonlinewhampshirealtysnes3-us-gov-west-1xn--cckwcxetdxn-" + - "-cesena-forl-mcbremangerxn--cesenaforl-i8axn--cg4bkis-into-carto" + - "onshintokushimaxn--ciqpnxn--clchc0ea0b2g2a9gcdxn--comunicaes-v6a" + - "2oxn--correios-e-telecomunicaes-ghc29axn--czr694bashkiriautoscan" + - "adaeguambulanceobihirosakikamijimatsuzakibmdevelopmentatsunobira" + - "ukraanghkeymachineustargardd-dnsiskinkyotobetsulikes-piedmontice" + - "llodingenatuurwetenschappenaumburggfarmerseine164-balsfjorddnsli" + - "velanddnss3-ap-southeast-1xn--czrs0tromsakataobaomoriguchiharahk" + - "keravjuegoshikijobservableusercontentrentinsuedtirolxn--czru2dxn" + - "--czrw28basicservercelliguriaveroykenglandgcahcesuoloans3-eu-wes" + - "t-2xn--d1acj3basilicataniavocatanzarowebspacebinordreisa-hockeyn" + - "utazuerichardlikescandyn53utilitiesquare7xn--d1alfaromeoxn--d1at" + - "romsojamisonxn--d5qv7z876clinichocolatelevisionishiokoppegardynd" + - "ns-ipartinuyamashinatsukigatakashimarnardalouvreitoyosatoyokawax" + - "n--davvenjrga-y4axn--djrs72d6uyxn--djty4kooris-a-nursembokukitch" + - "enxn--dnna-grajewolterskluwerxn--drbak-wuaxn--dyry-iraxn--e1a4cl" + - "iniquenoharaxn--eckvdtc9dxn--efvn9soundcastronomy-routerxn--efvy" + - "88haibarakitahiroshimapartmentservicesevastopolexn--ehqz56nxn--e" + - "lqq16hair-surveillancexn--eveni-0qa01gaxn--f6qx53axn--fct429kope" + - "rvikharkovanylvenicexn--fhbeiarnxn--finny-yuaxn--fiq228c5hsouthc" + - "arolinatalxn--fiq64basketballfinanzgoravoues3-eu-west-3xn--fiqs8" + - "southwestfalenxn--fiqz9sowaxn--fjord-lraxn--fjq720axn--fl-ziaxn-" + - "-flor-jraxn--flw351exn--forl-cesena-fcbsspeedpartnersokananiimih" + - "oboleslawiecitichitosetogakushimotoganewportlligatmparsamsclubar" + - "towhalingriwataraidyndns-homednsamsungroks-thisayamanobeokakudam" + - "atsuexn--forlcesena-c8axn--fpcrj9c3dxn--frde-grandrapidspjelkavi" + - "komonowruzhgorodeoxn--frna-woaraisaijosoyrorospreadbettingxn--fr" + - "ya-hraxn--fzc2c9e2clintonoshoesanokasserverrankoshigayameinforum" + - "zxn--fzys8d69uvgmailxn--g2xx48clothingdustdataiwanairforcebetsui" + - "kidsmynasushiobaragusabaejrietisalatinabenonicbcn-north-1xn--gck" + - "r3f0fbsbxn--12co0c3b4evalleaostavangerxn--gecrj9cn-northwest-1xn" + - "--ggaviika-8ya47hakatanortonxn--gildeskl-g0axn--givuotna-8yasugi" + - "vingxn--gjvik-wuaxn--gk3at1exn--gls-elacaixaxn--gmq050is-into-ga" + - "messinazawaxn--gmqw5axn--h-2failxn--h1aeghakodatexn--h2breg3even" + - "espydebergxn--h2brj9c8cngrossetouchihayaakasakawaharaxn--h3cuzk1" + - "discountyxn--hbmer-xqaxn--hcesuolo-7ya35batochiokinoshimakeupowi" + - "at-band-campaniaxaurskog-holandingjemnes3-ap-southeast-2xn--hery" + - "-iraxn--hgebostad-g3axn--hkkinen-5waxn--hmmrfeasta-s4accident-pr" + - "evention-rancherkasydneyxn--hnefoss-q1axn--hobl-iraxn--holtlen-h" + - "xaxn--hpmir-xqaxn--hxt814exn--hyanger-q1axn--hylandet-54axn--i1b" + - "6b1a6a2exn--imr513nxn--indery-fyasuokanoyakumoldeloittenrikuzent" + - "akatajimidorissagamiharaxn--io0a7is-leetrentino-sud-tirolxn--j1a" + - "efbx-osauheradyndns1xn--j1amhakonexn--j6w193gxn--jlq480n2rgxn--j" + - "lq61u9w7batsfjordiscoveryombolzano-altoadigeologyomitanoceanogra" + - "phics3-us-west-1xn--jlster-byatomitamamuraxn--jrpeland-54axn--jv" + - "r189misasaguris-an-accountantshinkamigotoyohashimototalxn--k7yn9" + - "5exn--karmy-yuaxn--kbrq7oxn--kcrx77d1x4axn--kfjord-iuaxn--klbu-w" + - "oaxn--klt787dxn--kltp7dxn--kltx9axn--klty5xn--3ds443gxn--koluokt" + - "a-7ya57hakubahcavuotnagaraholtaleniwaizumiotsukumiyamazonawsmppl" + - "anetariuminamiizukamiokameokameyamatotakadaxn--kprw13dxn--kpry57" + - "dxn--kpu716fbxosavannahgaxn--kput3is-lostrolekamakurazakiwakunig" + - "amiharustkannamilanotogawaxn--krager-gyatsukanraxn--kranghke-b0a" + - "xn--krdsherad-m8axn--krehamn-dxaxn--krjohka-hwab49jdfastpanelbla" + - "grarchaeologyeongbuk0emmafann-arboretumbriamallamaceiobbcg12038x" + - "n--ksnes-uuaxn--kvfjord-nxaxn--kvitsy-fyatsushiroxn--kvnangen-k0" + - "axn--l-1fairwindsrlxn--l1accentureklamborghinikolaeventsrvareser" + - "vehalflifestylexn--laheadju-7yawaraxn--langevg-jxaxn--lcvr32dxn-" + - "-ldingen-q1axn--leagaviika-52bauhausposts-and-telecommunications" + - "3-us-west-2xn--lesund-huaxn--lgbbat1ad8jelasticbeanstalkhakassia" + - "xn--lgrd-poacctrusteexn--lhppi-xqaxn--linds-pramericanartrvargga" + - "trentoyonakagyokutoyakolobrzegersundxn--lns-qlaquilanstorfjordxn" + - "--loabt-0qaxn--lrdal-sraxn--lrenskog-54axn--lt-liacnpyatigorskod" + - "jeffersonxn--lten-granexn--lury-iraxn--m3ch0j3axn--mely-iraxn--m" + - "erker-kuaxn--mgb2ddestorjdevcloudnshinyoshitomiokamitondabayashi" + - "ogamagoriziaxn--mgb9awbfedorapeoplegnicapebretonamicrosoftbankas" + - "uyanaizulminamiechizenxn--mgba3a3ejtrycloudflareportrevisohughes" + - "omaxn--mgba3a4f16axn--mgba3a4franamizuholdingstpetersburgxn--mgb" + - "a7c0bbn0axn--mgbaakc7dvfedoraprojectransportexn--mgbaam7a8hakuis" + - "-a-greenxn--mgbab2bdxn--mgbah1a3hjkrdxn--mgbai9a5eva00beneventoe" + - "idskoguchikuzenayorovigovtaxihuanflfanfshostrowwlkpmgjovikaratsu" + - "ginamikatagamilitaryonagoyaxn--mgbai9azgqp6jelenia-goraxn--mgbay" + - "h7gpaleoxn--mgbbh1a71exn--mgbc0a9azcgxn--mgbca7dzdoxn--mgberp4a5" + - "d4a87gxn--mgberp4a5d4arxn--mgbgu82axn--mgbi4ecexposedxn--mgbpl2f" + - "hskydivingxn--mgbqly7c0a67fbcnsantabarbaraxn--mgbqly7cvafranzisk" + - "anerimaringatlantakahashimamakiryuohdattorelayxn--mgbt3dhdxn--mg" + - "btf8flatangerxn--mgbtx2bentleyonagunicommbankarelianceu-2xn--mgb" + - "x4cd0abbvieeexn--mix082feiraquarelleaseeklogesaves-the-whalessan" + - "dria-trani-barletta-andriatranibarlettaandriaxn--mix891fermochiz" + - "ukirovogradoyxn--mjndalen-64axn--mk0axin-dslgbtrysiljanxn--mk1bu" + - "44cntoystre-slidrettozawaxn--mkru45is-not-certifiedugit-pagespee" + - "dmobilizeroticanonoichinomiyakexn--mlatvuopmi-s4axn--mli-tlarvik" + - "oryokamikawanehonbetsurutaharaxn--mlselv-iuaxn--moreke-juaxn--mo" + - "ri-qsakuragawaxn--mosjen-eyawatahamaxn--mot-tlavagiskexn--mre-og" + - "-romsdal-qqbuserveexchangexn--msy-ula0hakusanagochijiwadell-ogli" + - "astraderxn--mtta-vrjjat-k7aflakstadaokagakicks-assnasaarlandxn--" + - "muost-0qaxn--mxtq1misawaxn--ngbc5azdxn--ngbe9e0axn--ngbrxn--3e0b" + - "707exn--nit225kosaigawaxn--nmesjevuemie-tcbalsan-sudtirollagdene" + - "snaaseinet-freakstreamswatch-and-clockerxn--nnx388axn--nodessaku" + - "rais-savedunetflixilxn--nqv7fs00emaxn--nry-yla5gxn--ntso0iqx3axn" + - "--ntsq17gxn--nttery-byaeservehttplantsjcbnpparibaselburgxn--nvuo" + - "tna-hwaxn--nyqy26axn--o1acheltenham-radio-openairbusantiquest-a-" + - "la-maisondre-landroidxn--o3cw4haldenxn--o3cyx2axn--od0algxn--od0" + - "aq3beppublishproxyzgorzeleccogladefinimakanegasakiraxn--ogbpf8fl" + - "ekkefjordxn--oppegrd-ixaxn--ostery-fyaxn--osyro-wuaxn--otu796dxn" + - "--p1acferraraxn--p1ais-slickfhappoutwentexn--pbt977collectionxn-" + - "-pgbs0dhlxn--porsgu-sta26ferrarivnexn--pssu33lxn--pssy2uxn--q9jy" + - "b4colognewyorkshirecifedexeterxn--qcka1pmckinseyxn--qqqt11miscon" + - "fusedxn--qxa6axn--qxamuneuestudioxn--rady-iraxn--rdal-poaxn--rde" + - "-ulavangenxn--rdy-0nabaris-uberleetrentino-sudtirolxn--rennesy-v" + - "1axn--rhkkervju-01aferrerotikagoshimalvikaszubyxn--rholt-mragowo" + - "odsidemonmouthalsaitamatsukuris-a-guruslivinghistoryxn--rhqv96gx" + - "n--rht27zxn--rht3dxn--rht61exn--risa-5naturalhistorymuseumcenter" + - "xn--risr-iraxn--rland-uuaxn--rlingen-mxaxn--rmskog-byaxn--rny31h" + - "ammarfeastafricapitalonewmexicodyn-o-saurlandesevenassisicilyxn-" + - "-rovu88beskidyn-ip24xn--rros-granvindafjordxn--rskog-uuaxn--rst-" + - "0naturalsciencesnaturellestudynamisches-dnsokndalxn--rsta-franca" + - "iseharaxn--rvc1e0am3exn--ryken-vuaxn--ryrvik-byaxn--s-1faithamur" + - "akamigoris-a-hard-workersewinbarclaycards3-fips-us-gov-west-1xn-" + - "-s9brj9colonialwilliamsburgroundhandlingroznyxn--sandnessjen-ogb" + - "estbuyshouses3-website-ap-northeast-1xn--sandy-yuaxn--sdtirol-n2" + - "axn--seral-lraxn--ses554gxn--sgne-graphoxn--3hcrj9civilisationis" + - "shinguccircleverappsannaniyodogawaxn--skierv-utazastuff-4-salexn" + - "--skjervy-v1axn--skjk-soaxn--sknit-yqaxn--sknland-fxaxn--slat-5n" + - "aturbruksgymnxn--slt-elabcieszynxn--smla-hraxn--smna-gratangentl" + - "entapisa-geekosakaerodromegallupinbargainstantcloudfunctionswede" + - "nvironmentalconservationfabricafederationionjukudoyamaizuruhrhcl" + - "oudiscourses3-us-east-2xn--snase-nraxn--sndre-land-0cbetainaboxf" + - "usejnymemsettsupportcp4xn--snes-poaxn--snsa-roaxn--sr-aurdal-l8a" + - "xn--sr-fron-q1axn--sr-odal-q1axn--sr-varanger-ggbhzcasinordkappa" + - "lmasfjordenhktjeldsundishakotanhlfanhs3-website-ap-southeast-1xn" + - "--srfold-byaxn--srreisa-q1axn--srum-gratis-a-bulls-fanxn--stfold" + - "-9xaxn--stjrdal-s1axn--stjrdalshalsen-sqbieidsvollimitediskussio" + - "nsbereichaseljeepsondriodejaneirockartuzyoriikariyaltakatorin-th" + - "e-bandain-vpncateringebuildinglassassinationalheritageu-3xn--str" + - "e-toten-zcbielawashingtondclkarlsoyoshiokanzakiyokawaraxn--t60b5" + - "6axn--tckweatherchannelxn--tiq49xqyjeonnamerikawauexn--tjme-hrax" + - "n--tn0agrinetbankoseis-a-painteractivegaskvollxn--tnsberg-q1axn-" + - "-tor131oxn--trany-yuaxn--trentin-sd-tirol-rzbiellaakesvuemielecc" + - "eu-4xn--trentin-sdtirol-7vbrplsbxn--3oq18vl8pn36axn--trentino-sd" + - "-tirol-c3bieszczadygeyachimataipeigersundisrechtrainingleezevje-" + - "og-hornnes3-website-ap-southeast-2xn--trentino-sdtirol-szbievath" + - "letajimabaridagawalbrzycharitydalcesurancechirealmpmnikonanporov" + - "noceanographiquextraspace-to-rentalstomakomaibaraxn--trentinosd-" + - "tirol-rzbifukagawashtenawdev-myqnapcloudeitysfjordivtasvuodnakam" + - "agayahabaghdadivttasvuotnakamuratakahamalselvendrellimoliseminex" + - "n--trentinosdtirol-7vbigv-infoodnetworkangerxn--trentinsd-tirol-" + - "6vbihorologyukincheoninohekinannestadiyukuhashimojindianapolis-a" + - "-bloggerxn--trentinsdtirol-nsbikedaejeonbukcoalvdalaheadjudygarl" + - "andnpalmspringsakerxn--trgstad-r1axn--trna-woaxn--troms-zuaxn--t" + - "ysvr-vraxn--uc0atvaroyxn--uc0ay4axn--uist22handsonyoursidellogli" + - "astradingxn--uisz3gxn--unjrga-rtashkentunesomnarvikommunexn--unu" + - "p4yxn--uuwu58axn--vads-jraxn--valle-aoste-ebbtunkomvuxn--30rr7yx" + - "n--valle-d-aoste-ehbodollstufftoread-booksnesolarssonxn--valleao" + - "ste-e7axn--valledaoste-ebbvacationstuttgartrentinsued-tirolxn--v" + - "ard-jraxn--vegrshei-c0axn--vermgensberater-ctbilbaokinawashirosa" + - "tochigiessensiositelemarkarmoyurihonjournalistjohninomiyakonojor" + - "pelandrangedalinkyard-cloudyclusterxn--vermgensberatung-pwbillus" + - "trationredumbrellahppiacenzachpomorskienirasakindianmarketinglit" + - "chattanooganordlandray-dnsupdaternopilawaweddingliwicexn--vestvg" + - "y-ixa6oxn--vg-yiabkhaziaxn--vgan-qoaxn--vgsy-qoa0jetztrentino-su" + - "ed-tirolxn--vgu402coloradoplateaudioxn--vhquvestfoldxn--vler-qoa" + - "xn--vre-eiker-k8axn--vrggt-xqadxn--vry-yla5gxn--vuq861biocpanama" + - "tta-varjjatjmaxxxboxenapponazure-mobilexn--w4r85el8fhu5dnraxn--w" + - "4rs40lxn--wcvs22dxn--wgbh1columbusheyxn--wgbl6axn--xhq521birdart" + - "centerprisecloudcontrolappleborkdalwaysdatabaseballangenkainanae" + - "robatickets3-website-eu-west-1xn--xkc2al3hye2axn--xkc2dl3a5ee0ha" + - "ngglidingxn--y9a3aquariumishimatsumaebashimodatexn--yer-znaturhi" + - "storischesusakis-gonexn--yfro4i67oxn--ygarden-p1axn--ygbi2ammxn-" + - "-3pxu8koninjambylxn--ystre-slidre-ujbirkenesoddtangenovaranzanqu" + - "anpachigasakihokumakogengerdalaskanittedallasalleangaviikaascoli" + - "picenodumetacentrumeteorappanasonicatholicaxiashorokanaiexn--zbx" + - "025dxn--zf0ao64axn--zf0avxlxn--zfr164birthplacexnbayxz" + "ideovillasorocabalestrandabergamo-siemensncfdvinnicasadelamoneda" + + "pliernewportlligatritonvinnytsiavipsinaappixolinovirginiavirtual" + + "-userveftpizzavirtualservervirtualuservegame-servervirtueeldomei" + + "n-vigorlicevirtuelvisakegawaviterboknowsitallvivolkenkundenvixn-" + + "-3hcrj9civilisationisshinguccircleverappsantabarbaravlaanderenvl" + + "adikavkazimierz-dolnyvladimirvlogintoyonezawavminiservervologdan" + + "skomonowruzhgorodeovolvolkswagentsorreisahayakawakamiichikawamis" + + "atottoris-foundationvolyngdalvoorloperauniterois-into-carshintom" + + "ikasaharavossevangenvotevotingvotoyonowmcloudwmflabsortlandwnext" + + "directrogstadworldworse-thandawowithyoutuberspacekitagatargitpag" + + "efrontappkmpspbar2wpdevcloudwpenginepoweredwritesthisblogsytewro" + + "clawiwatsukiyonotairestaurantroandinosaurepbodynamic-dnsopotrent" + + "insudtirolwtcminnesotaketaketomisatokorozawawtfbsbxn--1ck2e1banz" + + "aicloudcontrolledekagaminombresciaustraliajudaicable-modemocraci" + + "abruzzoologicalvinklein-addrammenuorochesterimo-i-rana4u2-localh" + + "ostrowiec66wuozuwzmiuwajimaxn--45q11civilwarmiaxn--4gbriminingxn" + + "--4it168dxn--4it797kongsbergxn--4pvxs4allxn--54b7fta0cclanbibaid" + + "armeniaxn--55qw42gxn--55qx5dxn--5js045dxn--5rtp49cldmailovecolle" + + "gefantasyleaguernseyxn--5rtq34kongsvingerxn--5su34j936bgsgxn--5t" + + "zm5gxn--6btw5axn--6frz82gxn--6orx2rxn--6qq986b3xlxn--7t0a264clic" + + "20001wwwhoswhokksundyndns-wikirkenesantacruzsantafedjejuifmetace" + + "ntrumeteorappartis-a-catererxn--80adxhksorumincomcastresindevice" + + "nzaporizhzhiaxn--80ao21axn--80aqecdr1axn--80asehdbarefootballoon" + + "ingjerdrumckinseyolasiteu-1xn--80aswgxn--80augustowloclawekomoro" + + "tsukaminokawanishiaizubangexn--8ltr62koninjambylxn--8pvr4uxn--8y" + + "0a063axn--90a3academiamicaaarborteaches-yogasawaracingxn--90aero" + + "portalabamagasakishimabaraogakibichuoxn--90aishobarakawagoexn--9" + + "0azhytomyravendbargainstantcloudfunctionswedenvironmentalconserv" + + "ationfabricafederationionjukudoyamaintenanceu-2xn--9dbhblg6digit" + + "alxn--9dbq2axn--9et52uxn--9krt00axn--andy-iraxn--aroport-byaotsu" + + "rreyxn--asky-iraxn--aurskog-hland-jnbarreauction-webhopenairbusa" + + "ntiquest-a-la-maisondre-landroidiscourses3-us-gov-west-1xn--aver" + + "y-yuasakuhokkaidovre-eikerxn--b-5gaxn--b4w605ferdxn--balsan-sdti" + + "rol-nsbsoundcastronomy-routerxn--bck1b9a5dre4clickashiwaraxn--bd" + + "ddj-mrabdxn--bearalvhki-y4axn--berlevg-jxaxn--bhcavuotna-s4axn--" + + "bhccavuotna-k7axn--bidr-5nachikatsuuraxn--bievt-0qa2xn--bjarky-f" + + "yasakaiminatoyookaniepcexn--bjddar-ptarumizusawaxn--blt-elabourx" + + "n--bmlo-graingerxn--bod-2natalxn--bozen-sdtirol-2obanazawaxn--br" + + "nny-wuacademy-firewall-gatewayxn--brnnysund-m8accident-investiga" + + "tion-aptibleadpagest-mon-blogueurovision-k3southcarolinarvikomat" + + "sushimarylhurstjordalshalsenxn--brum-voagatromsakataobaomoriguch" + + "iharahkkeravjuegoshikijobservableusercontentrentoyonakagyokutoya" + + "kolobrzegersundxn--btsfjord-9zaxn--bulsan-sdtirol-nsbarrel-of-kn" + + "owledgeapplicationcloudappspotagerevistaples3-us-west-1xn--c1avg" + + "xn--c2br7gxn--c3s14mintereitrentino-suedtirolxn--cck2b3barrell-o" + + "f-knowledgestack12xn--cckwcxetdxn--cesena-forl-mcbremangerxn--ce" + + "senaforl-i8axn--cg4bkis-into-cartoonshinyoshitomiokamitondabayas" + + "hiogamagoriziaxn--ciqpnxn--clchc0ea0b2g2a9gcdxn--comunicaes-v6a2" + + "oxn--correios-e-telecomunicaes-ghc29axn--czr694barsycenterprises" + + "akimobetsuitainaioirasebastopologyeongnamegawakayamagazineat-url" + + "illyombolzano-altoadigeorgeorgiaustrheimatunduhrennesoyokozebina" + + "gisoccertmgrazimutheworkpccwebredirectmembers3-eu-west-1xn--czrs" + + "0tromsojamisonxn--czru2dxn--czrw28barsyonlinewhampshirealtysnes3" + + "-us-west-2xn--d1acj3bashkiriauthordalandeportenrivnebinordreisa-" + + "hockeynutazuerichardlikescandyn53utilitiesquare7xn--d1alfaromeox" + + "n--d1atrusteexn--d5qv7z876clinichiryukyuragifuchungbukharavennag" + + "asakindlecznagasukexn--davvenjrga-y4axn--djrs72d6uyxn--djty4kons" + + "kowolayangroupiemontexn--dnna-grajewolterskluwerxn--drbak-wuaxn-" + + "-dyry-iraxn--e1a4cliniquenoharaxn--eckvdtc9dxn--efvn9southwestfa" + + "lenxn--efvy88haibarakitahiroshimaoris-a-greenxn--ehqz56nxn--elqq" + + "16hair-surveillancexn--eveni-0qa01gaxn--f6qx53axn--fct429konsula" + + "trobeepilepsykkylvenetodayxn--fhbeiarnxn--finny-yuaxn--fiq228c5h" + + "sowaxn--fiq64basicservercelliguriautomotiveconomiastagemological" + + "lyngenflfanquanpachigasakihokumakogenebakkeshibechambagriculture" + + "nnebudejjuedischesapeakebayernufcfanavigationavoizumizakibmdevel" + + "opmentatsunobiramusementdllpages3-ap-southeast-2ix4432-balsan-su" + + "edtirolkuszczytnoipirangamvik-serverrankoshigayachimataikikugawa" + + "lesundd-dnshome-webserverdal-o-g-i-n4tatarantours3-ap-northeast-" + + "2xn--fiqs8speedpartnersolarssonxn--fiqz9sphinxn--3e0b707exn--fjo" + + "rd-lraxn--fjq720axn--fl-ziaxn--flor-jraxn--flw351exn--forl-cesen" + + "a-fcbsspjelkavikomforbarcelonagawalmartattoolforgemreviewsaitosh" + + "imayfirstockholmestrandgcahcesuoloans3-fips-us-gov-west-1xn--for" + + "lcesena-c8axn--fpcrj9c3dxn--frde-grandrapidspreadbettingxn--frna" + + "-woaraisaijosoyrorospydebergxn--frya-hraxn--fzc2c9e2clintonoshoe" + + "santamariakexn--fzys8d69uvgmailxn--g2xx48clothingdustdataiwanair" + + "forcebetsuikidsmynasushiobaragusabaejrietisalatinabenonicbcn-nor" + + "th-1xn--gckr3f0fbx-ostrowwlkpmgruexn--gecrj9cn-northwest-1xn--gg" + + "aviika-8ya47hakatanortonxn--gildeskl-g0axn--givuotna-8yasugivest" + + "bytemarkonyvelolipoppdalxn--gjvik-wuaxn--gk3at1exn--gls-elacaixa" + + "xn--gmq050is-into-gamessinazawaxn--gmqw5axn--h-2failxn--h1aeghak" + + "odatexn--h2breg3evenesrlxn--h2brj9c8cngriwataraidyndns-workshopi" + + "tsitevadsobetsumidatlantichitachinakagawashtenawdev-myqnapcloude" + + "itysfjordyndns-blogdnsamsclubartowfarmsteadyndns-freeboxosloftoy" + + "osatoyokawaxn--h3cuzk1discountyxn--hbmer-xqaxn--hcesuolo-7ya35ba" + + "silicataniautoscanadaeguambulancechirealmpmnavuotnapleskns3-eu-w" + + "est-2xn--hery-iraxn--hgebostad-g3axn--hkkinen-5waxn--hmmrfeasta-" + + "s4accident-prevention-rancherkasydneyxn--hnefoss-q1axn--hobl-ira" + + "xn--holtlen-hxaxn--hpmir-xqaxn--hxt814exn--hyanger-q1axn--hyland" + + "et-54axn--i1b6b1a6a2exn--imr513nxn--indery-fyasuokanoyaltakatori" + + "s-leetrentino-stirolxn--io0a7is-lostrodawaraxn--j1aefbxosavannah" + + "gaxn--j1amhakonexn--j6w193gxn--jlq480n2rgxn--jlq61u9w7basketball" + + "finanzgoraveroykengerdalces3-eu-west-3xn--jlster-byatominamidait" + + "omanchesterxn--jrpeland-54axn--jvr189misakis-a-therapistoiaxn--k" + + "7yn95exn--karmy-yuaxn--kbrq7oxn--kcrx77d1x4axn--kfjord-iuaxn--kl" + + "bu-woaxn--klt787dxn--kltp7dxn--kltx9axn--klty5xn--3oq18vl8pn36ax" + + "n--koluokta-7ya57hakubahcavuotnagaivuotnagaokakyotambabyenglandx" + + "n--kprw13dxn--kpry57dxn--kput3is-not-certifiedugit-pagespeedmobi" + + "lizeroticanonoichinomiyakexn--krager-gyatsukanraxn--kranghke-b0a" + + "xn--krdsherad-m8axn--krehamn-dxaxn--krjohka-hwab49jdevcloudnshir" + + "ahamatonbetsurnadalxn--ksnes-uuaxn--kvfjord-nxaxn--kvitsy-fyatsu" + + "shiroxn--kvnangen-k0axn--l-1fairwindsrvarggatrentinsued-tirolxn-" + + "-l1accentureklamborghinikolaeventstoregontrailroadxn--laheadju-7" + + "yawaraxn--langevg-jxaxn--lcvr32dxn--ldingen-q1axn--leagaviika-52" + + "batochiokinoshimaizuruhrhcloudiscoveryomitanobninskaracoldwarsza" + + "wavocatanzarowebspacebizenakanojohanamakinoharaukraanghkeymachin" + + "eustargardds3-ca-central-1xn--lesund-huaxn--lgbbat1ad8jdfastvps-" + + "serveronakanotoddenxn--lgrd-poacctrvaroyxn--lhppi-xqaxn--linds-p" + + "ramericanartrycloudflareplantationxn--lns-qlaquilanstorfjordxn--" + + "loabt-0qaxn--lrdal-sraxn--lrenskog-54axn--lt-liacnpyatigorskodje" + + "ffersonxn--lten-granexn--lury-iraxn--m3ch0j3axn--mely-iraxn--mer" + + "ker-kuaxn--mgb2ddestorjcphonefosshioyandexcloudxn--mgb9awbfedora" + + "peoplegnicapebretonamicrosoftbankasukabedzin-berlindasdaburxn--m" + + "gba3a3ejtrysiljanxn--mgba3a4f16axn--mgba3a4franamizuholdingstpet" + + "ersburgxn--mgba7c0bbn0axn--mgbaakc7dvfedoraprojectraniandriabarl" + + "ettatraniandriaxn--mgbaam7a8hakuis-a-gurustkannamilanotogawaxn--" + + "mgbab2bdxn--mgbah1a3hjkrdxn--mgbai9a5eva00batsfjordishakotanayor" + + "ovigovtaxihuanfshostrolekamishihoronobeauxartsandcrafts3-website" + + "-ap-northeast-1xn--mgbai9azgqp6jelasticbeanstalkddietnedalxn--mg" + + "bayh7gpaleoxn--mgbbh1a71exn--mgbc0a9azcgxn--mgbca7dzdoxn--mgberp" + + "4a5d4a87gxn--mgberp4a5d4arxn--mgbgu82axn--mgbi4ecexposedxn--mgbp" + + "l2fhskydivingxn--mgbqly7c0a67fbcnsantoandreamhostersanukis-a-cel" + + "ticsfanxn--mgbqly7cvafranziskanerimaringatlantakahashimamakiryuo" + + "hdattorelayxn--mgbt3dhdxn--mgbtf8flatangerxn--mgbtx2bauhausposts" + + "-and-telecommunications3-website-ap-southeast-1xn--mgbx4cd0abbvi" + + "eeexn--mix082feiraquarelleaseeklogesaveincloudynvpnplus-4xn--mix" + + "891fermochizukirovogradoyxn--mjndalen-64axn--mk0axin-dslgbtuneso" + + "r-odalxn--mk1bu44cntoystre-slidrettozawaxn--mkru45is-savedunetfl" + + "ixilxn--mlatvuopmi-s4axn--mli-tlarvikooris-a-nursembokukitchenxn" + + "--mlselv-iuaxn--moreke-juaxn--mori-qsakuragawaxn--mosjen-eyawata" + + "hamaxn--mot-tlavagiskexn--mre-og-romsdal-qqbuserveexchangexn--ms" + + "y-ula0hakusanagochijiwadell-ogliastraderxn--mtta-vrjjat-k7aflaks" + + "tadaokagakicks-assnasaarlandxn--muost-0qaxn--mxtq1misasaguris-an" + + "-accountantshinshiroxn--ngbc5azdxn--ngbe9e0axn--ngbrxn--3pxu8kom" + + "vuxn--32vp30haebaruericssongdalenviknakatsugawaxn--nit225kopervi" + + "khakassiaxn--nmesjevuemie-tcbalsan-sudtirollagdenesnaaseinet-fre" + + "akstreamswatch-and-clockerxn--nnx388axn--nodessakurais-slickazun" + + "ow-dnshiojirishirifujiedaxn--nqv7fs00emaxn--nry-yla5gxn--ntso0iq" + + "x3axn--ntsq17gxn--nttery-byaeservehttplantslzxn--nvuotna-hwaxn--" + + "nyqy26axn--o1acheltenham-radio-opencraftrainingxn--o3cw4haldenxn" + + "--o3cyx2axn--od0algorithmiasakuchinotsuchiurakawaxn--od0aq3benev" + + "entoeidskoguchikuzenhktcp4xn--ogbpf8flekkefjordxn--oppegrd-ixaxn" + + "--ostery-fyaxn--osyro-wuaxn--otu796dxn--p1acferraraxn--p1ais-ube" + + "rleetrentino-sud-tirolxn--pgbs0dhlxn--porsgu-sta26ferraris-a-cub" + + "icle-slavellinodeobjectsaves-the-whalessandria-trani-barletta-an" + + "driatranibarlettaandriaxn--pssu33lxn--pssy2uxn--q9jyb4collection" + + "xn--qcka1pmcdirxn--qqqt11misawaxn--qxa6axn--qxamuneuestudioxn--r" + + "ady-iraxn--rdal-poaxn--rde-ulavangenxn--rdy-0nabaris-very-badajo" + + "zxn--rennesy-v1axn--rhkkervju-01aferrerotikagoshimalvikasumigaur" + + "ayasudaxn--rholt-mragowoodsidemonmouthalsaitamatsukuris-a-hard-w" + + "orkersewilliamhillxn--rhqv96gxn--rht27zxn--rht3dxn--rht61exn--ri" + + "sa-5nativeamericanantiquestudynamisches-dnsolognexn--risr-iraxn-" + + "-rland-uuaxn--rlingen-mxaxn--rmskog-byaxn--rny31hammarfeastafric" + + "apitalonewmexicodyn-o-saurlandesharis-a-hunterxn--rovu88bentleyo" + + "nagoyavoues3-external-1xn--rros-granvindafjordxn--rskog-uuaxn--r" + + "st-0naturalhistorymuseumcenterxn--rsta-francaiseharaxn--rvc1e0am" + + "3exn--ryken-vuaxn--ryrvik-byaxn--s-1faithamurakamigoris-a-knight" + + "pointtohobby-sitexn--s9brj9colognewyorkshirecifedexeterxn--sandn" + + "essjen-ogbeppublishproxyzgorzeleccogjerstadotsuruokakamigaharaxa" + + "urskog-holandinggfarmerseine164-baltimore-og-romsdalipayboltates" + + "hinanomachimkentateyamaetnaamesjevuemielno-ipifonyaarpalmasfjord" + + "enaturhistorisches3-ap-southeast-1xn--sandy-yuaxn--sdtirol-n2axn" + + "--seral-lraxn--ses554gxn--sgne-graphoxn--42c2d9axn--skierv-utaza" + + "stuff-4-salexn--skjervy-v1axn--skjk-soaxn--sknit-yqaxn--sknland-" + + "fxaxn--slat-5naturalsciencesnaturellestufftoread-booksnesolundbe" + + "ckomakiyosunndalxn--slt-elabcieszynxn--smla-hraxn--smna-gratange" + + "ntlentapisa-geekoryokamikawanehonbetsurutaharaxn--snase-nraxn--s" + + "ndre-land-0cbeskidyn-ip24xn--snes-poaxn--snsa-roaxn--sr-aurdal-l" + + "8axn--sr-fron-q1axn--sr-odal-q1axn--sr-varanger-ggbestbuyshouses" + + "3-website-ap-southeast-2xn--srfold-byaxn--srreisa-q1axn--srum-gr" + + "atis-a-bulls-fanxn--stfold-9xaxn--stjrdal-s1axn--stjrdalshalsen-" + + "sqbetainaboxfusejnymemergencyahabaghdadiskussionsbereichaseljeep" + + "sondriodejaneirockartuzyonagunicommbankaragandaxn--stre-toten-zc" + + "bhzcasertairaumalborkarasjohkamikitayamatsurin-the-bandain-vpnca" + + "sinordkappalmspringsakerxn--t60b56axn--tckweatherchannelxn--tiq4" + + "9xqyjelenia-goraxn--tjme-hraxn--tn0agrinetbankosaigawaxn--tnsber" + + "g-q1axn--tor131oxn--trany-yuaxn--trentin-sd-tirol-rzbieidsvollim" + + "anowarudaxn--trentin-sdtirol-7vbrplsbxn--45br5cylxn--trentino-sd" + + "-tirol-c3bielawaltervistaipeigersundisrechtranakaiwamizawatchand" + + "clockarasjokarasuyamarshallstatebankarateu-3xn--trentino-sdtirol" + + "-szbiellaakesvuemielecceu-4xn--trentinosd-tirol-rzbieszczadygeya" + + "chiyodaejeonbukcoalvdalaheadjudygarlandivtasvuodnakamagayahikobi" + + "erzycevje-og-hornnes3-website-eu-west-1xn--trentinosdtirol-7vbie" + + "vat-band-campaniaxn--trentinsd-tirol-6vbifukagawashingtondclkara" + + "tsuginamikatagamilitaryoriikareliancextraspace-to-rentalstomakom" + + "aibaraxn--trentinsdtirol-nsbigv-infoodnetworkangerxn--trgstad-r1" + + "axn--trna-woaxn--troms-zuaxn--tysvr-vraxn--uc0atvestfoldxn--uc0a" + + "y4axn--uist22handsonyoursidellogliastradingxn--uisz3gxn--unjrga-" + + "rtashkentunkommunexn--unup4yxn--uuwu58axn--vads-jraxn--valle-aos" + + "te-ebbturystykanmakiwielunnerxn--valle-d-aoste-ehbodollstuttgart" + + "rentinsuedtirolxn--valleaoste-e7axn--valledaoste-ebbvacationsusa" + + "kis-gonexn--vard-jraxn--vegrshei-c0axn--vermgensberater-ctbihoro" + + "logyoshiokanzakiyokawaraxn--vermgensberatung-pwbikedaemoneyukinc" + + "heonhlfanhs3-website-sa-east-1xn--vestvgy-ixa6oxn--vg-yiabkhazia" + + "xn--vgan-qoaxn--vgsy-qoa0jeonnamerikawauexn--vgu402colonialwilli" + + "amsburgroks-thisayamanobeokakudamatsuexn--vhquvestnesorfoldxn--v" + + "ler-qoaxn--vre-eiker-k8axn--vrggt-xqadxn--vry-yla5gxn--vuq861bil" + + "baokinawashirosatochigiessensiositecnologiaxn--w4r85el8fhu5dnrax" + + "n--w4rs40lxn--wcvs22dxn--wgbh1coloradoplateaudioxn--wgbl6axn--xh" + + "q521billustrationredumbrellahppiacenzachpomorskienikonanporovnob" + + "serverxn--xkc2al3hye2axn--xkc2dl3a5ee0hangglidingxn--y9a3aquariu" + + "misconfusedxn--yer-znaturbruksgymnxn--yfro4i67oxn--ygarden-p1axn" + + "--ygbi2ammxn--45brj9civilizationiyodogawaxn--ystre-slidre-ujbioc" + + "eanographics3-website-us-east-1xn--zbx025dxn--zf0ao64axn--zf0avx" + + "lxn--zfr164birdartcenterprisecloudcontrolappleborkdalwaysdatabas" + + "eballangenkainanaerobatickets3-website-us-west-1xnbayxz" // nodes is the list of nodes. Each node is represented as a uint32, which // encodes the node's children, wildcard bit and node type (as an index into @@ -526,1818 +528,1812 @@ const text = "9guacuiababia-goracleaningroks-theatree12hpalermomahachijoinvill" // [15 bits] text index // [ 6 bits] text length var nodes = [...]uint32{ - 0x297a83, - 0x32a504, - 0x2eadc6, - 0x24c943, - 0x24c946, - 0x38b146, - 0x3b05c3, - 0x214bc4, - 0x201507, - 0x2eaa08, + 0x32f643, + 0x3b5c84, + 0x2f7846, + 0x2ed303, + 0x2ed306, + 0x391ec6, + 0x3ba683, + 0x242cc4, + 0x2089c7, + 0x2f7488, 0x1a000c2, - 0x1f36987, - 0x376649, - 0x36c4ca, - 0x36c4cb, - 0x201203, - 0x233985, - 0x2201602, - 0x2d2044, - 0x2eaf43, - 0x269045, - 0x2601742, - 0x343083, - 0x2a135c4, - 0x2982c5, - 0x2e0de42, - 0x26e24e, - 0x250b83, - 0x3a6286, - 0x3203082, - 0x306087, - 0x2372c6, - 0x3606bc2, - 0x27f943, - 0x27f944, - 0x399b86, - 0x35bc88, - 0x286046, - 0x26fc84, + 0x1f3c187, + 0x37b0c9, + 0x39a04a, + 0x39a04b, + 0x231983, + 0x234b85, + 0x2202642, + 0x280004, + 0x2f79c3, + 0x202645, + 0x2608c02, + 0x365e83, + 0x2a15d84, + 0x3b5585, + 0x2e12282, + 0x27520e, + 0x251a43, + 0x3adec6, + 0x3207d42, + 0x306e07, + 0x237306, + 0x3601f82, + 0x26d143, + 0x334e46, + 0x360f48, + 0x28e806, + 0x276804, 0x3a00ac2, - 0x34abc9, - 0x2236c7, - 0x202446, - 0x353689, - 0x32f208, - 0x2478c4, - 0x23f2c6, - 0x3c3846, - 0x3e041c2, - 0x36fcc6, - 0x242f4f, - 0x2d108e, - 0x219a44, - 0x218b45, - 0x32a405, - 0x2e7589, - 0x23d709, - 0x39a387, - 0x3ddf06, - 0x267243, - 0x42037c2, - 0x21adc3, - 0x35054a, - 0x460f283, - 0x3d95c5, - 0x29d282, - 0x38b6c9, - 0x4e01182, - 0x201c84, - 0x2f3146, - 0x28a745, - 0x36d1c4, - 0x560fbc4, - 0x220dc3, - 0x232d04, - 0x5a02d02, - 0x235784, - 0x5e79284, - 0x33cb4a, + 0x34cd89, + 0x222087, + 0x3b4c86, + 0x370f49, + 0x3c8608, + 0x354f84, + 0x25b9c6, + 0x3cdd86, + 0x3e029c2, + 0x2a7f06, + 0x24394f, + 0x27f04e, + 0x221684, + 0x2d4205, + 0x32f545, + 0x215589, + 0x23d909, + 0x335647, + 0x355246, + 0x203583, + 0x42272c2, + 0x22ce03, + 0x2937ca, + 0x4601ac3, + 0x3e1a45, + 0x239202, + 0x392449, + 0x4e03502, + 0x209784, + 0x2f4406, + 0x28fac5, + 0x3732c4, + 0x56263c4, + 0x233f03, + 0x233f04, + 0x5a02e42, + 0x385d04, + 0x5e83a84, + 0x25d6ca, 0x6200882, - 0x3c1f47, - 0x2d0548, - 0x76031c2, - 0x328287, - 0x2c9044, - 0x2c9047, - 0x3d57c5, - 0x378847, - 0x303c06, - 0x2f0e44, - 0x342e05, - 0x257187, - 0x8e01482, - 0x36fe43, - 0x9226782, - 0x3633c3, - 0x9606b42, - 0x274985, + 0x229547, + 0x27e508, + 0x7a07282, + 0x334a47, + 0x2ce984, + 0x2ce987, + 0x3dbac5, + 0x390e07, + 0x34b706, + 0x2a1184, + 0x36a285, + 0x257e87, + 0x8e07cc2, + 0x2a8083, + 0x9210642, + 0x3b3f43, + 0x96074c2, + 0x2173c5, 0x9a00202, - 0x2cd104, - 0x2c23c5, - 0x219987, - 0x249e0e, - 0x2b6e44, - 0x290f44, - 0x210603, - 0x286ac9, - 0x3aa74b, - 0x2edac8, - 0x303148, - 0x3b1888, - 0x3d9ac8, - 0x3534ca, - 0x378747, - 0x2cdf46, - 0x9e47402, - 0x374d83, - 0x3ccac3, - 0x3ce604, - 0x374dc3, - 0x35cb83, - 0x1732182, - 0xa2016c2, - 0x27cd05, - 0x224686, - 0x233744, - 0x38a5c7, - 0x2355c6, - 0x2c8984, - 0x3abfc7, - 0x215dc3, - 0xa6d5bc2, - 0xaa20f82, - 0xae20d42, - 0x220d46, + 0x375d04, + 0x2ef285, + 0x2215c7, + 0x25d04e, + 0x2ba484, + 0x29a884, + 0x20ebc3, + 0x35c549, + 0x2c17cb, + 0x2c75c8, + 0x32cc48, + 0x3313c8, + 0x3e1f48, + 0x370d8a, + 0x390d07, + 0x356606, + 0x9e3de82, + 0x26f0c3, + 0x3d2103, + 0x3d3c84, + 0x26f103, + 0x361e43, + 0x1737f82, + 0xa206c02, + 0x284a05, + 0x2bc146, + 0x234944, + 0x3aee07, + 0x26bdc6, + 0x2cd644, + 0x3bdc87, + 0x20d483, + 0xa6d7f02, + 0xab0bf02, + 0xae7b6c2, + 0x30bcc6, 0xb200282, - 0x284405, - 0x3336c3, - 0x3c8744, - 0x2f7784, - 0x2f7785, - 0x3d6d83, - 0xb602703, - 0xba019c2, - 0x205fc5, - 0x205fcb, - 0x20ec0b, - 0x229904, - 0x206689, - 0x208244, - 0xbe09c42, - 0x20a483, - 0x20a703, - 0xc202e82, - 0x398a0a, - 0xc601542, - 0x2d22c5, - 0x2e6a0a, - 0x247584, - 0x20b103, - 0x20b7c4, - 0x20d6c3, - 0x20d6c4, - 0x20d6c7, - 0x20e245, - 0x2114c6, - 0x211846, - 0x2124c3, - 0x217688, - 0x208f03, - 0xca0cd42, - 0x308648, - 0x2862cb, - 0x21ffc8, - 0x2205c6, - 0x2213c7, - 0x227208, - 0xda07682, - 0xde1d482, - 0x298408, - 0x210c07, - 0x30dcc5, - 0x30dcc8, - 0xe301108, - 0x26c243, - 0x22a444, - 0x38b1c2, - 0xe62a882, - 0xea16182, - 0xf22c042, - 0x22c043, - 0xf6086c2, - 0x296303, - 0x3b2744, - 0x2086c3, - 0x247884, - 0x296a4b, - 0x215843, - 0x2f1486, - 0x278704, - 0x2c340e, - 0x38f345, - 0x261e48, - 0x3a6387, - 0x3a638a, - 0x22f983, - 0x2343c7, - 0x3aa905, - 0x22f984, - 0x2526c6, - 0x2526c7, - 0x31a204, - 0xfb0d704, - 0x24a144, - 0x33c806, - 0x22b844, - 0x3b5cc6, - 0x232443, - 0x3ba348, - 0x3df888, - 0x290f03, - 0x3989c3, - 0x340384, - 0x355943, - 0x10215702, - 0x1068d502, - 0x218043, - 0x2435c6, - 0x343343, - 0x30c504, - 0x10a3fec2, - 0x24cf43, - 0x327783, - 0x212c02, + 0x2a4d45, + 0x3394c3, + 0x3d5bc4, + 0x2f9284, + 0x2f9285, + 0x3dff03, + 0xb64ac43, + 0xba05102, + 0x2093c5, + 0x2093cb, + 0x2b2a0b, + 0x204cc4, + 0x209849, + 0x20ae84, + 0xbe0b742, + 0x20c303, + 0x20e1c3, + 0xc207f42, + 0x2f2aca, + 0xc608a02, + 0x280285, + 0x2e858a, + 0x242644, + 0x210143, + 0x210a04, + 0x211943, + 0x211944, + 0x211947, + 0x212685, + 0x213086, + 0x213386, + 0x214683, + 0x218248, + 0x217143, + 0xca0cfc2, + 0x266308, + 0x28ea8b, + 0x2208c8, + 0x221106, + 0x222887, + 0x225048, + 0xda0aac2, + 0xde1c942, + 0x272d48, + 0x20f1c7, + 0x20f705, + 0x310f88, + 0xe302e48, + 0x2b0ec3, + 0x22bec4, + 0x391f42, + 0xe62c0c2, + 0xea06cc2, + 0xf22c442, + 0x22c443, + 0xf60cf02, + 0x316343, + 0x332284, + 0x214803, + 0x354f44, + 0x32430b, + 0x20cf03, + 0x2f2086, + 0x25d544, + 0x2c888e, + 0x377205, + 0x268a88, + 0x3adfc7, + 0x3adfca, + 0x231503, + 0x2355c7, + 0x2c1985, + 0x231504, + 0x253a06, + 0x253a07, + 0x31dd84, + 0xfb109c4, + 0x25d384, + 0x25d386, + 0x252684, + 0x3c2f86, + 0x20f4c3, + 0x20f4c8, + 0x210448, + 0x29a843, + 0x2f2a83, + 0x343c04, + 0x35c0c3, + 0x1020cdc2, + 0x106bd282, + 0x205083, + 0x243fc6, + 0x25bac3, + 0x274784, + 0x10a30c82, + 0x25ce43, + 0x316a83, + 0x214dc2, 0x10e00d42, - 0x2cb886, - 0x234807, - 0x3c25c7, - 0x3b91c5, - 0x3d3004, - 0x29fbc5, - 0x2253c7, - 0x2ade49, - 0x2c19c6, - 0x2ec246, - 0x1120b682, - 0x2f4b48, - 0x3ae1c6, - 0x2aed85, - 0x30a6c7, - 0x3562c4, - 0x3562c5, - 0x11668c84, - 0x268c88, - 0x11a06082, - 0x11e00482, - 0x26e986, + 0x2d3286, + 0x235a07, + 0x229bc7, + 0x3c0d85, + 0x21cc84, + 0x2a0dc5, + 0x30f247, + 0x2e5a49, + 0x2ee886, + 0x3032c6, + 0x11602282, + 0x307a08, + 0x31a706, + 0x2b1bc5, + 0x30c3c7, + 0x30dcc4, + 0x30dcc5, + 0x11a02284, + 0x202288, + 0x11e09482, + 0x12200482, + 0x275946, 0x200488, - 0x331ac5, - 0x34b646, - 0x34ef88, - 0x35b788, - 0x12201805, - 0x126136c4, - 0x2136c7, - 0x12a07cc2, - 0x12e167c2, - 0x14201242, - 0x2f3245, - 0x14a83545, - 0x262486, - 0x323647, - 0x39f087, - 0x14e14a83, - 0x338487, - 0x38a948, - 0x2022cd09, - 0x26e407, - 0x22d447, - 0x22e548, - 0x22ed46, - 0x22f486, - 0x2300cc, - 0x23180a, - 0x231c07, - 0x23384b, - 0x234647, - 0x23464e, - 0x20635944, - 0x235b44, - 0x238b07, - 0x25c7c7, - 0x23d006, - 0x23d007, - 0x3b3147, - 0x2d2c43, - 0x20a2ba02, - 0x23e306, - 0x23e30a, - 0x23f44b, - 0x240987, - 0x241405, - 0x241e43, - 0x242246, - 0x242247, - 0x2f8983, - 0x20e00102, - 0x242bca, - 0x21377dc2, - 0x2173da82, - 0x21a3fd02, - 0x21e373c2, - 0x245385, - 0x245d44, - 0x22a05582, - 0x235805, - 0x23fa43, - 0x314885, - 0x2688c4, - 0x2afb04, - 0x2cea06, - 0x250f06, - 0x2061c3, - 0x3bb644, - 0x303ec3, - 0x23a02a42, - 0x213c44, - 0x213c46, - 0x221745, - 0x244d46, - 0x30a7c8, - 0x223dc4, - 0x367bc8, - 0x231e85, - 0x262b88, - 0x2caa06, - 0x217c07, - 0x273504, - 0x24e73506, - 0x252239c3, - 0x39e183, - 0x31d988, - 0x29ffc4, - 0x2572ccc7, - 0x25ee4846, - 0x2e4849, - 0x362008, - 0x36a408, - 0x3b6544, - 0x3c7903, - 0x22dd42, - 0x2624e782, - 0x2660fa82, - 0x3c9083, - 0x26a01642, - 0x2f8904, - 0x279986, - 0x21c103, - 0x2bc7c7, - 0x303743, - 0x32fcc8, - 0x20b885, - 0x25a683, - 0x2c2345, - 0x2c2484, - 0x30bcc6, - 0x20cac6, - 0x2198c6, - 0x2f39c4, - 0x234a03, - 0x26e0fe02, - 0x27233fc5, + 0x337b45, + 0x34d686, + 0x350448, + 0x360a48, + 0x12608cc5, + 0x12a15e84, + 0x215e87, + 0x12e0a902, + 0x13361e82, + 0x14612402, + 0x2f4505, + 0x14e8af45, + 0x269506, + 0x327ec7, + 0x3b26c7, + 0x1522ea43, + 0x32bb87, + 0x3c17c8, + 0x2162ed49, + 0x2753c7, + 0x22f487, + 0x22fe88, + 0x230686, + 0x231006, + 0x231c4c, + 0x23294a, + 0x232d47, + 0x234a4b, + 0x235847, + 0x23584e, + 0x21a36344, + 0x236704, + 0x238a07, + 0x260b47, + 0x23d046, + 0x23d047, + 0x335887, + 0x226dc3, + 0x21e2c982, + 0x23e846, + 0x23e84a, + 0x24004b, + 0x241287, + 0x241d05, + 0x242183, + 0x2423c6, + 0x2423c7, + 0x2fa483, + 0x22200102, + 0x2435ca, + 0x2277c682, + 0x22b49682, + 0x22e40902, + 0x23237402, + 0x246ac5, + 0x247344, + 0x23e0da02, + 0x385d85, + 0x240643, + 0x299645, + 0x201ec4, + 0x21dd04, + 0x2d4e46, + 0x251dc6, + 0x2095c3, + 0x3cce44, + 0x37f243, + 0x24e0f982, + 0x216404, + 0x216406, + 0x222c05, + 0x2482c6, + 0x30c4c8, + 0x265e44, + 0x294208, + 0x232fc5, + 0x259508, + 0x2d0686, + 0x30e0c7, + 0x269c04, + 0x26269c06, + 0x26622383, + 0x3a47c3, + 0x2f7108, + 0x38bc44, + 0x26b32ec7, + 0x2e6946, + 0x2e6949, + 0x369588, + 0x37d748, + 0x389c84, + 0x204583, + 0x240702, + 0x2724e682, + 0x27626282, + 0x205c83, + 0x27a08b02, + 0x2fa404, + 0x2790c6, + 0x21a203, + 0x2c3d47, + 0x3b3a83, + 0x2ba548, + 0x21edc5, + 0x259f83, + 0x2ef205, + 0x2ef344, + 0x30d9c6, + 0x220006, + 0x221506, + 0x2f4c84, + 0x235c03, + 0x27e11702, + 0x282351c5, 0x200843, - 0x27a07382, - 0x22d1c3, - 0x2676c5, - 0x27e32dc3, - 0x28632dc9, - 0x28a00942, - 0x29208902, - 0x28ce05, - 0x213f06, - 0x28ec06, - 0x2e6608, - 0x2e660b, - 0x339c8b, - 0x3b93c5, - 0x2d6149, + 0x28a0da82, + 0x22f203, + 0x3233c5, + 0x28e33fc3, + 0x29633fc9, + 0x29a00942, + 0x2a20fc42, + 0x292845, + 0x2166c6, + 0x2ada86, + 0x2e9f08, + 0x2e9f0b, + 0x346d4b, + 0x3c0f85, + 0x2d8489, 0x1600b42, - 0x2f0548, - 0x206984, - 0x29a03c42, - 0x34a843, - 0x2a25c986, - 0x3c2888, - 0x2a6142c2, - 0x35c708, - 0x2aaaac82, - 0x337f8a, - 0x2aedb383, - 0x2b776c86, - 0x392488, - 0x214886, - 0x387b87, - 0x243147, - 0x3c33ca, - 0x247604, - 0x360704, - 0x376209, - 0x2bba9dc5, - 0x26e286, - 0x210e03, - 0x24e3c4, - 0x2be196c4, - 0x3458c7, - 0x2c241c87, - 0x294f84, - 0x39f545, - 0x262548, - 0x39e647, - 0x3a24c7, - 0x2c60dec2, - 0x29cf44, - 0x293048, - 0x246d84, - 0x24b904, - 0x24bcc5, - 0x24be07, - 0x2ca7ebc9, - 0x2232c4, - 0x24d789, - 0x24d9c8, - 0x24e144, - 0x24e147, - 0x2ce4e583, - 0x24ea87, - 0x2d20bb42, - 0x16b8842, - 0x24fa46, - 0x250087, - 0x250704, - 0x251d07, - 0x253787, - 0x253f83, - 0x22dec2, - 0x20d982, - 0x303243, - 0x3c6704, - 0x3c670b, - 0x2d703248, - 0x25a044, - 0x255b85, - 0x257407, - 0x2e92c5, - 0x33144a, - 0x259f83, - 0x2da05dc2, - 0x208e04, - 0x25c589, - 0x260c03, - 0x260cc7, - 0x240749, - 0x205dc8, - 0x22af03, - 0x27b3c7, - 0x27be89, - 0x225583, - 0x283b84, - 0x284d09, - 0x28b2c6, - 0x2f4103, - 0x2015c2, - 0x23c903, - 0x2b8647, - 0x23c905, - 0x3b1686, - 0x270744, - 0x35ff85, - 0x27c7c3, - 0x212706, - 0x292503, - 0x206882, - 0x248f84, - 0x2de299c2, - 0x2e2299c3, - 0x2e607082, - 0x248343, - 0x211cc4, - 0x2ece07, - 0x2946c6, - 0x262302, - 0x2ea5cd82, - 0x30a9c4, - 0x2f20d842, - 0x2f616902, - 0x2ef084, - 0x2ef085, - 0x302c85, - 0x35ef86, - 0x2fa0f582, - 0x39b745, - 0x3ba745, - 0x283483, - 0x20f586, - 0x20fec5, - 0x220cc2, - 0x35b3c5, - 0x220cc4, - 0x223d03, - 0x223f43, - 0x2fe05b42, - 0x2e29c7, - 0x24dbc4, + 0x39b4c8, + 0x209b44, + 0x2aa031c2, + 0x34ca03, + 0x2b260d06, + 0x2b600fc2, + 0x3619c8, + 0x2ba293c2, + 0x33d78a, + 0x2bedd983, + 0x2c77b706, + 0x397c88, + 0x242986, + 0x38dc47, + 0x243b47, + 0x3cd90a, + 0x2426c4, + 0x365c04, + 0x37a709, + 0x2cbb1905, + 0x275246, + 0x20f3c3, + 0x24e104, + 0x2ced8384, + 0x3b4447, + 0x2d233647, + 0x25ce84, + 0x3b2b85, + 0x2695c8, + 0x3a4c87, + 0x3a9847, + 0x2d60fa02, + 0x26acc4, + 0x2981c8, + 0x248604, + 0x24bb44, + 0x24bf45, + 0x24c087, + 0x2da81989, + 0x21eb04, + 0x24d4c9, + 0x24d708, + 0x24de84, + 0x24de87, + 0x2de4e483, + 0x24f8c7, + 0x2e201282, + 0x16be142, + 0x250386, + 0x251187, + 0x2515c4, + 0x252dc7, + 0x254047, + 0x254603, + 0x2ba882, + 0x20e782, + 0x32cd43, + 0x3ce884, + 0x3ce88b, + 0x2e72cd48, + 0x259a04, + 0x255d05, + 0x2576c7, + 0x20e785, + 0x31d28a, + 0x259943, + 0x2ea091c2, + 0x21d304, + 0x260909, + 0x264e43, + 0x264f07, + 0x28c949, + 0x2091c8, + 0x26f783, + 0x283187, + 0x283b89, + 0x26a503, + 0x28b544, + 0x28cb89, + 0x290cc6, + 0x2e9d03, + 0x207c82, + 0x23cc03, + 0x2bdf47, + 0x23cc05, + 0x2c15c6, + 0x296d84, + 0x365485, + 0x2844c3, + 0x2148c6, + 0x27eb43, + 0x209a42, + 0x24ac04, + 0x2ee08882, + 0x2f368483, + 0x2f6033c2, + 0x249f83, + 0x20dc44, + 0x303b07, + 0x348546, + 0x27cec2, + 0x2fa04d82, + 0x30c6c4, + 0x30211ac2, + 0x30621c42, + 0x2f0f04, + 0x2f0f05, + 0x363e85, + 0x260286, + 0x30a06d42, + 0x20f8c5, + 0x219a45, + 0x21bb43, + 0x225d86, + 0x227545, + 0x265d82, + 0x360685, + 0x30bc44, + 0x265d83, + 0x265fc3, + 0x30e08f42, + 0x2e4dc7, + 0x24d904, + 0x24d909, + 0x24e004, + 0x28adc3, + 0x2b9808, + 0x3128adc4, + 0x28adc6, + 0x2a49c3, + 0x256543, + 0x266a83, + 0x316fb9c2, + 0x308982, + 0x31a00642, + 0x33b208, + 0x3e0108, + 0x3bef86, + 0x351a05, + 0x303c85, + 0x207d87, + 0x31e46145, + 0x23ca82, + 0x3229cac2, + 0x32600042, + 0x27db48, + 0x31a645, + 0x2feac4, + 0x248205, + 0x2497c7, + 0x388944, + 0x2434c2, + 0x32a0b2c2, + 0x352084, + 0x228b07, + 0x292d07, + 0x390dc4, + 0x3d2c03, + 0x29a784, + 0x29a788, + 0x231346, + 0x25388a, + 0x2f5844, + 0x299e48, + 0x235384, + 0x222986, + 0x29ca84, + 0x2f4806, 0x24dbc9, - 0x24e2c4, - 0x2833c3, - 0x2b61c8, - 0x302833c4, - 0x2833c6, - 0x2a37c3, - 0x256303, - 0x308003, - 0x306f7642, - 0x309442, - 0x30a00642, - 0x335408, - 0x36af48, - 0x3b7906, - 0x3830c5, - 0x22c805, - 0x204287, - 0x30e77185, - 0x23c782, - 0x3129b602, - 0x31600042, - 0x2cfb88, - 0x3ae105, - 0x2fc7c4, - 0x244c85, - 0x2547c7, - 0x3a3884, - 0x242ac2, - 0x31a11442, - 0x351144, - 0x220a87, - 0x28ddc7, - 0x378804, - 0x3cd483, - 0x290e44, - 0x290e48, - 0x22f7c6, - 0x25254a, - 0x326584, - 0x299288, - 0x234184, - 0x2214c6, - 0x29b5c4, - 0x2f3546, - 0x24de89, - 0x2a9fc7, - 0x207543, - 0x31e3ee42, - 0x3b62c3, - 0x209e42, - 0x32204702, - 0x349e46, - 0x381988, - 0x2abfc7, - 0x228b09, - 0x2b1549, - 0x2ad505, - 0x2afc09, + 0x2abc07, + 0x213ec3, + 0x32e5b542, + 0x3a2503, + 0x20b942, + 0x33205742, + 0x34c006, + 0x386d08, + 0x2adc07, + 0x30b109, + 0x2addc9, 0x2b0405, - 0x2b1245, - 0x2b1f88, - 0x32608784, - 0x32a540c7, - 0x22d803, - 0x2b2187, - 0x22d806, - 0x2b25c7, - 0x2a9ac5, - 0x22d083, - 0x32e315c2, - 0x20b344, - 0x3320e782, - 0x33606502, - 0x380e86, - 0x2d04c5, - 0x2b54c7, - 0x343a03, - 0x35cb04, - 0x209283, - 0x2cd743, - 0x33a06182, - 0x34205bc2, - 0x38b244, - 0x22de83, - 0x3047c5, - 0x34600f42, - 0x34e01f02, - 0x304fc6, - 0x201f04, - 0x306bc4, - 0x306bca, - 0x356005c2, - 0x213903, - 0x21884a, - 0x21bac8, - 0x35a21dc4, + 0x2b2d89, + 0x2b3cc5, + 0x2b4b05, + 0x2b5f88, + 0x33611b04, + 0x33a54747, + 0x22f843, + 0x2b6187, + 0x22f846, + 0x2b6987, + 0x2ab845, + 0x22f0c3, + 0x33e32702, + 0x210384, + 0x3422cb02, + 0x3460b5c2, + 0x314d06, + 0x27e485, + 0x2b8ec7, + 0x356e03, + 0x361dc4, + 0x21d783, + 0x355e03, + 0x34a09582, + 0x35208fc2, + 0x391fc4, + 0x32ae03, + 0x305545, + 0x3560f782, + 0x35e02182, + 0x305d46, + 0x2069c4, + 0x30a304, + 0x30a30a, + 0x366005c2, + 0x2160c3, + 0x21528a, + 0x219008, + 0x36a0e704, 0x2005c3, - 0x35e96b43, - 0x237909, - 0x22e0c9, - 0x2bc8c6, - 0x3621bc83, - 0x21bc85, - 0x222f8d, - 0x226586, - 0x26518b, - 0x3660ccc2, - 0x205708, - 0x3a217782, - 0x3a605382, - 0x2bad85, - 0x3aa04582, - 0x2b3307, - 0x210083, - 0x210088, - 0x3ae07882, - 0x288304, - 0x20c743, - 0x33b805, - 0x23fb46, - 0x224004, - 0x398983, - 0x2b9583, - 0x3b201d82, - 0x3b9344, - 0x3d4c45, - 0x2b8247, - 0x279403, - 0x2b8e43, - 0x16b9102, - 0x2b9103, - 0x2b9503, - 0x3b600e02, - 0x3473c4, - 0x251106, - 0x2e42c3, - 0x2b9c03, - 0x3ba49582, - 0x249588, - 0x2bab84, - 0x347146, - 0x255707, - 0x284646, - 0x29ff44, - 0x49e03fc2, - 0x22d6cb, - 0x2ff50e, - 0x216d8f, - 0x39d6c3, - 0x4a65ac42, - 0x161fb02, - 0x4aa0af02, - 0x2928c3, - 0x2108c3, - 0x20af06, - 0x21d306, - 0x34dec7, - 0x310c44, - 0x4ae14042, - 0x4b20bd82, - 0x2e0685, - 0x2ff987, - 0x2bb206, - 0x4b662702, - 0x384c44, - 0x2c03c3, - 0x4ba01e42, - 0x4bf73103, - 0x2c2984, - 0x2c8009, - 0x4c2ced42, - 0x4c614d42, - 0x344945, - 0x4cad3942, - 0x4ce06002, - 0x35f947, - 0x3768cb, - 0x242f05, - 0x258109, - 0x26aa86, - 0x4d209504, - 0x295449, - 0x2d46c7, - 0x3dea87, - 0x22c343, - 0x2eef06, - 0x324047, - 0x25cc03, - 0x2a6a86, - 0x4da1ae42, - 0x4de33042, - 0x3b6403, - 0x38b885, - 0x21f407, - 0x236146, - 0x23c885, - 0x24db44, - 0x2a8985, - 0x38dac4, - 0x4e202482, - 0x2cc844, - 0x22dfc4, - 0x22dfcd, - 0x377189, - 0x22c648, - 0x344bc4, - 0x328845, - 0x3b8c47, - 0x3c5cc4, - 0x265907, - 0x2e4005, - 0x4e6ac604, - 0x2bf345, - 0x25f8c4, - 0x3a39c6, - 0x3973c5, - 0x4ea05442, - 0x26e903, - 0x267fc3, - 0x348cc4, - 0x348cc5, - 0x396886, - 0x23c9c5, - 0x22ae84, - 0x329743, - 0x4ee1a286, - 0x221fc5, - 0x222a85, - 0x323544, - 0x2f6283, - 0x32660c, - 0x4f208b02, - 0x4f605102, - 0x4fa02042, - 0x21a8c3, - 0x21a8c4, - 0x4fe08282, - 0x30e1c8, - 0x3b1745, - 0x2d3b84, - 0x23af86, - 0x50223502, - 0x5061b542, - 0x50a00c42, - 0x290c05, - 0x2f3886, - 0x219604, - 0x39a0c6, - 0x362dc6, - 0x211183, - 0x50ea240a, - 0x2795c5, - 0x350503, - 0x222446, - 0x3d2d09, - 0x222447, - 0x2b4d08, - 0x32f0c9, - 0x2adfc8, - 0x227d46, - 0x2105c3, - 0x512017c2, - 0x39fa08, - 0x51601f42, - 0x51a09e82, - 0x2137c3, - 0x2ec0c5, - 0x29f2c4, - 0x2fe389, - 0x2898c4, - 0x24aec8, - 0x52209e83, - 0x52696ec4, - 0x213f48, - 0x22df07, - 0x52b3d642, - 0x238442, - 0x32a385, - 0x37fc49, - 0x23c803, - 0x27e384, - 0x31d284, - 0x210943, - 0x27f28a, - 0x52e03f82, - 0x5320b182, - 0x2d5b43, - 0x390883, - 0x1627f82, - 0x374583, - 0x5361d542, - 0x53a00bc2, - 0x53f06c44, - 0x3d7846, - 0x26bbc4, - 0x277d83, - 0x281c83, - 0x54200bc3, - 0x23f7c6, - 0x208405, - 0x2d9ac7, - 0x2d9a06, - 0x2dab48, - 0x2dad46, - 0x20e944, - 0x2a0f0b, - 0x2dd603, - 0x2dd605, - 0x20f002, - 0x35fc42, - 0x54645402, - 0x54a02382, - 0x202383, - 0x54e6c9c2, - 0x26c9c3, - 0x2de083, - 0x55622902, - 0x55ae2406, - 0x258946, - 0x55e05902, - 0x5620a742, - 0x56623f82, - 0x56a15402, - 0x56e18482, - 0x57202802, - 0x214e83, - 0x385546, - 0x57619a04, - 0x213a4a, - 0x3a4986, - 0x20da84, - 0x204643, - 0x5820ce02, - 0x208482, - 0x23a0c3, - 0x5861a3c3, - 0x3bd287, - 0x3972c7, - 0x5aed3087, - 0x344407, - 0x228643, - 0x22864a, - 0x262044, - 0x31afc4, - 0x31afca, - 0x22cb45, - 0x5b21bb02, - 0x24fa03, - 0x5b600602, - 0x24e283, - 0x3b6283, - 0x5be00582, - 0x38a8c4, - 0x204484, - 0x3c2d05, - 0x3dd205, - 0x26a146, - 0x306e06, - 0x5c230a42, - 0x5c602902, - 0x310805, - 0x258652, - 0x35e586, - 0x207283, - 0x359106, - 0x2bf805, - 0x16535c2, - 0x64a0a9c2, - 0x372b43, - 0x20a9c3, - 0x292083, - 0x64e06e42, - 0x210e83, - 0x6521ad42, - 0x276e43, - 0x24b188, - 0x2624c3, - 0x2ad386, - 0x3cfc87, - 0x321486, - 0x32148b, - 0x20d9c7, - 0x31d784, - 0x65a00c02, - 0x3b15c5, - 0x65e08443, - 0x26d243, - 0x3b29c5, - 0x33f243, - 0x6673f246, - 0x3cac0a, - 0x2a7083, - 0x2366c4, + 0x36e0a2c3, + 0x26a749, + 0x247109, + 0x2c3e46, + 0x372191c3, + 0x2191c5, + 0x21e7cd, + 0x22db06, + 0x2e61cb, + 0x37607542, + 0x358448, + 0x3b20c202, + 0x3b603082, + 0x39e285, + 0x3ba04b82, + 0x2af7c7, + 0x205603, + 0x227708, + 0x3be022c2, + 0x25ef84, + 0x21fc83, + 0x354a05, + 0x240746, + 0x227104, + 0x2f2a43, + 0x384583, + 0x3c206142, + 0x3c0f04, + 0x2bab45, + 0x2bdb47, + 0x281403, + 0x2be4c3, + 0x1616fc2, + 0x2be783, + 0x2beb83, + 0x3c600e02, + 0x33f584, + 0x235e06, + 0x2e6503, + 0x2bf943, + 0x3ca4b202, + 0x24b208, + 0x2c0904, + 0x33f306, + 0x253e87, + 0x29a946, + 0x38bbc4, + 0x4ae03102, + 0x22f70b, + 0x30180e, + 0x217a8f, + 0x2be183, + 0x4b65a642, + 0x1641882, + 0x4ba03802, + 0x2563c3, + 0x20ee83, + 0x21b306, + 0x34e0c6, + 0x395dc7, + 0x3d2484, + 0x4be16802, + 0x4c21f2c2, + 0x2e2845, + 0x33dec7, + 0x2c2506, + 0x4c669782, + 0x3626c4, + 0x2c7a83, + 0x4ca06902, + 0x4cf78103, + 0x2c9284, + 0x2cde89, + 0x4d2d5182, + 0x4d60a342, + 0x248985, + 0x4dad5682, + 0x4de01582, + 0x364e47, + 0x37b34b, + 0x243905, + 0x258509, + 0x270906, + 0x4e201584, + 0x206d89, + 0x2d6a07, + 0x22a147, + 0x22c743, + 0x2f0d86, + 0x352f87, + 0x21df43, + 0x2a87c6, + 0x4ea29a82, + 0x4ee34242, + 0x2061c3, + 0x392605, + 0x303147, + 0x236d06, + 0x23cb85, + 0x24d884, + 0x2aad45, + 0x393dc4, + 0x4f201482, + 0x2e9184, + 0x247004, + 0x24700d, + 0x2ee249, + 0x22ca48, + 0x248c04, + 0x347fc5, + 0x204407, + 0x206504, + 0x26be87, + 0x267a45, + 0x4f60a284, + 0x2c6045, + 0x201484, + 0x253306, + 0x394fc5, + 0x4faa4c82, + 0x2758c3, + 0x357643, + 0x35d804, + 0x35d805, + 0x39d506, + 0x23ccc5, + 0x368e84, + 0x364343, + 0x4fe17e86, + 0x21a8c5, + 0x21e2c5, + 0x327dc4, + 0x2f58c3, + 0x2f58cc, + 0x502bdc42, + 0x50600e82, + 0x50a02702, + 0x21e1c3, + 0x21e1c4, + 0x50e0a682, + 0x3b9e88, + 0x2c1685, + 0x2d5ec4, + 0x230e86, + 0x51204202, + 0x5162d582, + 0x51a00c42, + 0x296545, + 0x2f4b46, + 0x265684, + 0x335386, + 0x229306, + 0x25bfc3, + 0x51e9068a, + 0x2815c5, + 0x293783, + 0x209f06, + 0x209f09, + 0x223fc7, + 0x2b7fc8, + 0x3c84c9, + 0x2e5bc8, + 0x22dd86, + 0x20eb83, + 0x52208c82, + 0x32d248, + 0x52606a02, + 0x52a0b982, + 0x215f83, + 0x2ee705, + 0x2a0484, + 0x300689, + 0x3c04c4, + 0x20bc08, + 0x5320b983, + 0x53724784, + 0x216708, + 0x246f47, + 0x53b49242, + 0x370242, + 0x32f4c5, + 0x385509, + 0x23cb03, + 0x31bb84, + 0x3424c4, + 0x204483, + 0x28698a, + 0x53f93b42, + 0x542101c2, + 0x2d7e83, + 0x396083, + 0x162dfc2, + 0x26e8c3, + 0x54615782, + 0x54a00bc2, + 0x54e17544, + 0x217546, + 0x271a44, + 0x27d983, + 0x289683, + 0x55200bc3, + 0x2403c6, + 0x3d5d85, + 0x2dbe07, + 0x2dbd46, + 0x2dcd88, + 0x2dcf86, + 0x202a04, + 0x2a21cb, + 0x2dfa03, + 0x2dfa05, + 0x20e982, + 0x365142, + 0x55646b42, + 0x55a0a942, + 0x216843, + 0x55e720c2, + 0x2720c3, + 0x2e0483, + 0x56603e42, + 0x56ae4806, + 0x258d46, + 0x56ee4942, + 0x5720e202, + 0x57666002, + 0x57a0cac2, + 0x57e0e882, + 0x58203882, + 0x20c543, + 0x3af006, + 0x5861e484, + 0x21620a, + 0x3b0106, + 0x281284, + 0x208143, + 0x59216102, + 0x203182, + 0x241c83, + 0x59617fc3, + 0x3c49c7, + 0x394ec7, + 0x5c245ec7, + 0x37efc7, + 0x228803, + 0x22880a, + 0x237bc4, + 0x31ef04, + 0x31ef0a, + 0x22eb85, + 0x5c60e742, + 0x250343, + 0x5ca00602, + 0x24dfc3, + 0x3a24c3, + 0x5d200582, + 0x3c1744, + 0x207f84, + 0x3dcc45, + 0x32e9c5, + 0x2f6786, + 0x30a546, + 0x5d63bec2, + 0x5da02542, + 0x301dc5, + 0x258a52, + 0x363486, + 0x291043, + 0x31c146, + 0x2b6585, + 0x1605cc2, + 0x65e0fec2, + 0x377b43, + 0x20fec3, + 0x39f483, + 0x66201102, + 0x20f443, + 0x666035c2, + 0x207583, + 0x3dcf88, + 0x269543, + 0x2b0286, + 0x3da087, + 0x34f0c6, + 0x34f0cb, + 0x2811c7, + 0x2f6f04, + 0x66e00c02, + 0x2c1505, + 0x67217f83, + 0x235fc3, + 0x332505, + 0x34a9c3, + 0x67b4a9c6, + 0x3d048a, + 0x2a98c3, + 0x2371c4, 0x2003c6, - 0x2af186, - 0x66a42543, - 0x299047, - 0x237807, - 0x2a2c85, - 0x2e4406, - 0x222003, - 0x6960f7c3, - 0x69a00a82, - 0x69e0f044, - 0x3df689, - 0x21d685, - 0x356cc4, - 0x355b48, - 0x264bc5, - 0x6a231ac5, - 0x241f49, - 0x202503, - 0x33da04, - 0x6a614282, - 0x214283, - 0x6aa57b82, - 0x257b86, - 0x1677282, - 0x6ae15302, - 0x290b08, - 0x290e03, - 0x2bf287, - 0x2b9605, - 0x2b9185, - 0x2b918b, - 0x2eec86, - 0x2b9386, - 0x27d384, - 0x2efa86, - 0x6b321708, - 0x27fd03, - 0x265f03, - 0x265f04, - 0x2ed8c4, - 0x2f6a07, - 0x315645, - 0x6b72a5c2, - 0x6ba0a882, - 0x6c21bfc5, - 0x2c1044, - 0x2e0a0b, - 0x2f7688, - 0x253604, - 0x6c62c4c2, - 0x6ca1b742, - 0x3ba2c3, - 0x2f9484, - 0x2f9745, - 0x2fa147, - 0x6cefc304, - 0x378904, - 0x6d2141c2, - 0x37ab09, - 0x2fd745, - 0x2431c5, - 0x2fe2c5, - 0x6d6141c3, - 0x237f04, - 0x237f0b, - 0x2fedc4, - 0x2ff08b, - 0x3001c5, - 0x216eca, - 0x301708, - 0x30190a, - 0x3021c3, - 0x3021ca, - 0x6de11e42, - 0x6e214b42, - 0x6e615d43, - 0x6eadbd02, - 0x3068c3, - 0x6eef6702, - 0x6f333e42, - 0x309004, - 0x2177c6, - 0x399e05, - 0x30a643, - 0x298046, - 0x399905, - 0x3573c4, - 0x6f600902, - 0x299ec4, - 0x2d5dca, - 0x2ba807, - 0x33f5c6, - 0x234207, - 0x23e343, - 0x2c29c8, - 0x3d21cb, - 0x2bc9c5, - 0x2c8b85, - 0x2c8b86, - 0x34cb84, - 0x38ab88, - 0x21aa43, - 0x26ee44, - 0x3c3747, - 0x31d3c6, - 0x380b86, - 0x2c324a, - 0x24d804, - 0x31c0ca, - 0x6fb12606, - 0x312607, - 0x255c07, - 0x2a9a04, - 0x34a189, - 0x238dc5, - 0x307a4b, - 0x2f6603, - 0x20cc83, - 0x6fe1e243, - 0x22fb84, - 0x70200682, - 0x307e06, - 0x706c60c5, - 0x359345, - 0x24fc86, - 0x2a4944, - 0x70a013c2, - 0x241e84, - 0x70e0ca42, - 0x2160c5, - 0x3b2e44, - 0x71a1c5c3, - 0x71e0aa02, - 0x20aa03, - 0x21f646, - 0x72205142, - 0x393d08, - 0x2222c4, - 0x2222c6, - 0x391106, - 0x726574c4, - 0x21a205, - 0x356d88, - 0x3577c7, - 0x2ae247, - 0x2ae24f, - 0x292f46, - 0x23d183, - 0x242144, - 0x209043, - 0x221604, - 0x24e484, - 0x72a0b382, - 0x28d203, - 0x330983, - 0x72e090c2, - 0x215803, - 0x220f03, - 0x20e2ca, - 0x273847, - 0x25284c, - 0x73252b06, - 0x252c86, - 0x255407, - 0x7362e987, - 0x25a749, - 0x308784, - 0x73a5be04, - 0x73e023c2, - 0x742045c2, - 0x2c3606, - 0x298e44, - 0x28d686, - 0x22ee08, - 0x38b944, - 0x2eafc6, - 0x28ebc5, - 0x74750788, - 0x242343, - 0x3a6b85, - 0x3aa603, - 0x2432c3, - 0x2432c4, - 0x208dc3, - 0x74a499c2, - 0x74e02d42, - 0x2f64c9, - 0x290d05, - 0x291604, - 0x29ab05, - 0x206a84, - 0x286707, - 0x35a685, - 0x7523e804, - 0x2db988, - 0x2dcdc6, - 0x2e2d44, - 0x2e6e08, - 0x2e7447, - 0x75607842, - 0x2ef184, - 0x314cc4, - 0x2c9247, - 0x75a07844, - 0x24a682, - 0x75e02f82, - 0x210883, - 0x2e5ac4, - 0x299943, - 0x2b2cc5, - 0x7622ae42, - 0x309345, - 0x23c7c2, - 0x30f885, - 0x23c7c5, - 0x76607242, - 0x327704, - 0x76a071c2, - 0x33d486, - 0x2c8686, - 0x37fd88, - 0x2c9c08, - 0x380e04, - 0x3cdb05, - 0x310389, - 0x2f0684, - 0x3cabc4, - 0x288b03, - 0x26c703, - 0x76f02905, - 0x3829c5, - 0x283644, - 0x359b4d, - 0x294ec2, - 0x376403, - 0x77206382, - 0x77603242, - 0x3937c5, - 0x24b447, - 0x224244, - 0x32f2c9, - 0x2d5f09, - 0x2770c3, - 0x2770c8, - 0x312b09, - 0x21e7c7, - 0x77a08805, - 0x396406, - 0x3a06c6, - 0x3a8645, - 0x377285, - 0x77e01bc2, - 0x27a585, - 0x2bd4c8, - 0x2cb646, - 0x783b4347, - 0x2cf3c4, - 0x2da987, - 0x30b306, - 0x78601082, - 0x396586, - 0x30ef0a, - 0x30f785, - 0x78af00c2, - 0x78e11102, - 0x365486, - 0x211108, - 0x7928df87, - 0x79601402, - 0x214b83, - 0x3c0706, - 0x2caac4, - 0x346ac6, - 0x271ac6, - 0x26930a, - 0x2047c5, - 0x286f06, - 0x384643, - 0x384644, - 0x79a35002, - 0x2869c3, - 0x79e1a902, - 0x2ea903, - 0x7a218ac4, - 0x211244, - 0x7a61124a, - 0x21bd03, - 0x237ac7, - 0x313146, - 0x33c284, - 0x20d942, - 0x2aad42, - 0x7aa007c2, - 0x226e83, - 0x2559c7, + 0x2b1fc6, + 0x67e3e083, + 0x273987, + 0x26a647, + 0x2a3e85, + 0x2b2346, + 0x21a903, + 0x6aa25fc3, + 0x6ae00a82, + 0x6b20e9c4, + 0x213b49, + 0x226685, + 0x266e44, + 0x35a3c8, + 0x241e85, + 0x6b642285, + 0x247e89, + 0x3b4d43, + 0x349604, + 0x6ba05b42, + 0x216a43, + 0x6be75c42, + 0x275c46, + 0x167ce82, + 0x6c20c182, + 0x296448, + 0x29a743, + 0x2c5f87, + 0x384605, + 0x2be805, + 0x2be80b, + 0x2f0b06, + 0x2bea06, + 0x2804c4, + 0x211c86, + 0x6c6f1608, + 0x287403, + 0x25be43, + 0x25be44, + 0x2f0184, + 0x2f8747, + 0x318245, + 0x6cb20202, + 0x6ce04fc2, + 0x6d604fc5, + 0x2c6a84, + 0x2f114b, + 0x2f9188, + 0x306444, + 0x6da2c8c2, + 0x6de2d782, + 0x3c2f03, + 0x2faf84, + 0x2fb245, + 0x2fbd47, + 0x6e2fe604, + 0x390ec4, + 0x6e616982, + 0x380fc9, + 0x2ffa45, + 0x243bc5, + 0x3005c5, + 0x6ea16983, + 0x237e84, + 0x237e8b, + 0x3010c4, + 0x30138b, + 0x301f05, + 0x217bca, + 0x303dc8, + 0x303fca, + 0x304883, + 0x30488a, + 0x6f213982, + 0x6f642c42, + 0x6fa0d403, + 0x6fede302, + 0x307643, + 0x702f8442, + 0x70739c42, + 0x308544, + 0x218386, + 0x3350c5, + 0x30c343, + 0x32fc06, + 0x3a0645, + 0x366b44, + 0x70a00902, + 0x2ae704, + 0x2d810a, + 0x2c0587, + 0x34ad46, + 0x235407, + 0x23e883, + 0x2c92c8, + 0x3dc44b, + 0x2ce445, + 0x223585, + 0x223586, + 0x342604, + 0x3cd748, + 0x2198c3, + 0x28b144, + 0x3cdc87, + 0x2f6b46, + 0x314a06, + 0x2c86ca, + 0x24d544, + 0x3214ca, + 0x70f5ccc6, + 0x35ccc7, + 0x255d87, + 0x2ab784, + 0x34c349, + 0x238cc5, + 0x2f8343, + 0x2201c3, + 0x7121b843, + 0x231704, + 0x71600682, + 0x266886, + 0x71acbc45, + 0x31c385, + 0x2505c6, + 0x2a6184, + 0x71e02b02, + 0x2421c4, + 0x7220d782, + 0x20d785, + 0x37d504, + 0x7361a6c3, + 0x73a08382, + 0x208383, + 0x34d886, + 0x73e07742, + 0x399508, + 0x223e44, + 0x223e46, + 0x396906, + 0x74257784, + 0x217e05, + 0x368548, + 0x265c07, + 0x2b1087, + 0x2b108f, + 0x2980c6, + 0x23c0c3, + 0x23db04, + 0x219b43, + 0x222ac4, + 0x24c404, + 0x74606c82, + 0x2bef83, + 0x337143, + 0x74a08502, + 0x20cec3, + 0x30be83, + 0x21270a, + 0x279407, + 0x25070c, + 0x74e509c6, + 0x250b46, + 0x253b87, + 0x752302c7, + 0x259009, + 0x75666444, + 0x75a0a1c2, + 0x75e02442, + 0x2c8a86, + 0x273784, + 0x2bf406, + 0x230748, + 0x3926c4, + 0x2f7a46, + 0x2ada45, + 0x7628dc88, + 0x2424c3, + 0x292005, + 0x3ab143, + 0x243cc3, + 0x243cc4, + 0x21d2c3, + 0x7664b642, + 0x76a04782, + 0x2f8209, + 0x293a05, + 0x293d84, + 0x294545, + 0x210f44, + 0x28eec7, + 0x35ff05, + 0x772ddf84, + 0x2ddf88, + 0x2df1c6, + 0x2e5144, + 0x2e8988, + 0x2e8fc7, + 0x7760ab02, + 0x2f1004, + 0x219c04, + 0x2ceb87, + 0x77a0ab04, + 0x2670c2, + 0x77e0ee42, + 0x20ee43, + 0x248884, + 0x29a503, + 0x2b7085, + 0x78201442, + 0x308885, + 0x23cac2, + 0x312645, + 0x23cac5, + 0x786010c2, + 0x316a04, + 0x78a018c2, + 0x349086, + 0x25ab46, + 0x385648, + 0x2cf888, + 0x314c84, + 0x35a585, + 0x310489, + 0x39b604, + 0x3d0444, + 0x2132c3, + 0x237c83, + 0x78f1fb05, + 0x24fd85, + 0x28b044, + 0x35eacd, + 0x25cdc2, + 0x366543, + 0x79201702, + 0x79600ec2, + 0x398fc5, + 0x341947, + 0x227344, + 0x3c86c9, + 0x2d8249, + 0x25fc83, + 0x27ccc8, + 0x35d1c9, + 0x220f47, + 0x79b7b845, + 0x39d086, + 0x3a7d46, + 0x3ac645, + 0x2ee345, + 0x79e06242, + 0x28db85, + 0x2c4b48, + 0x2d1686, + 0x7a22aa87, + 0x2d1ec4, + 0x2d1447, + 0x30d006, + 0x7a603c02, + 0x39d206, + 0x311cca, + 0x312545, + 0x7aa30ac2, + 0x7ae92ec2, + 0x36c7c6, + 0x7b292ec7, + 0x7b60d982, + 0x242c83, + 0x3c75c6, + 0x2d0744, + 0x33ec86, + 0x24eac6, + 0x20290a, + 0x359945, + 0x35c986, + 0x38a183, + 0x38a184, + 0x7ba1cc42, + 0x28f183, + 0x7be1e202, + 0x2fccc3, + 0x7c215504, + 0x20de04, + 0x7c60de0a, + 0x219243, + 0x239747, + 0x315146, + 0x3670c4, + 0x281142, + 0x2ac982, + 0x7ca007c2, + 0x22b3c3, + 0x255b47, 0x2007c7, - 0x285d84, - 0x3da107, - 0x2fa246, - 0x210d47, - 0x220e44, - 0x2ae145, - 0x205345, - 0x7ae1e502, - 0x3d7286, - 0x220383, - 0x2266c2, - 0x2266c6, - 0x7b21f3c2, - 0x7b633442, - 0x29d005, - 0x7ba02c02, - 0x7be02982, - 0x324605, - 0x2d7505, - 0x2ac745, - 0x7c65b003, - 0x279a45, - 0x2eed47, - 0x36cc85, - 0x204985, - 0x261f44, - 0x264a46, - 0x38e104, - 0x7ca008c2, - 0x7d793085, - 0x3cb087, - 0x3c0bc8, - 0x253c46, - 0x253c4d, - 0x262d49, - 0x262d52, - 0x37a385, - 0x37ae03, - 0x7da09d42, - 0x3027c4, - 0x226603, - 0x3cb985, - 0x310f85, - 0x7de0c782, - 0x25a6c3, - 0x7e226dc2, - 0x7ea1d602, - 0x7ee00082, - 0x2e9bc5, - 0x207643, - 0x7f205b02, - 0x7f60c2c2, - 0x38a886, - 0x2d020a, - 0x215003, - 0x2579c3, - 0x2ff8c3, - 0x80e01b82, - 0x8f20c1c2, - 0x8fa0a5c2, - 0x203642, - 0x3ce689, - 0x2ce144, - 0x2dfac8, - 0x8ff04382, - 0x90606482, - 0x3bd905, - 0x233c88, - 0x231148, - 0x2f738c, - 0x2398c3, - 0x90a075c2, - 0x90e00f02, - 0x24ac46, - 0x313fc5, - 0x295b43, - 0x254686, - 0x314106, - 0x296b03, - 0x314c03, - 0x315046, - 0x316884, - 0x29cc86, - 0x23cd44, - 0x316f44, - 0x31784a, - 0x912b7402, - 0x24e705, - 0x3193ca, - 0x319305, - 0x31a7c4, - 0x31a8c6, - 0x31aa44, - 0x214546, - 0x91602b42, - 0x24c5c6, - 0x33bf85, - 0x286d87, - 0x33a106, - 0x255604, - 0x2e3407, - 0x234f85, - 0x23b687, - 0x3bc247, - 0x3bc24e, - 0x278646, - 0x222705, - 0x207787, - 0x20a783, - 0x3d3a47, - 0x20ab85, - 0x2123c4, - 0x22a8c2, - 0x325ec7, - 0x310cc4, - 0x23dec4, - 0x284a4b, - 0x21cb83, - 0x2c4907, - 0x21cb84, - 0x2c4c07, - 0x3a6603, - 0x34e40d, - 0x3a2f88, - 0x91a292c4, - 0x23e705, - 0x31b805, - 0x31bc43, - 0x91e221c2, - 0x31d1c3, - 0x31e083, - 0x3d7404, - 0x27bf85, - 0x220407, - 0x3846c6, - 0x38d943, - 0x22680b, - 0x249b8b, - 0x2acfcb, - 0x2c174b, - 0x3ccd4a, - 0x31734b, - 0x36ea8b, - 0x394e0c, - 0x3ada0b, - 0x3bf811, - 0x3dcf4a, - 0x31f58b, - 0x31f84c, - 0x31fb4b, - 0x3200ca, - 0x3209ca, - 0x3221ce, - 0x32294b, - 0x322c0a, - 0x324751, - 0x324b8a, - 0x32508b, - 0x3255ce, - 0x326c8c, - 0x32784b, - 0x327b0e, - 0x327e8c, - 0x328bca, - 0x329d4c, - 0x9232a04a, - 0x32a808, - 0x32b3c9, - 0x32ce8a, - 0x32d10a, - 0x32d38b, - 0x33010e, - 0x3316d1, - 0x33e209, - 0x33e44a, - 0x33ee8b, - 0x33fc0d, - 0x340a8a, - 0x341616, - 0x34298b, - 0x34668a, - 0x347d0a, - 0x3490cb, - 0x34aa49, - 0x34ed89, - 0x34f30d, - 0x34fe0b, - 0x351c8b, - 0x352509, - 0x352b4e, - 0x35328a, - 0x353dca, - 0x35438a, - 0x354a0b, - 0x35524b, - 0x3585cd, - 0x35a18d, - 0x35b050, - 0x35b50b, - 0x35ce4c, - 0x35d98b, - 0x35f44b, - 0x360c4e, - 0x36128b, - 0x36128d, - 0x3663cb, - 0x366e4f, - 0x36720b, - 0x36860a, - 0x368e49, - 0x369509, - 0x9276988b, - 0x369b4e, - 0x369ece, - 0x36be8b, - 0x36d64f, - 0x370acb, - 0x370d8b, - 0x37104b, - 0x37164a, - 0x3764c9, - 0x37964f, - 0x37e24c, - 0x37f30c, - 0x38058e, - 0x3810cf, - 0x38148e, - 0x381e50, - 0x38224f, - 0x382b4e, - 0x38320c, - 0x383511, - 0x383952, - 0x3856d1, - 0x385dce, - 0x38620b, - 0x38620e, - 0x38658f, - 0x38694e, - 0x386cd3, - 0x387191, - 0x3875cc, - 0x3878ce, - 0x387d4c, - 0x388293, - 0x388a90, - 0x389b8c, - 0x389e8c, - 0x38a34b, - 0x38ae4e, - 0x38b34b, - 0x38cb4b, - 0x38ddcc, - 0x39424a, - 0x39460c, - 0x39490c, - 0x394c09, - 0x396a0b, - 0x396cc8, - 0x397509, - 0x39750f, - 0x3991cb, - 0x92b9a54a, - 0x39bd0c, - 0x39cccb, - 0x39cf89, - 0x39d348, - 0x39da4b, - 0x39df4b, - 0x39eb8a, - 0x39ee0b, - 0x39f78c, - 0x3a0149, - 0x3a0388, - 0x3a3d0b, - 0x3a6f4b, - 0x3a91ce, - 0x3aaf4b, - 0x3ad38b, - 0x3bbdcb, - 0x3bc089, - 0x3bc5cd, - 0x3cbe4a, - 0x3cf5d7, - 0x3d18d8, - 0x3d5909, - 0x3d6b0b, - 0x3d79d4, - 0x3d7ecb, - 0x3d844a, - 0x3d894a, - 0x3d8bcb, - 0x3da790, - 0x3dab91, - 0x3db24a, - 0x3dc54d, - 0x3dcc4d, - 0x3e06cb, - 0x3d7383, - 0x92f9b403, - 0x289b06, - 0x246085, - 0x30ccc7, - 0x2ef746, - 0x165c942, - 0x270b89, - 0x297e44, - 0x2ed408, - 0x21e183, - 0x302707, - 0x205602, - 0x2b5503, - 0x93201442, - 0x2d69c6, - 0x2d8084, - 0x38f1c4, - 0x268643, - 0x93ad3982, - 0x93e2a784, - 0x34a0c7, - 0x9422a502, - 0x214a83, - 0x232dc3, - 0x308003, - 0x23c803, - 0x21a3c3, - 0x242543, - 0x105dc8, - 0x203dc3, + 0x28e544, + 0x3e2587, + 0x2fbe46, + 0x20f307, + 0x30bdc4, + 0x2e5d45, + 0x218ac5, + 0x7ce05682, + 0x216f86, + 0x227043, + 0x227ec2, + 0x227ec6, + 0x7d21c882, + 0x7d62dc42, + 0x238f85, + 0x7da03d02, + 0x7de02a82, + 0x353545, + 0x2d9845, + 0x2af105, + 0x7e65aa03, + 0x279185, + 0x2f0bc7, + 0x2b7945, + 0x359b05, + 0x268b84, + 0x266cc6, + 0x3944c4, + 0x7ea008c2, + 0x7f798885, + 0x3d0907, + 0x3a09c8, + 0x269f86, + 0x269f8d, + 0x26f7c9, + 0x26f7d2, + 0x34d185, + 0x380843, + 0x7fa03b42, + 0x31f9c4, + 0x22db83, + 0x393e85, + 0x313785, + 0x7fe1fcc2, + 0x259fc3, + 0x8022b302, + 0x80a1cac2, + 0x80e00082, + 0x2ec2c5, + 0x213fc3, + 0x81208f02, + 0x81604642, + 0x3c1706, + 0x27e1ca, + 0x20c6c3, + 0x257c83, + 0x2f7343, + 0x832072c2, + 0x9161f702, + 0x91e07ac2, + 0x2034c2, + 0x3d3d09, + 0x2d4584, + 0x2e1c88, + 0x92305102, + 0x92a01502, + 0x2c2285, + 0x234e88, + 0x2f65c8, + 0x2fb70c, + 0x239683, + 0x92e13f42, + 0x9320e482, + 0x2bce06, + 0x315fc5, + 0x2e5583, + 0x247cc6, + 0x316106, + 0x253383, + 0x317803, + 0x317c46, + 0x319484, + 0x26aa06, + 0x236444, + 0x319b44, + 0x31ad0a, + 0x936bb102, + 0x24e605, + 0x31c58a, + 0x31c4c5, + 0x31e504, + 0x31e606, + 0x31e784, + 0x216d06, + 0x93a03c42, + 0x2ecf86, + 0x358f85, + 0x35c807, + 0x3c7386, + 0x253d84, + 0x2e5807, + 0x21dfc5, + 0x21dfc7, + 0x3c3a87, + 0x3c3a8e, + 0x280bc6, + 0x2bda05, + 0x20aa47, + 0x20e243, + 0x20e247, + 0x228f05, + 0x22bfc4, + 0x368842, + 0x32a1c7, + 0x241184, + 0x32a684, + 0x3ab1cb, + 0x21ab83, + 0x2dd0c7, + 0x21ab84, + 0x2dd3c7, + 0x3ae243, + 0x34f8cd, + 0x3aa588, + 0x93e45f84, + 0x366dc5, + 0x31f345, + 0x31f783, + 0x94223d42, + 0x322283, + 0x322b03, + 0x217104, + 0x283c85, + 0x224e87, + 0x38a206, + 0x393c43, + 0x22ad4b, + 0x322c8b, + 0x283d8b, + 0x2b32cb, + 0x2c718a, + 0x2d184b, + 0x2f1b4b, + 0x35ab4c, + 0x319f4b, + 0x374b91, + 0x39ad0a, + 0x3b794b, + 0x3c694c, + 0x3df28b, + 0x3256ca, + 0x325bca, + 0x326a4e, + 0x3271cb, + 0x32748a, + 0x328a51, + 0x328e8a, + 0x32938b, + 0x3298ce, + 0x32b70c, + 0x32c34b, + 0x32c60e, + 0x32c98c, + 0x32d6ca, + 0x32ee8c, + 0x9472f18a, + 0x32fd88, + 0x330949, + 0x33308a, + 0x33330a, + 0x33358b, + 0x3368ce, + 0x337751, + 0x341dc9, + 0x34200a, + 0x342b4b, + 0x34348d, + 0x34430a, + 0x3455d6, + 0x34694b, + 0x349e0a, + 0x34a38a, + 0x34b28b, + 0x34cc09, + 0x350249, + 0x3507cd, + 0x3510cb, + 0x352bcb, + 0x353689, + 0x353cce, + 0x35410a, + 0x35a04a, + 0x35a7ca, + 0x35b18b, + 0x35b9cb, + 0x35e2cd, + 0x35fa0d, + 0x360310, + 0x3607cb, + 0x36210c, + 0x36288b, + 0x36494b, + 0x36614e, + 0x36660b, + 0x36660d, + 0x36d70b, + 0x36e18f, + 0x36e54b, + 0x36f50a, + 0x36fb09, + 0x370089, + 0x94b7040b, + 0x3706ce, + 0x370a4e, + 0x3726cb, + 0x37374f, + 0x375fcb, + 0x37628b, + 0x37654a, + 0x37af49, + 0x37fa0f, + 0x3841cc, + 0x384bcc, + 0x385ece, + 0x38644f, + 0x38680e, + 0x3871d0, + 0x3875cf, + 0x3883ce, + 0x388f0c, + 0x389211, + 0x389652, + 0x38b3d1, + 0x38be8e, + 0x38c2cb, + 0x38c2ce, + 0x38c64f, + 0x38ca0e, + 0x38cd93, + 0x38d251, + 0x38d68c, + 0x38d98e, + 0x38de0c, + 0x38e353, + 0x38f1d0, + 0x3902cc, + 0x3905cc, + 0x390a8b, + 0x391bce, + 0x3920cb, + 0x392e4b, + 0x39418c, + 0x399a4a, + 0x39a50c, + 0x39a80c, + 0x39ab09, + 0x39d68b, + 0x39d948, + 0x39e649, + 0x39e64f, + 0x39ff0b, + 0x94fa0bca, + 0x3a268c, + 0x3a364b, + 0x3a3909, + 0x3a3cc8, + 0x3a458b, + 0x3a688a, + 0x3a6b0b, + 0x3a700c, + 0x3a77c9, + 0x3a7a08, + 0x3ab48b, + 0x3aeb8b, + 0x3b0d0e, + 0x3b244b, + 0x3b72cb, + 0x3c360b, + 0x3c38c9, + 0x3c3e0d, + 0x3d148a, + 0x3d4917, + 0x3d5618, + 0x3d8989, + 0x3d9ccb, + 0x3daad4, + 0x3dafcb, + 0x3db54a, + 0x3dbc0a, + 0x3dbe8b, + 0x3dd190, + 0x3dd591, + 0x3ddc4a, + 0x3de88d, + 0x3def8d, + 0x3e104b, + 0x217083, + 0x953b3583, + 0x2b0f46, + 0x27ca85, + 0x29c647, + 0x384906, + 0x1602342, + 0x2b3609, + 0x32fa04, + 0x2efcc8, + 0x21b783, + 0x31f907, + 0x230902, + 0x2b8f03, + 0x95603602, + 0x2d8d06, + 0x2da3c4, + 0x377084, + 0x201c43, + 0x95ed56c2, + 0x9622c344, + 0x34c287, + 0x9662bf82, + 0x22ea43, + 0x233fc3, + 0x266a83, + 0x23cb03, + 0x217fc3, + 0x23e083, + 0x106b48, + 0x205803, 0x2000c2, - 0x9a048, - 0x201242, - 0x308003, - 0x23c803, - 0x21a3c3, - 0x3dc3, - 0x242543, - 0x20e2c3, - 0x337396, - 0x364d53, - 0x3d9f89, - 0x2135c8, - 0x3b1449, - 0x319546, - 0x351190, - 0x20dcd3, - 0x31d488, - 0x277e87, - 0x279e87, - 0x2a86ca, - 0x343189, - 0x267d49, - 0x2d368b, - 0x303c06, - 0x30334a, - 0x2205c6, - 0x32a4c3, - 0x2e2905, - 0x3ba348, - 0x27decd, - 0x2f330c, - 0x2ec347, - 0x30bfcd, - 0x2136c4, - 0x22fe4a, - 0x23134a, - 0x23180a, - 0x20dfc7, - 0x23cb87, - 0x240104, - 0x273506, - 0x348a44, - 0x304c08, - 0x289909, - 0x2e6606, - 0x2e6608, - 0x24360d, - 0x2d6149, - 0x392488, - 0x243147, - 0x3b27ca, - 0x250086, - 0x2fd244, - 0x212107, - 0x30800a, - 0x3ab68e, - 0x277185, - 0x3daf8b, - 0x226bc9, - 0x22e0c9, - 0x2b3147, - 0x3d090a, - 0x2c9187, - 0x2ff649, - 0x33b048, - 0x2a5e8b, - 0x2ec0c5, - 0x22c50a, - 0x223d49, - 0x295aca, - 0x20f30b, - 0x21200b, - 0x2d3415, - 0x2c8205, - 0x2431c5, - 0x237f0a, - 0x22b98a, - 0x2f5d87, - 0x233dc3, - 0x2c3588, - 0x2e0eca, - 0x2222c6, - 0x259c09, - 0x350788, - 0x2e2d44, - 0x388049, - 0x2c9c08, - 0x2ca947, - 0x393086, - 0x3cb087, - 0x2be807, - 0x23f5c5, - 0x2d314c, - 0x23e705, - 0x214a83, - 0x232dc3, - 0x308003, - 0x21a3c3, - 0x3dc3, - 0x242543, - 0x201242, - 0x214a83, - 0x21a3c3, - 0x203dc3, - 0x242543, - 0x214a83, - 0x21a3c3, - 0x3dc3, - 0x2624c3, - 0x242543, - 0x1cc203, - 0x9a048, - 0x214a83, - 0x232dc3, - 0x308003, - 0x23c803, - 0x21a3c3, - 0x3dc3, - 0x242543, - 0x9a048, - 0x201242, - 0x214a83, - 0x22ca07, - 0x86504, - 0x21a3c3, - 0x97a04, - 0x242543, - 0x201242, - 0x2052c2, - 0x3192c2, - 0x207882, - 0x201582, - 0x2eda82, - 0x908c6, - 0x50849, - 0xf3fc7, - 0x481c5c3, - 0x86107, - 0x148406, - 0x7783, - 0x11af85, + 0xae888, + 0x212402, + 0x266a83, + 0x23cb03, + 0x217fc3, + 0x5803, + 0x23e083, + 0x208503, + 0x33cb96, + 0x36c093, + 0x3e2409, + 0x215d88, + 0x2c1389, + 0x31c706, + 0x3520d0, + 0x212113, + 0x2f6c08, + 0x282247, + 0x28d487, + 0x2aaa8a, + 0x36a609, + 0x3573c9, + 0x24cd4b, + 0x34b706, + 0x32ce4a, + 0x221106, + 0x32f603, + 0x2e4d05, + 0x20f4c8, + 0x28598d, + 0x2f45cc, + 0x3033c7, + 0x30e60d, + 0x215e84, + 0x2319ca, + 0x23248a, + 0x23294a, + 0x212407, + 0x23ce87, + 0x2410c4, + 0x269c06, + 0x35d584, + 0x305988, + 0x3c0509, + 0x2e9f06, + 0x2e9f08, + 0x24400d, + 0x2d8489, + 0x397c88, + 0x243b47, + 0x33230a, + 0x251186, + 0x2ff544, + 0x225c07, + 0x266a8a, + 0x23fb8e, + 0x246145, + 0x3dd98b, + 0x22b109, + 0x247109, + 0x205447, + 0x20544a, + 0x2ceac7, + 0x301949, + 0x347c88, + 0x33284b, + 0x2ee705, + 0x22c90a, + 0x265dc9, + 0x3568ca, + 0x21b8cb, + 0x225b0b, + 0x24cad5, + 0x2ce085, + 0x243bc5, + 0x237e8a, + 0x2527ca, + 0x321a07, + 0x234fc3, + 0x2c8a08, + 0x2e32ca, + 0x223e46, + 0x256689, + 0x28dc88, + 0x2e5144, + 0x38e109, + 0x2cf888, + 0x2d05c7, + 0x398886, + 0x3d0907, + 0x2c51c7, + 0x2401c5, + 0x245f8c, + 0x366dc5, + 0x22ea43, + 0x233fc3, + 0x266a83, + 0x217fc3, + 0x5803, + 0x23e083, + 0x212402, + 0x22ea43, + 0x217fc3, + 0x205803, + 0x23e083, + 0x22ea43, + 0x217fc3, + 0x5803, + 0x269543, + 0x23e083, + 0x1d1843, + 0xae888, + 0x22ea43, + 0x233fc3, + 0x266a83, + 0x23cb03, + 0x217fc3, + 0x5803, + 0x23e083, + 0xae888, + 0x212402, + 0x22ea43, + 0x22ea47, + 0x8ecc4, + 0x217fc3, + 0x1b5c04, + 0x23e083, + 0x212402, + 0x204542, + 0x2f6e82, + 0x2022c2, + 0x202582, + 0x2f2402, + 0x96206, + 0x51709, + 0xe9bc7, + 0x481a6c3, + 0x8e8c7, + 0x154546, + 0xaa43, + 0x11eec5, 0xc1, - 0x5214a83, - 0x232dc3, - 0x228503, - 0x308003, - 0x21bc83, - 0x23c803, - 0x2e2806, - 0x21a3c3, - 0x242543, - 0x233d43, - 0x9a048, - 0x345b44, - 0x296c87, - 0x268683, - 0x2bad84, - 0x2187c3, - 0x284d43, - 0x308003, - 0x17e707, + 0x522ea43, + 0x233fc3, + 0x280203, + 0x266a83, + 0x2191c3, + 0x23cb03, + 0x2e4c06, + 0x217fc3, + 0x23e083, + 0x234f43, + 0xae888, + 0x3b46c4, + 0x324547, + 0x201c83, + 0x39e284, + 0x2052c3, + 0x2054c3, + 0x266a83, + 0x178d87, 0x9c4, - 0x4e83, - 0x68b05, + 0x157bc3, + 0x2105, 0x66000c2, - 0x2703, - 0x6a01242, - 0x6c8c109, - 0x8c98d, - 0x8cccd, - 0x3192c2, - 0x21dc4, - 0x68b49, + 0x4ac43, + 0x6a12402, + 0x6e8b749, + 0x7091e09, + 0x923cd, + 0x9270d, + 0x2f6e82, + 0xe704, + 0x2149, 0x2003c2, - 0x7221cc8, - 0xfe7c4, - 0x31c843, - 0x9a048, - 0x1414882, + 0x7623188, + 0x100ac4, + 0x320c03, + 0xae888, + 0x41184, + 0x140ea82, 0x14005c2, - 0x1414882, - 0x1517146, - 0x22f043, - 0x26f6c3, - 0x7a14a83, - 0x22fe44, - 0x7e32dc3, - 0x8b08003, - 0x206182, - 0x221dc4, - 0x21a3c3, - 0x3b1e83, - 0x204042, - 0x242543, - 0x202642, - 0x308f43, - 0x205142, - 0x2263c3, - 0x223a43, - 0x201342, - 0x9a048, - 0x22f043, - 0x3df888, - 0x83b1e83, - 0x204042, - 0x308f43, - 0x205142, - 0x86263c3, - 0x223a43, - 0x201342, - 0x252b07, - 0x232dc9, - 0x308f43, - 0x205142, - 0x2263c3, - 0x223a43, - 0x201342, - 0x214a83, - 0x16c2, - 0x32443, - 0x3c42, - 0xaac82, - 0x5cd82, - 0x17c2, - 0x1b82, - 0x43342, - 0x202703, - 0x214a83, - 0x232dc3, - 0x308003, - 0x221dc4, - 0x21bc83, - 0x23c803, - 0x219a04, - 0x21a3c3, - 0x242543, - 0x20eb02, - 0x2141c3, - 0x9a048, - 0x214a83, - 0x232dc3, - 0x308003, - 0x23c803, - 0x21a3c3, - 0x242543, - 0x202703, - 0x201242, - 0x214a83, - 0x232dc3, - 0x308003, - 0x221dc4, - 0x21a3c3, - 0x242543, - 0x208805, - 0x20c782, + 0x140ea82, + 0x1519d46, + 0x230983, + 0x276243, + 0x7e2ea43, + 0x2319c4, + 0x8233fc3, + 0x8a66a83, + 0x209582, + 0x20e704, + 0x217fc3, + 0x3319c3, + 0x209282, + 0x23e083, + 0x2188c2, + 0x308483, + 0x207742, + 0x203b83, + 0x222403, + 0x207d02, + 0xae888, + 0x230983, + 0x210448, + 0x87319c3, + 0x209282, + 0x308483, + 0x207742, + 0x203b83, + 0x222403, + 0x207d02, + 0x2509c7, + 0x308483, + 0x207742, + 0x203b83, + 0x222403, + 0x207d02, + 0x22ea43, + 0x6c02, + 0xf4c3, + 0x31c2, + 0x293c2, + 0x4d82, + 0x8c82, + 0x72c2, + 0x43d42, + 0x24ac43, + 0x22ea43, + 0x233fc3, + 0x266a83, + 0x20e704, + 0x2191c3, + 0x23cb03, + 0x21e484, + 0x217fc3, + 0x23e083, + 0x201b02, + 0x216983, + 0xae888, + 0x22ea43, + 0x233fc3, + 0x266a83, + 0x23cb03, + 0x217fc3, + 0x23e083, + 0x24ac43, + 0x212402, + 0x22ea43, + 0x233fc3, + 0x266a83, + 0x20e704, + 0x217fc3, + 0x23e083, + 0x37b845, + 0x21fcc2, 0x2000c2, - 0x9a048, - 0x144ca88, - 0x12848a, - 0x308003, - 0x225cc1, + 0xae888, + 0x1454408, + 0x7b64a, + 0x266a83, + 0x202881, 0x2009c1, 0x200a01, - 0x204ac1, - 0x204781, - 0x20a541, - 0x201941, - 0x225dc1, - 0x23ff81, + 0x201781, + 0x202101, + 0x20bac1, + 0x201d01, + 0x203001, + 0x230d41, 0x200001, 0x2000c1, 0x200201, - 0x139b05, - 0x9a048, + 0x146bc5, + 0xae888, 0x200101, - 0x201301, + 0x201381, 0x200501, - 0x205dc1, + 0x201281, 0x200041, 0x200801, 0x200181, @@ -2348,7193 +2344,7257 @@ var nodes = [...]uint32{ 0x200581, 0x2003c1, 0x200a81, - 0x215481, + 0x20c241, 0x200401, 0x200741, 0x2007c1, 0x200081, - 0x200f01, - 0x201341, - 0x204f01, - 0x201b41, - 0x201441, - 0x214a83, - 0x232dc3, - 0x308003, - 0x21a3c3, - 0x242543, - 0x201242, - 0x214a83, - 0x232dc3, + 0x201501, + 0x207d01, + 0x20a8c1, + 0x202341, + 0x201c41, + 0x22ea43, + 0x233fc3, + 0x266a83, + 0x217fc3, + 0x23e083, + 0x212402, + 0x22ea43, + 0x233fc3, 0x2003c2, - 0x242543, - 0x1bf83, - 0x17e707, - 0xd1407, - 0x28886, - 0x34b8a, - 0x8b848, - 0x54e08, - 0x558c7, - 0x174586, - 0xea585, - 0x97805, - 0x125483, - 0x11ec6, - 0x365c6, - 0x2d3684, - 0x328147, - 0x9a048, - 0x2e3504, - 0x214a83, - 0x232dc3, - 0x308003, - 0x21a3c3, - 0x242543, - 0x1242, - 0x214a83, - 0x232dc3, - 0x308003, - 0x21a3c3, - 0x242543, - 0x32a248, - 0x204244, - 0x232d04, - 0x229904, - 0x24ab47, - 0x2e0007, - 0x214a83, - 0x235b4b, - 0x29650a, - 0x33c147, - 0x23bc48, - 0x33b888, - 0x232dc3, - 0x287847, - 0x228503, - 0x206f88, - 0x2130c9, - 0x221dc4, - 0x21bc83, - 0x23b248, - 0x23c803, - 0x2dd74a, - 0x2e2806, - 0x3a4987, - 0x21a3c3, - 0x267906, - 0x26f548, - 0x242543, - 0x24d446, - 0x2f78cd, - 0x2f9e08, - 0x2fedcb, - 0x20eb46, - 0x24b347, - 0x2225c5, - 0x21674a, - 0x308245, - 0x3828ca, - 0x20c782, - 0x207783, - 0x23dec4, + 0x23e083, + 0x1a083, + 0x178d87, + 0x7f3c7, + 0x36fc6, + 0x3a8ca, + 0x91248, + 0x54d88, + 0x55a47, + 0x6e8c6, + 0xec7c5, + 0x1b5a05, + 0x129783, + 0x13a06, + 0x134c46, + 0x24cd44, + 0x334907, + 0xae888, + 0x2e5904, + 0x22ea43, + 0x233fc3, + 0x266a83, + 0x217fc3, + 0x23e083, + 0x12402, + 0x22ea43, + 0x233fc3, + 0x266a83, + 0x217fc3, + 0x23e083, + 0x32f388, + 0x207d44, + 0x233f04, + 0x204cc4, + 0x2bcd07, + 0x2e21c7, + 0x22ea43, + 0x23670b, + 0x323dca, + 0x34b9c7, + 0x238548, + 0x354a88, + 0x233fc3, + 0x25e4c7, + 0x280203, + 0x211448, + 0x212e49, + 0x20e704, + 0x2191c3, + 0x23b948, + 0x23cb03, + 0x2dfb4a, + 0x2e4c06, + 0x3b0107, + 0x217fc3, + 0x323606, + 0x2760c8, + 0x23e083, + 0x257546, + 0x2f93cd, + 0x2fba08, + 0x3010cb, + 0x2b2946, + 0x341847, + 0x21ecc5, + 0x3da84a, + 0x22ac05, + 0x24fc8a, + 0x21fcc2, + 0x20aa43, + 0x32a684, 0x200006, - 0x3b05c3, - 0x299f43, - 0x27ee03, - 0x204243, - 0x296183, - 0x2041c2, - 0x355dc5, - 0x2ad8c9, - 0x23fc43, - 0x220dc3, - 0x21fdc3, + 0x3ba683, + 0x2ae783, + 0x281bc3, + 0x207d43, + 0x323a43, + 0x2029c2, + 0x309b85, + 0x2b07c9, + 0x201ac3, + 0x240843, + 0x233f03, + 0x232283, 0x200201, - 0x2f0447, - 0x2e9905, - 0x3b5c03, - 0x3d6d83, - 0x229904, - 0x343a43, - 0x20ff88, - 0x35d143, - 0x30d98d, - 0x278708, - 0x3dfa46, - 0x286a03, - 0x361583, - 0x38e083, - 0xce14a83, - 0x232608, - 0x235b44, - 0x240983, + 0x39b3c7, + 0x2ec005, + 0x3c2003, + 0x2a4d43, + 0x3dff03, + 0x204cc4, + 0x356e43, + 0x227608, + 0x322bc3, + 0x310c4d, + 0x280c88, + 0x210606, + 0x28f1c3, + 0x366903, + 0x394443, + 0xce2ea43, + 0x233808, + 0x236704, + 0x23d3c3, + 0x241283, 0x200106, - 0x243d88, - 0x27b0c3, - 0x216783, - 0x22d1c3, - 0x232dc3, - 0x21afc3, - 0x2532c3, - 0x283603, - 0x286983, - 0x2cbf83, - 0x2196c3, - 0x38b5c5, - 0x250804, - 0x251987, - 0x22dec2, - 0x254483, - 0x257d06, - 0x2592c3, - 0x25a283, - 0x277083, - 0x374e43, - 0x345843, - 0x29c047, - 0xd308003, - 0x2425c3, - 0x286a43, - 0x206c03, - 0x21bac3, - 0x24c903, - 0x20ef85, - 0x373c83, - 0x200e09, - 0x20bb83, - 0x311283, - 0xd63c883, - 0x2d3b03, - 0x219208, - 0x2ad806, - 0x374c06, - 0x2b7106, - 0x389147, - 0x227d43, - 0x2137c3, - 0x23c803, - 0x28b946, - 0x20f002, - 0x267d83, - 0x353145, - 0x21a3c3, - 0x319e87, - 0x1603dc3, - 0x202903, - 0x2089c3, - 0x21fec3, - 0x26d243, - 0x242543, - 0x209006, - 0x3b5f86, - 0x37a243, - 0x2f8a83, - 0x2141c3, - 0x220ec3, - 0x314c83, - 0x305fc3, - 0x309303, - 0x399905, - 0x22b983, - 0x39f446, - 0x2d1cc8, - 0x20cc83, - 0x20cc89, - 0x298948, - 0x223488, - 0x229a85, - 0x22f18a, - 0x23818a, - 0x239b4b, - 0x23b808, - 0x398943, - 0x38da83, - 0x30a583, - 0x326f48, - 0x376dc3, - 0x384644, - 0x235002, - 0x25ca83, + 0x244e88, + 0x20f983, + 0x21fa43, + 0x2b6ec3, + 0x222383, + 0x3da883, + 0x22f203, + 0x233fc3, + 0x22d003, + 0x249203, + 0x24cbc3, + 0x28b003, + 0x28f143, + 0x20a003, + 0x265743, + 0x392345, + 0x2516c4, + 0x252a47, + 0x2ba882, + 0x254b03, + 0x258106, + 0x259243, + 0x259c43, + 0x27cc83, + 0x26f183, + 0x20b183, + 0x3b43c3, + 0x29d847, + 0xd266a83, + 0x2c3fc3, + 0x28f203, + 0x204903, + 0x20e703, + 0x2ed2c3, + 0x20e905, + 0x37fd83, + 0x24b709, + 0x2012c3, + 0x313a83, + 0xd63cb83, + 0x2d5e43, + 0x204d03, + 0x218bc8, + 0x2b0706, + 0x26ef46, + 0x2ba8c6, + 0x38f887, + 0x205e03, + 0x215f83, + 0x23cb03, + 0x291346, + 0x20e982, + 0x2b8a83, + 0x33b645, + 0x217fc3, + 0x31da07, + 0x1605803, + 0x2760c3, + 0x212483, + 0x232383, + 0x235fc3, + 0x23e083, + 0x21d506, + 0x3b5d46, + 0x380703, + 0x2fa583, + 0x216983, + 0x250983, + 0x317883, + 0x306d43, + 0x308843, + 0x3a0645, + 0x235403, + 0x3b2a86, + 0x221d43, + 0x27fc88, + 0x2201c3, + 0x2201c9, + 0x273288, + 0x221e48, + 0x225645, + 0x36000a, + 0x38e84a, + 0x22f98b, + 0x238108, + 0x294983, + 0x2f2a03, + 0x393d83, + 0x39fa83, + 0x316248, + 0x37a903, + 0x38a184, + 0x21cc42, + 0x20de03, + 0x260e03, 0x2007c3, - 0x356c43, - 0x263343, - 0x233d43, - 0x20c782, - 0x229e43, - 0x2398c3, - 0x3172c3, - 0x318284, - 0x23dec4, - 0x20fe43, - 0x9a048, + 0x22dc43, + 0x27b143, + 0x234f43, + 0x21fcc2, + 0x22b8c3, + 0x239683, + 0x319ec3, + 0x31b744, + 0x32a684, + 0x21cb03, + 0xae888, 0x2000c2, 0x200ac2, - 0x2041c2, - 0x204b42, + 0x2029c2, + 0x201802, 0x200202, - 0x204342, - 0x240702, - 0x203c42, + 0x205082, + 0x249382, + 0x2031c2, 0x200382, 0x200c42, - 0x33d642, - 0x202382, - 0x26c9c2, + 0x349242, + 0x20a942, + 0x2720c2, 0x200a82, - 0x2eda82, - 0x214282, - 0x205742, - 0x2141c2, - 0x2c1902, - 0x2069c2, + 0x2f2402, + 0x205b42, + 0x211c82, + 0x216982, + 0x206002, + 0x205502, 0x200682, - 0x206f02, - 0x2013c2, - 0x2090c2, - 0x2045c2, - 0x26c702, - 0x202982, + 0x2113c2, + 0x202b02, + 0x208502, + 0x202442, + 0x207142, + 0x202a82, 0xc2, 0xac2, - 0x41c2, - 0x4b42, + 0x29c2, + 0x1802, 0x202, - 0x4342, - 0x40702, - 0x3c42, + 0x5082, + 0x49382, + 0x31c2, 0x382, 0xc42, - 0x13d642, - 0x2382, - 0x6c9c2, + 0x149242, + 0xa942, + 0x720c2, 0xa82, - 0xeda82, - 0x14282, - 0x5742, - 0x141c2, - 0xc1902, - 0x69c2, + 0xf2402, + 0x5b42, + 0x11c82, + 0x16982, + 0x6002, + 0x5502, 0x682, - 0x6f02, - 0x13c2, - 0x90c2, - 0x45c2, - 0x6c702, - 0x2982, - 0x214a83, - 0x232dc3, - 0x308003, - 0x21a3c3, - 0x242543, - 0x7782, - 0x214a83, - 0x232dc3, - 0x308003, - 0x21a3c3, - 0x242543, - 0x1242, - 0x201242, - 0x242543, - 0xee14a83, - 0x308003, - 0x23c803, - 0x1b4103, - 0x22aec2, - 0x9a048, - 0x214a83, - 0x232dc3, - 0x308003, - 0x21a3c3, - 0x3dc3, - 0x1b4103, - 0x242543, - 0x1442, + 0x113c2, + 0x2b02, + 0x8502, + 0x2442, + 0x7142, + 0x2a82, + 0x22ea43, + 0x233fc3, + 0x266a83, + 0x217fc3, + 0x23e083, + 0x83c2, + 0x22ea43, + 0x233fc3, + 0x266a83, + 0x217fc3, + 0x23e083, + 0x12402, + 0x212402, + 0x23e083, + 0xee2ea43, + 0x266a83, + 0x23cb03, + 0x1c0443, + 0x230242, + 0xae888, + 0x22ea43, + 0x233fc3, + 0x266a83, + 0x217fc3, + 0x5803, + 0x1c0443, + 0x23e083, + 0x3602, 0x2001c2, - 0x15c45c5, - 0x139b05, - 0x20b3c2, - 0x9a048, - 0x1242, - 0x2347c2, - 0x206782, - 0x204642, - 0x21bb02, - 0x230a42, - 0x97805, - 0x202f42, - 0x204042, - 0x206e42, - 0x205e42, - 0x214282, - 0x23fcc2, - 0x202f82, - 0x292882, - 0xfe98384, + 0x1567b85, + 0x146bc5, + 0x210402, + 0xae888, + 0x12402, + 0x2359c2, + 0x206b02, + 0x208142, + 0x20e742, + 0x23bec2, + 0x1b5a05, + 0x201402, + 0x209282, + 0x201102, + 0x2053c2, + 0x205b42, + 0x2408c2, + 0x20ee42, + 0x256382, + 0xfe72cc4, 0x142, - 0x17e707, - 0x12380d, - 0xea609, - 0x115e0b, - 0xeec08, - 0x65dc9, - 0x111b86, - 0x308003, - 0x9a048, + 0x178d87, + 0x30a83, + 0x12808d, + 0xec849, + 0x118a0b, + 0xf0a88, + 0x5bd09, + 0x1145c6, + 0x266a83, + 0xae888, 0x9c4, - 0x4e83, - 0x68b05, - 0x9a048, - 0xe5a47, - 0x56306, - 0x68b49, - 0x1d134e, - 0x14a887, + 0x157bc3, + 0x2105, + 0xae888, + 0xe7607, + 0x1104d007, + 0x56546, + 0x2149, + 0xa28e, + 0x14ca47, + 0x150e583, 0x2000c2, - 0x2d3684, - 0x201242, - 0x214a83, - 0x2052c2, - 0x232dc3, - 0x1bb43, + 0x24cd44, + 0x212402, + 0x22ea43, + 0x204542, + 0x233fc3, + 0xfa03, 0x200382, - 0x2e3504, - 0x21bc83, - 0x201f42, - 0x21a3c3, - 0x30a42, + 0x2e5904, + 0x2191c3, + 0x206a02, + 0x217fc3, + 0x3bec2, 0x2003c2, - 0x242543, - 0x2431c6, - 0x32d94f, + 0x23e083, + 0x243bc6, + 0x333b4f, 0x602, - 0x725e43, - 0x2f294a, - 0x9a048, - 0x201242, - 0x228503, - 0x308003, - 0x23c803, - 0x3dc3, - 0x1467206, - 0x1d1348, - 0x141650b, - 0x156518a, - 0xf1fc9, - 0x15d024a, - 0x1511707, - 0xa878b, - 0x10b7c5, - 0xebbc5, - 0x119bc9, - 0x139b05, - 0x17e707, - 0xfbfc4, - 0x201242, - 0x214a83, - 0x308003, - 0x21a3c3, + 0x72a143, + 0x2f3c0a, + 0xae888, + 0x212402, + 0x280203, + 0x266a83, + 0x23cb03, + 0x5803, + 0x1522f06, + 0x1c4104, + 0xa288, + 0x140dbcb, + 0x156c4ca, + 0xf3289, + 0x15da64a, + 0x1513f07, + 0xaab4b, + 0x10d4c5, + 0xf0545, + 0x11d749, + 0x146bc5, + 0x178d87, + 0x1c4104, + 0xfe2c4, + 0x212402, + 0x22ea43, + 0x266a83, + 0x217fc3, 0x2000c2, 0x200c82, - 0x2019c2, - 0x13214a83, - 0x23d342, - 0x232dc3, - 0x20bb42, - 0x2299c2, - 0x308003, - 0x23c782, - 0x25d282, - 0x22a742, + 0x205102, + 0x1362ea43, + 0x23d542, + 0x233fc3, + 0x201282, + 0x208882, + 0x266a83, + 0x23ca82, + 0x27b882, + 0x22c302, 0x200cc2, - 0x290602, + 0x295f42, 0x200802, 0x200d82, - 0x23ee42, - 0x27b8c2, - 0x204702, - 0x1b19cc, - 0x2b8e42, - 0x252e82, - 0x2203c2, - 0x248642, - 0x23c803, + 0x25b542, + 0x2295c2, + 0x205742, + 0x13150c, + 0x2be4c2, + 0x250d42, + 0x227082, + 0x24a282, + 0x23cb03, 0x200bc2, - 0x21a3c3, - 0x243802, - 0x249b42, - 0x242543, - 0x308c82, - 0x2090c2, - 0x2023c2, - 0x202d42, - 0x207242, - 0x2f00c2, - 0x21e502, - 0x226dc2, - 0x223fc2, - 0x322c0a, - 0x36860a, - 0x39abca, - 0x3e0d02, - 0x210702, - 0x20ef42, - 0x1376fcc9, - 0x13b5cbca, - 0x142e307, - 0x13e026c2, - 0x14fe3c3, - 0x4a82, - 0x15cbca, - 0x15dc0e, - 0x24c0c4, - 0x572c5, - 0x14614a83, - 0x3dc83, - 0x232dc3, - 0x24d9c4, - 0x308003, - 0x221dc4, - 0x21bc83, - 0x137a89, - 0x68006, - 0x23c803, - 0xefa04, - 0x4743, - 0x21a3c3, - 0x1df105, - 0x203dc3, - 0x242543, - 0x1464b04, - 0x22b983, - 0x11b504, - 0x207783, - 0x9a048, - 0x1521403, - 0x125d86, - 0x1574504, - 0x68445, - 0x14a64a, - 0x129cc2, - 0x1500160d, - 0x1a6286, - 0x15291, - 0x1576fcc9, - 0x684c8, - 0x62888, - 0x1c12c707, - 0x1182, - 0x16fe47, - 0x2380e, - 0x139b0b, - 0x13f10b, - 0x1b3d4a, - 0x29907, - 0x9a048, - 0x11c988, - 0x7bc7, - 0x1c4169cb, - 0x1bf87, - 0xcd42, - 0x26ccd, - 0x1c2a07, - 0xaed8a, - 0x1d92cf, - 0x6738f, - 0x167c2, - 0x1242, - 0x83548, - 0x1c8f48cc, - 0xe770a, - 0xe554a, - 0x18990a, - 0x78508, - 0x8d08, - 0x5aa88, - 0xe5a08, - 0x145e88, - 0x2a42, - 0x1c464f, - 0xc134b, - 0x79108, - 0x25687, - 0x14474a, - 0x2490b, - 0x33249, - 0x46e07, - 0x8c08, - 0x3834c, - 0x15c087, - 0x1a67ca, - 0x106c8, - 0x2888e, - 0x2904e, - 0x2974b, - 0x2aa8b, - 0x15748b, - 0x14bf09, - 0xe3b0b, - 0xec58d, - 0x1261cb, - 0x30b4d, - 0x30ecd, - 0x3640a, - 0x3dd0b, - 0x3e54b, - 0x46405, - 0x1cd79a10, - 0x199e8f, - 0x9854f, - 0x63c4d, - 0x137c50, - 0xaac82, - 0x1d20c388, - 0xd1288, - 0xe8090, - 0xcf48e, - 0x1d75d105, - 0x4d1cb, - 0x136b90, - 0x8e0a, - 0x2ac49, - 0x61487, - 0x617c7, - 0x61987, - 0x61d07, - 0x631c7, - 0x63407, - 0x65587, - 0x65ac7, - 0x66007, - 0x66387, - 0x66a47, - 0x66c07, - 0x66dc7, - 0x66f87, - 0x69a47, - 0x6a407, - 0x6ac07, - 0x6afc7, - 0x6b607, - 0x6b8c7, - 0x6ba87, - 0x6bd87, - 0x6c887, - 0x6ca87, + 0x217fc3, + 0x209ec2, + 0x25c042, + 0x23e083, + 0x3081c2, + 0x208502, + 0x20a1c2, + 0x204782, + 0x2010c2, + 0x230ac2, + 0x205682, + 0x22b302, + 0x2270c2, + 0x32748a, + 0x36f50a, + 0x3a124a, + 0x3e2d42, + 0x208902, + 0x20e8c2, + 0x13aa7f09, + 0x13f61e8a, + 0x142fc47, + 0x142050c2, + 0x143a083, + 0x1742, + 0x161e8a, + 0x162b0e, + 0x241ec4, + 0x57fc5, + 0x14a2ea43, + 0x3dc03, + 0x233fc3, + 0x24d704, + 0x266a83, + 0x20e704, + 0x2191c3, + 0x13d289, + 0x157686, + 0x23cb03, + 0xf1584, + 0x1598c3, + 0x217fc3, + 0x2a7c5, + 0x205803, + 0x23e083, + 0x1466d84, + 0x235403, + 0x181584, + 0x20aa43, + 0xae888, + 0x154f043, + 0x12a086, + 0x146e844, + 0x1a45, + 0x14c80a, + 0x124d82, + 0x15408acd, + 0x1adec6, + 0x159a140b, + 0xc951, + 0x15ea7f09, + 0x1ac8, + 0x69908, + 0x1c9415c7, + 0x3502, + 0xa8087, + 0x221ce, + 0x146bcb, + 0x14a88b, + 0x1c008a, + 0x1683c7, + 0xae888, + 0x120d48, + 0xa807, + 0x1cc176cb, + 0x1a087, + 0xcfc2, + 0x2b20d, + 0x16a7c7, + 0xb1bca, + 0x1e174f, + 0x12308f, + 0x161e82, + 0x12402, + 0x8af48, + 0x1d10778c, + 0x1570a, + 0xe710a, + 0x19004a, + 0x80a88, + 0x1d208, + 0x5a488, + 0xe75c8, + 0x1388, + 0xf982, + 0x167c0f, + 0xc6d8b, + 0x10f508, + 0x35cc7, + 0x4878a, + 0xbc3cb, + 0x34449, + 0x48687, + 0x83986, + 0x1d108, + 0x18ea0c, + 0x161347, + 0x1ae40a, + 0xec88, + 0x10ae8e, + 0x10b64e, + 0x16820b, + 0x168a8b, + 0x658cb, + 0x66609, + 0x6754b, + 0xbd4cd, + 0xf548b, + 0xf5fcd, + 0xf634d, + 0x10360a, + 0x12a4cb, + 0x166c0b, + 0x3bfc5, + 0x1d58b810, + 0x13514f, + 0x72e8f, + 0x2470d, + 0x13d450, + 0x293c2, + 0x1da1f8c8, + 0x7f248, + 0xea790, + 0x17fe0e, + 0x1df22b85, + 0x4c84b, + 0x13c390, + 0x1d30a, + 0x168c49, + 0x680c7, + 0x68407, + 0x685c7, + 0x68947, + 0x69e07, + 0x6a2c7, + 0x6bb07, + 0x6c047, + 0x6d587, 0x6d907, - 0x6dac7, - 0x6dc87, - 0x6f247, - 0x71247, - 0x71707, - 0x72207, - 0x724c7, - 0x72847, - 0x72a07, - 0x72e07, - 0x73247, - 0x73707, - 0x73c87, - 0x73e47, - 0x74007, - 0x74447, - 0x74ec7, - 0x75407, - 0x75987, - 0x75b47, - 0x75ec7, - 0x76407, - 0x6882, - 0x5ab8a, - 0x11cc8, - 0x1b0ecc, - 0x71b87, - 0x85805, - 0xa7951, - 0x1c0d86, - 0xfb14a, - 0x833ca, - 0x56306, - 0xb060b, + 0x6dfc7, + 0x6e187, + 0x6e347, + 0x6e507, + 0x6f307, + 0x6fc47, + 0x70a87, + 0x70e47, + 0x71487, + 0x71747, + 0x71907, + 0x71c07, + 0x71f87, + 0x72187, + 0x748c7, + 0x74a87, + 0x74c47, + 0x75dc7, + 0x77207, + 0x776c7, + 0x77dc7, + 0x78087, + 0x78407, + 0x785c7, + 0x789c7, + 0x78e07, + 0x792c7, + 0x79847, + 0x79a07, + 0x79bc7, + 0x7a007, + 0x7aa87, + 0x7afc7, + 0x7b207, + 0x7b3c7, + 0x7bb87, + 0x7c187, + 0x9a42, + 0x5a58a, + 0x13808, + 0x1baf8c, + 0x4eb87, + 0x918c5, + 0x9b311, + 0x1bb46, + 0x104dca, + 0x8adca, + 0x56546, + 0xb3ecb, 0x642, - 0x2f7d1, - 0xbf089, - 0x9b209, - 0x9bb06, - 0x3ee42, - 0x9218a, - 0xacdc9, - 0xad50f, - 0xadb0e, - 0xaff88, - 0x6502, - 0x174a49, - 0x8a58e, - 0x1c7f0c, - 0xf1ccf, - 0x1b7a0e, - 0x3230c, - 0x41a89, - 0xd2551, - 0xd2b08, - 0x59452, - 0x62a4d, - 0x733cd, - 0x7984b, - 0x7ea95, - 0xf0c09, - 0x182f8a, - 0x1a3749, - 0x1aa210, - 0x9028b, - 0x9378f, - 0xa694b, - 0xab54c, - 0xb1b90, - 0xb4b0a, - 0xcc00d, - 0xb7ece, - 0x14db0a, - 0x1bd50c, - 0xbe4d4, - 0xbed11, - 0xc0f0b, - 0xc310f, - 0xc5f8d, - 0xc854e, - 0xca80c, - 0xcb00c, - 0xcbd0b, - 0x13ea4e, - 0x16c350, - 0xd974b, - 0xda40d, - 0xdcf0f, - 0xdf00c, - 0xe648e, - 0xf2391, - 0x10498c, - 0x1dc387, - 0x10b44d, - 0x11a00c, - 0x140cd0, - 0x15fd8d, - 0x168847, - 0x18e8d0, - 0x19d508, - 0x1a160b, - 0xb6b8f, - 0x1b1148, - 0x149d4d, - 0x10f810, - 0x17e609, - 0x1db799c8, - 0x1deb9c06, - 0xbaac3, - 0x15a889, - 0xc00c5, - 0x1e42, - 0x144bc9, - 0x14a34a, - 0x1e259906, - 0x145990d, - 0x1e7c2c04, - 0x57a46, - 0x1e08a, - 0x6474d, - 0x1e9df489, - 0x19a83, - 0x1175ca, - 0xe4651, - 0xe4a89, - 0xe54c7, - 0xe61c8, - 0xe68c7, - 0x71c48, - 0x1540b, - 0x12bc49, - 0xf1210, - 0xf16cc, - 0xf27c8, - 0xf4705, - 0x13b1c8, - 0x1961ca, - 0x184947, - 0x2902, - 0x1ef47415, - 0x13788a, - 0x1b2589, - 0x108a08, - 0x9cd89, - 0x46145, - 0x119d0a, - 0x8decf, - 0x10b84b, - 0xf04c, - 0x18ee12, - 0x77285, - 0x114e48, - 0xf678b, - 0xe0a11, - 0x4dcca, - 0x1f2fe185, - 0x19b18c, - 0x133e43, - 0x192286, - 0x3fcc2, - 0x10948b, - 0x109f4a, - 0x150a2cc, - 0xd1608, - 0x30d08, - 0x1f708a86, - 0x1b2f07, - 0xca42, - 0x5142, - 0x18bb50, - 0x69bc7, - 0x2ee0f, - 0x11ec6, - 0x11ed0e, - 0x94c0b, - 0x472c8, - 0x33609, - 0x13ce92, - 0x19234d, - 0x115488, - 0x115cc9, - 0x176f4d, - 0x198609, - 0x63cb, - 0x6bf08, - 0x7a688, - 0x7ce08, - 0x7d249, - 0x7d44a, - 0x8c30c, - 0x3e80a, - 0xf198a, - 0x114cc7, - 0x9994a, - 0x1c350d, - 0xd2e11, - 0x1fac8846, - 0x1cd64b, - 0x97c4c, - 0x39988, - 0x13d849, - 0x15b84d, - 0x61f50, - 0x1808cd, - 0xc2c2, - 0x4f70d, - 0x1b82, - 0xc1c2, - 0x114c0a, - 0x6e70a, - 0xfb04a, - 0x10260b, - 0x292cc, - 0x11c48a, - 0x11c70e, - 0x1d74cd, - 0x1fde0bc5, - 0x128948, - 0x1442, - 0x14239c3, - 0x15a6960e, - 0x16204b4e, - 0x16a6820a, - 0x1734630e, - 0x17b63a8e, - 0x18289d0c, - 0x142e307, - 0x142e309, - 0x14fe3c3, - 0x18b0400c, - 0x1933dfc9, - 0x19b48e89, - 0x1a353b89, - 0x4a82, - 0x69551, - 0x4a91, - 0x6814d, - 0x146251, - 0x1639d1, - 0x89c4f, - 0x103f4f, - 0x13df0c, - 0x148dcc, - 0x153acc, - 0x4b5cd, - 0x1aaa15, - 0xedc8c, - 0x1b32cc, - 0x13f810, - 0x16b10c, - 0x178fcc, - 0x1ac319, - 0x1b6959, - 0x1c1259, - 0x1da294, - 0x76d4, - 0x7d54, - 0x9754, - 0x9f94, - 0x1aa07989, - 0x1b008009, - 0x1bbb3389, - 0x15ed2d09, - 0x4a82, - 0x166d2d09, - 0x4a82, - 0x76ca, - 0x4a82, - 0x16ed2d09, - 0x4a82, - 0x76ca, - 0x4a82, - 0x176d2d09, - 0x4a82, - 0x17ed2d09, - 0x4a82, - 0x186d2d09, - 0x4a82, - 0x76ca, - 0x4a82, - 0x18ed2d09, - 0x4a82, - 0x76ca, - 0x4a82, - 0x196d2d09, - 0x4a82, - 0x19ed2d09, - 0x4a82, - 0x76ca, - 0x4a82, - 0x1a6d2d09, - 0x4a82, - 0x76ca, - 0x4a82, - 0x1aed2d09, - 0x4a82, - 0x1b6d2d09, - 0x4a82, - 0x1bed2d09, - 0x4a82, - 0x76ca, - 0x4a82, + 0x31351, + 0xc5d89, + 0x9bf49, + 0x9d306, + 0x5b542, + 0x1b21ca, + 0xafcc9, + 0xb040f, + 0xb0a0e, + 0xb3108, + 0x11b08, + 0xb5c2, + 0x6ed89, + 0x1e3586c9, + 0xbd049, + 0xbd04c, + 0x8f90e, + 0x4b8c, + 0xf2f8f, + 0x1bf08e, + 0x12b40c, + 0x33449, + 0x45391, + 0x45948, + 0x1a4e12, + 0x593cd, + 0x69acd, + 0x78f8b, + 0x81855, + 0x860c9, + 0x1518ca, + 0x188809, + 0x1aad50, + 0x1ae8cb, + 0x9890f, + 0xa868b, + 0xa914c, + 0xaa110, + 0xb7dca, + 0xb894d, + 0xd3a0e, + 0x195a0a, + 0xc1e8c, + 0xc4e94, + 0xc5a11, + 0xc694b, + 0xc858f, + 0xcbb0d, + 0xcd20e, + 0xd048c, + 0xd0c8c, + 0xd370b, + 0x172a8e, + 0x199ed0, + 0xdba8b, + 0xdc74d, + 0xdf30f, + 0xe804c, + 0xe9d8e, + 0xf3651, + 0x10570c, + 0x1d4047, + 0x10d14d, + 0x11db8c, + 0x144550, + 0x16528d, + 0x16efc7, + 0x176790, + 0x19dd08, + 0x1a3e8b, + 0xba1cf, + 0x1bb208, + 0x14bf0d, + 0x1125d0, + 0x178c89, + 0x1e78b7c8, + 0x1eabf946, + 0xc0843, + 0x3ec49, + 0xc7405, + 0x6902, + 0x48c09, + 0x14c50a, + 0x1efa52c6, + 0x15a52cd, + 0x1f36a9c4, + 0x57d06, + 0x1b68a, + 0x27bcd, + 0x1f52b109, + 0x216c3, + 0x11bb8a, + 0xe6751, + 0xe6b89, + 0xe7087, + 0xe7d88, + 0xe8447, + 0x4ec48, + 0xcacb, + 0x1311c9, + 0xf1e10, + 0xf22cc, + 0x1faf270d, + 0xf3a88, + 0xf4ec5, + 0x147e08, + 0x19ce4a, + 0x18a347, + 0x2542, + 0x1ff3f5d5, + 0x13d08a, + 0x1320c9, + 0x9e588, + 0x6ab09, + 0x7cb45, + 0x11d88a, + 0x92e0f, + 0x10d54b, + 0x11ff4c, + 0x176cd2, + 0xe9c6, + 0x7ce85, + 0x117a48, + 0xf84cb, + 0xf1151, + 0x16acc7, + 0x4da0a, + 0x20300485, + 0x1b330c, + 0x139c43, + 0x197a86, + 0x408c2, + 0x1089cb, + 0x10948a, + 0x150980c, + 0x7f5c8, + 0xf6188, + 0x2069e606, + 0x17d5c7, + 0xd782, + 0x7742, + 0x1a55d0, + 0x65087, + 0x3074f, + 0x13a06, + 0xd2b8e, + 0x99a0b, + 0x3dd48, + 0x34809, + 0x5da12, + 0x197b4d, + 0x118088, + 0x1188c9, + 0xee00d, + 0x19f749, + 0xb48b, + 0x6c348, + 0x71d88, + 0x75a88, + 0x80389, + 0x8058a, + 0x84b0c, + 0x166eca, + 0xf17ca, + 0x1178c7, + 0x9a50a, + 0x1cda4d, + 0x45c51, + 0x20acd506, + 0x1b994b, + 0x12f80c, + 0x94388, + 0x149449, + 0x160b0d, + 0x68b90, + 0x1812cd, + 0x4642, + 0x4a68d, + 0x72c2, + 0x1f702, + 0x11780a, + 0x756ca, + 0x20e7b508, + 0x104cca, + 0x11f80b, + 0x10b8cc, + 0x12048a, + 0x12070f, + 0x120ace, + 0x171cd, + 0x211e2c05, + 0x12d408, + 0x3602, + 0x1422383, + 0x415505, + 0x45d884, + 0x16202c0e, + 0x16b59cce, + 0x1720180a, + 0x17b9184e, + 0x1835788e, + 0x18b7f38c, + 0x142fc47, + 0x142fc49, + 0x143a083, + 0x1926060c, + 0x19b49bc9, + 0x1a36af09, + 0x1ab71749, + 0x1742, + 0x2b51, + 0x159c11, + 0x174d, + 0x1b6451, + 0x1577d1, + 0x17f2cf, + 0x6054f, + 0x149b0c, + 0x16ae4c, + 0x17168c, + 0x1af28d, + 0x15d915, + 0xc1a8c, + 0xc778c, + 0x135a10, + 0x141acc, + 0x14af8c, + 0x18ad99, + 0x191599, + 0x1bdfd9, + 0x1cb4d4, + 0x1d6294, + 0x1e02d4, + 0x1e2714, + 0xa994, + 0x1b2c1b49, + 0x1b9e0589, + 0x1c2c7849, + 0x16645b49, + 0x1742, + 0x16e45b49, + 0x1742, + 0xa98a, + 0x1742, + 0x17645b49, + 0x1742, + 0xa98a, + 0x1742, + 0x17e45b49, + 0x1742, + 0x18645b49, + 0x1742, + 0x18e45b49, + 0x1742, + 0xa98a, + 0x1742, + 0x19645b49, + 0x1742, + 0xa98a, + 0x1742, + 0x19e45b49, + 0x1742, + 0x1a645b49, + 0x1742, + 0xa98a, + 0x1742, + 0x1ae45b49, + 0x1742, + 0xa98a, + 0x1742, + 0x1b645b49, + 0x1742, + 0x1be45b49, + 0x1742, + 0x1c645b49, + 0x1742, + 0xa98a, + 0x1742, 0x1400401, - 0x15285, - 0x1b3d44, - 0x14c86c3, - 0x15d6e03, - 0x14f8943, - 0x6960e, - 0x4b4e, - 0x7c80e, - 0x6820a, - 0x14630e, - 0x163a8e, - 0x89d0c, - 0x10400c, - 0x13dfc9, - 0x148e89, - 0x153b89, - 0x7989, - 0x8009, - 0x1b3389, - 0x13f8cd, - 0x9a09, - 0xa249, - 0x12f604, - 0x18ad44, - 0x1bad44, - 0x1bf004, - 0xa8a44, - 0x2cc04, - 0x3ca84, - 0x53684, - 0x11dc4, - 0x62b84, - 0x1588703, - 0x13dd87, - 0x147dc8c, - 0xf283, - 0xaac82, - 0xae8c6, - 0x1d74c3, - 0xf283, - 0x9fc83, - 0x8582, - 0x8588, - 0xe9247, - 0x12bcc7, - 0x2a42, + 0xc945, + 0x1c0084, + 0x144ce03, + 0x1426d83, + 0x14fa443, + 0x2c0e, + 0x159cce, + 0x8450e, + 0x180a, + 0x19184e, + 0x15788e, + 0x17f38c, + 0x6060c, + 0x149bc9, + 0x16af09, + 0x171749, + 0xc1b49, + 0x1e0589, + 0xc7849, + 0x135acd, + 0x141b89, + 0xac49, + 0x12d5c4, + 0x132ac4, + 0x1c8a04, + 0x1c95c4, + 0xaae04, + 0x2ec44, + 0x3cd84, + 0x192d44, + 0x13904, + 0xbec06, + 0x59504, + 0x158e7c3, + 0x149987, + 0x148574c, + 0x1ac3, + 0x293c2, + 0x107788, + 0xd1784, + 0x14386, + 0xd8a84, + 0x15aa06, + 0x16b82, + 0xa8c1, + 0x20e44, + 0xb1706, + 0x171c3, + 0x1ac3, + 0xa0e83, + 0x13d385, + 0x124dc2, + 0x124dc8, + 0xeb947, + 0x131247, + 0xf982, 0x2000c2, - 0x201242, - 0x2052c2, - 0x20dec2, + 0x212402, + 0x204542, + 0x20fa02, 0x200382, 0x2003c2, - 0x205142, - 0x214a83, - 0x232dc3, - 0x308003, - 0x21bac3, - 0x21a3c3, - 0x242543, - 0x9a048, - 0x214a83, - 0x232dc3, - 0x21a3c3, - 0x242543, - 0xb2c3, - 0x308003, - 0x21dc4, + 0x207742, + 0x22ea43, + 0x233fc3, + 0x266a83, + 0x20e703, + 0x217fc3, + 0x23e083, + 0xae888, + 0x22ea43, + 0x233fc3, + 0x217fc3, + 0x23e083, + 0x10303, + 0x266a83, + 0xe704, 0x2000c2, - 0x202703, - 0x22214a83, - 0x38b9c7, - 0x308003, - 0x21a8c3, - 0x219a04, - 0x21a3c3, - 0x242543, - 0x21e2ca, - 0x2431c5, - 0x2141c3, - 0x233442, - 0x9a048, - 0x226d8a4a, + 0x24ac43, + 0x2362ea43, + 0x392747, + 0x266a83, + 0x21e1c3, + 0x21e484, + 0x217fc3, + 0x23e083, + 0x226e0a, + 0x243bc5, + 0x216983, + 0x22dc42, + 0xae888, + 0x23adad8a, 0xe01, - 0x9a048, - 0x1242, - 0x131a42, - 0x22fdf20b, - 0x23227fc4, - 0x1c2b45, - 0x1805, - 0xf48c6, - 0x23601805, - 0x53bc3, - 0x94e83, + 0xae888, + 0x12402, + 0x137ac2, + 0x2432ae8b, + 0x2462e004, + 0x16a905, + 0x8cc5, + 0x107786, + 0x24a08cc5, + 0x54383, + 0x5cd83, 0x9c4, - 0x4e83, - 0x68b05, - 0x139b05, - 0x9a048, - 0x1bf87, - 0x14a83, - 0x2cd0d, - 0x23e3a147, - 0x144686, - 0x24146145, - 0x1b8dd2, - 0x3a247, - 0x1d35ca, - 0x1d3488, - 0x95c7, - 0x6574a, - 0x1a7308, - 0xe2b07, - 0x1a870f, - 0x169347, - 0x53486, - 0x136b90, - 0x11dccf, - 0x1a009, - 0x57ac4, - 0x2443a30e, - 0x35509, - 0x670c6, - 0x10ecc9, - 0x18d986, - 0x1ba1c6, - 0x78ecc, - 0x24b0a, - 0x333c7, - 0x14420a, - 0x33c9, - 0xf714c, - 0x1d40a, - 0x5c30a, - 0x68b49, - 0x57a46, - 0x3348a, - 0x11634a, - 0xa430a, - 0x14fbc9, - 0xe30c8, - 0xe3346, - 0xeb54d, - 0x5390b, - 0xc0545, - 0x24b55a0c, - 0x14a887, - 0x10d1c9, - 0xbf407, - 0x10fc14, - 0x11010b, - 0x254ca, - 0x13cd0a, - 0xaabcd, - 0x1502809, - 0x11524c, - 0x115acb, - 0x106c3, - 0x106c3, - 0x28886, - 0x106c3, - 0xf48c8, - 0x155983, - 0x44ec4, - 0x53f83, - 0x335c5, - 0x146e943, - 0x50849, - 0xf678b, - 0x14df283, - 0x148406, - 0x14ecac7, - 0x1aa487, - 0x2592c5c9, - 0x1a286, - 0x173d09, - 0x2703, - 0x9a048, - 0x1242, - 0x4d9c4, + 0x157bc3, + 0x2105, + 0x146bc5, + 0xae888, + 0x1a087, + 0x2ea43, + 0x2ed4d, + 0x2523a707, + 0x159146, + 0x25401645, + 0x1c0992, + 0x159207, + 0x1dbca, + 0x10ac8, + 0x1dac7, + 0x6bcca, + 0x1bc448, + 0xe4f07, + 0x1ac70f, + 0x36fc7, + 0x192b46, + 0x13c390, + 0xcee8f, + 0x21c49, + 0x57d84, + 0x259592ce, + 0x185a89, + 0x6e646, + 0x111a89, + 0x193c86, + 0x1c2e06, + 0x4f10c, + 0xbc5ca, + 0x345c7, + 0x17edca, + 0x1596c9, + 0xf8e8c, + 0x1c8ca, + 0x4b8ca, + 0x2149, + 0x57d06, + 0x3468a, + 0x118f4a, + 0xa3a4a, + 0x137509, + 0xe54c8, + 0xe5746, + 0xed88d, + 0x5130b, + 0xc7c05, + 0x25f5a28c, + 0x14ca47, + 0x110289, + 0xd1047, + 0xc6114, + 0x1129cb, + 0x10f34a, + 0x5d88a, + 0xac80d, + 0x151fa09, + 0x117e4c, + 0x1186cb, 0x88c3, - 0x8805, - 0x214a83, - 0x232dc3, - 0x308003, - 0x21a3c3, - 0x242543, - 0x220dc3, - 0x214a83, - 0x232dc3, - 0x228503, - 0x308003, - 0x23c803, - 0x21a3c3, - 0x242543, - 0x29b3c3, - 0x207783, - 0x220dc3, - 0x2d3684, - 0x214a83, - 0x232dc3, - 0x308003, - 0x21a3c3, - 0x242543, - 0x2308c3, - 0x2752c6c5, - 0x142c943, - 0x214a83, - 0x232dc3, - 0x21bb43, - 0x228503, - 0x308003, - 0x221dc4, - 0x2059c3, - 0x2137c3, - 0x23c803, - 0x21a3c3, - 0x1b4103, - 0x242543, - 0x2141c3, - 0x2821e9c3, - 0x18ed09, - 0x1242, - 0x3c0743, - 0x28e14a83, - 0x232dc3, - 0x247103, - 0x308003, - 0x223703, - 0x2137c3, - 0x242543, - 0x2f4bc3, - 0x3b9a84, - 0x9a048, - 0x29614a83, - 0x232dc3, - 0x2b0043, - 0x308003, - 0x23c803, - 0x219a04, - 0x21a3c3, - 0x242543, - 0x22e983, - 0x9a048, - 0x29e14a83, - 0x232dc3, - 0x228503, - 0x203dc3, - 0x242543, - 0x9a048, - 0x142e307, - 0x202703, - 0x214a83, - 0x232dc3, - 0x308003, - 0x221dc4, - 0x219a04, - 0x21a3c3, - 0x242543, - 0x139b05, - 0x17e707, - 0x10fe4b, - 0xe4e84, - 0xc0545, - 0x144ca88, - 0x2a54d, - 0x2b231ac5, - 0x647c4, - 0x1242, - 0x3a83, - 0x17e505, - 0x2aec2, - 0x5e42, - 0x303dc5, - 0x9a048, - 0x106c2, - 0x1d2c3, - 0x16454f, - 0x1242, - 0x105646, + 0x88c3, + 0x36fc6, + 0x88c3, + 0x107788, + 0x15c103, + 0x46604, + 0x54603, + 0x347c5, + 0x1475903, + 0x51709, + 0xf84cb, + 0x14e82c3, + 0x154546, + 0x15037c7, + 0x1aafc7, + 0x26d41489, + 0x17e86, + 0x4ac43, + 0xae888, + 0x12402, + 0x4d704, + 0x61083, + 0x17b845, + 0x22ea43, + 0x233fc3, + 0x266a83, + 0x217fc3, + 0x23e083, + 0x233f03, + 0x22ea43, + 0x233fc3, + 0x280203, + 0x266a83, + 0x23cb03, + 0x217fc3, + 0x23e083, + 0x2bd443, + 0x20aa43, + 0x233f03, + 0x24cd44, + 0x22ea43, + 0x233fc3, + 0x266a83, + 0x217fc3, + 0x23e083, + 0x204ac3, + 0x28541585, + 0x142e6c3, + 0x22ea43, + 0x233fc3, + 0x20fa03, + 0x280203, + 0x266a83, + 0x20e704, + 0x3433c3, + 0x215f83, + 0x23cb03, + 0x217fc3, + 0x1c0443, + 0x23e083, + 0x216983, + 0x29219f03, + 0x176bc9, + 0x12402, + 0x3c7603, + 0x29e2ea43, + 0x233fc3, + 0x249283, + 0x266a83, + 0x2220c3, + 0x215f83, + 0x23e083, + 0x3005c3, + 0x3cd604, + 0xae888, + 0x2a62ea43, + 0x233fc3, + 0x2b31c3, + 0x266a83, + 0x23cb03, + 0x21e484, + 0x217fc3, + 0x23e083, + 0x2302c3, + 0xae888, + 0x2ae2ea43, + 0x233fc3, + 0x280203, + 0x205803, + 0x23e083, + 0xae888, + 0x142fc47, + 0x24ac43, + 0x22ea43, + 0x233fc3, + 0x266a83, + 0x20e704, + 0x21e484, + 0x217fc3, + 0x23e083, + 0x146bc5, + 0x178d87, + 0xc634b, + 0xe6f84, + 0xc7c05, + 0x1454408, + 0x2c10d, + 0x2c242285, + 0x27c44, + 0x12402, + 0x10103, + 0x184485, + 0x30242, + 0x53c2, + 0x34b8c5, + 0xae888, + 0x88c2, + 0x1b2c3, + 0x16b88f, + 0x12402, + 0x1063c6, 0x2000c2, - 0x202703, - 0x214a83, - 0x308003, - 0x221dc4, - 0x23c803, - 0x219a04, - 0x21a3c3, - 0x242543, - 0x2141c3, - 0x2aec2, - 0x32a988, - 0x2d3684, - 0x349646, - 0x353986, - 0x9a048, - 0x3373c3, - 0x2cd549, - 0x217915, - 0x1791f, - 0x214a83, - 0xd1ac7, - 0x214892, - 0x169046, - 0x1712c5, - 0x8e0a, - 0x2ac49, - 0x21464f, - 0x2e3504, - 0x224445, - 0x311050, - 0x2137c7, - 0x203dc3, - 0x31bf88, - 0x1283c6, - 0x27cfca, - 0x221c84, - 0x2fdbc3, - 0x233442, - 0x2f850b, - 0x3dc3, - 0x17cc84, - 0x214a83, - 0x232dc3, - 0x308003, - 0x23c803, - 0x21a3c3, - 0x3dc3, - 0x242543, - 0x306403, - 0x201242, - 0x89ac3, - 0x1dee04, - 0x21a3c3, - 0x242543, - 0x2ed73e05, - 0x8346, - 0x214a83, - 0x232dc3, - 0x308003, - 0x23c803, - 0x242543, - 0x214a83, - 0x232dc3, - 0x308003, - 0x21a8c3, - 0x223d43, - 0x242543, - 0x2703, - 0x201242, - 0x214a83, - 0x232dc3, - 0x21a3c3, - 0x3dc3, - 0x242543, - 0x267c2, + 0x24ac43, + 0x22ea43, + 0x266a83, + 0x20e704, + 0x23cb03, + 0x21e484, + 0x217fc3, + 0x23e083, + 0x216983, + 0x30242, + 0x32ff08, + 0x24cd44, + 0x37e046, + 0x3af146, + 0xae888, + 0x31a6c3, + 0x355c09, + 0x30ddd5, + 0x10dddf, + 0x22ea43, + 0x7fa87, + 0x242992, + 0x1623c6, + 0x16fd05, + 0x1d30a, + 0x168c49, + 0x24274f, + 0x2e5904, + 0x2bbf05, + 0x313850, + 0x215f87, + 0x205803, + 0x321388, + 0x134b86, + 0x293b0a, + 0x223144, + 0x2ffec3, + 0x22dc42, + 0x2fa00b, + 0x5803, + 0x182c04, + 0x22ea43, + 0x233fc3, + 0x266a83, + 0x23cb03, + 0x217fc3, + 0x5803, + 0x23e083, + 0x307183, + 0x212402, + 0x1c06c3, + 0x2a4c4, + 0x217fc3, + 0x23e083, + 0x2fc39fc5, + 0x1d5cc6, + 0x22ea43, + 0x233fc3, + 0x266a83, + 0x23cb03, + 0x23e083, + 0x22ea43, + 0x233fc3, + 0x266a83, + 0x21e1c3, + 0x265dc3, + 0x23e083, + 0x4ac43, + 0x212402, + 0x22ea43, + 0x233fc3, + 0x217fc3, + 0x5803, + 0x23e083, + 0x17082, 0x2000c2, - 0x214a83, - 0x232dc3, - 0x308003, - 0x21a3c3, - 0x242543, - 0x1805, - 0xf283, - 0x2d3684, - 0x214a83, - 0x232dc3, - 0x306c44, - 0x21a3c3, - 0x242543, - 0x9a048, - 0x214a83, - 0x232dc3, - 0x308003, - 0x21a3c3, - 0x1b4103, - 0x242543, - 0x1b3089, - 0x29904, - 0x214a83, - 0x2a42, - 0x232dc3, - 0x228503, - 0x206c03, - 0x23c803, - 0x21a3c3, - 0x3dc3, - 0x242543, - 0x2982, - 0x214a83, - 0x232dc3, - 0x308003, - 0x343104, - 0x221dc4, - 0x21a3c3, - 0x242543, - 0x207783, - 0x16c2, - 0x201242, - 0x214a83, - 0x232dc3, - 0x308003, - 0x21a3c3, - 0x1b4103, - 0x242543, - 0x9a048, - 0x214a83, - 0x232dc3, - 0x308003, - 0x2f3983, - 0x13903, - 0x1a8c3, - 0x21a3c3, - 0x1b4103, - 0x242543, - 0x322c0a, - 0x3413c9, - 0x35fb0b, - 0x3602ca, - 0x36860a, - 0x377c8b, - 0x38d74a, - 0x39424a, - 0x39abca, - 0x39ae4b, - 0x3bcfc9, - 0x3ca20a, - 0x3ca58b, - 0x3d818b, - 0x3e040a, - 0x15702, - 0x214a83, - 0x232dc3, - 0x228503, - 0x23c803, - 0x21a3c3, - 0x3dc3, - 0x242543, - 0x1558b, - 0xcf487, - 0x5b788, - 0x177084, - 0x8f308, - 0xe8006, - 0x15546, - 0x366c9, - 0x9a048, - 0x214a83, - 0x8e04, - 0x261484, - 0x202742, - 0x219a04, - 0x269045, - 0x220dc3, - 0x2d3684, - 0x214a83, - 0x235b44, - 0x232dc3, - 0x24d9c4, - 0x2e3504, - 0x221dc4, - 0x2137c3, - 0x21a3c3, - 0x242543, - 0x24f8c5, - 0x2308c3, - 0x2141c3, - 0x32bf03, - 0x23e804, - 0x325d04, - 0x373fc5, - 0x9a048, - 0x203ac4, - 0x3b5cc6, - 0x268c84, - 0x201242, - 0x38f207, - 0x3a25c7, - 0x24b904, - 0x2e92c5, - 0x35ff85, - 0x22d805, - 0x221dc4, - 0x389208, - 0x22b586, - 0x3295c8, - 0x27b905, - 0x2ec0c5, - 0x262044, - 0x242543, - 0x2fe7c4, - 0x376806, - 0x2432c3, - 0x23e804, - 0x3829c5, - 0x344b44, - 0x23acc4, - 0x233442, - 0x231d86, - 0x3aeb46, - 0x313fc5, + 0x22ea43, + 0x233fc3, + 0x266a83, + 0x217fc3, + 0x23e083, + 0x8cc5, + 0x1ac3, + 0x24cd44, + 0x22ea43, + 0x233fc3, + 0x217544, + 0x217fc3, + 0x23e083, + 0xae888, + 0x22ea43, + 0x233fc3, + 0x266a83, + 0x217fc3, + 0x1c0443, + 0x23e083, + 0x1357c9, + 0x4cc4, + 0x22ea43, + 0xf982, + 0x233fc3, + 0x280203, + 0x204903, + 0x23cb03, + 0x217fc3, + 0x5803, + 0x23e083, + 0x2a82, + 0x22ea43, + 0x233fc3, + 0x266a83, + 0x36a584, + 0x20e704, + 0x217fc3, + 0x23e083, + 0x20aa43, + 0x6c02, + 0x212402, + 0x22ea43, + 0x233fc3, + 0x266a83, + 0x217fc3, + 0x1c0443, + 0x23e083, + 0xae888, + 0x22ea43, + 0x233fc3, + 0x266a83, + 0x2f4c43, + 0x160c3, + 0x1e1c3, + 0x217fc3, + 0x1c0443, + 0x23e083, + 0x32748a, + 0x345389, + 0x36500b, + 0x3657ca, + 0x36f50a, + 0x37c54b, + 0x393a4a, + 0x399a4a, + 0x3a124a, + 0x3a1c4b, + 0x3c4709, + 0x3cf9ca, + 0x3cfe0b, + 0x3db28b, + 0x3e0d8a, + 0xcdc2, + 0x22ea43, + 0x233fc3, + 0x280203, + 0x23cb03, + 0x217fc3, + 0x5803, + 0x23e083, + 0xcc4b, + 0x17fe07, + 0x5af88, + 0xee144, + 0x1c4104, + 0x94dc8, + 0xea706, + 0xcc06, + 0x1a07c9, + 0xae888, + 0x22ea43, + 0x1d304, + 0x2680c4, + 0x201c02, + 0x21e484, + 0x202645, + 0x233f03, + 0x24cd44, + 0x22ea43, + 0x236704, + 0x233fc3, + 0x24d704, + 0x2e5904, + 0x20e704, + 0x215f83, + 0x217fc3, + 0x23e083, + 0x24a845, + 0x204ac3, + 0x216983, + 0x204343, + 0x2ddf84, + 0x32a004, + 0x23a185, + 0xae888, + 0x3b4e04, + 0x3c2f86, + 0x202284, + 0x212402, + 0x3770c7, + 0x3a9947, + 0x24bb44, + 0x20e785, + 0x365485, + 0x22f845, + 0x20e704, + 0x38f948, + 0x2523c6, + 0x3641c8, + 0x2836c5, + 0x2ee705, + 0x237bc4, + 0x23e083, + 0x300ac4, + 0x37b286, + 0x243cc3, + 0x2ddf84, + 0x24fd85, + 0x248b84, + 0x2a67c4, + 0x22dc42, + 0x232ec6, + 0x3b7ec6, + 0x315fc5, 0x2000c2, - 0x202703, - 0x33e01242, - 0x20c504, + 0x24ac43, + 0x34e12402, + 0x21fa44, 0x200382, - 0x23c803, - 0x215402, - 0x21a3c3, + 0x23cb03, + 0x20cac2, + 0x217fc3, 0x2003c2, - 0x2fb406, - 0x20e2c3, - 0x207783, - 0x9a048, - 0x9a048, - 0x308003, - 0x1b4103, + 0x2fcf46, + 0x208503, + 0x20aa43, + 0xae888, + 0xae888, + 0x266a83, + 0x1c0443, 0x2000c2, - 0x34a01242, - 0x308003, - 0x266d43, - 0x2059c3, - 0x227fc4, - 0x21a3c3, - 0x242543, - 0x9a048, + 0x35a12402, + 0x266a83, + 0x26e2c3, + 0x3433c3, + 0x22e004, + 0x217fc3, + 0x23e083, + 0xae888, 0x2000c2, - 0x35201242, - 0x214a83, - 0x21a3c3, - 0x3dc3, - 0x242543, + 0x36212402, + 0x22ea43, + 0x217fc3, + 0x5803, + 0x23e083, 0x682, - 0x209d42, - 0x20c782, - 0x21a8c3, - 0x2f7103, + 0x203b42, + 0x21fcc2, + 0x21e1c3, + 0x2f8e43, 0x2000c2, - 0x139b05, - 0x9a048, - 0x17e707, - 0x201242, - 0x232dc3, - 0x24d9c4, - 0x207083, - 0x308003, - 0x206c03, - 0x23c803, - 0x21a3c3, - 0x2125c3, - 0x242543, - 0x233dc3, - 0x12be53, - 0x12e714, - 0x139b05, - 0x17e707, - 0x1d35c9, - 0x10d8c6, - 0xf5ecb, - 0x28886, - 0x54c47, - 0x15aec6, + 0x146bc5, + 0xae888, + 0x178d87, + 0x212402, + 0x233fc3, + 0x24d704, + 0x2033c3, + 0x266a83, + 0x204903, + 0x23cb03, + 0x217fc3, + 0x213cc3, + 0x23e083, + 0x234fc3, + 0x140d13, + 0x142dd4, + 0x146bc5, + 0x178d87, + 0x1dbc9, + 0x110b86, + 0x121b4b, + 0x36fc6, + 0x54bc7, + 0xe786, 0x649, - 0x15794a, - 0x8b70d, - 0x12350c, - 0x116cca, - 0x112988, - 0x97805, - 0x1d3608, - 0x11ec6, - 0x1c6606, - 0x365c6, + 0x1d818a, + 0x9110d, + 0x127d8c, + 0x1198ca, + 0x15d048, + 0x1b5a05, + 0x1dc08, + 0x13a06, + 0x1ce786, + 0x134c46, 0x602, - 0x2aac82, - 0x174ec4, - 0x9fc86, - 0x12c310, - 0x147498e, - 0x68846, - 0x6264c, - 0x36a6720b, - 0x139b05, - 0x14820b, - 0x36fc6544, - 0x1b3f07, - 0x22111, - 0x1ae28a, - 0x214a83, - 0x3727db88, - 0x656c5, - 0x19b808, - 0xca04, - 0x14a545, - 0x3755ca06, - 0xa7946, - 0xc7746, - 0x908ca, - 0x1b5c43, - 0x37a0dc84, - 0x50849, - 0x129747, - 0x1274ca, - 0x14d8949, + 0x2293c2, + 0x6f204, + 0xa0e86, + 0x1411d0, + 0x147a54e, + 0x1e46, + 0x696cc, + 0x37b22f0b, + 0x146bc5, + 0x15434b, + 0x37fce6c4, + 0x1c0247, + 0x23c91, + 0x11a7ca, + 0x22ea43, + 0x38285648, + 0x6bc45, + 0xf988, + 0x1ff44, + 0x14c705, + 0x38561cc6, + 0x9b306, + 0xc9b46, + 0x9620a, + 0x96ecc, + 0x1c2043, + 0x1c4104, + 0x38a120c4, + 0x51709, + 0x164347, + 0x1167ca, + 0x14dac89, 0x605, - 0xec503, - 0x37e33f07, - 0x1df105, - 0x1538186, - 0x1498886, - 0xb06cc, - 0x101b88, - 0x3803fcc3, - 0xf874b, - 0x13864b, - 0x38647c0c, - 0x140a503, - 0xc2dc8, - 0xf89c5, - 0xc11c9, - 0xea803, - 0x102908, - 0x141dfc6, - 0x86107, - 0x38b5b849, - 0x19d887, - 0xebbca, - 0x39fbf648, - 0x11578d, - 0xa788, - 0xf283, - 0x1443f09, - 0x174483, - 0x28886, - 0xf48c8, - 0x11dc4, - 0x1205c5, - 0x148df83, - 0x239c7, - 0x38e239c3, - 0x393c0a06, - 0x39637f04, - 0x39b0a107, - 0xf48c4, - 0xf48c4, - 0xf48c4, - 0xf48c4, + 0x103583, + 0x38e35107, + 0x2a7c5, + 0x153d986, + 0x14731c6, + 0xb3f8c, + 0x104248, + 0x390408c3, + 0xfa24b, + 0x12bd4b, + 0x3964950c, + 0x140ba83, + 0xc96c8, + 0xfa4c5, + 0xc6c09, + 0xeca43, + 0x11fb08, + 0x141b5c6, + 0x8e8c7, + 0x39b60b09, + 0x99c87, + 0xf054a, + 0x3afc6788, + 0x11838d, + 0xff48, + 0x1ac3, + 0x1445009, + 0x3a643, + 0x36fc6, + 0x107788, + 0x13904, + 0x154c85, + 0x1492ec3, + 0x22387, + 0x39e22383, + 0x3a3c78c6, + 0x3a637e84, + 0x3ab09647, + 0x107784, + 0x107784, + 0x107784, + 0x107784, 0x41, - 0x214a83, - 0x232dc3, - 0x308003, - 0x23c803, - 0x21a3c3, - 0x242543, + 0x22ea43, + 0x233fc3, + 0x266a83, + 0x23cb03, + 0x217fc3, + 0x23e083, 0x2000c2, - 0x201242, - 0x308003, - 0x206182, - 0x21a3c3, - 0x242543, - 0x20e2c3, - 0x3810cf, - 0x38148e, - 0x9a048, - 0x214a83, - 0x43bc7, - 0x232dc3, - 0x308003, - 0x21bc83, - 0x21a3c3, - 0x242543, - 0x68784, - 0x4fc4, - 0x145bc4, - 0x21c9c3, - 0x296747, - 0x203082, - 0x26ce49, + 0x212402, + 0x266a83, + 0x209582, + 0x217fc3, + 0x23e083, + 0x208503, + 0x38644f, + 0x38680e, + 0xae888, + 0x22ea43, + 0x44cc7, + 0x233fc3, + 0x266a83, + 0x2191c3, + 0x217fc3, + 0x23e083, + 0x1d84, + 0x157d04, + 0x1b4744, + 0x21afc3, + 0x324007, + 0x207d42, + 0x272549, 0x200ac2, - 0x38be4b, - 0x2a1b8a, - 0x2a2889, + 0x3a58cb, + 0x2a6b8a, + 0x2aec89, 0x200542, - 0x20cdc6, - 0x236a55, - 0x38bf95, - 0x2391d3, - 0x38c513, - 0x2037c2, - 0x2037c5, - 0x2037cc, - 0x27514b, - 0x276205, - 0x204b42, - 0x29d282, - 0x37bb86, - 0x201182, - 0x2c9d46, - 0x20908d, - 0x3dee8c, - 0x379a84, + 0x220306, + 0x244495, + 0x3a5a15, + 0x387d93, + 0x3a5f93, + 0x2272c2, + 0x2272c5, + 0x25f44c, + 0x27ad0b, + 0x277a05, + 0x201802, + 0x239202, + 0x381b06, + 0x203502, + 0x2cf9c6, + 0x21d58d, + 0x22a54c, + 0x38b884, 0x200882, - 0x202b02, - 0x259808, + 0x222b02, + 0x3a51c8, 0x200202, - 0x205086, - 0x395a8f, - 0x205090, - 0x3a1544, - 0x236c15, - 0x239353, - 0x24d2c3, - 0x34934a, - 0x214f07, - 0x383d89, - 0x327387, - 0x220f82, + 0x336d46, + 0x39c70f, + 0x357dd0, + 0x229804, + 0x244655, + 0x387f13, + 0x24c943, + 0x369f8a, + 0x20c5c7, + 0x3a1ec9, + 0x316687, + 0x30bf02, 0x200282, - 0x3beb06, - 0x205fc2, - 0x9a048, - 0x202e82, - 0x201542, - 0x20ac47, - 0x36a6c7, - 0x36a6d1, - 0x2180c5, - 0x2180ce, - 0x218e8f, - 0x20cd42, - 0x2679c7, - 0x21d008, - 0x207682, - 0x21d482, - 0x2101c6, - 0x2101cf, - 0x263710, - 0x22c042, - 0x2086c2, - 0x238c48, - 0x2086c3, - 0x25cec8, - 0x2c1bcd, - 0x215843, - 0x363208, - 0x27fc4f, - 0x28000e, - 0x33c9ca, - 0x2f5211, - 0x2f5690, - 0x300acd, - 0x300e0c, - 0x24a147, - 0x3494c7, - 0x349709, - 0x220f42, - 0x204342, - 0x25678c, - 0x256a8b, + 0x3c90c6, + 0x204cc2, + 0xae888, + 0x207f42, + 0x208a02, + 0x228fc7, + 0x348187, + 0x348191, + 0x218885, + 0x21888e, + 0x2194cf, + 0x20cfc2, + 0x3236c7, + 0x21b008, + 0x20aac2, + 0x21c942, + 0x227846, + 0x22784f, + 0x26c690, + 0x22c442, + 0x20cf02, + 0x238b48, + 0x214803, + 0x261248, + 0x2eea8d, + 0x20cf03, + 0x3cc248, + 0x28734f, + 0x28770e, + 0x25d54a, + 0x26cb11, + 0x26cf90, + 0x30280d, + 0x302b4c, + 0x3c20c7, + 0x36a107, + 0x37e109, + 0x29a842, + 0x205082, + 0x256b8c, + 0x256e8b, 0x200d42, - 0x2cbec6, - 0x20b682, + 0x2d38c6, + 0x202282, 0x200482, - 0x2167c2, - 0x201242, - 0x22d204, - 0x239e07, - 0x22ba02, - 0x23f707, - 0x241247, - 0x22f142, - 0x22ec02, - 0x243a85, - 0x205582, - 0x392dce, - 0x3cae0d, - 0x232dc3, - 0x28508e, - 0x2b794d, - 0x328b03, - 0x2027c2, - 0x21fc84, - 0x24cf02, - 0x222342, - 0x38cdc5, - 0x39d187, - 0x246702, - 0x20dec2, - 0x24d5c7, - 0x250bc8, - 0x22dec2, - 0x277306, - 0x25660c, - 0x25694b, - 0x205dc2, - 0x25db0f, - 0x25ded0, - 0x25e2cf, - 0x25e695, - 0x25ebd4, - 0x25f0ce, - 0x25f44e, - 0x25f7cf, - 0x25fb8e, - 0x25ff14, - 0x260413, - 0x2608cd, - 0x2765c9, - 0x28d003, - 0x207082, - 0x31e805, - 0x3ddc86, + 0x361e82, + 0x212402, + 0x22f244, + 0x239d87, + 0x22c982, + 0x240307, + 0x241b47, + 0x230a82, + 0x211d02, + 0x244b85, + 0x20da02, + 0x3985ce, + 0x3d068d, + 0x233fc3, + 0x28cf0e, + 0x2bb64d, + 0x35cc43, + 0x203142, + 0x28ac84, + 0x29a802, + 0x223ec2, + 0x3930c5, + 0x3a3b07, + 0x2481c2, + 0x20fa02, + 0x24d307, + 0x251a88, + 0x2ba882, + 0x27cf06, + 0x256a0c, + 0x256d4b, + 0x2091c2, + 0x261d4f, + 0x262110, + 0x26250f, + 0x2628d5, + 0x262e14, + 0x26330e, + 0x26368e, + 0x263a0f, + 0x263dce, + 0x264154, + 0x264653, + 0x264b0d, + 0x27c349, + 0x292a43, + 0x2033c2, + 0x2d2685, + 0x2033c6, 0x200382, - 0x37f147, - 0x308003, + 0x3451c7, + 0x266a83, 0x200642, - 0x361608, - 0x2f5451, - 0x2f5890, - 0x201f02, - 0x28bf47, - 0x204582, - 0x271547, - 0x201e42, - 0x295749, - 0x37bb47, - 0x29ac08, - 0x35c846, - 0x24b083, - 0x24b085, - 0x233042, + 0x23e108, + 0x26cd51, + 0x26d190, + 0x202182, + 0x291c47, + 0x204b82, + 0x277507, + 0x206902, + 0x207089, + 0x381ac7, + 0x294648, + 0x361b06, + 0x207483, + 0x207485, + 0x234242, 0x2004c2, - 0x3bef05, - 0x39b605, - 0x202482, - 0x21bdc3, - 0x348587, - 0x20e5c7, - 0x201842, - 0x345044, - 0x210543, - 0x31d809, - 0x210548, - 0x202042, - 0x208282, - 0x2ed207, - 0x2f5145, - 0x298bc8, - 0x2ae507, - 0x20fac3, - 0x29fb06, - 0x30094d, - 0x300ccc, - 0x305086, - 0x206782, - 0x2017c2, - 0x209e82, - 0x27facf, - 0x27fece, - 0x360007, - 0x210942, - 0x372385, - 0x372386, - 0x21d542, + 0x3c94c5, + 0x3b3785, + 0x201482, + 0x219303, + 0x3546c7, + 0x20bdc7, + 0x204d02, + 0x249084, + 0x20eb03, + 0x2f6f89, + 0x20eb08, + 0x202702, + 0x20a682, + 0x26b947, + 0x26ca45, + 0x273508, + 0x2b1347, + 0x209f03, + 0x2a0d06, + 0x30268d, + 0x302a0c, + 0x305e06, + 0x206b02, + 0x208c82, + 0x20b982, + 0x2871cf, + 0x2875ce, + 0x365507, + 0x204482, + 0x388c05, + 0x388c06, + 0x215782, 0x200bc2, - 0x28e5c6, - 0x247703, - 0x3c5d46, - 0x2d6705, - 0x2d670d, - 0x2d6f95, - 0x2d7e0c, - 0x2d818d, - 0x2d84d2, - 0x202382, - 0x26c9c2, - 0x202802, - 0x219386, - 0x3c7dc6, - 0x202902, - 0x3ddd06, - 0x206e42, - 0x296f45, - 0x201582, - 0x392f09, - 0x21ae0c, - 0x21b14b, + 0x293506, + 0x206583, + 0x206586, + 0x2d8a45, + 0x2d8a4d, + 0x2d92d5, + 0x2da14c, + 0x2da4cd, + 0x2da812, + 0x20a942, + 0x2720c2, + 0x203882, + 0x36ac46, + 0x204a46, + 0x202542, + 0x203446, + 0x201102, + 0x324805, + 0x202582, + 0x398709, + 0x22ce4c, + 0x22d18b, 0x2003c2, - 0x251d88, - 0x202942, + 0x252e48, + 0x202a42, 0x200a82, - 0x272b46, - 0x2d2c85, + 0x278706, + 0x245ac5, 0x200a87, - 0x227c85, - 0x257145, - 0x215542, - 0x2a3882, - 0x214282, - 0x293a87, - 0x2fb4cd, - 0x2fb84c, - 0x234307, - 0x277282, - 0x205742, - 0x3d2508, - 0x344d48, - 0x3298c8, - 0x3b1104, - 0x33ecc7, - 0x3c2c83, - 0x21b742, - 0x20cb42, - 0x2fc0c9, - 0x228c87, - 0x2141c2, - 0x272f45, - 0x214b42, - 0x20eb42, - 0x2f6e43, - 0x2f6e46, - 0x305fc2, - 0x308c02, + 0x22dcc5, + 0x257e45, + 0x201b42, + 0x21dcc2, + 0x205b42, + 0x298c07, + 0x2fd00d, + 0x2fd38c, + 0x235507, + 0x27ce82, + 0x211c82, + 0x3dc788, + 0x248d88, + 0x34f348, + 0x3bb1c4, + 0x372d07, + 0x36aa43, + 0x22d782, + 0x204ac2, + 0x2fe3c9, + 0x30b287, + 0x216982, + 0x278b05, + 0x242c42, + 0x20d402, + 0x2f8b83, + 0x2f8b86, + 0x306d42, + 0x308142, 0x200402, - 0x35c406, - 0x21fbc7, - 0x213fc2, + 0x3616c6, + 0x34de07, + 0x216782, 0x200902, - 0x25cd0f, - 0x284ecd, - 0x28a98e, - 0x2b77cc, - 0x206842, - 0x206142, - 0x35c685, - 0x320b86, + 0x26108f, + 0x28cd4d, + 0x28fd0e, + 0x2bb4cc, + 0x208842, + 0x205302, + 0x361945, + 0x325d86, 0x200b82, - 0x2069c2, + 0x205502, 0x200682, - 0x285244, - 0x2c1a44, - 0x384486, - 0x205142, - 0x27a207, - 0x23d903, - 0x23d908, - 0x23e108, - 0x2d23c7, - 0x24c186, - 0x207842, - 0x20b603, - 0x20b607, - 0x3a6dc6, - 0x2ee0c5, - 0x274608, - 0x2071c2, - 0x3b9447, - 0x26c702, - 0x294ec2, - 0x206382, - 0x205249, - 0x201082, - 0xcb3c8, - 0x203882, - 0x234583, - 0x204847, - 0x203282, - 0x21af8c, - 0x21b28b, - 0x305106, - 0x2ec445, - 0x202c02, - 0x202982, - 0x2c55c6, - 0x216643, - 0x342e87, - 0x291f82, - 0x2008c2, - 0x2368d5, - 0x38c155, - 0x239093, - 0x38c693, - 0x24ee47, - 0x26ee11, - 0x275590, - 0x283712, - 0x2eb111, - 0x29a208, - 0x29a210, - 0x29f38f, - 0x2a1953, - 0x2a2652, - 0x2a7d50, - 0x2b4ecf, - 0x3689d2, - 0x3a1891, - 0x3d4d53, - 0x2b9d52, - 0x2d634f, - 0x2ddd0e, - 0x2e1112, - 0x2e1fd1, - 0x2e5e0f, - 0x2e7c8e, - 0x2efbd1, - 0x2f8ed0, - 0x301d52, - 0x306491, - 0x309b50, - 0x311f8f, - 0x3cea91, - 0x347910, - 0x37b006, - 0x380cc7, - 0x218987, - 0x209f42, - 0x280f85, - 0x310dc7, - 0x20c782, + 0x28d0c4, + 0x2c14c4, + 0x389fc6, + 0x207742, + 0x28d807, + 0x23c643, + 0x23c648, + 0x23d1c8, + 0x245207, + 0x249946, + 0x20ab02, + 0x2186c3, + 0x2186c7, + 0x292246, + 0x2ecb85, + 0x27a1c8, 0x2018c2, - 0x229e45, - 0x21ec03, - 0x374946, - 0x2fb68d, - 0x2fb9cc, - 0x203642, - 0x20364b, - 0x27500a, - 0x22408a, - 0x2c43c9, - 0x2fa74b, - 0x2ae64d, - 0x3114cc, - 0x35d58a, - 0x244f8c, - 0x27188b, - 0x27604c, - 0x29b68e, - 0x2bf90b, - 0x2b8a0c, - 0x2dc483, - 0x376e46, - 0x3bf642, - 0x304382, - 0x24f4c3, - 0x206482, - 0x20c3c3, - 0x324506, - 0x25e847, - 0x352386, - 0x2e78c8, - 0x348408, - 0x2cf746, + 0x3c1007, + 0x207142, + 0x25cdc2, + 0x201702, + 0x219649, + 0x203c02, + 0x10acc8, + 0x201f42, + 0x235783, + 0x3599c7, 0x200f02, - 0x31398d, + 0x22cfcc, + 0x22d2cb, + 0x305e86, + 0x3034c5, + 0x203d02, + 0x202a82, + 0x2cb146, + 0x20dd03, + 0x36a307, + 0x2b3f42, + 0x2008c2, + 0x244315, + 0x3a5bd5, + 0x387c53, + 0x3a6113, + 0x2596c7, + 0x28b111, + 0x2908d0, + 0x2f7b92, + 0x29b711, + 0x2a0548, + 0x2a0550, + 0x2a2c8f, + 0x2a6953, + 0x2aea52, + 0x2b8190, + 0x36f14f, + 0x3a4112, + 0x2bac51, + 0x2bfa93, + 0x3426d2, + 0x2d868f, + 0x2e010e, + 0x2e3512, + 0x2e43d1, + 0x2e79cf, + 0x2ea38e, + 0x2ed451, + 0x2fa9d0, + 0x304412, + 0x307211, + 0x309090, + 0x321ecf, + 0x37ab11, + 0x3d2fd0, + 0x33fac6, + 0x314b47, + 0x2153c7, + 0x202402, + 0x288985, + 0x3135c7, + 0x21fcc2, + 0x208d82, + 0x22b8c5, + 0x208743, + 0x26ec86, + 0x2fd1cd, + 0x2fd50c, + 0x2034c2, + 0x25f2cb, + 0x27abca, + 0x22718a, + 0x2ca549, + 0x2fc34b, + 0x2b148d, 0x313ccc, - 0x338807, - 0x316b07, - 0x234a42, - 0x2143c2, - 0x20b582, - 0x27c602, - 0x330496, - 0x335f95, - 0x3395d6, - 0x33ff53, - 0x340612, - 0x355513, - 0x358152, - 0x3acc8f, - 0x3be558, - 0x3bf117, - 0x3bfc59, - 0x3c1898, - 0x3c3c58, - 0x3c5fd7, - 0x3c6b17, - 0x3c8216, - 0x3cc693, - 0x3ccfd5, - 0x3cdd52, - 0x3ce1d3, - 0x201242, - 0x21a3c3, - 0x242543, - 0x214a83, - 0x232dc3, - 0x308003, - 0x23c803, - 0x219a04, - 0x21a3c3, - 0x242543, - 0x20e2c3, + 0x240cca, + 0x2466cc, + 0x24e88b, + 0x27784c, + 0x27bd0e, + 0x29cb4b, + 0x2b668c, + 0x2ec543, + 0x2edf06, + 0x3c6782, + 0x305102, + 0x25cb43, + 0x201502, + 0x204243, + 0x353446, + 0x262a87, + 0x2c3846, + 0x2158c8, + 0x354548, + 0x3800c6, + 0x20e482, + 0x31598d, + 0x315ccc, + 0x32bf07, + 0x319707, + 0x223542, + 0x216b82, + 0x203b02, + 0x284302, + 0x336c56, + 0x33b795, + 0x3407d6, + 0x3437d3, + 0x343e92, + 0x35bc93, + 0x35de52, + 0x3b6bcf, + 0x3c5758, + 0x3c6257, + 0x3c6c59, + 0x3c8b18, + 0x3c96d8, + 0x3cb9d7, + 0x3cc457, + 0x3ce196, + 0x3d1cd3, + 0x3d2755, + 0x3d33d2, + 0x3d3853, + 0x212402, + 0x217fc3, + 0x23e083, + 0x22ea43, + 0x233fc3, + 0x266a83, + 0x23cb03, + 0x21e484, + 0x217fc3, + 0x23e083, + 0x208503, 0x2000c2, - 0x201602, - 0x3be933c5, - 0x3c281445, - 0x3c746bc6, - 0x9a048, - 0x3caba385, - 0x201242, - 0x2052c2, - 0x3ce871c5, - 0x3d27e985, - 0x3d680387, - 0x3da806c9, - 0x3de1f844, + 0x202642, + 0x3ce98545, + 0x3d25ef05, + 0x3d73ed86, + 0xae888, + 0x3dac0105, + 0x212402, + 0x204542, + 0x3de5de45, + 0x3e285fc5, + 0x3e687a87, + 0x3ea87dc9, + 0x3ef4da84, 0x200382, 0x200642, - 0x3e249a05, - 0x3e69d789, - 0x3eb2fb48, - 0x3eeb4985, - 0x3f350107, - 0x3f61d988, - 0x3fb09745, - 0x3fe9e2c6, - 0x403a2709, - 0x406db0c8, - 0x40aca648, - 0x40e9ddca, - 0x412c21c4, - 0x4168e885, - 0x41ac6c08, - 0x41f44945, - 0x20fe82, - 0x42297703, - 0x426aa1c6, - 0x42aaf5c8, - 0x42ef2f86, - 0x4320ad88, - 0x43785546, - 0x43a02c44, - 0x43e08482, - 0x446f4cc7, - 0x44ab0b04, - 0x44e79487, - 0x453cfc87, + 0x3f25bf05, + 0x3f69e949, + 0x3fb36248, + 0x3feb87c5, + 0x403513c7, + 0x40623708, + 0x40b08c85, + 0x40e9f486, + 0x413a9a89, + 0x416dd6c8, + 0x41ad02c8, + 0x41e9ef8a, + 0x422ef084, + 0x426ad705, + 0x42acc788, + 0x42e48985, + 0x214882, + 0x4324bd03, + 0x436abe06, + 0x43a6af08, + 0x43ef4246, + 0x4434df48, + 0x447af006, + 0x44a463c4, + 0x44e03182, + 0x45707b87, + 0x45ab43c4, + 0x45e81487, + 0x463da087, 0x2003c2, - 0x456a2c85, - 0x45a13504, - 0x45fa3407, - 0x4623d187, - 0x466830c6, - 0x46a7f445, - 0x46e9d887, - 0x472daf48, - 0x477d0007, - 0x47b41189, - 0x47ed7505, - 0x48331207, - 0x48692a06, - 0x647cb, - 0x48b3aec8, - 0x225bcd, - 0x25d2c9, - 0x27418b, - 0x27c08b, - 0x2b014b, - 0x2f010b, - 0x320d8b, - 0x32104b, - 0x321e89, - 0x322e8b, - 0x32314b, - 0x323c8b, - 0x324e0a, - 0x32534a, - 0x32594c, - 0x32934b, - 0x329aca, - 0x33e6ca, - 0x34b30e, - 0x34d44e, - 0x34d7ca, - 0x34f64a, - 0x350c0b, - 0x350ecb, - 0x3519cb, - 0x36cdcb, - 0x36d3ca, - 0x36e08b, - 0x36e34a, - 0x36e5ca, - 0x36e84a, - 0x38e64b, - 0x39510b, - 0x397c0e, - 0x397f8b, - 0x39e8cb, - 0x39fc0b, - 0x3a3fca, - 0x3a4249, - 0x3a448a, - 0x3a5d8a, - 0x3bdf4b, - 0x3ca84b, - 0x3cb24a, - 0x3cc0cb, - 0x3d520b, - 0x3dfe4b, - 0x48e81788, - 0x4928ae89, - 0x496a5789, - 0x49aed408, - 0x3597c5, - 0x2041c3, - 0x251084, - 0x3015c5, - 0x21f586, - 0x307385, - 0x28a004, - 0x37f048, - 0x31bb05, - 0x294984, - 0x3c7607, - 0x2a4b0a, - 0x38f4ca, - 0x360107, - 0x34c207, - 0x2e6307, - 0x280947, - 0x334605, - 0x3b9b46, - 0x2f2207, - 0x39bc04, - 0x2f9b46, - 0x2f9a46, - 0x3c2d85, - 0x3b6684, - 0x29ee06, - 0x2a3bc7, - 0x34bb86, - 0x3adf47, - 0x251143, - 0x384106, - 0x238e85, - 0x280487, - 0x26a5ca, - 0x356504, - 0x219d88, - 0x31a2c9, - 0x2d4847, - 0x390606, - 0x3c5808, - 0x2f36c9, - 0x383f44, - 0x31eb84, - 0x2dea45, - 0x222b48, - 0x2d4b07, - 0x36c9c9, - 0x34cdc8, - 0x318406, - 0x264a46, - 0x29f988, - 0x36b706, - 0x281445, - 0x283186, - 0x279b88, - 0x27f9c6, - 0x255d8b, - 0x39d746, - 0x2a14cd, - 0x3d0845, - 0x2b09c6, - 0x20c045, - 0x24a789, - 0x370447, - 0x385188, - 0x291386, - 0x2a0689, - 0x3b1306, - 0x26a545, - 0x2a6dc6, - 0x2e5346, - 0x2d9209, - 0x2c0b06, - 0x2a4807, - 0x360b05, - 0x201583, - 0x21b7c5, - 0x34dd07, - 0x288f46, - 0x3d0749, - 0x346bc6, - 0x279686, - 0x20f849, - 0x282b89, - 0x2a8587, - 0x343488, - 0x2a7789, - 0x280c08, - 0x394486, - 0x2e2e85, - 0x2cfd8a, - 0x279706, - 0x33a806, - 0x2dc705, - 0x2523c8, - 0x326447, - 0x22f5ca, - 0x24e1c6, - 0x2e05c5, - 0x309186, - 0x215f87, - 0x3904c7, - 0x21c2c5, - 0x26a705, - 0x263586, - 0x269d46, - 0x26c0c6, - 0x2c70c4, - 0x282109, - 0x28bd06, - 0x30618a, - 0x2211c8, - 0x330f08, - 0x38f4ca, - 0x2af785, - 0x2a3b05, - 0x3c4f48, - 0x2c4f08, - 0x237c47, - 0x3b9d86, - 0x333988, - 0x2108c7, - 0x274848, - 0x2bebc6, - 0x283ec8, - 0x29c606, - 0x27ba87, - 0x3681c6, - 0x29ee06, - 0x2643ca, - 0x305206, - 0x2e2e89, - 0x36f506, - 0x2a5c8a, - 0x202c49, - 0x241706, - 0x2c2844, - 0x31e8cd, - 0x28b107, - 0x3b2a86, - 0x2ca505, - 0x3b1385, - 0x391106, - 0x2a7349, - 0x2bd687, - 0x27ab86, - 0x31db46, - 0x28a089, - 0x281384, - 0x244744, - 0x204088, - 0x356846, - 0x2a6ec8, - 0x318a88, - 0x2883c7, - 0x3c0549, - 0x26c2c7, - 0x2ba24a, - 0x2fcb8f, - 0x2e43ca, - 0x3d9e45, - 0x279dc5, - 0x2173c5, - 0x3c2147, - 0x215b43, - 0x343688, - 0x3de2c6, - 0x3de3c9, - 0x2f2b06, + 0x466a3e85, + 0x46a15cc4, + 0x46faaa07, + 0x4723c0c7, + 0x4768aac6, + 0x47a86b45, + 0x47e9ea47, + 0x482dd548, + 0x487da407, + 0x48adcb49, + 0x48ed9845, + 0x4931d047, + 0x49697b86, + 0x27c4b, + 0x49b47b08, + 0x22800d, + 0x25c089, + 0x279d4b, + 0x27b8cb, + 0x2afecb, + 0x39b08b, + 0x325f8b, + 0x32624b, + 0x326709, + 0x32770b, + 0x3279cb, + 0x32850b, + 0x32910a, + 0x32964a, + 0x329c4c, + 0x32e6cb, + 0x32ec0a, + 0x34228a, + 0x34d34e, + 0x34e94e, + 0x34ecca, + 0x350b0a, + 0x351b4b, + 0x351e0b, + 0x35290b, + 0x372ecb, + 0x3734ca, + 0x37418b, + 0x37444a, + 0x3746ca, + 0x37494a, + 0x394a0b, + 0x39bbcb, + 0x39ed4e, + 0x39f0cb, + 0x3a65cb, + 0x3a73cb, + 0x3ab74a, + 0x3ab9c9, + 0x3abc0a, + 0x3ad9ca, + 0x3c514b, + 0x3d00cb, + 0x3d0aca, + 0x3d170b, + 0x3d7a4b, + 0x3e07cb, + 0x49e89188, + 0x4a290209, + 0x4a6a7249, + 0x4aaefcc8, + 0x35f145, + 0x204083, + 0x251f44, + 0x34e385, + 0x34d7c6, + 0x367645, + 0x28f384, + 0x3450c8, + 0x31f645, + 0x299784, + 0x203787, + 0x2a634a, + 0x37738a, + 0x365607, + 0x26b0c7, + 0x2e7ec7, + 0x288047, + 0x33a405, + 0x20e506, + 0x2f34c7, + 0x20fd84, + 0x3ba146, + 0x3ba046, + 0x3dccc5, + 0x389dc4, + 0x29ffc6, + 0x2a5407, + 0x2671c6, + 0x31a487, + 0x235e43, + 0x3a2246, + 0x238d85, + 0x287b87, + 0x26fe0a, + 0x237784, + 0x2219c8, + 0x39a2c9, + 0x2d6b87, + 0x3bba06, + 0x203f48, + 0x2f4989, + 0x3a2084, + 0x2d2a04, + 0x313005, + 0x21e388, + 0x2d6e47, + 0x2b7689, + 0x3690c8, + 0x31b8c6, + 0x266cc6, + 0x2a0b88, + 0x371c86, + 0x25ef05, + 0x28ab86, + 0x281f48, + 0x2870c6, + 0x255f0b, + 0x2be206, + 0x2a280d, + 0x205385, + 0x2b4286, + 0x21f585, + 0x2bc949, + 0x2e0cc7, + 0x3cd248, + 0x39dec6, + 0x2a1949, + 0x2c1246, + 0x26fd85, + 0x2a9606, + 0x2d5506, + 0x2db549, + 0x2c8186, + 0x2a6047, + 0x2d5bc5, + 0x208a43, + 0x22d805, + 0x395c07, + 0x25fac6, + 0x205289, + 0x33ed86, + 0x281686, + 0x226049, + 0x28a589, + 0x2aa947, + 0x207648, + 0x29b149, + 0x288608, + 0x3a7646, + 0x2e5285, + 0x27dd4a, + 0x281706, + 0x347446, + 0x2deb05, + 0x253708, + 0x2f5707, + 0x23114a, + 0x24df06, + 0x2e2785, + 0x3086c6, + 0x20d647, + 0x3bb8c7, + 0x21a3c5, + 0x26ff45, + 0x26c506, + 0x273b06, + 0x2b0d46, + 0x2ccc44, + 0x289b09, + 0x291a06, + 0x306f0a, + 0x30c148, + 0x31cd48, + 0x37738a, + 0x2ef805, + 0x2a5345, + 0x3cac88, + 0x2c7e88, + 0x2398c7, + 0x36ee86, + 0x339788, + 0x20ee87, + 0x27a408, + 0x2c6806, + 0x28bac8, + 0x29de06, + 0x283847, + 0x23b3c6, + 0x29ffc6, + 0x27438a, + 0x305f86, + 0x2e5289, + 0x2a7746, + 0x22910a, + 0x2463c9, + 0x2fd9c6, + 0x2c9144, + 0x2d274d, + 0x285e07, + 0x3325c6, + 0x2d0185, + 0x2c12c5, + 0x396906, + 0x2a9b89, + 0x2c09c7, + 0x282946, + 0x2ced06, + 0x28f409, + 0x288d84, + 0x23f644, + 0x3b53c8, + 0x237ac6, + 0x2a9708, + 0x322708, + 0x3a9f87, + 0x358b89, + 0x3c9f87, + 0x2bffca, + 0x2fee8f, + 0x2b230a, + 0x3e22c5, + 0x282185, + 0x21c3c5, + 0x229747, + 0x20d203, + 0x207848, + 0x355606, + 0x355709, + 0x2f3dc6, + 0x2db387, + 0x2a1709, + 0x3cd148, + 0x2debc7, + 0x325343, + 0x35f1c5, + 0x20d185, + 0x2cca8b, + 0x248a44, + 0x238344, + 0x27d506, + 0x325507, + 0x396e8a, + 0x24bd87, + 0x298787, + 0x285fc5, + 0x3d5c05, + 0x296ac9, + 0x29ffc6, + 0x24bc0d, + 0x273445, + 0x2c3c03, + 0x2059c3, + 0x3617c5, + 0x33a085, + 0x203f48, + 0x283287, + 0x23f3c6, + 0x2a6ec6, + 0x22bbc5, + 0x234287, + 0x25eb47, + 0x252287, + 0x2ad78a, + 0x3a2308, + 0x2ccc44, + 0x286e47, + 0x285187, + 0x363306, + 0x29d487, + 0x2ebd88, + 0x3d8348, + 0x29c3c6, + 0x26b308, + 0x2c8204, + 0x2f34c6, + 0x250dc6, + 0x3d5486, + 0x208006, + 0x218e84, + 0x288106, + 0x2cf246, + 0x2a0386, + 0x24bc06, + 0x205886, + 0x2a7e46, + 0x23f2c8, + 0x2c2a48, + 0x2e1e88, + 0x367848, + 0x3cac06, + 0x210ec5, + 0x22d7c6, + 0x2b8845, + 0x399107, + 0x295d45, + 0x2119c3, + 0x2e5f45, + 0x235fc4, + 0x2059c5, + 0x202a43, + 0x3c4bc7, + 0x399d08, + 0x31a546, + 0x34490d, + 0x282146, + 0x29f945, + 0x219643, + 0x2cc149, + 0x288f06, + 0x23b1c6, + 0x3b2144, + 0x2b2287, + 0x3611c6, + 0x23f845, + 0x270483, + 0x20b344, + 0x285346, + 0x20e604, + 0x275548, + 0x204609, + 0x32e489, + 0x2a950a, + 0x29738d, + 0x23e587, + 0x3c2cc6, + 0x21dd04, + 0x287dc9, + 0x28e308, + 0x290086, + 0x23abc6, + 0x29d487, + 0x2c98c6, + 0x226c46, + 0x25dfc6, + 0x3da10a, + 0x223708, + 0x2ef705, + 0x356c09, + 0x2d75ca, + 0x30cd48, + 0x2a46c8, + 0x299fc8, + 0x2b45cc, + 0x395905, + 0x2a7148, + 0x2c2d46, + 0x2e1446, + 0x2d5707, + 0x24bc85, + 0x28ad05, + 0x32e349, + 0x214207, + 0x3556c5, + 0x2284c7, + 0x2059c3, + 0x2d7a85, + 0x224148, 0x2d9047, - 0x2a0449, - 0x385088, - 0x2dc7c7, - 0x31f203, - 0x359845, - 0x215ac5, - 0x2c6f0b, - 0x344a04, - 0x23ba44, - 0x277906, - 0x31f3c7, - 0x39168a, - 0x3803c7, - 0x293607, - 0x27e985, - 0x3c8785, - 0x270489, - 0x29ee06, - 0x38024d, - 0x298b05, - 0x2bc683, - 0x226283, - 0x35c505, - 0x334285, - 0x3c5808, - 0x27b4c7, - 0x2444c6, - 0x2a5406, - 0x22a145, - 0x233087, - 0x287ec7, - 0x22b447, - 0x28e90a, - 0x3841c8, - 0x2c70c4, - 0x27f747, - 0x27d6c7, - 0x35e406, - 0x29bc87, - 0x2e9688, - 0x357b08, - 0x370346, - 0x34c448, - 0x2c0b84, - 0x2f2206, - 0x37ff46, - 0x3bbc46, - 0x204506, - 0x2a3044, - 0x280a06, - 0x2c95c6, - 0x29f1c6, - 0x245806, - 0x3d0d46, - 0x2e94c6, - 0x2443c8, - 0x2bb748, - 0x2dfcc8, - 0x307588, - 0x3c4ec6, - 0x206a05, - 0x21b786, - 0x2b4a05, - 0x393907, - 0x29d485, - 0x20d743, - 0x226305, - 0x2ed004, - 0x3d0e85, - 0x202943, - 0x395407, - 0x36c188, - 0x3ae006, - 0x37e88d, - 0x279d86, - 0x29e785, - 0x205243, - 0x2c65c9, - 0x281506, - 0x299486, - 0x292104, - 0x2e4347, - 0x35bf06, - 0x244945, - 0x23a8c3, - 0x206284, - 0x27d886, - 0x35ad44, - 0x26e588, - 0x3c7989, - 0x2bdc09, - 0x2a6cca, - 0x2a914d, - 0x361a87, - 0x3ba086, - 0x2afb04, - 0x2806c9, - 0x285b48, - 0x28ad06, - 0x234e86, - 0x29bc87, - 0x2c74c6, - 0x2261c6, - 0x287346, - 0x3cfd0a, - 0x21d988, - 0x265085, - 0x295e09, - 0x2d528a, - 0x30b048, - 0x2a34c8, - 0x299408, - 0x2b0d0c, - 0x34da05, - 0x2a5688, - 0x2bba46, - 0x372046, - 0x3db607, - 0x3802c5, - 0x283305, - 0x2bdac9, - 0x20d447, - 0x3de385, - 0x2283c7, - 0x226283, - 0x2d5745, - 0x2273c8, - 0x2d6d07, - 0x2a3389, - 0x2e2d45, - 0x380fc4, - 0x2a8e08, - 0x2c1e87, - 0x2dc988, - 0x20d188, - 0x2b1a85, - 0x20c206, - 0x2a5506, - 0x2dee09, - 0x380047, - 0x2b52c6, - 0x3de007, - 0x2027c3, - 0x21f844, - 0x2da0c5, - 0x2331c4, - 0x246744, - 0x389507, - 0x2664c7, - 0x27ad44, - 0x2a31d0, - 0x296007, - 0x3c8785, - 0x30394c, - 0x20cf44, - 0x2b9a08, - 0x27b989, - 0x3bcb46, - 0x302a48, - 0x267884, - 0x277c08, - 0x22fbc6, - 0x264248, - 0x2a4186, - 0x28ba4b, - 0x32b105, - 0x2d9f48, - 0x211b44, - 0x281e8a, - 0x2a3389, - 0x3680c6, - 0x2bbc48, - 0x259345, - 0x2c5bc4, - 0x2b9906, - 0x22b308, - 0x281788, - 0x32dc86, - 0x384404, - 0x2cfd06, - 0x26c347, - 0x279387, - 0x29bc8f, - 0x339e47, - 0x2417c7, - 0x372245, - 0x372ac5, - 0x2a8249, - 0x2ead06, - 0x389745, - 0x282e87, - 0x3db888, - 0x300805, - 0x3681c6, - 0x221008, - 0x2f2f8a, - 0x22b008, - 0x28e347, - 0x2fcfc6, - 0x295dc6, + 0x2a4589, + 0x2e5145, + 0x311404, + 0x2ab1c8, + 0x2eed47, + 0x2ded88, + 0x2206c8, + 0x2b5285, + 0x21f746, + 0x2a6fc6, + 0x3c2909, + 0x250ec7, + 0x2b8cc6, + 0x355347, + 0x208683, + 0x34da84, + 0x2dc405, + 0x2343c4, + 0x24b684, + 0x38fc47, + 0x26da47, + 0x282b04, + 0x2a43d0, + 0x207bc7, + 0x3d5c05, + 0x3b3c8c, + 0x220484, + 0x31e048, + 0x283749, + 0x3d78c6, + 0x31fc48, + 0x27d804, + 0x27d808, + 0x231746, + 0x274208, + 0x2a38c6, + 0x39b90b, + 0x330685, + 0x2dc288, + 0x213684, + 0x28988a, + 0x2a4589, + 0x23b2c6, + 0x2c2f48, + 0x2592c5, + 0x2cb744, + 0x31df46, + 0x252148, + 0x289188, + 0x333e86, + 0x389f44, + 0x27dcc6, + 0x3ca007, + 0x281387, + 0x29d48f, + 0x346f07, + 0x2fda87, + 0x388ac5, + 0x377ac5, + 0x2aa609, + 0x2f7786, + 0x38fe85, + 0x28a887, + 0x2d5988, + 0x302545, + 0x23b3c6, + 0x30bf88, + 0x2f424a, + 0x37e648, + 0x293287, + 0x2ff2c6, + 0x356bc6, 0x2003c3, - 0x212503, - 0x2d5449, - 0x2a7609, - 0x2b9806, - 0x2e2d45, - 0x2b0b88, - 0x2bbc48, - 0x36b888, - 0x2873cb, - 0x37eac7, - 0x31bdc9, - 0x29bf08, - 0x34f104, - 0x3bb888, - 0x28fe49, - 0x2b55c5, - 0x3c2047, - 0x21f8c5, - 0x281688, - 0x29324b, - 0x29d5d0, - 0x2b0545, - 0x211a8c, - 0x244685, - 0x27ea03, - 0x2bf706, - 0x2c8b04, - 0x368486, - 0x2a3bc7, - 0x202804, - 0x242808, - 0x34354d, - 0x318845, - 0x2a2cc4, - 0x2ae044, - 0x2b3e49, - 0x2b2308, - 0x32b5c7, - 0x22fc48, - 0x2821c8, - 0x27ae85, - 0x2d0e87, - 0x27ae07, - 0x2cd307, - 0x26a709, - 0x2879c9, - 0x3dfb46, - 0x301006, - 0x282f46, - 0x322605, - 0x3b8a04, - 0x3c4206, - 0x3c7086, - 0x27aec8, - 0x215c4b, - 0x3563c7, - 0x2afb04, - 0x35be46, - 0x2e99c7, - 0x36f805, - 0x2971c5, - 0x2ae204, - 0x287946, - 0x3c4288, - 0x2806c9, - 0x24bb46, - 0x285948, - 0x244a06, - 0x360a48, - 0x321a0c, - 0x27ad46, - 0x29e44d, - 0x29e8cb, - 0x2a48c5, - 0x288007, - 0x2c0c06, - 0x390388, - 0x3dfbc9, - 0x2ee4c8, - 0x3c8785, - 0x39b947, - 0x280d08, - 0x23b4c9, - 0x35bb86, - 0x25138a, - 0x390108, - 0x2ee30b, - 0x21dc0c, - 0x277d08, - 0x27cc06, - 0x2d0888, - 0x2f2c07, - 0x33a409, - 0x35024d, - 0x29ed06, - 0x2250c8, - 0x2bb609, - 0x2c71c8, - 0x283fc8, - 0x2c9ecc, - 0x2cab87, - 0x2cb7c7, - 0x26a545, - 0x2bdf87, - 0x3db748, - 0x2b9986, - 0x24b9cc, - 0x300288, - 0x2db2c8, - 0x307846, - 0x2af0c7, - 0x3dfd44, - 0x307588, - 0x2cf84c, - 0x28538c, - 0x3d9ec5, - 0x3c2e07, - 0x384386, - 0x2af046, - 0x24a948, - 0x21d284, - 0x34bb8b, - 0x27a34b, - 0x2fcfc6, - 0x3433c7, - 0x343ec5, - 0x272605, - 0x34bcc6, - 0x259305, - 0x3449c5, - 0x2d4287, - 0x20e989, - 0x269f04, - 0x25a2c5, - 0x2f6d85, - 0x35aac8, - 0x28d785, - 0x2cf209, - 0x2badc7, - 0x2badcb, - 0x2fbbc6, - 0x244109, - 0x3b65c8, - 0x290185, - 0x2cd408, - 0x287a08, - 0x253047, - 0x2b4247, - 0x389589, - 0x264187, - 0x29d389, - 0x2da70c, - 0x341088, - 0x2c0649, - 0x2c2f87, - 0x282289, - 0x33c3c7, - 0x21dd08, - 0x33a345, - 0x2f2186, - 0x2ca548, - 0x217488, - 0x2d5149, - 0x344a07, - 0x273005, - 0x3c3909, - 0x2f42c6, - 0x292a04, - 0x37b446, - 0x2af448, - 0x320807, - 0x215e48, - 0x34c509, - 0x33be47, - 0x2a4cc6, - 0x2880c4, - 0x226389, - 0x2d0d08, - 0x307707, - 0x367a06, - 0x215b86, - 0x33a784, - 0x34c706, - 0x239f83, - 0x32ac89, - 0x32b0c6, - 0x2a3705, - 0x2a5406, - 0x2d95c5, - 0x281188, - 0x347207, - 0x2306c6, - 0x287206, - 0x330f08, - 0x2a83c7, - 0x29ed45, - 0x2a2fc8, - 0x3aa048, - 0x390108, - 0x244545, - 0x2f2206, - 0x2bd9c9, - 0x2dec84, - 0x2d944b, - 0x225ecb, - 0x264f89, - 0x226283, - 0x257845, - 0x3ae4c6, - 0x246508, - 0x306ec4, - 0x3ae006, - 0x28ea49, - 0x2c93c5, - 0x2d41c6, - 0x2c1e86, - 0x222dc4, - 0x29958a, - 0x2a3648, - 0x217486, - 0x2cd045, - 0x343d47, - 0x3344c7, - 0x20c204, - 0x226107, - 0x2ba244, - 0x34ce46, - 0x210b43, - 0x26a705, - 0x2b6e45, - 0x23ef88, - 0x27f905, - 0x27aa89, - 0x2a9fc7, - 0x3073cb, - 0x2a9fcc, - 0x2aa5ca, - 0x350107, - 0x203d03, - 0x278808, - 0x244705, - 0x300885, - 0x359904, - 0x21dc06, - 0x27b986, - 0x34c747, - 0x23a80b, - 0x2a3044, - 0x355f44, - 0x2d4444, - 0x2d8ec6, - 0x202804, - 0x222c48, - 0x359705, - 0x21c145, - 0x36b7c7, - 0x288109, - 0x334285, - 0x39110a, - 0x3db9c9, - 0x2b174a, - 0x3cfe49, - 0x3545c4, - 0x31dc05, - 0x2c75c8, - 0x3a34cb, - 0x2dea45, - 0x24c386, - 0x241304, - 0x27afc6, - 0x33bcc9, - 0x2e9ac7, - 0x346d88, - 0x2a94c6, - 0x26c2c7, - 0x281788, - 0x377746, - 0x3c72c4, - 0x3817c7, - 0x382e85, - 0x392987, - 0x267784, - 0x2c0b86, - 0x30ad48, - 0x29ea88, - 0x2ff987, - 0x202808, - 0x29c6c5, - 0x226004, - 0x38f3c8, - 0x202904, - 0x217345, - 0x30af44, - 0x2109c7, - 0x28bdc7, - 0x2823c8, - 0x2dcb06, - 0x27f885, - 0x27a888, - 0x246848, - 0x2a6c09, - 0x2261c6, - 0x22f648, - 0x281d0a, - 0x36f888, - 0x309745, - 0x21b986, - 0x2a7208, - 0x39ba0a, - 0x219507, - 0x285f85, - 0x292c08, - 0x270fc4, - 0x252446, - 0x2cbb48, - 0x3d0d46, - 0x334c08, - 0x2d7ac7, - 0x3c7506, - 0x2c2844, - 0x237687, - 0x2bc004, - 0x33bc87, - 0x367e0d, - 0x237cc5, - 0x2d6b0b, - 0x285606, - 0x251e88, - 0x2427c4, - 0x3c50c6, - 0x27d886, - 0x2d0bc7, - 0x29e10d, - 0x304807, - 0x2bc5c8, - 0x284145, - 0x270648, - 0x2d4a86, - 0x29c748, - 0x238606, - 0x3036c7, - 0x282749, - 0x35a587, - 0x28afc8, - 0x34a005, - 0x22a1c8, - 0x2aef85, - 0x228e05, - 0x362b45, - 0x24dec3, - 0x204584, - 0x292e05, - 0x3a2709, - 0x367906, - 0x2e9788, - 0x2c2105, - 0x2bde47, - 0x371bca, - 0x2d4109, - 0x2e524a, - 0x2dfd48, - 0x22820c, - 0x282f0d, - 0x311883, - 0x334b08, - 0x206245, - 0x2f2d46, - 0x384f06, - 0x31e585, - 0x3de109, - 0x33d2c5, - 0x27a888, - 0x258546, - 0x369706, - 0x2a8cc9, - 0x3a9007, - 0x293506, - 0x371b48, - 0x3bbb48, - 0x2ed607, - 0x2c974e, - 0x2d4cc5, - 0x23b3c5, - 0x3d0c48, - 0x271e87, - 0x200e42, - 0x2c9b84, - 0x36838a, - 0x3077c8, - 0x287b46, - 0x2a0588, - 0x2a5506, + 0x20c483, + 0x2d7789, + 0x29afc9, + 0x2dca46, + 0x2e5145, + 0x2b4448, + 0x2c2f48, + 0x2a3508, + 0x25e04b, + 0x344b47, + 0x3211c9, + 0x29d708, + 0x3505c4, + 0x3d50c8, + 0x295909, + 0x2b8fc5, + 0x229647, + 0x34db05, + 0x289088, + 0x2983cb, + 0x29e790, + 0x2b3e05, + 0x2135cc, + 0x23f585, + 0x25e883, + 0x2b6486, + 0x2ce3c4, + 0x23b686, + 0x2a5407, + 0x203d44, + 0x243208, + 0x20770d, + 0x3224c5, + 0x23e5c4, + 0x2b5684, + 0x2b5689, + 0x2adfc8, + 0x330b47, + 0x2317c8, + 0x289bc8, + 0x282c45, + 0x27ee47, + 0x282bc7, + 0x3559c7, + 0x26ff49, + 0x25e649, + 0x210706, + 0x302d46, + 0x28a946, + 0x326e85, + 0x3c5d04, + 0x3cc9c6, + 0x3d4e86, + 0x282c88, + 0x20d30b, + 0x237647, + 0x21dd04, + 0x361106, + 0x2ec0c7, + 0x2a7a45, + 0x324a85, + 0x267c04, + 0x25e5c6, + 0x3cca48, + 0x287dc9, + 0x261846, + 0x28e108, + 0x23f906, + 0x365f48, + 0x37904c, + 0x282b06, + 0x29f60d, + 0x29fa8b, + 0x2a6105, + 0x25ec87, + 0x2c8286, + 0x3bb788, + 0x210789, + 0x38a7c8, + 0x3d5c05, + 0x20fac7, + 0x288708, + 0x3c7c49, + 0x360e46, + 0x26174a, + 0x3bb508, + 0x38a60b, + 0x22398c, + 0x27d908, + 0x284906, + 0x27e848, + 0x2f3ec7, + 0x347049, + 0x35150d, + 0x29fec6, + 0x30ef48, + 0x2c2909, + 0x2ccd48, + 0x28bbc8, + 0x2cfb4c, + 0x2d0807, + 0x2d31c7, + 0x26fd85, + 0x2c54c7, + 0x2d5848, + 0x31dfc6, + 0x2704cc, + 0x301fc8, + 0x2dd8c8, + 0x23ae06, + 0x2b1f07, + 0x210904, + 0x367848, + 0x28d20c, + 0x29144c, + 0x3e2345, + 0x3dcd47, + 0x389ec6, + 0x2b1e86, + 0x2bcb08, + 0x21b284, + 0x2671cb, + 0x28d94b, + 0x2ff2c6, + 0x207587, + 0x3572c5, + 0x2781c5, + 0x267306, + 0x259285, + 0x248a05, + 0x2d65c7, + 0x2b2789, + 0x273cc4, + 0x23d405, + 0x2f8ac5, + 0x358908, + 0x2bf505, + 0x2d1d09, + 0x39e2c7, + 0x39e2cb, + 0x2fd706, + 0x23f009, + 0x389d08, + 0x3ae7c5, + 0x355ac8, + 0x25e688, + 0x286407, + 0x2b5a87, + 0x38fcc9, + 0x274147, + 0x295c49, + 0x2d11cc, + 0x2dca48, + 0x2c0dc9, + 0x2c4d07, + 0x289c89, + 0x367207, + 0x223a88, + 0x358d45, + 0x2f3446, + 0x2d01c8, + 0x21c488, + 0x2d7489, + 0x248a47, + 0x278bc5, + 0x3cde49, + 0x2fde86, + 0x297b84, + 0x33ff06, + 0x26ad88, + 0x2e6587, + 0x20d508, + 0x26b3c9, + 0x3a1a87, + 0x2a3646, + 0x25ed44, + 0x2e5fc9, + 0x27ecc8, + 0x23acc7, + 0x2702c6, + 0x20d246, + 0x3473c4, + 0x26b5c6, + 0x205943, + 0x330209, + 0x330646, + 0x2a4905, + 0x2a6ec6, + 0x2db905, 0x288b88, - 0x2b52c8, - 0x228dc4, - 0x2be205, - 0x668c84, - 0x668c84, - 0x668c84, - 0x20aec3, - 0x215a06, - 0x27ad46, - 0x2a458c, - 0x202dc3, - 0x267786, - 0x21a604, - 0x281488, - 0x28e885, - 0x368486, - 0x2c6d08, - 0x2e0e46, - 0x230646, - 0x3c5608, - 0x2da147, - 0x263f49, - 0x3ae60a, - 0x266644, - 0x29d485, - 0x2e4305, - 0x2d7746, - 0x361ac6, - 0x2a50c6, - 0x3dc246, - 0x264084, - 0x26408b, - 0x264a44, - 0x244285, - 0x2b3a45, - 0x288486, - 0x201b48, - 0x282dc7, - 0x32b044, - 0x25b603, - 0x270ac5, - 0x37b307, - 0x282ccb, - 0x23ee87, - 0x2c6c08, - 0x2be347, - 0x26b746, - 0x25d588, - 0x2c51cb, - 0x301506, - 0x212849, - 0x2c5345, - 0x31f203, - 0x2d41c6, - 0x2d79c8, - 0x20c2c3, - 0x24c343, - 0x281786, - 0x2a5506, - 0x3759ca, - 0x27cc45, - 0x27d6cb, - 0x2a534b, - 0x213c03, - 0x20ea43, - 0x2ba1c4, - 0x370587, - 0x277d04, - 0x281484, - 0x2bb8c4, - 0x36fb88, - 0x2ccf88, - 0x214d49, - 0x2d7588, - 0x3b2d07, - 0x245806, - 0x2e93cf, - 0x2d4e06, - 0x2df404, - 0x2ccdca, - 0x37b207, - 0x2bc106, - 0x292a49, - 0x214cc5, - 0x23f0c5, - 0x214e06, - 0x22a303, - 0x271009, - 0x21db06, - 0x34c2c9, - 0x391686, - 0x26a705, - 0x35c905, - 0x204583, - 0x3706c8, - 0x32b787, - 0x3de2c4, - 0x281308, - 0x371dc4, - 0x359006, - 0x2bf706, - 0x23d646, - 0x2d9e09, - 0x300805, - 0x29ee06, - 0x2713c9, - 0x2d3e06, - 0x2e94c6, - 0x3a14c6, - 0x22bd85, - 0x30af46, - 0x3036c4, - 0x33a345, - 0x217484, - 0x2bcf46, - 0x298ac4, - 0x2109c3, - 0x285c05, - 0x233d88, - 0x3572c7, - 0x306f49, - 0x285e88, - 0x29f751, - 0x2c1f0a, - 0x2fcf07, - 0x357e46, - 0x21a604, - 0x2ca648, - 0x2ea008, - 0x29f90a, - 0x2cefcd, - 0x2a6dc6, - 0x3c5706, - 0x237746, - 0x21c147, - 0x2bc685, - 0x286c47, - 0x2813c5, - 0x2baf04, - 0x3c5e46, - 0x224dc7, - 0x270d0d, - 0x2a7147, - 0x37ef48, - 0x27ab89, - 0x21b886, - 0x35bb05, - 0x23c2c4, - 0x2af546, - 0x20c106, - 0x307946, - 0x2a0e08, - 0x21ad83, - 0x2465c3, - 0x349b05, - 0x31ec06, - 0x2b5285, - 0x2a96c8, - 0x2a3d8a, - 0x347344, - 0x281488, - 0x299408, - 0x2882c7, - 0x286589, - 0x2c6908, - 0x280747, - 0x2bbb46, - 0x3d0d4a, - 0x2af5c8, - 0x30c989, - 0x2b23c8, - 0x21ef89, - 0x357d07, - 0x312785, - 0x2a5906, - 0x2b9808, - 0x252008, - 0x224508, - 0x222dc8, - 0x244285, - 0x200d04, - 0x232708, - 0x241084, - 0x3cfc44, - 0x26a705, - 0x2949c7, - 0x287ec9, - 0x2d09c7, - 0x20f8c5, - 0x277b06, - 0x36f1c6, - 0x201c44, - 0x2a9006, - 0x27db04, - 0x291746, - 0x287c86, - 0x212e86, - 0x3c8785, - 0x2a9587, - 0x203d03, - 0x211609, - 0x330d08, - 0x2805c4, - 0x2805cd, - 0x29eb88, - 0x32a608, - 0x30c906, + 0x33f3c7, + 0x23bb46, + 0x25de86, + 0x31cd48, + 0x2aa787, + 0x29ff05, + 0x2a41c8, + 0x3b1b88, + 0x3bb508, + 0x23f445, + 0x2f34c6, + 0x32e249, + 0x3c2784, + 0x2db78b, + 0x22694b, + 0x2ef609, + 0x2059c3, + 0x257b05, + 0x2ef4c6, + 0x241f88, + 0x30a604, + 0x31a546, + 0x2ad8c9, + 0x2ce1c5, + 0x2d6506, + 0x2eed46, + 0x203f44, + 0x29a14a, + 0x2a4848, + 0x21c486, + 0x375c45, + 0x357147, + 0x33a2c7, + 0x21f744, + 0x226b87, + 0x2bffc4, + 0x369146, + 0x207883, + 0x26ff45, + 0x2ba485, + 0x25b688, + 0x287005, 0x282849, - 0x2d4109, - 0x33b9c5, - 0x2a3e8a, - 0x291aca, - 0x2b444c, - 0x2b45c6, - 0x278406, - 0x2d5686, - 0x38ce89, - 0x2f2f86, - 0x21dd86, - 0x33d386, - 0x307588, - 0x202806, - 0x2de54b, - 0x294b45, - 0x21c145, - 0x279485, - 0x203e06, - 0x226043, - 0x23d5c6, - 0x2a70c7, - 0x2ca505, - 0x2d1c05, - 0x3b1385, - 0x310686, - 0x32fa44, - 0x32fa46, - 0x2ab289, - 0x203c8c, - 0x2bac48, - 0x22b284, - 0x30ac46, - 0x285706, - 0x2d79c8, - 0x2bbc48, - 0x203b89, - 0x343d47, - 0x356589, - 0x2726c6, - 0x22c144, - 0x2082c4, - 0x27f6c4, - 0x281788, - 0x287d0a, - 0x334206, - 0x3677c7, - 0x392c07, - 0x244205, - 0x36c944, - 0x28fe06, - 0x2bc6c6, - 0x21d2c3, - 0x330b47, - 0x20d088, - 0x33bb0a, - 0x22be48, - 0x20ad88, - 0x298b05, - 0x2a49c5, - 0x3564c5, - 0x2445c6, - 0x247486, - 0x33c885, - 0x32aec9, - 0x36c74c, - 0x2f4ec7, - 0x29f988, - 0x2521c5, - 0x668c84, - 0x265444, - 0x2d6e44, - 0x218706, - 0x2a650e, - 0x23f147, + 0x2abc07, + 0x36768b, + 0x2abc0c, + 0x2ac20a, + 0x3513c7, + 0x203843, + 0x280d88, + 0x23f605, + 0x3025c5, + 0x35f284, + 0x223986, + 0x283746, + 0x26b607, + 0x3a9d8b, + 0x218e84, + 0x309d04, + 0x2d6784, + 0x2db206, + 0x203d44, + 0x21e488, + 0x35f085, + 0x21a245, + 0x2a3447, + 0x25ed89, + 0x33a085, + 0x39690a, + 0x2d5ac9, + 0x2aceca, + 0x3da249, + 0x354004, + 0x2cedc5, + 0x2c99c8, + 0x3aaacb, + 0x313005, + 0x2ecd46, + 0x241c04, + 0x282d86, + 0x3a1909, + 0x2ec1c7, + 0x33ef48, + 0x297706, + 0x3c9f87, + 0x289188, + 0x37c006, + 0x3d5e84, + 0x386b47, + 0x388705, + 0x398187, + 0x29f484, + 0x2c8206, + 0x30ca48, + 0x29fc48, + 0x33dec7, + 0x3801c8, + 0x29dec5, + 0x205804, + 0x377288, + 0x3802c4, 0x21c345, - 0x2dec0c, - 0x310b07, - 0x224d47, - 0x226fc9, - 0x219e49, - 0x285f85, - 0x330d08, - 0x2bd9c9, - 0x38ffc5, - 0x2ca448, - 0x2c0886, - 0x38f646, - 0x202c44, - 0x28ee48, - 0x21ba43, - 0x215604, - 0x270b45, - 0x396f07, - 0x2c2605, - 0x281bc9, - 0x2a118d, - 0x2b3046, - 0x3df784, - 0x3b9d08, - 0x20e7ca, - 0x21c847, - 0x367d45, - 0x215643, - 0x2a550e, - 0x3707cc, - 0x30b147, - 0x2a66c7, - 0x443960c7, - 0xaf286, - 0x647c4, - 0x203083, - 0x2f2fc5, - 0x2d6e45, - 0x2a0948, - 0x29dc09, - 0x22b186, - 0x277d04, - 0x2fce46, - 0x331bcb, - 0x2e844c, - 0x24df87, - 0x2de805, - 0x3a9f48, - 0x2ed3c5, - 0x2ccdc7, - 0x2f4cc7, - 0x245fc5, - 0x226043, - 0x20c584, - 0x2e4205, - 0x269e05, - 0x269e06, - 0x2a9dc8, - 0x224dc7, - 0x385206, - 0x33a686, - 0x362a86, - 0x225249, - 0x2d0f87, - 0x250f86, - 0x2e85c6, - 0x276d06, - 0x2b0ac5, - 0x20a586, - 0x39b0c5, - 0x28d808, - 0x29428b, - 0x28fb46, - 0x392c44, - 0x304e49, - 0x2a9fc4, - 0x2c0808, - 0x30e907, - 0x283ec4, - 0x2c5dc8, - 0x2cb5c4, - 0x2b0b04, - 0x274785, - 0x318886, - 0x36fac7, - 0x23db43, - 0x2a4d85, - 0x2fd1c4, - 0x23b406, - 0x33ba48, - 0x202705, - 0x293f49, - 0x350105, - 0x267788, - 0x21a4c7, - 0x32b1c8, - 0x2c5a07, - 0x241889, - 0x280886, - 0x33e906, - 0x2a78c4, - 0x355e85, - 0x31320c, - 0x279487, - 0x279c87, - 0x361708, - 0x2b3046, - 0x2a7004, - 0x34b0c4, - 0x389409, - 0x2d5786, - 0x270507, - 0x2d0804, - 0x326b06, - 0x38a805, - 0x2dc647, - 0x2de4c6, - 0x251249, - 0x2f0387, - 0x29bc87, - 0x2a8b46, - 0x326a45, - 0x27f408, - 0x21d988, - 0x245a06, - 0x202745, - 0x2cca86, - 0x20af03, - 0x2a07c9, - 0x2a4e4e, - 0x2c5748, - 0x371ec8, - 0x24580b, - 0x294186, - 0x385544, - 0x230644, - 0x2a4f4a, - 0x211987, + 0x30cc44, + 0x20ef87, + 0x291ac7, + 0x289dc8, + 0x2def06, + 0x286f85, + 0x282648, + 0x37e848, + 0x2a9449, + 0x226c46, + 0x2311c8, + 0x28970a, + 0x2a7ac8, + 0x308c85, + 0x22d9c6, + 0x2a9a48, + 0x20fb8a, + 0x265587, + 0x28e745, + 0x297d88, + 0x2b3a44, + 0x253786, + 0x2d3548, + 0x205886, + 0x33aa08, + 0x2d9e07, + 0x203686, + 0x2c9144, + 0x26a4c7, + 0x2c3304, + 0x3a18c7, + 0x23b00d, + 0x239945, + 0x2d8e4b, + 0x2916c6, + 0x252f48, + 0x2431c4, + 0x3c0706, + 0x285346, + 0x27eb87, + 0x29f2cd, + 0x305587, + 0x2c3b48, + 0x28bd45, + 0x296c88, + 0x2d6dc6, + 0x29df48, + 0x38ecc6, + 0x3b3a07, + 0x28a149, + 0x35fe07, + 0x290348, + 0x34c1c5, + 0x22bc48, + 0x2b1dc5, + 0x2d6d05, + 0x37d145, + 0x24dc03, + 0x208084, + 0x297f85, + 0x3a9a89, + 0x36ec46, + 0x2ebe88, + 0x2eefc5, + 0x2c5387, + 0x2e0fca, + 0x2d6449, + 0x2d540a, + 0x2e1f08, + 0x22830c, + 0x28a90d, + 0x314e43, + 0x33a908, + 0x20b305, + 0x2f4006, + 0x3ccfc6, + 0x2d2405, + 0x355449, + 0x348ec5, + 0x282648, + 0x258946, + 0x370286, + 0x2ab089, + 0x3b0b47, + 0x298686, + 0x2e0f48, + 0x3d5388, + 0x2efec7, + 0x2cf3ce, + 0x2d7005, + 0x3c7b45, + 0x205788, + 0x36f947, + 0x20d282, + 0x2cf804, + 0x23b58a, + 0x23ad88, + 0x25e7c6, + 0x2a1848, + 0x2a6fc6, + 0x25f708, + 0x2b8cc8, + 0x30b3c4, + 0x2c5745, + 0x602284, + 0x602284, + 0x602284, + 0x207783, + 0x20d0c6, + 0x282b06, + 0x2a5dcc, + 0x202503, + 0x2d75c6, + 0x207844, + 0x288e88, + 0x2ad705, + 0x23b686, + 0x2cc888, + 0x2e3246, + 0x23bac6, + 0x203d48, + 0x2dc487, + 0x273f09, + 0x3df7ca, + 0x26dbc4, + 0x295d45, + 0x2b7645, + 0x2d9a86, + 0x23e5c6, + 0x2a5b46, + 0x3d3f06, + 0x274044, + 0x27404b, + 0x266cc4, + 0x23f185, + 0x2b7cc5, + 0x3aa046, + 0x209648, + 0x28a7c7, + 0x3305c4, + 0x213c03, + 0x2b3545, + 0x33fdc7, + 0x28a6cb, + 0x25b587, + 0x2cc788, + 0x2c5887, + 0x2715c6, + 0x25c348, + 0x2cad4b, + 0x34e2c6, + 0x214a09, + 0x2caec5, + 0x325343, + 0x2d6506, + 0x2d9d08, + 0x215203, + 0x2a11c3, + 0x289186, + 0x2a6fc6, + 0x379eca, + 0x284945, + 0x28518b, + 0x2a6e0b, + 0x2163c3, + 0x206743, + 0x2bff44, + 0x2e0e07, + 0x27d904, + 0x25ef44, + 0x2c2bc4, + 0x2a7dc8, + 0x375b88, + 0x20c409, + 0x2d98c8, + 0x37d3c7, + 0x24bc06, + 0x2ebacf, + 0x2d7146, + 0x2e15c4, + 0x3759ca, + 0x33fcc7, + 0x2c3406, + 0x297bc9, + 0x20c385, + 0x25b7c5, + 0x20c4c6, + 0x22bd83, + 0x2b3a89, + 0x223886, + 0x26b189, + 0x396e86, + 0x26ff45, + 0x361bc5, + 0x206643, + 0x3131c8, + 0x330d07, + 0x355604, + 0x288d08, + 0x2e11c4, + 0x31c046, + 0x2b6486, + 0x23d846, + 0x2dc149, + 0x302545, + 0x29ffc6, + 0x277389, + 0x2d6146, + 0x2a7e46, + 0x3a8b46, + 0x22e405, + 0x30cc46, + 0x3b3a04, + 0x358d45, + 0x21c484, + 0x2c45c6, + 0x273404, + 0x207a43, + 0x28e3c5, + 0x234f88, + 0x366a47, + 0x30a689, + 0x28e648, + 0x2a0951, + 0x2eedca, + 0x2ff207, + 0x3d8686, + 0x207844, + 0x2d02c8, + 0x2e2e88, + 0x2a0b0a, + 0x2d1acd, + 0x2a9606, + 0x203e46, + 0x26a586, + 0x21a247, + 0x2c3c05, + 0x35c6c7, + 0x207705, + 0x39e404, + 0x206686, + 0x30ec47, + 0x2b378d, + 0x2a9987, + 0x344fc8, + 0x282949, + 0x22d8c6, + 0x360dc5, + 0x2393c4, + 0x26ae86, + 0x21f646, + 0x23af06, + 0x2a20c8, + 0x22cdc3, + 0x23e443, + 0x34bcc5, + 0x2d2a86, + 0x2b8c85, + 0x297908, + 0x2a55ca, + 0x33f504, + 0x288e88, + 0x299fc8, + 0x25ef47, + 0x28ed49, + 0x2cc488, + 0x287e47, + 0x2c2e46, + 0x20588a, + 0x26af08, + 0x32df09, + 0x2ae088, + 0x224a09, + 0x3d8547, + 0x35ce45, + 0x2a73c6, + 0x31de48, + 0x2530c8, + 0x2bbfc8, + 0x21e608, + 0x23f185, + 0x200d04, + 0x233908, + 0x241984, + 0x3da044, + 0x26ff45, + 0x2997c7, + 0x25eb49, + 0x27e987, + 0x2260c5, + 0x27d706, + 0x375446, + 0x209744, + 0x2ab3c6, + 0x2855c4, + 0x293ec6, + 0x25e906, + 0x215046, + 0x3d5c05, + 0x2977c7, + 0x203843, + 0x22b509, + 0x31cb48, + 0x287cc4, + 0x287ccd, + 0x29fd48, + 0x2fcd48, + 0x32de86, + 0x28a249, + 0x2d6449, + 0x3a1605, + 0x2a56ca, + 0x2a844a, + 0x2b5c8c, + 0x2b5e06, + 0x280986, + 0x2d79c6, + 0x393189, + 0x2f4246, + 0x223b06, + 0x348f86, + 0x367848, + 0x37e646, + 0x2e094b, + 0x299945, + 0x21a245, + 0x281485, + 0x3b5146, + 0x205843, + 0x23d7c6, + 0x2a9907, + 0x2d0185, + 0x27fbc5, + 0x2c12c5, + 0x301c46, + 0x336144, + 0x336146, + 0x2a9e49, + 0x3b4fcc, + 0x39e148, + 0x2520c4, + 0x30c946, + 0x2917c6, + 0x2d9d08, + 0x2c2f48, + 0x3b4ec9, + 0x357147, + 0x237809, + 0x278286, + 0x22c544, + 0x20af04, + 0x286dc4, + 0x289188, + 0x25e98a, + 0x33a006, + 0x36eb07, + 0x398407, + 0x23f105, + 0x2b7604, + 0x2958c6, + 0x2c3c46, + 0x21b2c3, + 0x31c987, + 0x2205c8, + 0x3a174a, + 0x22e4c8, + 0x34df48, + 0x273445, + 0x2a6205, + 0x237745, + 0x23f4c6, + 0x242546, + 0x25d405, + 0x330449, + 0x2b740c, + 0x307d87, + 0x2a0b88, 0x251045, - 0x212849, - 0x2c9685, - 0x3cfc87, - 0x2305c4, - 0x3c7b07, - 0x318988, - 0x2d4906, - 0x2c0d09, - 0x2c6a0a, - 0x211906, - 0x29e6c6, - 0x2b39c5, - 0x398545, - 0x36ac07, - 0x245608, - 0x38a748, - 0x228dc6, - 0x35c985, - 0x36184e, - 0x2c70c4, - 0x245985, - 0x277489, - 0x2eab08, - 0x28e286, - 0x2a2acc, - 0x2a3990, - 0x2a614f, - 0x2a8148, - 0x350107, - 0x3c8785, - 0x292e05, - 0x36f949, - 0x292e09, - 0x2cfe06, - 0x2deac7, - 0x355d85, - 0x237c49, - 0x35e486, - 0x2f2dcd, - 0x27f589, - 0x281484, - 0x2c54c8, - 0x2327c9, - 0x3343c6, - 0x278a05, - 0x33e906, - 0x346c49, - 0x2d0688, - 0x206a05, - 0x281e04, - 0x2a2c8b, - 0x334285, - 0x246586, - 0x283246, - 0x3b4246, - 0x2875cb, - 0x294049, - 0x33a5c5, - 0x393807, - 0x2c1e86, - 0x231f46, - 0x281a88, - 0x224f09, - 0x37ed0c, - 0x37b108, - 0x31aac6, - 0x32dc83, - 0x22f306, - 0x241745, - 0x27e208, - 0x3d9d46, - 0x2dc888, - 0x380445, + 0x602284, + 0x267c84, + 0x2d9184, + 0x212d06, + 0x2a8d0e, + 0x25b847, + 0x21a445, + 0x3c270c, + 0x3d2347, + 0x30ebc7, + 0x30f7c9, + 0x221a89, + 0x28e745, + 0x31cb48, + 0x32e249, + 0x3bb3c5, + 0x2d00c8, + 0x2c1006, + 0x377506, + 0x2463c4, + 0x294908, + 0x204883, + 0x20ccc4, + 0x2b35c5, + 0x39db87, + 0x2e5e45, + 0x2895c9, + 0x29664d, + 0x2af506, + 0x213c44, + 0x36ee08, + 0x2b25ca, + 0x2144c7, + 0x34bb05, + 0x20cd03, + 0x2a6fce, + 0x3132cc, + 0x30ce47, + 0x2a8ec7, + 0x4539cd47, + 0xb20c6, + 0x27c44, + 0x215d03, + 0x2f4285, + 0x2d9185, + 0x2a1c08, + 0x29edc9, + 0x251fc6, + 0x27d904, + 0x2ff146, + 0x2398cb, + 0x2eab4c, + 0x24dcc7, + 0x2e0c05, + 0x3b1a88, + 0x2efc85, + 0x3759c7, + 0x307b87, + 0x2475c5, + 0x205843, + 0x21fac4, + 0x2e6445, + 0x273bc5, + 0x273bc6, + 0x2a2608, + 0x30ec47, + 0x3cd2c6, + 0x3472c6, + 0x37d086, + 0x30f0c9, + 0x27ef47, + 0x251e46, + 0x2eacc6, + 0x3cae06, + 0x2b4385, + 0x20e046, + 0x3b3245, + 0x2bf588, + 0x29940b, + 0x295606, + 0x398444, + 0x305bc9, + 0x2abc04, + 0x2c0f88, + 0x3116c7, + 0x28bac4, + 0x2cb948, + 0x2d1604, + 0x2b43c4, + 0x27a345, + 0x322506, + 0x2a7d07, + 0x249b03, + 0x2a3705, + 0x2ff4c4, + 0x3c7b86, + 0x3a1688, + 0x37e545, + 0x2990c9, + 0x3513c5, + 0x323488, + 0x2bc807, + 0x330748, + 0x2cb587, + 0x2fdb49, + 0x287f86, + 0x372946, + 0x29b284, + 0x309c45, + 0x31520c, + 0x281487, + 0x282047, + 0x23e208, + 0x2af506, + 0x2a9844, + 0x34a144, + 0x38fb49, + 0x2d7ac6, + 0x296b47, + 0x27e7c4, + 0x2ab4c6, + 0x3c1685, + 0x2dea47, + 0x2e08c6, + 0x261609, + 0x39b307, + 0x29d487, + 0x2aaf06, + 0x270205, + 0x286b08, + 0x223708, + 0x371f86, + 0x37e585, + 0x2e93c6, + 0x203803, + 0x2a1a89, + 0x2a58ce, + 0x2cb2c8, + 0x2e12c8, + 0x371d8b, + 0x299306, + 0x398304, + 0x23bac4, + 0x2a59ca, + 0x2134c7, + 0x251f05, + 0x214a09, + 0x2cf305, + 0x3da087, + 0x232144, + 0x204787, + 0x322608, + 0x2d6c46, + 0x2c8389, + 0x2cc58a, + 0x213446, + 0x29f886, + 0x2b7c45, + 0x39f685, + 0x37d947, + 0x246d48, + 0x3c15c8, + 0x30b3c6, + 0x361c45, + 0x23e34e, + 0x2ccc44, + 0x2a1b85, + 0x27d089, + 0x2f7588, + 0x2931c6, + 0x2a3ccc, + 0x2a51d0, + 0x2a894f, + 0x2aa508, + 0x3513c7, + 0x3d5c05, + 0x297f85, + 0x2a7b89, + 0x297f89, + 0x27ddc6, + 0x313087, + 0x309b45, + 0x337c49, + 0x363386, + 0x2f408d, + 0x286c89, + 0x25ef44, + 0x2cb048, + 0x2339c9, + 0x33a1c6, + 0x280f85, + 0x372946, + 0x33ee09, + 0x27e648, + 0x210ec5, + 0x289804, + 0x2a3e8b, + 0x33a085, + 0x242006, + 0x28ac46, + 0x22a986, + 0x25e24b, + 0x2991c9, + 0x347205, + 0x399007, + 0x2eed46, + 0x233086, + 0x289488, + 0x30ed89, + 0x344d8c, + 0x33fbc8, + 0x31e806, + 0x333e83, + 0x360186, + 0x2b58c5, + 0x285cc8, + 0x3e21c6, + 0x2dec88, + 0x24be05, + 0x293f85, + 0x2c0b88, + 0x3d5247, + 0x3ccf07, + 0x26b607, + 0x31fc48, + 0x2d9b88, + 0x2e2d86, + 0x2c4407, + 0x34d947, + 0x2b578a, + 0x238643, + 0x3b5146, + 0x23e2c5, + 0x215cc4, + 0x282949, + 0x2fdac4, + 0x2cbd84, + 0x2a3944, + 0x2a8ecb, + 0x330c47, + 0x23e585, + 0x29dbc8, + 0x27d706, + 0x27d708, + 0x284886, + 0x294845, + 0x294b05, + 0x296086, + 0x2971c8, + 0x297b08, + 0x282b06, + 0x29da0f, + 0x2a1550, + 0x205385, + 0x203843, + 0x22c605, + 0x321108, + 0x297e89, + 0x3bb508, + 0x312e88, + 0x385808, + 0x330d07, + 0x27d3c9, + 0x2dee88, + 0x2a4f84, + 0x2a37c8, + 0x3589c9, + 0x2c4a07, + 0x395d44, + 0x27ea48, + 0x29758a, + 0x2ff746, + 0x2a9606, + 0x226b09, + 0x2a5407, + 0x2dbfc8, + 0x2321c8, + 0x347988, + 0x259805, + 0x21ce85, + 0x21a245, + 0x2d9145, + 0x2c2747, + 0x205845, + 0x2d0185, + 0x203546, + 0x3bb447, + 0x3aaa07, + 0x297886, + 0x2e2445, + 0x242006, + 0x280e45, + 0x2c7d08, + 0x309ac4, + 0x2d61c6, + 0x353544, + 0x2cb748, + 0x32288a, + 0x28328c, + 0x2a6505, + 0x21a306, + 0x344f46, + 0x348d86, + 0x31e884, + 0x3cd585, + 0x284147, + 0x2a5489, + 0x2db647, + 0x602284, + 0x602284, + 0x330ac5, + 0x2dfe04, + 0x2a328a, + 0x27d586, + 0x2c0b04, + 0x3dccc5, + 0x2c1d85, + 0x2c3b44, + 0x28a887, + 0x3cdfc7, + 0x2db208, + 0x2e94c8, + 0x210ec9, + 0x388d08, + 0x29048b, + 0x2a7cc4, + 0x233185, + 0x38ff05, + 0x26b589, + 0x30ed89, + 0x305ac8, + 0x368f48, + 0x2e6bc4, 0x291805, - 0x21a608, - 0x3bba07, - 0x384e47, - 0x34c747, - 0x302a48, - 0x2d7848, - 0x2e9f06, - 0x2bcd87, - 0x21f707, - 0x2b3f4a, - 0x2168c3, - 0x203e06, - 0x22b3c5, - 0x213504, - 0x27ab89, - 0x241804, - 0x204844, - 0x2a4204, - 0x2a66cb, - 0x32b6c7, - 0x310645, - 0x29c3c8, - 0x277b06, - 0x277b08, - 0x27cb86, - 0x28ed85, - 0x28f045, - 0x290746, - 0x292408, - 0x292988, - 0x27ad46, - 0x29c20f, - 0x2a0290, - 0x3d0845, - 0x203d03, - 0x22c205, - 0x31bd08, - 0x292d09, - 0x390108, - 0x2de8c8, - 0x235288, - 0x32b787, - 0x2777c9, - 0x2dca88, - 0x291004, - 0x2a4088, - 0x35ab89, - 0x2bd387, - 0x34de44, - 0x2d0a88, - 0x2a934a, - 0x2fd446, - 0x2a6dc6, - 0x226089, - 0x2a3bc7, - 0x2d9c88, - 0x21fd08, - 0x33ad48, - 0x24ef85, - 0x3d3205, - 0x21c145, - 0x2d6e05, - 0x2bb447, - 0x226045, - 0x2ca505, - 0x3dde06, - 0x390047, - 0x3a3407, - 0x2a9646, - 0x2e0285, - 0x246586, - 0x241985, - 0x2c4d88, - 0x355d04, - 0x2d3e86, - 0x324604, - 0x2c5bc8, - 0x318c0a, - 0x27b4cc, - 0x23aa05, - 0x21c206, - 0x37eec6, - 0x202586, - 0x31ab44, - 0x3b9a05, - 0x27c447, - 0x2a3c49, - 0x2d9307, - 0x668c84, - 0x668c84, - 0x32b545, - 0x2dda04, - 0x2a204a, - 0x277986, - 0x2bd7c4, - 0x3c2d85, - 0x3bd405, - 0x2bc5c4, - 0x282e87, - 0x3c3a87, - 0x2d8ec8, - 0x26d5c8, - 0x206a09, - 0x372488, - 0x2a220b, - 0x2acc44, - 0x232045, - 0x3897c5, - 0x34c6c9, - 0x224f09, - 0x304d48, - 0x34cc48, - 0x288484, - 0x285745, - 0x2041c3, - 0x2d7705, - 0x29ee86, - 0x29da4c, - 0x20c006, - 0x278906, - 0x28e505, - 0x310708, - 0x2e86c6, - 0x357fc6, - 0x2a6dc6, - 0x22bbcc, - 0x389884, - 0x362bca, - 0x28e448, - 0x29d887, - 0x2fd0c6, - 0x22b247, - 0x2fca45, - 0x367a06, - 0x35ee86, - 0x372987, - 0x2c6704, - 0x210ac5, - 0x277484, - 0x2baf87, - 0x2776c8, - 0x27828a, - 0x280b87, - 0x2aa847, - 0x350087, - 0x2ed509, - 0x29da4a, - 0x22c103, - 0x357285, - 0x212ec3, - 0x2bb909, - 0x2d7c08, - 0x372247, - 0x390209, - 0x21da86, - 0x339f88, - 0x395385, - 0x24694a, - 0x343809, - 0x370209, - 0x3db607, - 0x2ea109, - 0x212d88, - 0x288d86, - 0x21c3c8, - 0x2d1f47, - 0x264187, - 0x3db9c7, - 0x2daf48, - 0x30aac6, - 0x2a9105, - 0x27c447, - 0x29e1c8, - 0x362a04, - 0x306044, - 0x293407, - 0x2b5647, - 0x2bd84a, - 0x288d06, - 0x32eeca, - 0x2c9ac7, - 0x2c6e87, - 0x210b84, - 0x29d444, - 0x2dc546, - 0x35c184, - 0x35c18c, - 0x30e845, - 0x2172c9, - 0x2ef004, - 0x2bc685, - 0x20e748, - 0x292a45, - 0x391106, - 0x292f44, - 0x2acb4a, - 0x2ef646, - 0x255fca, - 0x3d0007, - 0x215f85, - 0x22a305, - 0x24424a, - 0x292585, - 0x2a6cc6, - 0x241084, - 0x2ba346, - 0x36acc5, - 0x3d9e06, - 0x2ff98c, - 0x2e18ca, - 0x291bc4, - 0x245806, - 0x2a3bc7, - 0x2de444, - 0x307588, - 0x24c286, - 0x392a89, - 0x2c8349, - 0x341189, - 0x2d9606, - 0x2d2046, - 0x21c507, - 0x32ae08, - 0x2d1e49, - 0x32b6c7, - 0x29c546, - 0x26c347, - 0x237605, - 0x2c70c4, - 0x21c0c7, - 0x21f8c5, - 0x28a2c5, + 0x204083, + 0x2d9a45, + 0x2a0046, + 0x29ec0c, + 0x21f546, + 0x280e86, + 0x293445, + 0x301cc8, + 0x2eadc6, + 0x3d8806, + 0x2a9606, + 0x22e24c, + 0x38ffc4, + 0x37d1ca, + 0x293388, + 0x29ea47, + 0x2ff3c6, + 0x252087, + 0x2fed45, + 0x2702c6, + 0x363d86, + 0x377987, + 0x2cc284, + 0x20f085, + 0x27d084, + 0x39e487, + 0x27d2c8, + 0x28080a, + 0x288587, + 0x2ac487, + 0x351347, + 0x2efdc9, + 0x29ec0a, + 0x22c503, + 0x366a05, + 0x215083, + 0x2c2c09, + 0x2d9f48, + 0x388ac7, + 0x3bb609, + 0x223806, + 0x358e08, + 0x3c4b45, + 0x37e94a, + 0x2079c9, + 0x29c289, + 0x2d5707, + 0x2e2f89, + 0x214f48, + 0x25f906, + 0x21a4c8, + 0x27ff07, + 0x274147, + 0x2d5ac7, + 0x2dd548, + 0x30c7c6, + 0x297345, + 0x284147, + 0x29f388, + 0x37d004, + 0x306dc4, + 0x298587, + 0x2b9047, + 0x32e0ca, + 0x25f886, + 0x3c82ca, + 0x2cf747, + 0x2cca07, + 0x20f144, + 0x295d04, + 0x2de946, + 0x361444, + 0x36144c, + 0x311605, + 0x21c2c9, + 0x2f0e84, + 0x2c3c05, + 0x2b2548, + 0x297bc5, + 0x396906, + 0x2980c4, + 0x2ab98a, + 0x384806, + 0x24774a, + 0x3da407, + 0x20d645, + 0x22bd85, + 0x23f14a, + 0x247685, + 0x2a7b46, + 0x241984, + 0x2c00c6, + 0x37da05, + 0x3e2286, + 0x33decc, + 0x2e3cca, + 0x2a8544, + 0x24bc06, + 0x2a5407, + 0x2e0844, + 0x367848, + 0x2ecc46, + 0x398289, + 0x2cd009, + 0x2dcb49, + 0x2db946, + 0x280006, + 0x21a607, + 0x330388, + 0x27fe09, + 0x330c47, + 0x29dd46, + 0x3ca007, + 0x26a445, + 0x2ccc44, + 0x21a1c7, + 0x34db05, + 0x28f645, 0x200cc7, - 0x245e88, - 0x3a9ec6, - 0x29f00d, - 0x2a0b4f, - 0x2a534d, - 0x202d84, - 0x233e86, - 0x2e1c88, - 0x33d345, - 0x2b4108, - 0x252f0a, - 0x281484, - 0x331e06, - 0x2abe07, - 0x2b7d47, - 0x2da209, - 0x21c385, - 0x2bc5c4, - 0x2be14a, - 0x2c64c9, - 0x2ea207, - 0x30b706, - 0x3343c6, - 0x285686, - 0x381886, - 0x2e158f, - 0x2e1b49, - 0x202806, - 0x389046, - 0x297e89, - 0x2bce87, - 0x2146c3, - 0x22bd46, - 0x212503, - 0x31e448, - 0x26c187, - 0x2a8349, - 0x2bf588, - 0x384f88, - 0x33c506, - 0x20bf49, - 0x2f4e05, - 0x22f244, - 0x312847, - 0x38cf05, - 0x202d84, - 0x361b48, - 0x211c44, - 0x2bcbc7, - 0x36c106, - 0x263645, - 0x2b23c8, - 0x33428b, - 0x331207, - 0x2444c6, - 0x2d4e84, - 0x3854c6, - 0x26a705, - 0x21f8c5, - 0x27f189, - 0x282a89, - 0x2641c4, - 0x264205, - 0x245845, - 0x2467c6, - 0x330e08, - 0x2c8e86, - 0x20cecb, - 0x3bc9ca, - 0x2c5b05, - 0x28f0c6, - 0x23eb85, - 0x24a285, - 0x292647, - 0x204088, - 0x292484, - 0x37fb46, - 0x292a06, - 0x212f47, - 0x31f1c4, - 0x27d886, - 0x3c2245, - 0x3c2249, - 0x2d2244, - 0x36cac9, - 0x27ad46, - 0x2cac48, - 0x245845, - 0x392d05, - 0x3d9e06, - 0x37ec09, - 0x219e49, - 0x278986, - 0x2eac08, - 0x2a12c8, - 0x23eb44, - 0x2be9c4, - 0x2be9c8, - 0x3b2b88, - 0x356689, - 0x29ee06, - 0x2a6dc6, - 0x33384d, - 0x3ae006, - 0x3218c9, - 0x268945, - 0x214e06, - 0x33aec8, - 0x32f985, - 0x21f744, - 0x26a705, - 0x2825c8, - 0x2a1e09, - 0x277544, - 0x2c0b86, - 0x30cb4a, - 0x30b048, - 0x2bd9c9, - 0x26ad4a, - 0x390186, - 0x2a0d08, - 0x2ccb85, - 0x2f0988, - 0x2fcac5, - 0x21d949, - 0x336449, - 0x20c642, - 0x2c5345, - 0x272346, - 0x27ac87, - 0x213505, - 0x3469c6, - 0x316908, - 0x2b3046, - 0x2c7489, - 0x279d86, - 0x281908, - 0x278d45, - 0x38e4c6, - 0x3037c8, - 0x281788, - 0x357c08, - 0x318488, - 0x20a584, - 0x20c243, - 0x2c76c4, - 0x280d86, - 0x237644, - 0x371e07, - 0x357ec9, - 0x2d4445, - 0x21fd06, - 0x22bd46, - 0x2a9c0b, - 0x2bc046, - 0x298d46, - 0x2d3f88, - 0x264a46, - 0x215d83, - 0x208503, - 0x2c70c4, - 0x22f545, - 0x244847, - 0x2776c8, - 0x2776cf, - 0x27c34b, - 0x330c08, - 0x2c0c06, - 0x330f0e, - 0x23b443, - 0x2447c4, - 0x2bbfc5, - 0x2bc446, - 0x28ff0b, - 0x294a86, - 0x221089, - 0x263645, - 0x23da88, - 0x3d29c8, - 0x219d0c, - 0x2a6706, - 0x2d7746, - 0x2e2d45, - 0x28ad88, - 0x27b4c5, - 0x34f108, - 0x2a2e4a, - 0x2a5789, - 0x668c84, + 0x247488, + 0x3b1a06, + 0x2a01cd, + 0x2a1e0f, + 0x2a6e0d, + 0x226104, + 0x235086, + 0x2e4088, + 0x348f45, + 0x2b5948, + 0x2862ca, + 0x25ef44, + 0x239b06, + 0x211787, + 0x218e87, + 0x2dc549, + 0x21a485, + 0x2c3b44, + 0x2c568a, + 0x2cc049, + 0x2e3087, + 0x30d406, + 0x33a1c6, + 0x291746, + 0x386c06, + 0x2e398f, + 0x2e3f49, + 0x37e646, + 0x38f786, + 0x32fa49, + 0x2c4507, + 0x220d03, + 0x22e3c6, + 0x20c483, + 0x2d22c8, + 0x2b0e07, + 0x2aa709, + 0x2b6308, + 0x3cd048, + 0x367346, + 0x21f489, + 0x307cc5, + 0x2a3504, + 0x35cf07, + 0x393205, + 0x226104, + 0x23e648, + 0x213784, + 0x2c4247, + 0x399c86, + 0x26c5c5, + 0x2ae088, + 0x33a08b, + 0x31d047, + 0x23f3c6, + 0x2d71c4, + 0x3aef86, + 0x26ff45, + 0x34db05, + 0x286889, + 0x28a489, + 0x274184, + 0x2741c5, + 0x24bc45, + 0x37e7c6, + 0x31cc48, + 0x2ce7c6, + 0x22040b, + 0x3d774a, + 0x2cb685, + 0x294b86, + 0x25b285, + 0x3c2205, + 0x256147, + 0x3b53c8, + 0x237804, + 0x385406, + 0x297b86, + 0x215107, + 0x325304, + 0x285346, + 0x229845, + 0x229849, + 0x280204, + 0x2b7789, + 0x282b06, + 0x2d08c8, + 0x24bc45, + 0x398505, + 0x3e2286, + 0x344c89, + 0x221a89, + 0x280f06, + 0x2f7688, + 0x296788, + 0x25b244, + 0x2c6604, + 0x2c6608, + 0x3326c8, + 0x237909, + 0x29ffc6, + 0x2a9606, + 0x33964d, + 0x31a546, + 0x378f09, + 0x201f45, + 0x20c4c6, + 0x347b08, + 0x336085, + 0x34d984, + 0x26ff45, + 0x289fc8, + 0x2a3049, + 0x27d144, + 0x2c8206, + 0x29c4ca, + 0x30cd48, + 0x32e249, + 0x270bca, + 0x3bb586, + 0x2a1fc8, + 0x375785, + 0x293608, + 0x2fedc5, + 0x2236c9, + 0x33bc49, + 0x21fb82, + 0x2caec5, + 0x277f06, + 0x282a47, + 0x215cc5, + 0x33eb86, + 0x319508, + 0x2af506, + 0x2c9889, + 0x282146, + 0x289308, + 0x24ef85, + 0x394886, + 0x3b3b08, + 0x289188, + 0x3d8448, + 0x31b948, + 0x20e044, + 0x21f783, + 0x2c9ac4, + 0x288786, + 0x26a484, + 0x2e1207, + 0x3d8709, + 0x2d6785, + 0x2321c6, + 0x22e3c6, + 0x2a244b, + 0x2c3346, + 0x273686, + 0x2d62c8, + 0x266cc6, + 0x20d443, + 0x20bb03, + 0x2ccc44, + 0x2310c5, + 0x23f747, + 0x27d2c8, + 0x27d2cf, + 0x28404b, + 0x31ca48, + 0x2c8286, + 0x31cd4e, + 0x23f583, + 0x23f6c4, + 0x2c32c5, + 0x2c39c6, + 0x2959cb, + 0x299886, + 0x30c009, + 0x26c5c5, + 0x249a48, + 0x209bc8, + 0x22194c, + 0x2a8f06, + 0x2d9a86, + 0x2e5145, + 0x290108, + 0x283285, + 0x3505c8, + 0x2a404a, + 0x2a7249, + 0x602284, 0x2000c2, - 0x4a201242, + 0x4b212402, 0x200382, - 0x221dc4, - 0x209e82, - 0x306c44, - 0x208482, - 0x3dc3, + 0x20e704, + 0x20b982, + 0x217544, + 0x203182, + 0x5803, 0x2003c2, - 0x2090c2, - 0x9a048, - 0x29904, - 0x214a83, - 0x232dc3, - 0x308003, - 0xccc2, - 0x49582, - 0x23c803, - 0x21a3c3, - 0x242543, - 0xc782, - 0xc2c2, - 0x1b82, - 0x202703, - 0x214a83, - 0x232dc3, - 0x308003, - 0x221dc4, - 0x21a3c3, - 0x242543, - 0x241f83, - 0x2d3684, - 0x214a83, - 0x235b44, - 0x232dc3, - 0x2e3504, - 0x308003, - 0x2137c7, - 0x23c803, - 0x203dc3, - 0x31bf88, - 0x242543, - 0x27cfcb, - 0x2fdbc3, - 0x2431c6, - 0x233442, - 0x2f850b, - 0x232dc3, - 0x308003, - 0x21a3c3, - 0x242543, - 0x214a83, - 0x232dc3, - 0x308003, - 0x242543, - 0x21a103, - 0x208a03, + 0x208502, + 0xae888, + 0x4cc4, + 0x22ea43, + 0x233fc3, + 0x266a83, + 0x7542, + 0x4b202, + 0x23cb03, + 0x217fc3, + 0x23e083, + 0x1fcc2, + 0x4642, + 0x72c2, + 0x24ac43, + 0x22ea43, + 0x233fc3, + 0x266a83, + 0x20e704, + 0x217fc3, + 0x23e083, + 0x219ac3, + 0x24cd44, + 0x22ea43, + 0x236704, + 0x233fc3, + 0x2e5904, + 0x266a83, + 0x215f87, + 0x23cb03, + 0x205803, + 0x321388, + 0x23e083, + 0x293b0b, + 0x2ffec3, + 0x243bc6, + 0x22dc42, + 0x2fa00b, + 0x233fc3, + 0x266a83, + 0x217fc3, + 0x23e083, + 0x22ea43, + 0x233fc3, + 0x266a83, + 0x23e083, + 0x221d43, + 0x210cc3, 0x2000c2, - 0x9a048, - 0x399c45, - 0x21f948, - 0x2e3648, - 0x201242, - 0x343045, - 0x3c8847, - 0x203c42, - 0x242a07, + 0xae888, + 0x334f05, + 0x34db88, + 0x2f4fc8, + 0x212402, + 0x36a4c5, + 0x3ca147, + 0x2031c2, + 0x243407, 0x200382, - 0x2555c7, - 0x3742c9, - 0x26d188, - 0x33abc9, - 0x20b342, - 0x3c7387, - 0x22dd84, - 0x3c8907, - 0x3bc8c7, - 0x25ac42, - 0x23c803, - 0x202382, - 0x208482, + 0x253d47, + 0x23a489, + 0x272888, + 0x347809, + 0x210382, + 0x3d5f47, + 0x32ad04, + 0x3ca207, + 0x3d7647, + 0x25a642, + 0x23cb03, + 0x20a942, + 0x203182, 0x2003c2, - 0x214282, + 0x205b42, 0x200902, - 0x2090c2, - 0x2df885, - 0x210205, - 0x1242, - 0x32dc3, - 0x214a83, - 0x232dc3, - 0x29a643, - 0x308003, - 0x206c03, - 0x21a3c3, - 0x242543, - 0x214a83, - 0x232dc3, - 0x308003, - 0x21a3c3, - 0x242543, - 0x214a83, - 0x232dc3, - 0x308003, - 0x23c803, - 0x21a3c3, - 0x1b4103, - 0x242543, - 0xa983, + 0x208502, + 0x2e1a45, + 0x227885, + 0x12402, + 0x33fc3, + 0x22ea43, + 0x233fc3, + 0x27e883, + 0x266a83, + 0x204903, + 0x217fc3, + 0x23e083, + 0x22ea43, + 0x233fc3, + 0x266a83, + 0x217fc3, + 0x23e083, + 0x22ea43, + 0x233fc3, + 0x266a83, + 0x23cb03, + 0x217fc3, + 0x1c0443, + 0x23e083, + 0xfe83, 0x101, - 0x214a83, - 0x232dc3, - 0x308003, - 0x221dc4, - 0x21bc83, - 0x21a3c3, - 0x1b4103, - 0x242543, - 0x214903, - 0x4d4ae8c6, - 0x239c3, - 0xd50c5, - 0x214a83, - 0x232dc3, - 0x308003, - 0x21a3c3, - 0x242543, - 0x201242, - 0x214a83, - 0x232dc3, - 0x308003, - 0x21a3c3, - 0x1b4103, - 0x242543, - 0x1b02, - 0x9a048, - 0x12a4c3, - 0x3dc3, - 0x1b4103, - 0x455c4, - 0x14226c4, - 0xed7c5, + 0x22ea43, + 0x233fc3, + 0x266a83, + 0x20e704, + 0x2191c3, + 0x217fc3, + 0x1c0443, + 0x23e083, + 0x217c83, + 0x4e4b1706, + 0x22383, + 0xd7405, + 0x22ea43, + 0x233fc3, + 0x266a83, + 0x217fc3, + 0x23e083, + 0x212402, + 0x22ea43, + 0x233fc3, + 0x266a83, + 0x217fc3, + 0x1c0443, + 0x23e083, + 0x5242, + 0xae888, + 0x12f603, + 0x5803, + 0x1c0443, + 0x46d04, + 0x147b604, + 0xf0085, 0x2000c2, - 0x393bc4, - 0x214a83, - 0x232dc3, - 0x308003, - 0x231a43, - 0x22d805, - 0x21bc83, - 0x21a8c3, - 0x21a3c3, - 0x24e283, - 0x242543, - 0x20e2c3, - 0x266603, - 0x207783, + 0x3993c4, + 0x22ea43, + 0x233fc3, + 0x266a83, + 0x247e03, + 0x22f845, + 0x2191c3, + 0x21e1c3, + 0x217fc3, + 0x24dfc3, + 0x23e083, + 0x208503, + 0x24cdc3, + 0x20aa43, 0x5c2, - 0x2aec2, - 0x214a83, - 0x232dc3, - 0x308003, - 0x21a3c3, - 0x242543, + 0x30242, + 0x22ea43, + 0x233fc3, + 0x266a83, + 0x217fc3, + 0x23e083, 0x2000c2, - 0x202703, - 0x201242, - 0x2a42, - 0x232dc3, - 0x308003, - 0x221dc4, - 0x21a3c3, - 0x242543, - 0x2090c2, - 0x9a048, - 0x308003, - 0x1b4103, - 0x9a048, - 0x1b4103, - 0x26f6c3, - 0x214a83, - 0x22fe44, - 0x232dc3, - 0x308003, - 0x206182, - 0x23c803, - 0x21a3c3, - 0x3dc3, - 0x242543, - 0x214a83, - 0x232dc3, - 0x308003, - 0x206182, - 0x2137c3, - 0x21a3c3, - 0x242543, - 0x2f7103, - 0x20e2c3, + 0x24ac43, + 0x212402, + 0xf982, + 0x233fc3, + 0x266a83, + 0x20e704, + 0x217fc3, + 0x23e083, + 0x208502, + 0xae888, + 0x266a83, + 0x1c0443, + 0xae888, + 0x1c0443, + 0x276243, + 0x22ea43, + 0x2319c4, + 0x233fc3, + 0x266a83, + 0x209582, + 0x23cb03, + 0x217fc3, + 0x5803, + 0x23e083, + 0x22ea43, + 0x233fc3, + 0x266a83, + 0x209582, + 0x215f83, + 0x217fc3, + 0x23e083, + 0x2f8e43, + 0x208503, 0x2000c2, - 0x201242, - 0x308003, - 0x21a3c3, - 0x242543, - 0x2431c5, - 0x14fc86, - 0x2d3684, - 0x233442, + 0x212402, + 0x266a83, + 0x217fc3, + 0x23e083, + 0x243bc5, + 0x1375c6, + 0x24cd44, + 0x22dc42, 0x882, - 0x9a048, - 0x2a42, - 0x49582, - 0x2982, + 0xae888, + 0xf982, + 0x4b202, + 0x2a82, 0x2000c2, - 0x139b05, - 0x1ce08, - 0x991c3, - 0x201242, - 0x3c604, - 0x51c6c486, - 0x8d04, - 0x10fe4b, - 0x34ac6, - 0xd1407, - 0x12eb09, - 0x232dc3, - 0x48248, - 0x4824b, - 0x486cb, - 0x48d4b, - 0x4908b, - 0x4934b, - 0x4978b, - 0x1d2f06, - 0x308003, - 0xf3605, - 0x68a44, - 0x210983, - 0x1182c7, - 0xe6d44, - 0x6cbc4, - 0x21a3c3, - 0x78a86, - 0x5684, - 0x1b4103, - 0x242543, - 0x2fe7c4, - 0x12bcc7, - 0x14f889, - 0x10fc08, - 0x1b44c4, - 0x1c8a44, - 0x365c6, - 0xa788, - 0x16a605, - 0x8649, - 0x2fb03, - 0x139b05, - 0x201242, - 0x214a83, - 0x232dc3, - 0x308003, - 0x23c803, - 0x203dc3, - 0x242543, - 0x2fdbc3, - 0x233442, - 0x9a048, - 0x214a83, - 0x232dc3, - 0x308003, - 0x21bac3, - 0x219a04, - 0x21a3c3, - 0x3dc3, - 0x242543, - 0x214a83, - 0x232dc3, - 0x2e3504, - 0x308003, - 0x21a3c3, - 0x242543, - 0x2431c6, - 0x232dc3, - 0x308003, - 0x10e83, - 0x1b4103, - 0x242543, - 0x214a83, - 0x232dc3, - 0x308003, - 0x21a3c3, - 0x242543, - 0x139b05, - 0xd1407, - 0x3103, - 0x2fb03, - 0x9a048, - 0x308003, - 0x214a83, - 0x232dc3, - 0x308003, - 0x5cf43, - 0x21a3c3, - 0x242543, - 0x55214a83, - 0x232dc3, - 0x21a3c3, - 0x242543, - 0x9a048, + 0x146bc5, + 0x1ae08, + 0x125203, + 0x212402, + 0x3c904, + 0x52d16f86, + 0x1384, + 0xc634b, + 0x3a806, + 0x7f3c7, + 0x1431c9, + 0x233fc3, + 0x49e88, + 0x49e8b, + 0x4a30b, + 0x4a9cb, + 0x4ad0b, + 0x4afcb, + 0x4b40b, + 0x1cb86, + 0x266a83, + 0xf48c5, + 0x2044, + 0x20ef43, + 0x11b787, + 0xe88c4, + 0x722c4, + 0x217fc3, + 0x81006, + 0x1583c4, + 0x1c0443, + 0x23e083, + 0x300ac4, + 0x131247, + 0x1371c9, + 0xc6108, + 0x1a2584, + 0x1ca344, + 0x134c46, + 0xff48, + 0x1480c5, + 0x124e89, + 0xe783, + 0x146bc5, + 0x212402, + 0x22ea43, + 0x233fc3, + 0x266a83, + 0x23cb03, + 0x205803, + 0x23e083, + 0x2ffec3, + 0x22dc42, + 0xae888, + 0x22ea43, + 0x233fc3, + 0x266a83, + 0x20e703, + 0x21e484, + 0x217fc3, + 0x5803, + 0x23e083, + 0x22ea43, + 0x233fc3, + 0x2e5904, + 0x266a83, + 0x217fc3, + 0x23e083, + 0x243bc6, + 0x233fc3, + 0x266a83, + 0xf443, + 0x1c0443, + 0x23e083, + 0x22ea43, + 0x233fc3, + 0x266a83, + 0x217fc3, + 0x23e083, + 0x146bc5, + 0x7f3c7, + 0x15c3, + 0xe783, + 0xae888, + 0x266a83, + 0x22ea43, + 0x233fc3, + 0x266a83, + 0x612c3, + 0x217fc3, + 0x23e083, + 0x5622ea43, + 0x233fc3, + 0x217fc3, + 0x23e083, + 0xae888, 0x2000c2, - 0x201242, - 0x214a83, - 0x308003, - 0x21a3c3, + 0x212402, + 0x22ea43, + 0x266a83, + 0x217fc3, 0x2003c2, - 0x242543, - 0x336987, - 0x2cd68b, - 0x20dcc3, - 0x2cfac8, - 0x32ab87, - 0x3de706, - 0x218c05, - 0x343189, - 0x242f48, - 0x3359c9, - 0x3359d0, - 0x37ab8b, - 0x2e7589, - 0x203103, - 0x2f8bc9, - 0x231506, - 0x23150c, - 0x335bc8, - 0x3db448, - 0x374789, - 0x2c368e, - 0x37408b, - 0x2ba58c, - 0x220dc3, - 0x28c68c, - 0x3d8f49, - 0x23bb47, - 0x232d0c, - 0x2b858a, - 0x24c0c4, - 0x2ee78d, - 0x28c548, - 0x3ba7cd, - 0x3a6cc6, - 0x2d368b, - 0x34fa09, - 0x3892c7, - 0x295946, - 0x267b49, - 0x33b64a, - 0x30c108, - 0x2fd7c4, - 0x2b5a07, - 0x3c51c7, - 0x204684, - 0x223804, - 0x201fc9, - 0x286ac9, - 0x3d9ac8, - 0x398bc5, - 0x20b285, - 0x2068c6, - 0x2ee649, - 0x25318d, - 0x24c488, - 0x2067c7, - 0x218c88, - 0x2355c6, - 0x239c04, - 0x284405, - 0x3cfb46, - 0x3d1e84, - 0x3d8e47, - 0x3e094a, - 0x20d384, - 0x211846, - 0x2124c9, - 0x2124cf, - 0x212a8d, - 0x213306, - 0x21ca10, - 0x21ce06, - 0x21df07, - 0x21e987, - 0x21e98f, - 0x21f1c9, - 0x225986, - 0x227207, - 0x227208, - 0x2275c9, - 0x3ba588, - 0x305c87, - 0x20ed43, - 0x3d87c6, - 0x29d1c8, - 0x2c394a, - 0x215849, - 0x243083, - 0x342f46, - 0x37f98a, - 0x2f9f87, - 0x23b98a, - 0x31458e, - 0x21f306, - 0x338547, - 0x238886, - 0x2435c6, - 0x3d300b, - 0x39964a, - 0x2cdccd, - 0x2d2107, - 0x266688, - 0x266689, - 0x26668f, - 0x3070cc, - 0x34b789, - 0x27e48e, - 0x2138ca, - 0x216406, - 0x2f4806, - 0x3adc8c, - 0x31fdcc, - 0x320308, - 0x35a487, - 0x235185, - 0x3c8ac4, - 0x28918e, - 0x3a6744, - 0x201247, - 0x39dcca, - 0x3ab1d4, - 0x3d548f, - 0x21eb48, - 0x3d8688, - 0x378c8d, - 0x378c8e, - 0x22cd09, - 0x22e548, - 0x22e54f, - 0x232a0c, - 0x232a0f, - 0x233bc7, - 0x23714a, - 0x3087cb, - 0x239808, - 0x23b107, - 0x25c7cd, - 0x3620c6, - 0x2ee946, - 0x23d449, - 0x22ba08, - 0x2433c8, - 0x2433ce, - 0x2b7687, - 0x3043c5, - 0x245385, - 0x202404, - 0x3de9c6, - 0x3d99c8, - 0x296d83, - 0x2e710e, - 0x25cb88, - 0x2aae8b, - 0x26f887, - 0x228c05, - 0x273506, - 0x2b2b07, - 0x31b348, - 0x36a409, - 0x3cd545, - 0x285c48, - 0x2209c6, - 0x3a618a, - 0x289089, - 0x232dc9, - 0x232dcb, - 0x25d908, - 0x204549, - 0x398c86, - 0x3c5a8a, - 0x2bfe4a, - 0x23734c, - 0x3488c7, - 0x26cf8a, - 0x3b1fcb, - 0x3b1fd9, - 0x324208, - 0x243245, - 0x25c986, - 0x2a0049, - 0x39f606, - 0x219aca, - 0x26e286, - 0x2196c4, - 0x2d604d, - 0x3458c7, - 0x2196c9, - 0x247105, - 0x247ac8, - 0x248009, - 0x24b904, - 0x24bfc7, - 0x24bfc8, - 0x24cc87, - 0x265c08, - 0x250dc7, - 0x2d8b85, - 0x257e8c, - 0x258349, - 0x33144a, - 0x3a8e89, - 0x2f8cc9, - 0x388e0c, - 0x25b4cb, - 0x25c008, - 0x25d0c8, - 0x260cc4, - 0x283b88, - 0x284d09, - 0x2b8647, - 0x212706, - 0x2a43c7, - 0x29fd49, - 0x24768b, - 0x36aa87, - 0x2947c7, - 0x3d0147, - 0x3ba744, - 0x3ba745, - 0x2e3205, - 0x358b4b, - 0x33d684, - 0x323a88, - 0x30060a, - 0x220a87, - 0x3caac7, - 0x28f6d2, - 0x291646, - 0x22f7c6, - 0x28870e, - 0x29ab46, - 0x299288, - 0x29a60f, - 0x3bab88, - 0x28a808, - 0x2dd1ca, - 0x2dd1d1, - 0x2a98ce, - 0x25514a, - 0x25514c, - 0x22e747, - 0x22e750, - 0x3c7108, - 0x2a9ac5, - 0x2b2e0a, - 0x3d1ecc, - 0x29c88d, - 0x3c7c86, - 0x3c7c87, - 0x3c7c8c, - 0x3d2b8c, - 0x21bc8c, - 0x3bd6cb, - 0x38b644, - 0x226204, - 0x2b6f89, - 0x34b147, - 0x37d009, - 0x2bfc89, - 0x2b8247, - 0x2b8406, - 0x2b8409, - 0x2b8803, - 0x2b314a, - 0x2961c7, - 0x3c8e0b, - 0x2cdb4a, - 0x22de04, - 0x32f4c6, - 0x280e09, - 0x35c004, - 0x2df48a, - 0x2e0685, - 0x2c7945, - 0x2c794d, - 0x2c7c8e, - 0x2c7805, - 0x335046, - 0x242dc7, - 0x22b78a, - 0x3a6a46, - 0x37bc84, - 0x3cdb87, - 0x2fab0b, - 0x265907, - 0x262944, - 0x3a39c6, - 0x3a39cd, - 0x2e568c, - 0x21a286, - 0x24c68a, - 0x34ca86, - 0x21e648, - 0x30c487, - 0x2d3b8a, - 0x23c486, - 0x27d903, - 0x2f3886, - 0x29d048, - 0x245aca, - 0x2dcc07, - 0x2dcc08, - 0x249ac4, - 0x28fc47, - 0x2f4348, - 0x291848, - 0x2bbdc8, - 0x2ffc0a, - 0x2ec0c5, - 0x2c1ac7, - 0x254f93, - 0x26b2c6, - 0x24aec8, - 0x221589, - 0x2428c8, - 0x33c58b, - 0x385308, - 0x2c02c4, - 0x21a706, - 0x320c06, - 0x3186c9, - 0x2d39c7, - 0x257f88, - 0x2a51c6, + 0x23e083, + 0x33c187, + 0x355d4b, + 0x211843, + 0x27da88, + 0x330107, + 0x229dc6, + 0x2d42c5, + 0x36a609, + 0x243948, + 0x381049, + 0x3ac290, + 0x38104b, + 0x215589, + 0x2015c3, + 0x2fa6c9, + 0x232646, + 0x23264c, + 0x334fc8, + 0x3dde48, + 0x26eac9, + 0x2c8b0e, + 0x23a24b, + 0x2c030c, + 0x233f03, + 0x284e8c, + 0x3e13c9, + 0x238447, + 0x233f0c, + 0x2bde8a, + 0x241ec4, + 0x38aa8d, + 0x284d48, + 0x219acd, + 0x292146, + 0x24cd4b, + 0x337349, + 0x38fa07, + 0x25f0c6, + 0x323849, + 0x35484a, + 0x30e748, + 0x2ffac4, + 0x3a8e87, + 0x3c0807, + 0x208184, + 0x2221c4, + 0x3b4809, + 0x35c549, + 0x3e1f48, + 0x2f2c85, + 0x2102c5, + 0x209a86, + 0x38a949, + 0x28654d, + 0x2ece48, + 0x209987, + 0x2d4348, + 0x26bdc6, + 0x22fa44, + 0x2a4d45, + 0x3d9f46, + 0x3dc104, + 0x3e12c7, + 0x204e8a, + 0x210e04, + 0x213386, + 0x214689, + 0x21468f, + 0x214c4d, + 0x215ac6, + 0x21aa10, + 0x21ae06, + 0x21b507, + 0x21bcc7, + 0x21bccf, + 0x21c689, + 0x224c46, + 0x225047, + 0x225048, + 0x225449, + 0x20f708, + 0x306a07, + 0x22b743, + 0x22e8c6, + 0x239148, + 0x2c8dca, + 0x20cf09, + 0x243a83, + 0x36a3c6, + 0x38524a, + 0x2fbb87, + 0x23828a, + 0x316c8e, + 0x21c7c6, + 0x32bc47, + 0x38ef46, + 0x243fc6, + 0x21cc8b, + 0x3a038a, + 0x35638d, + 0x2800c7, + 0x26dc08, + 0x26dc09, + 0x26dc0f, + 0x30a80c, + 0x265209, + 0x2bbbce, + 0x21608a, + 0x20dac6, + 0x3076c6, + 0x31a1cc, + 0x3df50c, + 0x325908, + 0x35fd07, + 0x39d4c5, + 0x3ca3c4, + 0x25fd0e, + 0x3ae384, + 0x37dd87, + 0x3a6d8a, + 0x3d7cd4, + 0x3db78f, + 0x21be88, + 0x22e788, + 0x39124d, + 0x39124e, + 0x22ed49, + 0x22fe88, + 0x22fe8f, + 0x233c0c, + 0x233c0f, + 0x234dc7, + 0x23718a, + 0x23874b, + 0x2395c8, + 0x23b807, + 0x260b4d, + 0x369646, + 0x38ac46, + 0x23d649, + 0x252848, + 0x243dc8, + 0x243dce, + 0x2bb387, + 0x305145, + 0x246ac5, + 0x206484, + 0x22a086, + 0x3e1e48, + 0x324643, + 0x2e8c8e, + 0x260f08, + 0x2acacb, + 0x276407, + 0x30b205, + 0x269c06, + 0x2b6ec7, + 0x321848, + 0x37d749, + 0x3d2cc5, + 0x28e408, + 0x228a46, + 0x3addca, + 0x25fc09, + 0x233fc9, + 0x233fcb, + 0x25c6c8, + 0x208049, + 0x2f2d46, + 0x2041ca, + 0x29d08a, + 0x23738c, + 0x375e07, + 0x27268a, + 0x331b0b, + 0x331b19, + 0x353148, + 0x243c45, + 0x260d06, + 0x211d89, + 0x3b2c46, + 0x22170a, + 0x275246, + 0x2d8384, + 0x2d838d, + 0x3b4447, + 0x368889, + 0x249285, + 0x2493c8, + 0x249c49, + 0x24bb44, + 0x24c247, + 0x24c248, + 0x24c507, + 0x26c188, + 0x251c87, + 0x2daec5, + 0x25828c, + 0x258749, + 0x31d28a, + 0x3b09c9, + 0x2fa7c9, + 0x38f54c, + 0x25accb, + 0x25c8c8, + 0x261448, + 0x264f04, + 0x28b548, + 0x28cb89, + 0x2bdf47, + 0x2148c6, + 0x2a3b07, + 0x2a0f49, + 0x354d4b, + 0x20b187, + 0x348647, + 0x3da547, + 0x219a44, + 0x219a45, + 0x2e5605, + 0x35e84b, + 0x349284, + 0x328308, + 0x30234a, + 0x228b07, + 0x3d0347, + 0x295192, + 0x293dc6, + 0x231346, + 0x34890e, + 0x294586, + 0x299e48, + 0x29aacf, + 0x219e88, + 0x28fb88, + 0x2df5ca, + 0x2df5d1, + 0x2ab64e, + 0x2550ca, + 0x2550cc, + 0x230087, + 0x230090, + 0x3d4f08, + 0x2ab845, + 0x2b71ca, + 0x3dc14c, + 0x29e08d, + 0x204906, + 0x204907, + 0x20490c, + 0x209d8c, + 0x2191cc, + 0x2c204b, + 0x3923c4, + 0x226c84, + 0x2ba749, + 0x34a1c7, + 0x382f89, + 0x29cec9, + 0x2bdb47, + 0x2bdd06, + 0x2bdd09, + 0x2be103, + 0x2af60a, + 0x323a87, + 0x3ca70b, + 0x35620a, + 0x32ad84, + 0x3c88c6, + 0x288809, + 0x3612c4, + 0x2e164a, + 0x2e2845, + 0x2cd7c5, + 0x2cd7cd, + 0x2cdb0e, + 0x2c9c05, + 0x33ae46, + 0x2437c7, + 0x2525ca, + 0x3ae686, + 0x381c04, + 0x35a607, + 0x2fc70b, + 0x26be87, + 0x2699c4, + 0x253306, + 0x25330d, + 0x2e724c, + 0x217e86, + 0x2ed04a, + 0x223486, + 0x220dc8, + 0x274707, + 0x2d5eca, + 0x2361c6, + 0x27ffc3, + 0x2f4b46, + 0x238fc8, + 0x37204a, + 0x2df007, + 0x2df008, + 0x25bfc4, + 0x295707, + 0x2fdf08, + 0x293fc8, + 0x2c30c8, + 0x33e14a, + 0x2ee705, + 0x2ee987, + 0x254f13, + 0x271146, + 0x20bc08, + 0x222a49, + 0x2432c8, + 0x3673cb, + 0x3cd3c8, + 0x2cab84, + 0x2c0c86, + 0x325e06, + 0x322349, + 0x2d5d07, + 0x258388, + 0x2a5c46, 0x200bc4, - 0x208405, - 0x3a3188, - 0x344e4a, - 0x2d5cc8, - 0x2dad46, - 0x2a0f0a, - 0x269f88, - 0x2de248, - 0x2df708, - 0x2dff46, - 0x2e1e86, - 0x3a4d0c, - 0x2e2410, - 0x2cc145, - 0x2230c8, - 0x2230d0, - 0x3ba990, - 0x33584e, - 0x3a498e, - 0x3a4994, - 0x3a804f, - 0x3a8406, - 0x3dbe51, - 0x345213, - 0x345688, - 0x2035c5, - 0x2d0008, - 0x3a05c5, - 0x33f34c, - 0x229f09, - 0x3a6589, - 0x356947, - 0x26c649, - 0x39f1c7, - 0x334686, - 0x284207, - 0x204c05, - 0x20a9c3, - 0x210e83, - 0x213404, - 0x36adcd, - 0x3c304f, + 0x3d5d85, + 0x3aa788, + 0x248e8a, + 0x2d8008, + 0x2dcf86, + 0x2a21ca, + 0x273d48, + 0x2e0648, + 0x2e18c8, + 0x2e2106, + 0x2e4286, + 0x3b048c, + 0x2e4810, + 0x2b8a85, + 0x219c88, + 0x21e910, + 0x219c90, + 0x3ac10e, + 0x3b010e, + 0x3b0114, + 0x3b934f, + 0x3b9706, + 0x3b6051, + 0x208253, + 0x2086c8, + 0x25f245, + 0x27dfc8, + 0x3a7c45, + 0x34aacc, + 0x22b989, + 0x3ae1c9, + 0x317147, + 0x237bc9, + 0x3b2807, + 0x33a486, + 0x2a4b47, + 0x202cc5, + 0x20fec3, + 0x20f443, + 0x215bc4, + 0x3dff8d, + 0x20bf4f, 0x200c05, - 0x33f246, - 0x20cb87, - 0x399a87, - 0x208886, - 0x20888b, - 0x2aa785, - 0x259fc6, - 0x30be47, - 0x251ac9, - 0x229b46, - 0x3860c5, - 0x3c910b, - 0x3d6e86, - 0x21d685, - 0x241588, - 0x290b08, - 0x299b8c, - 0x299b90, - 0x2ac2c9, - 0x2c15c7, - 0x2b918b, - 0x2c8206, - 0x305b4a, - 0x36ff8b, - 0x31b58a, - 0x398806, - 0x2f6fc5, - 0x32aa86, - 0x279f48, - 0x356a0a, - 0x37891c, - 0x2fdc8c, - 0x2fdf88, - 0x2431c5, - 0x382747, - 0x24a006, - 0x24aac5, - 0x2177c6, - 0x208a48, - 0x2c6747, - 0x2c3588, - 0x26b38a, - 0x3b954c, - 0x297009, - 0x3b97c7, - 0x285244, - 0x245446, - 0x28a38a, - 0x2bfd85, - 0x22348c, - 0x223b48, - 0x26a208, - 0x2aebcc, - 0x38878c, - 0x22d949, - 0x22db87, - 0x25494c, - 0x3082c4, - 0x3713ca, - 0x30de8c, - 0x24fdcb, - 0x25044b, - 0x252b06, - 0x256447, - 0x22e987, - 0x22e98f, - 0x30f351, - 0x2e8d92, - 0x258c0d, - 0x258c0e, - 0x258f4e, - 0x3a8208, - 0x3a8212, - 0x25be08, - 0x221bc7, - 0x24ec0a, - 0x2ac988, - 0x29ab05, - 0x2bb28a, - 0x21d187, - 0x2ef184, - 0x210883, - 0x236085, - 0x2dd447, - 0x30d3c7, - 0x29ca8e, - 0x352e8d, - 0x354009, - 0x302905, - 0x361043, - 0x34a886, - 0x25a5c5, - 0x2ab0c8, - 0x224249, - 0x25c9c5, - 0x25c9cf, - 0x2e0b07, - 0x218a85, - 0x27024a, - 0x3d0b06, - 0x312b09, - 0x381b4c, - 0x3ce889, - 0x2062c6, - 0x30040c, - 0x32dd86, - 0x30cfc8, - 0x3b1ec6, - 0x365486, - 0x2bc1c4, - 0x31d203, - 0x21124a, - 0x227e11, - 0x34b94a, - 0x23ea05, - 0x25b907, - 0x2559c7, - 0x2e6f04, - 0x2f444b, - 0x33aa48, - 0x2c55c6, - 0x361785, - 0x261f44, - 0x3828c9, + 0x34a9c6, + 0x2200c7, + 0x334d47, + 0x37b8c6, + 0x37b8cb, + 0x2ac3c5, + 0x259986, + 0x30db47, + 0x252b89, + 0x225706, + 0x38c185, + 0x3c324b, + 0x205d06, + 0x226685, + 0x246248, + 0x296448, + 0x2ae3cc, + 0x2ae3d0, + 0x2b4f89, + 0x2c7007, + 0x2be80b, + 0x2ce086, + 0x3068ca, + 0x2a81cb, + 0x38160a, + 0x39f946, + 0x2f8d05, + 0x330006, + 0x28d548, + 0x31720a, + 0x390edc, + 0x2fff8c, + 0x300288, + 0x243bc5, + 0x387ac7, + 0x25d246, + 0x2bcc85, + 0x218386, + 0x37ba88, + 0x2cc2c7, + 0x2c8a08, + 0x27120a, + 0x3c110c, + 0x3248c9, + 0x3c1387, + 0x28d0c4, + 0x246b86, + 0x28f70a, + 0x29cfc5, + 0x221e4c, + 0x222508, + 0x2f6848, + 0x2b1a0c, + 0x31aa0c, + 0x32a8c9, + 0x32ab07, + 0x242dcc, + 0x22ac84, + 0x36fe0a, + 0x31114c, + 0x24e1cb, + 0x24f60b, + 0x2509c6, + 0x2541c7, + 0x2302c7, + 0x2302cf, + 0x312111, + 0x2eb492, + 0x25538d, + 0x25538e, + 0x2556ce, + 0x3b9508, + 0x3b9512, + 0x266448, + 0x223087, + 0x24fa4a, + 0x2af348, + 0x294545, + 0x2c258a, + 0x21b187, + 0x2f1004, + 0x20ee43, + 0x236c45, + 0x2df847, + 0x3aca87, + 0x29e28e, + 0x33dacd, + 0x350d49, + 0x31fb05, + 0x35f4c3, + 0x34ca46, + 0x259ec5, + 0x2acd08, + 0x227349, + 0x260d45, + 0x260d4f, + 0x2c6447, + 0x2154c5, + 0x276dca, + 0x205646, + 0x35d1c9, + 0x386ecc, + 0x3d2dc9, + 0x20b386, + 0x30214c, + 0x333f86, + 0x310088, + 0x331a06, + 0x36c7c6, + 0x2c34c4, + 0x3222c3, + 0x20de0a, + 0x22de51, + 0x26a90a, + 0x25b105, + 0x288207, + 0x255b47, + 0x2e8a84, + 0x2fe00b, + 0x347688, + 0x2cb146, + 0x23e285, + 0x268b84, + 0x24fc89, 0x2008c4, - 0x20e087, - 0x37a385, - 0x37a387, - 0x288945, - 0x3801c3, - 0x221a88, - 0x2d020a, - 0x23db43, - 0x399c8a, - 0x2a74c6, - 0x25c74f, - 0x2b7609, - 0x2e7090, - 0x305748, - 0x2db3c9, - 0x29df47, - 0x3a394f, - 0x3905c4, - 0x2e3584, - 0x203946, - 0x2344c6, - 0x2ef40a, - 0x254686, - 0x2b5e07, - 0x315048, - 0x315247, - 0x3166c7, - 0x31784a, - 0x316fcb, - 0x33bf85, - 0x2e89c8, - 0x201343, - 0x3bb3cc, - 0x3965cf, - 0x234f8d, - 0x258787, - 0x354149, - 0x357087, - 0x2401c8, - 0x3ab3cc, - 0x2c01c8, - 0x23e708, - 0x32c9ce, - 0x341b94, - 0x3420a4, - 0x36080a, - 0x37b90b, - 0x39f284, - 0x39f289, - 0x331e88, - 0x245d85, - 0x29688a, - 0x291087, - 0x2135c4, - 0x202703, - 0x214a83, - 0x235b44, - 0x232dc3, - 0x308003, - 0x221dc4, - 0x21bc83, - 0x23c803, - 0x2e2406, - 0x219a04, - 0x21a3c3, - 0x242543, - 0x2141c3, + 0x2124c7, + 0x34d185, + 0x34d187, + 0x348b45, + 0x20bb83, + 0x222f48, + 0x27e1ca, + 0x249b03, + 0x334f4a, + 0x2a9d06, + 0x260acf, + 0x2bb309, + 0x2e8c10, + 0x3064c8, + 0x2dd9c9, + 0x29f107, + 0x25328f, + 0x3bb9c4, + 0x2e5984, + 0x21ac86, + 0x2356c6, + 0x23edca, + 0x247cc6, + 0x2b9447, + 0x317c48, + 0x317e47, + 0x3192c7, + 0x31ad0a, + 0x319bcb, + 0x358f85, + 0x2eb0c8, + 0x21a303, + 0x3ccbcc, + 0x39d24f, + 0x3c7e0d, + 0x258b87, + 0x350e89, + 0x2f5c87, + 0x28c3c8, + 0x3d7ecc, + 0x2caa88, + 0x366dc8, + 0x332bce, + 0x345b54, + 0x346064, + 0x365d0a, + 0x38188b, + 0x3b28c4, + 0x3b28c9, + 0x239b88, + 0x247385, + 0x32414a, + 0x2a5007, + 0x215d84, + 0x24ac43, + 0x22ea43, + 0x236704, + 0x233fc3, + 0x266a83, + 0x20e704, + 0x2191c3, + 0x23cb03, + 0x2e4806, + 0x21e484, + 0x217fc3, + 0x23e083, + 0x216983, 0x2000c2, - 0x202703, - 0x201242, - 0x214a83, - 0x235b44, - 0x232dc3, - 0x308003, - 0x21bc83, - 0x2e2406, - 0x21a3c3, - 0x242543, - 0x9a048, - 0x214a83, - 0x232dc3, - 0x228503, - 0x21a3c3, - 0x1b4103, - 0x242543, - 0x9a048, - 0x214a83, - 0x232dc3, - 0x308003, - 0x23c803, - 0x219a04, - 0x21a3c3, - 0x242543, + 0x24ac43, + 0x212402, + 0x22ea43, + 0x236704, + 0x233fc3, + 0x266a83, + 0x2191c3, + 0x2e4806, + 0x217fc3, + 0x23e083, + 0xae888, + 0x22ea43, + 0x233fc3, + 0x280203, + 0x217fc3, + 0x1c0443, + 0x23e083, + 0xae888, + 0x22ea43, + 0x233fc3, + 0x266a83, + 0x23cb03, + 0x21e484, + 0x217fc3, + 0x23e083, 0x2000c2, - 0x27ee03, - 0x201242, - 0x232dc3, - 0x308003, - 0x23c803, - 0x21a3c3, - 0x242543, - 0x2086c2, - 0x215702, - 0x201242, - 0x214a83, - 0x208c02, + 0x281bc3, + 0x212402, + 0x233fc3, + 0x266a83, + 0x23cb03, + 0x217fc3, + 0x23e083, + 0x20cf02, + 0x20cdc2, + 0x212402, + 0x22ea43, + 0x204302, 0x2005c2, - 0x221dc4, - 0x306c44, - 0x223f82, - 0x219a04, + 0x20e704, + 0x217544, + 0x266002, + 0x21e484, 0x2003c2, - 0x242543, - 0x2141c3, - 0x252b06, - 0x20c782, - 0x201b82, - 0x2221c2, - 0x57a07403, - 0x57e2e743, - 0x56246, - 0x56246, - 0x2d3684, - 0x203dc3, - 0x160d, - 0x1d984a, - 0x16300c, - 0x1d76cc, - 0xd4ecd, - 0x139b05, - 0x86209, - 0x8d2cc, - 0x29907, - 0xdb86, - 0x13dc8, - 0x1bf87, - 0x201c8, - 0x1ac0ca, - 0x10d707, - 0x58a8d505, - 0xe4f09, - 0x58c3480b, - 0x125c08, - 0x1558b, - 0x12c5c8, - 0x1c48c9, - 0x4060a, - 0x1b1b8e, - 0x1d158d, - 0x2cd0d, - 0x14426cb, - 0xe554a, - 0x8d04, - 0x5a106, - 0x19b808, - 0x79108, - 0x25687, - 0x1d35c5, - 0xc607, - 0x33249, - 0x15c087, - 0x106c8, - 0x26a89, - 0x4ce04, - 0x4e945, - 0x98e8e, - 0x12c207, - 0x59225a86, - 0x78d8d, - 0xd1288, - 0x59694f86, - 0x5a094f88, - 0x56f88, - 0x136b90, - 0x53f8c, - 0x61b47, - 0x62347, - 0x6a947, - 0x72047, - 0x6882, - 0x120687, - 0x19980c, - 0x13c945, - 0x107c07, - 0xac186, - 0xacdc9, - 0xaff88, - 0x6502, + 0x23e083, + 0x216983, + 0x2509c6, + 0x21fcc2, + 0x2072c2, + 0x223d42, + 0x58a13d83, + 0x58e30083, + 0x56486, + 0x56486, + 0x24cd44, + 0x205803, + 0x8acd, + 0x1e1cca, + 0x1cc04c, + 0x173cc, + 0xd720d, + 0x6e784, + 0x8f284, + 0x120384, + 0x146bc5, + 0x8e9c9, + 0xbf04c, + 0x1683c7, + 0x11fc6, + 0x16588, + 0x1a087, + 0x20ac8, + 0x1bdd8a, + 0x1109c7, + 0x59abd285, + 0xbd289, + 0x59c35a0b, + 0x129f08, + 0xcc4b, + 0x141488, + 0x167e89, + 0x8c80a, + 0x1316ce, + 0xbec4a, + 0xa4cd, + 0x2ed4d, + 0x14430cb, + 0xe710a, + 0x1384, + 0x59ac6, + 0xf988, + 0x10f508, + 0x35cc7, + 0x1dbc5, + 0x1fb47, + 0x34449, + 0x161347, + 0xec88, + 0x2afc9, + 0x3ea84, + 0xd3085, + 0x737ce, + 0x1410c7, + 0x5a224d46, + 0x4efcd, + 0x7f248, + 0x5a65ce86, + 0x5b05ce88, + 0x57388, + 0x13c390, + 0x5460c, + 0x68787, + 0x693c7, + 0x707c7, + 0x77c07, + 0x9a42, + 0x16e07, + 0x1a054c, + 0x5d4c5, + 0xb4e07, + 0xae286, + 0xafcc9, + 0xb3108, + 0xb5c2, 0x5c2, - 0x18d986, - 0x1b9ecb, - 0x1ba1c6, - 0x174d04, - 0x978c7, - 0x41a89, - 0xf0c09, - 0x1b1148, - 0x49582, - 0x193a49, - 0xd788, - 0xef24a, - 0x15adc9, - 0x1b4186, - 0xd8949, - 0xe54c7, - 0xe5c09, - 0xe7ac8, - 0xea3c7, - 0xec049, - 0xf0005, - 0xf1210, - 0x1b6786, - 0x97805, - 0x91487, - 0xec74d, - 0x41485, - 0xf8ac6, - 0xf92c7, - 0xfe7d8, - 0xd1608, - 0x13db8a, - 0xca42, - 0x5020a, - 0x60e4d, - 0x45c2, - 0xce946, - 0x11ec6, - 0xa1788, - 0xafd0a, - 0x472c8, - 0x6de89, - 0x115488, - 0x6eace, - 0x6e0c8, - 0x14a887, - 0x5a694ec4, - 0xae8cd, - 0x10a085, - 0x69148, - 0x34088, - 0x111b86, - 0xc2c2, - 0xc53c4, - 0xe2c06, - 0x365c6, - 0x5a8ef74b, - 0x1442, + 0x193c86, + 0x1c2b0b, + 0x1c2e06, + 0x6f044, + 0x1b5ac7, + 0x33449, + 0x860c9, + 0x1bb208, + 0x4b202, + 0x199249, + 0x11a08, + 0xfb54a, + 0xe689, + 0x2a8c6, + 0xdac89, + 0xe7087, + 0xe77c9, + 0xea1c8, + 0xec607, + 0xee689, + 0xf1a45, + 0xf1e10, + 0x1d60c6, + 0x1b5a05, + 0x19dfc7, + 0xbd68d, + 0x41d85, + 0xfa5c6, + 0xfadc7, + 0x100ad8, + 0x7f5c8, + 0x14978a, + 0xd782, + 0x5b7928cb, + 0x4f3ca, + 0x5a04d, + 0x2442, + 0xd4d86, + 0x13a06, + 0xa2ac8, + 0xb2e8a, + 0x3dd48, + 0x74e49, + 0x118088, + 0x6f48e, + 0x75088, + 0x14ca47, + 0x5ba5cdc4, + 0xb170d, + 0x1095c5, + 0x2748, + 0x35288, + 0x1145c6, + 0x4642, + 0xcaf44, + 0xe5006, + 0x134c46, + 0x5bd8490b, + 0x3602, 0x401, 0x81, - 0xb8f08, - 0x5bc87, - 0x150503, - 0x59a37f04, - 0x59e9b383, + 0xbe588, + 0x5bb87, + 0x93783, + 0x5aa37e84, + 0x5ae9c0c3, 0xc1, - 0xf586, + 0x25d86, 0xc1, 0x201, - 0xf586, - 0x150503, - 0x66603, - 0x647c4, - 0x1e7c7, - 0x7787, - 0x15c27c5, - 0x4e684, - 0x13d707, - 0x1242, - 0x24c0c4, - 0x214a83, - 0x24d9c4, - 0x221dc4, - 0x21a3c3, - 0x221445, - 0x214903, - 0x22b983, - 0x208805, - 0x207783, - 0x1243, - 0x5ba14a83, - 0x232dc3, - 0x4d9c4, - 0x7083, - 0x308003, + 0x25d86, + 0x93783, + 0x18b7c8, + 0x4cdc3, + 0x27c44, + 0x20f47, + 0xaa47, + 0x1571585, + 0x4e584, + 0x149307, + 0x12402, + 0x241ec4, + 0x22ea43, + 0x24d704, + 0x20e704, + 0x217fc3, + 0x222905, + 0x217c83, + 0x235403, + 0x37b845, + 0x20aa43, + 0x1be83, + 0x5ce2ea43, + 0x233fc3, + 0x4d704, + 0x33c3, + 0x266a83, 0x200181, - 0x1a8c3, - 0x23c803, - 0x306c44, - 0x219a04, - 0x21a3c3, - 0x4e283, - 0x242543, - 0x20e2c3, - 0x9a048, + 0x1e1c3, + 0x23cb03, + 0x217544, + 0x21e484, + 0x217fc3, + 0x4dfc3, + 0x23e083, + 0x208503, + 0xae888, 0x2000c2, - 0x202703, - 0x201242, - 0x214a83, - 0x232dc3, - 0x228503, + 0x24ac43, + 0x212402, + 0x22ea43, + 0x233fc3, + 0x280203, 0x2005c2, - 0x221dc4, - 0x21bc83, - 0x23c803, - 0x21a3c3, - 0x203dc3, - 0x242543, - 0x207783, - 0x196504, - 0x9a048, - 0x106947, - 0x1242, - 0x1a3105, - 0x540cf, - 0xe0986, - 0x144ca88, - 0x1160ce, - 0x5ca345c2, - 0x297ac8, - 0x35c5c6, - 0x24e806, - 0x395e87, - 0x5ce00c82, - 0x5d2b7488, - 0x20bd4a, - 0x2615c8, + 0x20e704, + 0x2191c3, + 0x23cb03, + 0x217fc3, + 0x205803, + 0x23e083, + 0x20aa43, + 0x19d184, + 0xae888, + 0x10a087, + 0x12402, + 0x1aa705, + 0x5474f, + 0xf10c6, + 0x1454408, + 0x118cce, + 0x5de2a502, + 0x32f688, + 0x361886, + 0x24e706, + 0x39cb07, + 0x5e200c82, + 0x5e6bb188, + 0x21f28a, + 0x268208, 0x200ac2, - 0x3c8c49, - 0x33bfc7, - 0x212686, - 0x2217c9, - 0x2c1c04, - 0x3c8b46, - 0x2cc7c4, - 0x20e904, - 0x257889, - 0x30dbc6, - 0x265445, - 0x266245, - 0x22d547, - 0x2dbd87, - 0x34c8c4, - 0x31e606, - 0x2ff485, - 0x210845, - 0x23eac5, - 0x3bd9c7, - 0x26f6c5, - 0x248489, - 0x343fc5, - 0x31b484, - 0x3a6987, - 0x36344e, - 0x2031c9, - 0x2885c9, - 0x348706, - 0x23f9c8, - 0x36f2cb, - 0x2a5a0c, - 0x322686, - 0x2ba447, - 0x2eee85, - 0x3270ca, - 0x3d9bc9, - 0x345c89, - 0x295146, - 0x30bc05, - 0x245705, - 0x36a209, - 0x23ec4b, - 0x2c2246, - 0x352686, - 0x2067c4, - 0x2ecd46, - 0x304448, - 0x3c1e46, - 0x2e3e06, - 0x3dd908, - 0x2019c7, - 0x201d49, - 0x205a85, - 0x9a048, - 0x3cd4c4, - 0x316c44, - 0x20b105, - 0x3403c9, - 0x220747, - 0x22074b, - 0x22284a, - 0x228585, - 0x5d60c282, - 0x2cda07, - 0x5da29cc8, - 0x295387, - 0x301345, - 0x348aca, - 0x1242, - 0x27c58b, - 0x27d98a, - 0x248906, - 0x20a803, - 0x206c8d, - 0x3c4c4c, - 0x3c534d, - 0x230585, - 0x27bbc5, - 0x296dc7, - 0x3d1149, - 0x20bc46, - 0x254505, - 0x37b708, - 0x2ce983, - 0x2e3948, - 0x2ecc48, - 0x383fc7, - 0x3b8a88, - 0x3c0809, - 0x2fd2c7, - 0x2cd207, - 0x3de588, - 0x23ae04, - 0x23ae07, - 0x3a6bc8, - 0x360f06, - 0x3c0ecf, - 0x22a907, - 0x31e106, - 0x22dcc5, - 0x222343, - 0x246287, - 0x387fc3, - 0x24d046, - 0x24e586, - 0x24f0c6, - 0x293d45, - 0x265c03, - 0x3936c8, - 0x38a109, - 0x39bf8b, - 0x24f248, - 0x250a85, - 0x252305, - 0x5de2dec2, - 0x2842c9, - 0x221e47, - 0x25a045, - 0x257787, - 0x258ac6, - 0x381745, - 0x25a40b, - 0x25c004, - 0x261185, - 0x2612c7, - 0x276806, - 0x276c45, - 0x283d87, - 0x2847c7, - 0x2a7484, - 0x28d0ca, - 0x28dbc8, - 0x2ccc09, - 0x23f285, - 0x205886, - 0x30460a, - 0x266146, - 0x2ed087, - 0x26d30d, - 0x2aa2c9, - 0x391c45, - 0x363847, - 0x289708, - 0x303588, - 0x3286c7, - 0x384d06, - 0x21abc7, - 0x24dbc3, - 0x30db44, - 0x37d485, - 0x3a7747, - 0x3b0d49, - 0x229588, - 0x2ecf85, - 0x2425c4, - 0x247ec5, - 0x24f40d, + 0x3ca549, + 0x358fc7, + 0x214846, + 0x222c89, + 0x2eeac4, + 0x3ca446, + 0x2e9104, + 0x2029c4, + 0x257b49, + 0x310e86, + 0x267c85, + 0x26b845, + 0x22f587, + 0x2de387, + 0x26b784, + 0x2d2486, + 0x301785, + 0x20ee05, + 0x25b1c5, + 0x2c2347, + 0x276245, + 0x24a0c9, + 0x37eb85, + 0x321984, + 0x3ae5c7, + 0x3b3fce, + 0x207289, + 0x3487c9, + 0x371246, + 0x2405c8, + 0x37554b, + 0x2a74cc, + 0x326f06, + 0x2c01c7, + 0x2f0d05, + 0x3163ca, + 0x3e2049, + 0x201189, + 0x206a86, + 0x30d905, + 0x246e45, + 0x389a89, + 0x25b34b, + 0x2ef106, + 0x353806, + 0x209984, + 0x303a46, + 0x3051c8, + 0x3cbf46, + 0x267846, + 0x203048, + 0x205107, + 0x206809, + 0x208e85, + 0xae888, + 0x3d2c44, + 0x319844, + 0x210145, + 0x343c49, + 0x221287, + 0x22128b, + 0x22434a, + 0x228745, + 0x5ea087c2, + 0x3560c7, + 0x5ee2b748, + 0x206cc7, + 0x303085, + 0x35d60a, + 0x12402, + 0x28428b, + 0x28544a, + 0x24a546, + 0x20ffc3, + 0x21114d, + 0x3ca98c, + 0x203a8d, + 0x232105, + 0x3363c5, + 0x324687, + 0x206309, + 0x21f186, + 0x247b45, + 0x3401c8, + 0x2d4dc3, + 0x2f52c8, + 0x303948, + 0x3a2107, + 0x3c5d88, + 0x3c76c9, + 0x2ff5c7, + 0x3558c7, + 0x371408, + 0x38bcc4, + 0x38bcc7, + 0x292048, + 0x366406, + 0x3cb14f, + 0x265747, + 0x2d1f86, + 0x32ac45, + 0x223ec3, + 0x2479c7, + 0x38e083, + 0x24c6c6, + 0x24e486, + 0x24ff06, + 0x298ec5, + 0x26c183, + 0x398ec8, + 0x390849, + 0x3a290b, + 0x250088, + 0x251945, + 0x253645, + 0x5f2ba882, + 0x2a4c09, + 0x223307, + 0x259a05, + 0x257a47, + 0x258ec6, + 0x386ac5, + 0x259d0b, + 0x25c8c4, + 0x267dc5, + 0x267f07, + 0x27c586, + 0x27c9c5, + 0x28b987, + 0x28c147, + 0x2a9cc4, + 0x2bee4a, + 0x292b08, + 0x375809, + 0x25b985, + 0x3585c6, + 0x30538a, + 0x26d6c6, + 0x236047, + 0x272a0d, + 0x2abf09, + 0x397445, + 0x2603c7, + 0x32d088, + 0x3b38c8, + 0x20a107, + 0x20e3c6, + 0x22cc07, + 0x24d903, + 0x310e04, + 0x383405, + 0x3af807, + 0x3bae09, + 0x2f5e08, + 0x235f45, + 0x362784, + 0x250245, + 0x25ca8d, 0x200cc2, - 0x2bca46, - 0x2eaf06, - 0x308cca, - 0x39a786, - 0x3a3345, - 0x26d6c5, - 0x26d6c7, - 0x3a5fcc, - 0x256e0a, - 0x28f246, - 0x2e1d85, - 0x2ecb86, - 0x28f507, - 0x291246, - 0x293c4c, - 0x221909, - 0x5e20fa07, - 0x29a9c5, - 0x29a9c6, - 0x29ae08, - 0x2c4005, - 0x2aab45, - 0x2ab848, - 0x2aba4a, - 0x5e67b8c2, - 0x5ea09e42, - 0x355fc5, - 0x237643, - 0x326008, - 0x228703, - 0x2abcc4, - 0x312c4b, - 0x36f688, - 0x2b9648, - 0x5ef03cc9, - 0x2b1009, - 0x2b19c6, - 0x2b2788, - 0x2b2989, - 0x2b3806, - 0x2b3985, - 0x246c06, - 0x2b4749, - 0x2c8947, - 0x38e386, - 0x20af47, - 0x345fc7, - 0x207584, - 0x5f2d1909, - 0x24ad08, - 0x2b7388, - 0x2257c7, - 0x2d5946, - 0x3d0f49, - 0x24e7c7, - 0x24a58a, - 0x32ed08, - 0x3bb707, - 0x3d0606, - 0x2f0e0a, - 0x23df48, - 0x2ea985, - 0x227b85, - 0x3cbc87, - 0x3190c9, - 0x31cf0b, - 0x351f08, - 0x344049, - 0x24fb47, - 0x2c2bcc, - 0x2c3bcc, - 0x2c3eca, - 0x2c414c, - 0x2cc348, - 0x2cc548, - 0x2cc744, - 0x2ce109, - 0x2ce349, - 0x2ce58a, - 0x2ce809, - 0x2ceb87, - 0x3bec0c, - 0x3d2406, - 0x26ccc8, - 0x266206, - 0x38fe86, - 0x391b47, - 0x3a1088, - 0x3debcb, - 0x295247, - 0x257549, - 0x25ba49, - 0x2844c7, - 0x2cca04, - 0x200fc7, - 0x2f0806, - 0x20e486, - 0x24c845, - 0x2f7d48, - 0x26c544, - 0x26c546, - 0x256ccb, - 0x2b3449, - 0x235686, - 0x2e4009, - 0x20b1c6, - 0x345048, - 0x210543, - 0x30bd85, - 0x21a9c9, - 0x21c7c5, - 0x30e1c4, - 0x275d46, - 0x235a05, - 0x254306, - 0x319a07, - 0x247946, - 0x22c2cb, - 0x3c5987, - 0x3a28c6, - 0x2730c6, - 0x22d606, - 0x34c889, - 0x3b604a, - 0x2c58c5, - 0x3d6f8d, - 0x2abb46, - 0x23c346, - 0x2e6f86, - 0x21e5c5, - 0x2f1507, - 0x228ec7, - 0x27390e, - 0x23c803, - 0x2d5909, - 0x297289, - 0x22d287, - 0x26bbc7, - 0x2919c5, - 0x367b05, - 0x5f60210f, - 0x2db607, - 0x2db7c8, - 0x2dbb84, - 0x2dc046, - 0x5fa45402, - 0x2e01c6, - 0x2e2406, - 0x29744e, - 0x2e378a, - 0x207106, - 0x2b7c0a, - 0x3c7709, - 0x2fbe85, - 0x2ee188, - 0x3cbb46, - 0x2b7188, - 0x202ac8, - 0x277fcb, - 0x395f85, - 0x26f748, - 0x3dda4c, - 0x301207, - 0x24eb46, - 0x30c2c8, - 0x3de888, - 0x5fe30a42, - 0x21504b, - 0x205c89, - 0x28d989, - 0x21c647, - 0x3b5dc8, - 0x603d32c8, - 0x20934b, - 0x349bc9, - 0x25b18d, - 0x202908, - 0x2f1008, - 0x60604042, - 0x20d5c4, - 0x60a2aec2, - 0x3cd9c6, - 0x60e01282, - 0x2fbc8a, - 0x2a3806, - 0x34bd48, - 0x3c6908, - 0x3d9746, - 0x2ba946, - 0x3054c6, - 0x2ab045, - 0x239e44, - 0x6122ae04, - 0x359946, - 0x276247, - 0x6160d8c7, - 0x278b4b, - 0x295589, - 0x27bc0a, - 0x26d804, - 0x2f3b08, - 0x38e14d, - 0x2fc409, - 0x2fc648, - 0x2fc8c9, - 0x2fe7c4, - 0x2aae04, - 0x38d205, - 0x346f0b, - 0x36f606, - 0x359785, - 0x236209, - 0x31e6c8, - 0x22af84, - 0x327249, - 0x24a345, - 0x2dbdc8, - 0x2cd8c7, - 0x2889c8, - 0x281006, - 0x3ba447, - 0x2e6b09, - 0x3c9289, - 0x21d705, - 0x3682c5, - 0x61a1e342, - 0x31b244, - 0x21fe85, - 0x395d86, - 0x346905, - 0x244b07, - 0x359a45, - 0x276844, - 0x3487c6, - 0x254587, - 0x238f46, - 0x30a945, - 0x217108, - 0x35c7c5, - 0x21a847, - 0x2277c9, - 0x2b358a, - 0x264cc7, - 0x264ccc, - 0x265406, - 0x2423c9, - 0x31f045, - 0x369188, - 0x211ec3, - 0x398c45, - 0x3b9285, - 0x27b207, - 0x61e08dc2, - 0x2f8087, - 0x2eea86, - 0x38dc46, - 0x2f6146, - 0x3de7c6, - 0x230988, - 0x2d0145, - 0x31e1c7, - 0x31e1cd, - 0x210883, - 0x3d28c5, - 0x270007, - 0x2f83c8, - 0x26fbc5, - 0x214408, - 0x37cf06, - 0x2e50c7, - 0x2d4605, - 0x396006, - 0x393c45, - 0x20ba0a, - 0x310586, - 0x2645c7, - 0x2c9485, - 0x3a8a87, - 0x3cdb04, - 0x30e146, - 0x3cba85, - 0x39a18b, - 0x2f0689, - 0x27ef0a, - 0x21d788, - 0x314248, - 0x31968c, - 0x31adc7, - 0x330a08, - 0x335d88, - 0x3382c5, - 0x358dca, - 0x361049, - 0x62203242, - 0x2945c6, - 0x25c9c4, - 0x2fa949, - 0x35d749, - 0x2451c7, - 0x29b947, - 0x2bfb09, - 0x2ffe08, - 0x2ffe0f, - 0x21b5c6, - 0x2e4bcb, - 0x259dc5, - 0x259dc7, - 0x37bd49, - 0x20c8c6, - 0x3271c7, - 0x2e9105, - 0x230484, - 0x2f5006, - 0x220904, - 0x2f9c47, - 0x321c88, - 0x6270bb08, + 0x2ce4c6, + 0x2f7986, + 0x30820a, + 0x3a0e06, + 0x3aa945, + 0x2e95c5, + 0x2e95c7, + 0x3adc0c, + 0x25720a, + 0x294d06, + 0x2e4185, + 0x303886, + 0x294fc7, + 0x296986, + 0x298dcc, + 0x222dc9, + 0x5f626207, + 0x29ae85, + 0x29ae86, + 0x29bb48, + 0x2ca185, + 0x2ac785, + 0x2ad148, + 0x2ad34a, + 0x5fa295c2, + 0x5fe0b942, + 0x309d85, + 0x26a483, + 0x32a308, + 0x210503, + 0x2ad5c4, + 0x35d30b, + 0x2a78c8, + 0x384648, + 0x6034b7c9, + 0x2b48c9, + 0x2b51c6, + 0x2b6b48, + 0x2b6d49, + 0x2b7a86, + 0x2b7c05, + 0x248486, + 0x2b8589, + 0x2cd607, + 0x394746, + 0x21b347, + 0x2014c7, + 0x213f04, + 0x6067f8c9, + 0x2bcec8, + 0x2bb088, + 0x200e07, + 0x2d7c86, + 0x205a89, + 0x24e6c7, + 0x3c250a, + 0x3c8108, + 0x2131c7, + 0x2180c6, + 0x2a114a, + 0x32a708, + 0x2f7405, + 0x225a05, + 0x3d12c7, + 0x3264c9, + 0x32878b, + 0x39be48, + 0x37ec09, + 0x250487, + 0x2c94cc, + 0x2c9d4c, + 0x2ca04a, + 0x2ca2cc, + 0x2d3d88, + 0x2d3f88, + 0x2d4184, + 0x2d4549, + 0x2d4789, + 0x2d49ca, + 0x2d4c49, + 0x2d4fc7, + 0x3c91cc, + 0x3dc686, + 0x2723c8, + 0x26d786, + 0x3957c6, + 0x397347, + 0x3a8708, + 0x22a28b, + 0x206b87, + 0x257809, + 0x288349, + 0x2a4e07, + 0x2e9344, + 0x269087, + 0x39b786, + 0x2128c6, + 0x2ed205, + 0x2f9848, + 0x317044, + 0x317046, + 0x2570cb, + 0x2af909, + 0x385c06, + 0x267a49, + 0x210206, + 0x249088, + 0x20eb03, + 0x30da85, + 0x219849, + 0x214445, + 0x3b9e84, + 0x3d25c6, + 0x308005, + 0x20a686, + 0x31d587, + 0x355006, + 0x22c6cb, + 0x2040c7, + 0x3a9c46, + 0x278c86, + 0x22f646, + 0x26b749, + 0x3b5e0a, + 0x2cb445, + 0x205e0d, + 0x2ad446, + 0x239446, + 0x2e8b06, + 0x220d45, + 0x2f2107, + 0x30b4c7, + 0x2794ce, + 0x23cb03, + 0x2d7c49, + 0x324b49, + 0x22f2c7, + 0x271a47, + 0x2703c5, + 0x294145, + 0x60bb494f, + 0x2ddc07, + 0x2dddc8, + 0x2de184, + 0x2de646, + 0x60e46b42, + 0x2e2386, + 0x2e4806, + 0x3b564e, + 0x2f510a, + 0x2bb906, + 0x218d4a, + 0x203889, + 0x23c7c5, + 0x312d08, + 0x33dd86, + 0x2ba948, + 0x36aac8, + 0x28238b, + 0x39cc05, + 0x2762c8, + 0x20318c, + 0x302f47, + 0x24f986, + 0x30e908, + 0x229f48, + 0x6123bec2, + 0x20c70b, + 0x209089, + 0x2bf709, + 0x21a747, + 0x3c3088, + 0x6161cf48, + 0x21d84b, + 0x34bd89, + 0x28be0d, + 0x3802c8, + 0x2a1348, + 0x61a09282, + 0x228644, + 0x61e30242, + 0x3b9cc6, + 0x62200e42, + 0x2fd7ca, + 0x364486, + 0x267388, + 0x3cea88, + 0x3e1bc6, + 0x2c06c6, + 0x306246, + 0x2acc85, + 0x239dc4, + 0x62768e04, + 0x35f2c6, + 0x277a47, + 0x62a810c7, + 0x24ed8b, + 0x206ec9, + 0x33640a, + 0x2f4dc4, + 0x2e9708, + 0x39450d, + 0x2fe709, + 0x2fe948, + 0x2febc9, + 0x300ac4, + 0x266344, + 0x393505, + 0x33f0cb, + 0x2a7846, + 0x35f105, + 0x236dc9, + 0x2d2548, + 0x2aa9c4, + 0x316549, + 0x3c22c5, + 0x2de3c8, + 0x355f87, + 0x348bc8, + 0x288a06, + 0x20f5c7, + 0x2e8689, + 0x3c33c9, + 0x226705, + 0x23b4c5, + 0x62e13242, + 0x321744, + 0x232345, + 0x39ca06, + 0x33eac5, + 0x23fa07, + 0x35f3c5, + 0x27c5c4, + 0x371306, + 0x247bc7, + 0x238e46, 0x30c645, - 0x30c787, - 0x324389, - 0x20d184, - 0x241048, - 0x62bd0448, - 0x2e6f04, - 0x31d648, - 0x295a04, - 0x3b6349, - 0x21e505, - 0x62e33442, - 0x21b605, - 0x2dd945, - 0x289548, - 0x233a07, - 0x632008c2, - 0x22af45, - 0x2de0c6, - 0x243906, - 0x31b208, - 0x338fc8, - 0x3468c6, - 0x34afc6, - 0x306a09, - 0x38db86, - 0x20c78b, - 0x3c2705, - 0x2ac8c6, - 0x3c4a88, - 0x33f6c6, - 0x224786, - 0x216bca, - 0x2df94a, - 0x248a45, - 0x30ce07, - 0x274586, - 0x63603642, - 0x270147, - 0x33c305, - 0x304584, - 0x304585, - 0x2f3a06, - 0x272c47, - 0x203945, - 0x2dfac4, - 0x352248, - 0x224845, - 0x37ae87, - 0x3ca445, - 0x20b945, - 0x2d2904, - 0x2d2909, - 0x2ff2c8, - 0x23a5c6, - 0x35aa06, - 0x302d06, - 0x63bd5b08, - 0x311d07, - 0x31234d, - 0x312f0c, - 0x313509, - 0x313749, - 0x63f75442, - 0x3d4a03, - 0x2010c3, - 0x2f08c5, - 0x3a784a, - 0x338e86, - 0x23cec5, - 0x31a504, - 0x31a50b, - 0x32d64c, - 0x32df0c, - 0x32e215, - 0x32f70d, - 0x33208f, - 0x332452, - 0x3328cf, - 0x332c92, - 0x333113, - 0x3335cd, - 0x333b8d, - 0x333f0e, - 0x33480e, - 0x334e0c, - 0x3351cc, - 0x33560b, - 0x33668e, - 0x336f92, - 0x338c4c, - 0x3391d0, - 0x34cfd2, - 0x34e08c, - 0x34e74d, - 0x34ea8c, - 0x351591, - 0x35280d, - 0x3546cd, - 0x354cca, - 0x354f4c, - 0x35890c, - 0x35948c, - 0x359e8c, - 0x35df93, - 0x35e710, - 0x35eb10, - 0x35f10d, + 0x214048, + 0x361a85, + 0x21e147, + 0x225209, + 0x2afa4a, + 0x266f07, + 0x266f0c, + 0x267c46, + 0x23df09, + 0x248085, + 0x2d2ec8, + 0x202443, + 0x2f2d05, + 0x3c0e45, + 0x282fc7, + 0x63201242, + 0x2f9b87, + 0x2f0906, + 0x3862c6, + 0x2f2586, + 0x229e86, + 0x23be08, + 0x27e105, + 0x2d2047, + 0x2d204d, + 0x20ee43, + 0x3dcb45, + 0x276b87, + 0x2f9ec8, + 0x276745, + 0x216bc8, + 0x382e86, + 0x29c107, + 0x2d6945, + 0x39cc86, + 0x399445, + 0x21ef4a, + 0x301b46, + 0x274587, + 0x2ce285, + 0x310687, + 0x35a584, + 0x3b9e06, + 0x312c45, + 0x33544b, + 0x39b609, + 0x281cca, + 0x226788, + 0x393f88, + 0x31408c, + 0x3d8d07, + 0x31c848, + 0x31ecc8, + 0x32b9c5, + 0x35c18a, + 0x35f4c9, + 0x63600ec2, + 0x20b086, + 0x260d44, + 0x2fc549, + 0x240e89, + 0x246907, + 0x27bfc7, + 0x29cd49, + 0x33e348, + 0x33e34f, + 0x22d606, + 0x2e6ccb, + 0x256845, + 0x256847, + 0x381cc9, + 0x21fe06, + 0x3164c7, + 0x2eb805, + 0x232004, + 0x307ec6, + 0x206244, + 0x3ba247, + 0x3792c8, + 0x63b0d808, + 0x30fa05, + 0x30fb47, + 0x3532c9, + 0x20c4c4, + 0x241948, + 0x63e653c8, + 0x2e8a84, + 0x2f6dc8, + 0x25f184, + 0x206109, + 0x220c85, + 0x6422dc42, + 0x22d645, + 0x2dfd45, + 0x2600c8, + 0x234c07, + 0x646008c2, + 0x3c7a85, + 0x2e04c6, + 0x24d186, + 0x321708, + 0x31f148, + 0x33ea86, + 0x34a046, + 0x30a149, + 0x386206, + 0x21fccb, + 0x229d05, + 0x2af286, + 0x368048, + 0x34ae46, + 0x2bc246, + 0x2178ca, + 0x2e1b0a, + 0x23eb45, + 0x29c787, + 0x27a146, + 0x64a034c2, + 0x276cc7, + 0x367145, + 0x305304, + 0x305305, + 0x2f4cc6, + 0x278807, + 0x21ac85, + 0x240f44, + 0x2c3708, + 0x2bc305, + 0x37a987, + 0x3808c5, + 0x21ee85, + 0x245744, + 0x245749, + 0x3015c8, + 0x359586, + 0x358846, + 0x363f06, + 0x64fcfc08, + 0x3d8b87, + 0x31474d, + 0x314f0c, + 0x315509, + 0x315749, + 0x65379942, + 0x3d7403, + 0x20e483, + 0x39b845, + 0x3af90a, + 0x33e946, + 0x2365c5, + 0x31e244, + 0x31e24b, + 0x33384c, + 0x33410c, + 0x334415, + 0x335e0d, + 0x337e8f, + 0x338252, + 0x3386cf, + 0x338a92, + 0x338f13, + 0x3393cd, + 0x33998d, + 0x339d0e, + 0x33a60e, + 0x33ac0c, + 0x33afcc, + 0x33b40b, + 0x33be8e, + 0x33c792, + 0x33e70c, + 0x3403d0, + 0x34e4d2, + 0x34f54c, + 0x34fc0d, + 0x34ff4c, + 0x3524d1, + 0x35398d, + 0x35ae4d, + 0x35b44a, + 0x35b6cc, + 0x35e60c, + 0x35ee0c, 0x35f70c, - 0x360549, - 0x36224d, - 0x362593, - 0x364111, - 0x364913, - 0x36560f, - 0x3659cc, - 0x365ccf, - 0x36608d, - 0x36668f, - 0x366a50, - 0x3674ce, - 0x36b40e, - 0x36ba90, - 0x36d08d, - 0x36da0e, - 0x36dd8c, - 0x36ed53, - 0x37268e, - 0x372c10, - 0x373011, - 0x37344f, - 0x373813, - 0x374fcd, - 0x37530f, - 0x3756ce, - 0x375c50, - 0x376049, - 0x3773d0, - 0x3778cf, - 0x377f4f, - 0x378312, - 0x3792ce, - 0x37a00d, - 0x37a54d, - 0x37a88d, - 0x37bf8d, - 0x37c2cd, - 0x37c610, - 0x37ca0b, - 0x37d24c, - 0x37d5cc, - 0x37dbcc, - 0x37dece, - 0x38d350, - 0x38f7d2, - 0x38fc4b, - 0x39078e, - 0x390b0e, - 0x39138e, - 0x39190b, - 0x64391d96, - 0x39268d, - 0x393214, - 0x393f0d, - 0x3955d5, - 0x3978cd, - 0x39824f, - 0x398e0f, - 0x39c24f, - 0x39c60e, - 0x39c98d, - 0x39e251, - 0x3a084c, - 0x3a0b4c, - 0x3a0e4b, - 0x3a128c, - 0x3a1ccf, - 0x3a2092, - 0x3a2bcd, - 0x3a470c, - 0x3a500c, - 0x3a530d, - 0x3a564f, - 0x3a5a0e, - 0x3a750c, - 0x3a7acd, - 0x3a7e0b, - 0x3a8c4c, - 0x3a954d, - 0x3a988e, - 0x3a9c09, - 0x3abb53, - 0x3ac94d, - 0x3ad04d, - 0x3ad64c, - 0x3ae88e, - 0x3aef8f, - 0x3af34c, - 0x3af64d, - 0x3af98f, - 0x3afd4c, - 0x3b034c, - 0x3b080c, - 0x3b0b0c, - 0x3b35cd, - 0x3b3912, - 0x3b45cc, - 0x3b48cc, - 0x3b4bd1, - 0x3b500f, - 0x3b53cf, - 0x3b5793, - 0x3b6f8e, - 0x3b730f, - 0x3b76cc, - 0x647b7d8e, - 0x3b810f, - 0x3b84d6, - 0x3bae52, - 0x3bcccc, - 0x3bdb8f, - 0x3be20d, - 0x3c94cf, - 0x3c988c, - 0x3c9b8d, - 0x3c9ecd, - 0x3cb4ce, - 0x3cc38c, - 0x3ceecc, - 0x3cf1d0, - 0x3d3d91, - 0x3d41cb, - 0x3d460c, - 0x3d490e, - 0x3d6011, - 0x3d644e, - 0x3d67cd, - 0x3dbc0b, - 0x3dc88f, - 0x3dd454, - 0x23c782, - 0x23c782, - 0x23e083, - 0x23c782, - 0x23e083, - 0x23c782, - 0x203802, - 0x246c45, - 0x3d5d0c, - 0x23c782, - 0x23c782, - 0x203802, - 0x23c782, - 0x29b485, - 0x2b3585, - 0x23c782, - 0x23c782, - 0x201542, - 0x29b485, - 0x32fec9, - 0x363e0c, - 0x23c782, - 0x23c782, - 0x23c782, - 0x23c782, - 0x246c45, - 0x23c782, - 0x23c782, - 0x23c782, - 0x23c782, - 0x201542, - 0x32fec9, - 0x23c782, - 0x23c782, - 0x23c782, - 0x2b3585, - 0x23c782, - 0x2b3585, - 0x363e0c, - 0x3d5d0c, - 0x202703, - 0x214a83, - 0x232dc3, - 0x308003, - 0x221dc4, - 0x21a3c3, - 0x242543, - 0x1d904f, - 0x145988, - 0x1a704, - 0x3dc3, - 0x86808, - 0x1cc203, + 0x362e93, + 0x363610, + 0x363a10, + 0x36460d, + 0x364c0c, + 0x365a49, + 0x3697cd, + 0x369b13, + 0x36b451, + 0x36bc53, + 0x36c94f, + 0x36cd0c, + 0x36d00f, + 0x36d3cd, + 0x36d9cf, + 0x36dd90, + 0x36e80e, + 0x37198e, + 0x3722d0, + 0x37318d, + 0x373b0e, + 0x373e8c, + 0x374fd3, + 0x37768e, + 0x377c10, + 0x378011, + 0x37844f, + 0x378813, + 0x3794cd, + 0x37980f, + 0x379bce, + 0x37a150, + 0x37a549, + 0x37bc90, + 0x37c18f, + 0x37c80f, + 0x37cbd2, + 0x37f68e, + 0x3804cd, + 0x380a0d, + 0x380d4d, + 0x381f0d, + 0x38224d, + 0x382590, + 0x38298b, + 0x3831cc, + 0x38354c, + 0x383b4c, + 0x383e4e, + 0x393650, + 0x395112, + 0x39558b, + 0x395f8e, + 0x39630e, + 0x396b8e, + 0x39710b, + 0x65797596, + 0x397e8d, + 0x398a14, + 0x39970d, + 0x39c255, + 0x39ea0d, + 0x39f38f, + 0x39fb4f, + 0x3a2bcf, + 0x3a2f8e, + 0x3a330d, + 0x3a4891, + 0x3a7ecc, + 0x3a81cc, + 0x3a84cb, + 0x3a890c, + 0x3a904f, + 0x3a9412, + 0x3aa1cd, + 0x3abe8c, + 0x3acc4c, + 0x3acf4d, + 0x3ad28f, + 0x3ad64e, + 0x3af5cc, + 0x3afb8d, + 0x3afecb, + 0x3b078c, + 0x3b108d, + 0x3b13ce, + 0x3b1749, + 0x3b2dd3, + 0x3b688d, + 0x3b6f8d, + 0x3b758c, + 0x3b7c0e, + 0x3b830f, + 0x3b86cc, + 0x3b89cd, + 0x3b8d0f, + 0x3b90cc, + 0x3ba40c, + 0x3ba8cc, + 0x3babcc, + 0x3bbb8d, + 0x3bbed2, + 0x3bc64c, + 0x3bc94c, + 0x3bcc51, + 0x3bd08f, + 0x3bd44f, + 0x3bd813, + 0x3be60e, + 0x3be98f, + 0x3bed4c, + 0x65bbf40e, + 0x3bf78f, + 0x3bfb56, + 0x3c1bd2, + 0x3c440c, + 0x3c4d8f, + 0x3c540d, + 0x3cec8f, + 0x3cf04c, + 0x3cf34d, + 0x3cf68d, + 0x3d0d4e, + 0x3d19cc, + 0x3d420c, + 0x3d4510, + 0x3d6791, + 0x3d6bcb, + 0x3d700c, + 0x3d730e, + 0x3d91d1, + 0x3d960e, + 0x3d998d, + 0x3de2cb, + 0x3debcf, + 0x3dfa54, + 0x23ca82, + 0x23ca82, + 0x203183, + 0x23ca82, + 0x203183, + 0x23ca82, + 0x201082, + 0x2484c5, + 0x3d8ecc, + 0x23ca82, + 0x23ca82, + 0x201082, + 0x23ca82, + 0x29c945, + 0x2afa45, + 0x23ca82, + 0x23ca82, + 0x208a02, + 0x29c945, + 0x336689, + 0x36b14c, + 0x23ca82, + 0x23ca82, + 0x23ca82, + 0x23ca82, + 0x2484c5, + 0x23ca82, + 0x23ca82, + 0x23ca82, + 0x23ca82, + 0x208a02, + 0x336689, + 0x23ca82, + 0x23ca82, + 0x23ca82, + 0x2afa45, + 0x23ca82, + 0x2afa45, + 0x36b14c, + 0x3d8ecc, + 0x24ac43, + 0x22ea43, + 0x233fc3, + 0x266a83, + 0x20e704, + 0x217fc3, + 0x23e083, + 0x1e14cf, + 0x1b4508, + 0x6704, + 0x5803, + 0x8efc8, + 0x1d1843, 0x2000c2, - 0x65601242, - 0x240983, - 0x224c84, - 0x207083, - 0x384584, - 0x22f7c6, - 0x310c83, - 0x310c44, - 0x2f0b05, - 0x23c803, - 0x21a3c3, - 0x1b4103, - 0x242543, - 0x21e2ca, - 0x252b06, - 0x390e8c, - 0x9a048, - 0x201242, - 0x214a83, - 0x232dc3, - 0x308003, - 0x2137c3, - 0x2e2406, - 0x21a3c3, - 0x242543, - 0x2141c3, - 0x2fb03, - 0xac508, - 0x661d2145, - 0x47d47, - 0x139b05, - 0x156c9, - 0x1742, - 0x13a14a, - 0x66fa0505, - 0x139b05, - 0x29907, - 0x6dfc8, - 0x9c4e, - 0x8b392, - 0x9630b, - 0x10d806, - 0x6728d505, - 0x6768d50c, - 0x13d547, - 0x17e707, - 0x12364a, - 0x3be50, - 0x146145, - 0x10fe4b, - 0x79108, - 0x25687, - 0x2490b, - 0x33249, - 0x46e07, - 0x15c087, - 0xc2487, - 0x34a06, - 0x106c8, - 0x67c28886, - 0x47207, - 0x18ec46, - 0x78d8d, - 0xf3c90, - 0x680aac82, - 0xd1288, - 0x40350, - 0x17f5cc, - 0x687825cd, - 0x5a988, - 0x5ae0b, - 0x6b187, - 0x70749, - 0x56306, - 0x9b008, - 0x3ee42, - 0x9218a, - 0x157647, - 0x107c07, - 0xacdc9, - 0xaff88, - 0xf3605, - 0x18d986, - 0x1ba1c6, - 0xfd84e, - 0xaf88e, - 0x3874f, - 0x41a89, - 0xf0c09, - 0x91d0b, - 0xb3b4f, - 0xbd08c, - 0xca18b, - 0x131388, - 0x171887, - 0x197088, - 0xb580b, - 0xb5bcc, - 0xb5fcc, - 0xb63cc, - 0xb66cd, - 0x1b1148, - 0x52e82, - 0x193a49, - 0x112988, - 0x19fe8b, - 0xd5b46, - 0xdda8b, - 0x136acb, - 0xe884a, - 0xea585, - 0xf1210, - 0xf5c86, - 0x184806, - 0x97805, - 0x91487, - 0xe0448, - 0xf92c7, - 0xf9587, - 0x12c807, - 0xc7346, - 0x1cd80a, - 0x99eca, - 0x11ec6, - 0xb130d, - 0x472c8, - 0x115488, - 0x115cc9, - 0xc0545, - 0x1aec8c, - 0xb68cb, - 0x86fc9, - 0x1ccb44, - 0x111949, - 0x111b86, - 0x4cec6, - 0x3c686, - 0x1b82, - 0x365c6, - 0x13dacb, - 0x129187, - 0x11ac47, - 0x1442, - 0xd7445, - 0x27e04, + 0x66a12402, + 0x241283, + 0x25a584, + 0x2033c3, + 0x38a0c4, + 0x231346, + 0x222743, + 0x3d2484, + 0x3517c5, + 0x23cb03, + 0x217fc3, + 0x1c0443, + 0x23e083, + 0x226e0a, + 0x2509c6, + 0x39668c, + 0xae888, + 0x212402, + 0x22ea43, + 0x233fc3, + 0x266a83, + 0x215f83, + 0x2e4806, + 0x217fc3, + 0x23e083, + 0x216983, + 0xe783, + 0xaeec8, + 0x675dc3c5, + 0x49647, + 0x146bc5, + 0xcd89, + 0x8c02, + 0x1c73ca, + 0x683a7b85, + 0x146bc5, + 0x1683c7, + 0x74f88, + 0xb74e, + 0x90d92, + 0x123bcb, + 0x110ac6, + 0x686bd285, + 0x68abf28c, + 0x149147, + 0x178d87, + 0x127eca, + 0x3c290, + 0x1645, + 0xc634b, + 0x10f508, + 0x35cc7, + 0xbc3cb, + 0x34449, + 0x48687, + 0x161347, + 0xef347, + 0x35c06, + 0xec88, + 0x69036fc6, + 0x3dc87, + 0x176b06, + 0x4efcd, + 0xe9890, + 0x694293c2, + 0x7f248, + 0x8c550, + 0x184e8c, + 0x69b8794d, + 0x5a388, + 0x5a80b, + 0x71007, + 0x96d89, + 0x56546, + 0x9bd48, + 0x5b542, + 0x1b21ca, + 0x65a87, + 0xb4e07, + 0xafcc9, + 0xb3108, + 0xf48c5, + 0x193c86, + 0x1c2e06, + 0xffb4e, + 0xef90e, + 0x18ee0f, + 0x33449, + 0x860c9, + 0x1b1d4b, + 0xb538f, + 0xc470c, + 0xcfe0b, + 0x11d1c8, + 0x16f747, + 0x194c88, + 0x1a8c8b, + 0xb920c, + 0xb960c, + 0xb9a0c, + 0xb9d0d, + 0x1bb208, + 0x50d42, + 0x199249, + 0x15d048, + 0x1de00b, + 0xd7e86, + 0xdfe8b, + 0x13c2cb, + 0xeaf4a, + 0xec7c5, + 0xf1e10, + 0xf6a46, + 0x155146, + 0x1b5a05, + 0x19dfc7, + 0xe2608, + 0xfadc7, + 0xfb087, + 0x1416c7, + 0xccec6, + 0x1b9b0a, + 0xae70a, + 0x13a06, + 0xb4bcd, + 0x3dd48, + 0x118088, + 0x1188c9, + 0xc7c05, + 0x1b800c, + 0xb9f0b, + 0x15ca49, + 0x1d1204, + 0x114389, + 0x1145c6, + 0x156786, + 0x3c986, + 0x72c2, + 0x134c46, + 0x1496cb, + 0x11e987, + 0x11eb47, + 0x3602, + 0xd9785, + 0x2de44, 0x101, - 0x4fd83, - 0x67a37806, - 0x9b383, + 0x506c3, + 0x68e6a646, + 0x9c0c3, 0x382, - 0x26bc4, + 0x2b104, 0xac2, - 0xd3684, + 0x4cd44, 0x882, - 0x31c2, - 0x16c2, - 0x20f82, - 0x86c2, - 0x8d502, + 0x7282, + 0x6c02, + 0x10bf02, + 0xcf02, + 0xbd282, 0xd42, - 0x167c2, - 0x373c2, - 0x5582, - 0x2a42, - 0x4e782, - 0x32dc3, + 0x161e82, + 0x37402, + 0xda02, + 0xf982, + 0x4e682, + 0x33fc3, 0x942, - 0x3c42, - 0xdec2, - 0x5dc2, + 0x31c2, + 0xfa02, + 0x91c2, 0x642, - 0x315c2, - 0x6502, - 0x5bc2, - 0xf42, + 0x32702, + 0xb5c2, + 0x8fc2, + 0xf782, 0x5c2, - 0x1bc83, - 0x4582, - 0x7882, - 0x49582, - 0x1e42, - 0x2042, - 0x8282, - 0x23502, - 0x17c2, - 0x9e82, - 0x3f82, - 0x6c9c2, - 0x15402, - 0x1a3c3, + 0x191c3, + 0x4b82, + 0x22c2, + 0x4b202, + 0x6902, + 0x2702, + 0xa682, + 0x4202, + 0x8c82, + 0xb982, + 0x193b42, + 0x720c2, + 0xcac2, + 0x17fc3, 0x602, - 0x30a42, - 0x2902, - 0x1ad42, - 0x1d685, - 0xa882, - 0x14b42, - 0x3d383, + 0x3bec2, + 0x2542, + 0x35c2, + 0x26685, + 0x4fc2, + 0x42c42, + 0x3d583, 0x682, - 0xca42, - 0x45c2, - 0x7842, - 0x2f82, + 0xd782, + 0x2442, + 0xab02, + 0xee42, 0x8c2, - 0xc2c2, - 0x1b82, - 0x1805, - 0x68a03802, - 0x68edf283, - 0xf283, - 0x69203802, - 0xf283, - 0x74c47, - 0x201503, + 0x4642, + 0x72c2, + 0x8cc5, + 0x69e01082, + 0x6a2e82c3, + 0x1ac3, + 0x6a601082, + 0x1ac3, + 0x7a807, + 0x2089c3, 0x2000c2, - 0x214a83, - 0x232dc3, - 0x228503, + 0x22ea43, + 0x233fc3, + 0x280203, 0x2005c3, - 0x2137c3, - 0x21a3c3, - 0x203dc3, - 0x242543, - 0x29b3c3, - 0xc0584, - 0x19405, - 0x104305, - 0x3a83, - 0x9a048, - 0x214a83, - 0x232dc3, - 0x228503, - 0x23c803, - 0x21a3c3, - 0x203dc3, - 0x1b4103, - 0x242543, - 0x214a83, - 0x232dc3, - 0x242543, - 0x214a83, - 0x232dc3, - 0x308003, + 0x215f83, + 0x217fc3, + 0x205803, + 0x23e083, + 0x2bd443, + 0xc7c44, + 0x16acc5, + 0x105085, + 0x10103, + 0xae888, + 0x22ea43, + 0x233fc3, + 0x280203, + 0x23cb03, + 0x217fc3, + 0x205803, + 0x1c0443, + 0x23e083, + 0x22ea43, + 0x233fc3, + 0x23e083, + 0x22ea43, + 0x233fc3, + 0x266a83, 0x200181, - 0x23c803, - 0x21a3c3, - 0x24e283, - 0x242543, - 0x69944, - 0x202703, - 0x214a83, - 0x232dc3, - 0x218bc3, - 0x228503, - 0x2c26c3, - 0x208943, - 0x2a37c3, - 0x216243, - 0x308003, - 0x221dc4, - 0x21a3c3, - 0x242543, - 0x207783, - 0x204244, - 0x24f603, - 0x20dc3, - 0x29cfc3, - 0x328fc8, - 0x2f0e44, + 0x23cb03, + 0x217fc3, + 0x24dfc3, + 0x23e083, + 0x2f44, + 0x24ac43, + 0x22ea43, + 0x233fc3, + 0x275243, + 0x280203, + 0x2d2a83, + 0x2381c3, + 0x2a49c3, + 0x20d903, + 0x266a83, + 0x20e704, + 0x217fc3, + 0x23e083, + 0x20aa43, + 0x207d44, + 0x25cc83, + 0x33f03, + 0x238f43, + 0x32dac8, + 0x2a1184, 0x20020a, - 0x235406, - 0x124184, - 0x3a71c7, - 0x21ec8a, - 0x21b489, - 0x3bb287, - 0x3c024a, - 0x202703, - 0x35604b, - 0x216189, - 0x2f4245, - 0x3b0647, - 0x1242, - 0x214a83, - 0x20fcc7, - 0x263bc5, - 0x2cc8c9, - 0x232dc3, - 0x373ec6, - 0x2cb983, - 0xeeb03, - 0x118f86, - 0x98186, - 0x1d3bc7, - 0x212286, - 0x220fc5, - 0x205b47, - 0x316507, - 0x6bf08003, - 0x34e2c7, - 0x23c783, - 0x3d3905, - 0x221dc4, - 0x26f3c8, - 0x385acc, - 0x2b8d05, - 0x2aa446, - 0x20fb87, - 0x3b9887, - 0x3a2a07, - 0x248b48, - 0x317ccf, - 0x21b6c5, - 0x240a87, - 0x28e747, - 0x276e0a, - 0x37b549, - 0x3dd185, - 0x3212ca, - 0xc4ac6, - 0xc0a07, - 0x2cba05, - 0x2f6684, - 0x3d9686, - 0x101406, - 0x37f847, - 0x252d87, - 0x33b388, - 0x218405, - 0x263ac6, - 0x156ec8, - 0x2e3d85, - 0xe3f46, - 0x3268c5, - 0x28ce44, - 0x24a407, - 0x2307ca, - 0x23ab88, - 0x288e06, - 0x137c3, - 0x2ec0c5, - 0x320506, - 0x3bee46, - 0x297706, - 0x23c803, - 0x3a2e47, - 0x28e6c5, - 0x21a3c3, - 0x2e8b0d, - 0x203dc3, - 0x33b488, - 0x213484, - 0x276b05, - 0x2abd06, - 0x205406, - 0x2ac7c7, - 0x25b047, - 0x350ac5, - 0x242543, - 0x271d87, - 0x371989, - 0x2708c9, - 0x384a4a, - 0x215542, - 0x3d38c4, - 0x2fb304, - 0x2f7c07, - 0x2f7f48, - 0x2fa3c9, - 0x3d2789, - 0x2fadc7, - 0x109049, - 0x362f06, - 0xfd5c6, - 0x2fe7c4, - 0x22cf8a, - 0x302448, - 0x305389, - 0x305946, - 0x2bc745, - 0x23aa48, - 0x2d5dca, - 0x32bf03, - 0x2043c6, - 0x2faec7, - 0x35a785, - 0x3b4045, - 0x2432c3, - 0x23e804, - 0x227b45, - 0x2848c7, - 0x2ff405, - 0x2ff846, - 0x111e85, - 0x2071c3, - 0x2071c9, - 0x2768cc, - 0x2c61cc, - 0x3444c8, - 0x2ab3c7, - 0x30d588, - 0x10e747, - 0x30eaca, - 0x30f18b, - 0x2162c8, - 0x205508, - 0x22b686, - 0x302bc5, - 0x25d70a, - 0x2df2c5, - 0x233442, - 0x2d44c7, - 0x253c46, - 0x376785, - 0x310949, - 0x2d0405, - 0x372185, - 0x3c2409, - 0x320446, - 0x201348, - 0x3d39c3, - 0x20aa46, - 0x275c86, - 0x31cd05, - 0x31cd09, - 0x2c4709, - 0x25d487, - 0x11cb84, - 0x31cb87, - 0x3d2689, - 0x21ee85, - 0x39f48, - 0x349845, - 0x353885, - 0x39b489, - 0x204b42, - 0x357204, - 0x209282, - 0x204582, - 0x2ed985, - 0x323f08, - 0x2c0485, - 0x2ced43, - 0x2ced45, - 0x2e03c3, - 0x20a742, - 0x2b4384, - 0x269f03, + 0x385986, + 0x1530c4, + 0x3bc307, + 0x21bfca, + 0x22d4c9, + 0x3c7247, + 0x3c9c8a, + 0x24ac43, + 0x309e0b, + 0x20d849, + 0x2fde05, + 0x3ba707, + 0x12402, + 0x22ea43, + 0x2264c7, + 0x224685, + 0x2e9209, + 0x233fc3, + 0x23a086, + 0x2d3383, + 0xf0983, + 0x11bf06, + 0x8886, + 0x226c7, + 0x228c86, + 0x30bf45, + 0x208f47, + 0x319107, + 0x6d266a83, + 0x34f787, + 0x23ca83, + 0x21df05, + 0x20e704, + 0x275f48, + 0x3c410c, + 0x2be385, + 0x2ac086, + 0x226387, + 0x3c1447, + 0x269207, + 0x277008, + 0x31b18f, + 0x22d705, + 0x241387, + 0x211647, + 0x3caf0a, + 0x340009, + 0x32e945, + 0x34ef0a, + 0xdd286, + 0xc8087, + 0x2d3405, + 0x2f83c4, + 0x3e1b06, + 0x14e1c6, + 0x385107, + 0x250c47, + 0x3c5f48, + 0x212a05, + 0x224586, + 0x168688, + 0x2677c5, + 0x67986, + 0x2f5b85, + 0x267704, + 0x3c2387, + 0x23bc4a, + 0x2a6688, + 0x25f986, + 0x15f83, + 0x2ee705, + 0x354bc6, + 0x3c9406, + 0x3b5906, + 0x23cb03, + 0x3aa447, + 0x2115c5, + 0x217fc3, + 0x2eb20d, + 0x205803, + 0x3c6048, + 0x215c44, + 0x27c885, + 0x2ad606, + 0x358146, + 0x2af187, + 0x2a4a07, + 0x28dfc5, + 0x23e083, + 0x36f847, + 0x38a449, + 0x325009, + 0x3624ca, + 0x201b42, + 0x21dec4, + 0x304f84, + 0x2f9707, + 0x2f9a48, + 0x2fbfc9, + 0x3dca09, + 0x2fc9c7, + 0x108589, + 0x229446, + 0xff8c6, + 0x300ac4, + 0x22efca, + 0x304b08, + 0x306109, + 0x3066c6, + 0x2c3cc5, + 0x2a6548, + 0x2d810a, + 0x204343, + 0x207ec6, + 0x2fcac7, + 0x30f6c5, + 0x3c0385, + 0x243cc3, + 0x2ddf84, + 0x2259c5, + 0x28c247, + 0x301705, + 0x2f72c6, + 0x121dc5, + 0x288d83, + 0x2bb9c9, + 0x27c64c, + 0x2cbd4c, + 0x37f088, + 0x2a9f87, + 0x310848, + 0x111507, + 0x31188a, + 0x311f4b, + 0x20d988, + 0x358248, + 0x2524c6, + 0x31fdc5, + 0x25c4ca, + 0x2e8305, + 0x22dc42, + 0x2d6807, + 0x269f86, + 0x37b205, + 0x3d2189, + 0x27e3c5, + 0x388a05, + 0x229a09, + 0x325a46, + 0x37de88, + 0x270103, + 0x228dc6, + 0x3d2506, + 0x32dc85, + 0x32dc89, + 0x2ca889, + 0x25c247, + 0x120f44, + 0x320f47, + 0x3dc909, + 0x21c1c5, + 0x39ec8, + 0x37e245, + 0x371145, + 0x3b3609, + 0x201802, + 0x366984, + 0x20d2c2, + 0x204b82, + 0x320245, + 0x352e48, + 0x2c7b45, + 0x2d5183, + 0x2d5185, + 0x2e2583, + 0x20e202, + 0x2b5bc4, + 0x273cc3, 0x200a82, - 0x3b17c4, - 0x309703, - 0x20cb42, - 0x2c0503, - 0x211e44, - 0x305ac3, - 0x255544, - 0x205142, - 0x2140c3, - 0x21ab03, - 0x2071c2, - 0x294ec2, - 0x2c4549, - 0x205b02, - 0x28bec4, - 0x206542, - 0x23a8c4, - 0x362ec4, - 0x3b4384, - 0x201b82, - 0x22b2c2, - 0x22db03, - 0x29cec3, - 0x3269c4, - 0x3aa684, - 0x2dae84, - 0x2ea884, - 0x31bcc3, - 0x312743, - 0x2c4a44, - 0x31f184, - 0x31f2c6, - 0x21d642, - 0x1242, - 0x41483, - 0x201242, - 0x232dc3, - 0x308003, - 0x21a3c3, - 0x242543, - 0x6c05, + 0x2c1704, + 0x308c43, + 0x204ac2, + 0x2c7bc3, + 0x213984, + 0x306843, + 0x253cc4, + 0x207742, + 0x216883, + 0x218e43, + 0x2018c2, + 0x25cdc2, + 0x2ca6c9, + 0x208f02, + 0x291bc4, + 0x208742, + 0x3a9e44, + 0x229404, + 0x22aac4, + 0x2072c2, + 0x23d882, + 0x32aa83, + 0x26ac43, + 0x270184, + 0x2c7504, + 0x2ecac4, + 0x2fcc44, + 0x3210c3, + 0x35ce03, + 0x2dd204, + 0x3252c4, + 0x325406, + 0x226642, + 0x12402, + 0x41d83, + 0x212402, + 0x233fc3, + 0x266a83, + 0x217fc3, + 0x23e083, + 0x110c5, 0x2000c2, - 0x202703, - 0x214a83, - 0x232dc3, - 0x209b03, - 0x308003, - 0x221dc4, - 0x2c4804, - 0x219a04, - 0x21a3c3, - 0x242543, - 0x2141c3, - 0x2fedc4, - 0x297a83, - 0x2ad843, - 0x37a2c4, - 0x349646, - 0x210603, - 0x139b05, - 0x17e707, - 0x2d2c43, - 0x6da46f08, - 0x2532c3, - 0x2bb143, - 0x25cc03, - 0x2137c3, - 0x3c0ac5, - 0x1b0603, - 0x214a83, - 0x232dc3, - 0x308003, - 0x21a3c3, - 0x242543, - 0x20a883, - 0x22ee03, - 0x9a048, - 0x214a83, - 0x232dc3, - 0x308003, - 0x21bc83, - 0x21a3c3, - 0x2801c4, - 0x1b4103, - 0x242543, - 0x24a004, - 0x139b05, - 0x2c8f85, - 0x17e707, - 0x201242, - 0x2052c2, + 0x24ac43, + 0x22ea43, + 0x233fc3, + 0x203983, + 0x266a83, + 0x20e704, + 0x2ca984, + 0x21e484, + 0x217fc3, + 0x23e083, + 0x216983, + 0x3010c4, + 0x32f643, + 0x2b0743, + 0x380784, + 0x37e046, + 0x20ebc3, + 0x146bc5, + 0x178d87, + 0x226dc3, + 0x6ee10c08, + 0x24cbc3, + 0x2c1183, + 0x21df43, + 0x215f83, + 0x3c7985, + 0x1ba6c3, + 0x22ea43, + 0x233fc3, + 0x266a83, + 0x217fc3, + 0x23e083, + 0x210043, + 0x230743, + 0xae888, + 0x22ea43, + 0x233fc3, + 0x266a83, + 0x2191c3, + 0x217fc3, + 0x2878c4, + 0x1c0443, + 0x23e083, + 0x25d244, + 0x146bc5, + 0x2ce8c5, + 0x178d87, + 0x212402, + 0x204542, 0x200382, - 0x208482, - 0x3dc3, + 0x203182, + 0x5803, 0x2003c2, - 0x4f04, - 0x214a83, - 0x235b44, - 0x232dc3, - 0x308003, - 0x23c803, - 0x21a3c3, - 0x242543, - 0x9a048, - 0x214a83, - 0x232dc3, - 0x308003, - 0x23c803, - 0x219a04, - 0x21a3c3, - 0x3dc3, - 0x242543, - 0x20e2c3, - 0x2d3684, - 0x9a048, - 0x214a83, - 0x203dc3, - 0x3a83, - 0x122504, - 0x24c0c4, - 0x9a048, - 0x214a83, - 0x24d9c4, - 0x221dc4, - 0x203dc3, - 0x204042, - 0x1b4103, - 0x242543, - 0x22b983, - 0x3e804, - 0x208805, - 0x233442, - 0x325e43, - 0x68b49, - 0xe5986, - 0x149948, + 0x157c44, + 0x22ea43, + 0x236704, + 0x233fc3, + 0x266a83, + 0x23cb03, + 0x217fc3, + 0x23e083, + 0xae888, + 0x22ea43, + 0x233fc3, + 0x266a83, + 0x23cb03, + 0x21e484, + 0x217fc3, + 0x5803, + 0x23e083, + 0x208503, + 0x24cd44, + 0xae888, + 0x22ea43, + 0x205803, + 0x10103, + 0x126d84, + 0x241ec4, + 0xae888, + 0x22ea43, + 0x24d704, + 0x20e704, + 0x205803, + 0x209282, + 0x1c0443, + 0x23e083, + 0x235403, + 0xddf84, + 0x37b845, + 0x22dc42, + 0x32a143, + 0x2149, + 0xe7546, + 0x17e348, 0x2000c2, - 0x9a048, - 0x201242, - 0x232dc3, - 0x308003, + 0xae888, + 0x212402, + 0x233fc3, + 0x266a83, 0x2005c2, - 0x3dc3, - 0x242543, - 0x7c42, + 0x5803, + 0x23e083, + 0xa882, 0x82, 0xc2, - 0x1c0407, - 0x142c09, - 0x7aec3, - 0x9a048, - 0x20f43, - 0x713233c7, - 0x14a83, - 0x944c8, - 0x32dc3, - 0x108003, - 0x1ab9c6, - 0x1bc83, - 0x92788, - 0xcae48, - 0xcff06, - 0x3c803, - 0xd8cc8, - 0x44b83, - 0x714eb886, - 0xf1c05, - 0x32fc7, - 0x1a3c3, - 0x11003, - 0x42543, - 0xeb02, - 0x17cd0a, - 0x2cc3, - 0xeda43, - 0x10a104, - 0x117acb, - 0x118088, - 0x90602, - 0x14540c7, - 0x15636c7, - 0x14cee08, - 0x14cf583, - 0x143acb, - 0xb342, - 0x12bcc7, - 0x11b504, + 0x1c9e47, + 0x14b509, + 0x3043, + 0xae888, + 0x10bec3, + 0x72727c47, + 0x2ea43, + 0xaf88, + 0x33fc3, + 0x66a83, + 0x3fec6, + 0x191c3, + 0x56288, + 0xd0ac8, + 0x7dec6, + 0x729a7285, + 0x3cb03, + 0xdb008, + 0x3fa83, + 0x72cedbc6, + 0xf2ec5, + 0x124d04, + 0x341c7, + 0x17fc3, + 0x3443, + 0x3e083, + 0x1b02, + 0x182c8a, + 0x9c43, + 0x732c3f4c, + 0x120303, + 0x5d884, + 0x11af8b, + 0x11b548, + 0x95f42, + 0x17ff03, + 0x1454747, + 0x15b4247, + 0x14d5248, + 0x157ff03, + 0x18b7c8, + 0x156ecb, + 0x10382, + 0x131247, + 0x181584, 0x2000c2, - 0x201242, - 0x235b44, - 0x308003, - 0x23c803, - 0x21a3c3, - 0x242543, - 0x214a83, - 0x232dc3, - 0x308003, - 0x2137c3, - 0x21a3c3, - 0x242543, - 0x215d43, - 0x20e2c3, - 0x2fb03, - 0x214a83, - 0x232dc3, - 0x308003, - 0x21a3c3, - 0x242543, - 0x214a83, - 0x232dc3, - 0x308003, - 0x21a3c3, - 0x242543, + 0x212402, + 0x236704, + 0x266a83, + 0x23cb03, + 0x217fc3, + 0x23e083, + 0x22ea43, + 0x233fc3, + 0x266a83, + 0x215f83, + 0x217fc3, + 0x23e083, + 0x20d403, + 0x208503, + 0xe783, + 0x22ea43, + 0x233fc3, + 0x266a83, + 0x217fc3, + 0x23e083, + 0x22ea43, + 0x233fc3, + 0x266a83, + 0x217fc3, + 0x23e083, 0x602, - 0x3a83, - 0x108003, - 0x214a83, - 0x232dc3, - 0x308003, - 0x221dc4, - 0x2137c3, - 0x21a3c3, - 0x242543, - 0x20c782, + 0x10103, + 0x66a83, + 0x22ea43, + 0x233fc3, + 0x266a83, + 0x20e704, + 0x215f83, + 0x217fc3, + 0x23e083, + 0x21fcc2, 0x2000c1, 0x2000c2, 0x200201, - 0x332182, - 0x9a048, - 0x21ca05, + 0x337f82, + 0xae888, + 0x21aa05, 0x200101, - 0x14a83, - 0x2fe44, - 0x201301, + 0x2ea43, + 0x319c4, + 0x201381, 0x200501, - 0x205dc1, - 0x246bc2, - 0x387fc4, - 0x246bc3, + 0x201281, + 0x248442, + 0x38e084, + 0x248443, 0x200041, 0x200801, 0x200181, 0x200701, - 0x302fc7, - 0x30e38f, - 0x3ccc06, + 0x35c3c7, + 0x30fccf, + 0x39af46, 0x2004c1, - 0x322546, + 0x326dc6, 0x200bc1, 0x200581, - 0x3affce, + 0x3de50e, 0x2003c1, - 0x242543, + 0x23e083, 0x200a81, - 0x34c105, - 0x20eb02, - 0x2431c5, + 0x32b305, + 0x201b02, + 0x243bc5, 0x200401, 0x200741, 0x2007c1, - 0x233442, + 0x22dc42, 0x200081, - 0x201341, - 0x204f01, - 0x201b41, - 0x201441, - 0x50849, - 0x9a048, - 0x214a83, - 0x232dc3, - 0x308003, - 0x21a3c3, - 0x242543, - 0x214903, - 0x214a83, - 0x308003, - 0x90548, - 0x23c803, - 0x21a3c3, - 0x7283, - 0x242543, - 0x14f62c8, - 0x1e0603, - 0xa788, - 0x139b05, - 0x9a048, - 0x3dc3, - 0x139b05, - 0xcd184, - 0xd1488, - 0x455c4, - 0xcf487, - 0xd3b05, - 0x50849, - 0x11d287, - 0x14f62ca, - 0x9a048, - 0x1b4103, - 0x214a83, - 0x232dc3, - 0x308003, - 0x21a3c3, - 0x242543, - 0x220dc3, - 0x9a048, - 0x214a83, - 0x232dc3, - 0x2e3504, - 0x242543, - 0x24f8c5, - 0x2d0204, - 0x214a83, - 0x232dc3, - 0x308003, - 0x209e82, - 0x21a3c3, - 0x242543, - 0xe2c3, - 0xac60a, - 0xe8006, - 0x102804, - 0x122046, - 0x202703, - 0x214a83, - 0x232dc3, - 0x308003, - 0x21a3c3, - 0x242543, - 0x201242, - 0x214a83, - 0x2303c9, - 0x232dc3, - 0x2aa909, - 0x308003, - 0x23c803, - 0x21a3c3, - 0x78a84, - 0x3dc3, - 0x242543, - 0x2fe5c8, - 0x23c207, - 0x208805, - 0xdbc48, - 0x1d4408, - 0x1c0407, - 0xf81ca, - 0x6f98b, - 0x122787, - 0x3f888, - 0xd174a, - 0xf648, - 0x142c09, - 0x27a07, - 0x1fa87, - 0x3ec8, - 0x944c8, - 0x40d4f, - 0x3ad45, - 0x947c7, - 0x1ab9c6, - 0x3cd87, - 0x1dd2c6, - 0x92788, - 0x99786, - 0x1147, - 0x2fc9, - 0x18ab07, - 0x179dc9, - 0xc2749, - 0xc8d06, - 0xcae48, - 0xdbf05, - 0x7b74a, - 0xd8cc8, - 0x44b83, - 0xe07c8, - 0x32fc7, - 0x95d05, - 0x51590, - 0x11003, - 0x1b4103, - 0x2e47, - 0x1acc5, - 0xf9888, - 0x66605, - 0xeda43, - 0x1cb7c8, - 0xee06, - 0x32109, - 0xb2b87, - 0x68e0b, - 0x6cc44, - 0x111444, - 0x117acb, - 0x118088, - 0x118e87, - 0x139b05, - 0x214a83, - 0x232dc3, - 0x228503, - 0x242543, - 0x23e343, - 0x308003, - 0x1b4103, - 0x214a83, - 0x232dc3, - 0x308003, - 0x23c803, - 0x21a3c3, - 0x242543, - 0x91e4b, + 0x207d01, + 0x20a8c1, + 0x202341, + 0x201c41, + 0x51709, + 0xae888, + 0x22ea43, + 0x233fc3, + 0x266a83, + 0x217fc3, + 0x23e083, + 0x217c83, + 0x22ea43, + 0x266a83, + 0x95e88, + 0x23cb03, + 0x217fc3, + 0x91043, + 0x23e083, + 0x76ef8008, + 0x1e0f83, + 0xff48, + 0x10402, + 0xb9c3, + 0x293c2, + 0x72c2, + 0x146bc5, + 0xae888, + 0x11fe87, + 0x5803, + 0x146bc5, + 0x175d84, + 0x7f448, + 0x46d04, + 0x17fe07, + 0x1c4104, + 0xd5e45, + 0x51709, + 0x1424c7, + 0x5aa4a, + 0x14f800a, + 0xae888, + 0x1c0443, + 0x22ea43, + 0x233fc3, + 0x266a83, + 0x217fc3, + 0x23e083, + 0x233f03, + 0xae888, + 0x22ea43, + 0x233fc3, + 0x2e5904, + 0x23e083, + 0x24a845, + 0x27e1c4, + 0x22ea43, + 0x233fc3, + 0x266a83, + 0x20b982, + 0x217fc3, + 0x23e083, + 0x8503, + 0xaefca, + 0xea706, + 0x11fa04, + 0x1268c6, + 0x24ac43, + 0x22ea43, + 0x233fc3, + 0x266a83, + 0x217fc3, + 0x23e083, + 0x212402, + 0x22ea43, + 0x231f49, + 0x233fc3, + 0x2ac549, + 0x266a83, + 0x23cb03, + 0x217fc3, + 0x81004, + 0x5803, + 0x23e083, + 0x3008c8, + 0x239307, + 0x37b845, + 0xde248, + 0x1d6e08, + 0x1c9e47, + 0xf9cca, + 0x7650b, + 0x127007, + 0x40488, + 0x7f70a, + 0x25e48, + 0x14b509, + 0x25887, + 0x14dcc7, + 0x1b5208, + 0xaf88, + 0x4164f, + 0xa6845, + 0x148647, + 0x3fec6, + 0x36487, + 0x12ea86, + 0x56288, + 0x9a346, + 0x17dc87, + 0x1c1989, + 0x1cd6c7, + 0x19c009, + 0xc9049, + 0xce646, + 0xd0ac8, + 0xde505, + 0x8350a, + 0xdb008, + 0x3fa83, + 0xe2988, + 0x341c7, + 0x156b05, + 0x61950, + 0x3443, + 0x1c0443, + 0x17db07, + 0x2cd05, + 0xfb388, + 0x6db85, + 0x120303, + 0x1d1048, + 0xb2c06, + 0x33249, + 0xb6f47, + 0x240b, + 0x72344, + 0x113c44, + 0x11af8b, + 0x11b548, + 0x11be07, + 0x146bc5, + 0x22ea43, + 0x233fc3, + 0x280203, + 0x23e083, + 0x23e883, + 0x266a83, + 0x1c0443, + 0x22ea43, + 0x233fc3, + 0x266a83, + 0x23cb03, + 0x217fc3, + 0x23e083, + 0x1b1e8b, 0x2000c2, - 0x201242, - 0x242543, + 0x212402, + 0x23e083, 0xd42, - 0x9e82, - 0x7782, - 0x9a048, - 0x1b3089, - 0x1242, + 0xb982, + 0x83c2, + 0xae888, + 0x1357c9, + 0x18b7c8, + 0x12402, 0x2000c2, - 0x201242, + 0x212402, 0x200382, 0x2005c2, - 0x210942, - 0x21a3c3, - 0x13f246, + 0x204482, + 0x217fc3, + 0x14a9c6, 0x2003c2, - 0x3e804, + 0xddf84, 0x2000c2, - 0x202703, - 0x201242, - 0x214a83, - 0x232dc3, + 0x24ac43, + 0x212402, + 0x22ea43, + 0x233fc3, 0x200382, - 0x308003, - 0x21bc83, - 0x23c803, - 0x219a04, - 0x21a3c3, - 0x2125c3, - 0x3dc3, - 0x242543, - 0x30a104, - 0x207783, - 0x308003, - 0x201242, - 0x214a83, - 0x232dc3, - 0x308003, - 0x23c803, - 0x21a3c3, - 0x203dc3, - 0x242543, - 0x3bd187, - 0x214a83, - 0x27b0c7, - 0x397206, - 0x216c83, - 0x21bb43, - 0x308003, - 0x206c03, - 0x221dc4, - 0x28a404, - 0x3383c6, - 0x213a43, - 0x21a3c3, - 0x242543, - 0x24f8c5, - 0x2af384, - 0x323b43, - 0x2ce043, - 0x2d44c7, - 0x2cd845, - 0x68703, - 0x214a83, - 0x232dc3, - 0x308003, - 0x23c803, - 0x21a3c3, - 0x6e544, - 0x242543, - 0x14583, - 0x7c30988c, - 0x53547, - 0xe4846, - 0x91487, - 0x67f05, - 0x202b02, - 0x247403, - 0x214f03, - 0x202703, - 0x7ce14a83, - 0x208c02, - 0x232dc3, - 0x207083, - 0x308003, - 0x221dc4, - 0x2059c3, - 0x21b6c3, - 0x23c803, - 0x219a04, - 0x7d20ce02, - 0x21a3c3, - 0x242543, - 0x2308c3, - 0x21bd03, - 0x21a443, - 0x20c782, - 0x207783, - 0x9a048, - 0x308003, - 0x3a83, - 0x2135c4, - 0x202703, - 0x201242, - 0x214a83, - 0x235b44, - 0x232dc3, - 0x308003, - 0x221dc4, - 0x21bc83, - 0x3473c4, - 0x306c44, - 0x2e2406, - 0x219a04, - 0x21a3c3, - 0x242543, - 0x2141c3, - 0x253c46, - 0x34c8b, - 0x28886, - 0xec90a, - 0x11b94a, - 0x9a048, - 0x2136c4, - 0x7e614a83, - 0x2026c4, - 0x232dc3, - 0x270744, - 0x308003, - 0x2f3983, - 0x23c803, - 0x21a3c3, - 0x1b4103, - 0x242543, - 0x4cbc3, - 0x347f8b, - 0x3ca20a, - 0x3e010c, - 0xebe48, + 0x266a83, + 0x2191c3, + 0x23cb03, + 0x21e484, + 0x217fc3, + 0x213cc3, + 0x5803, + 0x23e083, + 0x25d884, + 0x20aa43, + 0x266a83, + 0x212402, + 0x22ea43, + 0x233fc3, + 0x266a83, + 0x23cb03, + 0x217fc3, + 0x205803, + 0x23e083, + 0x3c48c7, + 0x22ea43, + 0x282e87, + 0x394e06, + 0x208483, + 0x20fa03, + 0x266a83, + 0x204903, + 0x20e704, + 0x28f784, + 0x32bac6, + 0x208243, + 0x217fc3, + 0x23e083, + 0x24a845, + 0x2b21c4, + 0x3283c3, + 0x356703, + 0x2d6807, + 0x355f05, + 0x1d03, + 0x22ea43, + 0x233fc3, + 0x266a83, + 0x23cb03, + 0x217fc3, + 0x75504, + 0x23e083, + 0x16d43, + 0x7e308dcc, + 0x4e803, + 0x192c07, + 0xe6946, + 0x19dfc7, + 0x157585, + 0x222b02, + 0x23de83, + 0x20c5c3, + 0x24ac43, + 0x7ee2ea43, + 0x204302, + 0x233fc3, + 0x2033c3, + 0x266a83, + 0x20e704, + 0x3433c3, + 0x22d703, + 0x23cb03, + 0x21e484, + 0x7f216102, + 0x217fc3, + 0x23e083, + 0x204ac3, + 0x219243, + 0x218043, + 0x21fcc2, + 0x20aa43, + 0xae888, + 0x266a83, + 0x10103, + 0x215d84, + 0x24ac43, + 0x212402, + 0x22ea43, + 0x236704, + 0x233fc3, + 0x266a83, + 0x20e704, + 0x2191c3, + 0x33f584, + 0x217544, + 0x2e4806, + 0x21e484, + 0x217fc3, + 0x23e083, + 0x216983, + 0x269f86, + 0x3a9cb, + 0x36fc6, + 0xbd84a, + 0x11f48a, + 0xae888, + 0x215e84, + 0x8062ea43, + 0x37e504, + 0x233fc3, + 0x296d84, + 0x266a83, + 0x2f4c43, + 0x23cb03, + 0x217fc3, + 0x1c0443, + 0x23e083, + 0x54543, + 0x34a60b, + 0x3cf9ca, + 0x3e0a8c, + 0xee488, 0x2000c2, - 0x201242, + 0x212402, 0x200382, - 0x22d805, - 0x221dc4, - 0x209e82, - 0x23c803, - 0x306c44, - 0x208482, + 0x22f845, + 0x20e704, + 0x20b982, + 0x23cb03, + 0x217544, + 0x203182, 0x2003c2, - 0x2090c2, - 0x20c782, - 0x2703, - 0x15702, - 0x2cb209, - 0x365308, - 0x307e89, - 0x2073c9, - 0x20b40a, - 0x210f0a, - 0x206082, - 0x2167c2, - 0x1242, - 0x214a83, - 0x22ba02, - 0x240c46, - 0x377dc2, - 0x208d42, - 0x26fd0e, - 0x21410e, - 0x27e307, - 0x21a347, - 0x24dc82, - 0x232dc3, - 0x308003, - 0x210d82, + 0x208502, + 0x21fcc2, + 0x4ac43, + 0xcdc2, + 0x2d0e89, + 0x36c648, + 0x266909, + 0x213d49, + 0x2184ca, + 0x30aaca, + 0x209482, + 0x361e82, + 0x12402, + 0x22ea43, + 0x22c982, + 0x241546, + 0x37c682, + 0x2013c2, + 0x27688e, + 0x2168ce, + 0x217f47, + 0x211c42, + 0x233fc3, + 0x266a83, + 0x20f342, 0x2005c2, - 0x1bac3, - 0x235d4f, - 0x21fb02, - 0x2b8887, - 0x3520c7, - 0x2bc287, - 0x2e9ccc, - 0x2dc18c, - 0x20c304, - 0x38d04a, - 0x214042, - 0x201e42, - 0x2c5104, + 0xe703, + 0x23690f, + 0x241882, + 0x2c3587, + 0x2ec3c7, + 0x2de787, + 0x2e2b4c, + 0x2f024c, + 0x21f844, + 0x39334a, + 0x216802, + 0x206902, + 0x2cac84, 0x200702, - 0x2cc342, - 0x2dc3c4, - 0x20fe82, - 0x202042, - 0x1a8c3, - 0x299807, - 0x23a705, - 0x223502, - 0x23cd04, - 0x203f82, - 0x2eba08, - 0x21a3c3, - 0x376b08, - 0x2029c2, - 0x20c4c5, - 0x396e06, - 0x242543, - 0x20a882, - 0x2fa607, - 0xeb02, - 0x39e785, - 0x3c2f45, - 0x206442, - 0x20b382, - 0x33a90a, - 0x35094a, - 0x23c7c2, - 0x2a4284, - 0x203282, - 0x3d3788, - 0x20a5c2, - 0x359208, - 0xf01, - 0x314447, - 0x3149c9, - 0x2b7402, - 0x319985, - 0x3b9c45, - 0x2184cb, - 0x33894c, - 0x22c088, - 0x32bb08, - 0x21d642, - 0x2ac882, + 0x2c23c2, + 0x2f0484, + 0x214882, + 0x202702, + 0x1e1c3, + 0x29a3c7, + 0x30eac5, + 0x204202, + 0x236404, + 0x393b42, + 0x2edd48, + 0x217fc3, + 0x37b588, + 0x203242, + 0x21fa05, + 0x39da86, + 0x23e083, + 0x204fc2, + 0x2fc207, + 0x1b02, + 0x34bbc5, + 0x3dce85, + 0x20b502, + 0x206c82, + 0x34754a, + 0x28de4a, + 0x23cac2, + 0x2a39c4, + 0x200f02, + 0x21dd88, + 0x207ac2, + 0x31c248, + 0x1501, + 0x316b47, + 0x3175c9, + 0x2bb102, + 0x31d505, + 0x36ed45, + 0x212acb, + 0x32c04c, + 0x22c488, + 0x331088, + 0x226642, + 0x2af242, 0x2000c2, - 0x9a048, - 0x201242, - 0x214a83, + 0xae888, + 0x212402, + 0x22ea43, 0x200382, - 0x208482, - 0x3dc3, + 0x203182, + 0x5803, 0x2003c2, - 0x242543, - 0x2090c2, + 0x23e083, + 0x208502, 0x2000c2, - 0x139b05, - 0x7fa01242, - 0x1099c4, - 0x37e85, - 0x80708003, - 0x21a8c3, - 0x209e82, - 0x21a3c3, - 0x3b68c3, - 0x80a42543, - 0x2f7103, - 0x274d46, - 0x160e2c3, - 0x139b05, - 0x13f10b, - 0x9a048, - 0x7ff02e08, - 0x5c1c7, - 0x802c108a, - 0x6ddc7, - 0x97805, - 0x2a54d, - 0x8e242, - 0x118682, + 0x146bc5, + 0x81a12402, + 0x108f04, + 0x37e05, + 0x82a66a83, + 0x21e1c3, + 0x20b982, + 0x217fc3, + 0x3d6203, + 0x82e3e083, + 0x2f8e43, + 0x27a906, + 0x1608503, + 0x146bc5, + 0x14a88b, + 0xae888, + 0x81f64008, + 0x68f47, + 0x822c6aca, + 0x74d87, + 0x1b5a05, + 0x82600f89, + 0x2c10d, + 0x3fcc2, + 0x11bb42, 0xe01, - 0xad28a, - 0x150787, - 0x20c04, - 0x20c43, - 0x3c704, - 0x81202842, - 0x81600ac2, - 0x81a01182, - 0x81e02d02, - 0x82206b42, - 0x826086c2, - 0x17e707, - 0x82a01242, - 0x82e2ec02, - 0x8321f2c2, - 0x83602a42, - 0x214103, - 0xca04, - 0x22dcc3, - 0x83a0e442, - 0x5a988, - 0x83e015c2, - 0x4e2c7, - 0x1ad887, - 0x84200042, - 0x84600d82, - 0x84a00182, - 0x84e06182, - 0x85200f42, - 0x856005c2, - 0xf4185, - 0x24dec3, - 0x35c004, - 0x85a00702, - 0x85e14d42, - 0x86206002, - 0x7a04b, - 0x86600c42, - 0x86e01f42, - 0x87209e82, - 0x87610942, - 0x87a1d542, - 0x87e00bc2, - 0x88202382, - 0x8866c9c2, - 0x88a0ce02, - 0x88e03142, - 0x89208482, - 0x89637242, - 0x89a510c2, - 0x89e43802, - 0x5684, - 0x310543, - 0x8a200ec2, - 0x8a610e82, - 0x8aa0e742, - 0x8ae006c2, - 0x8b2003c2, - 0x8b600a82, - 0xf6bc8, - 0x91fc7, - 0x8ba141c2, - 0x8be06142, - 0x8c2090c2, - 0x8c6023c2, - 0x1aec8c, - 0x8ca02c02, - 0x8ce25b82, - 0x8d20f482, - 0x8d603642, - 0x8da00f02, - 0x8de0b582, - 0x8e201342, - 0x8e607302, - 0x8ea76002, - 0x8ee76542, - 0x215702, - 0x2059c3, - 0x223703, - 0x215702, - 0x2059c3, - 0x223703, - 0x215702, - 0x2059c3, - 0x223703, - 0x215702, - 0x2059c3, - 0x223703, - 0x215702, - 0x2059c3, - 0x223703, - 0x215702, - 0x2059c3, - 0x223703, - 0x215702, - 0x2059c3, - 0x223703, - 0x215702, - 0x2059c3, - 0x223703, - 0x215702, - 0x2059c3, - 0x223703, - 0x215702, - 0x2059c3, - 0x23703, - 0x215702, - 0x2059c3, - 0x223703, - 0x215702, - 0x2059c3, - 0x223703, - 0x215702, - 0x2059c3, - 0x223703, - 0x215702, - 0x223703, - 0x215702, - 0x2059c3, - 0x223703, - 0x215702, - 0x2059c3, - 0x223703, - 0x215702, - 0x2059c3, - 0x223703, - 0x215702, - 0x2059c3, - 0x223703, - 0x215702, - 0x2059c3, - 0x223703, - 0x215702, - 0x2059c3, - 0x223703, - 0x215702, - 0x2059c3, - 0x223703, - 0x215702, - 0x86a059c3, - 0x223703, - 0x3c0b44, - 0x307d86, - 0x306403, - 0x215702, - 0x2059c3, - 0x223703, - 0x215702, - 0x2059c3, - 0x223703, - 0x374689, - 0x215702, - 0x39b6c3, - 0x2c2a43, - 0x2894c5, - 0x207083, - 0x2059c3, - 0x223703, - 0x267d83, - 0x211243, - 0x3c4409, - 0x215702, - 0x2059c3, - 0x223703, - 0x215702, - 0x2059c3, - 0x223703, - 0x215702, - 0x2059c3, - 0x223703, - 0x215702, - 0x2059c3, - 0x223703, - 0x215702, - 0x2059c3, - 0x223703, - 0x215702, - 0x223703, - 0x215702, - 0x2059c3, - 0x223703, - 0x215702, - 0x2059c3, - 0x223703, - 0x215702, - 0x2059c3, - 0x223703, - 0x215702, - 0x2059c3, - 0x223703, - 0x215702, - 0x2059c3, - 0x223703, - 0x215702, - 0x2059c3, - 0x223703, - 0x215702, - 0x2059c3, - 0x223703, - 0x215702, - 0x2059c3, - 0x223703, - 0x215702, - 0x2059c3, - 0x223703, - 0x215702, - 0x2059c3, - 0x223703, - 0x215702, - 0x2059c3, - 0x223703, - 0x215702, - 0x223703, - 0x215702, - 0x2059c3, - 0x223703, - 0x215702, - 0x223703, - 0x215702, - 0x2059c3, - 0x223703, - 0x215702, - 0x2059c3, - 0x223703, - 0x215702, - 0x2059c3, - 0x223703, - 0x215702, - 0x2059c3, - 0x223703, - 0x215702, - 0x2059c3, - 0x223703, - 0x215702, - 0x2059c3, - 0x223703, - 0x215702, - 0x2059c3, - 0x223703, - 0x215702, - 0x2059c3, - 0x223703, - 0x215702, - 0x215702, - 0x2059c3, - 0x223703, - 0x8f614a83, - 0x232dc3, - 0x207603, - 0x23c803, - 0x21a3c3, - 0x3dc3, - 0x242543, - 0x9a048, - 0x201242, - 0x214a83, - 0x21a3c3, - 0x242543, - 0x141842, - 0x214a83, - 0x232dc3, - 0x308003, - 0x901192c2, - 0x23c803, - 0x21a3c3, - 0x3dc3, - 0x242543, - 0x1301, - 0x24c0c4, - 0x201242, - 0x214a83, + 0x107784, + 0xb018a, + 0x8dc87, + 0x10bb84, + 0x3ca03, + 0x3ca04, + 0x83603d82, + 0x83a00ac2, + 0x83e03502, + 0x84202e42, + 0x846074c2, + 0x84a0cf02, + 0x178d87, + 0x84e12402, + 0x85211d02, + 0x8561c782, + 0x85a0f982, + 0x2168c3, + 0x1ff44, + 0x28c543, + 0x85e12882, + 0x5a388, + 0x86207c82, + 0x4e007, + 0x1b77c7, + 0x86600042, + 0x86a00d82, + 0x86e00182, + 0x87209582, + 0x8760f782, + 0x87a005c2, + 0xfdd45, + 0x24dc03, + 0x3612c4, + 0x87e00702, + 0x8820a342, + 0x88601582, + 0x8d64b, + 0x88a00c42, + 0x89206a02, + 0x8960b982, + 0x89a04482, + 0x89e15782, + 0x8a200bc2, + 0x8a60a942, + 0x8aa720c2, + 0x8ae16102, + 0x8b201602, + 0x8b603182, + 0x8ba37282, + 0x8be05402, + 0x8c209ec2, + 0x1583c4, + 0x3169c3, + 0x8c634e42, + 0x8ca0f442, + 0x8ce03742, + 0x8d2006c2, + 0x8d6003c2, + 0x8da00a82, + 0xf8908, + 0x1b2007, + 0x8de16982, + 0x8e205302, + 0x8e608502, + 0x8ea0a1c2, + 0x1b800c, + 0x8ee03d02, + 0x8f224e42, + 0x8f601942, + 0x8fa034c2, + 0x8fe0e482, + 0x90203b02, + 0x90607d02, + 0x90a16382, + 0x90e7bcc2, + 0x9127c2c2, + 0x20cdc2, + 0x3433c3, + 0x2220c3, + 0x20cdc2, + 0x3433c3, + 0x2220c3, + 0x20cdc2, + 0x3433c3, + 0x2220c3, + 0x20cdc2, + 0x3433c3, + 0x2220c3, + 0x20cdc2, + 0x3433c3, + 0x2220c3, + 0x20cdc2, + 0x3433c3, + 0x2220c3, + 0x20cdc2, + 0x3433c3, + 0x2220c3, + 0x20cdc2, + 0x3433c3, + 0x2220c3, + 0x20cdc2, + 0x3433c3, + 0x2220c3, + 0x20cdc2, + 0x3433c3, + 0x220c3, + 0x20cdc2, + 0x3433c3, + 0x2220c3, + 0x20cdc2, + 0x3433c3, + 0x2220c3, + 0x20cdc2, + 0x3433c3, + 0x2220c3, + 0x20cdc2, + 0x2220c3, + 0x20cdc2, + 0x3433c3, + 0x2220c3, + 0x20cdc2, + 0x3433c3, + 0x2220c3, + 0x20cdc2, + 0x3433c3, + 0x2220c3, + 0x20cdc2, + 0x3433c3, + 0x2220c3, + 0x20cdc2, + 0x3433c3, + 0x2220c3, + 0x20cdc2, + 0x3433c3, + 0x2220c3, + 0x20cdc2, + 0x3433c3, + 0x2220c3, + 0x20cdc2, + 0x88f433c3, + 0x2220c3, + 0x3c7a04, + 0x266806, + 0x307183, + 0x20cdc2, + 0x3433c3, + 0x2220c3, + 0x20cdc2, + 0x3433c3, + 0x2220c3, + 0x26e9c9, + 0x20cdc2, + 0x3b3843, + 0x2c9343, + 0x260045, + 0x2033c3, + 0x3433c3, + 0x2220c3, + 0x2b8a83, + 0x20de03, + 0x3679c9, + 0x20cdc2, + 0x3433c3, + 0x2220c3, + 0x20cdc2, + 0x3433c3, + 0x2220c3, + 0x20cdc2, + 0x3433c3, + 0x2220c3, + 0x20cdc2, + 0x3433c3, + 0x2220c3, + 0x20cdc2, + 0x3433c3, + 0x2220c3, + 0x20cdc2, + 0x2220c3, + 0x20cdc2, + 0x3433c3, + 0x2220c3, + 0x20cdc2, + 0x3433c3, + 0x2220c3, + 0x20cdc2, + 0x3433c3, + 0x2220c3, + 0x20cdc2, + 0x3433c3, + 0x2220c3, + 0x20cdc2, + 0x3433c3, + 0x2220c3, + 0x20cdc2, + 0x3433c3, + 0x2220c3, + 0x20cdc2, + 0x3433c3, + 0x2220c3, + 0x20cdc2, + 0x3433c3, + 0x2220c3, + 0x20cdc2, + 0x3433c3, + 0x2220c3, + 0x20cdc2, + 0x3433c3, + 0x2220c3, + 0x20cdc2, + 0x3433c3, + 0x2220c3, + 0x20cdc2, + 0x2220c3, + 0x20cdc2, + 0x3433c3, + 0x2220c3, + 0x20cdc2, + 0x2220c3, + 0x20cdc2, + 0x3433c3, + 0x2220c3, + 0x20cdc2, + 0x3433c3, + 0x2220c3, + 0x20cdc2, + 0x3433c3, + 0x2220c3, + 0x20cdc2, + 0x3433c3, + 0x2220c3, + 0x20cdc2, + 0x3433c3, + 0x2220c3, + 0x20cdc2, + 0x3433c3, + 0x2220c3, + 0x20cdc2, + 0x3433c3, + 0x2220c3, + 0x20cdc2, + 0x3433c3, + 0x2220c3, + 0x20cdc2, + 0x20cdc2, + 0x3433c3, + 0x2220c3, + 0x91a2ea43, + 0x233fc3, + 0x213f83, + 0x23cb03, + 0x217fc3, + 0x5803, + 0x23e083, + 0xae888, + 0x212402, + 0x22ea43, + 0x217fc3, + 0x23e083, + 0x6e842, + 0x22ea43, + 0x233fc3, + 0x266a83, + 0x924f6e82, + 0x23cb03, + 0x217fc3, + 0x5803, + 0x23e083, + 0x1381, + 0x241ec4, + 0x212402, + 0x22ea43, 0x200983, - 0x232dc3, - 0x24d9c4, - 0x228503, - 0x308003, - 0x221dc4, - 0x21bc83, - 0x23c803, - 0x21a3c3, - 0x242543, - 0x22b983, - 0x208805, - 0x211243, - 0x207783, + 0x233fc3, + 0x24d704, + 0x280203, + 0x266a83, + 0x20e704, + 0x2191c3, + 0x23cb03, + 0x217fc3, + 0x23e083, + 0x235403, + 0x37b845, + 0x20de03, + 0x20aa43, 0x882, - 0x3dc3, - 0x201242, - 0x214a83, - 0x2059c3, - 0x21a3c3, - 0x242543, + 0x5803, + 0x212402, + 0x22ea43, + 0x3433c3, + 0x217fc3, + 0x23e083, 0x2000c2, - 0x202703, - 0x9a048, - 0x214a83, - 0x232dc3, - 0x308003, - 0x22f7c6, - 0x221dc4, - 0x21bc83, - 0x219a04, - 0x21a3c3, - 0x242543, - 0x2141c3, - 0x29904, - 0x214a83, - 0x239c3, - 0x232dc3, - 0x9e82, - 0x21a3c3, - 0x242543, - 0x2aec2, - 0x2982, - 0x147ee07, - 0x1807, - 0x214a83, - 0x28886, - 0x232dc3, - 0x308003, - 0xedf86, - 0x21a3c3, - 0x242543, - 0x328e48, - 0x32b949, - 0x33e209, - 0x34ae08, - 0x399488, - 0x399489, - 0x322c0a, - 0x3602ca, - 0x39424a, - 0x39abca, - 0x3ca20a, - 0x3d818b, - 0x30838d, - 0x23fd4f, - 0x35d210, - 0x361d4d, - 0x37d8cc, - 0x39a90b, - 0x6dfc8, - 0x11d548, - 0x19d705, - 0x1486107, - 0xd7445, + 0x24ac43, + 0xae888, + 0x22ea43, + 0x233fc3, + 0x266a83, + 0x231346, + 0x20e704, + 0x2191c3, + 0x21e484, + 0x217fc3, + 0x23e083, + 0x216983, + 0x4cc4, + 0x161e82, + 0x22ea43, + 0x22383, + 0x233fc3, + 0xb982, + 0x217fc3, + 0x23e083, + 0x30242, + 0x2a82, + 0x1481bc7, + 0x8cc7, + 0x22ea43, + 0x36fc6, + 0x233fc3, + 0x266a83, + 0xf07c6, + 0x217fc3, + 0x23e083, + 0x32d948, + 0x330ec9, + 0x341dc9, + 0x34cfc8, + 0x3a01c8, + 0x3a01c9, + 0x32748a, + 0x3657ca, + 0x399a4a, + 0x3a124a, + 0x3cf9ca, + 0x3db28b, + 0x26604d, + 0x230b0f, + 0x240950, + 0x3692cd, + 0x38384c, + 0x3a0f8b, + 0x74f88, + 0xf6cc8, + 0xbe1c5, + 0x148e8c7, + 0xd9785, 0x2000c2, - 0x2cd685, - 0x202003, - 0x93601242, - 0x232dc3, - 0x308003, - 0x27e7c7, - 0x25cc03, - 0x23c803, - 0x21a3c3, - 0x24e283, - 0x2125c3, - 0x206a03, - 0x203dc3, - 0x242543, - 0x252b06, - 0x233442, - 0x207783, - 0x9a048, + 0x355d45, + 0x21e183, + 0x95a12402, + 0x233fc3, + 0x266a83, + 0x232b87, + 0x21df43, + 0x23cb03, + 0x217fc3, + 0x24dfc3, + 0x213cc3, + 0x210ec3, + 0x205803, + 0x23e083, + 0x2509c6, + 0x22dc42, + 0x20aa43, + 0xae888, 0x2000c2, - 0x202703, - 0x201242, - 0x214a83, - 0x232dc3, - 0x308003, - 0x221dc4, - 0x23c803, - 0x21a3c3, - 0x242543, - 0x20e2c3, - 0x1807, - 0xb342, - 0x68b44, - 0x151c306, + 0x24ac43, + 0x212402, + 0x22ea43, + 0x233fc3, + 0x266a83, + 0x20e704, + 0x23cb03, + 0x217fc3, + 0x23e083, + 0x208503, + 0x8cc7, + 0x10382, + 0x2144, + 0x1517446, 0x2000c2, - 0x201242, - 0x308003, - 0x23c803, - 0x242543, + 0x212402, + 0x266a83, + 0x23cb03, + 0x23e083, } // children is the list of nodes' children, the parent's wildcard bit and the @@ -9554,597 +9614,606 @@ var children = [...]uint32{ 0x40000000, 0x50000000, 0x60000000, - 0x17ec5f5, - 0x17f05fb, - 0x17f45fc, - 0x18185fd, - 0x1970606, - 0x198865c, - 0x199c662, - 0x19b4667, - 0x19d466d, - 0x19f4675, - 0x1a0c67d, - 0x1a2c683, - 0x1a3068b, - 0x1a5868c, + 0x17d05ee, + 0x17d45f4, + 0x17d85f5, + 0x17fc5f6, + 0x19545ff, + 0x196c655, + 0x198065b, + 0x1998660, + 0x19b8666, + 0x19d866e, + 0x19f0676, + 0x1a1067c, + 0x1a14684, + 0x1a3c685, + 0x1a4068f, + 0x1a58690, 0x1a5c696, - 0x1a74697, - 0x1a7869d, - 0x1a7c69e, - 0x1ab869f, - 0x1abc6ae, - 0x1ac06af, - 0x61ac86b0, - 0x21ad06b2, - 0x1b186b4, - 0x1b1c6c6, - 0x1b406c7, - 0x1b446d0, + 0x1a60697, + 0x1aa0698, + 0x1aa46a8, + 0x1aa86a9, + 0x21aac6aa, + 0x61ab46ab, + 0x21abc6ad, + 0x1b046af, + 0x1b086c1, + 0x1b2c6c2, + 0x1b306cb, + 0x1b446cc, 0x1b486d1, - 0x1b5c6d2, - 0x1b606d7, - 0x1b806d8, - 0x1bb06e0, - 0x1bcc6ec, - 0x1bf46f3, - 0x1c046fd, - 0x1c08701, - 0x1ca0702, - 0x1cb4728, - 0x1cc872d, - 0x1d00732, - 0x1d10740, - 0x1d24744, - 0x1d3c749, - 0x1de074f, - 0x1fe4778, - 0x1fe87f9, - 0x20547fa, - 0x20c0815, - 0x20d8830, - 0x20ec836, - 0x20f083b, - 0x20f883c, - 0x210c83e, - 0x2110843, - 0x2130844, - 0x218084c, - 0x2184860, - 0x22188861, - 0x21a4862, - 0x21a8869, - 0x21ac86a, - 0x21d086b, - 0x2214874, - 0x2218885, - 0x6221c886, - 0x2238887, - 0x226488e, - 0x2270899, - 0x228089c, - 0x23348a0, - 0x23388cd, - 0x223488ce, - 0x2234c8d2, - 0x223548d3, - 0x23ac8d5, - 0x23b08eb, - 0x23b48ec, - 0x28dc8ed, - 0x28e0a37, - 0x22988a38, - 0x2298ca62, - 0x22990a63, - 0x2299ca64, - 0x229a0a67, - 0x229aca68, - 0x229b0a6b, - 0x229b4a6c, - 0x229b8a6d, - 0x229bca6e, - 0x229c0a6f, - 0x229cca70, - 0x229d0a73, - 0x229dca74, - 0x229e0a77, - 0x229e4a78, - 0x229e8a79, - 0x229f4a7a, - 0x229f8a7d, - 0x22a04a7e, - 0x22a08a81, - 0x22a0ca82, + 0x1b686d2, + 0x1b986da, + 0x1bb46e6, + 0x1bdc6ed, + 0x1bec6f7, + 0x1bf06fb, + 0x1c886fc, + 0x1c9c722, + 0x1cb0727, + 0x1ce872c, + 0x1cf873a, + 0x1d0c73e, + 0x1d24743, + 0x1dc8749, + 0x1ffc772, + 0x20007ff, + 0x206c800, + 0x20d881b, + 0x20f0836, + 0x210483c, + 0x2108841, + 0x2110842, + 0x2124844, + 0x2128849, + 0x214884a, + 0x2198852, + 0x219c866, + 0x221a0867, + 0x21c0868, + 0x21c4870, + 0x21c8871, + 0x21f0872, + 0x621f487c, + 0x223887d, + 0x223c88e, + 0x6224088f, + 0x225c890, + 0x228c897, + 0x229c8a3, + 0x22ac8a7, + 0x23608ab, + 0x23648d8, + 0x223748d9, + 0x223788dd, + 0x223808de, + 0x23d88e0, + 0x23dc8f6, + 0x23e08f7, + 0x29348f8, + 0x2938a4d, + 0x62940a4e, + 0x229e8a50, + 0x229eca7a, + 0x229f0a7b, + 0x229fca7c, + 0x22a00a7f, + 0x22a0ca80, 0x22a10a83, - 0x2a14a84, + 0x22a14a84, 0x22a18a85, - 0x22a24a86, - 0x22a28a89, - 0x2a2ca8a, - 0x2a34a8b, - 0x62a40a8d, - 0x2a84a90, - 0x22aa4aa1, - 0x22aa8aa9, - 0x22aacaaa, - 0x22ab0aab, - 0x22ab8aac, - 0x22abcaae, - 0x2ac0aaf, - 0x22ac4ab0, - 0x22ac8ab1, - 0x22accab2, - 0x22ad0ab3, - 0x2ad8ab4, - 0x2ae0ab6, - 0x2ae4ab8, - 0x2b00ab9, - 0x2b18ac0, - 0x2b1cac6, - 0x2b2cac7, - 0x2b38acb, - 0x2b6cace, - 0x2b74adb, - 0x22b78add, - 0x2b90ade, - 0x22b98ae4, - 0x22b9cae6, - 0x22ba4ae7, - 0x2ca0ae9, - 0x22ca4b28, - 0x2cacb29, - 0x2cb0b2b, - 0x22cb4b2c, - 0x2cb8b2d, - 0x2ce0b2e, - 0x2ce4b38, - 0x2ce8b39, - 0x2cecb3a, - 0x2d04b3b, - 0x2d18b41, - 0x2d40b46, - 0x2d60b50, - 0x2d64b58, - 0x62d68b59, - 0x2d9cb5a, - 0x2da0b67, - 0x22da4b68, - 0x2da8b69, - 0x2dd0b6a, - 0x2dd4b74, - 0x2df8b75, - 0x2dfcb7e, - 0x2e10b7f, - 0x2e14b84, - 0x2e18b85, - 0x2e38b86, - 0x2e54b8e, + 0x22a1ca86, + 0x22a20a87, + 0x22a2ca88, + 0x22a30a8b, + 0x22a3ca8c, + 0x22a40a8f, + 0x22a44a90, + 0x22a48a91, + 0x22a54a92, + 0x22a58a95, + 0x22a64a96, + 0x22a68a99, + 0x22a6ca9a, + 0x22a70a9b, + 0x2a74a9c, + 0x22a78a9d, + 0x22a84a9e, + 0x22a88aa1, + 0x2a8caa2, + 0x2a94aa3, + 0x62aa0aa5, + 0x2ae4aa8, + 0x22b04ab9, + 0x22b08ac1, + 0x22b0cac2, + 0x22b10ac3, + 0x22b14ac4, + 0x22b1cac5, + 0x22b20ac7, + 0x2b24ac8, + 0x22b44ac9, + 0x22b48ad1, + 0x22b4cad2, + 0x22b50ad3, + 0x22b54ad4, + 0x22b58ad5, + 0x2b60ad6, + 0x2b68ad8, + 0x2b6cada, + 0x2b88adb, + 0x2ba0ae2, + 0x2ba4ae8, + 0x2bb4ae9, + 0x2bc0aed, + 0x2bf4af0, + 0x2bfcafd, + 0x22c00aff, + 0x2c18b00, + 0x22c20b06, + 0x22c24b08, + 0x22c2cb09, + 0x2d28b0b, + 0x22d2cb4a, + 0x2d34b4b, + 0x2d38b4d, + 0x22d3cb4e, + 0x2d40b4f, + 0x2d68b50, + 0x2d6cb5a, + 0x2d70b5b, + 0x2d88b5c, + 0x2d9cb62, + 0x2dc4b67, + 0x2de4b71, + 0x2de8b79, + 0x62decb7a, + 0x2e20b7b, + 0x2e24b88, + 0x22e28b89, + 0x2e2cb8a, + 0x2e54b8b, 0x2e58b95, - 0x22e5cb96, - 0x2e60b97, - 0x2e64b98, - 0x2e68b99, - 0x2e70b9a, - 0x2e84b9c, - 0x2e88ba1, - 0x2e8cba2, - 0x2eb4ba3, - 0x2eb8bad, - 0x2f2cbae, - 0x2f30bcb, - 0x2f34bcc, - 0x2f54bcd, - 0x2f6cbd5, - 0x2f70bdb, - 0x2f84bdc, - 0x2f9cbe1, - 0x2fbcbe7, - 0x2fd4bef, - 0x2fd8bf5, - 0x2ff4bf6, - 0x3010bfd, - 0x3014c04, - 0x3040c05, - 0x3060c10, - 0x3080c18, - 0x30e4c20, + 0x2e7cb96, + 0x2e80b9f, + 0x2e94ba0, + 0x2e98ba5, + 0x2e9cba6, + 0x2ebcba7, + 0x2ed8baf, + 0x2edcbb6, + 0x22ee0bb7, + 0x2ee4bb8, + 0x2ee8bb9, + 0x2eecbba, + 0x2ef4bbb, + 0x2f08bbd, + 0x2f0cbc2, + 0x2f10bc3, + 0x2f38bc4, + 0x2f3cbce, + 0x2fb0bcf, + 0x2fb4bec, + 0x2fb8bed, + 0x2fd8bee, + 0x2ff0bf6, + 0x2ff4bfc, + 0x3008bfd, + 0x3020c02, + 0x3040c08, + 0x3058c10, + 0x305cc16, + 0x3078c17, + 0x3094c1e, + 0x3098c25, + 0x30c4c26, + 0x30e4c31, 0x3104c39, - 0x3120c41, - 0x3124c48, - 0x313cc49, - 0x3180c4f, - 0x3200c60, - 0x3230c80, - 0x3234c8c, - 0x3240c8d, - 0x3260c90, - 0x3264c98, - 0x3288c99, - 0x3290ca2, - 0x32ccca4, - 0x3320cb3, - 0x3324cc8, - 0x3328cc9, - 0x3404cca, - 0x2340cd01, - 0x23410d03, - 0x23414d04, - 0x3418d05, - 0x2341cd06, - 0x23420d07, - 0x3424d08, - 0x23428d09, - 0x23438d0a, - 0x2343cd0e, - 0x23440d0f, - 0x23444d10, - 0x23448d11, - 0x2344cd12, - 0x3464d13, - 0x3488d19, - 0x34a8d22, - 0x3b14d2a, - 0x3b20ec5, - 0x3b40ec8, - 0x3d00ed0, - 0x3dd0f40, - 0x3e40f74, - 0x3e98f90, - 0x3f80fa6, - 0x3fd8fe0, - 0x4014ff6, - 0x4111005, - 0x41dd044, - 0x4275077, - 0x430509d, - 0x43690c1, - 0x45a10da, - 0x4659168, - 0x4725196, - 0x47711c9, - 0x47f91dc, - 0x48351fe, - 0x488520d, - 0x48fd221, - 0x6490123f, - 0x64905240, - 0x64909241, - 0x4985242, - 0x49e1261, - 0x4a5d278, - 0x4ad5297, - 0x4b552b5, - 0x4bc12d5, - 0x4ced2f0, - 0x4d4533b, - 0x64d49351, - 0x4de1352, - 0x4de9378, - 0x24ded37a, - 0x4e7537b, - 0x4ec139d, - 0x4f293b0, - 0x4fd13ca, - 0x50993f4, - 0x5101426, - 0x5215440, - 0x65219485, - 0x6521d486, - 0x5279487, - 0x52d549e, - 0x53654b5, - 0x53e14d9, - 0x54254f8, - 0x5509509, - 0x553d542, - 0x559d54f, - 0x5611567, - 0x5699584, - 0x56d95a6, - 0x57495b6, - 0x6574d5d2, - 0x57755d3, - 0x57795dd, - 0x57a95de, - 0x57c55ea, - 0x58095f1, - 0x5819602, - 0x5831606, - 0x58a960c, - 0x58b162a, - 0x58cd62c, - 0x58e1633, - 0x58fd638, - 0x592963f, - 0x592d64a, - 0x593564b, - 0x594964d, - 0x5969652, - 0x597965a, - 0x598565e, - 0x59c1661, - 0x59c9670, - 0x59dd672, - 0x5a05677, - 0x5a11681, - 0x5a19684, - 0x5a41686, - 0x5a65690, - 0x5a7d699, - 0x5a8169f, - 0x5a896a0, - 0x5a9d6a2, - 0x5b456a7, - 0x5b496d1, - 0x5b4d6d2, - 0x5b516d3, - 0x5b756d4, - 0x5b996dd, - 0x5bb56e6, - 0x5bc96ed, - 0x5bdd6f2, - 0x5be56f7, - 0x5bed6f9, - 0x5bf56fb, - 0x5c0d6fd, - 0x5c1d703, - 0x5c21707, - 0x5c3d708, - 0x64c570f, - 0x64fd931, - 0x652993f, - 0x654594a, - 0x6565951, - 0x6585959, - 0x65c9961, - 0x65d1972, - 0x265d5974, - 0x265d9975, - 0x65e1976, - 0x67cd978, - 0x267d19f3, - 0x67d59f4, - 0x267d99f5, - 0x267e99f6, - 0x267f19fa, - 0x267fd9fc, - 0x68019ff, - 0x26809a00, - 0x6811a02, - 0x6821a04, - 0x6849a08, - 0x6885a12, - 0x6889a21, - 0x68c1a22, - 0x68e5a30, - 0x743da39, - 0x7441d0f, - 0x7445d10, - 0x27449d11, - 0x744dd12, - 0x27451d13, - 0x7455d14, - 0x27461d15, - 0x7465d18, - 0x7469d19, - 0x2746dd1a, - 0x7471d1b, - 0x27479d1c, - 0x747dd1e, - 0x7481d1f, - 0x27491d20, - 0x7495d24, - 0x7499d25, - 0x749dd26, - 0x74a1d27, - 0x274a5d28, - 0x74a9d29, - 0x74add2a, - 0x74b1d2b, - 0x74b5d2c, - 0x274bdd2d, - 0x74c1d2f, - 0x74c5d30, - 0x74c9d31, - 0x274cdd32, - 0x74d1d33, - 0x274d9d34, - 0x274ddd36, - 0x74f9d37, - 0x7511d3e, - 0x7555d44, + 0x3168c41, + 0x3188c5a, + 0x31a8c62, + 0x31acc6a, + 0x31c4c6b, + 0x3208c71, + 0x3288c82, + 0x32b8ca2, + 0x32bccae, + 0x32c8caf, + 0x32e8cb2, + 0x32eccba, + 0x3310cbb, + 0x3318cc4, + 0x3354cc6, + 0x33a8cd5, + 0x33accea, + 0x33b0ceb, + 0x3494cec, + 0x2349cd25, + 0x234a0d27, + 0x234a4d28, + 0x34a8d29, + 0x234acd2a, + 0x234b0d2b, + 0x34b4d2c, + 0x234b8d2d, + 0x234c8d2e, + 0x234ccd32, + 0x234d0d33, + 0x234d4d34, + 0x234d8d35, + 0x234dcd36, + 0x34f4d37, + 0x3518d3d, + 0x3538d46, + 0x3ba4d4e, + 0x3bb0ee9, + 0x3bd0eec, + 0x3d90ef4, + 0x3e60f64, + 0x3ed0f98, + 0x3f28fb4, + 0x4010fca, + 0x4069004, + 0x40a501a, + 0x41a1029, + 0x426d068, + 0x430509b, + 0x43950c1, + 0x43f90e5, + 0x46310fe, + 0x46e918c, + 0x47b51ba, + 0x48011ed, + 0x4889200, + 0x48c5222, + 0x4915231, + 0x498d245, + 0x64991263, + 0x64995264, + 0x64999265, + 0x4a15266, + 0x4a71285, + 0x4aed29c, + 0x4b652bb, + 0x4be52d9, + 0x4c512f9, + 0x4d7d314, + 0x4dd535f, + 0x64dd9375, + 0x4e71376, + 0x4e7939c, + 0x24e7d39e, + 0x4f0539f, + 0x4f513c1, + 0x4fb93d4, + 0x50613ee, + 0x5129418, + 0x519144a, + 0x52a5464, + 0x652a94a9, + 0x652ad4aa, + 0x53094ab, + 0x53654c2, + 0x53f54d9, + 0x54714fd, + 0x54b551c, + 0x559952d, + 0x55cd566, + 0x562d573, + 0x56a158b, + 0x57295a8, + 0x57695ca, + 0x57d95da, + 0x657dd5f6, + 0x58055f7, + 0x5809601, + 0x5839602, + 0x585560e, + 0x5899615, + 0x58a9626, + 0x58c162a, + 0x5939630, + 0x594164e, + 0x595d650, + 0x5971657, + 0x598d65c, + 0x59b9663, + 0x59bd66e, + 0x59c566f, + 0x59d9671, + 0x59f9676, + 0x5a0967e, + 0x5a15682, + 0x5a51685, + 0x5a59694, + 0x5a6d696, + 0x5a9569b, + 0x5aa16a5, + 0x5aa96a8, + 0x5ad16aa, + 0x5af56b4, + 0x5b0d6bd, + 0x5b116c3, + 0x5b196c4, + 0x5b2d6c6, + 0x5bd56cb, + 0x5bd96f5, + 0x5bdd6f6, + 0x5be16f7, + 0x5c056f8, + 0x5c29701, + 0x5c4570a, + 0x5c59711, + 0x5c6d716, + 0x5c7571b, + 0x5c7d71d, + 0x5c8571f, + 0x5c9d721, + 0x5cad727, + 0x5cb172b, + 0x5ccd72c, + 0x6555733, + 0x658d955, + 0x65b9963, + 0x65d596e, + 0x65f5975, + 0x661597d, + 0x6659985, + 0x6661996, + 0x26665998, + 0x26669999, + 0x667199a, + 0x687199c, + 0x26875a1c, + 0x6879a1d, + 0x2687da1e, + 0x2688da1f, + 0x26895a23, + 0x268a1a25, + 0x68a5a28, + 0x268a9a29, + 0x268b1a2a, + 0x68b9a2c, + 0x68c9a2e, + 0x68f1a32, + 0x692da3c, + 0x6931a4b, + 0x6969a4c, + 0x698da5a, + 0x74e5a63, + 0x74e9d39, + 0x74edd3a, + 0x274f1d3b, + 0x74f5d3c, + 0x274f9d3d, + 0x74fdd3e, + 0x27509d3f, + 0x750dd42, + 0x7511d43, + 0x27515d44, + 0x7519d45, + 0x27521d46, + 0x7525d48, + 0x7529d49, + 0x27539d4a, + 0x753dd4e, + 0x7541d4f, + 0x7545d50, + 0x7549d51, + 0x2754dd52, + 0x7551d53, + 0x7555d54, 0x7559d55, - 0x757dd56, - 0x7589d5f, - 0x758dd62, - 0x7591d63, - 0x7755d64, - 0x27759dd5, - 0x27761dd6, - 0x27765dd8, - 0x27769dd9, - 0x7771dda, - 0x784dddc, - 0x27859e13, - 0x2785de16, - 0x27861e17, - 0x27865e18, - 0x7869e19, - 0x7895e1a, - 0x78a1e25, - 0x78a5e28, - 0x78c9e29, - 0x78d5e32, - 0x78f5e35, - 0x78f9e3d, - 0x7931e3e, - 0x7be1e4c, - 0x7c9def8, - 0x7ca1f27, - 0x7ca5f28, - 0x7cb9f29, - 0x7cbdf2e, - 0x7cf1f2f, - 0x7d29f3c, - 0x27d2df4a, - 0x7d49f4b, - 0x7d71f52, - 0x7d75f5c, - 0x7d99f5d, - 0x7db5f66, - 0x7dddf6d, - 0x7dedf77, - 0x7df1f7b, - 0x7df5f7c, - 0x7e2df7d, - 0x7e39f8b, - 0x7e61f8e, - 0x7ee1f98, - 0x27ee5fb8, - 0x7ef5fb9, - 0x7f05fbd, - 0x7f21fc1, - 0x7f41fc8, - 0x7f45fd0, - 0x7f59fd1, - 0x7f6dfd6, - 0x7f71fdb, - 0x7f75fdc, - 0x7f79fdd, - 0x7f99fde, - 0x8041fe6, - 0x8046010, - 0x8062011, - 0x808a018, - 0x808e022, - 0x8096023, - 0x80ba025, - 0x80c202e, - 0x80d6030, - 0x80f6035, - 0x811203d, - 0x8122044, - 0x813a048, - 0x817204e, - 0x817605c, - 0x824a05d, + 0x755dd56, + 0x27565d57, + 0x7569d59, + 0x756dd5a, + 0x7571d5b, + 0x27575d5c, + 0x7579d5d, + 0x27581d5e, + 0x27585d60, + 0x75a1d61, + 0x75b9d68, + 0x75fdd6e, + 0x7601d7f, + 0x7625d80, + 0x7631d89, + 0x7635d8c, + 0x7639d8d, + 0x77fdd8e, + 0x27801dff, + 0x27809e00, + 0x2780de02, + 0x27811e03, + 0x7819e04, + 0x78f5e06, + 0x27901e3d, + 0x27905e40, + 0x27909e41, + 0x2790de42, + 0x7911e43, + 0x793de44, + 0x7949e4f, + 0x794de52, + 0x7971e53, + 0x797de5c, + 0x799de5f, + 0x79a1e67, + 0x79d9e68, + 0x7c89e76, + 0x7d45f22, + 0x7d49f51, + 0x7d4df52, + 0x7d61f53, + 0x7d65f58, + 0x7d99f59, + 0x7dd1f66, + 0x27dd5f74, + 0x7df1f75, + 0x7e19f7c, + 0x7e1df86, + 0x7e41f87, + 0x7e5df90, + 0x7e85f97, + 0x7e95fa1, + 0x7e99fa5, + 0x7e9dfa6, + 0x7ed5fa7, + 0x7ee1fb5, + 0x7f09fb8, + 0x7f95fc2, + 0x27f99fe5, + 0x7f9dfe6, + 0x7fadfe7, + 0x27fb1feb, + 0x7fc1fec, + 0x7fddff0, + 0x7ffdff7, + 0x8001fff, + 0x8016000, + 0x802a005, + 0x802e00a, + 0x803200b, + 0x803600c, + 0x805600d, + 0x80fe015, + 0x810203f, + 0x811e040, + 0x8146047, + 0x28156051, + 0x815a055, + 0x8166056, + 0x8192059, + 0x819a064, + 0x81ae066, + 0x81ce06b, + 0x81ea073, + 0x81fa07a, + 0x821207e, + 0x824a084, 0x824e092, - 0x8262093, - 0x826a098, - 0x828209a, - 0x82860a0, - 0x82920a1, - 0x829e0a4, - 0x82a20a7, - 0x82a60a8, - 0x82aa0a9, - 0x82ce0aa, - 0x830e0b3, - 0x83120c3, - 0x83320c4, - 0x83820cc, - 0x83ae0e0, - 0x283b20eb, - 0x83ba0ec, - 0x84120ee, - 0x8416104, - 0x841a105, - 0x841e106, - 0x8462107, - 0x8472118, - 0x84b211c, - 0x84b612c, - 0x84e612d, - 0x8632139, - 0x865a18c, - 0x8692196, - 0x86b61a4, - 0x286be1ad, - 0x286c21af, - 0x86ca1b0, - 0x86d61b2, - 0x87f21b5, - 0x87fe1fc, - 0x880a1ff, - 0x8816202, - 0x8822205, - 0x882e208, - 0x883a20b, - 0x884620e, - 0x8852211, - 0x885e214, - 0x886a217, - 0x887621a, - 0x888221d, - 0x888e220, - 0x8896223, - 0x88a2225, - 0x88ae228, - 0x88ba22b, - 0x88c622e, - 0x88d2231, - 0x88de234, - 0x88ea237, - 0x88f623a, - 0x890223d, - 0x890e240, - 0x891a243, - 0x8946246, - 0x8952251, - 0x895e254, - 0x896a257, - 0x897625a, - 0x898225d, - 0x898a260, - 0x8996262, - 0x89a2265, - 0x89ae268, - 0x89ba26b, - 0x89c626e, - 0x89d2271, - 0x89de274, - 0x89ea277, - 0x89f627a, - 0x8a0227d, - 0x8a0e280, - 0x8a16283, - 0x8a22285, - 0x8a2a288, + 0x8322093, + 0x83260c8, + 0x833a0c9, + 0x83420ce, + 0x835a0d0, + 0x835e0d6, + 0x836a0d7, + 0x83760da, + 0x837a0dd, + 0x83820de, + 0x83860e0, + 0x83aa0e1, + 0x83ea0ea, + 0x83ee0fa, + 0x840e0fb, + 0x845e103, + 0x848e117, + 0x28492123, + 0x849a124, + 0x84f2126, + 0x84f613c, + 0x84fa13d, + 0x84fe13e, + 0x854213f, + 0x8552150, + 0x8592154, + 0x8596164, + 0x85c6165, + 0x870e171, + 0x87361c3, + 0x876e1cd, + 0x87961db, + 0x2879e1e5, + 0x287a21e7, + 0x287a61e8, + 0x87ae1e9, + 0x87ba1eb, + 0x88d61ee, + 0x88e2235, + 0x88ee238, + 0x88fa23b, + 0x890623e, + 0x8912241, + 0x891e244, + 0x892a247, + 0x893624a, + 0x894224d, + 0x894e250, + 0x895a253, + 0x8966256, + 0x8972259, + 0x897a25c, + 0x898625e, + 0x8992261, + 0x899e264, + 0x89aa267, + 0x89b626a, + 0x89c226d, + 0x89ce270, + 0x89da273, + 0x89e6276, + 0x89f2279, + 0x89fe27c, + 0x8a2a27f, 0x8a3628a, 0x8a4228d, 0x8a4e290, 0x8a5a293, 0x8a66296, - 0x8a72299, - 0x8a7e29c, - 0x8a8a29f, - 0x8a8e2a2, - 0x8a9a2a3, - 0x8ab62a6, - 0x8aba2ad, - 0x8aca2ae, - 0x8aee2b2, - 0x8af22bb, - 0x8b362bc, - 0x8b3e2cd, - 0x8b522cf, - 0x8b862d4, - 0x8ba22e1, - 0x8baa2e8, - 0x8bce2ea, - 0x8be62f3, - 0x8bfe2f9, - 0x8c162ff, - 0x8c2a305, - 0x28c7230a, - 0x8c7631c, - 0x8ca231d, - 0x8cb2328, - 0x8cc632c, + 0x8a6e299, + 0x8a7a29b, + 0x8a8629e, + 0x8a922a1, + 0x8a9e2a4, + 0x8aaa2a7, + 0x8ab62aa, + 0x8ac22ad, + 0x8ace2b0, + 0x8ada2b3, + 0x8ae62b6, + 0x8af22b9, + 0x8afa2bc, + 0x8b062be, + 0x8b0e2c1, + 0x8b1a2c3, + 0x8b262c6, + 0x8b322c9, + 0x8b3e2cc, + 0x8b4a2cf, + 0x8b562d2, + 0x8b622d5, + 0x8b6e2d8, + 0x8b722db, + 0x8b7e2dc, + 0x8b9a2df, + 0x8b9e2e6, + 0x8bae2e7, + 0x8bd22eb, + 0x8bd62f4, + 0x8c1a2f5, + 0x8c22306, + 0x8c36308, + 0x8c6a30d, + 0x8c8a31a, + 0x8c92322, + 0x8cb6324, + 0x8cce32d, + 0x8ce6333, + 0x8cfe339, + 0x8d1233f, + 0x28d5a344, + 0x8d5e356, + 0x8d8a357, + 0x8d9a362, + 0x8dae366, } -// max children 592 (capacity 1023) -// max text offset 30772 (capacity 32767) +// max children 601 (capacity 1023) +// max text offset 30901 (capacity 32767) // max text length 36 (capacity 63) -// max hi 9009 (capacity 16383) -// max lo 9004 (capacity 16383) +// max hi 9067 (capacity 16383) +// max lo 9062 (capacity 16383) diff --git a/vendor/golang.org/x/tools/go/packages/golist.go b/vendor/golang.org/x/tools/go/packages/golist.go index 220d409878..b4d232be70 100644 --- a/vendor/golang.org/x/tools/go/packages/golist.go +++ b/vendor/golang.org/x/tools/go/packages/golist.go @@ -89,6 +89,10 @@ type golistState struct { rootDirsError error rootDirs map[string]string + goVersionOnce sync.Once + goVersionError error + goVersion string // third field of 'go version' + // vendorDirs caches the (non)existence of vendor directories. vendorDirs map[string]bool } @@ -638,7 +642,7 @@ func (state *golistState) createDriverResponse(words ...string) (*driverResponse // Temporary work-around for golang/go#39986. Parse filenames out of // error messages. This happens if there are unrecoverable syntax // errors in the source, so we can't match on a specific error message. - if err := p.Error; err != nil && len(err.ImportStack) == 0 && len(pkg.CompiledGoFiles) == 0 { + if err := p.Error; err != nil && state.shouldAddFilenameFromError(p) { addFilenameFromPos := func(pos string) bool { split := strings.Split(pos, ":") if len(split) < 1 { @@ -697,6 +701,58 @@ func (state *golistState) createDriverResponse(words ...string) (*driverResponse return &response, nil } +func (state *golistState) shouldAddFilenameFromError(p *jsonPackage) bool { + if len(p.GoFiles) > 0 || len(p.CompiledGoFiles) > 0 { + return false + } + + goV, err := state.getGoVersion() + if err != nil { + return false + } + + // On Go 1.14 and earlier, only add filenames from errors if the import stack is empty. + // The import stack behaves differently for these versions than newer Go versions. + if strings.HasPrefix(goV, "go1.13") || strings.HasPrefix(goV, "go1.14") { + return len(p.Error.ImportStack) == 0 + } + + // On Go 1.15 and later, only parse filenames out of error if there's no import stack, + // or the current package is at the top of the import stack. This is not guaranteed + // to work perfectly, but should avoid some cases where files in errors don't belong to this + // package. + return len(p.Error.ImportStack) == 0 || p.Error.ImportStack[len(p.Error.ImportStack)-1] == p.ImportPath +} + +func (state *golistState) getGoVersion() (string, error) { + state.goVersionOnce.Do(func() { + var b *bytes.Buffer + // Invoke go version. Don't use invokeGo because it will supply build flags, and + // go version doesn't expect build flags. + inv := gocommand.Invocation{ + Verb: "version", + Env: state.cfg.Env, + Logf: state.cfg.Logf, + } + gocmdRunner := state.cfg.gocmdRunner + if gocmdRunner == nil { + gocmdRunner = &gocommand.Runner{} + } + b, _, _, state.goVersionError = gocmdRunner.RunRaw(state.cfg.Context, inv) + if state.goVersionError != nil { + return + } + + sp := strings.Split(b.String(), " ") + if len(sp) < 3 { + state.goVersionError = fmt.Errorf("go version output: expected 'go version ', got '%s'", b.String()) + return + } + state.goVersion = sp[2] + }) + return state.goVersion, state.goVersionError +} + // getPkgPath finds the package path of a directory if it's relative to a root directory. func (state *golistState) getPkgPath(dir string) (string, bool, error) { absDir, err := filepath.Abs(dir) diff --git a/vendor/golang.org/x/tools/go/packages/golist_overlay.go b/vendor/golang.org/x/tools/go/packages/golist_overlay.go index 4eabfd98c6..154facc64b 100644 --- a/vendor/golang.org/x/tools/go/packages/golist_overlay.go +++ b/vendor/golang.org/x/tools/go/packages/golist_overlay.go @@ -89,9 +89,19 @@ func (state *golistState) processGolistOverlay(response *responseDeduper) (modif // because the file is generated in another directory. testVariantOf = p continue nextPackage + } else if !isTestFile && hasTestFiles(p) { + // We're examining a test variant, but the overlaid file is + // a non-test file. Because the overlay implementation + // (currently) only adds a file to one package, skip this + // package, so that we can add the file to the production + // variant of the package. (https://golang.org/issue/36857 + // tracks handling overlays on both the production and test + // variant of a package). + continue nextPackage } - // We must have already seen the package of which this is a test variant. if pkg != nil && p != pkg && pkg.PkgPath == p.PkgPath { + // We have already seen the production version of the + // for which p is a test variant. if hasTestFiles(p) { testVariantOf = pkg } diff --git a/vendor/golang.org/x/tools/internal/analysisinternal/analysis.go b/vendor/golang.org/x/tools/internal/analysisinternal/analysis.go index 9f4c68a185..01f6e829f7 100644 --- a/vendor/golang.org/x/tools/internal/analysisinternal/analysis.go +++ b/vendor/golang.org/x/tools/internal/analysisinternal/analysis.go @@ -14,6 +14,7 @@ import ( "strings" "golang.org/x/tools/go/ast/astutil" + "golang.org/x/tools/internal/lsp/fuzzy" ) var ( @@ -50,7 +51,7 @@ func ZeroValue(fset *token.FileSet, f *ast.File, pkg *types.Package, typ types.T default: panic("unknown basic type") } - case *types.Chan, *types.Interface, *types.Map, *types.Pointer, *types.Signature, *types.Slice: + case *types.Chan, *types.Interface, *types.Map, *types.Pointer, *types.Signature, *types.Slice, *types.Array: return ast.NewIdent("nil") case *types.Struct: texpr := TypeExpr(fset, f, pkg, typ) // typ because we want the name here. @@ -60,21 +61,23 @@ func ZeroValue(fset *token.FileSet, f *ast.File, pkg *types.Package, typ types.T return &ast.CompositeLit{ Type: texpr, } - case *types.Array: - texpr := TypeExpr(fset, f, pkg, u.Elem()) - if texpr == nil { - return nil - } - return &ast.CompositeLit{ - Type: &ast.ArrayType{ - Elt: texpr, - Len: &ast.BasicLit{Kind: token.INT, Value: fmt.Sprintf("%v", u.Len())}, - }, - } } return nil } +// IsZeroValue checks whether the given expression is a 'zero value' (as determined by output of +// analysisinternal.ZeroValue) +func IsZeroValue(expr ast.Expr) bool { + switch e := expr.(type) { + case *ast.BasicLit: + return e.Value == "0" || e.Value == `""` + case *ast.Ident: + return e.Name == "nil" || e.Name == "false" + default: + return false + } +} + func TypeExpr(fset *token.FileSet, f *ast.File, pkg *types.Package, typ types.Type) ast.Expr { switch t := typ.(type) { case *types.Basic: @@ -195,8 +198,12 @@ func TypeExpr(fset *token.FileSet, f *ast.File, pkg *types.Package, typ types.Ty X: ast.NewIdent(pkgName), Sel: ast.NewIdent(t.Obj().Name()), } + case *types.Struct: + return ast.NewIdent(t.String()) + case *types.Interface: + return ast.NewIdent(t.String()) default: - return nil // TODO: anonymous structs, but who does that + return nil } } @@ -300,3 +307,119 @@ func WalkASTWithParent(n ast.Node, f func(n ast.Node, parent ast.Node) bool) { return f(n, parent) }) } + +// FindMatchingIdents finds all identifiers in 'node' that match any of the given types. +// 'pos' represents the position at which the identifiers may be inserted. 'pos' must be within +// the scope of each of identifier we select. Otherwise, we will insert a variable at 'pos' that +// is unrecognized. +func FindMatchingIdents(typs []types.Type, node ast.Node, pos token.Pos, info *types.Info, pkg *types.Package) map[types.Type][]*ast.Ident { + matches := map[types.Type][]*ast.Ident{} + // Initialize matches to contain the variable types we are searching for. + for _, typ := range typs { + if typ == nil { + continue + } + matches[typ] = []*ast.Ident{} + } + seen := map[types.Object]struct{}{} + ast.Inspect(node, func(n ast.Node) bool { + if n == nil { + return false + } + // Prevent circular definitions. If 'pos' is within an assignment statement, do not + // allow any identifiers in that assignment statement to be selected. Otherwise, + // we could do the following, where 'x' satisfies the type of 'f0': + // + // x := fakeStruct{f0: x} + // + assignment, ok := n.(*ast.AssignStmt) + if ok && pos > assignment.Pos() && pos <= assignment.End() { + return false + } + if n.End() > pos { + return n.Pos() <= pos + } + ident, ok := n.(*ast.Ident) + if !ok || ident.Name == "_" { + return true + } + obj := info.Defs[ident] + if obj == nil || obj.Type() == nil { + return true + } + if _, ok := obj.(*types.TypeName); ok { + return true + } + // Prevent duplicates in matches' values. + if _, ok = seen[obj]; ok { + return true + } + seen[obj] = struct{}{} + // Find the scope for the given position. Then, check whether the object + // exists within the scope. + innerScope := pkg.Scope().Innermost(pos) + if innerScope == nil { + return true + } + _, foundObj := innerScope.LookupParent(ident.Name, pos) + if foundObj != obj { + return true + } + // The object must match one of the types that we are searching for. + if idents, ok := matches[obj.Type()]; ok { + matches[obj.Type()] = append(idents, ast.NewIdent(ident.Name)) + } + // If the object type does not exactly match any of the target types, greedily + // find the first target type that the object type can satisfy. + for typ := range matches { + if obj.Type() == typ { + continue + } + if equivalentTypes(obj.Type(), typ) { + matches[typ] = append(matches[typ], ast.NewIdent(ident.Name)) + } + } + return true + }) + return matches +} + +func equivalentTypes(want, got types.Type) bool { + if want == got || types.Identical(want, got) { + return true + } + // Code segment to help check for untyped equality from (golang/go#32146). + if rhs, ok := want.(*types.Basic); ok && rhs.Info()&types.IsUntyped > 0 { + if lhs, ok := got.Underlying().(*types.Basic); ok { + return rhs.Info()&types.IsConstType == lhs.Info()&types.IsConstType + } + } + return types.AssignableTo(want, got) +} + +// FindBestMatch employs fuzzy matching to evaluate the similarity of each given identifier to the +// given pattern. We return the identifier whose name is most similar to the pattern. +func FindBestMatch(pattern string, idents []*ast.Ident) ast.Expr { + fuzz := fuzzy.NewMatcher(pattern) + var bestFuzz ast.Expr + highScore := float32(0) // minimum score is 0 (no match) + for _, ident := range idents { + // TODO: Improve scoring algorithm. + score := fuzz.Score(ident.Name) + if score > highScore { + highScore = score + bestFuzz = ident + } else if score == 0 { + // Order matters in the fuzzy matching algorithm. If we find no match + // when matching the target to the identifier, try matching the identifier + // to the target. + revFuzz := fuzzy.NewMatcher(ident.Name) + revScore := revFuzz.Score(pattern) + if revScore > highScore { + highScore = revScore + bestFuzz = ident + } + } + } + return bestFuzz +} diff --git a/vendor/golang.org/x/tools/internal/gopathwalk/walk.go b/vendor/golang.org/x/tools/internal/gopathwalk/walk.go index 390cb9db79..925ff53560 100644 --- a/vendor/golang.org/x/tools/internal/gopathwalk/walk.go +++ b/vendor/golang.org/x/tools/internal/gopathwalk/walk.go @@ -10,7 +10,6 @@ import ( "bufio" "bytes" "fmt" - "go/build" "io/ioutil" "log" "os" @@ -47,16 +46,6 @@ type Root struct { Type RootType } -// SrcDirsRoots returns the roots from build.Default.SrcDirs(). Not modules-compatible. -func SrcDirsRoots(ctx *build.Context) []Root { - var roots []Root - roots = append(roots, Root{filepath.Join(ctx.GOROOT, "src"), RootGOROOT}) - for _, p := range filepath.SplitList(ctx.GOPATH) { - roots = append(roots, Root{filepath.Join(p, "src"), RootGOPATH}) - } - return roots -} - // Walk walks Go source directories ($GOROOT, $GOPATH, etc) to find packages. // For each package found, add will be called (concurrently) with the absolute // paths of the containing source directory and the package directory. diff --git a/vendor/golang.org/x/tools/internal/imports/fix.go b/vendor/golang.org/x/tools/internal/imports/fix.go index ecd13e87ad..613afc4d66 100644 --- a/vendor/golang.org/x/tools/internal/imports/fix.go +++ b/vendor/golang.org/x/tools/internal/imports/fix.go @@ -573,7 +573,9 @@ func getFixes(fset *token.FileSet, f *ast.File, filename string, env *ProcessEnv return fixes, nil } - addStdlibCandidates(p, p.missingRefs) + if err := addStdlibCandidates(p, p.missingRefs); err != nil { + return nil, err + } p.assumeSiblingImportsValid() if fixes, done := p.fix(); done { return fixes, nil @@ -601,15 +603,19 @@ func getCandidatePkgs(ctx context.Context, wrappedCallback *scanCallback, filena notSelf := func(p *pkg) bool { return p.packageName != filePkg || p.dir != filepath.Dir(filename) } + goenv, err := env.goEnv() + if err != nil { + return err + } // Start off with the standard library. for importPath, exports := range stdlib { p := &pkg{ - dir: filepath.Join(env.goroot(), "src", importPath), + dir: filepath.Join(goenv["GOROOT"], "src", importPath), importPathShort: importPath, packageName: path.Base(importPath), relevance: MaxRelevance, } - if notSelf(p) && wrappedCallback.packageNameLoaded(p) { + if notSelf(p) && wrappedCallback.dirFound(p) && wrappedCallback.packageNameLoaded(p) { wrappedCallback.exportsLoaded(p, exports) } } @@ -687,8 +693,8 @@ func candidateImportName(pkg *pkg) string { return "" } -// GetAllCandidates gets all of the packages starting with prefix that can be -// imported by filename, sorted by import path. +// GetAllCandidates calls wrapped for each package whose name starts with +// searchPrefix, and can be imported from filename with the package name filePkg. func GetAllCandidates(ctx context.Context, wrapped func(ImportFix), searchPrefix, filename, filePkg string, env *ProcessEnv) error { callback := &scanCallback{ rootFound: func(gopathwalk.Root) bool { @@ -722,6 +728,35 @@ func GetAllCandidates(ctx context.Context, wrapped func(ImportFix), searchPrefix return getCandidatePkgs(ctx, callback, filename, filePkg, env) } +// GetImportPaths calls wrapped for each package whose import path starts with +// searchPrefix, and can be imported from filename with the package name filePkg. +func GetImportPaths(ctx context.Context, wrapped func(ImportFix), searchPrefix, filename, filePkg string, env *ProcessEnv) error { + callback := &scanCallback{ + rootFound: func(gopathwalk.Root) bool { + return true + }, + dirFound: func(pkg *pkg) bool { + if !canUse(filename, pkg.dir) { + return false + } + return strings.HasPrefix(pkg.importPathShort, searchPrefix) + }, + packageNameLoaded: func(pkg *pkg) bool { + wrapped(ImportFix{ + StmtInfo: ImportInfo{ + ImportPath: pkg.importPathShort, + Name: candidateImportName(pkg), + }, + IdentName: pkg.packageName, + FixType: AddImport, + Relevance: pkg.relevance, + }) + return false + }, + } + return getCandidatePkgs(ctx, callback, filename, filePkg, env) +} + // A PackageExport is a package and its exports. type PackageExport struct { Fix *ImportFix @@ -779,33 +814,44 @@ type ProcessEnv struct { // If Logf is non-nil, debug logging is enabled through this function. Logf func(format string, args ...interface{}) - resolver Resolver -} + initialized bool -func (e *ProcessEnv) goroot() string { - return e.mustGetEnv("GOROOT") + resolver Resolver } -func (e *ProcessEnv) gopath() string { - return e.mustGetEnv("GOPATH") +func (e *ProcessEnv) goEnv() (map[string]string, error) { + if err := e.init(); err != nil { + return nil, err + } + return e.Env, nil } -func (e *ProcessEnv) mustGetEnv(k string) string { - v, ok := e.Env[k] - if !ok { - panic(fmt.Sprintf("%v not set in evaluated environment", k)) - } - return v +func (e *ProcessEnv) matchFile(dir, name string) (bool, error) { + return build.Default.MatchFile(dir, name) } // CopyConfig copies the env's configuration into a new env. func (e *ProcessEnv) CopyConfig() *ProcessEnv { - copy := *e - copy.resolver = nil - return © + copy := &ProcessEnv{ + GocmdRunner: e.GocmdRunner, + initialized: e.initialized, + BuildFlags: e.BuildFlags, + Logf: e.Logf, + WorkingDir: e.WorkingDir, + resolver: nil, + Env: map[string]string{}, + } + for k, v := range e.Env { + copy.Env[k] = v + } + return copy } func (e *ProcessEnv) init() error { + if e.initialized { + return nil + } + foundAllRequired := true for _, k := range RequiredGoEnvVars { if _, ok := e.Env[k]; !ok { @@ -814,6 +860,7 @@ func (e *ProcessEnv) init() error { } } if foundAllRequired { + e.initialized = true return nil } @@ -832,6 +879,7 @@ func (e *ProcessEnv) init() error { for k, v := range goEnv { e.Env[k] = v } + e.initialized = true return nil } @@ -858,10 +906,14 @@ func (e *ProcessEnv) GetResolver() (Resolver, error) { return e.resolver, nil } -func (e *ProcessEnv) buildContext() *build.Context { +func (e *ProcessEnv) buildContext() (*build.Context, error) { ctx := build.Default - ctx.GOROOT = e.goroot() - ctx.GOPATH = e.gopath() + goenv, err := e.goEnv() + if err != nil { + return nil, err + } + ctx.GOROOT = goenv["GOROOT"] + ctx.GOPATH = goenv["GOPATH"] // As of Go 1.14, build.Context has a Dir field // (see golang.org/issue/34860). @@ -877,7 +929,7 @@ func (e *ProcessEnv) buildContext() *build.Context { dir.SetString(e.WorkingDir) } - return &ctx + return &ctx, nil } func (e *ProcessEnv) invokeGo(ctx context.Context, verb string, args ...string) (*bytes.Buffer, error) { @@ -892,10 +944,14 @@ func (e *ProcessEnv) invokeGo(ctx context.Context, verb string, args ...string) return e.GocmdRunner.Run(ctx, inv) } -func addStdlibCandidates(pass *pass, refs references) { +func addStdlibCandidates(pass *pass, refs references) error { + goenv, err := pass.env.goEnv() + if err != nil { + return err + } add := func(pkg string) { // Prevent self-imports. - if path.Base(pkg) == pass.f.Name.Name && filepath.Join(pass.env.goroot(), "src", pkg) == pass.srcDir { + if path.Base(pkg) == pass.f.Name.Name && filepath.Join(goenv["GOROOT"], "src", pkg) == pass.srcDir { return } exports := copyExports(stdlib[pkg]) @@ -916,6 +972,7 @@ func addStdlibCandidates(pass *pass, refs references) { } } } + return nil } // A Resolver does the build-system-specific parts of goimports. @@ -1112,21 +1169,24 @@ func (r *gopathResolver) ClearForNewScan() { func (r *gopathResolver) loadPackageNames(importPaths []string, srcDir string) (map[string]string, error) { names := map[string]string{} + bctx, err := r.env.buildContext() + if err != nil { + return nil, err + } for _, path := range importPaths { - names[path] = importPathToName(r.env, path, srcDir) + names[path] = importPathToName(bctx, path, srcDir) } return names, nil } // importPathToName finds out the actual package name, as declared in its .go files. -// If there's a problem, it returns "". -func importPathToName(env *ProcessEnv, importPath, srcDir string) (packageName string) { +func importPathToName(bctx *build.Context, importPath, srcDir string) string { // Fast path for standard library without going to disk. if _, ok := stdlib[importPath]; ok { return path.Base(importPath) // stdlib packages always match their paths. } - buildPkg, err := env.buildContext().Import(importPath, srcDir, build.FindOnly) + buildPkg, err := bctx.Import(importPath, srcDir, build.FindOnly) if err != nil { return "" } @@ -1287,8 +1347,18 @@ func (r *gopathResolver) scan(ctx context.Context, callback *scanCallback) error } stop := r.cache.ScanAndListen(ctx, processDir) defer stop() + + goenv, err := r.env.goEnv() + if err != nil { + return err + } + var roots []gopathwalk.Root + roots = append(roots, gopathwalk.Root{filepath.Join(goenv["GOROOT"], "src"), gopathwalk.RootGOROOT}) + for _, p := range filepath.SplitList(goenv["GOPATH"]) { + roots = append(roots, gopathwalk.Root{filepath.Join(p, "src"), gopathwalk.RootGOPATH}) + } // The callback is not necessarily safe to use in the goroutine below. Process roots eagerly. - roots := filterRoots(gopathwalk.SrcDirsRoots(r.env.buildContext()), callback.rootFound) + roots = filterRoots(roots, callback.rootFound) // We can't cancel walks, because we need them to finish to have a usable // cache. Instead, run them in a separate goroutine and detach. scanDone := make(chan struct{}) @@ -1348,8 +1418,6 @@ func VendorlessPath(ipath string) string { } func loadExportsFromFiles(ctx context.Context, env *ProcessEnv, dir string, includeTest bool) (string, []string, error) { - var exports []string - // Look for non-test, buildable .go files which could provide exports. all, err := ioutil.ReadDir(dir) if err != nil { @@ -1361,7 +1429,7 @@ func loadExportsFromFiles(ctx context.Context, env *ProcessEnv, dir string, incl if !strings.HasSuffix(name, ".go") || (!includeTest && strings.HasSuffix(name, "_test.go")) { continue } - match, err := env.buildContext().MatchFile(dir, fi.Name()) + match, err := env.matchFile(dir, fi.Name()) if err != nil || !match { continue } @@ -1373,6 +1441,7 @@ func loadExportsFromFiles(ctx context.Context, env *ProcessEnv, dir string, incl } var pkgName string + var exports []string fset := token.NewFileSet() for _, fi := range files { select { diff --git a/vendor/golang.org/x/tools/internal/imports/mod.go b/vendor/golang.org/x/tools/internal/imports/mod.go index 664fbbf5ba..94880d6160 100644 --- a/vendor/golang.org/x/tools/internal/imports/mod.go +++ b/vendor/golang.org/x/tools/internal/imports/mod.go @@ -53,6 +53,10 @@ func (r *ModuleResolver) init() error { return nil } + goenv, err := r.env.goEnv() + if err != nil { + return err + } inv := gocommand.Invocation{ BuildFlags: r.env.BuildFlags, Env: r.env.env(), @@ -82,7 +86,7 @@ func (r *ModuleResolver) init() error { if gmc := r.env.Env["GOMODCACHE"]; gmc != "" { r.moduleCacheDir = gmc } else { - r.moduleCacheDir = filepath.Join(filepath.SplitList(r.env.gopath())[0], "/pkg/mod") + r.moduleCacheDir = filepath.Join(filepath.SplitList(goenv["GOPATH"])[0], "/pkg/mod") } sort.Slice(r.modsByModPath, func(i, j int) bool { @@ -99,7 +103,7 @@ func (r *ModuleResolver) init() error { }) r.roots = []gopathwalk.Root{ - {filepath.Join(r.env.goroot(), "/src"), gopathwalk.RootGOROOT}, + {filepath.Join(goenv["GOROOT"], "/src"), gopathwalk.RootGOROOT}, } if r.main != nil { r.roots = append(r.roots, gopathwalk.Root{r.main.Dir, gopathwalk.RootCurrentModule}) @@ -240,7 +244,7 @@ func (r *ModuleResolver) findPackage(importPath string) (*gocommand.ModuleJSON, // files in that directory. If not, it could be provided by an // outer module. See #29736. for _, fi := range pkgFiles { - if ok, _ := r.env.buildContext().MatchFile(pkgDir, fi.Name()); ok { + if ok, _ := r.env.matchFile(pkgDir, fi.Name()); ok { return m, pkgDir } } diff --git a/vendor/golang.org/x/tools/internal/imports/zstdlib.go b/vendor/golang.org/x/tools/internal/imports/zstdlib.go index 16252111ff..7b573b9830 100644 --- a/vendor/golang.org/x/tools/internal/imports/zstdlib.go +++ b/vendor/golang.org/x/tools/internal/imports/zstdlib.go @@ -56,6 +56,7 @@ var stdlib = map[string][]string{ }, "bufio": []string{ "ErrAdvanceTooFar", + "ErrBadReadCount", "ErrBufferFull", "ErrFinalToken", "ErrInvalidUnreadByte", @@ -303,7 +304,9 @@ var stdlib = map[string][]string{ "PrivateKey", "PublicKey", "Sign", + "SignASN1", "Verify", + "VerifyASN1", }, "crypto/ed25519": []string{ "GenerateKey", @@ -322,11 +325,13 @@ var stdlib = map[string][]string{ "CurveParams", "GenerateKey", "Marshal", + "MarshalCompressed", "P224", "P256", "P384", "P521", "Unmarshal", + "UnmarshalCompressed", }, "crypto/hmac": []string{ "Equal", @@ -432,6 +437,7 @@ var stdlib = map[string][]string{ "CurveP521", "Dial", "DialWithDialer", + "Dialer", "ECDSAWithP256AndSHA256", "ECDSAWithP384AndSHA384", "ECDSAWithP521AndSHA512", @@ -507,6 +513,7 @@ var stdlib = map[string][]string{ "ConstraintViolationError", "CreateCertificate", "CreateCertificateRequest", + "CreateRevocationList", "DSA", "DSAWithSHA1", "DSAWithSHA256", @@ -581,6 +588,7 @@ var stdlib = map[string][]string{ "PublicKeyAlgorithm", "PureEd25519", "RSA", + "RevocationList", "SHA1WithRSA", "SHA256WithRSA", "SHA256WithRSAPSS", @@ -694,6 +702,7 @@ var stdlib = map[string][]string{ "String", "Tx", "TxOptions", + "Validator", "Value", "ValueConverter", "Valuer", @@ -2349,6 +2358,27 @@ var stdlib = map[string][]string{ "IMAGE_DIRECTORY_ENTRY_RESOURCE", "IMAGE_DIRECTORY_ENTRY_SECURITY", "IMAGE_DIRECTORY_ENTRY_TLS", + "IMAGE_DLLCHARACTERISTICS_APPCONTAINER", + "IMAGE_DLLCHARACTERISTICS_DYNAMIC_BASE", + "IMAGE_DLLCHARACTERISTICS_FORCE_INTEGRITY", + "IMAGE_DLLCHARACTERISTICS_GUARD_CF", + "IMAGE_DLLCHARACTERISTICS_HIGH_ENTROPY_VA", + "IMAGE_DLLCHARACTERISTICS_NO_BIND", + "IMAGE_DLLCHARACTERISTICS_NO_ISOLATION", + "IMAGE_DLLCHARACTERISTICS_NO_SEH", + "IMAGE_DLLCHARACTERISTICS_NX_COMPAT", + "IMAGE_DLLCHARACTERISTICS_TERMINAL_SERVER_AWARE", + "IMAGE_DLLCHARACTERISTICS_WDM_DRIVER", + "IMAGE_FILE_32BIT_MACHINE", + "IMAGE_FILE_AGGRESIVE_WS_TRIM", + "IMAGE_FILE_BYTES_REVERSED_HI", + "IMAGE_FILE_BYTES_REVERSED_LO", + "IMAGE_FILE_DEBUG_STRIPPED", + "IMAGE_FILE_DLL", + "IMAGE_FILE_EXECUTABLE_IMAGE", + "IMAGE_FILE_LARGE_ADDRESS_AWARE", + "IMAGE_FILE_LINE_NUMS_STRIPPED", + "IMAGE_FILE_LOCAL_SYMS_STRIPPED", "IMAGE_FILE_MACHINE_AM33", "IMAGE_FILE_MACHINE_AMD64", "IMAGE_FILE_MACHINE_ARM", @@ -2371,6 +2401,25 @@ var stdlib = map[string][]string{ "IMAGE_FILE_MACHINE_THUMB", "IMAGE_FILE_MACHINE_UNKNOWN", "IMAGE_FILE_MACHINE_WCEMIPSV2", + "IMAGE_FILE_NET_RUN_FROM_SWAP", + "IMAGE_FILE_RELOCS_STRIPPED", + "IMAGE_FILE_REMOVABLE_RUN_FROM_SWAP", + "IMAGE_FILE_SYSTEM", + "IMAGE_FILE_UP_SYSTEM_ONLY", + "IMAGE_SUBSYSTEM_EFI_APPLICATION", + "IMAGE_SUBSYSTEM_EFI_BOOT_SERVICE_DRIVER", + "IMAGE_SUBSYSTEM_EFI_ROM", + "IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER", + "IMAGE_SUBSYSTEM_NATIVE", + "IMAGE_SUBSYSTEM_NATIVE_WINDOWS", + "IMAGE_SUBSYSTEM_OS2_CUI", + "IMAGE_SUBSYSTEM_POSIX_CUI", + "IMAGE_SUBSYSTEM_UNKNOWN", + "IMAGE_SUBSYSTEM_WINDOWS_BOOT_APPLICATION", + "IMAGE_SUBSYSTEM_WINDOWS_CE_GUI", + "IMAGE_SUBSYSTEM_WINDOWS_CUI", + "IMAGE_SUBSYSTEM_WINDOWS_GUI", + "IMAGE_SUBSYSTEM_XBOX", "ImportDirectory", "NewFile", "Open", @@ -4188,6 +4237,7 @@ var stdlib = map[string][]string{ "DevNull", "Environ", "ErrClosed", + "ErrDeadlineExceeded", "ErrExist", "ErrInvalid", "ErrNoDeadline", @@ -4646,6 +4696,7 @@ var stdlib = map[string][]string{ "ErrRange", "ErrSyntax", "FormatBool", + "FormatComplex", "FormatFloat", "FormatInt", "FormatUint", @@ -4655,6 +4706,7 @@ var stdlib = map[string][]string{ "Itoa", "NumError", "ParseBool", + "ParseComplex", "ParseFloat", "ParseInt", "ParseUint", diff --git a/vendor/golang.org/x/tools/internal/lsp/fuzzy/input.go b/vendor/golang.org/x/tools/internal/lsp/fuzzy/input.go new file mode 100644 index 0000000000..ac377035ec --- /dev/null +++ b/vendor/golang.org/x/tools/internal/lsp/fuzzy/input.go @@ -0,0 +1,168 @@ +// Copyright 2019 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package fuzzy + +import ( + "unicode" +) + +// RuneRole specifies the role of a rune in the context of an input. +type RuneRole byte + +const ( + // RNone specifies a rune without any role in the input (i.e., whitespace/non-ASCII). + RNone RuneRole = iota + // RSep specifies a rune with the role of segment separator. + RSep + // RTail specifies a rune which is a lower-case tail in a word in the input. + RTail + // RUCTail specifies a rune which is an upper-case tail in a word in the input. + RUCTail + // RHead specifies a rune which is the first character in a word in the input. + RHead +) + +// RuneRoles detects the roles of each byte rune in an input string and stores it in the output +// slice. The rune role depends on the input type. Stops when it parsed all the runes in the string +// or when it filled the output. If output is nil, then it gets created. +func RuneRoles(str string, reuse []RuneRole) []RuneRole { + var output []RuneRole + if cap(reuse) < len(str) { + output = make([]RuneRole, 0, len(str)) + } else { + output = reuse[:0] + } + + prev, prev2 := rtNone, rtNone + for i := 0; i < len(str); i++ { + r := rune(str[i]) + + role := RNone + + curr := rtLower + if str[i] <= unicode.MaxASCII { + curr = runeType(rt[str[i]] - '0') + } + + if curr == rtLower { + if prev == rtNone || prev == rtPunct { + role = RHead + } else { + role = RTail + } + } else if curr == rtUpper { + role = RHead + + if prev == rtUpper { + // This and previous characters are both upper case. + + if i+1 == len(str) { + // This is last character, previous was also uppercase -> this is UCTail + // i.e., (current char is C): aBC / BC / ABC + role = RUCTail + } + } + } else if curr == rtPunct { + switch r { + case '.', ':': + role = RSep + } + } + if curr != rtLower { + if i > 1 && output[i-1] == RHead && prev2 == rtUpper && (output[i-2] == RHead || output[i-2] == RUCTail) { + // The previous two characters were uppercase. The current one is not a lower case, so the + // previous one can't be a HEAD. Make it a UCTail. + // i.e., (last char is current char - B must be a UCTail): ABC / ZABC / AB. + output[i-1] = RUCTail + } + } + + output = append(output, role) + prev2 = prev + prev = curr + } + return output +} + +type runeType byte + +const ( + rtNone runeType = iota + rtPunct + rtLower + rtUpper +) + +const rt = "00000000000000000000000000000000000000000000001122222222221000000333333333333333333333333330000002222222222222222222222222200000" + +// LastSegment returns the substring representing the last segment from the input, where each +// byte has an associated RuneRole in the roles slice. This makes sense only for inputs of Symbol +// or Filename type. +func LastSegment(input string, roles []RuneRole) string { + // Exclude ending separators. + end := len(input) - 1 + for end >= 0 && roles[end] == RSep { + end-- + } + if end < 0 { + return "" + } + + start := end - 1 + for start >= 0 && roles[start] != RSep { + start-- + } + + return input[start+1 : end+1] +} + +// ToLower transforms the input string to lower case, which is stored in the output byte slice. +// The lower casing considers only ASCII values - non ASCII values are left unmodified. +// Stops when parsed all input or when it filled the output slice. If output is nil, then it gets +// created. +func ToLower(input string, reuse []byte) []byte { + output := reuse + if cap(reuse) < len(input) { + output = make([]byte, len(input)) + } + + for i := 0; i < len(input); i++ { + r := rune(input[i]) + if r <= unicode.MaxASCII { + if 'A' <= r && r <= 'Z' { + r += 'a' - 'A' + } + } + output[i] = byte(r) + } + return output[:len(input)] +} + +// WordConsumer defines a consumer for a word delimited by the [start,end) byte offsets in an input +// (start is inclusive, end is exclusive). +type WordConsumer func(start, end int) + +// Words find word delimiters in an input based on its bytes' mappings to rune roles. The offset +// delimiters for each word are fed to the provided consumer function. +func Words(roles []RuneRole, consume WordConsumer) { + var wordStart int + for i, r := range roles { + switch r { + case RUCTail, RTail: + case RHead, RNone, RSep: + if i != wordStart { + consume(wordStart, i) + } + wordStart = i + if r != RHead { + // Skip this character. + wordStart = i + 1 + } + } + } + if wordStart != len(roles) { + consume(wordStart, len(roles)) + } +} diff --git a/vendor/golang.org/x/tools/internal/lsp/fuzzy/matcher.go b/vendor/golang.org/x/tools/internal/lsp/fuzzy/matcher.go new file mode 100644 index 0000000000..16a643097d --- /dev/null +++ b/vendor/golang.org/x/tools/internal/lsp/fuzzy/matcher.go @@ -0,0 +1,398 @@ +// Copyright 2019 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package fuzzy implements a fuzzy matching algorithm. +package fuzzy + +import ( + "bytes" + "fmt" +) + +const ( + // MaxInputSize is the maximum size of the input scored against the fuzzy matcher. Longer inputs + // will be truncated to this size. + MaxInputSize = 127 + // MaxPatternSize is the maximum size of the pattern used to construct the fuzzy matcher. Longer + // inputs are truncated to this size. + MaxPatternSize = 63 +) + +type scoreVal int + +func (s scoreVal) val() int { + return int(s) >> 1 +} + +func (s scoreVal) prevK() int { + return int(s) & 1 +} + +func score(val int, prevK int /*0 or 1*/) scoreVal { + return scoreVal(val<<1 + prevK) +} + +// Matcher implements a fuzzy matching algorithm for scoring candidates against a pattern. +// The matcher does not support parallel usage. +type Matcher struct { + pattern string + patternLower []byte // lower-case version of the pattern + patternShort []byte // first characters of the pattern + caseSensitive bool // set if the pattern is mix-cased + + patternRoles []RuneRole // the role of each character in the pattern + roles []RuneRole // the role of each character in the tested string + + scores [MaxInputSize + 1][MaxPatternSize + 1][2]scoreVal + + scoreScale float32 + + lastCandidateLen int // in bytes + lastCandidateMatched bool + + // Here we save the last candidate in lower-case. This is basically a byte slice we reuse for + // performance reasons, so the slice is not reallocated for every candidate. + lowerBuf [MaxInputSize]byte + rolesBuf [MaxInputSize]RuneRole +} + +func (m *Matcher) bestK(i, j int) int { + if m.scores[i][j][0].val() < m.scores[i][j][1].val() { + return 1 + } + return 0 +} + +// NewMatcher returns a new fuzzy matcher for scoring candidates against the provided pattern. +func NewMatcher(pattern string) *Matcher { + if len(pattern) > MaxPatternSize { + pattern = pattern[:MaxPatternSize] + } + + m := &Matcher{ + pattern: pattern, + patternLower: ToLower(pattern, nil), + } + + for i, c := range m.patternLower { + if pattern[i] != c { + m.caseSensitive = true + break + } + } + + if len(pattern) > 3 { + m.patternShort = m.patternLower[:3] + } else { + m.patternShort = m.patternLower + } + + m.patternRoles = RuneRoles(pattern, nil) + + if len(pattern) > 0 { + maxCharScore := 4 + m.scoreScale = 1 / float32(maxCharScore*len(pattern)) + } + + return m +} + +// Score returns the score returned by matching the candidate to the pattern. +// This is not designed for parallel use. Multiple candidates must be scored sequentially. +// Returns a score between 0 and 1 (0 - no match, 1 - perfect match). +func (m *Matcher) Score(candidate string) float32 { + if len(candidate) > MaxInputSize { + candidate = candidate[:MaxInputSize] + } + lower := ToLower(candidate, m.lowerBuf[:]) + m.lastCandidateLen = len(candidate) + + if len(m.pattern) == 0 { + // Empty patterns perfectly match candidates. + return 1 + } + + if m.match(candidate, lower) { + sc := m.computeScore(candidate, lower) + if sc > minScore/2 && !m.poorMatch() { + m.lastCandidateMatched = true + if len(m.pattern) == len(candidate) { + // Perfect match. + return 1 + } + + if sc < 0 { + sc = 0 + } + normalizedScore := float32(sc) * m.scoreScale + if normalizedScore > 1 { + normalizedScore = 1 + } + + return normalizedScore + } + } + + m.lastCandidateMatched = false + return 0 +} + +const minScore = -10000 + +// MatchedRanges returns matches ranges for the last scored string as a flattened array of +// [begin, end) byte offset pairs. +func (m *Matcher) MatchedRanges() []int { + if len(m.pattern) == 0 || !m.lastCandidateMatched { + return nil + } + i, j := m.lastCandidateLen, len(m.pattern) + if m.scores[i][j][0].val() < minScore/2 && m.scores[i][j][1].val() < minScore/2 { + return nil + } + + var ret []int + k := m.bestK(i, j) + for i > 0 { + take := (k == 1) + k = m.scores[i][j][k].prevK() + if take { + if len(ret) == 0 || ret[len(ret)-1] != i { + ret = append(ret, i) + ret = append(ret, i-1) + } else { + ret[len(ret)-1] = i - 1 + } + j-- + } + i-- + } + // Reverse slice. + for i := 0; i < len(ret)/2; i++ { + ret[i], ret[len(ret)-1-i] = ret[len(ret)-1-i], ret[i] + } + return ret +} + +func (m *Matcher) match(candidate string, candidateLower []byte) bool { + i, j := 0, 0 + for ; i < len(candidateLower) && j < len(m.patternLower); i++ { + if candidateLower[i] == m.patternLower[j] { + j++ + } + } + if j != len(m.patternLower) { + return false + } + + // The input passes the simple test against pattern, so it is time to classify its characters. + // Character roles are used below to find the last segment. + m.roles = RuneRoles(candidate, m.rolesBuf[:]) + + return true +} + +func (m *Matcher) computeScore(candidate string, candidateLower []byte) int { + pattLen, candLen := len(m.pattern), len(candidate) + + for j := 0; j <= len(m.pattern); j++ { + m.scores[0][j][0] = minScore << 1 + m.scores[0][j][1] = minScore << 1 + } + m.scores[0][0][0] = score(0, 0) // Start with 0. + + segmentsLeft, lastSegStart := 1, 0 + for i := 0; i < candLen; i++ { + if m.roles[i] == RSep { + segmentsLeft++ + lastSegStart = i + 1 + } + } + + // A per-character bonus for a consecutive match. + consecutiveBonus := 2 + wordIdx := 0 // Word count within segment. + for i := 1; i <= candLen; i++ { + + role := m.roles[i-1] + isHead := role == RHead + + if isHead { + wordIdx++ + } else if role == RSep && segmentsLeft > 1 { + wordIdx = 0 + segmentsLeft-- + } + + var skipPenalty int + if i == 1 || (i-1) == lastSegStart { + // Skipping the start of first or last segment. + skipPenalty++ + } + + for j := 0; j <= pattLen; j++ { + // By default, we don't have a match. Fill in the skip data. + m.scores[i][j][1] = minScore << 1 + + // Compute the skip score. + k := 0 + if m.scores[i-1][j][0].val() < m.scores[i-1][j][1].val() { + k = 1 + } + + skipScore := m.scores[i-1][j][k].val() + // Do not penalize missing characters after the last matched segment. + if j != pattLen { + skipScore -= skipPenalty + } + m.scores[i][j][0] = score(skipScore, k) + + if j == 0 || candidateLower[i-1] != m.patternLower[j-1] { + // Not a match. + continue + } + pRole := m.patternRoles[j-1] + + if role == RTail && pRole == RHead { + if j > 1 { + // Not a match: a head in the pattern matches a tail character in the candidate. + continue + } + // Special treatment for the first character of the pattern. We allow + // matches in the middle of a word if they are long enough, at least + // min(3, pattern.length) characters. + if !bytes.HasPrefix(candidateLower[i-1:], m.patternShort) { + continue + } + } + + // Compute the char score. + var charScore int + // Bonus 1: the char is in the candidate's last segment. + if segmentsLeft <= 1 { + charScore++ + } + // Bonus 2: Case match or a Head in the pattern aligns with one in the word. + // Single-case patterns lack segmentation signals and we assume any character + // can be a head of a segment. + if candidate[i-1] == m.pattern[j-1] || role == RHead && (!m.caseSensitive || pRole == RHead) { + charScore++ + } + + // Penalty 1: pattern char is Head, candidate char is Tail. + if role == RTail && pRole == RHead { + charScore-- + } + // Penalty 2: first pattern character matched in the middle of a word. + if j == 1 && role == RTail { + charScore -= 4 + } + + // Third dimension encodes whether there is a gap between the previous match and the current + // one. + for k := 0; k < 2; k++ { + sc := m.scores[i-1][j-1][k].val() + charScore + + isConsecutive := k == 1 || i-1 == 0 || i-1 == lastSegStart + if isConsecutive { + // Bonus 3: a consecutive match. First character match also gets a bonus to + // ensure prefix final match score normalizes to 1.0. + // Logically, this is a part of charScore, but we have to compute it here because it + // only applies for consecutive matches (k == 1). + sc += consecutiveBonus + } + if k == 0 { + // Penalty 3: Matching inside a segment (and previous char wasn't matched). Penalize for the lack + // of alignment. + if role == RTail || role == RUCTail { + sc -= 3 + } + } + + if sc > m.scores[i][j][1].val() { + m.scores[i][j][1] = score(sc, k) + } + } + } + } + + result := m.scores[len(candidate)][len(m.pattern)][m.bestK(len(candidate), len(m.pattern))].val() + + return result +} + +// ScoreTable returns the score table computed for the provided candidate. Used only for debugging. +func (m *Matcher) ScoreTable(candidate string) string { + var buf bytes.Buffer + + var line1, line2, separator bytes.Buffer + line1.WriteString("\t") + line2.WriteString("\t") + for j := 0; j < len(m.pattern); j++ { + line1.WriteString(fmt.Sprintf("%c\t\t", m.pattern[j])) + separator.WriteString("----------------") + } + + buf.WriteString(line1.String()) + buf.WriteString("\n") + buf.WriteString(separator.String()) + buf.WriteString("\n") + + for i := 1; i <= len(candidate); i++ { + line1.Reset() + line2.Reset() + + line1.WriteString(fmt.Sprintf("%c\t", candidate[i-1])) + line2.WriteString("\t") + + for j := 1; j <= len(m.pattern); j++ { + line1.WriteString(fmt.Sprintf("M%6d(%c)\t", m.scores[i][j][0].val(), dir(m.scores[i][j][0].prevK()))) + line2.WriteString(fmt.Sprintf("H%6d(%c)\t", m.scores[i][j][1].val(), dir(m.scores[i][j][1].prevK()))) + } + buf.WriteString(line1.String()) + buf.WriteString("\n") + buf.WriteString(line2.String()) + buf.WriteString("\n") + buf.WriteString(separator.String()) + buf.WriteString("\n") + } + + return buf.String() +} + +func dir(prevK int) rune { + if prevK == 0 { + return 'M' + } + return 'H' +} + +func (m *Matcher) poorMatch() bool { + if len(m.pattern) < 2 { + return false + } + + i, j := m.lastCandidateLen, len(m.pattern) + k := m.bestK(i, j) + + var counter, len int + for i > 0 { + take := (k == 1) + k = m.scores[i][j][k].prevK() + if take { + len++ + if k == 0 && len < 3 && m.roles[i-1] == RTail { + // Short match in the middle of a word + counter++ + if counter > 1 { + return true + } + } + j-- + } else { + len = 0 + } + i-- + } + return false +} diff --git a/vendor/gonum.org/v1/gonum/AUTHORS b/vendor/gonum.org/v1/gonum/AUTHORS deleted file mode 100644 index 417db9b890..0000000000 --- a/vendor/gonum.org/v1/gonum/AUTHORS +++ /dev/null @@ -1,89 +0,0 @@ -# This is the official list of gonum authors for copyright purposes. -# This file is distinct from the CONTRIBUTORS files. -# See the latter for an explanation. - -# Names should be added to this file as -# Name or Organization -# The email address is not required for organizations. - -# Please keep the list sorted. - -Alexander Egurnov -Bill Gray -Bill Noon -Brendan Tracey -Brent Pedersen -Chad Kunde -Chih-Wei Chang -Chris Tessum -Christophe Meessen -Clayton Northey -Dan Kortschak -Daniel Fireman -David Samborski -Davor Kapsa -DeepMind Technologies -Dezmond Goff -Egon Elbre -Ekaterina Efimova -Ethan Burns -Evert Lammerts -Facundo Gaich -Fazlul Shahriar -Francesc Campoy -Google Inc -Gustaf Johansson -Iakov Davydov -Igor Mikushkin -Iskander Sharipov -Jalem Raj Rohit -James Bell -James Bowman -James Holmes <32bitkid@gmail.com> -Janne Snabb -Jeff Juozapaitis -Jeremy Atkinson -Jonas Kahler -Jonas Schulze -Jonathan J Lawlor -Jonathan Schroeder -Joseph Watson -Josh Wilson -Julien Roland -Kai Trukenmüller -Kent English -Kevin C. Zimmerman -Kirill Motkov -Konstantin Shaposhnikov -Leonid Kneller -Lyron Winderbaum -Martin Diz -Matthieu Di Mercurio -Max Halford -MinJae Kwon -Nick Potts -Olivier Wulveryck -Or Rikon -Pontus Melke -Renée French -Rishi Desai -Robin Eklind -Sam Zaydel -Samuel Kelemen -Saran Ahluwalia -Scott Holden -Sebastien Binet -Shawn Smith -source{d} -Spencer Lyon -Steve McCoy -Taesu Pyo -Takeshi Yoneda -The University of Adelaide -The University of Minnesota -The University of Washington -Thomas Berg -Tobin Harding -Vincent Thiery -Vladimír Chalupecký -Yevgeniy Vahlis diff --git a/vendor/gonum.org/v1/gonum/CONTRIBUTORS b/vendor/gonum.org/v1/gonum/CONTRIBUTORS deleted file mode 100644 index 0c7cc46a74..0000000000 --- a/vendor/gonum.org/v1/gonum/CONTRIBUTORS +++ /dev/null @@ -1,91 +0,0 @@ -# This is the official list of people who can contribute -# (and typically have contributed) code to the gonum -# repository. -# -# The AUTHORS file lists the copyright holders; this file -# lists people. For example, Google employees would be listed here -# but not in AUTHORS, because Google would hold the copyright. -# -# When adding J Random Contributor's name to this file, -# either J's name or J's organization's name should be -# added to the AUTHORS file. -# -# Names should be added to this file like so: -# Name -# -# Please keep the list sorted. - -Alexander Egurnov -Andrew Brampton -Bill Gray -Bill Noon -Brendan Tracey -Brent Pedersen -Chad Kunde -Chih-Wei Chang -Chris Tessum -Christophe Meessen -Clayton Northey -Dan Kortschak -Daniel Fireman -David Samborski -Davor Kapsa -Dezmond Goff -Egon Elbre -Ekaterina Efimova -Ethan Burns -Evert Lammerts -Facundo Gaich -Fazlul Shahriar -Francesc Campoy -Gustaf Johansson -Iakov Davydov -Igor Mikushkin -Iskander Sharipov -Jalem Raj Rohit -James Bell -James Bowman -James Holmes <32bitkid@gmail.com> -Janne Snabb -Jeff Juozapaitis -Jeremy Atkinson -Jonas Kahler -Jonas Schulze -Jonathan J Lawlor -Jonathan Schroeder -Joseph Watson -Josh Wilson -Julien Roland -Kai Trukenmüller -Kent English -Kevin C. Zimmerman -Kirill Motkov -Konstantin Shaposhnikov -Leonid Kneller -Lyron Winderbaum -Martin Diz -Matthieu Di Mercurio -Max Halford -MinJae Kwon -Nick Potts -Olivier Wulveryck -Or Rikon -Pontus Melke -Renée French -Rishi Desai -Robin Eklind -Sam Zaydel -Samuel Kelemen -Saran Ahluwalia -Scott Holden -Sebastien Binet -Shawn Smith -Spencer Lyon -Steve McCoy -Taesu Pyo -Takeshi Yoneda -Thomas Berg -Tobin Harding -Vincent Thiery -Vladimír Chalupecký -Yevgeniy Vahlis diff --git a/vendor/gonum.org/v1/gonum/LICENSE b/vendor/gonum.org/v1/gonum/LICENSE deleted file mode 100644 index 5f1c3f9ccf..0000000000 --- a/vendor/gonum.org/v1/gonum/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -Copyright ©2013 The Gonum Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the gonum project nor the names of its authors and - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/vendor/gonum.org/v1/gonum/blas/README.md b/vendor/gonum.org/v1/gonum/blas/README.md deleted file mode 100644 index e9d33eeeb3..0000000000 --- a/vendor/gonum.org/v1/gonum/blas/README.md +++ /dev/null @@ -1,47 +0,0 @@ -# Gonum BLAS [![GoDoc](https://godoc.org/gonum.org/v1/gonum/blas?status.svg)](https://godoc.org/gonum.org/v1/gonum/blas) - -A collection of packages to provide BLAS functionality for the [Go programming -language](http://golang.org) - -## Installation -```sh - go get gonum.org/v1/gonum/blas/... -``` - -## Packages - -### blas - -Defines [BLAS API](http://www.netlib.org/blas/blast-forum/cinterface.pdf) split in several -interfaces. - -### blas/gonum - -Go implementation of the BLAS API (incomplete, implements the `float32` and `float64` API). - -### blas/blas64 and blas/blas32 - -Wrappers for an implementation of the double (i.e., `float64`) and single (`float32`) -precision real parts of the BLAS API. - -```Go -package main - -import ( - "fmt" - - "gonum.org/v1/gonum/blas/blas64" -) - -func main() { - v := blas64.Vector{Inc: 1, Data: []float64{1, 1, 1}} - fmt.Println("v has length:", blas64.Nrm2(len(v.Data), v)) -} -``` - -### blas/cblas128 and blas/cblas64 - -Wrappers for an implementation of the double (i.e., `complex128`) and single (`complex64`) -precision complex parts of the blas API. - -Currently blas/cblas64 and blas/cblas128 require gonum.org/v1/netlib/blas. diff --git a/vendor/gonum.org/v1/gonum/blas/blas.go b/vendor/gonum.org/v1/gonum/blas/blas.go deleted file mode 100644 index 9b933e3fc5..0000000000 --- a/vendor/gonum.org/v1/gonum/blas/blas.go +++ /dev/null @@ -1,283 +0,0 @@ -// Copyright ©2013 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:generate ./conversions.bash - -package blas - -// Flag constants indicate Givens transformation H matrix state. -type Flag int - -const ( - Identity Flag = -2 // H is the identity matrix; no rotation is needed. - Rescaling Flag = -1 // H specifies rescaling. - OffDiagonal Flag = 0 // Off-diagonal elements of H are non-unit. - Diagonal Flag = 1 // Diagonal elements of H are non-unit. -) - -// SrotmParams contains Givens transformation parameters returned -// by the Float32 Srotm method. -type SrotmParams struct { - Flag - H [4]float32 // Column-major 2 by 2 matrix. -} - -// DrotmParams contains Givens transformation parameters returned -// by the Float64 Drotm method. -type DrotmParams struct { - Flag - H [4]float64 // Column-major 2 by 2 matrix. -} - -// Transpose specifies the transposition operation of a matrix. -type Transpose byte - -const ( - NoTrans Transpose = 'N' - Trans Transpose = 'T' - ConjTrans Transpose = 'C' -) - -// Uplo specifies whether a matrix is upper or lower triangular. -type Uplo byte - -const ( - Upper Uplo = 'U' - Lower Uplo = 'L' - All Uplo = 'A' -) - -// Diag specifies whether a matrix is unit triangular. -type Diag byte - -const ( - NonUnit Diag = 'N' - Unit Diag = 'U' -) - -// Side specifies from which side a multiplication operation is performed. -type Side byte - -const ( - Left Side = 'L' - Right Side = 'R' -) - -// Float32 implements the single precision real BLAS routines. -type Float32 interface { - Float32Level1 - Float32Level2 - Float32Level3 -} - -// Float32Level1 implements the single precision real BLAS Level 1 routines. -type Float32Level1 interface { - Sdsdot(n int, alpha float32, x []float32, incX int, y []float32, incY int) float32 - Dsdot(n int, x []float32, incX int, y []float32, incY int) float64 - Sdot(n int, x []float32, incX int, y []float32, incY int) float32 - Snrm2(n int, x []float32, incX int) float32 - Sasum(n int, x []float32, incX int) float32 - Isamax(n int, x []float32, incX int) int - Sswap(n int, x []float32, incX int, y []float32, incY int) - Scopy(n int, x []float32, incX int, y []float32, incY int) - Saxpy(n int, alpha float32, x []float32, incX int, y []float32, incY int) - Srotg(a, b float32) (c, s, r, z float32) - Srotmg(d1, d2, b1, b2 float32) (p SrotmParams, rd1, rd2, rb1 float32) - Srot(n int, x []float32, incX int, y []float32, incY int, c, s float32) - Srotm(n int, x []float32, incX int, y []float32, incY int, p SrotmParams) - Sscal(n int, alpha float32, x []float32, incX int) -} - -// Float32Level2 implements the single precision real BLAS Level 2 routines. -type Float32Level2 interface { - Sgemv(tA Transpose, m, n int, alpha float32, a []float32, lda int, x []float32, incX int, beta float32, y []float32, incY int) - Sgbmv(tA Transpose, m, n, kL, kU int, alpha float32, a []float32, lda int, x []float32, incX int, beta float32, y []float32, incY int) - Strmv(ul Uplo, tA Transpose, d Diag, n int, a []float32, lda int, x []float32, incX int) - Stbmv(ul Uplo, tA Transpose, d Diag, n, k int, a []float32, lda int, x []float32, incX int) - Stpmv(ul Uplo, tA Transpose, d Diag, n int, ap []float32, x []float32, incX int) - Strsv(ul Uplo, tA Transpose, d Diag, n int, a []float32, lda int, x []float32, incX int) - Stbsv(ul Uplo, tA Transpose, d Diag, n, k int, a []float32, lda int, x []float32, incX int) - Stpsv(ul Uplo, tA Transpose, d Diag, n int, ap []float32, x []float32, incX int) - Ssymv(ul Uplo, n int, alpha float32, a []float32, lda int, x []float32, incX int, beta float32, y []float32, incY int) - Ssbmv(ul Uplo, n, k int, alpha float32, a []float32, lda int, x []float32, incX int, beta float32, y []float32, incY int) - Sspmv(ul Uplo, n int, alpha float32, ap []float32, x []float32, incX int, beta float32, y []float32, incY int) - Sger(m, n int, alpha float32, x []float32, incX int, y []float32, incY int, a []float32, lda int) - Ssyr(ul Uplo, n int, alpha float32, x []float32, incX int, a []float32, lda int) - Sspr(ul Uplo, n int, alpha float32, x []float32, incX int, ap []float32) - Ssyr2(ul Uplo, n int, alpha float32, x []float32, incX int, y []float32, incY int, a []float32, lda int) - Sspr2(ul Uplo, n int, alpha float32, x []float32, incX int, y []float32, incY int, a []float32) -} - -// Float32Level3 implements the single precision real BLAS Level 3 routines. -type Float32Level3 interface { - Sgemm(tA, tB Transpose, m, n, k int, alpha float32, a []float32, lda int, b []float32, ldb int, beta float32, c []float32, ldc int) - Ssymm(s Side, ul Uplo, m, n int, alpha float32, a []float32, lda int, b []float32, ldb int, beta float32, c []float32, ldc int) - Ssyrk(ul Uplo, t Transpose, n, k int, alpha float32, a []float32, lda int, beta float32, c []float32, ldc int) - Ssyr2k(ul Uplo, t Transpose, n, k int, alpha float32, a []float32, lda int, b []float32, ldb int, beta float32, c []float32, ldc int) - Strmm(s Side, ul Uplo, tA Transpose, d Diag, m, n int, alpha float32, a []float32, lda int, b []float32, ldb int) - Strsm(s Side, ul Uplo, tA Transpose, d Diag, m, n int, alpha float32, a []float32, lda int, b []float32, ldb int) -} - -// Float64 implements the single precision real BLAS routines. -type Float64 interface { - Float64Level1 - Float64Level2 - Float64Level3 -} - -// Float64Level1 implements the double precision real BLAS Level 1 routines. -type Float64Level1 interface { - Ddot(n int, x []float64, incX int, y []float64, incY int) float64 - Dnrm2(n int, x []float64, incX int) float64 - Dasum(n int, x []float64, incX int) float64 - Idamax(n int, x []float64, incX int) int - Dswap(n int, x []float64, incX int, y []float64, incY int) - Dcopy(n int, x []float64, incX int, y []float64, incY int) - Daxpy(n int, alpha float64, x []float64, incX int, y []float64, incY int) - Drotg(a, b float64) (c, s, r, z float64) - Drotmg(d1, d2, b1, b2 float64) (p DrotmParams, rd1, rd2, rb1 float64) - Drot(n int, x []float64, incX int, y []float64, incY int, c float64, s float64) - Drotm(n int, x []float64, incX int, y []float64, incY int, p DrotmParams) - Dscal(n int, alpha float64, x []float64, incX int) -} - -// Float64Level2 implements the double precision real BLAS Level 2 routines. -type Float64Level2 interface { - Dgemv(tA Transpose, m, n int, alpha float64, a []float64, lda int, x []float64, incX int, beta float64, y []float64, incY int) - Dgbmv(tA Transpose, m, n, kL, kU int, alpha float64, a []float64, lda int, x []float64, incX int, beta float64, y []float64, incY int) - Dtrmv(ul Uplo, tA Transpose, d Diag, n int, a []float64, lda int, x []float64, incX int) - Dtbmv(ul Uplo, tA Transpose, d Diag, n, k int, a []float64, lda int, x []float64, incX int) - Dtpmv(ul Uplo, tA Transpose, d Diag, n int, ap []float64, x []float64, incX int) - Dtrsv(ul Uplo, tA Transpose, d Diag, n int, a []float64, lda int, x []float64, incX int) - Dtbsv(ul Uplo, tA Transpose, d Diag, n, k int, a []float64, lda int, x []float64, incX int) - Dtpsv(ul Uplo, tA Transpose, d Diag, n int, ap []float64, x []float64, incX int) - Dsymv(ul Uplo, n int, alpha float64, a []float64, lda int, x []float64, incX int, beta float64, y []float64, incY int) - Dsbmv(ul Uplo, n, k int, alpha float64, a []float64, lda int, x []float64, incX int, beta float64, y []float64, incY int) - Dspmv(ul Uplo, n int, alpha float64, ap []float64, x []float64, incX int, beta float64, y []float64, incY int) - Dger(m, n int, alpha float64, x []float64, incX int, y []float64, incY int, a []float64, lda int) - Dsyr(ul Uplo, n int, alpha float64, x []float64, incX int, a []float64, lda int) - Dspr(ul Uplo, n int, alpha float64, x []float64, incX int, ap []float64) - Dsyr2(ul Uplo, n int, alpha float64, x []float64, incX int, y []float64, incY int, a []float64, lda int) - Dspr2(ul Uplo, n int, alpha float64, x []float64, incX int, y []float64, incY int, a []float64) -} - -// Float64Level3 implements the double precision real BLAS Level 3 routines. -type Float64Level3 interface { - Dgemm(tA, tB Transpose, m, n, k int, alpha float64, a []float64, lda int, b []float64, ldb int, beta float64, c []float64, ldc int) - Dsymm(s Side, ul Uplo, m, n int, alpha float64, a []float64, lda int, b []float64, ldb int, beta float64, c []float64, ldc int) - Dsyrk(ul Uplo, t Transpose, n, k int, alpha float64, a []float64, lda int, beta float64, c []float64, ldc int) - Dsyr2k(ul Uplo, t Transpose, n, k int, alpha float64, a []float64, lda int, b []float64, ldb int, beta float64, c []float64, ldc int) - Dtrmm(s Side, ul Uplo, tA Transpose, d Diag, m, n int, alpha float64, a []float64, lda int, b []float64, ldb int) - Dtrsm(s Side, ul Uplo, tA Transpose, d Diag, m, n int, alpha float64, a []float64, lda int, b []float64, ldb int) -} - -// Complex64 implements the single precision complex BLAS routines. -type Complex64 interface { - Complex64Level1 - Complex64Level2 - Complex64Level3 -} - -// Complex64Level1 implements the single precision complex BLAS Level 1 routines. -type Complex64Level1 interface { - Cdotu(n int, x []complex64, incX int, y []complex64, incY int) (dotu complex64) - Cdotc(n int, x []complex64, incX int, y []complex64, incY int) (dotc complex64) - Scnrm2(n int, x []complex64, incX int) float32 - Scasum(n int, x []complex64, incX int) float32 - Icamax(n int, x []complex64, incX int) int - Cswap(n int, x []complex64, incX int, y []complex64, incY int) - Ccopy(n int, x []complex64, incX int, y []complex64, incY int) - Caxpy(n int, alpha complex64, x []complex64, incX int, y []complex64, incY int) - Cscal(n int, alpha complex64, x []complex64, incX int) - Csscal(n int, alpha float32, x []complex64, incX int) -} - -// Complex64Level2 implements the single precision complex BLAS routines Level 2 routines. -type Complex64Level2 interface { - Cgemv(tA Transpose, m, n int, alpha complex64, a []complex64, lda int, x []complex64, incX int, beta complex64, y []complex64, incY int) - Cgbmv(tA Transpose, m, n, kL, kU int, alpha complex64, a []complex64, lda int, x []complex64, incX int, beta complex64, y []complex64, incY int) - Ctrmv(ul Uplo, tA Transpose, d Diag, n int, a []complex64, lda int, x []complex64, incX int) - Ctbmv(ul Uplo, tA Transpose, d Diag, n, k int, a []complex64, lda int, x []complex64, incX int) - Ctpmv(ul Uplo, tA Transpose, d Diag, n int, ap []complex64, x []complex64, incX int) - Ctrsv(ul Uplo, tA Transpose, d Diag, n int, a []complex64, lda int, x []complex64, incX int) - Ctbsv(ul Uplo, tA Transpose, d Diag, n, k int, a []complex64, lda int, x []complex64, incX int) - Ctpsv(ul Uplo, tA Transpose, d Diag, n int, ap []complex64, x []complex64, incX int) - Chemv(ul Uplo, n int, alpha complex64, a []complex64, lda int, x []complex64, incX int, beta complex64, y []complex64, incY int) - Chbmv(ul Uplo, n, k int, alpha complex64, a []complex64, lda int, x []complex64, incX int, beta complex64, y []complex64, incY int) - Chpmv(ul Uplo, n int, alpha complex64, ap []complex64, x []complex64, incX int, beta complex64, y []complex64, incY int) - Cgeru(m, n int, alpha complex64, x []complex64, incX int, y []complex64, incY int, a []complex64, lda int) - Cgerc(m, n int, alpha complex64, x []complex64, incX int, y []complex64, incY int, a []complex64, lda int) - Cher(ul Uplo, n int, alpha float32, x []complex64, incX int, a []complex64, lda int) - Chpr(ul Uplo, n int, alpha float32, x []complex64, incX int, a []complex64) - Cher2(ul Uplo, n int, alpha complex64, x []complex64, incX int, y []complex64, incY int, a []complex64, lda int) - Chpr2(ul Uplo, n int, alpha complex64, x []complex64, incX int, y []complex64, incY int, ap []complex64) -} - -// Complex64Level3 implements the single precision complex BLAS Level 3 routines. -type Complex64Level3 interface { - Cgemm(tA, tB Transpose, m, n, k int, alpha complex64, a []complex64, lda int, b []complex64, ldb int, beta complex64, c []complex64, ldc int) - Csymm(s Side, ul Uplo, m, n int, alpha complex64, a []complex64, lda int, b []complex64, ldb int, beta complex64, c []complex64, ldc int) - Csyrk(ul Uplo, t Transpose, n, k int, alpha complex64, a []complex64, lda int, beta complex64, c []complex64, ldc int) - Csyr2k(ul Uplo, t Transpose, n, k int, alpha complex64, a []complex64, lda int, b []complex64, ldb int, beta complex64, c []complex64, ldc int) - Ctrmm(s Side, ul Uplo, tA Transpose, d Diag, m, n int, alpha complex64, a []complex64, lda int, b []complex64, ldb int) - Ctrsm(s Side, ul Uplo, tA Transpose, d Diag, m, n int, alpha complex64, a []complex64, lda int, b []complex64, ldb int) - Chemm(s Side, ul Uplo, m, n int, alpha complex64, a []complex64, lda int, b []complex64, ldb int, beta complex64, c []complex64, ldc int) - Cherk(ul Uplo, t Transpose, n, k int, alpha float32, a []complex64, lda int, beta float32, c []complex64, ldc int) - Cher2k(ul Uplo, t Transpose, n, k int, alpha complex64, a []complex64, lda int, b []complex64, ldb int, beta float32, c []complex64, ldc int) -} - -// Complex128 implements the double precision complex BLAS routines. -type Complex128 interface { - Complex128Level1 - Complex128Level2 - Complex128Level3 -} - -// Complex128Level1 implements the double precision complex BLAS Level 1 routines. -type Complex128Level1 interface { - Zdotu(n int, x []complex128, incX int, y []complex128, incY int) (dotu complex128) - Zdotc(n int, x []complex128, incX int, y []complex128, incY int) (dotc complex128) - Dznrm2(n int, x []complex128, incX int) float64 - Dzasum(n int, x []complex128, incX int) float64 - Izamax(n int, x []complex128, incX int) int - Zswap(n int, x []complex128, incX int, y []complex128, incY int) - Zcopy(n int, x []complex128, incX int, y []complex128, incY int) - Zaxpy(n int, alpha complex128, x []complex128, incX int, y []complex128, incY int) - Zscal(n int, alpha complex128, x []complex128, incX int) - Zdscal(n int, alpha float64, x []complex128, incX int) -} - -// Complex128Level2 implements the double precision complex BLAS Level 2 routines. -type Complex128Level2 interface { - Zgemv(tA Transpose, m, n int, alpha complex128, a []complex128, lda int, x []complex128, incX int, beta complex128, y []complex128, incY int) - Zgbmv(tA Transpose, m, n int, kL int, kU int, alpha complex128, a []complex128, lda int, x []complex128, incX int, beta complex128, y []complex128, incY int) - Ztrmv(ul Uplo, tA Transpose, d Diag, n int, a []complex128, lda int, x []complex128, incX int) - Ztbmv(ul Uplo, tA Transpose, d Diag, n, k int, a []complex128, lda int, x []complex128, incX int) - Ztpmv(ul Uplo, tA Transpose, d Diag, n int, ap []complex128, x []complex128, incX int) - Ztrsv(ul Uplo, tA Transpose, d Diag, n int, a []complex128, lda int, x []complex128, incX int) - Ztbsv(ul Uplo, tA Transpose, d Diag, n, k int, a []complex128, lda int, x []complex128, incX int) - Ztpsv(ul Uplo, tA Transpose, d Diag, n int, ap []complex128, x []complex128, incX int) - Zhemv(ul Uplo, n int, alpha complex128, a []complex128, lda int, x []complex128, incX int, beta complex128, y []complex128, incY int) - Zhbmv(ul Uplo, n, k int, alpha complex128, a []complex128, lda int, x []complex128, incX int, beta complex128, y []complex128, incY int) - Zhpmv(ul Uplo, n int, alpha complex128, ap []complex128, x []complex128, incX int, beta complex128, y []complex128, incY int) - Zgeru(m, n int, alpha complex128, x []complex128, incX int, y []complex128, incY int, a []complex128, lda int) - Zgerc(m, n int, alpha complex128, x []complex128, incX int, y []complex128, incY int, a []complex128, lda int) - Zher(ul Uplo, n int, alpha float64, x []complex128, incX int, a []complex128, lda int) - Zhpr(ul Uplo, n int, alpha float64, x []complex128, incX int, a []complex128) - Zher2(ul Uplo, n int, alpha complex128, x []complex128, incX int, y []complex128, incY int, a []complex128, lda int) - Zhpr2(ul Uplo, n int, alpha complex128, x []complex128, incX int, y []complex128, incY int, ap []complex128) -} - -// Complex128Level3 implements the double precision complex BLAS Level 3 routines. -type Complex128Level3 interface { - Zgemm(tA, tB Transpose, m, n, k int, alpha complex128, a []complex128, lda int, b []complex128, ldb int, beta complex128, c []complex128, ldc int) - Zsymm(s Side, ul Uplo, m, n int, alpha complex128, a []complex128, lda int, b []complex128, ldb int, beta complex128, c []complex128, ldc int) - Zsyrk(ul Uplo, t Transpose, n, k int, alpha complex128, a []complex128, lda int, beta complex128, c []complex128, ldc int) - Zsyr2k(ul Uplo, t Transpose, n, k int, alpha complex128, a []complex128, lda int, b []complex128, ldb int, beta complex128, c []complex128, ldc int) - Ztrmm(s Side, ul Uplo, tA Transpose, d Diag, m, n int, alpha complex128, a []complex128, lda int, b []complex128, ldb int) - Ztrsm(s Side, ul Uplo, tA Transpose, d Diag, m, n int, alpha complex128, a []complex128, lda int, b []complex128, ldb int) - Zhemm(s Side, ul Uplo, m, n int, alpha complex128, a []complex128, lda int, b []complex128, ldb int, beta complex128, c []complex128, ldc int) - Zherk(ul Uplo, t Transpose, n, k int, alpha float64, a []complex128, lda int, beta float64, c []complex128, ldc int) - Zher2k(ul Uplo, t Transpose, n, k int, alpha complex128, a []complex128, lda int, b []complex128, ldb int, beta float64, c []complex128, ldc int) -} diff --git a/vendor/gonum.org/v1/gonum/blas/blas64/blas64.go b/vendor/gonum.org/v1/gonum/blas/blas64/blas64.go deleted file mode 100644 index 551983836c..0000000000 --- a/vendor/gonum.org/v1/gonum/blas/blas64/blas64.go +++ /dev/null @@ -1,469 +0,0 @@ -// Copyright ©2015 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package blas64 - -import ( - "gonum.org/v1/gonum/blas" - "gonum.org/v1/gonum/blas/gonum" -) - -var blas64 blas.Float64 = gonum.Implementation{} - -// Use sets the BLAS float64 implementation to be used by subsequent BLAS calls. -// The default implementation is -// gonum.org/v1/gonum/blas/gonum.Implementation. -func Use(b blas.Float64) { - blas64 = b -} - -// Implementation returns the current BLAS float64 implementation. -// -// Implementation allows direct calls to the current the BLAS float64 implementation -// giving finer control of parameters. -func Implementation() blas.Float64 { - return blas64 -} - -// Vector represents a vector with an associated element increment. -type Vector struct { - N int - Data []float64 - Inc int -} - -// General represents a matrix using the conventional storage scheme. -type General struct { - Rows, Cols int - Data []float64 - Stride int -} - -// Band represents a band matrix using the band storage scheme. -type Band struct { - Rows, Cols int - KL, KU int - Data []float64 - Stride int -} - -// Triangular represents a triangular matrix using the conventional storage scheme. -type Triangular struct { - Uplo blas.Uplo - Diag blas.Diag - N int - Data []float64 - Stride int -} - -// TriangularBand represents a triangular matrix using the band storage scheme. -type TriangularBand struct { - Uplo blas.Uplo - Diag blas.Diag - N, K int - Data []float64 - Stride int -} - -// TriangularPacked represents a triangular matrix using the packed storage scheme. -type TriangularPacked struct { - Uplo blas.Uplo - Diag blas.Diag - N int - Data []float64 -} - -// Symmetric represents a symmetric matrix using the conventional storage scheme. -type Symmetric struct { - Uplo blas.Uplo - N int - Data []float64 - Stride int -} - -// SymmetricBand represents a symmetric matrix using the band storage scheme. -type SymmetricBand struct { - Uplo blas.Uplo - N, K int - Data []float64 - Stride int -} - -// SymmetricPacked represents a symmetric matrix using the packed storage scheme. -type SymmetricPacked struct { - Uplo blas.Uplo - N int - Data []float64 -} - -// Level 1 - -const ( - negInc = "blas64: negative vector increment" - badLength = "blas64: vector length mismatch" -) - -// Dot computes the dot product of the two vectors: -// \sum_i x[i]*y[i]. -func Dot(x, y Vector) float64 { - if x.N != y.N { - panic(badLength) - } - return blas64.Ddot(x.N, x.Data, x.Inc, y.Data, y.Inc) -} - -// Nrm2 computes the Euclidean norm of the vector x: -// sqrt(\sum_i x[i]*x[i]). -// -// Nrm2 will panic if the vector increment is negative. -func Nrm2(x Vector) float64 { - if x.Inc < 0 { - panic(negInc) - } - return blas64.Dnrm2(x.N, x.Data, x.Inc) -} - -// Asum computes the sum of the absolute values of the elements of x: -// \sum_i |x[i]|. -// -// Asum will panic if the vector increment is negative. -func Asum(x Vector) float64 { - if x.Inc < 0 { - panic(negInc) - } - return blas64.Dasum(x.N, x.Data, x.Inc) -} - -// Iamax returns the index of an element of x with the largest absolute value. -// If there are multiple such indices the earliest is returned. -// Iamax returns -1 if n == 0. -// -// Iamax will panic if the vector increment is negative. -func Iamax(x Vector) int { - if x.Inc < 0 { - panic(negInc) - } - return blas64.Idamax(x.N, x.Data, x.Inc) -} - -// Swap exchanges the elements of the two vectors: -// x[i], y[i] = y[i], x[i] for all i. -func Swap(x, y Vector) { - if x.N != y.N { - panic(badLength) - } - blas64.Dswap(x.N, x.Data, x.Inc, y.Data, y.Inc) -} - -// Copy copies the elements of x into the elements of y: -// y[i] = x[i] for all i. -// Copy requires that the lengths of x and y match and will panic otherwise. -func Copy(x, y Vector) { - if x.N != y.N { - panic(badLength) - } - blas64.Dcopy(x.N, x.Data, x.Inc, y.Data, y.Inc) -} - -// Axpy adds x scaled by alpha to y: -// y[i] += alpha*x[i] for all i. -func Axpy(alpha float64, x, y Vector) { - if x.N != y.N { - panic(badLength) - } - blas64.Daxpy(x.N, alpha, x.Data, x.Inc, y.Data, y.Inc) -} - -// Rotg computes the parameters of a Givens plane rotation so that -// ⎡ c s⎤ ⎡a⎤ ⎡r⎤ -// ⎣-s c⎦ * ⎣b⎦ = ⎣0⎦ -// where a and b are the Cartesian coordinates of a given point. -// c, s, and r are defined as -// r = ±Sqrt(a^2 + b^2), -// c = a/r, the cosine of the rotation angle, -// s = a/r, the sine of the rotation angle, -// and z is defined such that -// if |a| > |b|, z = s, -// otherwise if c != 0, z = 1/c, -// otherwise z = 1. -func Rotg(a, b float64) (c, s, r, z float64) { - return blas64.Drotg(a, b) -} - -// Rotmg computes the modified Givens rotation. See -// http://www.netlib.org/lapack/explore-html/df/deb/drotmg_8f.html -// for more details. -func Rotmg(d1, d2, b1, b2 float64) (p blas.DrotmParams, rd1, rd2, rb1 float64) { - return blas64.Drotmg(d1, d2, b1, b2) -} - -// Rot applies a plane transformation to n points represented by the vectors x -// and y: -// x[i] = c*x[i] + s*y[i], -// y[i] = -s*x[i] + c*y[i], for all i. -func Rot(x, y Vector, c, s float64) { - if x.N != y.N { - panic(badLength) - } - blas64.Drot(x.N, x.Data, x.Inc, y.Data, y.Inc, c, s) -} - -// Rotm applies the modified Givens rotation to n points represented by the -// vectors x and y. -func Rotm(x, y Vector, p blas.DrotmParams) { - if x.N != y.N { - panic(badLength) - } - blas64.Drotm(x.N, x.Data, x.Inc, y.Data, y.Inc, p) -} - -// Scal scales the vector x by alpha: -// x[i] *= alpha for all i. -// -// Scal will panic if the vector increment is negative. -func Scal(alpha float64, x Vector) { - if x.Inc < 0 { - panic(negInc) - } - blas64.Dscal(x.N, alpha, x.Data, x.Inc) -} - -// Level 2 - -// Gemv computes -// y = alpha * A * x + beta * y, if t == blas.NoTrans, -// y = alpha * A^T * x + beta * y, if t == blas.Trans or blas.ConjTrans, -// where A is an m×n dense matrix, x and y are vectors, and alpha and beta are scalars. -func Gemv(t blas.Transpose, alpha float64, a General, x Vector, beta float64, y Vector) { - blas64.Dgemv(t, a.Rows, a.Cols, alpha, a.Data, a.Stride, x.Data, x.Inc, beta, y.Data, y.Inc) -} - -// Gbmv computes -// y = alpha * A * x + beta * y, if t == blas.NoTrans, -// y = alpha * A^T * x + beta * y, if t == blas.Trans or blas.ConjTrans, -// where A is an m×n band matrix, x and y are vectors, and alpha and beta are scalars. -func Gbmv(t blas.Transpose, alpha float64, a Band, x Vector, beta float64, y Vector) { - blas64.Dgbmv(t, a.Rows, a.Cols, a.KL, a.KU, alpha, a.Data, a.Stride, x.Data, x.Inc, beta, y.Data, y.Inc) -} - -// Trmv computes -// x = A * x, if t == blas.NoTrans, -// x = A^T * x, if t == blas.Trans or blas.ConjTrans, -// where A is an n×n triangular matrix, and x is a vector. -func Trmv(t blas.Transpose, a Triangular, x Vector) { - blas64.Dtrmv(a.Uplo, t, a.Diag, a.N, a.Data, a.Stride, x.Data, x.Inc) -} - -// Tbmv computes -// x = A * x, if t == blas.NoTrans, -// x = A^T * x, if t == blas.Trans or blas.ConjTrans, -// where A is an n×n triangular band matrix, and x is a vector. -func Tbmv(t blas.Transpose, a TriangularBand, x Vector) { - blas64.Dtbmv(a.Uplo, t, a.Diag, a.N, a.K, a.Data, a.Stride, x.Data, x.Inc) -} - -// Tpmv computes -// x = A * x, if t == blas.NoTrans, -// x = A^T * x, if t == blas.Trans or blas.ConjTrans, -// where A is an n×n triangular matrix in packed format, and x is a vector. -func Tpmv(t blas.Transpose, a TriangularPacked, x Vector) { - blas64.Dtpmv(a.Uplo, t, a.Diag, a.N, a.Data, x.Data, x.Inc) -} - -// Trsv solves -// A * x = b, if t == blas.NoTrans, -// A^T * x = b, if t == blas.Trans or blas.ConjTrans, -// where A is an n×n triangular matrix, and x and b are vectors. -// -// At entry to the function, x contains the values of b, and the result is -// stored in-place into x. -// -// No test for singularity or near-singularity is included in this -// routine. Such tests must be performed before calling this routine. -func Trsv(t blas.Transpose, a Triangular, x Vector) { - blas64.Dtrsv(a.Uplo, t, a.Diag, a.N, a.Data, a.Stride, x.Data, x.Inc) -} - -// Tbsv solves -// A * x = b, if t == blas.NoTrans, -// A^T * x = b, if t == blas.Trans or blas.ConjTrans, -// where A is an n×n triangular band matrix, and x and b are vectors. -// -// At entry to the function, x contains the values of b, and the result is -// stored in place into x. -// -// No test for singularity or near-singularity is included in this -// routine. Such tests must be performed before calling this routine. -func Tbsv(t blas.Transpose, a TriangularBand, x Vector) { - blas64.Dtbsv(a.Uplo, t, a.Diag, a.N, a.K, a.Data, a.Stride, x.Data, x.Inc) -} - -// Tpsv solves -// A * x = b, if t == blas.NoTrans, -// A^T * x = b, if t == blas.Trans or blas.ConjTrans, -// where A is an n×n triangular matrix in packed format, and x and b are -// vectors. -// -// At entry to the function, x contains the values of b, and the result is -// stored in place into x. -// -// No test for singularity or near-singularity is included in this -// routine. Such tests must be performed before calling this routine. -func Tpsv(t blas.Transpose, a TriangularPacked, x Vector) { - blas64.Dtpsv(a.Uplo, t, a.Diag, a.N, a.Data, x.Data, x.Inc) -} - -// Symv computes -// y = alpha * A * x + beta * y, -// where A is an n×n symmetric matrix, x and y are vectors, and alpha and -// beta are scalars. -func Symv(alpha float64, a Symmetric, x Vector, beta float64, y Vector) { - blas64.Dsymv(a.Uplo, a.N, alpha, a.Data, a.Stride, x.Data, x.Inc, beta, y.Data, y.Inc) -} - -// Sbmv performs -// y = alpha * A * x + beta * y, -// where A is an n×n symmetric band matrix, x and y are vectors, and alpha -// and beta are scalars. -func Sbmv(alpha float64, a SymmetricBand, x Vector, beta float64, y Vector) { - blas64.Dsbmv(a.Uplo, a.N, a.K, alpha, a.Data, a.Stride, x.Data, x.Inc, beta, y.Data, y.Inc) -} - -// Spmv performs -// y = alpha * A * x + beta * y, -// where A is an n×n symmetric matrix in packed format, x and y are vectors, -// and alpha and beta are scalars. -func Spmv(alpha float64, a SymmetricPacked, x Vector, beta float64, y Vector) { - blas64.Dspmv(a.Uplo, a.N, alpha, a.Data, x.Data, x.Inc, beta, y.Data, y.Inc) -} - -// Ger performs a rank-1 update -// A += alpha * x * y^T, -// where A is an m×n dense matrix, x and y are vectors, and alpha is a scalar. -func Ger(alpha float64, x, y Vector, a General) { - blas64.Dger(a.Rows, a.Cols, alpha, x.Data, x.Inc, y.Data, y.Inc, a.Data, a.Stride) -} - -// Syr performs a rank-1 update -// A += alpha * x * x^T, -// where A is an n×n symmetric matrix, x is a vector, and alpha is a scalar. -func Syr(alpha float64, x Vector, a Symmetric) { - blas64.Dsyr(a.Uplo, a.N, alpha, x.Data, x.Inc, a.Data, a.Stride) -} - -// Spr performs the rank-1 update -// A += alpha * x * x^T, -// where A is an n×n symmetric matrix in packed format, x is a vector, and -// alpha is a scalar. -func Spr(alpha float64, x Vector, a SymmetricPacked) { - blas64.Dspr(a.Uplo, a.N, alpha, x.Data, x.Inc, a.Data) -} - -// Syr2 performs a rank-2 update -// A += alpha * x * y^T + alpha * y * x^T, -// where A is a symmetric n×n matrix, x and y are vectors, and alpha is a scalar. -func Syr2(alpha float64, x, y Vector, a Symmetric) { - blas64.Dsyr2(a.Uplo, a.N, alpha, x.Data, x.Inc, y.Data, y.Inc, a.Data, a.Stride) -} - -// Spr2 performs a rank-2 update -// A += alpha * x * y^T + alpha * y * x^T, -// where A is an n×n symmetric matrix in packed format, x and y are vectors, -// and alpha is a scalar. -func Spr2(alpha float64, x, y Vector, a SymmetricPacked) { - blas64.Dspr2(a.Uplo, a.N, alpha, x.Data, x.Inc, y.Data, y.Inc, a.Data) -} - -// Level 3 - -// Gemm computes -// C = alpha * A * B + beta * C, -// where A, B, and C are dense matrices, and alpha and beta are scalars. -// tA and tB specify whether A or B are transposed. -func Gemm(tA, tB blas.Transpose, alpha float64, a, b General, beta float64, c General) { - var m, n, k int - if tA == blas.NoTrans { - m, k = a.Rows, a.Cols - } else { - m, k = a.Cols, a.Rows - } - if tB == blas.NoTrans { - n = b.Cols - } else { - n = b.Rows - } - blas64.Dgemm(tA, tB, m, n, k, alpha, a.Data, a.Stride, b.Data, b.Stride, beta, c.Data, c.Stride) -} - -// Symm performs -// C = alpha * A * B + beta * C, if s == blas.Left, -// C = alpha * B * A + beta * C, if s == blas.Right, -// where A is an n×n or m×m symmetric matrix, B and C are m×n matrices, and -// alpha is a scalar. -func Symm(s blas.Side, alpha float64, a Symmetric, b General, beta float64, c General) { - var m, n int - if s == blas.Left { - m, n = a.N, b.Cols - } else { - m, n = b.Rows, a.N - } - blas64.Dsymm(s, a.Uplo, m, n, alpha, a.Data, a.Stride, b.Data, b.Stride, beta, c.Data, c.Stride) -} - -// Syrk performs a symmetric rank-k update -// C = alpha * A * A^T + beta * C, if t == blas.NoTrans, -// C = alpha * A^T * A + beta * C, if t == blas.Trans or blas.ConjTrans, -// where C is an n×n symmetric matrix, A is an n×k matrix if t == blas.NoTrans and -// a k×n matrix otherwise, and alpha and beta are scalars. -func Syrk(t blas.Transpose, alpha float64, a General, beta float64, c Symmetric) { - var n, k int - if t == blas.NoTrans { - n, k = a.Rows, a.Cols - } else { - n, k = a.Cols, a.Rows - } - blas64.Dsyrk(c.Uplo, t, n, k, alpha, a.Data, a.Stride, beta, c.Data, c.Stride) -} - -// Syr2k performs a symmetric rank-2k update -// C = alpha * A * B^T + alpha * B * A^T + beta * C, if t == blas.NoTrans, -// C = alpha * A^T * B + alpha * B^T * A + beta * C, if t == blas.Trans or blas.ConjTrans, -// where C is an n×n symmetric matrix, A and B are n×k matrices if t == NoTrans -// and k×n matrices otherwise, and alpha and beta are scalars. -func Syr2k(t blas.Transpose, alpha float64, a, b General, beta float64, c Symmetric) { - var n, k int - if t == blas.NoTrans { - n, k = a.Rows, a.Cols - } else { - n, k = a.Cols, a.Rows - } - blas64.Dsyr2k(c.Uplo, t, n, k, alpha, a.Data, a.Stride, b.Data, b.Stride, beta, c.Data, c.Stride) -} - -// Trmm performs -// B = alpha * A * B, if tA == blas.NoTrans and s == blas.Left, -// B = alpha * A^T * B, if tA == blas.Trans or blas.ConjTrans, and s == blas.Left, -// B = alpha * B * A, if tA == blas.NoTrans and s == blas.Right, -// B = alpha * B * A^T, if tA == blas.Trans or blas.ConjTrans, and s == blas.Right, -// where A is an n×n or m×m triangular matrix, B is an m×n matrix, and alpha is -// a scalar. -func Trmm(s blas.Side, tA blas.Transpose, alpha float64, a Triangular, b General) { - blas64.Dtrmm(s, a.Uplo, tA, a.Diag, b.Rows, b.Cols, alpha, a.Data, a.Stride, b.Data, b.Stride) -} - -// Trsm solves -// A * X = alpha * B, if tA == blas.NoTrans and s == blas.Left, -// A^T * X = alpha * B, if tA == blas.Trans or blas.ConjTrans, and s == blas.Left, -// X * A = alpha * B, if tA == blas.NoTrans and s == blas.Right, -// X * A^T = alpha * B, if tA == blas.Trans or blas.ConjTrans, and s == blas.Right, -// where A is an n×n or m×m triangular matrix, X and B are m×n matrices, and -// alpha is a scalar. -// -// At entry to the function, X contains the values of B, and the result is -// stored in-place into X. -// -// No check is made that A is invertible. -func Trsm(s blas.Side, tA blas.Transpose, alpha float64, a Triangular, b General) { - blas64.Dtrsm(s, a.Uplo, tA, a.Diag, b.Rows, b.Cols, alpha, a.Data, a.Stride, b.Data, b.Stride) -} diff --git a/vendor/gonum.org/v1/gonum/blas/blas64/conv.go b/vendor/gonum.org/v1/gonum/blas/blas64/conv.go deleted file mode 100644 index 882fd8a716..0000000000 --- a/vendor/gonum.org/v1/gonum/blas/blas64/conv.go +++ /dev/null @@ -1,277 +0,0 @@ -// Copyright ©2015 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package blas64 - -import "gonum.org/v1/gonum/blas" - -// GeneralCols represents a matrix using the conventional column-major storage scheme. -type GeneralCols General - -// From fills the receiver with elements from a. The receiver -// must have the same dimensions as a and have adequate backing -// data storage. -func (t GeneralCols) From(a General) { - if t.Rows != a.Rows || t.Cols != a.Cols { - panic("blas64: mismatched dimension") - } - if len(t.Data) < (t.Cols-1)*t.Stride+t.Rows { - panic("blas64: short data slice") - } - for i := 0; i < a.Rows; i++ { - for j, v := range a.Data[i*a.Stride : i*a.Stride+a.Cols] { - t.Data[i+j*t.Stride] = v - } - } -} - -// From fills the receiver with elements from a. The receiver -// must have the same dimensions as a and have adequate backing -// data storage. -func (t General) From(a GeneralCols) { - if t.Rows != a.Rows || t.Cols != a.Cols { - panic("blas64: mismatched dimension") - } - if len(t.Data) < (t.Rows-1)*t.Stride+t.Cols { - panic("blas64: short data slice") - } - for j := 0; j < a.Cols; j++ { - for i, v := range a.Data[j*a.Stride : j*a.Stride+a.Rows] { - t.Data[i*t.Stride+j] = v - } - } -} - -// TriangularCols represents a matrix using the conventional column-major storage scheme. -type TriangularCols Triangular - -// From fills the receiver with elements from a. The receiver -// must have the same dimensions, uplo and diag as a and have -// adequate backing data storage. -func (t TriangularCols) From(a Triangular) { - if t.N != a.N { - panic("blas64: mismatched dimension") - } - if t.Uplo != a.Uplo { - panic("blas64: mismatched BLAS uplo") - } - if t.Diag != a.Diag { - panic("blas64: mismatched BLAS diag") - } - switch a.Uplo { - default: - panic("blas64: bad BLAS uplo") - case blas.Upper: - for i := 0; i < a.N; i++ { - for j := i; j < a.N; j++ { - t.Data[i+j*t.Stride] = a.Data[i*a.Stride+j] - } - } - case blas.Lower: - for i := 0; i < a.N; i++ { - for j := 0; j <= i; j++ { - t.Data[i+j*t.Stride] = a.Data[i*a.Stride+j] - } - } - case blas.All: - for i := 0; i < a.N; i++ { - for j := 0; j < a.N; j++ { - t.Data[i+j*t.Stride] = a.Data[i*a.Stride+j] - } - } - } -} - -// From fills the receiver with elements from a. The receiver -// must have the same dimensions, uplo and diag as a and have -// adequate backing data storage. -func (t Triangular) From(a TriangularCols) { - if t.N != a.N { - panic("blas64: mismatched dimension") - } - if t.Uplo != a.Uplo { - panic("blas64: mismatched BLAS uplo") - } - if t.Diag != a.Diag { - panic("blas64: mismatched BLAS diag") - } - switch a.Uplo { - default: - panic("blas64: bad BLAS uplo") - case blas.Upper: - for i := 0; i < a.N; i++ { - for j := i; j < a.N; j++ { - t.Data[i*t.Stride+j] = a.Data[i+j*a.Stride] - } - } - case blas.Lower: - for i := 0; i < a.N; i++ { - for j := 0; j <= i; j++ { - t.Data[i*t.Stride+j] = a.Data[i+j*a.Stride] - } - } - case blas.All: - for i := 0; i < a.N; i++ { - for j := 0; j < a.N; j++ { - t.Data[i*t.Stride+j] = a.Data[i+j*a.Stride] - } - } - } -} - -// BandCols represents a matrix using the band column-major storage scheme. -type BandCols Band - -// From fills the receiver with elements from a. The receiver -// must have the same dimensions and bandwidth as a and have -// adequate backing data storage. -func (t BandCols) From(a Band) { - if t.Rows != a.Rows || t.Cols != a.Cols { - panic("blas64: mismatched dimension") - } - if t.KL != a.KL || t.KU != a.KU { - panic("blas64: mismatched bandwidth") - } - if a.Stride < a.KL+a.KU+1 { - panic("blas64: short stride for source") - } - if t.Stride < t.KL+t.KU+1 { - panic("blas64: short stride for destination") - } - for i := 0; i < a.Rows; i++ { - for j := max(0, i-a.KL); j < min(i+a.KU+1, a.Cols); j++ { - t.Data[i+t.KU-j+j*t.Stride] = a.Data[j+a.KL-i+i*a.Stride] - } - } -} - -// From fills the receiver with elements from a. The receiver -// must have the same dimensions and bandwidth as a and have -// adequate backing data storage. -func (t Band) From(a BandCols) { - if t.Rows != a.Rows || t.Cols != a.Cols { - panic("blas64: mismatched dimension") - } - if t.KL != a.KL || t.KU != a.KU { - panic("blas64: mismatched bandwidth") - } - if a.Stride < a.KL+a.KU+1 { - panic("blas64: short stride for source") - } - if t.Stride < t.KL+t.KU+1 { - panic("blas64: short stride for destination") - } - for j := 0; j < a.Cols; j++ { - for i := max(0, j-a.KU); i < min(j+a.KL+1, a.Rows); i++ { - t.Data[j+a.KL-i+i*a.Stride] = a.Data[i+t.KU-j+j*t.Stride] - } - } -} - -// TriangularBandCols represents a symmetric matrix using the band column-major storage scheme. -type TriangularBandCols TriangularBand - -// From fills the receiver with elements from a. The receiver -// must have the same dimensions, bandwidth and uplo as a and -// have adequate backing data storage. -func (t TriangularBandCols) From(a TriangularBand) { - if t.N != a.N { - panic("blas64: mismatched dimension") - } - if t.K != a.K { - panic("blas64: mismatched bandwidth") - } - if a.Stride < a.K+1 { - panic("blas64: short stride for source") - } - if t.Stride < t.K+1 { - panic("blas64: short stride for destination") - } - if t.Uplo != a.Uplo { - panic("blas64: mismatched BLAS uplo") - } - if t.Diag != a.Diag { - panic("blas64: mismatched BLAS diag") - } - dst := BandCols{ - Rows: t.N, Cols: t.N, - Stride: t.Stride, - Data: t.Data, - } - src := Band{ - Rows: a.N, Cols: a.N, - Stride: a.Stride, - Data: a.Data, - } - switch a.Uplo { - default: - panic("blas64: bad BLAS uplo") - case blas.Upper: - dst.KU = t.K - src.KU = a.K - case blas.Lower: - dst.KL = t.K - src.KL = a.K - } - dst.From(src) -} - -// From fills the receiver with elements from a. The receiver -// must have the same dimensions, bandwidth and uplo as a and -// have adequate backing data storage. -func (t TriangularBand) From(a TriangularBandCols) { - if t.N != a.N { - panic("blas64: mismatched dimension") - } - if t.K != a.K { - panic("blas64: mismatched bandwidth") - } - if a.Stride < a.K+1 { - panic("blas64: short stride for source") - } - if t.Stride < t.K+1 { - panic("blas64: short stride for destination") - } - if t.Uplo != a.Uplo { - panic("blas64: mismatched BLAS uplo") - } - if t.Diag != a.Diag { - panic("blas64: mismatched BLAS diag") - } - dst := Band{ - Rows: t.N, Cols: t.N, - Stride: t.Stride, - Data: t.Data, - } - src := BandCols{ - Rows: a.N, Cols: a.N, - Stride: a.Stride, - Data: a.Data, - } - switch a.Uplo { - default: - panic("blas64: bad BLAS uplo") - case blas.Upper: - dst.KU = t.K - src.KU = a.K - case blas.Lower: - dst.KL = t.K - src.KL = a.K - } - dst.From(src) -} - -func min(a, b int) int { - if a < b { - return a - } - return b -} - -func max(a, b int) int { - if a > b { - return a - } - return b -} diff --git a/vendor/gonum.org/v1/gonum/blas/blas64/conv_symmetric.go b/vendor/gonum.org/v1/gonum/blas/blas64/conv_symmetric.go deleted file mode 100644 index 5146f1a1c3..0000000000 --- a/vendor/gonum.org/v1/gonum/blas/blas64/conv_symmetric.go +++ /dev/null @@ -1,153 +0,0 @@ -// Copyright ©2015 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package blas64 - -import "gonum.org/v1/gonum/blas" - -// SymmetricCols represents a matrix using the conventional column-major storage scheme. -type SymmetricCols Symmetric - -// From fills the receiver with elements from a. The receiver -// must have the same dimensions and uplo as a and have adequate -// backing data storage. -func (t SymmetricCols) From(a Symmetric) { - if t.N != a.N { - panic("blas64: mismatched dimension") - } - if t.Uplo != a.Uplo { - panic("blas64: mismatched BLAS uplo") - } - switch a.Uplo { - default: - panic("blas64: bad BLAS uplo") - case blas.Upper: - for i := 0; i < a.N; i++ { - for j := i; j < a.N; j++ { - t.Data[i+j*t.Stride] = a.Data[i*a.Stride+j] - } - } - case blas.Lower: - for i := 0; i < a.N; i++ { - for j := 0; j <= i; j++ { - t.Data[i+j*t.Stride] = a.Data[i*a.Stride+j] - } - } - } -} - -// From fills the receiver with elements from a. The receiver -// must have the same dimensions and uplo as a and have adequate -// backing data storage. -func (t Symmetric) From(a SymmetricCols) { - if t.N != a.N { - panic("blas64: mismatched dimension") - } - if t.Uplo != a.Uplo { - panic("blas64: mismatched BLAS uplo") - } - switch a.Uplo { - default: - panic("blas64: bad BLAS uplo") - case blas.Upper: - for i := 0; i < a.N; i++ { - for j := i; j < a.N; j++ { - t.Data[i*t.Stride+j] = a.Data[i+j*a.Stride] - } - } - case blas.Lower: - for i := 0; i < a.N; i++ { - for j := 0; j <= i; j++ { - t.Data[i*t.Stride+j] = a.Data[i+j*a.Stride] - } - } - } -} - -// SymmetricBandCols represents a symmetric matrix using the band column-major storage scheme. -type SymmetricBandCols SymmetricBand - -// From fills the receiver with elements from a. The receiver -// must have the same dimensions, bandwidth and uplo as a and -// have adequate backing data storage. -func (t SymmetricBandCols) From(a SymmetricBand) { - if t.N != a.N { - panic("blas64: mismatched dimension") - } - if t.K != a.K { - panic("blas64: mismatched bandwidth") - } - if a.Stride < a.K+1 { - panic("blas64: short stride for source") - } - if t.Stride < t.K+1 { - panic("blas64: short stride for destination") - } - if t.Uplo != a.Uplo { - panic("blas64: mismatched BLAS uplo") - } - dst := BandCols{ - Rows: t.N, Cols: t.N, - Stride: t.Stride, - Data: t.Data, - } - src := Band{ - Rows: a.N, Cols: a.N, - Stride: a.Stride, - Data: a.Data, - } - switch a.Uplo { - default: - panic("blas64: bad BLAS uplo") - case blas.Upper: - dst.KU = t.K - src.KU = a.K - case blas.Lower: - dst.KL = t.K - src.KL = a.K - } - dst.From(src) -} - -// From fills the receiver with elements from a. The receiver -// must have the same dimensions, bandwidth and uplo as a and -// have adequate backing data storage. -func (t SymmetricBand) From(a SymmetricBandCols) { - if t.N != a.N { - panic("blas64: mismatched dimension") - } - if t.K != a.K { - panic("blas64: mismatched bandwidth") - } - if a.Stride < a.K+1 { - panic("blas64: short stride for source") - } - if t.Stride < t.K+1 { - panic("blas64: short stride for destination") - } - if t.Uplo != a.Uplo { - panic("blas64: mismatched BLAS uplo") - } - dst := Band{ - Rows: t.N, Cols: t.N, - Stride: t.Stride, - Data: t.Data, - } - src := BandCols{ - Rows: a.N, Cols: a.N, - Stride: a.Stride, - Data: a.Data, - } - switch a.Uplo { - default: - panic("blas64: bad BLAS uplo") - case blas.Upper: - dst.KU = t.K - src.KU = a.K - case blas.Lower: - dst.KL = t.K - src.KL = a.K - } - dst.From(src) -} diff --git a/vendor/gonum.org/v1/gonum/blas/blas64/doc.go b/vendor/gonum.org/v1/gonum/blas/blas64/doc.go deleted file mode 100644 index 7410cee486..0000000000 --- a/vendor/gonum.org/v1/gonum/blas/blas64/doc.go +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright ©2017 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package blas64 provides a simple interface to the float64 BLAS API. -package blas64 // import "gonum.org/v1/gonum/blas/blas64" diff --git a/vendor/gonum.org/v1/gonum/blas/cblas128/cblas128.go b/vendor/gonum.org/v1/gonum/blas/cblas128/cblas128.go deleted file mode 100644 index 1205da8afa..0000000000 --- a/vendor/gonum.org/v1/gonum/blas/cblas128/cblas128.go +++ /dev/null @@ -1,508 +0,0 @@ -// Copyright ©2015 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package cblas128 - -import ( - "gonum.org/v1/gonum/blas" - "gonum.org/v1/gonum/blas/gonum" -) - -var cblas128 blas.Complex128 = gonum.Implementation{} - -// Use sets the BLAS complex128 implementation to be used by subsequent BLAS calls. -// The default implementation is -// gonum.org/v1/gonum/blas/gonum.Implementation. -func Use(b blas.Complex128) { - cblas128 = b -} - -// Implementation returns the current BLAS complex128 implementation. -// -// Implementation allows direct calls to the current the BLAS complex128 implementation -// giving finer control of parameters. -func Implementation() blas.Complex128 { - return cblas128 -} - -// Vector represents a vector with an associated element increment. -type Vector struct { - Inc int - Data []complex128 -} - -// General represents a matrix using the conventional storage scheme. -type General struct { - Rows, Cols int - Stride int - Data []complex128 -} - -// Band represents a band matrix using the band storage scheme. -type Band struct { - Rows, Cols int - KL, KU int - Stride int - Data []complex128 -} - -// Triangular represents a triangular matrix using the conventional storage scheme. -type Triangular struct { - N int - Stride int - Data []complex128 - Uplo blas.Uplo - Diag blas.Diag -} - -// TriangularBand represents a triangular matrix using the band storage scheme. -type TriangularBand struct { - N, K int - Stride int - Data []complex128 - Uplo blas.Uplo - Diag blas.Diag -} - -// TriangularPacked represents a triangular matrix using the packed storage scheme. -type TriangularPacked struct { - N int - Data []complex128 - Uplo blas.Uplo - Diag blas.Diag -} - -// Symmetric represents a symmetric matrix using the conventional storage scheme. -type Symmetric struct { - N int - Stride int - Data []complex128 - Uplo blas.Uplo -} - -// SymmetricBand represents a symmetric matrix using the band storage scheme. -type SymmetricBand struct { - N, K int - Stride int - Data []complex128 - Uplo blas.Uplo -} - -// SymmetricPacked represents a symmetric matrix using the packed storage scheme. -type SymmetricPacked struct { - N int - Data []complex128 - Uplo blas.Uplo -} - -// Hermitian represents an Hermitian matrix using the conventional storage scheme. -type Hermitian Symmetric - -// HermitianBand represents an Hermitian matrix using the band storage scheme. -type HermitianBand SymmetricBand - -// HermitianPacked represents an Hermitian matrix using the packed storage scheme. -type HermitianPacked SymmetricPacked - -// Level 1 - -const negInc = "cblas128: negative vector increment" - -// Dotu computes the dot product of the two vectors without -// complex conjugation: -// x^T * y. -func Dotu(n int, x, y Vector) complex128 { - return cblas128.Zdotu(n, x.Data, x.Inc, y.Data, y.Inc) -} - -// Dotc computes the dot product of the two vectors with -// complex conjugation: -// x^H * y. -func Dotc(n int, x, y Vector) complex128 { - return cblas128.Zdotc(n, x.Data, x.Inc, y.Data, y.Inc) -} - -// Nrm2 computes the Euclidean norm of the vector x: -// sqrt(\sum_i x[i] * x[i]). -// -// Nrm2 will panic if the vector increment is negative. -func Nrm2(n int, x Vector) float64 { - if x.Inc < 0 { - panic(negInc) - } - return cblas128.Dznrm2(n, x.Data, x.Inc) -} - -// Asum computes the sum of magnitudes of the real and imaginary parts of -// elements of the vector x: -// \sum_i (|Re x[i]| + |Im x[i]|). -// -// Asum will panic if the vector increment is negative. -func Asum(n int, x Vector) float64 { - if x.Inc < 0 { - panic(negInc) - } - return cblas128.Dzasum(n, x.Data, x.Inc) -} - -// Iamax returns the index of an element of x with the largest sum of -// magnitudes of the real and imaginary parts (|Re x[i]|+|Im x[i]|). -// If there are multiple such indices, the earliest is returned. -// -// Iamax returns -1 if n == 0. -// -// Iamax will panic if the vector increment is negative. -func Iamax(n int, x Vector) int { - if x.Inc < 0 { - panic(negInc) - } - return cblas128.Izamax(n, x.Data, x.Inc) -} - -// Swap exchanges the elements of two vectors: -// x[i], y[i] = y[i], x[i] for all i. -func Swap(n int, x, y Vector) { - cblas128.Zswap(n, x.Data, x.Inc, y.Data, y.Inc) -} - -// Copy copies the elements of x into the elements of y: -// y[i] = x[i] for all i. -func Copy(n int, x, y Vector) { - cblas128.Zcopy(n, x.Data, x.Inc, y.Data, y.Inc) -} - -// Axpy computes -// y = alpha * x + y, -// where x and y are vectors, and alpha is a scalar. -func Axpy(n int, alpha complex128, x, y Vector) { - cblas128.Zaxpy(n, alpha, x.Data, x.Inc, y.Data, y.Inc) -} - -// Scal computes -// x = alpha * x, -// where x is a vector, and alpha is a scalar. -// -// Scal will panic if the vector increment is negative. -func Scal(n int, alpha complex128, x Vector) { - if x.Inc < 0 { - panic(negInc) - } - cblas128.Zscal(n, alpha, x.Data, x.Inc) -} - -// Dscal computes -// x = alpha * x, -// where x is a vector, and alpha is a real scalar. -// -// Dscal will panic if the vector increment is negative. -func Dscal(n int, alpha float64, x Vector) { - if x.Inc < 0 { - panic(negInc) - } - cblas128.Zdscal(n, alpha, x.Data, x.Inc) -} - -// Level 2 - -// Gemv computes -// y = alpha * A * x + beta * y, if t == blas.NoTrans, -// y = alpha * A^T * x + beta * y, if t == blas.Trans, -// y = alpha * A^H * x + beta * y, if t == blas.ConjTrans, -// where A is an m×n dense matrix, x and y are vectors, and alpha and beta are -// scalars. -func Gemv(t blas.Transpose, alpha complex128, a General, x Vector, beta complex128, y Vector) { - cblas128.Zgemv(t, a.Rows, a.Cols, alpha, a.Data, a.Stride, x.Data, x.Inc, beta, y.Data, y.Inc) -} - -// Gbmv computes -// y = alpha * A * x + beta * y, if t == blas.NoTrans, -// y = alpha * A^T * x + beta * y, if t == blas.Trans, -// y = alpha * A^H * x + beta * y, if t == blas.ConjTrans, -// where A is an m×n band matrix, x and y are vectors, and alpha and beta are -// scalars. -func Gbmv(t blas.Transpose, alpha complex128, a Band, x Vector, beta complex128, y Vector) { - cblas128.Zgbmv(t, a.Rows, a.Cols, a.KL, a.KU, alpha, a.Data, a.Stride, x.Data, x.Inc, beta, y.Data, y.Inc) -} - -// Trmv computes -// x = A * x, if t == blas.NoTrans, -// x = A^T * x, if t == blas.Trans, -// x = A^H * x, if t == blas.ConjTrans, -// where A is an n×n triangular matrix, and x is a vector. -func Trmv(t blas.Transpose, a Triangular, x Vector) { - cblas128.Ztrmv(a.Uplo, t, a.Diag, a.N, a.Data, a.Stride, x.Data, x.Inc) -} - -// Tbmv computes -// x = A * x, if t == blas.NoTrans, -// x = A^T * x, if t == blas.Trans, -// x = A^H * x, if t == blas.ConjTrans, -// where A is an n×n triangular band matrix, and x is a vector. -func Tbmv(t blas.Transpose, a TriangularBand, x Vector) { - cblas128.Ztbmv(a.Uplo, t, a.Diag, a.N, a.K, a.Data, a.Stride, x.Data, x.Inc) -} - -// Tpmv computes -// x = A * x, if t == blas.NoTrans, -// x = A^T * x, if t == blas.Trans, -// x = A^H * x, if t == blas.ConjTrans, -// where A is an n×n triangular matrix in packed format, and x is a vector. -func Tpmv(t blas.Transpose, a TriangularPacked, x Vector) { - cblas128.Ztpmv(a.Uplo, t, a.Diag, a.N, a.Data, x.Data, x.Inc) -} - -// Trsv solves -// A * x = b, if t == blas.NoTrans, -// A^T * x = b, if t == blas.Trans, -// A^H * x = b, if t == blas.ConjTrans, -// where A is an n×n triangular matrix and x is a vector. -// -// At entry to the function, x contains the values of b, and the result is -// stored in-place into x. -// -// No test for singularity or near-singularity is included in this -// routine. Such tests must be performed before calling this routine. -func Trsv(t blas.Transpose, a Triangular, x Vector) { - cblas128.Ztrsv(a.Uplo, t, a.Diag, a.N, a.Data, a.Stride, x.Data, x.Inc) -} - -// Tbsv solves -// A * x = b, if t == blas.NoTrans, -// A^T * x = b, if t == blas.Trans, -// A^H * x = b, if t == blas.ConjTrans, -// where A is an n×n triangular band matrix, and x is a vector. -// -// At entry to the function, x contains the values of b, and the result is -// stored in-place into x. -// -// No test for singularity or near-singularity is included in this -// routine. Such tests must be performed before calling this routine. -func Tbsv(t blas.Transpose, a TriangularBand, x Vector) { - cblas128.Ztbsv(a.Uplo, t, a.Diag, a.N, a.K, a.Data, a.Stride, x.Data, x.Inc) -} - -// Tpsv solves -// A * x = b, if t == blas.NoTrans, -// A^T * x = b, if t == blas.Trans, -// A^H * x = b, if t == blas.ConjTrans, -// where A is an n×n triangular matrix in packed format and x is a vector. -// -// At entry to the function, x contains the values of b, and the result is -// stored in-place into x. -// -// No test for singularity or near-singularity is included in this -// routine. Such tests must be performed before calling this routine. -func Tpsv(t blas.Transpose, a TriangularPacked, x Vector) { - cblas128.Ztpsv(a.Uplo, t, a.Diag, a.N, a.Data, x.Data, x.Inc) -} - -// Hemv computes -// y = alpha * A * x + beta * y, -// where A is an n×n Hermitian matrix, x and y are vectors, and alpha and -// beta are scalars. -func Hemv(alpha complex128, a Hermitian, x Vector, beta complex128, y Vector) { - cblas128.Zhemv(a.Uplo, a.N, alpha, a.Data, a.Stride, x.Data, x.Inc, beta, y.Data, y.Inc) -} - -// Hbmv performs -// y = alpha * A * x + beta * y, -// where A is an n×n Hermitian band matrix, x and y are vectors, and alpha -// and beta are scalars. -func Hbmv(alpha complex128, a HermitianBand, x Vector, beta complex128, y Vector) { - cblas128.Zhbmv(a.Uplo, a.N, a.K, alpha, a.Data, a.Stride, x.Data, x.Inc, beta, y.Data, y.Inc) -} - -// Hpmv performs -// y = alpha * A * x + beta * y, -// where A is an n×n Hermitian matrix in packed format, x and y are vectors, -// and alpha and beta are scalars. -func Hpmv(alpha complex128, a HermitianPacked, x Vector, beta complex128, y Vector) { - cblas128.Zhpmv(a.Uplo, a.N, alpha, a.Data, x.Data, x.Inc, beta, y.Data, y.Inc) -} - -// Geru performs a rank-1 update -// A += alpha * x * y^T, -// where A is an m×n dense matrix, x and y are vectors, and alpha is a scalar. -func Geru(alpha complex128, x, y Vector, a General) { - cblas128.Zgeru(a.Rows, a.Cols, alpha, x.Data, x.Inc, y.Data, y.Inc, a.Data, a.Stride) -} - -// Gerc performs a rank-1 update -// A += alpha * x * y^H, -// where A is an m×n dense matrix, x and y are vectors, and alpha is a scalar. -func Gerc(alpha complex128, x, y Vector, a General) { - cblas128.Zgerc(a.Rows, a.Cols, alpha, x.Data, x.Inc, y.Data, y.Inc, a.Data, a.Stride) -} - -// Her performs a rank-1 update -// A += alpha * x * y^T, -// where A is an m×n Hermitian matrix, x and y are vectors, and alpha is a scalar. -func Her(alpha float64, x Vector, a Hermitian) { - cblas128.Zher(a.Uplo, a.N, alpha, x.Data, x.Inc, a.Data, a.Stride) -} - -// Hpr performs a rank-1 update -// A += alpha * x * x^H, -// where A is an n×n Hermitian matrix in packed format, x is a vector, and -// alpha is a scalar. -func Hpr(alpha float64, x Vector, a HermitianPacked) { - cblas128.Zhpr(a.Uplo, a.N, alpha, x.Data, x.Inc, a.Data) -} - -// Her2 performs a rank-2 update -// A += alpha * x * y^H + conj(alpha) * y * x^H, -// where A is an n×n Hermitian matrix, x and y are vectors, and alpha is a scalar. -func Her2(alpha complex128, x, y Vector, a Hermitian) { - cblas128.Zher2(a.Uplo, a.N, alpha, x.Data, x.Inc, y.Data, y.Inc, a.Data, a.Stride) -} - -// Hpr2 performs a rank-2 update -// A += alpha * x * y^H + conj(alpha) * y * x^H, -// where A is an n×n Hermitian matrix in packed format, x and y are vectors, -// and alpha is a scalar. -func Hpr2(alpha complex128, x, y Vector, a HermitianPacked) { - cblas128.Zhpr2(a.Uplo, a.N, alpha, x.Data, x.Inc, y.Data, y.Inc, a.Data) -} - -// Level 3 - -// Gemm computes -// C = alpha * A * B + beta * C, -// where A, B, and C are dense matrices, and alpha and beta are scalars. -// tA and tB specify whether A or B are transposed or conjugated. -func Gemm(tA, tB blas.Transpose, alpha complex128, a, b General, beta complex128, c General) { - var m, n, k int - if tA == blas.NoTrans { - m, k = a.Rows, a.Cols - } else { - m, k = a.Cols, a.Rows - } - if tB == blas.NoTrans { - n = b.Cols - } else { - n = b.Rows - } - cblas128.Zgemm(tA, tB, m, n, k, alpha, a.Data, a.Stride, b.Data, b.Stride, beta, c.Data, c.Stride) -} - -// Symm performs -// C = alpha * A * B + beta * C, if s == blas.Left, -// C = alpha * B * A + beta * C, if s == blas.Right, -// where A is an n×n or m×m symmetric matrix, B and C are m×n matrices, and -// alpha and beta are scalars. -func Symm(s blas.Side, alpha complex128, a Symmetric, b General, beta complex128, c General) { - var m, n int - if s == blas.Left { - m, n = a.N, b.Cols - } else { - m, n = b.Rows, a.N - } - cblas128.Zsymm(s, a.Uplo, m, n, alpha, a.Data, a.Stride, b.Data, b.Stride, beta, c.Data, c.Stride) -} - -// Syrk performs a symmetric rank-k update -// C = alpha * A * A^T + beta * C, if t == blas.NoTrans, -// C = alpha * A^T * A + beta * C, if t == blas.Trans, -// where C is an n×n symmetric matrix, A is an n×k matrix if t == blas.NoTrans -// and a k×n matrix otherwise, and alpha and beta are scalars. -func Syrk(t blas.Transpose, alpha complex128, a General, beta complex128, c Symmetric) { - var n, k int - if t == blas.NoTrans { - n, k = a.Rows, a.Cols - } else { - n, k = a.Cols, a.Rows - } - cblas128.Zsyrk(c.Uplo, t, n, k, alpha, a.Data, a.Stride, beta, c.Data, c.Stride) -} - -// Syr2k performs a symmetric rank-2k update -// C = alpha * A * B^T + alpha * B * A^T + beta * C, if t == blas.NoTrans, -// C = alpha * A^T * B + alpha * B^T * A + beta * C, if t == blas.Trans, -// where C is an n×n symmetric matrix, A and B are n×k matrices if -// t == blas.NoTrans and k×n otherwise, and alpha and beta are scalars. -func Syr2k(t blas.Transpose, alpha complex128, a, b General, beta complex128, c Symmetric) { - var n, k int - if t == blas.NoTrans { - n, k = a.Rows, a.Cols - } else { - n, k = a.Cols, a.Rows - } - cblas128.Zsyr2k(c.Uplo, t, n, k, alpha, a.Data, a.Stride, b.Data, b.Stride, beta, c.Data, c.Stride) -} - -// Trmm performs -// B = alpha * A * B, if tA == blas.NoTrans and s == blas.Left, -// B = alpha * A^T * B, if tA == blas.Trans and s == blas.Left, -// B = alpha * A^H * B, if tA == blas.ConjTrans and s == blas.Left, -// B = alpha * B * A, if tA == blas.NoTrans and s == blas.Right, -// B = alpha * B * A^T, if tA == blas.Trans and s == blas.Right, -// B = alpha * B * A^H, if tA == blas.ConjTrans and s == blas.Right, -// where A is an n×n or m×m triangular matrix, B is an m×n matrix, and alpha is -// a scalar. -func Trmm(s blas.Side, tA blas.Transpose, alpha complex128, a Triangular, b General) { - cblas128.Ztrmm(s, a.Uplo, tA, a.Diag, b.Rows, b.Cols, alpha, a.Data, a.Stride, b.Data, b.Stride) -} - -// Trsm solves -// A * X = alpha * B, if tA == blas.NoTrans and s == blas.Left, -// A^T * X = alpha * B, if tA == blas.Trans and s == blas.Left, -// A^H * X = alpha * B, if tA == blas.ConjTrans and s == blas.Left, -// X * A = alpha * B, if tA == blas.NoTrans and s == blas.Right, -// X * A^T = alpha * B, if tA == blas.Trans and s == blas.Right, -// X * A^H = alpha * B, if tA == blas.ConjTrans and s == blas.Right, -// where A is an n×n or m×m triangular matrix, X and B are m×n matrices, and -// alpha is a scalar. -// -// At entry to the function, b contains the values of B, and the result is -// stored in-place into b. -// -// No check is made that A is invertible. -func Trsm(s blas.Side, tA blas.Transpose, alpha complex128, a Triangular, b General) { - cblas128.Ztrsm(s, a.Uplo, tA, a.Diag, b.Rows, b.Cols, alpha, a.Data, a.Stride, b.Data, b.Stride) -} - -// Hemm performs -// C = alpha * A * B + beta * C, if s == blas.Left, -// C = alpha * B * A + beta * C, if s == blas.Right, -// where A is an n×n or m×m Hermitian matrix, B and C are m×n matrices, and -// alpha and beta are scalars. -func Hemm(s blas.Side, alpha complex128, a Hermitian, b General, beta complex128, c General) { - var m, n int - if s == blas.Left { - m, n = a.N, b.Cols - } else { - m, n = b.Rows, a.N - } - cblas128.Zhemm(s, a.Uplo, m, n, alpha, a.Data, a.Stride, b.Data, b.Stride, beta, c.Data, c.Stride) -} - -// Herk performs the Hermitian rank-k update -// C = alpha * A * A^H + beta*C, if t == blas.NoTrans, -// C = alpha * A^H * A + beta*C, if t == blas.ConjTrans, -// where C is an n×n Hermitian matrix, A is an n×k matrix if t == blas.NoTrans -// and a k×n matrix otherwise, and alpha and beta are scalars. -func Herk(t blas.Transpose, alpha float64, a General, beta float64, c Hermitian) { - var n, k int - if t == blas.NoTrans { - n, k = a.Rows, a.Cols - } else { - n, k = a.Cols, a.Rows - } - cblas128.Zherk(c.Uplo, t, n, k, alpha, a.Data, a.Stride, beta, c.Data, c.Stride) -} - -// Her2k performs the Hermitian rank-2k update -// C = alpha * A * B^H + conj(alpha) * B * A^H + beta * C, if t == blas.NoTrans, -// C = alpha * A^H * B + conj(alpha) * B^H * A + beta * C, if t == blas.ConjTrans, -// where C is an n×n Hermitian matrix, A and B are n×k matrices if t == NoTrans -// and k×n matrices otherwise, and alpha and beta are scalars. -func Her2k(t blas.Transpose, alpha complex128, a, b General, beta float64, c Hermitian) { - var n, k int - if t == blas.NoTrans { - n, k = a.Rows, a.Cols - } else { - n, k = a.Cols, a.Rows - } - cblas128.Zher2k(c.Uplo, t, n, k, alpha, a.Data, a.Stride, b.Data, b.Stride, beta, c.Data, c.Stride) -} diff --git a/vendor/gonum.org/v1/gonum/blas/cblas128/conv.go b/vendor/gonum.org/v1/gonum/blas/cblas128/conv.go deleted file mode 100644 index 93e3cd2f92..0000000000 --- a/vendor/gonum.org/v1/gonum/blas/cblas128/conv.go +++ /dev/null @@ -1,279 +0,0 @@ -// Code generated by "go generate gonum.org/v1/gonum/blas”; DO NOT EDIT. - -// Copyright ©2015 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package cblas128 - -import "gonum.org/v1/gonum/blas" - -// GeneralCols represents a matrix using the conventional column-major storage scheme. -type GeneralCols General - -// From fills the receiver with elements from a. The receiver -// must have the same dimensions as a and have adequate backing -// data storage. -func (t GeneralCols) From(a General) { - if t.Rows != a.Rows || t.Cols != a.Cols { - panic("cblas128: mismatched dimension") - } - if len(t.Data) < (t.Cols-1)*t.Stride+t.Rows { - panic("cblas128: short data slice") - } - for i := 0; i < a.Rows; i++ { - for j, v := range a.Data[i*a.Stride : i*a.Stride+a.Cols] { - t.Data[i+j*t.Stride] = v - } - } -} - -// From fills the receiver with elements from a. The receiver -// must have the same dimensions as a and have adequate backing -// data storage. -func (t General) From(a GeneralCols) { - if t.Rows != a.Rows || t.Cols != a.Cols { - panic("cblas128: mismatched dimension") - } - if len(t.Data) < (t.Rows-1)*t.Stride+t.Cols { - panic("cblas128: short data slice") - } - for j := 0; j < a.Cols; j++ { - for i, v := range a.Data[j*a.Stride : j*a.Stride+a.Rows] { - t.Data[i*t.Stride+j] = v - } - } -} - -// TriangularCols represents a matrix using the conventional column-major storage scheme. -type TriangularCols Triangular - -// From fills the receiver with elements from a. The receiver -// must have the same dimensions, uplo and diag as a and have -// adequate backing data storage. -func (t TriangularCols) From(a Triangular) { - if t.N != a.N { - panic("cblas128: mismatched dimension") - } - if t.Uplo != a.Uplo { - panic("cblas128: mismatched BLAS uplo") - } - if t.Diag != a.Diag { - panic("cblas128: mismatched BLAS diag") - } - switch a.Uplo { - default: - panic("cblas128: bad BLAS uplo") - case blas.Upper: - for i := 0; i < a.N; i++ { - for j := i; j < a.N; j++ { - t.Data[i+j*t.Stride] = a.Data[i*a.Stride+j] - } - } - case blas.Lower: - for i := 0; i < a.N; i++ { - for j := 0; j <= i; j++ { - t.Data[i+j*t.Stride] = a.Data[i*a.Stride+j] - } - } - case blas.All: - for i := 0; i < a.N; i++ { - for j := 0; j < a.N; j++ { - t.Data[i+j*t.Stride] = a.Data[i*a.Stride+j] - } - } - } -} - -// From fills the receiver with elements from a. The receiver -// must have the same dimensions, uplo and diag as a and have -// adequate backing data storage. -func (t Triangular) From(a TriangularCols) { - if t.N != a.N { - panic("cblas128: mismatched dimension") - } - if t.Uplo != a.Uplo { - panic("cblas128: mismatched BLAS uplo") - } - if t.Diag != a.Diag { - panic("cblas128: mismatched BLAS diag") - } - switch a.Uplo { - default: - panic("cblas128: bad BLAS uplo") - case blas.Upper: - for i := 0; i < a.N; i++ { - for j := i; j < a.N; j++ { - t.Data[i*t.Stride+j] = a.Data[i+j*a.Stride] - } - } - case blas.Lower: - for i := 0; i < a.N; i++ { - for j := 0; j <= i; j++ { - t.Data[i*t.Stride+j] = a.Data[i+j*a.Stride] - } - } - case blas.All: - for i := 0; i < a.N; i++ { - for j := 0; j < a.N; j++ { - t.Data[i*t.Stride+j] = a.Data[i+j*a.Stride] - } - } - } -} - -// BandCols represents a matrix using the band column-major storage scheme. -type BandCols Band - -// From fills the receiver with elements from a. The receiver -// must have the same dimensions and bandwidth as a and have -// adequate backing data storage. -func (t BandCols) From(a Band) { - if t.Rows != a.Rows || t.Cols != a.Cols { - panic("cblas128: mismatched dimension") - } - if t.KL != a.KL || t.KU != a.KU { - panic("cblas128: mismatched bandwidth") - } - if a.Stride < a.KL+a.KU+1 { - panic("cblas128: short stride for source") - } - if t.Stride < t.KL+t.KU+1 { - panic("cblas128: short stride for destination") - } - for i := 0; i < a.Rows; i++ { - for j := max(0, i-a.KL); j < min(i+a.KU+1, a.Cols); j++ { - t.Data[i+t.KU-j+j*t.Stride] = a.Data[j+a.KL-i+i*a.Stride] - } - } -} - -// From fills the receiver with elements from a. The receiver -// must have the same dimensions and bandwidth as a and have -// adequate backing data storage. -func (t Band) From(a BandCols) { - if t.Rows != a.Rows || t.Cols != a.Cols { - panic("cblas128: mismatched dimension") - } - if t.KL != a.KL || t.KU != a.KU { - panic("cblas128: mismatched bandwidth") - } - if a.Stride < a.KL+a.KU+1 { - panic("cblas128: short stride for source") - } - if t.Stride < t.KL+t.KU+1 { - panic("cblas128: short stride for destination") - } - for j := 0; j < a.Cols; j++ { - for i := max(0, j-a.KU); i < min(j+a.KL+1, a.Rows); i++ { - t.Data[j+a.KL-i+i*a.Stride] = a.Data[i+t.KU-j+j*t.Stride] - } - } -} - -// TriangularBandCols represents a symmetric matrix using the band column-major storage scheme. -type TriangularBandCols TriangularBand - -// From fills the receiver with elements from a. The receiver -// must have the same dimensions, bandwidth and uplo as a and -// have adequate backing data storage. -func (t TriangularBandCols) From(a TriangularBand) { - if t.N != a.N { - panic("cblas128: mismatched dimension") - } - if t.K != a.K { - panic("cblas128: mismatched bandwidth") - } - if a.Stride < a.K+1 { - panic("cblas128: short stride for source") - } - if t.Stride < t.K+1 { - panic("cblas128: short stride for destination") - } - if t.Uplo != a.Uplo { - panic("cblas128: mismatched BLAS uplo") - } - if t.Diag != a.Diag { - panic("cblas128: mismatched BLAS diag") - } - dst := BandCols{ - Rows: t.N, Cols: t.N, - Stride: t.Stride, - Data: t.Data, - } - src := Band{ - Rows: a.N, Cols: a.N, - Stride: a.Stride, - Data: a.Data, - } - switch a.Uplo { - default: - panic("cblas128: bad BLAS uplo") - case blas.Upper: - dst.KU = t.K - src.KU = a.K - case blas.Lower: - dst.KL = t.K - src.KL = a.K - } - dst.From(src) -} - -// From fills the receiver with elements from a. The receiver -// must have the same dimensions, bandwidth and uplo as a and -// have adequate backing data storage. -func (t TriangularBand) From(a TriangularBandCols) { - if t.N != a.N { - panic("cblas128: mismatched dimension") - } - if t.K != a.K { - panic("cblas128: mismatched bandwidth") - } - if a.Stride < a.K+1 { - panic("cblas128: short stride for source") - } - if t.Stride < t.K+1 { - panic("cblas128: short stride for destination") - } - if t.Uplo != a.Uplo { - panic("cblas128: mismatched BLAS uplo") - } - if t.Diag != a.Diag { - panic("cblas128: mismatched BLAS diag") - } - dst := Band{ - Rows: t.N, Cols: t.N, - Stride: t.Stride, - Data: t.Data, - } - src := BandCols{ - Rows: a.N, Cols: a.N, - Stride: a.Stride, - Data: a.Data, - } - switch a.Uplo { - default: - panic("cblas128: bad BLAS uplo") - case blas.Upper: - dst.KU = t.K - src.KU = a.K - case blas.Lower: - dst.KL = t.K - src.KL = a.K - } - dst.From(src) -} - -func min(a, b int) int { - if a < b { - return a - } - return b -} - -func max(a, b int) int { - if a > b { - return a - } - return b -} diff --git a/vendor/gonum.org/v1/gonum/blas/cblas128/conv_hermitian.go b/vendor/gonum.org/v1/gonum/blas/cblas128/conv_hermitian.go deleted file mode 100644 index 51c3a5777b..0000000000 --- a/vendor/gonum.org/v1/gonum/blas/cblas128/conv_hermitian.go +++ /dev/null @@ -1,155 +0,0 @@ -// Code generated by "go generate gonum.org/v1/gonum/blas”; DO NOT EDIT. - -// Copyright ©2015 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package cblas128 - -import "gonum.org/v1/gonum/blas" - -// HermitianCols represents a matrix using the conventional column-major storage scheme. -type HermitianCols Hermitian - -// From fills the receiver with elements from a. The receiver -// must have the same dimensions and uplo as a and have adequate -// backing data storage. -func (t HermitianCols) From(a Hermitian) { - if t.N != a.N { - panic("cblas128: mismatched dimension") - } - if t.Uplo != a.Uplo { - panic("cblas128: mismatched BLAS uplo") - } - switch a.Uplo { - default: - panic("cblas128: bad BLAS uplo") - case blas.Upper: - for i := 0; i < a.N; i++ { - for j := i; j < a.N; j++ { - t.Data[i+j*t.Stride] = a.Data[i*a.Stride+j] - } - } - case blas.Lower: - for i := 0; i < a.N; i++ { - for j := 0; j <= i; j++ { - t.Data[i+j*t.Stride] = a.Data[i*a.Stride+j] - } - } - } -} - -// From fills the receiver with elements from a. The receiver -// must have the same dimensions and uplo as a and have adequate -// backing data storage. -func (t Hermitian) From(a HermitianCols) { - if t.N != a.N { - panic("cblas128: mismatched dimension") - } - if t.Uplo != a.Uplo { - panic("cblas128: mismatched BLAS uplo") - } - switch a.Uplo { - default: - panic("cblas128: bad BLAS uplo") - case blas.Upper: - for i := 0; i < a.N; i++ { - for j := i; j < a.N; j++ { - t.Data[i*t.Stride+j] = a.Data[i+j*a.Stride] - } - } - case blas.Lower: - for i := 0; i < a.N; i++ { - for j := 0; j <= i; j++ { - t.Data[i*t.Stride+j] = a.Data[i+j*a.Stride] - } - } - } -} - -// HermitianBandCols represents an Hermitian matrix using the band column-major storage scheme. -type HermitianBandCols HermitianBand - -// From fills the receiver with elements from a. The receiver -// must have the same dimensions, bandwidth and uplo as a and -// have adequate backing data storage. -func (t HermitianBandCols) From(a HermitianBand) { - if t.N != a.N { - panic("cblas128: mismatched dimension") - } - if t.K != a.K { - panic("cblas128: mismatched bandwidth") - } - if a.Stride < a.K+1 { - panic("cblas128: short stride for source") - } - if t.Stride < t.K+1 { - panic("cblas128: short stride for destination") - } - if t.Uplo != a.Uplo { - panic("cblas128: mismatched BLAS uplo") - } - dst := BandCols{ - Rows: t.N, Cols: t.N, - Stride: t.Stride, - Data: t.Data, - } - src := Band{ - Rows: a.N, Cols: a.N, - Stride: a.Stride, - Data: a.Data, - } - switch a.Uplo { - default: - panic("cblas128: bad BLAS uplo") - case blas.Upper: - dst.KU = t.K - src.KU = a.K - case blas.Lower: - dst.KL = t.K - src.KL = a.K - } - dst.From(src) -} - -// From fills the receiver with elements from a. The receiver -// must have the same dimensions, bandwidth and uplo as a and -// have adequate backing data storage. -func (t HermitianBand) From(a HermitianBandCols) { - if t.N != a.N { - panic("cblas128: mismatched dimension") - } - if t.K != a.K { - panic("cblas128: mismatched bandwidth") - } - if a.Stride < a.K+1 { - panic("cblas128: short stride for source") - } - if t.Stride < t.K+1 { - panic("cblas128: short stride for destination") - } - if t.Uplo != a.Uplo { - panic("cblas128: mismatched BLAS uplo") - } - dst := Band{ - Rows: t.N, Cols: t.N, - Stride: t.Stride, - Data: t.Data, - } - src := BandCols{ - Rows: a.N, Cols: a.N, - Stride: a.Stride, - Data: a.Data, - } - switch a.Uplo { - default: - panic("cblas128: bad BLAS uplo") - case blas.Upper: - dst.KU = t.K - src.KU = a.K - case blas.Lower: - dst.KL = t.K - src.KL = a.K - } - dst.From(src) -} diff --git a/vendor/gonum.org/v1/gonum/blas/cblas128/conv_symmetric.go b/vendor/gonum.org/v1/gonum/blas/cblas128/conv_symmetric.go deleted file mode 100644 index f1bf40c208..0000000000 --- a/vendor/gonum.org/v1/gonum/blas/cblas128/conv_symmetric.go +++ /dev/null @@ -1,155 +0,0 @@ -// Code generated by "go generate gonum.org/v1/gonum/blas”; DO NOT EDIT. - -// Copyright ©2015 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package cblas128 - -import "gonum.org/v1/gonum/blas" - -// SymmetricCols represents a matrix using the conventional column-major storage scheme. -type SymmetricCols Symmetric - -// From fills the receiver with elements from a. The receiver -// must have the same dimensions and uplo as a and have adequate -// backing data storage. -func (t SymmetricCols) From(a Symmetric) { - if t.N != a.N { - panic("cblas128: mismatched dimension") - } - if t.Uplo != a.Uplo { - panic("cblas128: mismatched BLAS uplo") - } - switch a.Uplo { - default: - panic("cblas128: bad BLAS uplo") - case blas.Upper: - for i := 0; i < a.N; i++ { - for j := i; j < a.N; j++ { - t.Data[i+j*t.Stride] = a.Data[i*a.Stride+j] - } - } - case blas.Lower: - for i := 0; i < a.N; i++ { - for j := 0; j <= i; j++ { - t.Data[i+j*t.Stride] = a.Data[i*a.Stride+j] - } - } - } -} - -// From fills the receiver with elements from a. The receiver -// must have the same dimensions and uplo as a and have adequate -// backing data storage. -func (t Symmetric) From(a SymmetricCols) { - if t.N != a.N { - panic("cblas128: mismatched dimension") - } - if t.Uplo != a.Uplo { - panic("cblas128: mismatched BLAS uplo") - } - switch a.Uplo { - default: - panic("cblas128: bad BLAS uplo") - case blas.Upper: - for i := 0; i < a.N; i++ { - for j := i; j < a.N; j++ { - t.Data[i*t.Stride+j] = a.Data[i+j*a.Stride] - } - } - case blas.Lower: - for i := 0; i < a.N; i++ { - for j := 0; j <= i; j++ { - t.Data[i*t.Stride+j] = a.Data[i+j*a.Stride] - } - } - } -} - -// SymmetricBandCols represents a symmetric matrix using the band column-major storage scheme. -type SymmetricBandCols SymmetricBand - -// From fills the receiver with elements from a. The receiver -// must have the same dimensions, bandwidth and uplo as a and -// have adequate backing data storage. -func (t SymmetricBandCols) From(a SymmetricBand) { - if t.N != a.N { - panic("cblas128: mismatched dimension") - } - if t.K != a.K { - panic("cblas128: mismatched bandwidth") - } - if a.Stride < a.K+1 { - panic("cblas128: short stride for source") - } - if t.Stride < t.K+1 { - panic("cblas128: short stride for destination") - } - if t.Uplo != a.Uplo { - panic("cblas128: mismatched BLAS uplo") - } - dst := BandCols{ - Rows: t.N, Cols: t.N, - Stride: t.Stride, - Data: t.Data, - } - src := Band{ - Rows: a.N, Cols: a.N, - Stride: a.Stride, - Data: a.Data, - } - switch a.Uplo { - default: - panic("cblas128: bad BLAS uplo") - case blas.Upper: - dst.KU = t.K - src.KU = a.K - case blas.Lower: - dst.KL = t.K - src.KL = a.K - } - dst.From(src) -} - -// From fills the receiver with elements from a. The receiver -// must have the same dimensions, bandwidth and uplo as a and -// have adequate backing data storage. -func (t SymmetricBand) From(a SymmetricBandCols) { - if t.N != a.N { - panic("cblas128: mismatched dimension") - } - if t.K != a.K { - panic("cblas128: mismatched bandwidth") - } - if a.Stride < a.K+1 { - panic("cblas128: short stride for source") - } - if t.Stride < t.K+1 { - panic("cblas128: short stride for destination") - } - if t.Uplo != a.Uplo { - panic("cblas128: mismatched BLAS uplo") - } - dst := Band{ - Rows: t.N, Cols: t.N, - Stride: t.Stride, - Data: t.Data, - } - src := BandCols{ - Rows: a.N, Cols: a.N, - Stride: a.Stride, - Data: a.Data, - } - switch a.Uplo { - default: - panic("cblas128: bad BLAS uplo") - case blas.Upper: - dst.KU = t.K - src.KU = a.K - case blas.Lower: - dst.KL = t.K - src.KL = a.K - } - dst.From(src) -} diff --git a/vendor/gonum.org/v1/gonum/blas/cblas128/doc.go b/vendor/gonum.org/v1/gonum/blas/cblas128/doc.go deleted file mode 100644 index 09719b19e6..0000000000 --- a/vendor/gonum.org/v1/gonum/blas/cblas128/doc.go +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright ©2017 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package cblas128 provides a simple interface to the complex128 BLAS API. -package cblas128 // import "gonum.org/v1/gonum/blas/cblas128" diff --git a/vendor/gonum.org/v1/gonum/blas/conversions.bash b/vendor/gonum.org/v1/gonum/blas/conversions.bash deleted file mode 100644 index d1c0ef0d99..0000000000 --- a/vendor/gonum.org/v1/gonum/blas/conversions.bash +++ /dev/null @@ -1,159 +0,0 @@ -#!/usr/bin/env bash - -# Copyright ©2017 The Gonum Authors. All rights reserved. -# Use of this source code is governed by a BSD-style -# license that can be found in the LICENSE file. - -# Generate code for blas32. -echo Generating blas32/conv.go -echo -e '// Code generated by "go generate gonum.org/v1/gonum/blas”; DO NOT EDIT.\n' > blas32/conv.go -cat blas64/conv.go \ -| gofmt -r 'float64 -> float32' \ -\ -| sed -e 's/blas64/blas32/' \ -\ ->> blas32/conv.go - -echo Generating blas32/conv_test.go -echo -e '// Code generated by "go generate gonum.org/v1/gonum/blas”; DO NOT EDIT.\n' > blas32/conv_test.go -cat blas64/conv_test.go \ -| gofmt -r 'float64 -> float32' \ -\ -| sed -e 's/blas64/blas32/' \ - -e 's_"math"_math "gonum.org/v1/gonum/internal/math32"_' \ -\ ->> blas32/conv_test.go - -echo Generating blas32/conv_symmetric.go -echo -e '// Code generated by "go generate gonum.org/v1/gonum/blas”; DO NOT EDIT.\n' > blas32/conv_symmetric.go -cat blas64/conv_symmetric.go \ -| gofmt -r 'float64 -> float32' \ -\ -| sed -e 's/blas64/blas32/' \ -\ ->> blas32/conv_symmetric.go - -echo Generating blas32/conv_symmetric_test.go -echo -e '// Code generated by "go generate gonum.org/v1/gonum/blas”; DO NOT EDIT.\n' > blas32/conv_symmetric_test.go -cat blas64/conv_symmetric_test.go \ -| gofmt -r 'float64 -> float32' \ -\ -| sed -e 's/blas64/blas32/' \ - -e 's_"math"_math "gonum.org/v1/gonum/internal/math32"_' \ -\ ->> blas32/conv_symmetric_test.go - - -# Generate code for cblas128. -echo Generating cblas128/conv.go -echo -e '// Code generated by "go generate gonum.org/v1/gonum/blas”; DO NOT EDIT.\n' > cblas128/conv.go -cat blas64/conv.go \ -| gofmt -r 'float64 -> complex128' \ -\ -| sed -e 's/blas64/cblas128/' \ -\ ->> cblas128/conv.go - -echo Generating cblas128/conv_test.go -echo -e '// Code generated by "go generate gonum.org/v1/gonum/blas”; DO NOT EDIT.\n' > cblas128/conv_test.go -cat blas64/conv_test.go \ -| gofmt -r 'float64 -> complex128' \ -\ -| sed -e 's/blas64/cblas128/' \ - -e 's_"math"_math "math/cmplx"_' \ -\ ->> cblas128/conv_test.go - -echo Generating cblas128/conv_symmetric.go -echo -e '// Code generated by "go generate gonum.org/v1/gonum/blas”; DO NOT EDIT.\n' > cblas128/conv_symmetric.go -cat blas64/conv_symmetric.go \ -| gofmt -r 'float64 -> complex128' \ -\ -| sed -e 's/blas64/cblas128/' \ -\ ->> cblas128/conv_symmetric.go - -echo Generating cblas128/conv_symmetric_test.go -echo -e '// Code generated by "go generate gonum.org/v1/gonum/blas”; DO NOT EDIT.\n' > cblas128/conv_symmetric_test.go -cat blas64/conv_symmetric_test.go \ -| gofmt -r 'float64 -> complex128' \ -\ -| sed -e 's/blas64/cblas128/' \ - -e 's_"math"_math "math/cmplx"_' \ -\ ->> cblas128/conv_symmetric_test.go - -echo Generating cblas128/conv_hermitian.go -echo -e '// Code generated by "go generate gonum.org/v1/gonum/blas”; DO NOT EDIT.\n' > cblas128/conv_hermitian.go -cat blas64/conv_symmetric.go \ -| gofmt -r 'float64 -> complex128' \ -\ -| sed -e 's/blas64/cblas128/' \ - -e 's/Symmetric/Hermitian/g' \ - -e 's/a symmetric/an Hermitian/g' \ - -e 's/symmetric/hermitian/g' \ - -e 's/Sym/Herm/g' \ -\ ->> cblas128/conv_hermitian.go - -echo Generating cblas128/conv_hermitian_test.go -echo -e '// Code generated by "go generate gonum.org/v1/gonum/blas”; DO NOT EDIT.\n' > cblas128/conv_hermitian_test.go -cat blas64/conv_symmetric_test.go \ -| gofmt -r 'float64 -> complex128' \ -\ -| sed -e 's/blas64/cblas128/' \ - -e 's/Symmetric/Hermitian/g' \ - -e 's/a symmetric/an Hermitian/g' \ - -e 's/symmetric/hermitian/g' \ - -e 's/Sym/Herm/g' \ - -e 's_"math"_math "math/cmplx"_' \ -\ ->> cblas128/conv_hermitian_test.go - - -# Generate code for cblas64. -echo Generating cblas64/conv.go -echo -e '// Code generated by "go generate gonum.org/v1/gonum/blas”; DO NOT EDIT.\n' > cblas64/conv.go -cat blas64/conv.go \ -| gofmt -r 'float64 -> complex64' \ -\ -| sed -e 's/blas64/cblas64/' \ -\ ->> cblas64/conv.go - -echo Generating cblas64/conv_test.go -echo -e '// Code generated by "go generate gonum.org/v1/gonum/blas”; DO NOT EDIT.\n' > cblas64/conv_test.go -cat blas64/conv_test.go \ -| gofmt -r 'float64 -> complex64' \ -\ -| sed -e 's/blas64/cblas64/' \ - -e 's_"math"_math "gonum.org/v1/gonum/internal/cmplx64"_' \ -\ ->> cblas64/conv_test.go - -echo Generating cblas64/conv_hermitian.go -echo -e '// Code generated by "go generate gonum.org/v1/gonum/blas”; DO NOT EDIT.\n' > cblas64/conv_hermitian.go -cat blas64/conv_symmetric.go \ -| gofmt -r 'float64 -> complex64' \ -\ -| sed -e 's/blas64/cblas64/' \ - -e 's/Symmetric/Hermitian/g' \ - -e 's/a symmetric/an Hermitian/g' \ - -e 's/symmetric/hermitian/g' \ - -e 's/Sym/Herm/g' \ -\ ->> cblas64/conv_hermitian.go - -echo Generating cblas64/conv_hermitian_test.go -echo -e '// Code generated by "go generate gonum.org/v1/gonum/blas”; DO NOT EDIT.\n' > cblas64/conv_hermitian_test.go -cat blas64/conv_symmetric_test.go \ -| gofmt -r 'float64 -> complex64' \ -\ -| sed -e 's/blas64/cblas64/' \ - -e 's/Symmetric/Hermitian/g' \ - -e 's/a symmetric/an Hermitian/g' \ - -e 's/symmetric/hermitian/g' \ - -e 's/Sym/Herm/g' \ - -e 's_"math"_math "gonum.org/v1/gonum/internal/cmplx64"_' \ -\ ->> cblas64/conv_hermitian_test.go diff --git a/vendor/gonum.org/v1/gonum/blas/doc.go b/vendor/gonum.org/v1/gonum/blas/doc.go deleted file mode 100644 index ea4b16c904..0000000000 --- a/vendor/gonum.org/v1/gonum/blas/doc.go +++ /dev/null @@ -1,108 +0,0 @@ -// Copyright ©2017 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -/* -Package blas provides interfaces for the BLAS linear algebra standard. - -All methods must perform appropriate parameter checking and panic if -provided parameters that do not conform to the requirements specified -by the BLAS standard. - -Quick Reference Guide to the BLAS from http://www.netlib.org/lapack/lug/node145.html - -This version is modified to remove the "order" option. All matrix operations are -on row-order matrices. - -Level 1 BLAS - - dim scalar vector vector scalars 5-element prefixes - struct - - _rotg ( a, b ) S, D - _rotmg( d1, d2, a, b ) S, D - _rot ( n, x, incX, y, incY, c, s ) S, D - _rotm ( n, x, incX, y, incY, param ) S, D - _swap ( n, x, incX, y, incY ) S, D, C, Z - _scal ( n, alpha, x, incX ) S, D, C, Z, Cs, Zd - _copy ( n, x, incX, y, incY ) S, D, C, Z - _axpy ( n, alpha, x, incX, y, incY ) S, D, C, Z - _dot ( n, x, incX, y, incY ) S, D, Ds - _dotu ( n, x, incX, y, incY ) C, Z - _dotc ( n, x, incX, y, incY ) C, Z - __dot ( n, alpha, x, incX, y, incY ) Sds - _nrm2 ( n, x, incX ) S, D, Sc, Dz - _asum ( n, x, incX ) S, D, Sc, Dz - I_amax( n, x, incX ) s, d, c, z - -Level 2 BLAS - - options dim b-width scalar matrix vector scalar vector prefixes - - _gemv ( trans, m, n, alpha, a, lda, x, incX, beta, y, incY ) S, D, C, Z - _gbmv ( trans, m, n, kL, kU, alpha, a, lda, x, incX, beta, y, incY ) S, D, C, Z - _hemv ( uplo, n, alpha, a, lda, x, incX, beta, y, incY ) C, Z - _hbmv ( uplo, n, k, alpha, a, lda, x, incX, beta, y, incY ) C, Z - _hpmv ( uplo, n, alpha, ap, x, incX, beta, y, incY ) C, Z - _symv ( uplo, n, alpha, a, lda, x, incX, beta, y, incY ) S, D - _sbmv ( uplo, n, k, alpha, a, lda, x, incX, beta, y, incY ) S, D - _spmv ( uplo, n, alpha, ap, x, incX, beta, y, incY ) S, D - _trmv ( uplo, trans, diag, n, a, lda, x, incX ) S, D, C, Z - _tbmv ( uplo, trans, diag, n, k, a, lda, x, incX ) S, D, C, Z - _tpmv ( uplo, trans, diag, n, ap, x, incX ) S, D, C, Z - _trsv ( uplo, trans, diag, n, a, lda, x, incX ) S, D, C, Z - _tbsv ( uplo, trans, diag, n, k, a, lda, x, incX ) S, D, C, Z - _tpsv ( uplo, trans, diag, n, ap, x, incX ) S, D, C, Z - - options dim scalar vector vector matrix prefixes - - _ger ( m, n, alpha, x, incX, y, incY, a, lda ) S, D - _geru ( m, n, alpha, x, incX, y, incY, a, lda ) C, Z - _gerc ( m, n, alpha, x, incX, y, incY, a, lda ) C, Z - _her ( uplo, n, alpha, x, incX, a, lda ) C, Z - _hpr ( uplo, n, alpha, x, incX, ap ) C, Z - _her2 ( uplo, n, alpha, x, incX, y, incY, a, lda ) C, Z - _hpr2 ( uplo, n, alpha, x, incX, y, incY, ap ) C, Z - _syr ( uplo, n, alpha, x, incX, a, lda ) S, D - _spr ( uplo, n, alpha, x, incX, ap ) S, D - _syr2 ( uplo, n, alpha, x, incX, y, incY, a, lda ) S, D - _spr2 ( uplo, n, alpha, x, incX, y, incY, ap ) S, D - -Level 3 BLAS - - options dim scalar matrix matrix scalar matrix prefixes - - _gemm ( transA, transB, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc ) S, D, C, Z - _symm ( side, uplo, m, n, alpha, a, lda, b, ldb, beta, c, ldc ) S, D, C, Z - _hemm ( side, uplo, m, n, alpha, a, lda, b, ldb, beta, c, ldc ) C, Z - _syrk ( uplo, trans, n, k, alpha, a, lda, beta, c, ldc ) S, D, C, Z - _herk ( uplo, trans, n, k, alpha, a, lda, beta, c, ldc ) C, Z - _syr2k( uplo, trans, n, k, alpha, a, lda, b, ldb, beta, c, ldc ) S, D, C, Z - _her2k( uplo, trans, n, k, alpha, a, lda, b, ldb, beta, c, ldc ) C, Z - _trmm ( side, uplo, transA, diag, m, n, alpha, a, lda, b, ldb ) S, D, C, Z - _trsm ( side, uplo, transA, diag, m, n, alpha, a, lda, b, ldb ) S, D, C, Z - -Meaning of prefixes - - S - float32 C - complex64 - D - float64 Z - complex128 - -Matrix types - - GE - GEneral GB - General Band - SY - SYmmetric SB - Symmetric Band SP - Symmetric Packed - HE - HErmitian HB - Hermitian Band HP - Hermitian Packed - TR - TRiangular TB - Triangular Band TP - Triangular Packed - -Options - - trans = NoTrans, Trans, ConjTrans - uplo = Upper, Lower - diag = Nonunit, Unit - side = Left, Right (A or op(A) on the left, or A or op(A) on the right) - -For real matrices, Trans and ConjTrans have the same meaning. -For Hermitian matrices, trans = Trans is not allowed. -For complex symmetric matrices, trans = ConjTrans is not allowed. -*/ -package blas // import "gonum.org/v1/gonum/blas" diff --git a/vendor/gonum.org/v1/gonum/blas/gonum/dgemm.go b/vendor/gonum.org/v1/gonum/blas/gonum/dgemm.go deleted file mode 100644 index ec3fcc61cb..0000000000 --- a/vendor/gonum.org/v1/gonum/blas/gonum/dgemm.go +++ /dev/null @@ -1,314 +0,0 @@ -// Copyright ©2014 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import ( - "runtime" - "sync" - - "gonum.org/v1/gonum/blas" - "gonum.org/v1/gonum/internal/asm/f64" -) - -// Dgemm performs one of the matrix-matrix operations -// C = alpha * A * B + beta * C -// C = alpha * A^T * B + beta * C -// C = alpha * A * B^T + beta * C -// C = alpha * A^T * B^T + beta * C -// where A is an m×k or k×m dense matrix, B is an n×k or k×n dense matrix, C is -// an m×n matrix, and alpha and beta are scalars. tA and tB specify whether A or -// B are transposed. -func (Implementation) Dgemm(tA, tB blas.Transpose, m, n, k int, alpha float64, a []float64, lda int, b []float64, ldb int, beta float64, c []float64, ldc int) { - switch tA { - default: - panic(badTranspose) - case blas.NoTrans, blas.Trans, blas.ConjTrans: - } - switch tB { - default: - panic(badTranspose) - case blas.NoTrans, blas.Trans, blas.ConjTrans: - } - if m < 0 { - panic(mLT0) - } - if n < 0 { - panic(nLT0) - } - if k < 0 { - panic(kLT0) - } - aTrans := tA == blas.Trans || tA == blas.ConjTrans - if aTrans { - if lda < max(1, m) { - panic(badLdA) - } - } else { - if lda < max(1, k) { - panic(badLdA) - } - } - bTrans := tB == blas.Trans || tB == blas.ConjTrans - if bTrans { - if ldb < max(1, k) { - panic(badLdB) - } - } else { - if ldb < max(1, n) { - panic(badLdB) - } - } - if ldc < max(1, n) { - panic(badLdC) - } - - // Quick return if possible. - if m == 0 || n == 0 { - return - } - - // For zero matrix size the following slice length checks are trivially satisfied. - if aTrans { - if len(a) < (k-1)*lda+m { - panic(shortA) - } - } else { - if len(a) < (m-1)*lda+k { - panic(shortA) - } - } - if bTrans { - if len(b) < (n-1)*ldb+k { - panic(shortB) - } - } else { - if len(b) < (k-1)*ldb+n { - panic(shortB) - } - } - if len(c) < (m-1)*ldc+n { - panic(shortC) - } - - // Quick return if possible. - if (alpha == 0 || k == 0) && beta == 1 { - return - } - - // scale c - if beta != 1 { - if beta == 0 { - for i := 0; i < m; i++ { - ctmp := c[i*ldc : i*ldc+n] - for j := range ctmp { - ctmp[j] = 0 - } - } - } else { - for i := 0; i < m; i++ { - ctmp := c[i*ldc : i*ldc+n] - for j := range ctmp { - ctmp[j] *= beta - } - } - } - } - - dgemmParallel(aTrans, bTrans, m, n, k, a, lda, b, ldb, c, ldc, alpha) -} - -func dgemmParallel(aTrans, bTrans bool, m, n, k int, a []float64, lda int, b []float64, ldb int, c []float64, ldc int, alpha float64) { - // dgemmParallel computes a parallel matrix multiplication by partitioning - // a and b into sub-blocks, and updating c with the multiplication of the sub-block - // In all cases, - // A = [ A_11 A_12 ... A_1j - // A_21 A_22 ... A_2j - // ... - // A_i1 A_i2 ... A_ij] - // - // and same for B. All of the submatrix sizes are blockSize×blockSize except - // at the edges. - // - // In all cases, there is one dimension for each matrix along which - // C must be updated sequentially. - // Cij = \sum_k Aik Bki, (A * B) - // Cij = \sum_k Aki Bkj, (A^T * B) - // Cij = \sum_k Aik Bjk, (A * B^T) - // Cij = \sum_k Aki Bjk, (A^T * B^T) - // - // This code computes one {i, j} block sequentially along the k dimension, - // and computes all of the {i, j} blocks concurrently. This - // partitioning allows Cij to be updated in-place without race-conditions. - // Instead of launching a goroutine for each possible concurrent computation, - // a number of worker goroutines are created and channels are used to pass - // available and completed cases. - // - // http://alexkr.com/docs/matrixmult.pdf is a good reference on matrix-matrix - // multiplies, though this code does not copy matrices to attempt to eliminate - // cache misses. - - maxKLen := k - parBlocks := blocks(m, blockSize) * blocks(n, blockSize) - if parBlocks < minParBlock { - // The matrix multiplication is small in the dimensions where it can be - // computed concurrently. Just do it in serial. - dgemmSerial(aTrans, bTrans, m, n, k, a, lda, b, ldb, c, ldc, alpha) - return - } - - nWorkers := runtime.GOMAXPROCS(0) - if parBlocks < nWorkers { - nWorkers = parBlocks - } - // There is a tradeoff between the workers having to wait for work - // and a large buffer making operations slow. - buf := buffMul * nWorkers - if buf > parBlocks { - buf = parBlocks - } - - sendChan := make(chan subMul, buf) - - // Launch workers. A worker receives an {i, j} submatrix of c, and computes - // A_ik B_ki (or the transposed version) storing the result in c_ij. When the - // channel is finally closed, it signals to the waitgroup that it has finished - // computing. - var wg sync.WaitGroup - for i := 0; i < nWorkers; i++ { - wg.Add(1) - go func() { - defer wg.Done() - for sub := range sendChan { - i := sub.i - j := sub.j - leni := blockSize - if i+leni > m { - leni = m - i - } - lenj := blockSize - if j+lenj > n { - lenj = n - j - } - - cSub := sliceView64(c, ldc, i, j, leni, lenj) - - // Compute A_ik B_kj for all k - for k := 0; k < maxKLen; k += blockSize { - lenk := blockSize - if k+lenk > maxKLen { - lenk = maxKLen - k - } - var aSub, bSub []float64 - if aTrans { - aSub = sliceView64(a, lda, k, i, lenk, leni) - } else { - aSub = sliceView64(a, lda, i, k, leni, lenk) - } - if bTrans { - bSub = sliceView64(b, ldb, j, k, lenj, lenk) - } else { - bSub = sliceView64(b, ldb, k, j, lenk, lenj) - } - dgemmSerial(aTrans, bTrans, leni, lenj, lenk, aSub, lda, bSub, ldb, cSub, ldc, alpha) - } - } - }() - } - - // Send out all of the {i, j} subblocks for computation. - for i := 0; i < m; i += blockSize { - for j := 0; j < n; j += blockSize { - sendChan <- subMul{ - i: i, - j: j, - } - } - } - close(sendChan) - wg.Wait() -} - -// dgemmSerial is serial matrix multiply -func dgemmSerial(aTrans, bTrans bool, m, n, k int, a []float64, lda int, b []float64, ldb int, c []float64, ldc int, alpha float64) { - switch { - case !aTrans && !bTrans: - dgemmSerialNotNot(m, n, k, a, lda, b, ldb, c, ldc, alpha) - return - case aTrans && !bTrans: - dgemmSerialTransNot(m, n, k, a, lda, b, ldb, c, ldc, alpha) - return - case !aTrans && bTrans: - dgemmSerialNotTrans(m, n, k, a, lda, b, ldb, c, ldc, alpha) - return - case aTrans && bTrans: - dgemmSerialTransTrans(m, n, k, a, lda, b, ldb, c, ldc, alpha) - return - default: - panic("unreachable") - } -} - -// dgemmSerial where neither a nor b are transposed -func dgemmSerialNotNot(m, n, k int, a []float64, lda int, b []float64, ldb int, c []float64, ldc int, alpha float64) { - // This style is used instead of the literal [i*stride +j]) is used because - // approximately 5 times faster as of go 1.3. - for i := 0; i < m; i++ { - ctmp := c[i*ldc : i*ldc+n] - for l, v := range a[i*lda : i*lda+k] { - tmp := alpha * v - if tmp != 0 { - f64.AxpyUnitary(tmp, b[l*ldb:l*ldb+n], ctmp) - } - } - } -} - -// dgemmSerial where neither a is transposed and b is not -func dgemmSerialTransNot(m, n, k int, a []float64, lda int, b []float64, ldb int, c []float64, ldc int, alpha float64) { - // This style is used instead of the literal [i*stride +j]) is used because - // approximately 5 times faster as of go 1.3. - for l := 0; l < k; l++ { - btmp := b[l*ldb : l*ldb+n] - for i, v := range a[l*lda : l*lda+m] { - tmp := alpha * v - if tmp != 0 { - ctmp := c[i*ldc : i*ldc+n] - f64.AxpyUnitary(tmp, btmp, ctmp) - } - } - } -} - -// dgemmSerial where neither a is not transposed and b is -func dgemmSerialNotTrans(m, n, k int, a []float64, lda int, b []float64, ldb int, c []float64, ldc int, alpha float64) { - // This style is used instead of the literal [i*stride +j]) is used because - // approximately 5 times faster as of go 1.3. - for i := 0; i < m; i++ { - atmp := a[i*lda : i*lda+k] - ctmp := c[i*ldc : i*ldc+n] - for j := 0; j < n; j++ { - ctmp[j] += alpha * f64.DotUnitary(atmp, b[j*ldb:j*ldb+k]) - } - } -} - -// dgemmSerial where both are transposed -func dgemmSerialTransTrans(m, n, k int, a []float64, lda int, b []float64, ldb int, c []float64, ldc int, alpha float64) { - // This style is used instead of the literal [i*stride +j]) is used because - // approximately 5 times faster as of go 1.3. - for l := 0; l < k; l++ { - for i, v := range a[l*lda : l*lda+m] { - tmp := alpha * v - if tmp != 0 { - ctmp := c[i*ldc : i*ldc+n] - f64.AxpyInc(tmp, b[l:], ctmp, uintptr(n), uintptr(ldb), 1, 0, 0) - } - } - } -} - -func sliceView64(a []float64, lda, i, j, r, c int) []float64 { - return a[i*lda+j : (i+r-1)*lda+j+c] -} diff --git a/vendor/gonum.org/v1/gonum/blas/gonum/doc.go b/vendor/gonum.org/v1/gonum/blas/gonum/doc.go deleted file mode 100644 index 3f4b6c1d05..0000000000 --- a/vendor/gonum.org/v1/gonum/blas/gonum/doc.go +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright ©2015 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Ensure changes made to blas/native are reflected in blas/cgo where relevant. - -/* -Package gonum is a Go implementation of the BLAS API. This implementation -panics when the input arguments are invalid as per the standard, for example -if a vector increment is zero. Note that the treatment of NaN values -is not specified, and differs among the BLAS implementations. -gonum.org/v1/gonum/blas/blas64 provides helpful wrapper functions to the BLAS -interface. The rest of this text describes the layout of the data for the input types. - -Note that in the function documentation, x[i] refers to the i^th element -of the vector, which will be different from the i^th element of the slice if -incX != 1. - -See http://www.netlib.org/lapack/explore-html/d4/de1/_l_i_c_e_n_s_e_source.html -for more license information. - -Vector arguments are effectively strided slices. They have two input arguments, -a number of elements, n, and an increment, incX. The increment specifies the -distance between elements of the vector. The actual Go slice may be longer -than necessary. -The increment may be positive or negative, except in functions with only -a single vector argument where the increment may only be positive. If the increment -is negative, s[0] is the last element in the slice. Note that this is not the same -as counting backward from the end of the slice, as len(s) may be longer than -necessary. So, for example, if n = 5 and incX = 3, the elements of s are - [0 * * 1 * * 2 * * 3 * * 4 * * * ...] -where ∗ elements are never accessed. If incX = -3, the same elements are -accessed, just in reverse order (4, 3, 2, 1, 0). - -Dense matrices are specified by a number of rows, a number of columns, and a stride. -The stride specifies the number of entries in the slice between the first element -of successive rows. The stride must be at least as large as the number of columns -but may be longer. - [a00 ... a0n a0* ... a1stride-1 a21 ... amn am* ... amstride-1] -Thus, dense[i*ld + j] refers to the {i, j}th element of the matrix. - -Symmetric and triangular matrices (non-packed) are stored identically to Dense, -except that only elements in one triangle of the matrix are accessed. - -Packed symmetric and packed triangular matrices are laid out with the entries -condensed such that all of the unreferenced elements are removed. So, the upper triangular -matrix - [ - 1 2 3 - 0 4 5 - 0 0 6 - ] -and the lower-triangular matrix - [ - 1 0 0 - 2 3 0 - 4 5 6 - ] -will both be compacted as [1 2 3 4 5 6]. The (i, j) element of the original -dense matrix can be found at element i*n - (i-1)*i/2 + j for upper triangular, -and at element i * (i+1) /2 + j for lower triangular. - -Banded matrices are laid out in a compact format, constructed by removing the -zeros in the rows and aligning the diagonals. For example, the matrix - [ - 1 2 3 0 0 0 - 4 5 6 7 0 0 - 0 8 9 10 11 0 - 0 0 12 13 14 15 - 0 0 0 16 17 18 - 0 0 0 0 19 20 - ] - -implicitly becomes (∗ entries are never accessed) - [ - * 1 2 3 - 4 5 6 7 - 8 9 10 11 - 12 13 14 15 - 16 17 18 * - 19 20 * * - ] -which is given to the BLAS routine as [∗ 1 2 3 4 ...]. - -See http://www.crest.iu.edu/research/mtl/reference/html/banded.html -for more information -*/ -package gonum // import "gonum.org/v1/gonum/blas/gonum" diff --git a/vendor/gonum.org/v1/gonum/blas/gonum/errors.go b/vendor/gonum.org/v1/gonum/blas/gonum/errors.go deleted file mode 100644 index e98575d0fa..0000000000 --- a/vendor/gonum.org/v1/gonum/blas/gonum/errors.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright ©2015 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -// Panic strings used during parameter checks. -// This list is duplicated in netlib/blas/netlib. Keep in sync. -const ( - zeroIncX = "blas: zero x index increment" - zeroIncY = "blas: zero y index increment" - - mLT0 = "blas: m < 0" - nLT0 = "blas: n < 0" - kLT0 = "blas: k < 0" - kLLT0 = "blas: kL < 0" - kULT0 = "blas: kU < 0" - - badUplo = "blas: illegal triangle" - badTranspose = "blas: illegal transpose" - badDiag = "blas: illegal diagonal" - badSide = "blas: illegal side" - badFlag = "blas: illegal rotm flag" - - badLdA = "blas: bad leading dimension of A" - badLdB = "blas: bad leading dimension of B" - badLdC = "blas: bad leading dimension of C" - - shortX = "blas: insufficient length of x" - shortY = "blas: insufficient length of y" - shortAP = "blas: insufficient length of ap" - shortA = "blas: insufficient length of a" - shortB = "blas: insufficient length of b" - shortC = "blas: insufficient length of c" -) diff --git a/vendor/gonum.org/v1/gonum/blas/gonum/gemv.go b/vendor/gonum.org/v1/gonum/blas/gonum/gemv.go deleted file mode 100644 index 9b9a1beb09..0000000000 --- a/vendor/gonum.org/v1/gonum/blas/gonum/gemv.go +++ /dev/null @@ -1,190 +0,0 @@ -// Copyright ©2018 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import ( - "gonum.org/v1/gonum/blas" - "gonum.org/v1/gonum/internal/asm/f32" - "gonum.org/v1/gonum/internal/asm/f64" -) - -// TODO(Kunde21): Merge these methods back into level2double/level2single when Sgemv assembly kernels are merged into f32. - -// Dgemv computes -// y = alpha * A * x + beta * y if tA = blas.NoTrans -// y = alpha * A^T * x + beta * y if tA = blas.Trans or blas.ConjTrans -// where A is an m×n dense matrix, x and y are vectors, and alpha and beta are scalars. -func (Implementation) Dgemv(tA blas.Transpose, m, n int, alpha float64, a []float64, lda int, x []float64, incX int, beta float64, y []float64, incY int) { - if tA != blas.NoTrans && tA != blas.Trans && tA != blas.ConjTrans { - panic(badTranspose) - } - if m < 0 { - panic(mLT0) - } - if n < 0 { - panic(nLT0) - } - if lda < max(1, n) { - panic(badLdA) - } - if incX == 0 { - panic(zeroIncX) - } - if incY == 0 { - panic(zeroIncY) - } - // Set up indexes - lenX := m - lenY := n - if tA == blas.NoTrans { - lenX = n - lenY = m - } - - // Quick return if possible - if m == 0 || n == 0 { - return - } - - if (incX > 0 && (lenX-1)*incX >= len(x)) || (incX < 0 && (1-lenX)*incX >= len(x)) { - panic(shortX) - } - if (incY > 0 && (lenY-1)*incY >= len(y)) || (incY < 0 && (1-lenY)*incY >= len(y)) { - panic(shortY) - } - if len(a) < lda*(m-1)+n { - panic(shortA) - } - - // Quick return if possible - if alpha == 0 && beta == 1 { - return - } - - if alpha == 0 { - // First form y = beta * y - if incY > 0 { - Implementation{}.Dscal(lenY, beta, y, incY) - } else { - Implementation{}.Dscal(lenY, beta, y, -incY) - } - return - } - - // Form y = alpha * A * x + y - if tA == blas.NoTrans { - f64.GemvN(uintptr(m), uintptr(n), alpha, a, uintptr(lda), x, uintptr(incX), beta, y, uintptr(incY)) - return - } - // Cases where a is transposed. - f64.GemvT(uintptr(m), uintptr(n), alpha, a, uintptr(lda), x, uintptr(incX), beta, y, uintptr(incY)) -} - -// Sgemv computes -// y = alpha * A * x + beta * y if tA = blas.NoTrans -// y = alpha * A^T * x + beta * y if tA = blas.Trans or blas.ConjTrans -// where A is an m×n dense matrix, x and y are vectors, and alpha and beta are scalars. -// -// Float32 implementations are autogenerated and not directly tested. -func (Implementation) Sgemv(tA blas.Transpose, m, n int, alpha float32, a []float32, lda int, x []float32, incX int, beta float32, y []float32, incY int) { - if tA != blas.NoTrans && tA != blas.Trans && tA != blas.ConjTrans { - panic(badTranspose) - } - if m < 0 { - panic(mLT0) - } - if n < 0 { - panic(nLT0) - } - if lda < max(1, n) { - panic(badLdA) - } - if incX == 0 { - panic(zeroIncX) - } - if incY == 0 { - panic(zeroIncY) - } - - // Quick return if possible. - if m == 0 || n == 0 { - return - } - - // Set up indexes - lenX := m - lenY := n - if tA == blas.NoTrans { - lenX = n - lenY = m - } - if (incX > 0 && (lenX-1)*incX >= len(x)) || (incX < 0 && (1-lenX)*incX >= len(x)) { - panic(shortX) - } - if (incY > 0 && (lenY-1)*incY >= len(y)) || (incY < 0 && (1-lenY)*incY >= len(y)) { - panic(shortY) - } - if len(a) < lda*(m-1)+n { - panic(shortA) - } - - // Quick return if possible. - if alpha == 0 && beta == 1 { - return - } - - // First form y = beta * y - if incY > 0 { - Implementation{}.Sscal(lenY, beta, y, incY) - } else { - Implementation{}.Sscal(lenY, beta, y, -incY) - } - - if alpha == 0 { - return - } - - var kx, ky int - if incX < 0 { - kx = -(lenX - 1) * incX - } - if incY < 0 { - ky = -(lenY - 1) * incY - } - - // Form y = alpha * A * x + y - if tA == blas.NoTrans { - if incX == 1 && incY == 1 { - for i := 0; i < m; i++ { - y[i] += alpha * f32.DotUnitary(a[lda*i:lda*i+n], x[:n]) - } - return - } - iy := ky - for i := 0; i < m; i++ { - y[iy] += alpha * f32.DotInc(x, a[lda*i:lda*i+n], uintptr(n), uintptr(incX), 1, uintptr(kx), 0) - iy += incY - } - return - } - // Cases where a is transposed. - if incX == 1 && incY == 1 { - for i := 0; i < m; i++ { - tmp := alpha * x[i] - if tmp != 0 { - f32.AxpyUnitaryTo(y, tmp, a[lda*i:lda*i+n], y[:n]) - } - } - return - } - ix := kx - for i := 0; i < m; i++ { - tmp := alpha * x[ix] - if tmp != 0 { - f32.AxpyInc(tmp, a[lda*i:lda*i+n], y, uintptr(n), 1, uintptr(incY), 0, uintptr(ky)) - } - ix += incX - } -} diff --git a/vendor/gonum.org/v1/gonum/blas/gonum/gonum.go b/vendor/gonum.org/v1/gonum/blas/gonum/gonum.go deleted file mode 100644 index 8ab8d43e18..0000000000 --- a/vendor/gonum.org/v1/gonum/blas/gonum/gonum.go +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright ©2015 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:generate ./single_precision.bash - -package gonum - -import ( - "math" - - "gonum.org/v1/gonum/internal/math32" -) - -type Implementation struct{} - -// [SD]gemm behavior constants. These are kept here to keep them out of the -// way during single precision code genration. -const ( - blockSize = 64 // b x b matrix - minParBlock = 4 // minimum number of blocks needed to go parallel - buffMul = 4 // how big is the buffer relative to the number of workers -) - -// subMul is a common type shared by [SD]gemm. -type subMul struct { - i, j int // index of block -} - -func max(a, b int) int { - if a > b { - return a - } - return b -} - -func min(a, b int) int { - if a > b { - return b - } - return a -} - -// blocks returns the number of divisions of the dimension length with the given -// block size. -func blocks(dim, bsize int) int { - return (dim + bsize - 1) / bsize -} - -// dcabs1 returns |real(z)|+|imag(z)|. -func dcabs1(z complex128) float64 { - return math.Abs(real(z)) + math.Abs(imag(z)) -} - -// scabs1 returns |real(z)|+|imag(z)|. -func scabs1(z complex64) float32 { - return math32.Abs(real(z)) + math32.Abs(imag(z)) -} diff --git a/vendor/gonum.org/v1/gonum/blas/gonum/level1cmplx128.go b/vendor/gonum.org/v1/gonum/blas/gonum/level1cmplx128.go deleted file mode 100644 index e37bf44dd3..0000000000 --- a/vendor/gonum.org/v1/gonum/blas/gonum/level1cmplx128.go +++ /dev/null @@ -1,445 +0,0 @@ -// Copyright ©2017 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import ( - "math" - - "gonum.org/v1/gonum/blas" - "gonum.org/v1/gonum/internal/asm/c128" -) - -var _ blas.Complex128Level1 = Implementation{} - -// Dzasum returns the sum of the absolute values of the elements of x -// \sum_i |Re(x[i])| + |Im(x[i])| -// Dzasum returns 0 if incX is negative. -func (Implementation) Dzasum(n int, x []complex128, incX int) float64 { - if n < 0 { - panic(nLT0) - } - if incX < 1 { - if incX == 0 { - panic(zeroIncX) - } - return 0 - } - var sum float64 - if incX == 1 { - if len(x) < n { - panic(shortX) - } - for _, v := range x[:n] { - sum += dcabs1(v) - } - return sum - } - if (n-1)*incX >= len(x) { - panic(shortX) - } - for i := 0; i < n; i++ { - v := x[i*incX] - sum += dcabs1(v) - } - return sum -} - -// Dznrm2 computes the Euclidean norm of the complex vector x, -// ‖x‖_2 = sqrt(\sum_i x[i] * conj(x[i])). -// This function returns 0 if incX is negative. -func (Implementation) Dznrm2(n int, x []complex128, incX int) float64 { - if incX < 1 { - if incX == 0 { - panic(zeroIncX) - } - return 0 - } - if n < 1 { - if n == 0 { - return 0 - } - panic(nLT0) - } - if (n-1)*incX >= len(x) { - panic(shortX) - } - var ( - scale float64 - ssq float64 = 1 - ) - if incX == 1 { - for _, v := range x[:n] { - re, im := math.Abs(real(v)), math.Abs(imag(v)) - if re != 0 { - if re > scale { - ssq = 1 + ssq*(scale/re)*(scale/re) - scale = re - } else { - ssq += (re / scale) * (re / scale) - } - } - if im != 0 { - if im > scale { - ssq = 1 + ssq*(scale/im)*(scale/im) - scale = im - } else { - ssq += (im / scale) * (im / scale) - } - } - } - if math.IsInf(scale, 1) { - return math.Inf(1) - } - return scale * math.Sqrt(ssq) - } - for ix := 0; ix < n*incX; ix += incX { - re, im := math.Abs(real(x[ix])), math.Abs(imag(x[ix])) - if re != 0 { - if re > scale { - ssq = 1 + ssq*(scale/re)*(scale/re) - scale = re - } else { - ssq += (re / scale) * (re / scale) - } - } - if im != 0 { - if im > scale { - ssq = 1 + ssq*(scale/im)*(scale/im) - scale = im - } else { - ssq += (im / scale) * (im / scale) - } - } - } - if math.IsInf(scale, 1) { - return math.Inf(1) - } - return scale * math.Sqrt(ssq) -} - -// Izamax returns the index of the first element of x having largest |Re(·)|+|Im(·)|. -// Izamax returns -1 if n is 0 or incX is negative. -func (Implementation) Izamax(n int, x []complex128, incX int) int { - if incX < 1 { - if incX == 0 { - panic(zeroIncX) - } - // Return invalid index. - return -1 - } - if n < 1 { - if n == 0 { - // Return invalid index. - return -1 - } - panic(nLT0) - } - if len(x) <= (n-1)*incX { - panic(shortX) - } - idx := 0 - max := dcabs1(x[0]) - if incX == 1 { - for i, v := range x[1:n] { - absV := dcabs1(v) - if absV > max { - max = absV - idx = i + 1 - } - } - return idx - } - ix := incX - for i := 1; i < n; i++ { - absV := dcabs1(x[ix]) - if absV > max { - max = absV - idx = i - } - ix += incX - } - return idx -} - -// Zaxpy adds alpha times x to y: -// y[i] += alpha * x[i] for all i -func (Implementation) Zaxpy(n int, alpha complex128, x []complex128, incX int, y []complex128, incY int) { - if incX == 0 { - panic(zeroIncX) - } - if incY == 0 { - panic(zeroIncY) - } - if n < 1 { - if n == 0 { - return - } - panic(nLT0) - } - if (incX > 0 && (n-1)*incX >= len(x)) || (incX < 0 && (1-n)*incX >= len(x)) { - panic(shortX) - } - if (incY > 0 && (n-1)*incY >= len(y)) || (incY < 0 && (1-n)*incY >= len(y)) { - panic(shortY) - } - if alpha == 0 { - return - } - if incX == 1 && incY == 1 { - c128.AxpyUnitary(alpha, x[:n], y[:n]) - return - } - var ix, iy int - if incX < 0 { - ix = (1 - n) * incX - } - if incY < 0 { - iy = (1 - n) * incY - } - c128.AxpyInc(alpha, x, y, uintptr(n), uintptr(incX), uintptr(incY), uintptr(ix), uintptr(iy)) -} - -// Zcopy copies the vector x to vector y. -func (Implementation) Zcopy(n int, x []complex128, incX int, y []complex128, incY int) { - if incX == 0 { - panic(zeroIncX) - } - if incY == 0 { - panic(zeroIncY) - } - if n < 1 { - if n == 0 { - return - } - panic(nLT0) - } - if (incX > 0 && (n-1)*incX >= len(x)) || (incX < 0 && (1-n)*incX >= len(x)) { - panic(shortX) - } - if (incY > 0 && (n-1)*incY >= len(y)) || (incY < 0 && (1-n)*incY >= len(y)) { - panic(shortY) - } - if incX == 1 && incY == 1 { - copy(y[:n], x[:n]) - return - } - var ix, iy int - if incX < 0 { - ix = (-n + 1) * incX - } - if incY < 0 { - iy = (-n + 1) * incY - } - for i := 0; i < n; i++ { - y[iy] = x[ix] - ix += incX - iy += incY - } -} - -// Zdotc computes the dot product -// x^H · y -// of two complex vectors x and y. -func (Implementation) Zdotc(n int, x []complex128, incX int, y []complex128, incY int) complex128 { - if incX == 0 { - panic(zeroIncX) - } - if incY == 0 { - panic(zeroIncY) - } - if n <= 0 { - if n == 0 { - return 0 - } - panic(nLT0) - } - if incX == 1 && incY == 1 { - if len(x) < n { - panic(shortX) - } - if len(y) < n { - panic(shortY) - } - return c128.DotcUnitary(x[:n], y[:n]) - } - var ix, iy int - if incX < 0 { - ix = (-n + 1) * incX - } - if incY < 0 { - iy = (-n + 1) * incY - } - if ix >= len(x) || (n-1)*incX >= len(x) { - panic(shortX) - } - if iy >= len(y) || (n-1)*incY >= len(y) { - panic(shortY) - } - return c128.DotcInc(x, y, uintptr(n), uintptr(incX), uintptr(incY), uintptr(ix), uintptr(iy)) -} - -// Zdotu computes the dot product -// x^T · y -// of two complex vectors x and y. -func (Implementation) Zdotu(n int, x []complex128, incX int, y []complex128, incY int) complex128 { - if incX == 0 { - panic(zeroIncX) - } - if incY == 0 { - panic(zeroIncY) - } - if n <= 0 { - if n == 0 { - return 0 - } - panic(nLT0) - } - if incX == 1 && incY == 1 { - if len(x) < n { - panic(shortX) - } - if len(y) < n { - panic(shortY) - } - return c128.DotuUnitary(x[:n], y[:n]) - } - var ix, iy int - if incX < 0 { - ix = (-n + 1) * incX - } - if incY < 0 { - iy = (-n + 1) * incY - } - if ix >= len(x) || (n-1)*incX >= len(x) { - panic(shortX) - } - if iy >= len(y) || (n-1)*incY >= len(y) { - panic(shortY) - } - return c128.DotuInc(x, y, uintptr(n), uintptr(incX), uintptr(incY), uintptr(ix), uintptr(iy)) -} - -// Zdscal scales the vector x by a real scalar alpha. -// Zdscal has no effect if incX < 0. -func (Implementation) Zdscal(n int, alpha float64, x []complex128, incX int) { - if incX < 1 { - if incX == 0 { - panic(zeroIncX) - } - return - } - if (n-1)*incX >= len(x) { - panic(shortX) - } - if n < 1 { - if n == 0 { - return - } - panic(nLT0) - } - if alpha == 0 { - if incX == 1 { - x = x[:n] - for i := range x { - x[i] = 0 - } - return - } - for ix := 0; ix < n*incX; ix += incX { - x[ix] = 0 - } - return - } - if incX == 1 { - x = x[:n] - for i, v := range x { - x[i] = complex(alpha*real(v), alpha*imag(v)) - } - return - } - for ix := 0; ix < n*incX; ix += incX { - v := x[ix] - x[ix] = complex(alpha*real(v), alpha*imag(v)) - } -} - -// Zscal scales the vector x by a complex scalar alpha. -// Zscal has no effect if incX < 0. -func (Implementation) Zscal(n int, alpha complex128, x []complex128, incX int) { - if incX < 1 { - if incX == 0 { - panic(zeroIncX) - } - return - } - if (n-1)*incX >= len(x) { - panic(shortX) - } - if n < 1 { - if n == 0 { - return - } - panic(nLT0) - } - if alpha == 0 { - if incX == 1 { - x = x[:n] - for i := range x { - x[i] = 0 - } - return - } - for ix := 0; ix < n*incX; ix += incX { - x[ix] = 0 - } - return - } - if incX == 1 { - c128.ScalUnitary(alpha, x[:n]) - return - } - c128.ScalInc(alpha, x, uintptr(n), uintptr(incX)) -} - -// Zswap exchanges the elements of two complex vectors x and y. -func (Implementation) Zswap(n int, x []complex128, incX int, y []complex128, incY int) { - if incX == 0 { - panic(zeroIncX) - } - if incY == 0 { - panic(zeroIncY) - } - if n < 1 { - if n == 0 { - return - } - panic(nLT0) - } - if (incX > 0 && (n-1)*incX >= len(x)) || (incX < 0 && (1-n)*incX >= len(x)) { - panic(shortX) - } - if (incY > 0 && (n-1)*incY >= len(y)) || (incY < 0 && (1-n)*incY >= len(y)) { - panic(shortY) - } - if incX == 1 && incY == 1 { - x = x[:n] - for i, v := range x { - x[i], y[i] = y[i], v - } - return - } - var ix, iy int - if incX < 0 { - ix = (-n + 1) * incX - } - if incY < 0 { - iy = (-n + 1) * incY - } - for i := 0; i < n; i++ { - x[ix], y[iy] = y[iy], x[ix] - ix += incX - iy += incY - } -} diff --git a/vendor/gonum.org/v1/gonum/blas/gonum/level1cmplx64.go b/vendor/gonum.org/v1/gonum/blas/gonum/level1cmplx64.go deleted file mode 100644 index ba192ea595..0000000000 --- a/vendor/gonum.org/v1/gonum/blas/gonum/level1cmplx64.go +++ /dev/null @@ -1,467 +0,0 @@ -// Code generated by "go generate gonum.org/v1/gonum/blas/gonum”; DO NOT EDIT. - -// Copyright ©2017 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import ( - math "gonum.org/v1/gonum/internal/math32" - - "gonum.org/v1/gonum/blas" - "gonum.org/v1/gonum/internal/asm/c64" -) - -var _ blas.Complex64Level1 = Implementation{} - -// Scasum returns the sum of the absolute values of the elements of x -// \sum_i |Re(x[i])| + |Im(x[i])| -// Scasum returns 0 if incX is negative. -// -// Complex64 implementations are autogenerated and not directly tested. -func (Implementation) Scasum(n int, x []complex64, incX int) float32 { - if n < 0 { - panic(nLT0) - } - if incX < 1 { - if incX == 0 { - panic(zeroIncX) - } - return 0 - } - var sum float32 - if incX == 1 { - if len(x) < n { - panic(shortX) - } - for _, v := range x[:n] { - sum += scabs1(v) - } - return sum - } - if (n-1)*incX >= len(x) { - panic(shortX) - } - for i := 0; i < n; i++ { - v := x[i*incX] - sum += scabs1(v) - } - return sum -} - -// Scnrm2 computes the Euclidean norm of the complex vector x, -// ‖x‖_2 = sqrt(\sum_i x[i] * conj(x[i])). -// This function returns 0 if incX is negative. -// -// Complex64 implementations are autogenerated and not directly tested. -func (Implementation) Scnrm2(n int, x []complex64, incX int) float32 { - if incX < 1 { - if incX == 0 { - panic(zeroIncX) - } - return 0 - } - if n < 1 { - if n == 0 { - return 0 - } - panic(nLT0) - } - if (n-1)*incX >= len(x) { - panic(shortX) - } - var ( - scale float32 - ssq float32 = 1 - ) - if incX == 1 { - for _, v := range x[:n] { - re, im := math.Abs(real(v)), math.Abs(imag(v)) - if re != 0 { - if re > scale { - ssq = 1 + ssq*(scale/re)*(scale/re) - scale = re - } else { - ssq += (re / scale) * (re / scale) - } - } - if im != 0 { - if im > scale { - ssq = 1 + ssq*(scale/im)*(scale/im) - scale = im - } else { - ssq += (im / scale) * (im / scale) - } - } - } - if math.IsInf(scale, 1) { - return math.Inf(1) - } - return scale * math.Sqrt(ssq) - } - for ix := 0; ix < n*incX; ix += incX { - re, im := math.Abs(real(x[ix])), math.Abs(imag(x[ix])) - if re != 0 { - if re > scale { - ssq = 1 + ssq*(scale/re)*(scale/re) - scale = re - } else { - ssq += (re / scale) * (re / scale) - } - } - if im != 0 { - if im > scale { - ssq = 1 + ssq*(scale/im)*(scale/im) - scale = im - } else { - ssq += (im / scale) * (im / scale) - } - } - } - if math.IsInf(scale, 1) { - return math.Inf(1) - } - return scale * math.Sqrt(ssq) -} - -// Icamax returns the index of the first element of x having largest |Re(·)|+|Im(·)|. -// Icamax returns -1 if n is 0 or incX is negative. -// -// Complex64 implementations are autogenerated and not directly tested. -func (Implementation) Icamax(n int, x []complex64, incX int) int { - if incX < 1 { - if incX == 0 { - panic(zeroIncX) - } - // Return invalid index. - return -1 - } - if n < 1 { - if n == 0 { - // Return invalid index. - return -1 - } - panic(nLT0) - } - if len(x) <= (n-1)*incX { - panic(shortX) - } - idx := 0 - max := scabs1(x[0]) - if incX == 1 { - for i, v := range x[1:n] { - absV := scabs1(v) - if absV > max { - max = absV - idx = i + 1 - } - } - return idx - } - ix := incX - for i := 1; i < n; i++ { - absV := scabs1(x[ix]) - if absV > max { - max = absV - idx = i - } - ix += incX - } - return idx -} - -// Caxpy adds alpha times x to y: -// y[i] += alpha * x[i] for all i -// -// Complex64 implementations are autogenerated and not directly tested. -func (Implementation) Caxpy(n int, alpha complex64, x []complex64, incX int, y []complex64, incY int) { - if incX == 0 { - panic(zeroIncX) - } - if incY == 0 { - panic(zeroIncY) - } - if n < 1 { - if n == 0 { - return - } - panic(nLT0) - } - if (incX > 0 && (n-1)*incX >= len(x)) || (incX < 0 && (1-n)*incX >= len(x)) { - panic(shortX) - } - if (incY > 0 && (n-1)*incY >= len(y)) || (incY < 0 && (1-n)*incY >= len(y)) { - panic(shortY) - } - if alpha == 0 { - return - } - if incX == 1 && incY == 1 { - c64.AxpyUnitary(alpha, x[:n], y[:n]) - return - } - var ix, iy int - if incX < 0 { - ix = (1 - n) * incX - } - if incY < 0 { - iy = (1 - n) * incY - } - c64.AxpyInc(alpha, x, y, uintptr(n), uintptr(incX), uintptr(incY), uintptr(ix), uintptr(iy)) -} - -// Ccopy copies the vector x to vector y. -// -// Complex64 implementations are autogenerated and not directly tested. -func (Implementation) Ccopy(n int, x []complex64, incX int, y []complex64, incY int) { - if incX == 0 { - panic(zeroIncX) - } - if incY == 0 { - panic(zeroIncY) - } - if n < 1 { - if n == 0 { - return - } - panic(nLT0) - } - if (incX > 0 && (n-1)*incX >= len(x)) || (incX < 0 && (1-n)*incX >= len(x)) { - panic(shortX) - } - if (incY > 0 && (n-1)*incY >= len(y)) || (incY < 0 && (1-n)*incY >= len(y)) { - panic(shortY) - } - if incX == 1 && incY == 1 { - copy(y[:n], x[:n]) - return - } - var ix, iy int - if incX < 0 { - ix = (-n + 1) * incX - } - if incY < 0 { - iy = (-n + 1) * incY - } - for i := 0; i < n; i++ { - y[iy] = x[ix] - ix += incX - iy += incY - } -} - -// Cdotc computes the dot product -// x^H · y -// of two complex vectors x and y. -// -// Complex64 implementations are autogenerated and not directly tested. -func (Implementation) Cdotc(n int, x []complex64, incX int, y []complex64, incY int) complex64 { - if incX == 0 { - panic(zeroIncX) - } - if incY == 0 { - panic(zeroIncY) - } - if n <= 0 { - if n == 0 { - return 0 - } - panic(nLT0) - } - if incX == 1 && incY == 1 { - if len(x) < n { - panic(shortX) - } - if len(y) < n { - panic(shortY) - } - return c64.DotcUnitary(x[:n], y[:n]) - } - var ix, iy int - if incX < 0 { - ix = (-n + 1) * incX - } - if incY < 0 { - iy = (-n + 1) * incY - } - if ix >= len(x) || (n-1)*incX >= len(x) { - panic(shortX) - } - if iy >= len(y) || (n-1)*incY >= len(y) { - panic(shortY) - } - return c64.DotcInc(x, y, uintptr(n), uintptr(incX), uintptr(incY), uintptr(ix), uintptr(iy)) -} - -// Cdotu computes the dot product -// x^T · y -// of two complex vectors x and y. -// -// Complex64 implementations are autogenerated and not directly tested. -func (Implementation) Cdotu(n int, x []complex64, incX int, y []complex64, incY int) complex64 { - if incX == 0 { - panic(zeroIncX) - } - if incY == 0 { - panic(zeroIncY) - } - if n <= 0 { - if n == 0 { - return 0 - } - panic(nLT0) - } - if incX == 1 && incY == 1 { - if len(x) < n { - panic(shortX) - } - if len(y) < n { - panic(shortY) - } - return c64.DotuUnitary(x[:n], y[:n]) - } - var ix, iy int - if incX < 0 { - ix = (-n + 1) * incX - } - if incY < 0 { - iy = (-n + 1) * incY - } - if ix >= len(x) || (n-1)*incX >= len(x) { - panic(shortX) - } - if iy >= len(y) || (n-1)*incY >= len(y) { - panic(shortY) - } - return c64.DotuInc(x, y, uintptr(n), uintptr(incX), uintptr(incY), uintptr(ix), uintptr(iy)) -} - -// Csscal scales the vector x by a real scalar alpha. -// Csscal has no effect if incX < 0. -// -// Complex64 implementations are autogenerated and not directly tested. -func (Implementation) Csscal(n int, alpha float32, x []complex64, incX int) { - if incX < 1 { - if incX == 0 { - panic(zeroIncX) - } - return - } - if (n-1)*incX >= len(x) { - panic(shortX) - } - if n < 1 { - if n == 0 { - return - } - panic(nLT0) - } - if alpha == 0 { - if incX == 1 { - x = x[:n] - for i := range x { - x[i] = 0 - } - return - } - for ix := 0; ix < n*incX; ix += incX { - x[ix] = 0 - } - return - } - if incX == 1 { - x = x[:n] - for i, v := range x { - x[i] = complex(alpha*real(v), alpha*imag(v)) - } - return - } - for ix := 0; ix < n*incX; ix += incX { - v := x[ix] - x[ix] = complex(alpha*real(v), alpha*imag(v)) - } -} - -// Cscal scales the vector x by a complex scalar alpha. -// Cscal has no effect if incX < 0. -// -// Complex64 implementations are autogenerated and not directly tested. -func (Implementation) Cscal(n int, alpha complex64, x []complex64, incX int) { - if incX < 1 { - if incX == 0 { - panic(zeroIncX) - } - return - } - if (n-1)*incX >= len(x) { - panic(shortX) - } - if n < 1 { - if n == 0 { - return - } - panic(nLT0) - } - if alpha == 0 { - if incX == 1 { - x = x[:n] - for i := range x { - x[i] = 0 - } - return - } - for ix := 0; ix < n*incX; ix += incX { - x[ix] = 0 - } - return - } - if incX == 1 { - c64.ScalUnitary(alpha, x[:n]) - return - } - c64.ScalInc(alpha, x, uintptr(n), uintptr(incX)) -} - -// Cswap exchanges the elements of two complex vectors x and y. -// -// Complex64 implementations are autogenerated and not directly tested. -func (Implementation) Cswap(n int, x []complex64, incX int, y []complex64, incY int) { - if incX == 0 { - panic(zeroIncX) - } - if incY == 0 { - panic(zeroIncY) - } - if n < 1 { - if n == 0 { - return - } - panic(nLT0) - } - if (incX > 0 && (n-1)*incX >= len(x)) || (incX < 0 && (1-n)*incX >= len(x)) { - panic(shortX) - } - if (incY > 0 && (n-1)*incY >= len(y)) || (incY < 0 && (1-n)*incY >= len(y)) { - panic(shortY) - } - if incX == 1 && incY == 1 { - x = x[:n] - for i, v := range x { - x[i], y[i] = y[i], v - } - return - } - var ix, iy int - if incX < 0 { - ix = (-n + 1) * incX - } - if incY < 0 { - iy = (-n + 1) * incY - } - for i := 0; i < n; i++ { - x[ix], y[iy] = y[iy], x[ix] - ix += incX - iy += incY - } -} diff --git a/vendor/gonum.org/v1/gonum/blas/gonum/level1float32.go b/vendor/gonum.org/v1/gonum/blas/gonum/level1float32.go deleted file mode 100644 index ee82083a6b..0000000000 --- a/vendor/gonum.org/v1/gonum/blas/gonum/level1float32.go +++ /dev/null @@ -1,644 +0,0 @@ -// Code generated by "go generate gonum.org/v1/gonum/blas/gonum”; DO NOT EDIT. - -// Copyright ©2015 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import ( - math "gonum.org/v1/gonum/internal/math32" - - "gonum.org/v1/gonum/blas" - "gonum.org/v1/gonum/internal/asm/f32" -) - -var _ blas.Float32Level1 = Implementation{} - -// Snrm2 computes the Euclidean norm of a vector, -// sqrt(\sum_i x[i] * x[i]). -// This function returns 0 if incX is negative. -// -// Float32 implementations are autogenerated and not directly tested. -func (Implementation) Snrm2(n int, x []float32, incX int) float32 { - if incX < 1 { - if incX == 0 { - panic(zeroIncX) - } - return 0 - } - if len(x) <= (n-1)*incX { - panic(shortX) - } - if n < 2 { - if n == 1 { - return math.Abs(x[0]) - } - if n == 0 { - return 0 - } - panic(nLT0) - } - var ( - scale float32 = 0 - sumSquares float32 = 1 - ) - if incX == 1 { - x = x[:n] - for _, v := range x { - if v == 0 { - continue - } - absxi := math.Abs(v) - if math.IsNaN(absxi) { - return math.NaN() - } - if scale < absxi { - sumSquares = 1 + sumSquares*(scale/absxi)*(scale/absxi) - scale = absxi - } else { - sumSquares = sumSquares + (absxi/scale)*(absxi/scale) - } - } - if math.IsInf(scale, 1) { - return math.Inf(1) - } - return scale * math.Sqrt(sumSquares) - } - for ix := 0; ix < n*incX; ix += incX { - val := x[ix] - if val == 0 { - continue - } - absxi := math.Abs(val) - if math.IsNaN(absxi) { - return math.NaN() - } - if scale < absxi { - sumSquares = 1 + sumSquares*(scale/absxi)*(scale/absxi) - scale = absxi - } else { - sumSquares = sumSquares + (absxi/scale)*(absxi/scale) - } - } - if math.IsInf(scale, 1) { - return math.Inf(1) - } - return scale * math.Sqrt(sumSquares) -} - -// Sasum computes the sum of the absolute values of the elements of x. -// \sum_i |x[i]| -// Sasum returns 0 if incX is negative. -// -// Float32 implementations are autogenerated and not directly tested. -func (Implementation) Sasum(n int, x []float32, incX int) float32 { - var sum float32 - if n < 0 { - panic(nLT0) - } - if incX < 1 { - if incX == 0 { - panic(zeroIncX) - } - return 0 - } - if len(x) <= (n-1)*incX { - panic(shortX) - } - if incX == 1 { - x = x[:n] - for _, v := range x { - sum += math.Abs(v) - } - return sum - } - for i := 0; i < n; i++ { - sum += math.Abs(x[i*incX]) - } - return sum -} - -// Isamax returns the index of an element of x with the largest absolute value. -// If there are multiple such indices the earliest is returned. -// Isamax returns -1 if n == 0. -// -// Float32 implementations are autogenerated and not directly tested. -func (Implementation) Isamax(n int, x []float32, incX int) int { - if incX < 1 { - if incX == 0 { - panic(zeroIncX) - } - return -1 - } - if len(x) <= (n-1)*incX { - panic(shortX) - } - if n < 2 { - if n == 1 { - return 0 - } - if n == 0 { - return -1 // Netlib returns invalid index when n == 0. - } - panic(nLT0) - } - idx := 0 - max := math.Abs(x[0]) - if incX == 1 { - for i, v := range x[:n] { - absV := math.Abs(v) - if absV > max { - max = absV - idx = i - } - } - return idx - } - ix := incX - for i := 1; i < n; i++ { - v := x[ix] - absV := math.Abs(v) - if absV > max { - max = absV - idx = i - } - ix += incX - } - return idx -} - -// Sswap exchanges the elements of two vectors. -// x[i], y[i] = y[i], x[i] for all i -// -// Float32 implementations are autogenerated and not directly tested. -func (Implementation) Sswap(n int, x []float32, incX int, y []float32, incY int) { - if incX == 0 { - panic(zeroIncX) - } - if incY == 0 { - panic(zeroIncY) - } - if n < 1 { - if n == 0 { - return - } - panic(nLT0) - } - if (incX > 0 && len(x) <= (n-1)*incX) || (incX < 0 && len(x) <= (1-n)*incX) { - panic(shortX) - } - if (incY > 0 && len(y) <= (n-1)*incY) || (incY < 0 && len(y) <= (1-n)*incY) { - panic(shortY) - } - if incX == 1 && incY == 1 { - x = x[:n] - for i, v := range x { - x[i], y[i] = y[i], v - } - return - } - var ix, iy int - if incX < 0 { - ix = (-n + 1) * incX - } - if incY < 0 { - iy = (-n + 1) * incY - } - for i := 0; i < n; i++ { - x[ix], y[iy] = y[iy], x[ix] - ix += incX - iy += incY - } -} - -// Scopy copies the elements of x into the elements of y. -// y[i] = x[i] for all i -// -// Float32 implementations are autogenerated and not directly tested. -func (Implementation) Scopy(n int, x []float32, incX int, y []float32, incY int) { - if incX == 0 { - panic(zeroIncX) - } - if incY == 0 { - panic(zeroIncY) - } - if n < 1 { - if n == 0 { - return - } - panic(nLT0) - } - if (incX > 0 && len(x) <= (n-1)*incX) || (incX < 0 && len(x) <= (1-n)*incX) { - panic(shortX) - } - if (incY > 0 && len(y) <= (n-1)*incY) || (incY < 0 && len(y) <= (1-n)*incY) { - panic(shortY) - } - if incX == 1 && incY == 1 { - copy(y[:n], x[:n]) - return - } - var ix, iy int - if incX < 0 { - ix = (-n + 1) * incX - } - if incY < 0 { - iy = (-n + 1) * incY - } - for i := 0; i < n; i++ { - y[iy] = x[ix] - ix += incX - iy += incY - } -} - -// Saxpy adds alpha times x to y -// y[i] += alpha * x[i] for all i -// -// Float32 implementations are autogenerated and not directly tested. -func (Implementation) Saxpy(n int, alpha float32, x []float32, incX int, y []float32, incY int) { - if incX == 0 { - panic(zeroIncX) - } - if incY == 0 { - panic(zeroIncY) - } - if n < 1 { - if n == 0 { - return - } - panic(nLT0) - } - if (incX > 0 && len(x) <= (n-1)*incX) || (incX < 0 && len(x) <= (1-n)*incX) { - panic(shortX) - } - if (incY > 0 && len(y) <= (n-1)*incY) || (incY < 0 && len(y) <= (1-n)*incY) { - panic(shortY) - } - if alpha == 0 { - return - } - if incX == 1 && incY == 1 { - f32.AxpyUnitary(alpha, x[:n], y[:n]) - return - } - var ix, iy int - if incX < 0 { - ix = (-n + 1) * incX - } - if incY < 0 { - iy = (-n + 1) * incY - } - f32.AxpyInc(alpha, x, y, uintptr(n), uintptr(incX), uintptr(incY), uintptr(ix), uintptr(iy)) -} - -// Srotg computes the plane rotation -// _ _ _ _ _ _ -// | c s | | a | | r | -// | -s c | * | b | = | 0 | -// ‾ ‾ ‾ ‾ ‾ ‾ -// where -// r = ±√(a^2 + b^2) -// c = a/r, the cosine of the plane rotation -// s = b/r, the sine of the plane rotation -// -// NOTE: There is a discrepancy between the reference implementation and the BLAS -// technical manual regarding the sign for r when a or b are zero. -// Srotg agrees with the definition in the manual and other -// common BLAS implementations. -// -// Float32 implementations are autogenerated and not directly tested. -func (Implementation) Srotg(a, b float32) (c, s, r, z float32) { - if b == 0 && a == 0 { - return 1, 0, a, 0 - } - absA := math.Abs(a) - absB := math.Abs(b) - aGTb := absA > absB - r = math.Hypot(a, b) - if aGTb { - r = math.Copysign(r, a) - } else { - r = math.Copysign(r, b) - } - c = a / r - s = b / r - if aGTb { - z = s - } else if c != 0 { // r == 0 case handled above - z = 1 / c - } else { - z = 1 - } - return -} - -// Srotmg computes the modified Givens rotation. See -// http://www.netlib.org/lapack/explore-html/df/deb/drotmg_8f.html -// for more details. -// -// Float32 implementations are autogenerated and not directly tested. -func (Implementation) Srotmg(d1, d2, x1, y1 float32) (p blas.SrotmParams, rd1, rd2, rx1 float32) { - // The implementation of Drotmg used here is taken from Hopkins 1997 - // Appendix A: https://doi.org/10.1145/289251.289253 - // with the exception of the gam constants below. - - const ( - gam = 4096.0 - gamsq = gam * gam - rgamsq = 1.0 / gamsq - ) - - if d1 < 0 { - p.Flag = blas.Rescaling // Error state. - return p, 0, 0, 0 - } - - if d2 == 0 || y1 == 0 { - p.Flag = blas.Identity - return p, d1, d2, x1 - } - - var h11, h12, h21, h22 float32 - if (d1 == 0 || x1 == 0) && d2 > 0 { - p.Flag = blas.Diagonal - h12 = 1 - h21 = -1 - x1 = y1 - d1, d2 = d2, d1 - } else { - p2 := d2 * y1 - p1 := d1 * x1 - q2 := p2 * y1 - q1 := p1 * x1 - if math.Abs(q1) > math.Abs(q2) { - p.Flag = blas.OffDiagonal - h11 = 1 - h22 = 1 - h21 = -y1 / x1 - h12 = p2 / p1 - u := 1 - h12*h21 - if u <= 0 { - p.Flag = blas.Rescaling // Error state. - return p, 0, 0, 0 - } - - d1 /= u - d2 /= u - x1 *= u - } else { - if q2 < 0 { - p.Flag = blas.Rescaling // Error state. - return p, 0, 0, 0 - } - - p.Flag = blas.Diagonal - h21 = -1 - h12 = 1 - h11 = p1 / p2 - h22 = x1 / y1 - u := 1 + h11*h22 - d1, d2 = d2/u, d1/u - x1 = y1 * u - } - } - - for d1 <= rgamsq && d1 != 0 { - p.Flag = blas.Rescaling - d1 = (d1 * gam) * gam - x1 /= gam - h11 /= gam - h12 /= gam - } - for d1 > gamsq { - p.Flag = blas.Rescaling - d1 = (d1 / gam) / gam - x1 *= gam - h11 *= gam - h12 *= gam - } - - for math.Abs(d2) <= rgamsq && d2 != 0 { - p.Flag = blas.Rescaling - d2 = (d2 * gam) * gam - h21 /= gam - h22 /= gam - } - for math.Abs(d2) > gamsq { - p.Flag = blas.Rescaling - d2 = (d2 / gam) / gam - h21 *= gam - h22 *= gam - } - - switch p.Flag { - case blas.Diagonal: - p.H = [4]float32{0: h11, 3: h22} - case blas.OffDiagonal: - p.H = [4]float32{1: h21, 2: h12} - case blas.Rescaling: - p.H = [4]float32{h11, h21, h12, h22} - default: - panic(badFlag) - } - - return p, d1, d2, x1 -} - -// Srot applies a plane transformation. -// x[i] = c * x[i] + s * y[i] -// y[i] = c * y[i] - s * x[i] -// -// Float32 implementations are autogenerated and not directly tested. -func (Implementation) Srot(n int, x []float32, incX int, y []float32, incY int, c float32, s float32) { - if incX == 0 { - panic(zeroIncX) - } - if incY == 0 { - panic(zeroIncY) - } - if n < 1 { - if n == 0 { - return - } - panic(nLT0) - } - if (incX > 0 && len(x) <= (n-1)*incX) || (incX < 0 && len(x) <= (1-n)*incX) { - panic(shortX) - } - if (incY > 0 && len(y) <= (n-1)*incY) || (incY < 0 && len(y) <= (1-n)*incY) { - panic(shortY) - } - if incX == 1 && incY == 1 { - x = x[:n] - for i, vx := range x { - vy := y[i] - x[i], y[i] = c*vx+s*vy, c*vy-s*vx - } - return - } - var ix, iy int - if incX < 0 { - ix = (-n + 1) * incX - } - if incY < 0 { - iy = (-n + 1) * incY - } - for i := 0; i < n; i++ { - vx := x[ix] - vy := y[iy] - x[ix], y[iy] = c*vx+s*vy, c*vy-s*vx - ix += incX - iy += incY - } -} - -// Srotm applies the modified Givens rotation to the 2×n matrix. -// -// Float32 implementations are autogenerated and not directly tested. -func (Implementation) Srotm(n int, x []float32, incX int, y []float32, incY int, p blas.SrotmParams) { - if incX == 0 { - panic(zeroIncX) - } - if incY == 0 { - panic(zeroIncY) - } - if n <= 0 { - if n == 0 { - return - } - panic(nLT0) - } - if (incX > 0 && len(x) <= (n-1)*incX) || (incX < 0 && len(x) <= (1-n)*incX) { - panic(shortX) - } - if (incY > 0 && len(y) <= (n-1)*incY) || (incY < 0 && len(y) <= (1-n)*incY) { - panic(shortY) - } - - if p.Flag == blas.Identity { - return - } - - switch p.Flag { - case blas.Rescaling: - h11 := p.H[0] - h12 := p.H[2] - h21 := p.H[1] - h22 := p.H[3] - if incX == 1 && incY == 1 { - x = x[:n] - for i, vx := range x { - vy := y[i] - x[i], y[i] = vx*h11+vy*h12, vx*h21+vy*h22 - } - return - } - var ix, iy int - if incX < 0 { - ix = (-n + 1) * incX - } - if incY < 0 { - iy = (-n + 1) * incY - } - for i := 0; i < n; i++ { - vx := x[ix] - vy := y[iy] - x[ix], y[iy] = vx*h11+vy*h12, vx*h21+vy*h22 - ix += incX - iy += incY - } - case blas.OffDiagonal: - h12 := p.H[2] - h21 := p.H[1] - if incX == 1 && incY == 1 { - x = x[:n] - for i, vx := range x { - vy := y[i] - x[i], y[i] = vx+vy*h12, vx*h21+vy - } - return - } - var ix, iy int - if incX < 0 { - ix = (-n + 1) * incX - } - if incY < 0 { - iy = (-n + 1) * incY - } - for i := 0; i < n; i++ { - vx := x[ix] - vy := y[iy] - x[ix], y[iy] = vx+vy*h12, vx*h21+vy - ix += incX - iy += incY - } - case blas.Diagonal: - h11 := p.H[0] - h22 := p.H[3] - if incX == 1 && incY == 1 { - x = x[:n] - for i, vx := range x { - vy := y[i] - x[i], y[i] = vx*h11+vy, -vx+vy*h22 - } - return - } - var ix, iy int - if incX < 0 { - ix = (-n + 1) * incX - } - if incY < 0 { - iy = (-n + 1) * incY - } - for i := 0; i < n; i++ { - vx := x[ix] - vy := y[iy] - x[ix], y[iy] = vx*h11+vy, -vx+vy*h22 - ix += incX - iy += incY - } - } -} - -// Sscal scales x by alpha. -// x[i] *= alpha -// Sscal has no effect if incX < 0. -// -// Float32 implementations are autogenerated and not directly tested. -func (Implementation) Sscal(n int, alpha float32, x []float32, incX int) { - if incX < 1 { - if incX == 0 { - panic(zeroIncX) - } - return - } - if n < 1 { - if n == 0 { - return - } - panic(nLT0) - } - if (n-1)*incX >= len(x) { - panic(shortX) - } - if alpha == 0 { - if incX == 1 { - x = x[:n] - for i := range x { - x[i] = 0 - } - return - } - for ix := 0; ix < n*incX; ix += incX { - x[ix] = 0 - } - return - } - if incX == 1 { - f32.ScalUnitary(alpha, x[:n]) - return - } - f32.ScalInc(alpha, x, uintptr(n), uintptr(incX)) -} diff --git a/vendor/gonum.org/v1/gonum/blas/gonum/level1float32_dsdot.go b/vendor/gonum.org/v1/gonum/blas/gonum/level1float32_dsdot.go deleted file mode 100644 index 089e0d8f0d..0000000000 --- a/vendor/gonum.org/v1/gonum/blas/gonum/level1float32_dsdot.go +++ /dev/null @@ -1,53 +0,0 @@ -// Code generated by "go generate gonum.org/v1/gonum/blas/gonum”; DO NOT EDIT. - -// Copyright ©2015 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import ( - "gonum.org/v1/gonum/internal/asm/f32" -) - -// Dsdot computes the dot product of the two vectors -// \sum_i x[i]*y[i] -// -// Float32 implementations are autogenerated and not directly tested. -func (Implementation) Dsdot(n int, x []float32, incX int, y []float32, incY int) float64 { - if incX == 0 { - panic(zeroIncX) - } - if incY == 0 { - panic(zeroIncY) - } - if n <= 0 { - if n == 0 { - return 0 - } - panic(nLT0) - } - if incX == 1 && incY == 1 { - if len(x) < n { - panic(shortX) - } - if len(y) < n { - panic(shortY) - } - return f32.DdotUnitary(x[:n], y[:n]) - } - var ix, iy int - if incX < 0 { - ix = (-n + 1) * incX - } - if incY < 0 { - iy = (-n + 1) * incY - } - if ix >= len(x) || ix+(n-1)*incX >= len(x) { - panic(shortX) - } - if iy >= len(y) || iy+(n-1)*incY >= len(y) { - panic(shortY) - } - return f32.DdotInc(x, y, uintptr(n), uintptr(incX), uintptr(incY), uintptr(ix), uintptr(iy)) -} diff --git a/vendor/gonum.org/v1/gonum/blas/gonum/level1float32_sdot.go b/vendor/gonum.org/v1/gonum/blas/gonum/level1float32_sdot.go deleted file mode 100644 index 41c3e79239..0000000000 --- a/vendor/gonum.org/v1/gonum/blas/gonum/level1float32_sdot.go +++ /dev/null @@ -1,53 +0,0 @@ -// Code generated by "go generate gonum.org/v1/gonum/blas/gonum”; DO NOT EDIT. - -// Copyright ©2015 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import ( - "gonum.org/v1/gonum/internal/asm/f32" -) - -// Sdot computes the dot product of the two vectors -// \sum_i x[i]*y[i] -// -// Float32 implementations are autogenerated and not directly tested. -func (Implementation) Sdot(n int, x []float32, incX int, y []float32, incY int) float32 { - if incX == 0 { - panic(zeroIncX) - } - if incY == 0 { - panic(zeroIncY) - } - if n <= 0 { - if n == 0 { - return 0 - } - panic(nLT0) - } - if incX == 1 && incY == 1 { - if len(x) < n { - panic(shortX) - } - if len(y) < n { - panic(shortY) - } - return f32.DotUnitary(x[:n], y[:n]) - } - var ix, iy int - if incX < 0 { - ix = (-n + 1) * incX - } - if incY < 0 { - iy = (-n + 1) * incY - } - if ix >= len(x) || ix+(n-1)*incX >= len(x) { - panic(shortX) - } - if iy >= len(y) || iy+(n-1)*incY >= len(y) { - panic(shortY) - } - return f32.DotInc(x, y, uintptr(n), uintptr(incX), uintptr(incY), uintptr(ix), uintptr(iy)) -} diff --git a/vendor/gonum.org/v1/gonum/blas/gonum/level1float32_sdsdot.go b/vendor/gonum.org/v1/gonum/blas/gonum/level1float32_sdsdot.go deleted file mode 100644 index 69dd8aa1f0..0000000000 --- a/vendor/gonum.org/v1/gonum/blas/gonum/level1float32_sdsdot.go +++ /dev/null @@ -1,53 +0,0 @@ -// Code generated by "go generate gonum.org/v1/gonum/blas/gonum”; DO NOT EDIT. - -// Copyright ©2015 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import ( - "gonum.org/v1/gonum/internal/asm/f32" -) - -// Sdsdot computes the dot product of the two vectors plus a constant -// alpha + \sum_i x[i]*y[i] -// -// Float32 implementations are autogenerated and not directly tested. -func (Implementation) Sdsdot(n int, alpha float32, x []float32, incX int, y []float32, incY int) float32 { - if incX == 0 { - panic(zeroIncX) - } - if incY == 0 { - panic(zeroIncY) - } - if n <= 0 { - if n == 0 { - return 0 - } - panic(nLT0) - } - if incX == 1 && incY == 1 { - if len(x) < n { - panic(shortX) - } - if len(y) < n { - panic(shortY) - } - return alpha + float32(f32.DdotUnitary(x[:n], y[:n])) - } - var ix, iy int - if incX < 0 { - ix = (-n + 1) * incX - } - if incY < 0 { - iy = (-n + 1) * incY - } - if ix >= len(x) || ix+(n-1)*incX >= len(x) { - panic(shortX) - } - if iy >= len(y) || iy+(n-1)*incY >= len(y) { - panic(shortY) - } - return alpha + float32(f32.DdotInc(x, y, uintptr(n), uintptr(incX), uintptr(incY), uintptr(ix), uintptr(iy))) -} diff --git a/vendor/gonum.org/v1/gonum/blas/gonum/level1float64.go b/vendor/gonum.org/v1/gonum/blas/gonum/level1float64.go deleted file mode 100644 index 2e8ed543a3..0000000000 --- a/vendor/gonum.org/v1/gonum/blas/gonum/level1float64.go +++ /dev/null @@ -1,620 +0,0 @@ -// Copyright ©2015 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import ( - "math" - - "gonum.org/v1/gonum/blas" - "gonum.org/v1/gonum/internal/asm/f64" -) - -var _ blas.Float64Level1 = Implementation{} - -// Dnrm2 computes the Euclidean norm of a vector, -// sqrt(\sum_i x[i] * x[i]). -// This function returns 0 if incX is negative. -func (Implementation) Dnrm2(n int, x []float64, incX int) float64 { - if incX < 1 { - if incX == 0 { - panic(zeroIncX) - } - return 0 - } - if len(x) <= (n-1)*incX { - panic(shortX) - } - if n < 2 { - if n == 1 { - return math.Abs(x[0]) - } - if n == 0 { - return 0 - } - panic(nLT0) - } - var ( - scale float64 = 0 - sumSquares float64 = 1 - ) - if incX == 1 { - x = x[:n] - for _, v := range x { - if v == 0 { - continue - } - absxi := math.Abs(v) - if math.IsNaN(absxi) { - return math.NaN() - } - if scale < absxi { - sumSquares = 1 + sumSquares*(scale/absxi)*(scale/absxi) - scale = absxi - } else { - sumSquares = sumSquares + (absxi/scale)*(absxi/scale) - } - } - if math.IsInf(scale, 1) { - return math.Inf(1) - } - return scale * math.Sqrt(sumSquares) - } - for ix := 0; ix < n*incX; ix += incX { - val := x[ix] - if val == 0 { - continue - } - absxi := math.Abs(val) - if math.IsNaN(absxi) { - return math.NaN() - } - if scale < absxi { - sumSquares = 1 + sumSquares*(scale/absxi)*(scale/absxi) - scale = absxi - } else { - sumSquares = sumSquares + (absxi/scale)*(absxi/scale) - } - } - if math.IsInf(scale, 1) { - return math.Inf(1) - } - return scale * math.Sqrt(sumSquares) -} - -// Dasum computes the sum of the absolute values of the elements of x. -// \sum_i |x[i]| -// Dasum returns 0 if incX is negative. -func (Implementation) Dasum(n int, x []float64, incX int) float64 { - var sum float64 - if n < 0 { - panic(nLT0) - } - if incX < 1 { - if incX == 0 { - panic(zeroIncX) - } - return 0 - } - if len(x) <= (n-1)*incX { - panic(shortX) - } - if incX == 1 { - x = x[:n] - for _, v := range x { - sum += math.Abs(v) - } - return sum - } - for i := 0; i < n; i++ { - sum += math.Abs(x[i*incX]) - } - return sum -} - -// Idamax returns the index of an element of x with the largest absolute value. -// If there are multiple such indices the earliest is returned. -// Idamax returns -1 if n == 0. -func (Implementation) Idamax(n int, x []float64, incX int) int { - if incX < 1 { - if incX == 0 { - panic(zeroIncX) - } - return -1 - } - if len(x) <= (n-1)*incX { - panic(shortX) - } - if n < 2 { - if n == 1 { - return 0 - } - if n == 0 { - return -1 // Netlib returns invalid index when n == 0. - } - panic(nLT0) - } - idx := 0 - max := math.Abs(x[0]) - if incX == 1 { - for i, v := range x[:n] { - absV := math.Abs(v) - if absV > max { - max = absV - idx = i - } - } - return idx - } - ix := incX - for i := 1; i < n; i++ { - v := x[ix] - absV := math.Abs(v) - if absV > max { - max = absV - idx = i - } - ix += incX - } - return idx -} - -// Dswap exchanges the elements of two vectors. -// x[i], y[i] = y[i], x[i] for all i -func (Implementation) Dswap(n int, x []float64, incX int, y []float64, incY int) { - if incX == 0 { - panic(zeroIncX) - } - if incY == 0 { - panic(zeroIncY) - } - if n < 1 { - if n == 0 { - return - } - panic(nLT0) - } - if (incX > 0 && len(x) <= (n-1)*incX) || (incX < 0 && len(x) <= (1-n)*incX) { - panic(shortX) - } - if (incY > 0 && len(y) <= (n-1)*incY) || (incY < 0 && len(y) <= (1-n)*incY) { - panic(shortY) - } - if incX == 1 && incY == 1 { - x = x[:n] - for i, v := range x { - x[i], y[i] = y[i], v - } - return - } - var ix, iy int - if incX < 0 { - ix = (-n + 1) * incX - } - if incY < 0 { - iy = (-n + 1) * incY - } - for i := 0; i < n; i++ { - x[ix], y[iy] = y[iy], x[ix] - ix += incX - iy += incY - } -} - -// Dcopy copies the elements of x into the elements of y. -// y[i] = x[i] for all i -func (Implementation) Dcopy(n int, x []float64, incX int, y []float64, incY int) { - if incX == 0 { - panic(zeroIncX) - } - if incY == 0 { - panic(zeroIncY) - } - if n < 1 { - if n == 0 { - return - } - panic(nLT0) - } - if (incX > 0 && len(x) <= (n-1)*incX) || (incX < 0 && len(x) <= (1-n)*incX) { - panic(shortX) - } - if (incY > 0 && len(y) <= (n-1)*incY) || (incY < 0 && len(y) <= (1-n)*incY) { - panic(shortY) - } - if incX == 1 && incY == 1 { - copy(y[:n], x[:n]) - return - } - var ix, iy int - if incX < 0 { - ix = (-n + 1) * incX - } - if incY < 0 { - iy = (-n + 1) * incY - } - for i := 0; i < n; i++ { - y[iy] = x[ix] - ix += incX - iy += incY - } -} - -// Daxpy adds alpha times x to y -// y[i] += alpha * x[i] for all i -func (Implementation) Daxpy(n int, alpha float64, x []float64, incX int, y []float64, incY int) { - if incX == 0 { - panic(zeroIncX) - } - if incY == 0 { - panic(zeroIncY) - } - if n < 1 { - if n == 0 { - return - } - panic(nLT0) - } - if (incX > 0 && len(x) <= (n-1)*incX) || (incX < 0 && len(x) <= (1-n)*incX) { - panic(shortX) - } - if (incY > 0 && len(y) <= (n-1)*incY) || (incY < 0 && len(y) <= (1-n)*incY) { - panic(shortY) - } - if alpha == 0 { - return - } - if incX == 1 && incY == 1 { - f64.AxpyUnitary(alpha, x[:n], y[:n]) - return - } - var ix, iy int - if incX < 0 { - ix = (-n + 1) * incX - } - if incY < 0 { - iy = (-n + 1) * incY - } - f64.AxpyInc(alpha, x, y, uintptr(n), uintptr(incX), uintptr(incY), uintptr(ix), uintptr(iy)) -} - -// Drotg computes the plane rotation -// _ _ _ _ _ _ -// | c s | | a | | r | -// | -s c | * | b | = | 0 | -// ‾ ‾ ‾ ‾ ‾ ‾ -// where -// r = ±√(a^2 + b^2) -// c = a/r, the cosine of the plane rotation -// s = b/r, the sine of the plane rotation -// -// NOTE: There is a discrepancy between the reference implementation and the BLAS -// technical manual regarding the sign for r when a or b are zero. -// Drotg agrees with the definition in the manual and other -// common BLAS implementations. -func (Implementation) Drotg(a, b float64) (c, s, r, z float64) { - if b == 0 && a == 0 { - return 1, 0, a, 0 - } - absA := math.Abs(a) - absB := math.Abs(b) - aGTb := absA > absB - r = math.Hypot(a, b) - if aGTb { - r = math.Copysign(r, a) - } else { - r = math.Copysign(r, b) - } - c = a / r - s = b / r - if aGTb { - z = s - } else if c != 0 { // r == 0 case handled above - z = 1 / c - } else { - z = 1 - } - return -} - -// Drotmg computes the modified Givens rotation. See -// http://www.netlib.org/lapack/explore-html/df/deb/drotmg_8f.html -// for more details. -func (Implementation) Drotmg(d1, d2, x1, y1 float64) (p blas.DrotmParams, rd1, rd2, rx1 float64) { - // The implementation of Drotmg used here is taken from Hopkins 1997 - // Appendix A: https://doi.org/10.1145/289251.289253 - // with the exception of the gam constants below. - - const ( - gam = 4096.0 - gamsq = gam * gam - rgamsq = 1.0 / gamsq - ) - - if d1 < 0 { - p.Flag = blas.Rescaling // Error state. - return p, 0, 0, 0 - } - - if d2 == 0 || y1 == 0 { - p.Flag = blas.Identity - return p, d1, d2, x1 - } - - var h11, h12, h21, h22 float64 - if (d1 == 0 || x1 == 0) && d2 > 0 { - p.Flag = blas.Diagonal - h12 = 1 - h21 = -1 - x1 = y1 - d1, d2 = d2, d1 - } else { - p2 := d2 * y1 - p1 := d1 * x1 - q2 := p2 * y1 - q1 := p1 * x1 - if math.Abs(q1) > math.Abs(q2) { - p.Flag = blas.OffDiagonal - h11 = 1 - h22 = 1 - h21 = -y1 / x1 - h12 = p2 / p1 - u := 1 - h12*h21 - if u <= 0 { - p.Flag = blas.Rescaling // Error state. - return p, 0, 0, 0 - } - - d1 /= u - d2 /= u - x1 *= u - } else { - if q2 < 0 { - p.Flag = blas.Rescaling // Error state. - return p, 0, 0, 0 - } - - p.Flag = blas.Diagonal - h21 = -1 - h12 = 1 - h11 = p1 / p2 - h22 = x1 / y1 - u := 1 + h11*h22 - d1, d2 = d2/u, d1/u - x1 = y1 * u - } - } - - for d1 <= rgamsq && d1 != 0 { - p.Flag = blas.Rescaling - d1 = (d1 * gam) * gam - x1 /= gam - h11 /= gam - h12 /= gam - } - for d1 > gamsq { - p.Flag = blas.Rescaling - d1 = (d1 / gam) / gam - x1 *= gam - h11 *= gam - h12 *= gam - } - - for math.Abs(d2) <= rgamsq && d2 != 0 { - p.Flag = blas.Rescaling - d2 = (d2 * gam) * gam - h21 /= gam - h22 /= gam - } - for math.Abs(d2) > gamsq { - p.Flag = blas.Rescaling - d2 = (d2 / gam) / gam - h21 *= gam - h22 *= gam - } - - switch p.Flag { - case blas.Diagonal: - p.H = [4]float64{0: h11, 3: h22} - case blas.OffDiagonal: - p.H = [4]float64{1: h21, 2: h12} - case blas.Rescaling: - p.H = [4]float64{h11, h21, h12, h22} - default: - panic(badFlag) - } - - return p, d1, d2, x1 -} - -// Drot applies a plane transformation. -// x[i] = c * x[i] + s * y[i] -// y[i] = c * y[i] - s * x[i] -func (Implementation) Drot(n int, x []float64, incX int, y []float64, incY int, c float64, s float64) { - if incX == 0 { - panic(zeroIncX) - } - if incY == 0 { - panic(zeroIncY) - } - if n < 1 { - if n == 0 { - return - } - panic(nLT0) - } - if (incX > 0 && len(x) <= (n-1)*incX) || (incX < 0 && len(x) <= (1-n)*incX) { - panic(shortX) - } - if (incY > 0 && len(y) <= (n-1)*incY) || (incY < 0 && len(y) <= (1-n)*incY) { - panic(shortY) - } - if incX == 1 && incY == 1 { - x = x[:n] - for i, vx := range x { - vy := y[i] - x[i], y[i] = c*vx+s*vy, c*vy-s*vx - } - return - } - var ix, iy int - if incX < 0 { - ix = (-n + 1) * incX - } - if incY < 0 { - iy = (-n + 1) * incY - } - for i := 0; i < n; i++ { - vx := x[ix] - vy := y[iy] - x[ix], y[iy] = c*vx+s*vy, c*vy-s*vx - ix += incX - iy += incY - } -} - -// Drotm applies the modified Givens rotation to the 2×n matrix. -func (Implementation) Drotm(n int, x []float64, incX int, y []float64, incY int, p blas.DrotmParams) { - if incX == 0 { - panic(zeroIncX) - } - if incY == 0 { - panic(zeroIncY) - } - if n <= 0 { - if n == 0 { - return - } - panic(nLT0) - } - if (incX > 0 && len(x) <= (n-1)*incX) || (incX < 0 && len(x) <= (1-n)*incX) { - panic(shortX) - } - if (incY > 0 && len(y) <= (n-1)*incY) || (incY < 0 && len(y) <= (1-n)*incY) { - panic(shortY) - } - - if p.Flag == blas.Identity { - return - } - - switch p.Flag { - case blas.Rescaling: - h11 := p.H[0] - h12 := p.H[2] - h21 := p.H[1] - h22 := p.H[3] - if incX == 1 && incY == 1 { - x = x[:n] - for i, vx := range x { - vy := y[i] - x[i], y[i] = vx*h11+vy*h12, vx*h21+vy*h22 - } - return - } - var ix, iy int - if incX < 0 { - ix = (-n + 1) * incX - } - if incY < 0 { - iy = (-n + 1) * incY - } - for i := 0; i < n; i++ { - vx := x[ix] - vy := y[iy] - x[ix], y[iy] = vx*h11+vy*h12, vx*h21+vy*h22 - ix += incX - iy += incY - } - case blas.OffDiagonal: - h12 := p.H[2] - h21 := p.H[1] - if incX == 1 && incY == 1 { - x = x[:n] - for i, vx := range x { - vy := y[i] - x[i], y[i] = vx+vy*h12, vx*h21+vy - } - return - } - var ix, iy int - if incX < 0 { - ix = (-n + 1) * incX - } - if incY < 0 { - iy = (-n + 1) * incY - } - for i := 0; i < n; i++ { - vx := x[ix] - vy := y[iy] - x[ix], y[iy] = vx+vy*h12, vx*h21+vy - ix += incX - iy += incY - } - case blas.Diagonal: - h11 := p.H[0] - h22 := p.H[3] - if incX == 1 && incY == 1 { - x = x[:n] - for i, vx := range x { - vy := y[i] - x[i], y[i] = vx*h11+vy, -vx+vy*h22 - } - return - } - var ix, iy int - if incX < 0 { - ix = (-n + 1) * incX - } - if incY < 0 { - iy = (-n + 1) * incY - } - for i := 0; i < n; i++ { - vx := x[ix] - vy := y[iy] - x[ix], y[iy] = vx*h11+vy, -vx+vy*h22 - ix += incX - iy += incY - } - } -} - -// Dscal scales x by alpha. -// x[i] *= alpha -// Dscal has no effect if incX < 0. -func (Implementation) Dscal(n int, alpha float64, x []float64, incX int) { - if incX < 1 { - if incX == 0 { - panic(zeroIncX) - } - return - } - if n < 1 { - if n == 0 { - return - } - panic(nLT0) - } - if (n-1)*incX >= len(x) { - panic(shortX) - } - if alpha == 0 { - if incX == 1 { - x = x[:n] - for i := range x { - x[i] = 0 - } - return - } - for ix := 0; ix < n*incX; ix += incX { - x[ix] = 0 - } - return - } - if incX == 1 { - f64.ScalUnitary(alpha, x[:n]) - return - } - f64.ScalInc(alpha, x, uintptr(n), uintptr(incX)) -} diff --git a/vendor/gonum.org/v1/gonum/blas/gonum/level1float64_ddot.go b/vendor/gonum.org/v1/gonum/blas/gonum/level1float64_ddot.go deleted file mode 100644 index be87ba13db..0000000000 --- a/vendor/gonum.org/v1/gonum/blas/gonum/level1float64_ddot.go +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright ©2015 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import ( - "gonum.org/v1/gonum/internal/asm/f64" -) - -// Ddot computes the dot product of the two vectors -// \sum_i x[i]*y[i] -func (Implementation) Ddot(n int, x []float64, incX int, y []float64, incY int) float64 { - if incX == 0 { - panic(zeroIncX) - } - if incY == 0 { - panic(zeroIncY) - } - if n <= 0 { - if n == 0 { - return 0 - } - panic(nLT0) - } - if incX == 1 && incY == 1 { - if len(x) < n { - panic(shortX) - } - if len(y) < n { - panic(shortY) - } - return f64.DotUnitary(x[:n], y[:n]) - } - var ix, iy int - if incX < 0 { - ix = (-n + 1) * incX - } - if incY < 0 { - iy = (-n + 1) * incY - } - if ix >= len(x) || ix+(n-1)*incX >= len(x) { - panic(shortX) - } - if iy >= len(y) || iy+(n-1)*incY >= len(y) { - panic(shortY) - } - return f64.DotInc(x, y, uintptr(n), uintptr(incX), uintptr(incY), uintptr(ix), uintptr(iy)) -} diff --git a/vendor/gonum.org/v1/gonum/blas/gonum/level2cmplx128.go b/vendor/gonum.org/v1/gonum/blas/gonum/level2cmplx128.go deleted file mode 100644 index 03ee328fdb..0000000000 --- a/vendor/gonum.org/v1/gonum/blas/gonum/level2cmplx128.go +++ /dev/null @@ -1,2906 +0,0 @@ -// Copyright ©2017 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import ( - "math/cmplx" - - "gonum.org/v1/gonum/blas" - "gonum.org/v1/gonum/internal/asm/c128" -) - -var _ blas.Complex128Level2 = Implementation{} - -// Zgbmv performs one of the matrix-vector operations -// y = alpha * A * x + beta * y if trans = blas.NoTrans -// y = alpha * A^T * x + beta * y if trans = blas.Trans -// y = alpha * A^H * x + beta * y if trans = blas.ConjTrans -// where alpha and beta are scalars, x and y are vectors, and A is an m×n band matrix -// with kL sub-diagonals and kU super-diagonals. -func (Implementation) Zgbmv(trans blas.Transpose, m, n, kL, kU int, alpha complex128, a []complex128, lda int, x []complex128, incX int, beta complex128, y []complex128, incY int) { - switch trans { - default: - panic(badTranspose) - case blas.NoTrans, blas.Trans, blas.ConjTrans: - } - if m < 0 { - panic(mLT0) - } - if n < 0 { - panic(nLT0) - } - if kL < 0 { - panic(kLLT0) - } - if kU < 0 { - panic(kULT0) - } - if lda < kL+kU+1 { - panic(badLdA) - } - if incX == 0 { - panic(zeroIncX) - } - if incY == 0 { - panic(zeroIncY) - } - - // Quick return if possible. - if m == 0 || n == 0 { - return - } - - // For zero matrix size the following slice length checks are trivially satisfied. - if len(a) < lda*(min(m, n+kL)-1)+kL+kU+1 { - panic(shortA) - } - var lenX, lenY int - if trans == blas.NoTrans { - lenX, lenY = n, m - } else { - lenX, lenY = m, n - } - if (incX > 0 && len(x) <= (lenX-1)*incX) || (incX < 0 && len(x) <= (1-lenX)*incX) { - panic(shortX) - } - if (incY > 0 && len(y) <= (lenY-1)*incY) || (incY < 0 && len(y) <= (1-lenY)*incY) { - panic(shortY) - } - - // Quick return if possible. - if alpha == 0 && beta == 1 { - return - } - - var kx int - if incX < 0 { - kx = (1 - lenX) * incX - } - var ky int - if incY < 0 { - ky = (1 - lenY) * incY - } - - // Form y = beta*y. - if beta != 1 { - if incY == 1 { - if beta == 0 { - for i := range y[:lenY] { - y[i] = 0 - } - } else { - c128.ScalUnitary(beta, y[:lenY]) - } - } else { - iy := ky - if beta == 0 { - for i := 0; i < lenY; i++ { - y[iy] = 0 - iy += incY - } - } else { - if incY > 0 { - c128.ScalInc(beta, y, uintptr(lenY), uintptr(incY)) - } else { - c128.ScalInc(beta, y, uintptr(lenY), uintptr(-incY)) - } - } - } - } - - nRow := min(m, n+kL) - nCol := kL + 1 + kU - switch trans { - case blas.NoTrans: - iy := ky - if incX == 1 { - for i := 0; i < nRow; i++ { - l := max(0, kL-i) - u := min(nCol, n+kL-i) - aRow := a[i*lda+l : i*lda+u] - off := max(0, i-kL) - xtmp := x[off : off+u-l] - var sum complex128 - for j, v := range aRow { - sum += xtmp[j] * v - } - y[iy] += alpha * sum - iy += incY - } - } else { - for i := 0; i < nRow; i++ { - l := max(0, kL-i) - u := min(nCol, n+kL-i) - aRow := a[i*lda+l : i*lda+u] - off := max(0, i-kL) * incX - jx := kx - var sum complex128 - for _, v := range aRow { - sum += x[off+jx] * v - jx += incX - } - y[iy] += alpha * sum - iy += incY - } - } - case blas.Trans: - if incX == 1 { - for i := 0; i < nRow; i++ { - l := max(0, kL-i) - u := min(nCol, n+kL-i) - aRow := a[i*lda+l : i*lda+u] - off := max(0, i-kL) * incY - alphaxi := alpha * x[i] - jy := ky - for _, v := range aRow { - y[off+jy] += alphaxi * v - jy += incY - } - } - } else { - ix := kx - for i := 0; i < nRow; i++ { - l := max(0, kL-i) - u := min(nCol, n+kL-i) - aRow := a[i*lda+l : i*lda+u] - off := max(0, i-kL) * incY - alphaxi := alpha * x[ix] - jy := ky - for _, v := range aRow { - y[off+jy] += alphaxi * v - jy += incY - } - ix += incX - } - } - case blas.ConjTrans: - if incX == 1 { - for i := 0; i < nRow; i++ { - l := max(0, kL-i) - u := min(nCol, n+kL-i) - aRow := a[i*lda+l : i*lda+u] - off := max(0, i-kL) * incY - alphaxi := alpha * x[i] - jy := ky - for _, v := range aRow { - y[off+jy] += alphaxi * cmplx.Conj(v) - jy += incY - } - } - } else { - ix := kx - for i := 0; i < nRow; i++ { - l := max(0, kL-i) - u := min(nCol, n+kL-i) - aRow := a[i*lda+l : i*lda+u] - off := max(0, i-kL) * incY - alphaxi := alpha * x[ix] - jy := ky - for _, v := range aRow { - y[off+jy] += alphaxi * cmplx.Conj(v) - jy += incY - } - ix += incX - } - } - } -} - -// Zgemv performs one of the matrix-vector operations -// y = alpha * A * x + beta * y if trans = blas.NoTrans -// y = alpha * A^T * x + beta * y if trans = blas.Trans -// y = alpha * A^H * x + beta * y if trans = blas.ConjTrans -// where alpha and beta are scalars, x and y are vectors, and A is an m×n dense matrix. -func (Implementation) Zgemv(trans blas.Transpose, m, n int, alpha complex128, a []complex128, lda int, x []complex128, incX int, beta complex128, y []complex128, incY int) { - switch trans { - default: - panic(badTranspose) - case blas.NoTrans, blas.Trans, blas.ConjTrans: - } - if m < 0 { - panic(mLT0) - } - if n < 0 { - panic(nLT0) - } - if lda < max(1, n) { - panic(badLdA) - } - if incX == 0 { - panic(zeroIncX) - } - if incY == 0 { - panic(zeroIncY) - } - - // Quick return if possible. - if m == 0 || n == 0 { - return - } - - // For zero matrix size the following slice length checks are trivially satisfied. - var lenX, lenY int - if trans == blas.NoTrans { - lenX = n - lenY = m - } else { - lenX = m - lenY = n - } - if len(a) < lda*(m-1)+n { - panic(shortA) - } - if (incX > 0 && len(x) <= (lenX-1)*incX) || (incX < 0 && len(x) <= (1-lenX)*incX) { - panic(shortX) - } - if (incY > 0 && len(y) <= (lenY-1)*incY) || (incY < 0 && len(y) <= (1-lenY)*incY) { - panic(shortY) - } - - // Quick return if possible. - if alpha == 0 && beta == 1 { - return - } - - var kx int - if incX < 0 { - kx = (1 - lenX) * incX - } - var ky int - if incY < 0 { - ky = (1 - lenY) * incY - } - - // Form y = beta*y. - if beta != 1 { - if incY == 1 { - if beta == 0 { - for i := range y[:lenY] { - y[i] = 0 - } - } else { - c128.ScalUnitary(beta, y[:lenY]) - } - } else { - iy := ky - if beta == 0 { - for i := 0; i < lenY; i++ { - y[iy] = 0 - iy += incY - } - } else { - if incY > 0 { - c128.ScalInc(beta, y, uintptr(lenY), uintptr(incY)) - } else { - c128.ScalInc(beta, y, uintptr(lenY), uintptr(-incY)) - } - } - } - } - - if alpha == 0 { - return - } - - switch trans { - default: - // Form y = alpha*A*x + y. - iy := ky - if incX == 1 { - for i := 0; i < m; i++ { - y[iy] += alpha * c128.DotuUnitary(a[i*lda:i*lda+n], x[:n]) - iy += incY - } - return - } - for i := 0; i < m; i++ { - y[iy] += alpha * c128.DotuInc(a[i*lda:i*lda+n], x, uintptr(n), 1, uintptr(incX), 0, uintptr(kx)) - iy += incY - } - return - - case blas.Trans: - // Form y = alpha*A^T*x + y. - ix := kx - if incY == 1 { - for i := 0; i < m; i++ { - c128.AxpyUnitary(alpha*x[ix], a[i*lda:i*lda+n], y[:n]) - ix += incX - } - return - } - for i := 0; i < m; i++ { - c128.AxpyInc(alpha*x[ix], a[i*lda:i*lda+n], y, uintptr(n), 1, uintptr(incY), 0, uintptr(ky)) - ix += incX - } - return - - case blas.ConjTrans: - // Form y = alpha*A^H*x + y. - ix := kx - if incY == 1 { - for i := 0; i < m; i++ { - tmp := alpha * x[ix] - for j := 0; j < n; j++ { - y[j] += tmp * cmplx.Conj(a[i*lda+j]) - } - ix += incX - } - return - } - for i := 0; i < m; i++ { - tmp := alpha * x[ix] - jy := ky - for j := 0; j < n; j++ { - y[jy] += tmp * cmplx.Conj(a[i*lda+j]) - jy += incY - } - ix += incX - } - return - } -} - -// Zgerc performs the rank-one operation -// A += alpha * x * y^H -// where A is an m×n dense matrix, alpha is a scalar, x is an m element vector, -// and y is an n element vector. -func (Implementation) Zgerc(m, n int, alpha complex128, x []complex128, incX int, y []complex128, incY int, a []complex128, lda int) { - if m < 0 { - panic(mLT0) - } - if n < 0 { - panic(nLT0) - } - if lda < max(1, n) { - panic(badLdA) - } - if incX == 0 { - panic(zeroIncX) - } - if incY == 0 { - panic(zeroIncY) - } - - // Quick return if possible. - if m == 0 || n == 0 { - return - } - - // For zero matrix size the following slice length checks are trivially satisfied. - if (incX > 0 && len(x) <= (m-1)*incX) || (incX < 0 && len(x) <= (1-m)*incX) { - panic(shortX) - } - if (incY > 0 && len(y) <= (n-1)*incY) || (incY < 0 && len(y) <= (1-n)*incY) { - panic(shortY) - } - if len(a) < lda*(m-1)+n { - panic(shortA) - } - - // Quick return if possible. - if alpha == 0 { - return - } - - var kx, jy int - if incX < 0 { - kx = (1 - m) * incX - } - if incY < 0 { - jy = (1 - n) * incY - } - for j := 0; j < n; j++ { - if y[jy] != 0 { - tmp := alpha * cmplx.Conj(y[jy]) - c128.AxpyInc(tmp, x, a[j:], uintptr(m), uintptr(incX), uintptr(lda), uintptr(kx), 0) - } - jy += incY - } -} - -// Zgeru performs the rank-one operation -// A += alpha * x * y^T -// where A is an m×n dense matrix, alpha is a scalar, x is an m element vector, -// and y is an n element vector. -func (Implementation) Zgeru(m, n int, alpha complex128, x []complex128, incX int, y []complex128, incY int, a []complex128, lda int) { - if m < 0 { - panic(mLT0) - } - if n < 0 { - panic(nLT0) - } - if lda < max(1, n) { - panic(badLdA) - } - if incX == 0 { - panic(zeroIncX) - } - if incY == 0 { - panic(zeroIncY) - } - - // Quick return if possible. - if m == 0 || n == 0 { - return - } - - // For zero matrix size the following slice length checks are trivially satisfied. - if (incX > 0 && len(x) <= (m-1)*incX) || (incX < 0 && len(x) <= (1-m)*incX) { - panic(shortX) - } - if (incY > 0 && len(y) <= (n-1)*incY) || (incY < 0 && len(y) <= (1-n)*incY) { - panic(shortY) - } - if len(a) < lda*(m-1)+n { - panic(shortA) - } - - // Quick return if possible. - if alpha == 0 { - return - } - - var kx int - if incX < 0 { - kx = (1 - m) * incX - } - if incY == 1 { - for i := 0; i < m; i++ { - if x[kx] != 0 { - tmp := alpha * x[kx] - c128.AxpyUnitary(tmp, y[:n], a[i*lda:i*lda+n]) - } - kx += incX - } - return - } - var jy int - if incY < 0 { - jy = (1 - n) * incY - } - for i := 0; i < m; i++ { - if x[kx] != 0 { - tmp := alpha * x[kx] - c128.AxpyInc(tmp, y, a[i*lda:i*lda+n], uintptr(n), uintptr(incY), 1, uintptr(jy), 0) - } - kx += incX - } -} - -// Zhbmv performs the matrix-vector operation -// y = alpha * A * x + beta * y -// where alpha and beta are scalars, x and y are vectors, and A is an n×n -// Hermitian band matrix with k super-diagonals. The imaginary parts of -// the diagonal elements of A are ignored and assumed to be zero. -func (Implementation) Zhbmv(uplo blas.Uplo, n, k int, alpha complex128, a []complex128, lda int, x []complex128, incX int, beta complex128, y []complex128, incY int) { - switch uplo { - default: - panic(badUplo) - case blas.Upper, blas.Lower: - } - if n < 0 { - panic(nLT0) - } - if k < 0 { - panic(kLT0) - } - if lda < k+1 { - panic(badLdA) - } - if incX == 0 { - panic(zeroIncX) - } - if incY == 0 { - panic(zeroIncY) - } - - // Quick return if possible. - if n == 0 { - return - } - - // For zero matrix size the following slice length checks are trivially satisfied. - if len(a) < lda*(n-1)+k+1 { - panic(shortA) - } - if (incX > 0 && len(x) <= (n-1)*incX) || (incX < 0 && len(x) <= (1-n)*incX) { - panic(shortX) - } - if (incY > 0 && len(y) <= (n-1)*incY) || (incY < 0 && len(y) <= (1-n)*incY) { - panic(shortY) - } - - // Quick return if possible. - if alpha == 0 && beta == 1 { - return - } - - // Set up the start indices in X and Y. - var kx int - if incX < 0 { - kx = (1 - n) * incX - } - var ky int - if incY < 0 { - ky = (1 - n) * incY - } - - // Form y = beta*y. - if beta != 1 { - if incY == 1 { - if beta == 0 { - for i := range y[:n] { - y[i] = 0 - } - } else { - for i, v := range y[:n] { - y[i] = beta * v - } - } - } else { - iy := ky - if beta == 0 { - for i := 0; i < n; i++ { - y[iy] = 0 - iy += incY - } - } else { - for i := 0; i < n; i++ { - y[iy] = beta * y[iy] - iy += incY - } - } - } - } - - if alpha == 0 { - return - } - - // The elements of A are accessed sequentially with one pass through a. - switch uplo { - case blas.Upper: - iy := ky - if incX == 1 { - for i := 0; i < n; i++ { - aRow := a[i*lda:] - alphaxi := alpha * x[i] - sum := alphaxi * complex(real(aRow[0]), 0) - u := min(k+1, n-i) - jy := incY - for j := 1; j < u; j++ { - v := aRow[j] - sum += alpha * x[i+j] * v - y[iy+jy] += alphaxi * cmplx.Conj(v) - jy += incY - } - y[iy] += sum - iy += incY - } - } else { - ix := kx - for i := 0; i < n; i++ { - aRow := a[i*lda:] - alphaxi := alpha * x[ix] - sum := alphaxi * complex(real(aRow[0]), 0) - u := min(k+1, n-i) - jx := incX - jy := incY - for j := 1; j < u; j++ { - v := aRow[j] - sum += alpha * x[ix+jx] * v - y[iy+jy] += alphaxi * cmplx.Conj(v) - jx += incX - jy += incY - } - y[iy] += sum - ix += incX - iy += incY - } - } - case blas.Lower: - iy := ky - if incX == 1 { - for i := 0; i < n; i++ { - l := max(0, k-i) - alphaxi := alpha * x[i] - jy := l * incY - aRow := a[i*lda:] - for j := l; j < k; j++ { - v := aRow[j] - y[iy] += alpha * v * x[i-k+j] - y[iy-k*incY+jy] += alphaxi * cmplx.Conj(v) - jy += incY - } - y[iy] += alphaxi * complex(real(aRow[k]), 0) - iy += incY - } - } else { - ix := kx - for i := 0; i < n; i++ { - l := max(0, k-i) - alphaxi := alpha * x[ix] - jx := l * incX - jy := l * incY - aRow := a[i*lda:] - for j := l; j < k; j++ { - v := aRow[j] - y[iy] += alpha * v * x[ix-k*incX+jx] - y[iy-k*incY+jy] += alphaxi * cmplx.Conj(v) - jx += incX - jy += incY - } - y[iy] += alphaxi * complex(real(aRow[k]), 0) - ix += incX - iy += incY - } - } - } -} - -// Zhemv performs the matrix-vector operation -// y = alpha * A * x + beta * y -// where alpha and beta are scalars, x and y are vectors, and A is an n×n -// Hermitian matrix. The imaginary parts of the diagonal elements of A are -// ignored and assumed to be zero. -func (Implementation) Zhemv(uplo blas.Uplo, n int, alpha complex128, a []complex128, lda int, x []complex128, incX int, beta complex128, y []complex128, incY int) { - switch uplo { - default: - panic(badUplo) - case blas.Upper, blas.Lower: - } - if n < 0 { - panic(nLT0) - } - if lda < max(1, n) { - panic(badLdA) - } - if incX == 0 { - panic(zeroIncX) - } - if incY == 0 { - panic(zeroIncY) - } - - // Quick return if possible. - if n == 0 { - return - } - - // For zero matrix size the following slice length checks are trivially satisfied. - if len(a) < lda*(n-1)+n { - panic(shortA) - } - if (incX > 0 && len(x) <= (n-1)*incX) || (incX < 0 && len(x) <= (1-n)*incX) { - panic(shortX) - } - if (incY > 0 && len(y) <= (n-1)*incY) || (incY < 0 && len(y) <= (1-n)*incY) { - panic(shortY) - } - - // Quick return if possible. - if alpha == 0 && beta == 1 { - return - } - - // Set up the start indices in X and Y. - var kx int - if incX < 0 { - kx = (1 - n) * incX - } - var ky int - if incY < 0 { - ky = (1 - n) * incY - } - - // Form y = beta*y. - if beta != 1 { - if incY == 1 { - if beta == 0 { - for i := range y[:n] { - y[i] = 0 - } - } else { - for i, v := range y[:n] { - y[i] = beta * v - } - } - } else { - iy := ky - if beta == 0 { - for i := 0; i < n; i++ { - y[iy] = 0 - iy += incY - } - } else { - for i := 0; i < n; i++ { - y[iy] = beta * y[iy] - iy += incY - } - } - } - } - - if alpha == 0 { - return - } - - // The elements of A are accessed sequentially with one pass through - // the triangular part of A. - - if uplo == blas.Upper { - // Form y when A is stored in upper triangle. - if incX == 1 && incY == 1 { - for i := 0; i < n; i++ { - tmp1 := alpha * x[i] - var tmp2 complex128 - for j := i + 1; j < n; j++ { - y[j] += tmp1 * cmplx.Conj(a[i*lda+j]) - tmp2 += a[i*lda+j] * x[j] - } - aii := complex(real(a[i*lda+i]), 0) - y[i] += tmp1*aii + alpha*tmp2 - } - } else { - ix := kx - iy := ky - for i := 0; i < n; i++ { - tmp1 := alpha * x[ix] - var tmp2 complex128 - jx := ix - jy := iy - for j := i + 1; j < n; j++ { - jx += incX - jy += incY - y[jy] += tmp1 * cmplx.Conj(a[i*lda+j]) - tmp2 += a[i*lda+j] * x[jx] - } - aii := complex(real(a[i*lda+i]), 0) - y[iy] += tmp1*aii + alpha*tmp2 - ix += incX - iy += incY - } - } - return - } - - // Form y when A is stored in lower triangle. - if incX == 1 && incY == 1 { - for i := 0; i < n; i++ { - tmp1 := alpha * x[i] - var tmp2 complex128 - for j := 0; j < i; j++ { - y[j] += tmp1 * cmplx.Conj(a[i*lda+j]) - tmp2 += a[i*lda+j] * x[j] - } - aii := complex(real(a[i*lda+i]), 0) - y[i] += tmp1*aii + alpha*tmp2 - } - } else { - ix := kx - iy := ky - for i := 0; i < n; i++ { - tmp1 := alpha * x[ix] - var tmp2 complex128 - jx := kx - jy := ky - for j := 0; j < i; j++ { - y[jy] += tmp1 * cmplx.Conj(a[i*lda+j]) - tmp2 += a[i*lda+j] * x[jx] - jx += incX - jy += incY - } - aii := complex(real(a[i*lda+i]), 0) - y[iy] += tmp1*aii + alpha*tmp2 - ix += incX - iy += incY - } - } -} - -// Zher performs the Hermitian rank-one operation -// A += alpha * x * x^H -// where A is an n×n Hermitian matrix, alpha is a real scalar, and x is an n -// element vector. On entry, the imaginary parts of the diagonal elements of A -// are ignored and assumed to be zero, on return they will be set to zero. -func (Implementation) Zher(uplo blas.Uplo, n int, alpha float64, x []complex128, incX int, a []complex128, lda int) { - switch uplo { - default: - panic(badUplo) - case blas.Upper, blas.Lower: - } - if n < 0 { - panic(nLT0) - } - if lda < max(1, n) { - panic(badLdA) - } - if incX == 0 { - panic(zeroIncX) - } - - // Quick return if possible. - if n == 0 { - return - } - - // For zero matrix size the following slice length checks are trivially satisfied. - if (incX > 0 && len(x) <= (n-1)*incX) || (incX < 0 && len(x) <= (1-n)*incX) { - panic(shortX) - } - if len(a) < lda*(n-1)+n { - panic(shortA) - } - - // Quick return if possible. - if alpha == 0 { - return - } - - var kx int - if incX < 0 { - kx = (1 - n) * incX - } - if uplo == blas.Upper { - if incX == 1 { - for i := 0; i < n; i++ { - if x[i] != 0 { - tmp := complex(alpha*real(x[i]), alpha*imag(x[i])) - aii := real(a[i*lda+i]) - xtmp := real(tmp * cmplx.Conj(x[i])) - a[i*lda+i] = complex(aii+xtmp, 0) - for j := i + 1; j < n; j++ { - a[i*lda+j] += tmp * cmplx.Conj(x[j]) - } - } else { - aii := real(a[i*lda+i]) - a[i*lda+i] = complex(aii, 0) - } - } - return - } - - ix := kx - for i := 0; i < n; i++ { - if x[ix] != 0 { - tmp := complex(alpha*real(x[ix]), alpha*imag(x[ix])) - aii := real(a[i*lda+i]) - xtmp := real(tmp * cmplx.Conj(x[ix])) - a[i*lda+i] = complex(aii+xtmp, 0) - jx := ix + incX - for j := i + 1; j < n; j++ { - a[i*lda+j] += tmp * cmplx.Conj(x[jx]) - jx += incX - } - } else { - aii := real(a[i*lda+i]) - a[i*lda+i] = complex(aii, 0) - } - ix += incX - } - return - } - - if incX == 1 { - for i := 0; i < n; i++ { - if x[i] != 0 { - tmp := complex(alpha*real(x[i]), alpha*imag(x[i])) - for j := 0; j < i; j++ { - a[i*lda+j] += tmp * cmplx.Conj(x[j]) - } - aii := real(a[i*lda+i]) - xtmp := real(tmp * cmplx.Conj(x[i])) - a[i*lda+i] = complex(aii+xtmp, 0) - } else { - aii := real(a[i*lda+i]) - a[i*lda+i] = complex(aii, 0) - } - } - return - } - - ix := kx - for i := 0; i < n; i++ { - if x[ix] != 0 { - tmp := complex(alpha*real(x[ix]), alpha*imag(x[ix])) - jx := kx - for j := 0; j < i; j++ { - a[i*lda+j] += tmp * cmplx.Conj(x[jx]) - jx += incX - } - aii := real(a[i*lda+i]) - xtmp := real(tmp * cmplx.Conj(x[ix])) - a[i*lda+i] = complex(aii+xtmp, 0) - - } else { - aii := real(a[i*lda+i]) - a[i*lda+i] = complex(aii, 0) - } - ix += incX - } -} - -// Zher2 performs the Hermitian rank-two operation -// A += alpha * x * y^H + conj(alpha) * y * x^H -// where alpha is a scalar, x and y are n element vectors and A is an n×n -// Hermitian matrix. On entry, the imaginary parts of the diagonal elements are -// ignored and assumed to be zero. On return they will be set to zero. -func (Implementation) Zher2(uplo blas.Uplo, n int, alpha complex128, x []complex128, incX int, y []complex128, incY int, a []complex128, lda int) { - switch uplo { - default: - panic(badUplo) - case blas.Upper, blas.Lower: - } - if n < 0 { - panic(nLT0) - } - if lda < max(1, n) { - panic(badLdA) - } - if incX == 0 { - panic(zeroIncX) - } - if incY == 0 { - panic(zeroIncY) - } - - // Quick return if possible. - if n == 0 { - return - } - - // For zero matrix size the following slice length checks are trivially satisfied. - if (incX > 0 && len(x) <= (n-1)*incX) || (incX < 0 && len(x) <= (1-n)*incX) { - panic(shortX) - } - if (incY > 0 && len(y) <= (n-1)*incY) || (incY < 0 && len(y) <= (1-n)*incY) { - panic(shortY) - } - if len(a) < lda*(n-1)+n { - panic(shortA) - } - - // Quick return if possible. - if alpha == 0 { - return - } - - var kx, ky int - var ix, iy int - if incX != 1 || incY != 1 { - if incX < 0 { - kx = (1 - n) * incX - } - if incY < 0 { - ky = (1 - n) * incY - } - ix = kx - iy = ky - } - if uplo == blas.Upper { - if incX == 1 && incY == 1 { - for i := 0; i < n; i++ { - if x[i] != 0 || y[i] != 0 { - tmp1 := alpha * x[i] - tmp2 := cmplx.Conj(alpha) * y[i] - aii := real(a[i*lda+i]) + real(tmp1*cmplx.Conj(y[i])) + real(tmp2*cmplx.Conj(x[i])) - a[i*lda+i] = complex(aii, 0) - for j := i + 1; j < n; j++ { - a[i*lda+j] += tmp1*cmplx.Conj(y[j]) + tmp2*cmplx.Conj(x[j]) - } - } else { - aii := real(a[i*lda+i]) - a[i*lda+i] = complex(aii, 0) - } - } - return - } - for i := 0; i < n; i++ { - if x[ix] != 0 || y[iy] != 0 { - tmp1 := alpha * x[ix] - tmp2 := cmplx.Conj(alpha) * y[iy] - aii := real(a[i*lda+i]) + real(tmp1*cmplx.Conj(y[iy])) + real(tmp2*cmplx.Conj(x[ix])) - a[i*lda+i] = complex(aii, 0) - jx := ix + incX - jy := iy + incY - for j := i + 1; j < n; j++ { - a[i*lda+j] += tmp1*cmplx.Conj(y[jy]) + tmp2*cmplx.Conj(x[jx]) - jx += incX - jy += incY - } - } else { - aii := real(a[i*lda+i]) - a[i*lda+i] = complex(aii, 0) - } - ix += incX - iy += incY - } - return - } - - if incX == 1 && incY == 1 { - for i := 0; i < n; i++ { - if x[i] != 0 || y[i] != 0 { - tmp1 := alpha * x[i] - tmp2 := cmplx.Conj(alpha) * y[i] - for j := 0; j < i; j++ { - a[i*lda+j] += tmp1*cmplx.Conj(y[j]) + tmp2*cmplx.Conj(x[j]) - } - aii := real(a[i*lda+i]) + real(tmp1*cmplx.Conj(y[i])) + real(tmp2*cmplx.Conj(x[i])) - a[i*lda+i] = complex(aii, 0) - } else { - aii := real(a[i*lda+i]) - a[i*lda+i] = complex(aii, 0) - } - } - return - } - for i := 0; i < n; i++ { - if x[ix] != 0 || y[iy] != 0 { - tmp1 := alpha * x[ix] - tmp2 := cmplx.Conj(alpha) * y[iy] - jx := kx - jy := ky - for j := 0; j < i; j++ { - a[i*lda+j] += tmp1*cmplx.Conj(y[jy]) + tmp2*cmplx.Conj(x[jx]) - jx += incX - jy += incY - } - aii := real(a[i*lda+i]) + real(tmp1*cmplx.Conj(y[iy])) + real(tmp2*cmplx.Conj(x[ix])) - a[i*lda+i] = complex(aii, 0) - } else { - aii := real(a[i*lda+i]) - a[i*lda+i] = complex(aii, 0) - } - ix += incX - iy += incY - } -} - -// Zhpmv performs the matrix-vector operation -// y = alpha * A * x + beta * y -// where alpha and beta are scalars, x and y are vectors, and A is an n×n -// Hermitian matrix in packed form. The imaginary parts of the diagonal -// elements of A are ignored and assumed to be zero. -func (Implementation) Zhpmv(uplo blas.Uplo, n int, alpha complex128, ap []complex128, x []complex128, incX int, beta complex128, y []complex128, incY int) { - switch uplo { - default: - panic(badUplo) - case blas.Upper, blas.Lower: - } - if n < 0 { - panic(nLT0) - } - if incX == 0 { - panic(zeroIncX) - } - if incY == 0 { - panic(zeroIncY) - } - - // Quick return if possible. - if n == 0 { - return - } - - // For zero matrix size the following slice length checks are trivially satisfied. - if len(ap) < n*(n+1)/2 { - panic(shortAP) - } - if (incX > 0 && len(x) <= (n-1)*incX) || (incX < 0 && len(x) <= (1-n)*incX) { - panic(shortX) - } - if (incY > 0 && len(y) <= (n-1)*incY) || (incY < 0 && len(y) <= (1-n)*incY) { - panic(shortY) - } - - // Quick return if possible. - if alpha == 0 && beta == 1 { - return - } - - // Set up the start indices in X and Y. - var kx int - if incX < 0 { - kx = (1 - n) * incX - } - var ky int - if incY < 0 { - ky = (1 - n) * incY - } - - // Form y = beta*y. - if beta != 1 { - if incY == 1 { - if beta == 0 { - for i := range y[:n] { - y[i] = 0 - } - } else { - for i, v := range y[:n] { - y[i] = beta * v - } - } - } else { - iy := ky - if beta == 0 { - for i := 0; i < n; i++ { - y[iy] = 0 - iy += incY - } - } else { - for i := 0; i < n; i++ { - y[iy] *= beta - iy += incY - } - } - } - } - - if alpha == 0 { - return - } - - // The elements of A are accessed sequentially with one pass through ap. - - var kk int - if uplo == blas.Upper { - // Form y when ap contains the upper triangle. - // Here, kk points to the current diagonal element in ap. - if incX == 1 && incY == 1 { - for i := 0; i < n; i++ { - tmp1 := alpha * x[i] - y[i] += tmp1 * complex(real(ap[kk]), 0) - var tmp2 complex128 - k := kk + 1 - for j := i + 1; j < n; j++ { - y[j] += tmp1 * cmplx.Conj(ap[k]) - tmp2 += ap[k] * x[j] - k++ - } - y[i] += alpha * tmp2 - kk += n - i - } - } else { - ix := kx - iy := ky - for i := 0; i < n; i++ { - tmp1 := alpha * x[ix] - y[iy] += tmp1 * complex(real(ap[kk]), 0) - var tmp2 complex128 - jx := ix - jy := iy - for k := kk + 1; k < kk+n-i; k++ { - jx += incX - jy += incY - y[jy] += tmp1 * cmplx.Conj(ap[k]) - tmp2 += ap[k] * x[jx] - } - y[iy] += alpha * tmp2 - ix += incX - iy += incY - kk += n - i - } - } - return - } - - // Form y when ap contains the lower triangle. - // Here, kk points to the beginning of current row in ap. - if incX == 1 && incY == 1 { - for i := 0; i < n; i++ { - tmp1 := alpha * x[i] - var tmp2 complex128 - k := kk - for j := 0; j < i; j++ { - y[j] += tmp1 * cmplx.Conj(ap[k]) - tmp2 += ap[k] * x[j] - k++ - } - aii := complex(real(ap[kk+i]), 0) - y[i] += tmp1*aii + alpha*tmp2 - kk += i + 1 - } - } else { - ix := kx - iy := ky - for i := 0; i < n; i++ { - tmp1 := alpha * x[ix] - var tmp2 complex128 - jx := kx - jy := ky - for k := kk; k < kk+i; k++ { - y[jy] += tmp1 * cmplx.Conj(ap[k]) - tmp2 += ap[k] * x[jx] - jx += incX - jy += incY - } - aii := complex(real(ap[kk+i]), 0) - y[iy] += tmp1*aii + alpha*tmp2 - ix += incX - iy += incY - kk += i + 1 - } - } -} - -// Zhpr performs the Hermitian rank-1 operation -// A += alpha * x * x^H -// where alpha is a real scalar, x is a vector, and A is an n×n hermitian matrix -// in packed form. On entry, the imaginary parts of the diagonal elements are -// assumed to be zero, and on return they are set to zero. -func (Implementation) Zhpr(uplo blas.Uplo, n int, alpha float64, x []complex128, incX int, ap []complex128) { - switch uplo { - default: - panic(badUplo) - case blas.Upper, blas.Lower: - } - if n < 0 { - panic(nLT0) - } - if incX == 0 { - panic(zeroIncX) - } - - // Quick return if possible. - if n == 0 { - return - } - - // For zero matrix size the following slice length checks are trivially satisfied. - if (incX > 0 && len(x) <= (n-1)*incX) || (incX < 0 && len(x) <= (1-n)*incX) { - panic(shortX) - } - if len(ap) < n*(n+1)/2 { - panic(shortAP) - } - - // Quick return if possible. - if alpha == 0 { - return - } - - // Set up start index in X. - var kx int - if incX < 0 { - kx = (1 - n) * incX - } - - // The elements of A are accessed sequentially with one pass through ap. - - var kk int - if uplo == blas.Upper { - // Form A when upper triangle is stored in AP. - // Here, kk points to the current diagonal element in ap. - if incX == 1 { - for i := 0; i < n; i++ { - xi := x[i] - if xi != 0 { - aii := real(ap[kk]) + alpha*real(cmplx.Conj(xi)*xi) - ap[kk] = complex(aii, 0) - - tmp := complex(alpha, 0) * xi - a := ap[kk+1 : kk+n-i] - x := x[i+1 : n] - for j, v := range x { - a[j] += tmp * cmplx.Conj(v) - } - } else { - ap[kk] = complex(real(ap[kk]), 0) - } - kk += n - i - } - } else { - ix := kx - for i := 0; i < n; i++ { - xi := x[ix] - if xi != 0 { - aii := real(ap[kk]) + alpha*real(cmplx.Conj(xi)*xi) - ap[kk] = complex(aii, 0) - - tmp := complex(alpha, 0) * xi - jx := ix + incX - a := ap[kk+1 : kk+n-i] - for k := range a { - a[k] += tmp * cmplx.Conj(x[jx]) - jx += incX - } - } else { - ap[kk] = complex(real(ap[kk]), 0) - } - ix += incX - kk += n - i - } - } - return - } - - // Form A when lower triangle is stored in AP. - // Here, kk points to the beginning of current row in ap. - if incX == 1 { - for i := 0; i < n; i++ { - xi := x[i] - if xi != 0 { - tmp := complex(alpha, 0) * xi - a := ap[kk : kk+i] - for j, v := range x[:i] { - a[j] += tmp * cmplx.Conj(v) - } - - aii := real(ap[kk+i]) + alpha*real(cmplx.Conj(xi)*xi) - ap[kk+i] = complex(aii, 0) - } else { - ap[kk+i] = complex(real(ap[kk+i]), 0) - } - kk += i + 1 - } - } else { - ix := kx - for i := 0; i < n; i++ { - xi := x[ix] - if xi != 0 { - tmp := complex(alpha, 0) * xi - a := ap[kk : kk+i] - jx := kx - for k := range a { - a[k] += tmp * cmplx.Conj(x[jx]) - jx += incX - } - - aii := real(ap[kk+i]) + alpha*real(cmplx.Conj(xi)*xi) - ap[kk+i] = complex(aii, 0) - } else { - ap[kk+i] = complex(real(ap[kk+i]), 0) - } - ix += incX - kk += i + 1 - } - } -} - -// Zhpr2 performs the Hermitian rank-2 operation -// A += alpha * x * y^H + conj(alpha) * y * x^H -// where alpha is a complex scalar, x and y are n element vectors, and A is an -// n×n Hermitian matrix, supplied in packed form. On entry, the imaginary parts -// of the diagonal elements are assumed to be zero, and on return they are set to zero. -func (Implementation) Zhpr2(uplo blas.Uplo, n int, alpha complex128, x []complex128, incX int, y []complex128, incY int, ap []complex128) { - switch uplo { - default: - panic(badUplo) - case blas.Upper, blas.Lower: - } - if n < 0 { - panic(nLT0) - } - if incX == 0 { - panic(zeroIncX) - } - if incY == 0 { - panic(zeroIncY) - } - - // Quick return if possible. - if n == 0 { - return - } - - // For zero matrix size the following slice length checks are trivially satisfied. - if (incX > 0 && len(x) <= (n-1)*incX) || (incX < 0 && len(x) <= (1-n)*incX) { - panic(shortX) - } - if (incY > 0 && len(y) <= (n-1)*incY) || (incY < 0 && len(y) <= (1-n)*incY) { - panic(shortY) - } - if len(ap) < n*(n+1)/2 { - panic(shortAP) - } - - // Quick return if possible. - if alpha == 0 { - return - } - - // Set up start indices in X and Y. - var kx int - if incX < 0 { - kx = (1 - n) * incX - } - var ky int - if incY < 0 { - ky = (1 - n) * incY - } - - // The elements of A are accessed sequentially with one pass through ap. - - var kk int - if uplo == blas.Upper { - // Form A when upper triangle is stored in AP. - // Here, kk points to the current diagonal element in ap. - if incX == 1 && incY == 1 { - for i := 0; i < n; i++ { - if x[i] != 0 || y[i] != 0 { - tmp1 := alpha * x[i] - tmp2 := cmplx.Conj(alpha) * y[i] - aii := real(ap[kk]) + real(tmp1*cmplx.Conj(y[i])) + real(tmp2*cmplx.Conj(x[i])) - ap[kk] = complex(aii, 0) - k := kk + 1 - for j := i + 1; j < n; j++ { - ap[k] += tmp1*cmplx.Conj(y[j]) + tmp2*cmplx.Conj(x[j]) - k++ - } - } else { - ap[kk] = complex(real(ap[kk]), 0) - } - kk += n - i - } - } else { - ix := kx - iy := ky - for i := 0; i < n; i++ { - if x[ix] != 0 || y[iy] != 0 { - tmp1 := alpha * x[ix] - tmp2 := cmplx.Conj(alpha) * y[iy] - aii := real(ap[kk]) + real(tmp1*cmplx.Conj(y[iy])) + real(tmp2*cmplx.Conj(x[ix])) - ap[kk] = complex(aii, 0) - jx := ix + incX - jy := iy + incY - for k := kk + 1; k < kk+n-i; k++ { - ap[k] += tmp1*cmplx.Conj(y[jy]) + tmp2*cmplx.Conj(x[jx]) - jx += incX - jy += incY - } - } else { - ap[kk] = complex(real(ap[kk]), 0) - } - ix += incX - iy += incY - kk += n - i - } - } - return - } - - // Form A when lower triangle is stored in AP. - // Here, kk points to the beginning of current row in ap. - if incX == 1 && incY == 1 { - for i := 0; i < n; i++ { - if x[i] != 0 || y[i] != 0 { - tmp1 := alpha * x[i] - tmp2 := cmplx.Conj(alpha) * y[i] - k := kk - for j := 0; j < i; j++ { - ap[k] += tmp1*cmplx.Conj(y[j]) + tmp2*cmplx.Conj(x[j]) - k++ - } - aii := real(ap[kk+i]) + real(tmp1*cmplx.Conj(y[i])) + real(tmp2*cmplx.Conj(x[i])) - ap[kk+i] = complex(aii, 0) - } else { - ap[kk+i] = complex(real(ap[kk+i]), 0) - } - kk += i + 1 - } - } else { - ix := kx - iy := ky - for i := 0; i < n; i++ { - if x[ix] != 0 || y[iy] != 0 { - tmp1 := alpha * x[ix] - tmp2 := cmplx.Conj(alpha) * y[iy] - jx := kx - jy := ky - for k := kk; k < kk+i; k++ { - ap[k] += tmp1*cmplx.Conj(y[jy]) + tmp2*cmplx.Conj(x[jx]) - jx += incX - jy += incY - } - aii := real(ap[kk+i]) + real(tmp1*cmplx.Conj(y[iy])) + real(tmp2*cmplx.Conj(x[ix])) - ap[kk+i] = complex(aii, 0) - } else { - ap[kk+i] = complex(real(ap[kk+i]), 0) - } - ix += incX - iy += incY - kk += i + 1 - } - } -} - -// Ztbmv performs one of the matrix-vector operations -// x = A * x if trans = blas.NoTrans -// x = A^T * x if trans = blas.Trans -// x = A^H * x if trans = blas.ConjTrans -// where x is an n element vector and A is an n×n triangular band matrix, with -// (k+1) diagonals. -func (Implementation) Ztbmv(uplo blas.Uplo, trans blas.Transpose, diag blas.Diag, n, k int, a []complex128, lda int, x []complex128, incX int) { - switch trans { - default: - panic(badTranspose) - case blas.NoTrans, blas.Trans, blas.ConjTrans: - } - switch uplo { - default: - panic(badUplo) - case blas.Upper, blas.Lower: - } - switch diag { - default: - panic(badDiag) - case blas.NonUnit, blas.Unit: - } - if n < 0 { - panic(nLT0) - } - if k < 0 { - panic(kLT0) - } - if lda < k+1 { - panic(badLdA) - } - if incX == 0 { - panic(zeroIncX) - } - - // Quick return if possible. - if n == 0 { - return - } - - // For zero matrix size the following slice length checks are trivially satisfied. - if len(a) < lda*(n-1)+k+1 { - panic(shortA) - } - if (incX > 0 && len(x) <= (n-1)*incX) || (incX < 0 && len(x) <= (1-n)*incX) { - panic(shortX) - } - - // Set up start index in X. - var kx int - if incX < 0 { - kx = (1 - n) * incX - } - - switch trans { - case blas.NoTrans: - if uplo == blas.Upper { - if incX == 1 { - for i := 0; i < n; i++ { - xi := x[i] - if diag == blas.NonUnit { - xi *= a[i*lda] - } - kk := min(k, n-i-1) - for j, aij := range a[i*lda+1 : i*lda+kk+1] { - xi += x[i+j+1] * aij - } - x[i] = xi - } - } else { - ix := kx - for i := 0; i < n; i++ { - xi := x[ix] - if diag == blas.NonUnit { - xi *= a[i*lda] - } - kk := min(k, n-i-1) - jx := ix + incX - for _, aij := range a[i*lda+1 : i*lda+kk+1] { - xi += x[jx] * aij - jx += incX - } - x[ix] = xi - ix += incX - } - } - } else { - if incX == 1 { - for i := n - 1; i >= 0; i-- { - xi := x[i] - if diag == blas.NonUnit { - xi *= a[i*lda+k] - } - kk := min(k, i) - for j, aij := range a[i*lda+k-kk : i*lda+k] { - xi += x[i-kk+j] * aij - } - x[i] = xi - } - } else { - ix := kx + (n-1)*incX - for i := n - 1; i >= 0; i-- { - xi := x[ix] - if diag == blas.NonUnit { - xi *= a[i*lda+k] - } - kk := min(k, i) - jx := ix - kk*incX - for _, aij := range a[i*lda+k-kk : i*lda+k] { - xi += x[jx] * aij - jx += incX - } - x[ix] = xi - ix -= incX - } - } - } - case blas.Trans: - if uplo == blas.Upper { - if incX == 1 { - for i := n - 1; i >= 0; i-- { - kk := min(k, n-i-1) - xi := x[i] - for j, aij := range a[i*lda+1 : i*lda+kk+1] { - x[i+j+1] += xi * aij - } - if diag == blas.NonUnit { - x[i] *= a[i*lda] - } - } - } else { - ix := kx + (n-1)*incX - for i := n - 1; i >= 0; i-- { - kk := min(k, n-i-1) - jx := ix + incX - xi := x[ix] - for _, aij := range a[i*lda+1 : i*lda+kk+1] { - x[jx] += xi * aij - jx += incX - } - if diag == blas.NonUnit { - x[ix] *= a[i*lda] - } - ix -= incX - } - } - } else { - if incX == 1 { - for i := 0; i < n; i++ { - kk := min(k, i) - xi := x[i] - for j, aij := range a[i*lda+k-kk : i*lda+k] { - x[i-kk+j] += xi * aij - } - if diag == blas.NonUnit { - x[i] *= a[i*lda+k] - } - } - } else { - ix := kx - for i := 0; i < n; i++ { - kk := min(k, i) - jx := ix - kk*incX - xi := x[ix] - for _, aij := range a[i*lda+k-kk : i*lda+k] { - x[jx] += xi * aij - jx += incX - } - if diag == blas.NonUnit { - x[ix] *= a[i*lda+k] - } - ix += incX - } - } - } - case blas.ConjTrans: - if uplo == blas.Upper { - if incX == 1 { - for i := n - 1; i >= 0; i-- { - kk := min(k, n-i-1) - xi := x[i] - for j, aij := range a[i*lda+1 : i*lda+kk+1] { - x[i+j+1] += xi * cmplx.Conj(aij) - } - if diag == blas.NonUnit { - x[i] *= cmplx.Conj(a[i*lda]) - } - } - } else { - ix := kx + (n-1)*incX - for i := n - 1; i >= 0; i-- { - kk := min(k, n-i-1) - jx := ix + incX - xi := x[ix] - for _, aij := range a[i*lda+1 : i*lda+kk+1] { - x[jx] += xi * cmplx.Conj(aij) - jx += incX - } - if diag == blas.NonUnit { - x[ix] *= cmplx.Conj(a[i*lda]) - } - ix -= incX - } - } - } else { - if incX == 1 { - for i := 0; i < n; i++ { - kk := min(k, i) - xi := x[i] - for j, aij := range a[i*lda+k-kk : i*lda+k] { - x[i-kk+j] += xi * cmplx.Conj(aij) - } - if diag == blas.NonUnit { - x[i] *= cmplx.Conj(a[i*lda+k]) - } - } - } else { - ix := kx - for i := 0; i < n; i++ { - kk := min(k, i) - jx := ix - kk*incX - xi := x[ix] - for _, aij := range a[i*lda+k-kk : i*lda+k] { - x[jx] += xi * cmplx.Conj(aij) - jx += incX - } - if diag == blas.NonUnit { - x[ix] *= cmplx.Conj(a[i*lda+k]) - } - ix += incX - } - } - } - } -} - -// Ztbsv solves one of the systems of equations -// A * x = b if trans == blas.NoTrans -// A^T * x = b if trans == blas.Trans -// A^H * x = b if trans == blas.ConjTrans -// where b and x are n element vectors and A is an n×n triangular band matrix -// with (k+1) diagonals. -// -// On entry, x contains the values of b, and the solution is -// stored in-place into x. -// -// No test for singularity or near-singularity is included in this -// routine. Such tests must be performed before calling this routine. -func (Implementation) Ztbsv(uplo blas.Uplo, trans blas.Transpose, diag blas.Diag, n, k int, a []complex128, lda int, x []complex128, incX int) { - switch trans { - default: - panic(badTranspose) - case blas.NoTrans, blas.Trans, blas.ConjTrans: - } - switch uplo { - default: - panic(badUplo) - case blas.Upper, blas.Lower: - } - switch diag { - default: - panic(badDiag) - case blas.NonUnit, blas.Unit: - } - if n < 0 { - panic(nLT0) - } - if k < 0 { - panic(kLT0) - } - if lda < k+1 { - panic(badLdA) - } - if incX == 0 { - panic(zeroIncX) - } - - // Quick return if possible. - if n == 0 { - return - } - - // For zero matrix size the following slice length checks are trivially satisfied. - if len(a) < lda*(n-1)+k+1 { - panic(shortA) - } - if (incX > 0 && len(x) <= (n-1)*incX) || (incX < 0 && len(x) <= (1-n)*incX) { - panic(shortX) - } - - // Set up start index in X. - var kx int - if incX < 0 { - kx = (1 - n) * incX - } - - switch trans { - case blas.NoTrans: - if uplo == blas.Upper { - if incX == 1 { - for i := n - 1; i >= 0; i-- { - kk := min(k, n-i-1) - var sum complex128 - for j, aij := range a[i*lda+1 : i*lda+kk+1] { - sum += x[i+1+j] * aij - } - x[i] -= sum - if diag == blas.NonUnit { - x[i] /= a[i*lda] - } - } - } else { - ix := kx + (n-1)*incX - for i := n - 1; i >= 0; i-- { - kk := min(k, n-i-1) - var sum complex128 - jx := ix + incX - for _, aij := range a[i*lda+1 : i*lda+kk+1] { - sum += x[jx] * aij - jx += incX - } - x[ix] -= sum - if diag == blas.NonUnit { - x[ix] /= a[i*lda] - } - ix -= incX - } - } - } else { - if incX == 1 { - for i := 0; i < n; i++ { - kk := min(k, i) - var sum complex128 - for j, aij := range a[i*lda+k-kk : i*lda+k] { - sum += x[i-kk+j] * aij - } - x[i] -= sum - if diag == blas.NonUnit { - x[i] /= a[i*lda+k] - } - } - } else { - ix := kx - for i := 0; i < n; i++ { - kk := min(k, i) - var sum complex128 - jx := ix - kk*incX - for _, aij := range a[i*lda+k-kk : i*lda+k] { - sum += x[jx] * aij - jx += incX - } - x[ix] -= sum - if diag == blas.NonUnit { - x[ix] /= a[i*lda+k] - } - ix += incX - } - } - } - case blas.Trans: - if uplo == blas.Upper { - if incX == 1 { - for i := 0; i < n; i++ { - if diag == blas.NonUnit { - x[i] /= a[i*lda] - } - kk := min(k, n-i-1) - xi := x[i] - for j, aij := range a[i*lda+1 : i*lda+kk+1] { - x[i+1+j] -= xi * aij - } - } - } else { - ix := kx - for i := 0; i < n; i++ { - if diag == blas.NonUnit { - x[ix] /= a[i*lda] - } - kk := min(k, n-i-1) - xi := x[ix] - jx := ix + incX - for _, aij := range a[i*lda+1 : i*lda+kk+1] { - x[jx] -= xi * aij - jx += incX - } - ix += incX - } - } - } else { - if incX == 1 { - for i := n - 1; i >= 0; i-- { - if diag == blas.NonUnit { - x[i] /= a[i*lda+k] - } - kk := min(k, i) - xi := x[i] - for j, aij := range a[i*lda+k-kk : i*lda+k] { - x[i-kk+j] -= xi * aij - } - } - } else { - ix := kx + (n-1)*incX - for i := n - 1; i >= 0; i-- { - if diag == blas.NonUnit { - x[ix] /= a[i*lda+k] - } - kk := min(k, i) - xi := x[ix] - jx := ix - kk*incX - for _, aij := range a[i*lda+k-kk : i*lda+k] { - x[jx] -= xi * aij - jx += incX - } - ix -= incX - } - } - } - case blas.ConjTrans: - if uplo == blas.Upper { - if incX == 1 { - for i := 0; i < n; i++ { - if diag == blas.NonUnit { - x[i] /= cmplx.Conj(a[i*lda]) - } - kk := min(k, n-i-1) - xi := x[i] - for j, aij := range a[i*lda+1 : i*lda+kk+1] { - x[i+1+j] -= xi * cmplx.Conj(aij) - } - } - } else { - ix := kx - for i := 0; i < n; i++ { - if diag == blas.NonUnit { - x[ix] /= cmplx.Conj(a[i*lda]) - } - kk := min(k, n-i-1) - xi := x[ix] - jx := ix + incX - for _, aij := range a[i*lda+1 : i*lda+kk+1] { - x[jx] -= xi * cmplx.Conj(aij) - jx += incX - } - ix += incX - } - } - } else { - if incX == 1 { - for i := n - 1; i >= 0; i-- { - if diag == blas.NonUnit { - x[i] /= cmplx.Conj(a[i*lda+k]) - } - kk := min(k, i) - xi := x[i] - for j, aij := range a[i*lda+k-kk : i*lda+k] { - x[i-kk+j] -= xi * cmplx.Conj(aij) - } - } - } else { - ix := kx + (n-1)*incX - for i := n - 1; i >= 0; i-- { - if diag == blas.NonUnit { - x[ix] /= cmplx.Conj(a[i*lda+k]) - } - kk := min(k, i) - xi := x[ix] - jx := ix - kk*incX - for _, aij := range a[i*lda+k-kk : i*lda+k] { - x[jx] -= xi * cmplx.Conj(aij) - jx += incX - } - ix -= incX - } - } - } - } -} - -// Ztpmv performs one of the matrix-vector operations -// x = A * x if trans = blas.NoTrans -// x = A^T * x if trans = blas.Trans -// x = A^H * x if trans = blas.ConjTrans -// where x is an n element vector and A is an n×n triangular matrix, supplied in -// packed form. -func (Implementation) Ztpmv(uplo blas.Uplo, trans blas.Transpose, diag blas.Diag, n int, ap []complex128, x []complex128, incX int) { - switch uplo { - default: - panic(badUplo) - case blas.Upper, blas.Lower: - } - switch trans { - default: - panic(badTranspose) - case blas.NoTrans, blas.Trans, blas.ConjTrans: - } - switch diag { - default: - panic(badDiag) - case blas.NonUnit, blas.Unit: - } - if n < 0 { - panic(nLT0) - } - if incX == 0 { - panic(zeroIncX) - } - - // Quick return if possible. - if n == 0 { - return - } - - // For zero matrix size the following slice length checks are trivially satisfied. - if len(ap) < n*(n+1)/2 { - panic(shortAP) - } - if (incX > 0 && len(x) <= (n-1)*incX) || (incX < 0 && len(x) <= (1-n)*incX) { - panic(shortX) - } - - // Set up start index in X. - var kx int - if incX < 0 { - kx = (1 - n) * incX - } - - // The elements of A are accessed sequentially with one pass through A. - - if trans == blas.NoTrans { - // Form x = A*x. - if uplo == blas.Upper { - // kk points to the current diagonal element in ap. - kk := 0 - if incX == 1 { - x = x[:n] - for i := range x { - if diag == blas.NonUnit { - x[i] *= ap[kk] - } - if n-i-1 > 0 { - x[i] += c128.DotuUnitary(ap[kk+1:kk+n-i], x[i+1:]) - } - kk += n - i - } - } else { - ix := kx - for i := 0; i < n; i++ { - if diag == blas.NonUnit { - x[ix] *= ap[kk] - } - if n-i-1 > 0 { - x[ix] += c128.DotuInc(ap[kk+1:kk+n-i], x, uintptr(n-i-1), 1, uintptr(incX), 0, uintptr(ix+incX)) - } - ix += incX - kk += n - i - } - } - } else { - // kk points to the beginning of current row in ap. - kk := n*(n+1)/2 - n - if incX == 1 { - for i := n - 1; i >= 0; i-- { - if diag == blas.NonUnit { - x[i] *= ap[kk+i] - } - if i > 0 { - x[i] += c128.DotuUnitary(ap[kk:kk+i], x[:i]) - } - kk -= i - } - } else { - ix := kx + (n-1)*incX - for i := n - 1; i >= 0; i-- { - if diag == blas.NonUnit { - x[ix] *= ap[kk+i] - } - if i > 0 { - x[ix] += c128.DotuInc(ap[kk:kk+i], x, uintptr(i), 1, uintptr(incX), 0, uintptr(kx)) - } - ix -= incX - kk -= i - } - } - } - return - } - - if trans == blas.Trans { - // Form x = A^T*x. - if uplo == blas.Upper { - // kk points to the current diagonal element in ap. - kk := n*(n+1)/2 - 1 - if incX == 1 { - for i := n - 1; i >= 0; i-- { - xi := x[i] - if diag == blas.NonUnit { - x[i] *= ap[kk] - } - if n-i-1 > 0 { - c128.AxpyUnitary(xi, ap[kk+1:kk+n-i], x[i+1:n]) - } - kk -= n - i + 1 - } - } else { - ix := kx + (n-1)*incX - for i := n - 1; i >= 0; i-- { - xi := x[ix] - if diag == blas.NonUnit { - x[ix] *= ap[kk] - } - if n-i-1 > 0 { - c128.AxpyInc(xi, ap[kk+1:kk+n-i], x, uintptr(n-i-1), 1, uintptr(incX), 0, uintptr(ix+incX)) - } - ix -= incX - kk -= n - i + 1 - } - } - } else { - // kk points to the beginning of current row in ap. - kk := 0 - if incX == 1 { - x = x[:n] - for i := range x { - if i > 0 { - c128.AxpyUnitary(x[i], ap[kk:kk+i], x[:i]) - } - if diag == blas.NonUnit { - x[i] *= ap[kk+i] - } - kk += i + 1 - } - } else { - ix := kx - for i := 0; i < n; i++ { - if i > 0 { - c128.AxpyInc(x[ix], ap[kk:kk+i], x, uintptr(i), 1, uintptr(incX), 0, uintptr(kx)) - } - if diag == blas.NonUnit { - x[ix] *= ap[kk+i] - } - ix += incX - kk += i + 1 - } - } - } - return - } - - // Form x = A^H*x. - if uplo == blas.Upper { - // kk points to the current diagonal element in ap. - kk := n*(n+1)/2 - 1 - if incX == 1 { - for i := n - 1; i >= 0; i-- { - xi := x[i] - if diag == blas.NonUnit { - x[i] *= cmplx.Conj(ap[kk]) - } - k := kk + 1 - for j := i + 1; j < n; j++ { - x[j] += xi * cmplx.Conj(ap[k]) - k++ - } - kk -= n - i + 1 - } - } else { - ix := kx + (n-1)*incX - for i := n - 1; i >= 0; i-- { - xi := x[ix] - if diag == blas.NonUnit { - x[ix] *= cmplx.Conj(ap[kk]) - } - jx := ix + incX - k := kk + 1 - for j := i + 1; j < n; j++ { - x[jx] += xi * cmplx.Conj(ap[k]) - jx += incX - k++ - } - ix -= incX - kk -= n - i + 1 - } - } - } else { - // kk points to the beginning of current row in ap. - kk := 0 - if incX == 1 { - x = x[:n] - for i, xi := range x { - for j := 0; j < i; j++ { - x[j] += xi * cmplx.Conj(ap[kk+j]) - } - if diag == blas.NonUnit { - x[i] *= cmplx.Conj(ap[kk+i]) - } - kk += i + 1 - } - } else { - ix := kx - for i := 0; i < n; i++ { - xi := x[ix] - jx := kx - for j := 0; j < i; j++ { - x[jx] += xi * cmplx.Conj(ap[kk+j]) - jx += incX - } - if diag == blas.NonUnit { - x[ix] *= cmplx.Conj(ap[kk+i]) - } - ix += incX - kk += i + 1 - } - } - } -} - -// Ztpsv solves one of the systems of equations -// A * x = b if trans == blas.NoTrans -// A^T * x = b if trans == blas.Trans -// A^H * x = b if trans == blas.ConjTrans -// where b and x are n element vectors and A is an n×n triangular matrix in -// packed form. -// -// On entry, x contains the values of b, and the solution is -// stored in-place into x. -// -// No test for singularity or near-singularity is included in this -// routine. Such tests must be performed before calling this routine. -func (Implementation) Ztpsv(uplo blas.Uplo, trans blas.Transpose, diag blas.Diag, n int, ap []complex128, x []complex128, incX int) { - switch uplo { - default: - panic(badUplo) - case blas.Upper, blas.Lower: - } - switch trans { - default: - panic(badTranspose) - case blas.NoTrans, blas.Trans, blas.ConjTrans: - } - switch diag { - default: - panic(badDiag) - case blas.NonUnit, blas.Unit: - } - if n < 0 { - panic(nLT0) - } - if incX == 0 { - panic(zeroIncX) - } - - // Quick return if possible. - if n == 0 { - return - } - - // For zero matrix size the following slice length checks are trivially satisfied. - if len(ap) < n*(n+1)/2 { - panic(shortAP) - } - if (incX > 0 && len(x) <= (n-1)*incX) || (incX < 0 && len(x) <= (1-n)*incX) { - panic(shortX) - } - - // Set up start index in X. - var kx int - if incX < 0 { - kx = (1 - n) * incX - } - - // The elements of A are accessed sequentially with one pass through ap. - - if trans == blas.NoTrans { - // Form x = inv(A)*x. - if uplo == blas.Upper { - kk := n*(n+1)/2 - 1 - if incX == 1 { - for i := n - 1; i >= 0; i-- { - aii := ap[kk] - if n-i-1 > 0 { - x[i] -= c128.DotuUnitary(x[i+1:n], ap[kk+1:kk+n-i]) - } - if diag == blas.NonUnit { - x[i] /= aii - } - kk -= n - i + 1 - } - } else { - ix := kx + (n-1)*incX - for i := n - 1; i >= 0; i-- { - aii := ap[kk] - if n-i-1 > 0 { - x[ix] -= c128.DotuInc(x, ap[kk+1:kk+n-i], uintptr(n-i-1), uintptr(incX), 1, uintptr(ix+incX), 0) - } - if diag == blas.NonUnit { - x[ix] /= aii - } - ix -= incX - kk -= n - i + 1 - } - } - } else { - kk := 0 - if incX == 1 { - for i := 0; i < n; i++ { - if i > 0 { - x[i] -= c128.DotuUnitary(x[:i], ap[kk:kk+i]) - } - if diag == blas.NonUnit { - x[i] /= ap[kk+i] - } - kk += i + 1 - } - } else { - ix := kx - for i := 0; i < n; i++ { - if i > 0 { - x[ix] -= c128.DotuInc(x, ap[kk:kk+i], uintptr(i), uintptr(incX), 1, uintptr(kx), 0) - } - if diag == blas.NonUnit { - x[ix] /= ap[kk+i] - } - ix += incX - kk += i + 1 - } - } - } - return - } - - if trans == blas.Trans { - // Form x = inv(A^T)*x. - if uplo == blas.Upper { - kk := 0 - if incX == 1 { - for j := 0; j < n; j++ { - if diag == blas.NonUnit { - x[j] /= ap[kk] - } - if n-j-1 > 0 { - c128.AxpyUnitary(-x[j], ap[kk+1:kk+n-j], x[j+1:n]) - } - kk += n - j - } - } else { - jx := kx - for j := 0; j < n; j++ { - if diag == blas.NonUnit { - x[jx] /= ap[kk] - } - if n-j-1 > 0 { - c128.AxpyInc(-x[jx], ap[kk+1:kk+n-j], x, uintptr(n-j-1), 1, uintptr(incX), 0, uintptr(jx+incX)) - } - jx += incX - kk += n - j - } - } - } else { - kk := n*(n+1)/2 - n - if incX == 1 { - for j := n - 1; j >= 0; j-- { - if diag == blas.NonUnit { - x[j] /= ap[kk+j] - } - if j > 0 { - c128.AxpyUnitary(-x[j], ap[kk:kk+j], x[:j]) - } - kk -= j - } - } else { - jx := kx + (n-1)*incX - for j := n - 1; j >= 0; j-- { - if diag == blas.NonUnit { - x[jx] /= ap[kk+j] - } - if j > 0 { - c128.AxpyInc(-x[jx], ap[kk:kk+j], x, uintptr(j), 1, uintptr(incX), 0, uintptr(kx)) - } - jx -= incX - kk -= j - } - } - } - return - } - - // Form x = inv(A^H)*x. - if uplo == blas.Upper { - kk := 0 - if incX == 1 { - for j := 0; j < n; j++ { - if diag == blas.NonUnit { - x[j] /= cmplx.Conj(ap[kk]) - } - xj := x[j] - k := kk + 1 - for i := j + 1; i < n; i++ { - x[i] -= xj * cmplx.Conj(ap[k]) - k++ - } - kk += n - j - } - } else { - jx := kx - for j := 0; j < n; j++ { - if diag == blas.NonUnit { - x[jx] /= cmplx.Conj(ap[kk]) - } - xj := x[jx] - ix := jx + incX - k := kk + 1 - for i := j + 1; i < n; i++ { - x[ix] -= xj * cmplx.Conj(ap[k]) - ix += incX - k++ - } - jx += incX - kk += n - j - } - } - } else { - kk := n*(n+1)/2 - n - if incX == 1 { - for j := n - 1; j >= 0; j-- { - if diag == blas.NonUnit { - x[j] /= cmplx.Conj(ap[kk+j]) - } - xj := x[j] - for i := 0; i < j; i++ { - x[i] -= xj * cmplx.Conj(ap[kk+i]) - } - kk -= j - } - } else { - jx := kx + (n-1)*incX - for j := n - 1; j >= 0; j-- { - if diag == blas.NonUnit { - x[jx] /= cmplx.Conj(ap[kk+j]) - } - xj := x[jx] - ix := kx - for i := 0; i < j; i++ { - x[ix] -= xj * cmplx.Conj(ap[kk+i]) - ix += incX - } - jx -= incX - kk -= j - } - } - } -} - -// Ztrmv performs one of the matrix-vector operations -// x = A * x if trans = blas.NoTrans -// x = A^T * x if trans = blas.Trans -// x = A^H * x if trans = blas.ConjTrans -// where x is a vector, and A is an n×n triangular matrix. -func (Implementation) Ztrmv(uplo blas.Uplo, trans blas.Transpose, diag blas.Diag, n int, a []complex128, lda int, x []complex128, incX int) { - switch trans { - default: - panic(badTranspose) - case blas.NoTrans, blas.Trans, blas.ConjTrans: - } - switch uplo { - default: - panic(badUplo) - case blas.Upper, blas.Lower: - } - switch diag { - default: - panic(badDiag) - case blas.NonUnit, blas.Unit: - } - if n < 0 { - panic(nLT0) - } - if lda < max(1, n) { - panic(badLdA) - } - if incX == 0 { - panic(zeroIncX) - } - - // Quick return if possible. - if n == 0 { - return - } - - // For zero matrix size the following slice length checks are trivially satisfied. - if len(a) < lda*(n-1)+n { - panic(shortA) - } - if (incX > 0 && len(x) <= (n-1)*incX) || (incX < 0 && len(x) <= (1-n)*incX) { - panic(shortX) - } - - // Set up start index in X. - var kx int - if incX < 0 { - kx = (1 - n) * incX - } - - // The elements of A are accessed sequentially with one pass through A. - - if trans == blas.NoTrans { - // Form x = A*x. - if uplo == blas.Upper { - if incX == 1 { - for i := 0; i < n; i++ { - if diag == blas.NonUnit { - x[i] *= a[i*lda+i] - } - if n-i-1 > 0 { - x[i] += c128.DotuUnitary(a[i*lda+i+1:i*lda+n], x[i+1:n]) - } - } - } else { - ix := kx - for i := 0; i < n; i++ { - if diag == blas.NonUnit { - x[ix] *= a[i*lda+i] - } - if n-i-1 > 0 { - x[ix] += c128.DotuInc(a[i*lda+i+1:i*lda+n], x, uintptr(n-i-1), 1, uintptr(incX), 0, uintptr(ix+incX)) - } - ix += incX - } - } - } else { - if incX == 1 { - for i := n - 1; i >= 0; i-- { - if diag == blas.NonUnit { - x[i] *= a[i*lda+i] - } - if i > 0 { - x[i] += c128.DotuUnitary(a[i*lda:i*lda+i], x[:i]) - } - } - } else { - ix := kx + (n-1)*incX - for i := n - 1; i >= 0; i-- { - if diag == blas.NonUnit { - x[ix] *= a[i*lda+i] - } - if i > 0 { - x[ix] += c128.DotuInc(a[i*lda:i*lda+i], x, uintptr(i), 1, uintptr(incX), 0, uintptr(kx)) - } - ix -= incX - } - } - } - return - } - - if trans == blas.Trans { - // Form x = A^T*x. - if uplo == blas.Upper { - if incX == 1 { - for i := n - 1; i >= 0; i-- { - xi := x[i] - if diag == blas.NonUnit { - x[i] *= a[i*lda+i] - } - if n-i-1 > 0 { - c128.AxpyUnitary(xi, a[i*lda+i+1:i*lda+n], x[i+1:n]) - } - } - } else { - ix := kx + (n-1)*incX - for i := n - 1; i >= 0; i-- { - xi := x[ix] - if diag == blas.NonUnit { - x[ix] *= a[i*lda+i] - } - if n-i-1 > 0 { - c128.AxpyInc(xi, a[i*lda+i+1:i*lda+n], x, uintptr(n-i-1), 1, uintptr(incX), 0, uintptr(ix+incX)) - } - ix -= incX - } - } - } else { - if incX == 1 { - for i := 0; i < n; i++ { - if i > 0 { - c128.AxpyUnitary(x[i], a[i*lda:i*lda+i], x[:i]) - } - if diag == blas.NonUnit { - x[i] *= a[i*lda+i] - } - } - } else { - ix := kx - for i := 0; i < n; i++ { - if i > 0 { - c128.AxpyInc(x[ix], a[i*lda:i*lda+i], x, uintptr(i), 1, uintptr(incX), 0, uintptr(kx)) - } - if diag == blas.NonUnit { - x[ix] *= a[i*lda+i] - } - ix += incX - } - } - } - return - } - - // Form x = A^H*x. - if uplo == blas.Upper { - if incX == 1 { - for i := n - 1; i >= 0; i-- { - xi := x[i] - if diag == blas.NonUnit { - x[i] *= cmplx.Conj(a[i*lda+i]) - } - for j := i + 1; j < n; j++ { - x[j] += xi * cmplx.Conj(a[i*lda+j]) - } - } - } else { - ix := kx + (n-1)*incX - for i := n - 1; i >= 0; i-- { - xi := x[ix] - if diag == blas.NonUnit { - x[ix] *= cmplx.Conj(a[i*lda+i]) - } - jx := ix + incX - for j := i + 1; j < n; j++ { - x[jx] += xi * cmplx.Conj(a[i*lda+j]) - jx += incX - } - ix -= incX - } - } - } else { - if incX == 1 { - for i := 0; i < n; i++ { - for j := 0; j < i; j++ { - x[j] += x[i] * cmplx.Conj(a[i*lda+j]) - } - if diag == blas.NonUnit { - x[i] *= cmplx.Conj(a[i*lda+i]) - } - } - } else { - ix := kx - for i := 0; i < n; i++ { - jx := kx - for j := 0; j < i; j++ { - x[jx] += x[ix] * cmplx.Conj(a[i*lda+j]) - jx += incX - } - if diag == blas.NonUnit { - x[ix] *= cmplx.Conj(a[i*lda+i]) - } - ix += incX - } - } - } -} - -// Ztrsv solves one of the systems of equations -// A * x = b if trans == blas.NoTrans -// A^T * x = b if trans == blas.Trans -// A^H * x = b if trans == blas.ConjTrans -// where b and x are n element vectors and A is an n×n triangular matrix. -// -// On entry, x contains the values of b, and the solution is -// stored in-place into x. -// -// No test for singularity or near-singularity is included in this -// routine. Such tests must be performed before calling this routine. -func (Implementation) Ztrsv(uplo blas.Uplo, trans blas.Transpose, diag blas.Diag, n int, a []complex128, lda int, x []complex128, incX int) { - switch trans { - default: - panic(badTranspose) - case blas.NoTrans, blas.Trans, blas.ConjTrans: - } - switch uplo { - default: - panic(badUplo) - case blas.Upper, blas.Lower: - } - switch diag { - default: - panic(badDiag) - case blas.NonUnit, blas.Unit: - } - if n < 0 { - panic(nLT0) - } - if lda < max(1, n) { - panic(badLdA) - } - if incX == 0 { - panic(zeroIncX) - } - - // Quick return if possible. - if n == 0 { - return - } - - // For zero matrix size the following slice length checks are trivially satisfied. - if len(a) < lda*(n-1)+n { - panic(shortA) - } - if (incX > 0 && len(x) <= (n-1)*incX) || (incX < 0 && len(x) <= (1-n)*incX) { - panic(shortX) - } - - // Set up start index in X. - var kx int - if incX < 0 { - kx = (1 - n) * incX - } - - // The elements of A are accessed sequentially with one pass through A. - - if trans == blas.NoTrans { - // Form x = inv(A)*x. - if uplo == blas.Upper { - if incX == 1 { - for i := n - 1; i >= 0; i-- { - aii := a[i*lda+i] - if n-i-1 > 0 { - x[i] -= c128.DotuUnitary(x[i+1:n], a[i*lda+i+1:i*lda+n]) - } - if diag == blas.NonUnit { - x[i] /= aii - } - } - } else { - ix := kx + (n-1)*incX - for i := n - 1; i >= 0; i-- { - aii := a[i*lda+i] - if n-i-1 > 0 { - x[ix] -= c128.DotuInc(x, a[i*lda+i+1:i*lda+n], uintptr(n-i-1), uintptr(incX), 1, uintptr(ix+incX), 0) - } - if diag == blas.NonUnit { - x[ix] /= aii - } - ix -= incX - } - } - } else { - if incX == 1 { - for i := 0; i < n; i++ { - if i > 0 { - x[i] -= c128.DotuUnitary(x[:i], a[i*lda:i*lda+i]) - } - if diag == blas.NonUnit { - x[i] /= a[i*lda+i] - } - } - } else { - ix := kx - for i := 0; i < n; i++ { - if i > 0 { - x[ix] -= c128.DotuInc(x, a[i*lda:i*lda+i], uintptr(i), uintptr(incX), 1, uintptr(kx), 0) - } - if diag == blas.NonUnit { - x[ix] /= a[i*lda+i] - } - ix += incX - } - } - } - return - } - - if trans == blas.Trans { - // Form x = inv(A^T)*x. - if uplo == blas.Upper { - if incX == 1 { - for j := 0; j < n; j++ { - if diag == blas.NonUnit { - x[j] /= a[j*lda+j] - } - if n-j-1 > 0 { - c128.AxpyUnitary(-x[j], a[j*lda+j+1:j*lda+n], x[j+1:n]) - } - } - } else { - jx := kx - for j := 0; j < n; j++ { - if diag == blas.NonUnit { - x[jx] /= a[j*lda+j] - } - if n-j-1 > 0 { - c128.AxpyInc(-x[jx], a[j*lda+j+1:j*lda+n], x, uintptr(n-j-1), 1, uintptr(incX), 0, uintptr(jx+incX)) - } - jx += incX - } - } - } else { - if incX == 1 { - for j := n - 1; j >= 0; j-- { - if diag == blas.NonUnit { - x[j] /= a[j*lda+j] - } - xj := x[j] - if j > 0 { - c128.AxpyUnitary(-xj, a[j*lda:j*lda+j], x[:j]) - } - } - } else { - jx := kx + (n-1)*incX - for j := n - 1; j >= 0; j-- { - if diag == blas.NonUnit { - x[jx] /= a[j*lda+j] - } - if j > 0 { - c128.AxpyInc(-x[jx], a[j*lda:j*lda+j], x, uintptr(j), 1, uintptr(incX), 0, uintptr(kx)) - } - jx -= incX - } - } - } - return - } - - // Form x = inv(A^H)*x. - if uplo == blas.Upper { - if incX == 1 { - for j := 0; j < n; j++ { - if diag == blas.NonUnit { - x[j] /= cmplx.Conj(a[j*lda+j]) - } - xj := x[j] - for i := j + 1; i < n; i++ { - x[i] -= xj * cmplx.Conj(a[j*lda+i]) - } - } - } else { - jx := kx - for j := 0; j < n; j++ { - if diag == blas.NonUnit { - x[jx] /= cmplx.Conj(a[j*lda+j]) - } - xj := x[jx] - ix := jx + incX - for i := j + 1; i < n; i++ { - x[ix] -= xj * cmplx.Conj(a[j*lda+i]) - ix += incX - } - jx += incX - } - } - } else { - if incX == 1 { - for j := n - 1; j >= 0; j-- { - if diag == blas.NonUnit { - x[j] /= cmplx.Conj(a[j*lda+j]) - } - xj := x[j] - for i := 0; i < j; i++ { - x[i] -= xj * cmplx.Conj(a[j*lda+i]) - } - } - } else { - jx := kx + (n-1)*incX - for j := n - 1; j >= 0; j-- { - if diag == blas.NonUnit { - x[jx] /= cmplx.Conj(a[j*lda+j]) - } - xj := x[jx] - ix := kx - for i := 0; i < j; i++ { - x[ix] -= xj * cmplx.Conj(a[j*lda+i]) - ix += incX - } - jx -= incX - } - } - } -} diff --git a/vendor/gonum.org/v1/gonum/blas/gonum/level2cmplx64.go b/vendor/gonum.org/v1/gonum/blas/gonum/level2cmplx64.go deleted file mode 100644 index 10faf8f7d8..0000000000 --- a/vendor/gonum.org/v1/gonum/blas/gonum/level2cmplx64.go +++ /dev/null @@ -1,2942 +0,0 @@ -// Code generated by "go generate gonum.org/v1/gonum/blas/gonum”; DO NOT EDIT. - -// Copyright ©2017 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import ( - cmplx "gonum.org/v1/gonum/internal/cmplx64" - - "gonum.org/v1/gonum/blas" - "gonum.org/v1/gonum/internal/asm/c64" -) - -var _ blas.Complex64Level2 = Implementation{} - -// Cgbmv performs one of the matrix-vector operations -// y = alpha * A * x + beta * y if trans = blas.NoTrans -// y = alpha * A^T * x + beta * y if trans = blas.Trans -// y = alpha * A^H * x + beta * y if trans = blas.ConjTrans -// where alpha and beta are scalars, x and y are vectors, and A is an m×n band matrix -// with kL sub-diagonals and kU super-diagonals. -// -// Complex64 implementations are autogenerated and not directly tested. -func (Implementation) Cgbmv(trans blas.Transpose, m, n, kL, kU int, alpha complex64, a []complex64, lda int, x []complex64, incX int, beta complex64, y []complex64, incY int) { - switch trans { - default: - panic(badTranspose) - case blas.NoTrans, blas.Trans, blas.ConjTrans: - } - if m < 0 { - panic(mLT0) - } - if n < 0 { - panic(nLT0) - } - if kL < 0 { - panic(kLLT0) - } - if kU < 0 { - panic(kULT0) - } - if lda < kL+kU+1 { - panic(badLdA) - } - if incX == 0 { - panic(zeroIncX) - } - if incY == 0 { - panic(zeroIncY) - } - - // Quick return if possible. - if m == 0 || n == 0 { - return - } - - // For zero matrix size the following slice length checks are trivially satisfied. - if len(a) < lda*(min(m, n+kL)-1)+kL+kU+1 { - panic(shortA) - } - var lenX, lenY int - if trans == blas.NoTrans { - lenX, lenY = n, m - } else { - lenX, lenY = m, n - } - if (incX > 0 && len(x) <= (lenX-1)*incX) || (incX < 0 && len(x) <= (1-lenX)*incX) { - panic(shortX) - } - if (incY > 0 && len(y) <= (lenY-1)*incY) || (incY < 0 && len(y) <= (1-lenY)*incY) { - panic(shortY) - } - - // Quick return if possible. - if alpha == 0 && beta == 1 { - return - } - - var kx int - if incX < 0 { - kx = (1 - lenX) * incX - } - var ky int - if incY < 0 { - ky = (1 - lenY) * incY - } - - // Form y = beta*y. - if beta != 1 { - if incY == 1 { - if beta == 0 { - for i := range y[:lenY] { - y[i] = 0 - } - } else { - c64.ScalUnitary(beta, y[:lenY]) - } - } else { - iy := ky - if beta == 0 { - for i := 0; i < lenY; i++ { - y[iy] = 0 - iy += incY - } - } else { - if incY > 0 { - c64.ScalInc(beta, y, uintptr(lenY), uintptr(incY)) - } else { - c64.ScalInc(beta, y, uintptr(lenY), uintptr(-incY)) - } - } - } - } - - nRow := min(m, n+kL) - nCol := kL + 1 + kU - switch trans { - case blas.NoTrans: - iy := ky - if incX == 1 { - for i := 0; i < nRow; i++ { - l := max(0, kL-i) - u := min(nCol, n+kL-i) - aRow := a[i*lda+l : i*lda+u] - off := max(0, i-kL) - xtmp := x[off : off+u-l] - var sum complex64 - for j, v := range aRow { - sum += xtmp[j] * v - } - y[iy] += alpha * sum - iy += incY - } - } else { - for i := 0; i < nRow; i++ { - l := max(0, kL-i) - u := min(nCol, n+kL-i) - aRow := a[i*lda+l : i*lda+u] - off := max(0, i-kL) * incX - jx := kx - var sum complex64 - for _, v := range aRow { - sum += x[off+jx] * v - jx += incX - } - y[iy] += alpha * sum - iy += incY - } - } - case blas.Trans: - if incX == 1 { - for i := 0; i < nRow; i++ { - l := max(0, kL-i) - u := min(nCol, n+kL-i) - aRow := a[i*lda+l : i*lda+u] - off := max(0, i-kL) * incY - alphaxi := alpha * x[i] - jy := ky - for _, v := range aRow { - y[off+jy] += alphaxi * v - jy += incY - } - } - } else { - ix := kx - for i := 0; i < nRow; i++ { - l := max(0, kL-i) - u := min(nCol, n+kL-i) - aRow := a[i*lda+l : i*lda+u] - off := max(0, i-kL) * incY - alphaxi := alpha * x[ix] - jy := ky - for _, v := range aRow { - y[off+jy] += alphaxi * v - jy += incY - } - ix += incX - } - } - case blas.ConjTrans: - if incX == 1 { - for i := 0; i < nRow; i++ { - l := max(0, kL-i) - u := min(nCol, n+kL-i) - aRow := a[i*lda+l : i*lda+u] - off := max(0, i-kL) * incY - alphaxi := alpha * x[i] - jy := ky - for _, v := range aRow { - y[off+jy] += alphaxi * cmplx.Conj(v) - jy += incY - } - } - } else { - ix := kx - for i := 0; i < nRow; i++ { - l := max(0, kL-i) - u := min(nCol, n+kL-i) - aRow := a[i*lda+l : i*lda+u] - off := max(0, i-kL) * incY - alphaxi := alpha * x[ix] - jy := ky - for _, v := range aRow { - y[off+jy] += alphaxi * cmplx.Conj(v) - jy += incY - } - ix += incX - } - } - } -} - -// Cgemv performs one of the matrix-vector operations -// y = alpha * A * x + beta * y if trans = blas.NoTrans -// y = alpha * A^T * x + beta * y if trans = blas.Trans -// y = alpha * A^H * x + beta * y if trans = blas.ConjTrans -// where alpha and beta are scalars, x and y are vectors, and A is an m×n dense matrix. -// -// Complex64 implementations are autogenerated and not directly tested. -func (Implementation) Cgemv(trans blas.Transpose, m, n int, alpha complex64, a []complex64, lda int, x []complex64, incX int, beta complex64, y []complex64, incY int) { - switch trans { - default: - panic(badTranspose) - case blas.NoTrans, blas.Trans, blas.ConjTrans: - } - if m < 0 { - panic(mLT0) - } - if n < 0 { - panic(nLT0) - } - if lda < max(1, n) { - panic(badLdA) - } - if incX == 0 { - panic(zeroIncX) - } - if incY == 0 { - panic(zeroIncY) - } - - // Quick return if possible. - if m == 0 || n == 0 { - return - } - - // For zero matrix size the following slice length checks are trivially satisfied. - var lenX, lenY int - if trans == blas.NoTrans { - lenX = n - lenY = m - } else { - lenX = m - lenY = n - } - if len(a) < lda*(m-1)+n { - panic(shortA) - } - if (incX > 0 && len(x) <= (lenX-1)*incX) || (incX < 0 && len(x) <= (1-lenX)*incX) { - panic(shortX) - } - if (incY > 0 && len(y) <= (lenY-1)*incY) || (incY < 0 && len(y) <= (1-lenY)*incY) { - panic(shortY) - } - - // Quick return if possible. - if alpha == 0 && beta == 1 { - return - } - - var kx int - if incX < 0 { - kx = (1 - lenX) * incX - } - var ky int - if incY < 0 { - ky = (1 - lenY) * incY - } - - // Form y = beta*y. - if beta != 1 { - if incY == 1 { - if beta == 0 { - for i := range y[:lenY] { - y[i] = 0 - } - } else { - c64.ScalUnitary(beta, y[:lenY]) - } - } else { - iy := ky - if beta == 0 { - for i := 0; i < lenY; i++ { - y[iy] = 0 - iy += incY - } - } else { - if incY > 0 { - c64.ScalInc(beta, y, uintptr(lenY), uintptr(incY)) - } else { - c64.ScalInc(beta, y, uintptr(lenY), uintptr(-incY)) - } - } - } - } - - if alpha == 0 { - return - } - - switch trans { - default: - // Form y = alpha*A*x + y. - iy := ky - if incX == 1 { - for i := 0; i < m; i++ { - y[iy] += alpha * c64.DotuUnitary(a[i*lda:i*lda+n], x[:n]) - iy += incY - } - return - } - for i := 0; i < m; i++ { - y[iy] += alpha * c64.DotuInc(a[i*lda:i*lda+n], x, uintptr(n), 1, uintptr(incX), 0, uintptr(kx)) - iy += incY - } - return - - case blas.Trans: - // Form y = alpha*A^T*x + y. - ix := kx - if incY == 1 { - for i := 0; i < m; i++ { - c64.AxpyUnitary(alpha*x[ix], a[i*lda:i*lda+n], y[:n]) - ix += incX - } - return - } - for i := 0; i < m; i++ { - c64.AxpyInc(alpha*x[ix], a[i*lda:i*lda+n], y, uintptr(n), 1, uintptr(incY), 0, uintptr(ky)) - ix += incX - } - return - - case blas.ConjTrans: - // Form y = alpha*A^H*x + y. - ix := kx - if incY == 1 { - for i := 0; i < m; i++ { - tmp := alpha * x[ix] - for j := 0; j < n; j++ { - y[j] += tmp * cmplx.Conj(a[i*lda+j]) - } - ix += incX - } - return - } - for i := 0; i < m; i++ { - tmp := alpha * x[ix] - jy := ky - for j := 0; j < n; j++ { - y[jy] += tmp * cmplx.Conj(a[i*lda+j]) - jy += incY - } - ix += incX - } - return - } -} - -// Cgerc performs the rank-one operation -// A += alpha * x * y^H -// where A is an m×n dense matrix, alpha is a scalar, x is an m element vector, -// and y is an n element vector. -// -// Complex64 implementations are autogenerated and not directly tested. -func (Implementation) Cgerc(m, n int, alpha complex64, x []complex64, incX int, y []complex64, incY int, a []complex64, lda int) { - if m < 0 { - panic(mLT0) - } - if n < 0 { - panic(nLT0) - } - if lda < max(1, n) { - panic(badLdA) - } - if incX == 0 { - panic(zeroIncX) - } - if incY == 0 { - panic(zeroIncY) - } - - // Quick return if possible. - if m == 0 || n == 0 { - return - } - - // For zero matrix size the following slice length checks are trivially satisfied. - if (incX > 0 && len(x) <= (m-1)*incX) || (incX < 0 && len(x) <= (1-m)*incX) { - panic(shortX) - } - if (incY > 0 && len(y) <= (n-1)*incY) || (incY < 0 && len(y) <= (1-n)*incY) { - panic(shortY) - } - if len(a) < lda*(m-1)+n { - panic(shortA) - } - - // Quick return if possible. - if alpha == 0 { - return - } - - var kx, jy int - if incX < 0 { - kx = (1 - m) * incX - } - if incY < 0 { - jy = (1 - n) * incY - } - for j := 0; j < n; j++ { - if y[jy] != 0 { - tmp := alpha * cmplx.Conj(y[jy]) - c64.AxpyInc(tmp, x, a[j:], uintptr(m), uintptr(incX), uintptr(lda), uintptr(kx), 0) - } - jy += incY - } -} - -// Cgeru performs the rank-one operation -// A += alpha * x * y^T -// where A is an m×n dense matrix, alpha is a scalar, x is an m element vector, -// and y is an n element vector. -// -// Complex64 implementations are autogenerated and not directly tested. -func (Implementation) Cgeru(m, n int, alpha complex64, x []complex64, incX int, y []complex64, incY int, a []complex64, lda int) { - if m < 0 { - panic(mLT0) - } - if n < 0 { - panic(nLT0) - } - if lda < max(1, n) { - panic(badLdA) - } - if incX == 0 { - panic(zeroIncX) - } - if incY == 0 { - panic(zeroIncY) - } - - // Quick return if possible. - if m == 0 || n == 0 { - return - } - - // For zero matrix size the following slice length checks are trivially satisfied. - if (incX > 0 && len(x) <= (m-1)*incX) || (incX < 0 && len(x) <= (1-m)*incX) { - panic(shortX) - } - if (incY > 0 && len(y) <= (n-1)*incY) || (incY < 0 && len(y) <= (1-n)*incY) { - panic(shortY) - } - if len(a) < lda*(m-1)+n { - panic(shortA) - } - - // Quick return if possible. - if alpha == 0 { - return - } - - var kx int - if incX < 0 { - kx = (1 - m) * incX - } - if incY == 1 { - for i := 0; i < m; i++ { - if x[kx] != 0 { - tmp := alpha * x[kx] - c64.AxpyUnitary(tmp, y[:n], a[i*lda:i*lda+n]) - } - kx += incX - } - return - } - var jy int - if incY < 0 { - jy = (1 - n) * incY - } - for i := 0; i < m; i++ { - if x[kx] != 0 { - tmp := alpha * x[kx] - c64.AxpyInc(tmp, y, a[i*lda:i*lda+n], uintptr(n), uintptr(incY), 1, uintptr(jy), 0) - } - kx += incX - } -} - -// Chbmv performs the matrix-vector operation -// y = alpha * A * x + beta * y -// where alpha and beta are scalars, x and y are vectors, and A is an n×n -// Hermitian band matrix with k super-diagonals. The imaginary parts of -// the diagonal elements of A are ignored and assumed to be zero. -// -// Complex64 implementations are autogenerated and not directly tested. -func (Implementation) Chbmv(uplo blas.Uplo, n, k int, alpha complex64, a []complex64, lda int, x []complex64, incX int, beta complex64, y []complex64, incY int) { - switch uplo { - default: - panic(badUplo) - case blas.Upper, blas.Lower: - } - if n < 0 { - panic(nLT0) - } - if k < 0 { - panic(kLT0) - } - if lda < k+1 { - panic(badLdA) - } - if incX == 0 { - panic(zeroIncX) - } - if incY == 0 { - panic(zeroIncY) - } - - // Quick return if possible. - if n == 0 { - return - } - - // For zero matrix size the following slice length checks are trivially satisfied. - if len(a) < lda*(n-1)+k+1 { - panic(shortA) - } - if (incX > 0 && len(x) <= (n-1)*incX) || (incX < 0 && len(x) <= (1-n)*incX) { - panic(shortX) - } - if (incY > 0 && len(y) <= (n-1)*incY) || (incY < 0 && len(y) <= (1-n)*incY) { - panic(shortY) - } - - // Quick return if possible. - if alpha == 0 && beta == 1 { - return - } - - // Set up the start indices in X and Y. - var kx int - if incX < 0 { - kx = (1 - n) * incX - } - var ky int - if incY < 0 { - ky = (1 - n) * incY - } - - // Form y = beta*y. - if beta != 1 { - if incY == 1 { - if beta == 0 { - for i := range y[:n] { - y[i] = 0 - } - } else { - for i, v := range y[:n] { - y[i] = beta * v - } - } - } else { - iy := ky - if beta == 0 { - for i := 0; i < n; i++ { - y[iy] = 0 - iy += incY - } - } else { - for i := 0; i < n; i++ { - y[iy] = beta * y[iy] - iy += incY - } - } - } - } - - if alpha == 0 { - return - } - - // The elements of A are accessed sequentially with one pass through a. - switch uplo { - case blas.Upper: - iy := ky - if incX == 1 { - for i := 0; i < n; i++ { - aRow := a[i*lda:] - alphaxi := alpha * x[i] - sum := alphaxi * complex(real(aRow[0]), 0) - u := min(k+1, n-i) - jy := incY - for j := 1; j < u; j++ { - v := aRow[j] - sum += alpha * x[i+j] * v - y[iy+jy] += alphaxi * cmplx.Conj(v) - jy += incY - } - y[iy] += sum - iy += incY - } - } else { - ix := kx - for i := 0; i < n; i++ { - aRow := a[i*lda:] - alphaxi := alpha * x[ix] - sum := alphaxi * complex(real(aRow[0]), 0) - u := min(k+1, n-i) - jx := incX - jy := incY - for j := 1; j < u; j++ { - v := aRow[j] - sum += alpha * x[ix+jx] * v - y[iy+jy] += alphaxi * cmplx.Conj(v) - jx += incX - jy += incY - } - y[iy] += sum - ix += incX - iy += incY - } - } - case blas.Lower: - iy := ky - if incX == 1 { - for i := 0; i < n; i++ { - l := max(0, k-i) - alphaxi := alpha * x[i] - jy := l * incY - aRow := a[i*lda:] - for j := l; j < k; j++ { - v := aRow[j] - y[iy] += alpha * v * x[i-k+j] - y[iy-k*incY+jy] += alphaxi * cmplx.Conj(v) - jy += incY - } - y[iy] += alphaxi * complex(real(aRow[k]), 0) - iy += incY - } - } else { - ix := kx - for i := 0; i < n; i++ { - l := max(0, k-i) - alphaxi := alpha * x[ix] - jx := l * incX - jy := l * incY - aRow := a[i*lda:] - for j := l; j < k; j++ { - v := aRow[j] - y[iy] += alpha * v * x[ix-k*incX+jx] - y[iy-k*incY+jy] += alphaxi * cmplx.Conj(v) - jx += incX - jy += incY - } - y[iy] += alphaxi * complex(real(aRow[k]), 0) - ix += incX - iy += incY - } - } - } -} - -// Chemv performs the matrix-vector operation -// y = alpha * A * x + beta * y -// where alpha and beta are scalars, x and y are vectors, and A is an n×n -// Hermitian matrix. The imaginary parts of the diagonal elements of A are -// ignored and assumed to be zero. -// -// Complex64 implementations are autogenerated and not directly tested. -func (Implementation) Chemv(uplo blas.Uplo, n int, alpha complex64, a []complex64, lda int, x []complex64, incX int, beta complex64, y []complex64, incY int) { - switch uplo { - default: - panic(badUplo) - case blas.Upper, blas.Lower: - } - if n < 0 { - panic(nLT0) - } - if lda < max(1, n) { - panic(badLdA) - } - if incX == 0 { - panic(zeroIncX) - } - if incY == 0 { - panic(zeroIncY) - } - - // Quick return if possible. - if n == 0 { - return - } - - // For zero matrix size the following slice length checks are trivially satisfied. - if len(a) < lda*(n-1)+n { - panic(shortA) - } - if (incX > 0 && len(x) <= (n-1)*incX) || (incX < 0 && len(x) <= (1-n)*incX) { - panic(shortX) - } - if (incY > 0 && len(y) <= (n-1)*incY) || (incY < 0 && len(y) <= (1-n)*incY) { - panic(shortY) - } - - // Quick return if possible. - if alpha == 0 && beta == 1 { - return - } - - // Set up the start indices in X and Y. - var kx int - if incX < 0 { - kx = (1 - n) * incX - } - var ky int - if incY < 0 { - ky = (1 - n) * incY - } - - // Form y = beta*y. - if beta != 1 { - if incY == 1 { - if beta == 0 { - for i := range y[:n] { - y[i] = 0 - } - } else { - for i, v := range y[:n] { - y[i] = beta * v - } - } - } else { - iy := ky - if beta == 0 { - for i := 0; i < n; i++ { - y[iy] = 0 - iy += incY - } - } else { - for i := 0; i < n; i++ { - y[iy] = beta * y[iy] - iy += incY - } - } - } - } - - if alpha == 0 { - return - } - - // The elements of A are accessed sequentially with one pass through - // the triangular part of A. - - if uplo == blas.Upper { - // Form y when A is stored in upper triangle. - if incX == 1 && incY == 1 { - for i := 0; i < n; i++ { - tmp1 := alpha * x[i] - var tmp2 complex64 - for j := i + 1; j < n; j++ { - y[j] += tmp1 * cmplx.Conj(a[i*lda+j]) - tmp2 += a[i*lda+j] * x[j] - } - aii := complex(real(a[i*lda+i]), 0) - y[i] += tmp1*aii + alpha*tmp2 - } - } else { - ix := kx - iy := ky - for i := 0; i < n; i++ { - tmp1 := alpha * x[ix] - var tmp2 complex64 - jx := ix - jy := iy - for j := i + 1; j < n; j++ { - jx += incX - jy += incY - y[jy] += tmp1 * cmplx.Conj(a[i*lda+j]) - tmp2 += a[i*lda+j] * x[jx] - } - aii := complex(real(a[i*lda+i]), 0) - y[iy] += tmp1*aii + alpha*tmp2 - ix += incX - iy += incY - } - } - return - } - - // Form y when A is stored in lower triangle. - if incX == 1 && incY == 1 { - for i := 0; i < n; i++ { - tmp1 := alpha * x[i] - var tmp2 complex64 - for j := 0; j < i; j++ { - y[j] += tmp1 * cmplx.Conj(a[i*lda+j]) - tmp2 += a[i*lda+j] * x[j] - } - aii := complex(real(a[i*lda+i]), 0) - y[i] += tmp1*aii + alpha*tmp2 - } - } else { - ix := kx - iy := ky - for i := 0; i < n; i++ { - tmp1 := alpha * x[ix] - var tmp2 complex64 - jx := kx - jy := ky - for j := 0; j < i; j++ { - y[jy] += tmp1 * cmplx.Conj(a[i*lda+j]) - tmp2 += a[i*lda+j] * x[jx] - jx += incX - jy += incY - } - aii := complex(real(a[i*lda+i]), 0) - y[iy] += tmp1*aii + alpha*tmp2 - ix += incX - iy += incY - } - } -} - -// Cher performs the Hermitian rank-one operation -// A += alpha * x * x^H -// where A is an n×n Hermitian matrix, alpha is a real scalar, and x is an n -// element vector. On entry, the imaginary parts of the diagonal elements of A -// are ignored and assumed to be zero, on return they will be set to zero. -// -// Complex64 implementations are autogenerated and not directly tested. -func (Implementation) Cher(uplo blas.Uplo, n int, alpha float32, x []complex64, incX int, a []complex64, lda int) { - switch uplo { - default: - panic(badUplo) - case blas.Upper, blas.Lower: - } - if n < 0 { - panic(nLT0) - } - if lda < max(1, n) { - panic(badLdA) - } - if incX == 0 { - panic(zeroIncX) - } - - // Quick return if possible. - if n == 0 { - return - } - - // For zero matrix size the following slice length checks are trivially satisfied. - if (incX > 0 && len(x) <= (n-1)*incX) || (incX < 0 && len(x) <= (1-n)*incX) { - panic(shortX) - } - if len(a) < lda*(n-1)+n { - panic(shortA) - } - - // Quick return if possible. - if alpha == 0 { - return - } - - var kx int - if incX < 0 { - kx = (1 - n) * incX - } - if uplo == blas.Upper { - if incX == 1 { - for i := 0; i < n; i++ { - if x[i] != 0 { - tmp := complex(alpha*real(x[i]), alpha*imag(x[i])) - aii := real(a[i*lda+i]) - xtmp := real(tmp * cmplx.Conj(x[i])) - a[i*lda+i] = complex(aii+xtmp, 0) - for j := i + 1; j < n; j++ { - a[i*lda+j] += tmp * cmplx.Conj(x[j]) - } - } else { - aii := real(a[i*lda+i]) - a[i*lda+i] = complex(aii, 0) - } - } - return - } - - ix := kx - for i := 0; i < n; i++ { - if x[ix] != 0 { - tmp := complex(alpha*real(x[ix]), alpha*imag(x[ix])) - aii := real(a[i*lda+i]) - xtmp := real(tmp * cmplx.Conj(x[ix])) - a[i*lda+i] = complex(aii+xtmp, 0) - jx := ix + incX - for j := i + 1; j < n; j++ { - a[i*lda+j] += tmp * cmplx.Conj(x[jx]) - jx += incX - } - } else { - aii := real(a[i*lda+i]) - a[i*lda+i] = complex(aii, 0) - } - ix += incX - } - return - } - - if incX == 1 { - for i := 0; i < n; i++ { - if x[i] != 0 { - tmp := complex(alpha*real(x[i]), alpha*imag(x[i])) - for j := 0; j < i; j++ { - a[i*lda+j] += tmp * cmplx.Conj(x[j]) - } - aii := real(a[i*lda+i]) - xtmp := real(tmp * cmplx.Conj(x[i])) - a[i*lda+i] = complex(aii+xtmp, 0) - } else { - aii := real(a[i*lda+i]) - a[i*lda+i] = complex(aii, 0) - } - } - return - } - - ix := kx - for i := 0; i < n; i++ { - if x[ix] != 0 { - tmp := complex(alpha*real(x[ix]), alpha*imag(x[ix])) - jx := kx - for j := 0; j < i; j++ { - a[i*lda+j] += tmp * cmplx.Conj(x[jx]) - jx += incX - } - aii := real(a[i*lda+i]) - xtmp := real(tmp * cmplx.Conj(x[ix])) - a[i*lda+i] = complex(aii+xtmp, 0) - - } else { - aii := real(a[i*lda+i]) - a[i*lda+i] = complex(aii, 0) - } - ix += incX - } -} - -// Cher2 performs the Hermitian rank-two operation -// A += alpha * x * y^H + conj(alpha) * y * x^H -// where alpha is a scalar, x and y are n element vectors and A is an n×n -// Hermitian matrix. On entry, the imaginary parts of the diagonal elements are -// ignored and assumed to be zero. On return they will be set to zero. -// -// Complex64 implementations are autogenerated and not directly tested. -func (Implementation) Cher2(uplo blas.Uplo, n int, alpha complex64, x []complex64, incX int, y []complex64, incY int, a []complex64, lda int) { - switch uplo { - default: - panic(badUplo) - case blas.Upper, blas.Lower: - } - if n < 0 { - panic(nLT0) - } - if lda < max(1, n) { - panic(badLdA) - } - if incX == 0 { - panic(zeroIncX) - } - if incY == 0 { - panic(zeroIncY) - } - - // Quick return if possible. - if n == 0 { - return - } - - // For zero matrix size the following slice length checks are trivially satisfied. - if (incX > 0 && len(x) <= (n-1)*incX) || (incX < 0 && len(x) <= (1-n)*incX) { - panic(shortX) - } - if (incY > 0 && len(y) <= (n-1)*incY) || (incY < 0 && len(y) <= (1-n)*incY) { - panic(shortY) - } - if len(a) < lda*(n-1)+n { - panic(shortA) - } - - // Quick return if possible. - if alpha == 0 { - return - } - - var kx, ky int - var ix, iy int - if incX != 1 || incY != 1 { - if incX < 0 { - kx = (1 - n) * incX - } - if incY < 0 { - ky = (1 - n) * incY - } - ix = kx - iy = ky - } - if uplo == blas.Upper { - if incX == 1 && incY == 1 { - for i := 0; i < n; i++ { - if x[i] != 0 || y[i] != 0 { - tmp1 := alpha * x[i] - tmp2 := cmplx.Conj(alpha) * y[i] - aii := real(a[i*lda+i]) + real(tmp1*cmplx.Conj(y[i])) + real(tmp2*cmplx.Conj(x[i])) - a[i*lda+i] = complex(aii, 0) - for j := i + 1; j < n; j++ { - a[i*lda+j] += tmp1*cmplx.Conj(y[j]) + tmp2*cmplx.Conj(x[j]) - } - } else { - aii := real(a[i*lda+i]) - a[i*lda+i] = complex(aii, 0) - } - } - return - } - for i := 0; i < n; i++ { - if x[ix] != 0 || y[iy] != 0 { - tmp1 := alpha * x[ix] - tmp2 := cmplx.Conj(alpha) * y[iy] - aii := real(a[i*lda+i]) + real(tmp1*cmplx.Conj(y[iy])) + real(tmp2*cmplx.Conj(x[ix])) - a[i*lda+i] = complex(aii, 0) - jx := ix + incX - jy := iy + incY - for j := i + 1; j < n; j++ { - a[i*lda+j] += tmp1*cmplx.Conj(y[jy]) + tmp2*cmplx.Conj(x[jx]) - jx += incX - jy += incY - } - } else { - aii := real(a[i*lda+i]) - a[i*lda+i] = complex(aii, 0) - } - ix += incX - iy += incY - } - return - } - - if incX == 1 && incY == 1 { - for i := 0; i < n; i++ { - if x[i] != 0 || y[i] != 0 { - tmp1 := alpha * x[i] - tmp2 := cmplx.Conj(alpha) * y[i] - for j := 0; j < i; j++ { - a[i*lda+j] += tmp1*cmplx.Conj(y[j]) + tmp2*cmplx.Conj(x[j]) - } - aii := real(a[i*lda+i]) + real(tmp1*cmplx.Conj(y[i])) + real(tmp2*cmplx.Conj(x[i])) - a[i*lda+i] = complex(aii, 0) - } else { - aii := real(a[i*lda+i]) - a[i*lda+i] = complex(aii, 0) - } - } - return - } - for i := 0; i < n; i++ { - if x[ix] != 0 || y[iy] != 0 { - tmp1 := alpha * x[ix] - tmp2 := cmplx.Conj(alpha) * y[iy] - jx := kx - jy := ky - for j := 0; j < i; j++ { - a[i*lda+j] += tmp1*cmplx.Conj(y[jy]) + tmp2*cmplx.Conj(x[jx]) - jx += incX - jy += incY - } - aii := real(a[i*lda+i]) + real(tmp1*cmplx.Conj(y[iy])) + real(tmp2*cmplx.Conj(x[ix])) - a[i*lda+i] = complex(aii, 0) - } else { - aii := real(a[i*lda+i]) - a[i*lda+i] = complex(aii, 0) - } - ix += incX - iy += incY - } -} - -// Chpmv performs the matrix-vector operation -// y = alpha * A * x + beta * y -// where alpha and beta are scalars, x and y are vectors, and A is an n×n -// Hermitian matrix in packed form. The imaginary parts of the diagonal -// elements of A are ignored and assumed to be zero. -// -// Complex64 implementations are autogenerated and not directly tested. -func (Implementation) Chpmv(uplo blas.Uplo, n int, alpha complex64, ap []complex64, x []complex64, incX int, beta complex64, y []complex64, incY int) { - switch uplo { - default: - panic(badUplo) - case blas.Upper, blas.Lower: - } - if n < 0 { - panic(nLT0) - } - if incX == 0 { - panic(zeroIncX) - } - if incY == 0 { - panic(zeroIncY) - } - - // Quick return if possible. - if n == 0 { - return - } - - // For zero matrix size the following slice length checks are trivially satisfied. - if len(ap) < n*(n+1)/2 { - panic(shortAP) - } - if (incX > 0 && len(x) <= (n-1)*incX) || (incX < 0 && len(x) <= (1-n)*incX) { - panic(shortX) - } - if (incY > 0 && len(y) <= (n-1)*incY) || (incY < 0 && len(y) <= (1-n)*incY) { - panic(shortY) - } - - // Quick return if possible. - if alpha == 0 && beta == 1 { - return - } - - // Set up the start indices in X and Y. - var kx int - if incX < 0 { - kx = (1 - n) * incX - } - var ky int - if incY < 0 { - ky = (1 - n) * incY - } - - // Form y = beta*y. - if beta != 1 { - if incY == 1 { - if beta == 0 { - for i := range y[:n] { - y[i] = 0 - } - } else { - for i, v := range y[:n] { - y[i] = beta * v - } - } - } else { - iy := ky - if beta == 0 { - for i := 0; i < n; i++ { - y[iy] = 0 - iy += incY - } - } else { - for i := 0; i < n; i++ { - y[iy] *= beta - iy += incY - } - } - } - } - - if alpha == 0 { - return - } - - // The elements of A are accessed sequentially with one pass through ap. - - var kk int - if uplo == blas.Upper { - // Form y when ap contains the upper triangle. - // Here, kk points to the current diagonal element in ap. - if incX == 1 && incY == 1 { - for i := 0; i < n; i++ { - tmp1 := alpha * x[i] - y[i] += tmp1 * complex(real(ap[kk]), 0) - var tmp2 complex64 - k := kk + 1 - for j := i + 1; j < n; j++ { - y[j] += tmp1 * cmplx.Conj(ap[k]) - tmp2 += ap[k] * x[j] - k++ - } - y[i] += alpha * tmp2 - kk += n - i - } - } else { - ix := kx - iy := ky - for i := 0; i < n; i++ { - tmp1 := alpha * x[ix] - y[iy] += tmp1 * complex(real(ap[kk]), 0) - var tmp2 complex64 - jx := ix - jy := iy - for k := kk + 1; k < kk+n-i; k++ { - jx += incX - jy += incY - y[jy] += tmp1 * cmplx.Conj(ap[k]) - tmp2 += ap[k] * x[jx] - } - y[iy] += alpha * tmp2 - ix += incX - iy += incY - kk += n - i - } - } - return - } - - // Form y when ap contains the lower triangle. - // Here, kk points to the beginning of current row in ap. - if incX == 1 && incY == 1 { - for i := 0; i < n; i++ { - tmp1 := alpha * x[i] - var tmp2 complex64 - k := kk - for j := 0; j < i; j++ { - y[j] += tmp1 * cmplx.Conj(ap[k]) - tmp2 += ap[k] * x[j] - k++ - } - aii := complex(real(ap[kk+i]), 0) - y[i] += tmp1*aii + alpha*tmp2 - kk += i + 1 - } - } else { - ix := kx - iy := ky - for i := 0; i < n; i++ { - tmp1 := alpha * x[ix] - var tmp2 complex64 - jx := kx - jy := ky - for k := kk; k < kk+i; k++ { - y[jy] += tmp1 * cmplx.Conj(ap[k]) - tmp2 += ap[k] * x[jx] - jx += incX - jy += incY - } - aii := complex(real(ap[kk+i]), 0) - y[iy] += tmp1*aii + alpha*tmp2 - ix += incX - iy += incY - kk += i + 1 - } - } -} - -// Chpr performs the Hermitian rank-1 operation -// A += alpha * x * x^H -// where alpha is a real scalar, x is a vector, and A is an n×n hermitian matrix -// in packed form. On entry, the imaginary parts of the diagonal elements are -// assumed to be zero, and on return they are set to zero. -// -// Complex64 implementations are autogenerated and not directly tested. -func (Implementation) Chpr(uplo blas.Uplo, n int, alpha float32, x []complex64, incX int, ap []complex64) { - switch uplo { - default: - panic(badUplo) - case blas.Upper, blas.Lower: - } - if n < 0 { - panic(nLT0) - } - if incX == 0 { - panic(zeroIncX) - } - - // Quick return if possible. - if n == 0 { - return - } - - // For zero matrix size the following slice length checks are trivially satisfied. - if (incX > 0 && len(x) <= (n-1)*incX) || (incX < 0 && len(x) <= (1-n)*incX) { - panic(shortX) - } - if len(ap) < n*(n+1)/2 { - panic(shortAP) - } - - // Quick return if possible. - if alpha == 0 { - return - } - - // Set up start index in X. - var kx int - if incX < 0 { - kx = (1 - n) * incX - } - - // The elements of A are accessed sequentially with one pass through ap. - - var kk int - if uplo == blas.Upper { - // Form A when upper triangle is stored in AP. - // Here, kk points to the current diagonal element in ap. - if incX == 1 { - for i := 0; i < n; i++ { - xi := x[i] - if xi != 0 { - aii := real(ap[kk]) + alpha*real(cmplx.Conj(xi)*xi) - ap[kk] = complex(aii, 0) - - tmp := complex(alpha, 0) * xi - a := ap[kk+1 : kk+n-i] - x := x[i+1 : n] - for j, v := range x { - a[j] += tmp * cmplx.Conj(v) - } - } else { - ap[kk] = complex(real(ap[kk]), 0) - } - kk += n - i - } - } else { - ix := kx - for i := 0; i < n; i++ { - xi := x[ix] - if xi != 0 { - aii := real(ap[kk]) + alpha*real(cmplx.Conj(xi)*xi) - ap[kk] = complex(aii, 0) - - tmp := complex(alpha, 0) * xi - jx := ix + incX - a := ap[kk+1 : kk+n-i] - for k := range a { - a[k] += tmp * cmplx.Conj(x[jx]) - jx += incX - } - } else { - ap[kk] = complex(real(ap[kk]), 0) - } - ix += incX - kk += n - i - } - } - return - } - - // Form A when lower triangle is stored in AP. - // Here, kk points to the beginning of current row in ap. - if incX == 1 { - for i := 0; i < n; i++ { - xi := x[i] - if xi != 0 { - tmp := complex(alpha, 0) * xi - a := ap[kk : kk+i] - for j, v := range x[:i] { - a[j] += tmp * cmplx.Conj(v) - } - - aii := real(ap[kk+i]) + alpha*real(cmplx.Conj(xi)*xi) - ap[kk+i] = complex(aii, 0) - } else { - ap[kk+i] = complex(real(ap[kk+i]), 0) - } - kk += i + 1 - } - } else { - ix := kx - for i := 0; i < n; i++ { - xi := x[ix] - if xi != 0 { - tmp := complex(alpha, 0) * xi - a := ap[kk : kk+i] - jx := kx - for k := range a { - a[k] += tmp * cmplx.Conj(x[jx]) - jx += incX - } - - aii := real(ap[kk+i]) + alpha*real(cmplx.Conj(xi)*xi) - ap[kk+i] = complex(aii, 0) - } else { - ap[kk+i] = complex(real(ap[kk+i]), 0) - } - ix += incX - kk += i + 1 - } - } -} - -// Chpr2 performs the Hermitian rank-2 operation -// A += alpha * x * y^H + conj(alpha) * y * x^H -// where alpha is a complex scalar, x and y are n element vectors, and A is an -// n×n Hermitian matrix, supplied in packed form. On entry, the imaginary parts -// of the diagonal elements are assumed to be zero, and on return they are set to zero. -// -// Complex64 implementations are autogenerated and not directly tested. -func (Implementation) Chpr2(uplo blas.Uplo, n int, alpha complex64, x []complex64, incX int, y []complex64, incY int, ap []complex64) { - switch uplo { - default: - panic(badUplo) - case blas.Upper, blas.Lower: - } - if n < 0 { - panic(nLT0) - } - if incX == 0 { - panic(zeroIncX) - } - if incY == 0 { - panic(zeroIncY) - } - - // Quick return if possible. - if n == 0 { - return - } - - // For zero matrix size the following slice length checks are trivially satisfied. - if (incX > 0 && len(x) <= (n-1)*incX) || (incX < 0 && len(x) <= (1-n)*incX) { - panic(shortX) - } - if (incY > 0 && len(y) <= (n-1)*incY) || (incY < 0 && len(y) <= (1-n)*incY) { - panic(shortY) - } - if len(ap) < n*(n+1)/2 { - panic(shortAP) - } - - // Quick return if possible. - if alpha == 0 { - return - } - - // Set up start indices in X and Y. - var kx int - if incX < 0 { - kx = (1 - n) * incX - } - var ky int - if incY < 0 { - ky = (1 - n) * incY - } - - // The elements of A are accessed sequentially with one pass through ap. - - var kk int - if uplo == blas.Upper { - // Form A when upper triangle is stored in AP. - // Here, kk points to the current diagonal element in ap. - if incX == 1 && incY == 1 { - for i := 0; i < n; i++ { - if x[i] != 0 || y[i] != 0 { - tmp1 := alpha * x[i] - tmp2 := cmplx.Conj(alpha) * y[i] - aii := real(ap[kk]) + real(tmp1*cmplx.Conj(y[i])) + real(tmp2*cmplx.Conj(x[i])) - ap[kk] = complex(aii, 0) - k := kk + 1 - for j := i + 1; j < n; j++ { - ap[k] += tmp1*cmplx.Conj(y[j]) + tmp2*cmplx.Conj(x[j]) - k++ - } - } else { - ap[kk] = complex(real(ap[kk]), 0) - } - kk += n - i - } - } else { - ix := kx - iy := ky - for i := 0; i < n; i++ { - if x[ix] != 0 || y[iy] != 0 { - tmp1 := alpha * x[ix] - tmp2 := cmplx.Conj(alpha) * y[iy] - aii := real(ap[kk]) + real(tmp1*cmplx.Conj(y[iy])) + real(tmp2*cmplx.Conj(x[ix])) - ap[kk] = complex(aii, 0) - jx := ix + incX - jy := iy + incY - for k := kk + 1; k < kk+n-i; k++ { - ap[k] += tmp1*cmplx.Conj(y[jy]) + tmp2*cmplx.Conj(x[jx]) - jx += incX - jy += incY - } - } else { - ap[kk] = complex(real(ap[kk]), 0) - } - ix += incX - iy += incY - kk += n - i - } - } - return - } - - // Form A when lower triangle is stored in AP. - // Here, kk points to the beginning of current row in ap. - if incX == 1 && incY == 1 { - for i := 0; i < n; i++ { - if x[i] != 0 || y[i] != 0 { - tmp1 := alpha * x[i] - tmp2 := cmplx.Conj(alpha) * y[i] - k := kk - for j := 0; j < i; j++ { - ap[k] += tmp1*cmplx.Conj(y[j]) + tmp2*cmplx.Conj(x[j]) - k++ - } - aii := real(ap[kk+i]) + real(tmp1*cmplx.Conj(y[i])) + real(tmp2*cmplx.Conj(x[i])) - ap[kk+i] = complex(aii, 0) - } else { - ap[kk+i] = complex(real(ap[kk+i]), 0) - } - kk += i + 1 - } - } else { - ix := kx - iy := ky - for i := 0; i < n; i++ { - if x[ix] != 0 || y[iy] != 0 { - tmp1 := alpha * x[ix] - tmp2 := cmplx.Conj(alpha) * y[iy] - jx := kx - jy := ky - for k := kk; k < kk+i; k++ { - ap[k] += tmp1*cmplx.Conj(y[jy]) + tmp2*cmplx.Conj(x[jx]) - jx += incX - jy += incY - } - aii := real(ap[kk+i]) + real(tmp1*cmplx.Conj(y[iy])) + real(tmp2*cmplx.Conj(x[ix])) - ap[kk+i] = complex(aii, 0) - } else { - ap[kk+i] = complex(real(ap[kk+i]), 0) - } - ix += incX - iy += incY - kk += i + 1 - } - } -} - -// Ctbmv performs one of the matrix-vector operations -// x = A * x if trans = blas.NoTrans -// x = A^T * x if trans = blas.Trans -// x = A^H * x if trans = blas.ConjTrans -// where x is an n element vector and A is an n×n triangular band matrix, with -// (k+1) diagonals. -// -// Complex64 implementations are autogenerated and not directly tested. -func (Implementation) Ctbmv(uplo blas.Uplo, trans blas.Transpose, diag blas.Diag, n, k int, a []complex64, lda int, x []complex64, incX int) { - switch trans { - default: - panic(badTranspose) - case blas.NoTrans, blas.Trans, blas.ConjTrans: - } - switch uplo { - default: - panic(badUplo) - case blas.Upper, blas.Lower: - } - switch diag { - default: - panic(badDiag) - case blas.NonUnit, blas.Unit: - } - if n < 0 { - panic(nLT0) - } - if k < 0 { - panic(kLT0) - } - if lda < k+1 { - panic(badLdA) - } - if incX == 0 { - panic(zeroIncX) - } - - // Quick return if possible. - if n == 0 { - return - } - - // For zero matrix size the following slice length checks are trivially satisfied. - if len(a) < lda*(n-1)+k+1 { - panic(shortA) - } - if (incX > 0 && len(x) <= (n-1)*incX) || (incX < 0 && len(x) <= (1-n)*incX) { - panic(shortX) - } - - // Set up start index in X. - var kx int - if incX < 0 { - kx = (1 - n) * incX - } - - switch trans { - case blas.NoTrans: - if uplo == blas.Upper { - if incX == 1 { - for i := 0; i < n; i++ { - xi := x[i] - if diag == blas.NonUnit { - xi *= a[i*lda] - } - kk := min(k, n-i-1) - for j, aij := range a[i*lda+1 : i*lda+kk+1] { - xi += x[i+j+1] * aij - } - x[i] = xi - } - } else { - ix := kx - for i := 0; i < n; i++ { - xi := x[ix] - if diag == blas.NonUnit { - xi *= a[i*lda] - } - kk := min(k, n-i-1) - jx := ix + incX - for _, aij := range a[i*lda+1 : i*lda+kk+1] { - xi += x[jx] * aij - jx += incX - } - x[ix] = xi - ix += incX - } - } - } else { - if incX == 1 { - for i := n - 1; i >= 0; i-- { - xi := x[i] - if diag == blas.NonUnit { - xi *= a[i*lda+k] - } - kk := min(k, i) - for j, aij := range a[i*lda+k-kk : i*lda+k] { - xi += x[i-kk+j] * aij - } - x[i] = xi - } - } else { - ix := kx + (n-1)*incX - for i := n - 1; i >= 0; i-- { - xi := x[ix] - if diag == blas.NonUnit { - xi *= a[i*lda+k] - } - kk := min(k, i) - jx := ix - kk*incX - for _, aij := range a[i*lda+k-kk : i*lda+k] { - xi += x[jx] * aij - jx += incX - } - x[ix] = xi - ix -= incX - } - } - } - case blas.Trans: - if uplo == blas.Upper { - if incX == 1 { - for i := n - 1; i >= 0; i-- { - kk := min(k, n-i-1) - xi := x[i] - for j, aij := range a[i*lda+1 : i*lda+kk+1] { - x[i+j+1] += xi * aij - } - if diag == blas.NonUnit { - x[i] *= a[i*lda] - } - } - } else { - ix := kx + (n-1)*incX - for i := n - 1; i >= 0; i-- { - kk := min(k, n-i-1) - jx := ix + incX - xi := x[ix] - for _, aij := range a[i*lda+1 : i*lda+kk+1] { - x[jx] += xi * aij - jx += incX - } - if diag == blas.NonUnit { - x[ix] *= a[i*lda] - } - ix -= incX - } - } - } else { - if incX == 1 { - for i := 0; i < n; i++ { - kk := min(k, i) - xi := x[i] - for j, aij := range a[i*lda+k-kk : i*lda+k] { - x[i-kk+j] += xi * aij - } - if diag == blas.NonUnit { - x[i] *= a[i*lda+k] - } - } - } else { - ix := kx - for i := 0; i < n; i++ { - kk := min(k, i) - jx := ix - kk*incX - xi := x[ix] - for _, aij := range a[i*lda+k-kk : i*lda+k] { - x[jx] += xi * aij - jx += incX - } - if diag == blas.NonUnit { - x[ix] *= a[i*lda+k] - } - ix += incX - } - } - } - case blas.ConjTrans: - if uplo == blas.Upper { - if incX == 1 { - for i := n - 1; i >= 0; i-- { - kk := min(k, n-i-1) - xi := x[i] - for j, aij := range a[i*lda+1 : i*lda+kk+1] { - x[i+j+1] += xi * cmplx.Conj(aij) - } - if diag == blas.NonUnit { - x[i] *= cmplx.Conj(a[i*lda]) - } - } - } else { - ix := kx + (n-1)*incX - for i := n - 1; i >= 0; i-- { - kk := min(k, n-i-1) - jx := ix + incX - xi := x[ix] - for _, aij := range a[i*lda+1 : i*lda+kk+1] { - x[jx] += xi * cmplx.Conj(aij) - jx += incX - } - if diag == blas.NonUnit { - x[ix] *= cmplx.Conj(a[i*lda]) - } - ix -= incX - } - } - } else { - if incX == 1 { - for i := 0; i < n; i++ { - kk := min(k, i) - xi := x[i] - for j, aij := range a[i*lda+k-kk : i*lda+k] { - x[i-kk+j] += xi * cmplx.Conj(aij) - } - if diag == blas.NonUnit { - x[i] *= cmplx.Conj(a[i*lda+k]) - } - } - } else { - ix := kx - for i := 0; i < n; i++ { - kk := min(k, i) - jx := ix - kk*incX - xi := x[ix] - for _, aij := range a[i*lda+k-kk : i*lda+k] { - x[jx] += xi * cmplx.Conj(aij) - jx += incX - } - if diag == blas.NonUnit { - x[ix] *= cmplx.Conj(a[i*lda+k]) - } - ix += incX - } - } - } - } -} - -// Ctbsv solves one of the systems of equations -// A * x = b if trans == blas.NoTrans -// A^T * x = b if trans == blas.Trans -// A^H * x = b if trans == blas.ConjTrans -// where b and x are n element vectors and A is an n×n triangular band matrix -// with (k+1) diagonals. -// -// On entry, x contains the values of b, and the solution is -// stored in-place into x. -// -// No test for singularity or near-singularity is included in this -// routine. Such tests must be performed before calling this routine. -// -// Complex64 implementations are autogenerated and not directly tested. -func (Implementation) Ctbsv(uplo blas.Uplo, trans blas.Transpose, diag blas.Diag, n, k int, a []complex64, lda int, x []complex64, incX int) { - switch trans { - default: - panic(badTranspose) - case blas.NoTrans, blas.Trans, blas.ConjTrans: - } - switch uplo { - default: - panic(badUplo) - case blas.Upper, blas.Lower: - } - switch diag { - default: - panic(badDiag) - case blas.NonUnit, blas.Unit: - } - if n < 0 { - panic(nLT0) - } - if k < 0 { - panic(kLT0) - } - if lda < k+1 { - panic(badLdA) - } - if incX == 0 { - panic(zeroIncX) - } - - // Quick return if possible. - if n == 0 { - return - } - - // For zero matrix size the following slice length checks are trivially satisfied. - if len(a) < lda*(n-1)+k+1 { - panic(shortA) - } - if (incX > 0 && len(x) <= (n-1)*incX) || (incX < 0 && len(x) <= (1-n)*incX) { - panic(shortX) - } - - // Set up start index in X. - var kx int - if incX < 0 { - kx = (1 - n) * incX - } - - switch trans { - case blas.NoTrans: - if uplo == blas.Upper { - if incX == 1 { - for i := n - 1; i >= 0; i-- { - kk := min(k, n-i-1) - var sum complex64 - for j, aij := range a[i*lda+1 : i*lda+kk+1] { - sum += x[i+1+j] * aij - } - x[i] -= sum - if diag == blas.NonUnit { - x[i] /= a[i*lda] - } - } - } else { - ix := kx + (n-1)*incX - for i := n - 1; i >= 0; i-- { - kk := min(k, n-i-1) - var sum complex64 - jx := ix + incX - for _, aij := range a[i*lda+1 : i*lda+kk+1] { - sum += x[jx] * aij - jx += incX - } - x[ix] -= sum - if diag == blas.NonUnit { - x[ix] /= a[i*lda] - } - ix -= incX - } - } - } else { - if incX == 1 { - for i := 0; i < n; i++ { - kk := min(k, i) - var sum complex64 - for j, aij := range a[i*lda+k-kk : i*lda+k] { - sum += x[i-kk+j] * aij - } - x[i] -= sum - if diag == blas.NonUnit { - x[i] /= a[i*lda+k] - } - } - } else { - ix := kx - for i := 0; i < n; i++ { - kk := min(k, i) - var sum complex64 - jx := ix - kk*incX - for _, aij := range a[i*lda+k-kk : i*lda+k] { - sum += x[jx] * aij - jx += incX - } - x[ix] -= sum - if diag == blas.NonUnit { - x[ix] /= a[i*lda+k] - } - ix += incX - } - } - } - case blas.Trans: - if uplo == blas.Upper { - if incX == 1 { - for i := 0; i < n; i++ { - if diag == blas.NonUnit { - x[i] /= a[i*lda] - } - kk := min(k, n-i-1) - xi := x[i] - for j, aij := range a[i*lda+1 : i*lda+kk+1] { - x[i+1+j] -= xi * aij - } - } - } else { - ix := kx - for i := 0; i < n; i++ { - if diag == blas.NonUnit { - x[ix] /= a[i*lda] - } - kk := min(k, n-i-1) - xi := x[ix] - jx := ix + incX - for _, aij := range a[i*lda+1 : i*lda+kk+1] { - x[jx] -= xi * aij - jx += incX - } - ix += incX - } - } - } else { - if incX == 1 { - for i := n - 1; i >= 0; i-- { - if diag == blas.NonUnit { - x[i] /= a[i*lda+k] - } - kk := min(k, i) - xi := x[i] - for j, aij := range a[i*lda+k-kk : i*lda+k] { - x[i-kk+j] -= xi * aij - } - } - } else { - ix := kx + (n-1)*incX - for i := n - 1; i >= 0; i-- { - if diag == blas.NonUnit { - x[ix] /= a[i*lda+k] - } - kk := min(k, i) - xi := x[ix] - jx := ix - kk*incX - for _, aij := range a[i*lda+k-kk : i*lda+k] { - x[jx] -= xi * aij - jx += incX - } - ix -= incX - } - } - } - case blas.ConjTrans: - if uplo == blas.Upper { - if incX == 1 { - for i := 0; i < n; i++ { - if diag == blas.NonUnit { - x[i] /= cmplx.Conj(a[i*lda]) - } - kk := min(k, n-i-1) - xi := x[i] - for j, aij := range a[i*lda+1 : i*lda+kk+1] { - x[i+1+j] -= xi * cmplx.Conj(aij) - } - } - } else { - ix := kx - for i := 0; i < n; i++ { - if diag == blas.NonUnit { - x[ix] /= cmplx.Conj(a[i*lda]) - } - kk := min(k, n-i-1) - xi := x[ix] - jx := ix + incX - for _, aij := range a[i*lda+1 : i*lda+kk+1] { - x[jx] -= xi * cmplx.Conj(aij) - jx += incX - } - ix += incX - } - } - } else { - if incX == 1 { - for i := n - 1; i >= 0; i-- { - if diag == blas.NonUnit { - x[i] /= cmplx.Conj(a[i*lda+k]) - } - kk := min(k, i) - xi := x[i] - for j, aij := range a[i*lda+k-kk : i*lda+k] { - x[i-kk+j] -= xi * cmplx.Conj(aij) - } - } - } else { - ix := kx + (n-1)*incX - for i := n - 1; i >= 0; i-- { - if diag == blas.NonUnit { - x[ix] /= cmplx.Conj(a[i*lda+k]) - } - kk := min(k, i) - xi := x[ix] - jx := ix - kk*incX - for _, aij := range a[i*lda+k-kk : i*lda+k] { - x[jx] -= xi * cmplx.Conj(aij) - jx += incX - } - ix -= incX - } - } - } - } -} - -// Ctpmv performs one of the matrix-vector operations -// x = A * x if trans = blas.NoTrans -// x = A^T * x if trans = blas.Trans -// x = A^H * x if trans = blas.ConjTrans -// where x is an n element vector and A is an n×n triangular matrix, supplied in -// packed form. -// -// Complex64 implementations are autogenerated and not directly tested. -func (Implementation) Ctpmv(uplo blas.Uplo, trans blas.Transpose, diag blas.Diag, n int, ap []complex64, x []complex64, incX int) { - switch uplo { - default: - panic(badUplo) - case blas.Upper, blas.Lower: - } - switch trans { - default: - panic(badTranspose) - case blas.NoTrans, blas.Trans, blas.ConjTrans: - } - switch diag { - default: - panic(badDiag) - case blas.NonUnit, blas.Unit: - } - if n < 0 { - panic(nLT0) - } - if incX == 0 { - panic(zeroIncX) - } - - // Quick return if possible. - if n == 0 { - return - } - - // For zero matrix size the following slice length checks are trivially satisfied. - if len(ap) < n*(n+1)/2 { - panic(shortAP) - } - if (incX > 0 && len(x) <= (n-1)*incX) || (incX < 0 && len(x) <= (1-n)*incX) { - panic(shortX) - } - - // Set up start index in X. - var kx int - if incX < 0 { - kx = (1 - n) * incX - } - - // The elements of A are accessed sequentially with one pass through A. - - if trans == blas.NoTrans { - // Form x = A*x. - if uplo == blas.Upper { - // kk points to the current diagonal element in ap. - kk := 0 - if incX == 1 { - x = x[:n] - for i := range x { - if diag == blas.NonUnit { - x[i] *= ap[kk] - } - if n-i-1 > 0 { - x[i] += c64.DotuUnitary(ap[kk+1:kk+n-i], x[i+1:]) - } - kk += n - i - } - } else { - ix := kx - for i := 0; i < n; i++ { - if diag == blas.NonUnit { - x[ix] *= ap[kk] - } - if n-i-1 > 0 { - x[ix] += c64.DotuInc(ap[kk+1:kk+n-i], x, uintptr(n-i-1), 1, uintptr(incX), 0, uintptr(ix+incX)) - } - ix += incX - kk += n - i - } - } - } else { - // kk points to the beginning of current row in ap. - kk := n*(n+1)/2 - n - if incX == 1 { - for i := n - 1; i >= 0; i-- { - if diag == blas.NonUnit { - x[i] *= ap[kk+i] - } - if i > 0 { - x[i] += c64.DotuUnitary(ap[kk:kk+i], x[:i]) - } - kk -= i - } - } else { - ix := kx + (n-1)*incX - for i := n - 1; i >= 0; i-- { - if diag == blas.NonUnit { - x[ix] *= ap[kk+i] - } - if i > 0 { - x[ix] += c64.DotuInc(ap[kk:kk+i], x, uintptr(i), 1, uintptr(incX), 0, uintptr(kx)) - } - ix -= incX - kk -= i - } - } - } - return - } - - if trans == blas.Trans { - // Form x = A^T*x. - if uplo == blas.Upper { - // kk points to the current diagonal element in ap. - kk := n*(n+1)/2 - 1 - if incX == 1 { - for i := n - 1; i >= 0; i-- { - xi := x[i] - if diag == blas.NonUnit { - x[i] *= ap[kk] - } - if n-i-1 > 0 { - c64.AxpyUnitary(xi, ap[kk+1:kk+n-i], x[i+1:n]) - } - kk -= n - i + 1 - } - } else { - ix := kx + (n-1)*incX - for i := n - 1; i >= 0; i-- { - xi := x[ix] - if diag == blas.NonUnit { - x[ix] *= ap[kk] - } - if n-i-1 > 0 { - c64.AxpyInc(xi, ap[kk+1:kk+n-i], x, uintptr(n-i-1), 1, uintptr(incX), 0, uintptr(ix+incX)) - } - ix -= incX - kk -= n - i + 1 - } - } - } else { - // kk points to the beginning of current row in ap. - kk := 0 - if incX == 1 { - x = x[:n] - for i := range x { - if i > 0 { - c64.AxpyUnitary(x[i], ap[kk:kk+i], x[:i]) - } - if diag == blas.NonUnit { - x[i] *= ap[kk+i] - } - kk += i + 1 - } - } else { - ix := kx - for i := 0; i < n; i++ { - if i > 0 { - c64.AxpyInc(x[ix], ap[kk:kk+i], x, uintptr(i), 1, uintptr(incX), 0, uintptr(kx)) - } - if diag == blas.NonUnit { - x[ix] *= ap[kk+i] - } - ix += incX - kk += i + 1 - } - } - } - return - } - - // Form x = A^H*x. - if uplo == blas.Upper { - // kk points to the current diagonal element in ap. - kk := n*(n+1)/2 - 1 - if incX == 1 { - for i := n - 1; i >= 0; i-- { - xi := x[i] - if diag == blas.NonUnit { - x[i] *= cmplx.Conj(ap[kk]) - } - k := kk + 1 - for j := i + 1; j < n; j++ { - x[j] += xi * cmplx.Conj(ap[k]) - k++ - } - kk -= n - i + 1 - } - } else { - ix := kx + (n-1)*incX - for i := n - 1; i >= 0; i-- { - xi := x[ix] - if diag == blas.NonUnit { - x[ix] *= cmplx.Conj(ap[kk]) - } - jx := ix + incX - k := kk + 1 - for j := i + 1; j < n; j++ { - x[jx] += xi * cmplx.Conj(ap[k]) - jx += incX - k++ - } - ix -= incX - kk -= n - i + 1 - } - } - } else { - // kk points to the beginning of current row in ap. - kk := 0 - if incX == 1 { - x = x[:n] - for i, xi := range x { - for j := 0; j < i; j++ { - x[j] += xi * cmplx.Conj(ap[kk+j]) - } - if diag == blas.NonUnit { - x[i] *= cmplx.Conj(ap[kk+i]) - } - kk += i + 1 - } - } else { - ix := kx - for i := 0; i < n; i++ { - xi := x[ix] - jx := kx - for j := 0; j < i; j++ { - x[jx] += xi * cmplx.Conj(ap[kk+j]) - jx += incX - } - if diag == blas.NonUnit { - x[ix] *= cmplx.Conj(ap[kk+i]) - } - ix += incX - kk += i + 1 - } - } - } -} - -// Ctpsv solves one of the systems of equations -// A * x = b if trans == blas.NoTrans -// A^T * x = b if trans == blas.Trans -// A^H * x = b if trans == blas.ConjTrans -// where b and x are n element vectors and A is an n×n triangular matrix in -// packed form. -// -// On entry, x contains the values of b, and the solution is -// stored in-place into x. -// -// No test for singularity or near-singularity is included in this -// routine. Such tests must be performed before calling this routine. -// -// Complex64 implementations are autogenerated and not directly tested. -func (Implementation) Ctpsv(uplo blas.Uplo, trans blas.Transpose, diag blas.Diag, n int, ap []complex64, x []complex64, incX int) { - switch uplo { - default: - panic(badUplo) - case blas.Upper, blas.Lower: - } - switch trans { - default: - panic(badTranspose) - case blas.NoTrans, blas.Trans, blas.ConjTrans: - } - switch diag { - default: - panic(badDiag) - case blas.NonUnit, blas.Unit: - } - if n < 0 { - panic(nLT0) - } - if incX == 0 { - panic(zeroIncX) - } - - // Quick return if possible. - if n == 0 { - return - } - - // For zero matrix size the following slice length checks are trivially satisfied. - if len(ap) < n*(n+1)/2 { - panic(shortAP) - } - if (incX > 0 && len(x) <= (n-1)*incX) || (incX < 0 && len(x) <= (1-n)*incX) { - panic(shortX) - } - - // Set up start index in X. - var kx int - if incX < 0 { - kx = (1 - n) * incX - } - - // The elements of A are accessed sequentially with one pass through ap. - - if trans == blas.NoTrans { - // Form x = inv(A)*x. - if uplo == blas.Upper { - kk := n*(n+1)/2 - 1 - if incX == 1 { - for i := n - 1; i >= 0; i-- { - aii := ap[kk] - if n-i-1 > 0 { - x[i] -= c64.DotuUnitary(x[i+1:n], ap[kk+1:kk+n-i]) - } - if diag == blas.NonUnit { - x[i] /= aii - } - kk -= n - i + 1 - } - } else { - ix := kx + (n-1)*incX - for i := n - 1; i >= 0; i-- { - aii := ap[kk] - if n-i-1 > 0 { - x[ix] -= c64.DotuInc(x, ap[kk+1:kk+n-i], uintptr(n-i-1), uintptr(incX), 1, uintptr(ix+incX), 0) - } - if diag == blas.NonUnit { - x[ix] /= aii - } - ix -= incX - kk -= n - i + 1 - } - } - } else { - kk := 0 - if incX == 1 { - for i := 0; i < n; i++ { - if i > 0 { - x[i] -= c64.DotuUnitary(x[:i], ap[kk:kk+i]) - } - if diag == blas.NonUnit { - x[i] /= ap[kk+i] - } - kk += i + 1 - } - } else { - ix := kx - for i := 0; i < n; i++ { - if i > 0 { - x[ix] -= c64.DotuInc(x, ap[kk:kk+i], uintptr(i), uintptr(incX), 1, uintptr(kx), 0) - } - if diag == blas.NonUnit { - x[ix] /= ap[kk+i] - } - ix += incX - kk += i + 1 - } - } - } - return - } - - if trans == blas.Trans { - // Form x = inv(A^T)*x. - if uplo == blas.Upper { - kk := 0 - if incX == 1 { - for j := 0; j < n; j++ { - if diag == blas.NonUnit { - x[j] /= ap[kk] - } - if n-j-1 > 0 { - c64.AxpyUnitary(-x[j], ap[kk+1:kk+n-j], x[j+1:n]) - } - kk += n - j - } - } else { - jx := kx - for j := 0; j < n; j++ { - if diag == blas.NonUnit { - x[jx] /= ap[kk] - } - if n-j-1 > 0 { - c64.AxpyInc(-x[jx], ap[kk+1:kk+n-j], x, uintptr(n-j-1), 1, uintptr(incX), 0, uintptr(jx+incX)) - } - jx += incX - kk += n - j - } - } - } else { - kk := n*(n+1)/2 - n - if incX == 1 { - for j := n - 1; j >= 0; j-- { - if diag == blas.NonUnit { - x[j] /= ap[kk+j] - } - if j > 0 { - c64.AxpyUnitary(-x[j], ap[kk:kk+j], x[:j]) - } - kk -= j - } - } else { - jx := kx + (n-1)*incX - for j := n - 1; j >= 0; j-- { - if diag == blas.NonUnit { - x[jx] /= ap[kk+j] - } - if j > 0 { - c64.AxpyInc(-x[jx], ap[kk:kk+j], x, uintptr(j), 1, uintptr(incX), 0, uintptr(kx)) - } - jx -= incX - kk -= j - } - } - } - return - } - - // Form x = inv(A^H)*x. - if uplo == blas.Upper { - kk := 0 - if incX == 1 { - for j := 0; j < n; j++ { - if diag == blas.NonUnit { - x[j] /= cmplx.Conj(ap[kk]) - } - xj := x[j] - k := kk + 1 - for i := j + 1; i < n; i++ { - x[i] -= xj * cmplx.Conj(ap[k]) - k++ - } - kk += n - j - } - } else { - jx := kx - for j := 0; j < n; j++ { - if diag == blas.NonUnit { - x[jx] /= cmplx.Conj(ap[kk]) - } - xj := x[jx] - ix := jx + incX - k := kk + 1 - for i := j + 1; i < n; i++ { - x[ix] -= xj * cmplx.Conj(ap[k]) - ix += incX - k++ - } - jx += incX - kk += n - j - } - } - } else { - kk := n*(n+1)/2 - n - if incX == 1 { - for j := n - 1; j >= 0; j-- { - if diag == blas.NonUnit { - x[j] /= cmplx.Conj(ap[kk+j]) - } - xj := x[j] - for i := 0; i < j; i++ { - x[i] -= xj * cmplx.Conj(ap[kk+i]) - } - kk -= j - } - } else { - jx := kx + (n-1)*incX - for j := n - 1; j >= 0; j-- { - if diag == blas.NonUnit { - x[jx] /= cmplx.Conj(ap[kk+j]) - } - xj := x[jx] - ix := kx - for i := 0; i < j; i++ { - x[ix] -= xj * cmplx.Conj(ap[kk+i]) - ix += incX - } - jx -= incX - kk -= j - } - } - } -} - -// Ctrmv performs one of the matrix-vector operations -// x = A * x if trans = blas.NoTrans -// x = A^T * x if trans = blas.Trans -// x = A^H * x if trans = blas.ConjTrans -// where x is a vector, and A is an n×n triangular matrix. -// -// Complex64 implementations are autogenerated and not directly tested. -func (Implementation) Ctrmv(uplo blas.Uplo, trans blas.Transpose, diag blas.Diag, n int, a []complex64, lda int, x []complex64, incX int) { - switch trans { - default: - panic(badTranspose) - case blas.NoTrans, blas.Trans, blas.ConjTrans: - } - switch uplo { - default: - panic(badUplo) - case blas.Upper, blas.Lower: - } - switch diag { - default: - panic(badDiag) - case blas.NonUnit, blas.Unit: - } - if n < 0 { - panic(nLT0) - } - if lda < max(1, n) { - panic(badLdA) - } - if incX == 0 { - panic(zeroIncX) - } - - // Quick return if possible. - if n == 0 { - return - } - - // For zero matrix size the following slice length checks are trivially satisfied. - if len(a) < lda*(n-1)+n { - panic(shortA) - } - if (incX > 0 && len(x) <= (n-1)*incX) || (incX < 0 && len(x) <= (1-n)*incX) { - panic(shortX) - } - - // Set up start index in X. - var kx int - if incX < 0 { - kx = (1 - n) * incX - } - - // The elements of A are accessed sequentially with one pass through A. - - if trans == blas.NoTrans { - // Form x = A*x. - if uplo == blas.Upper { - if incX == 1 { - for i := 0; i < n; i++ { - if diag == blas.NonUnit { - x[i] *= a[i*lda+i] - } - if n-i-1 > 0 { - x[i] += c64.DotuUnitary(a[i*lda+i+1:i*lda+n], x[i+1:n]) - } - } - } else { - ix := kx - for i := 0; i < n; i++ { - if diag == blas.NonUnit { - x[ix] *= a[i*lda+i] - } - if n-i-1 > 0 { - x[ix] += c64.DotuInc(a[i*lda+i+1:i*lda+n], x, uintptr(n-i-1), 1, uintptr(incX), 0, uintptr(ix+incX)) - } - ix += incX - } - } - } else { - if incX == 1 { - for i := n - 1; i >= 0; i-- { - if diag == blas.NonUnit { - x[i] *= a[i*lda+i] - } - if i > 0 { - x[i] += c64.DotuUnitary(a[i*lda:i*lda+i], x[:i]) - } - } - } else { - ix := kx + (n-1)*incX - for i := n - 1; i >= 0; i-- { - if diag == blas.NonUnit { - x[ix] *= a[i*lda+i] - } - if i > 0 { - x[ix] += c64.DotuInc(a[i*lda:i*lda+i], x, uintptr(i), 1, uintptr(incX), 0, uintptr(kx)) - } - ix -= incX - } - } - } - return - } - - if trans == blas.Trans { - // Form x = A^T*x. - if uplo == blas.Upper { - if incX == 1 { - for i := n - 1; i >= 0; i-- { - xi := x[i] - if diag == blas.NonUnit { - x[i] *= a[i*lda+i] - } - if n-i-1 > 0 { - c64.AxpyUnitary(xi, a[i*lda+i+1:i*lda+n], x[i+1:n]) - } - } - } else { - ix := kx + (n-1)*incX - for i := n - 1; i >= 0; i-- { - xi := x[ix] - if diag == blas.NonUnit { - x[ix] *= a[i*lda+i] - } - if n-i-1 > 0 { - c64.AxpyInc(xi, a[i*lda+i+1:i*lda+n], x, uintptr(n-i-1), 1, uintptr(incX), 0, uintptr(ix+incX)) - } - ix -= incX - } - } - } else { - if incX == 1 { - for i := 0; i < n; i++ { - if i > 0 { - c64.AxpyUnitary(x[i], a[i*lda:i*lda+i], x[:i]) - } - if diag == blas.NonUnit { - x[i] *= a[i*lda+i] - } - } - } else { - ix := kx - for i := 0; i < n; i++ { - if i > 0 { - c64.AxpyInc(x[ix], a[i*lda:i*lda+i], x, uintptr(i), 1, uintptr(incX), 0, uintptr(kx)) - } - if diag == blas.NonUnit { - x[ix] *= a[i*lda+i] - } - ix += incX - } - } - } - return - } - - // Form x = A^H*x. - if uplo == blas.Upper { - if incX == 1 { - for i := n - 1; i >= 0; i-- { - xi := x[i] - if diag == blas.NonUnit { - x[i] *= cmplx.Conj(a[i*lda+i]) - } - for j := i + 1; j < n; j++ { - x[j] += xi * cmplx.Conj(a[i*lda+j]) - } - } - } else { - ix := kx + (n-1)*incX - for i := n - 1; i >= 0; i-- { - xi := x[ix] - if diag == blas.NonUnit { - x[ix] *= cmplx.Conj(a[i*lda+i]) - } - jx := ix + incX - for j := i + 1; j < n; j++ { - x[jx] += xi * cmplx.Conj(a[i*lda+j]) - jx += incX - } - ix -= incX - } - } - } else { - if incX == 1 { - for i := 0; i < n; i++ { - for j := 0; j < i; j++ { - x[j] += x[i] * cmplx.Conj(a[i*lda+j]) - } - if diag == blas.NonUnit { - x[i] *= cmplx.Conj(a[i*lda+i]) - } - } - } else { - ix := kx - for i := 0; i < n; i++ { - jx := kx - for j := 0; j < i; j++ { - x[jx] += x[ix] * cmplx.Conj(a[i*lda+j]) - jx += incX - } - if diag == blas.NonUnit { - x[ix] *= cmplx.Conj(a[i*lda+i]) - } - ix += incX - } - } - } -} - -// Ctrsv solves one of the systems of equations -// A * x = b if trans == blas.NoTrans -// A^T * x = b if trans == blas.Trans -// A^H * x = b if trans == blas.ConjTrans -// where b and x are n element vectors and A is an n×n triangular matrix. -// -// On entry, x contains the values of b, and the solution is -// stored in-place into x. -// -// No test for singularity or near-singularity is included in this -// routine. Such tests must be performed before calling this routine. -// -// Complex64 implementations are autogenerated and not directly tested. -func (Implementation) Ctrsv(uplo blas.Uplo, trans blas.Transpose, diag blas.Diag, n int, a []complex64, lda int, x []complex64, incX int) { - switch trans { - default: - panic(badTranspose) - case blas.NoTrans, blas.Trans, blas.ConjTrans: - } - switch uplo { - default: - panic(badUplo) - case blas.Upper, blas.Lower: - } - switch diag { - default: - panic(badDiag) - case blas.NonUnit, blas.Unit: - } - if n < 0 { - panic(nLT0) - } - if lda < max(1, n) { - panic(badLdA) - } - if incX == 0 { - panic(zeroIncX) - } - - // Quick return if possible. - if n == 0 { - return - } - - // For zero matrix size the following slice length checks are trivially satisfied. - if len(a) < lda*(n-1)+n { - panic(shortA) - } - if (incX > 0 && len(x) <= (n-1)*incX) || (incX < 0 && len(x) <= (1-n)*incX) { - panic(shortX) - } - - // Set up start index in X. - var kx int - if incX < 0 { - kx = (1 - n) * incX - } - - // The elements of A are accessed sequentially with one pass through A. - - if trans == blas.NoTrans { - // Form x = inv(A)*x. - if uplo == blas.Upper { - if incX == 1 { - for i := n - 1; i >= 0; i-- { - aii := a[i*lda+i] - if n-i-1 > 0 { - x[i] -= c64.DotuUnitary(x[i+1:n], a[i*lda+i+1:i*lda+n]) - } - if diag == blas.NonUnit { - x[i] /= aii - } - } - } else { - ix := kx + (n-1)*incX - for i := n - 1; i >= 0; i-- { - aii := a[i*lda+i] - if n-i-1 > 0 { - x[ix] -= c64.DotuInc(x, a[i*lda+i+1:i*lda+n], uintptr(n-i-1), uintptr(incX), 1, uintptr(ix+incX), 0) - } - if diag == blas.NonUnit { - x[ix] /= aii - } - ix -= incX - } - } - } else { - if incX == 1 { - for i := 0; i < n; i++ { - if i > 0 { - x[i] -= c64.DotuUnitary(x[:i], a[i*lda:i*lda+i]) - } - if diag == blas.NonUnit { - x[i] /= a[i*lda+i] - } - } - } else { - ix := kx - for i := 0; i < n; i++ { - if i > 0 { - x[ix] -= c64.DotuInc(x, a[i*lda:i*lda+i], uintptr(i), uintptr(incX), 1, uintptr(kx), 0) - } - if diag == blas.NonUnit { - x[ix] /= a[i*lda+i] - } - ix += incX - } - } - } - return - } - - if trans == blas.Trans { - // Form x = inv(A^T)*x. - if uplo == blas.Upper { - if incX == 1 { - for j := 0; j < n; j++ { - if diag == blas.NonUnit { - x[j] /= a[j*lda+j] - } - if n-j-1 > 0 { - c64.AxpyUnitary(-x[j], a[j*lda+j+1:j*lda+n], x[j+1:n]) - } - } - } else { - jx := kx - for j := 0; j < n; j++ { - if diag == blas.NonUnit { - x[jx] /= a[j*lda+j] - } - if n-j-1 > 0 { - c64.AxpyInc(-x[jx], a[j*lda+j+1:j*lda+n], x, uintptr(n-j-1), 1, uintptr(incX), 0, uintptr(jx+incX)) - } - jx += incX - } - } - } else { - if incX == 1 { - for j := n - 1; j >= 0; j-- { - if diag == blas.NonUnit { - x[j] /= a[j*lda+j] - } - xj := x[j] - if j > 0 { - c64.AxpyUnitary(-xj, a[j*lda:j*lda+j], x[:j]) - } - } - } else { - jx := kx + (n-1)*incX - for j := n - 1; j >= 0; j-- { - if diag == blas.NonUnit { - x[jx] /= a[j*lda+j] - } - if j > 0 { - c64.AxpyInc(-x[jx], a[j*lda:j*lda+j], x, uintptr(j), 1, uintptr(incX), 0, uintptr(kx)) - } - jx -= incX - } - } - } - return - } - - // Form x = inv(A^H)*x. - if uplo == blas.Upper { - if incX == 1 { - for j := 0; j < n; j++ { - if diag == blas.NonUnit { - x[j] /= cmplx.Conj(a[j*lda+j]) - } - xj := x[j] - for i := j + 1; i < n; i++ { - x[i] -= xj * cmplx.Conj(a[j*lda+i]) - } - } - } else { - jx := kx - for j := 0; j < n; j++ { - if diag == blas.NonUnit { - x[jx] /= cmplx.Conj(a[j*lda+j]) - } - xj := x[jx] - ix := jx + incX - for i := j + 1; i < n; i++ { - x[ix] -= xj * cmplx.Conj(a[j*lda+i]) - ix += incX - } - jx += incX - } - } - } else { - if incX == 1 { - for j := n - 1; j >= 0; j-- { - if diag == blas.NonUnit { - x[j] /= cmplx.Conj(a[j*lda+j]) - } - xj := x[j] - for i := 0; i < j; i++ { - x[i] -= xj * cmplx.Conj(a[j*lda+i]) - } - } - } else { - jx := kx + (n-1)*incX - for j := n - 1; j >= 0; j-- { - if diag == blas.NonUnit { - x[jx] /= cmplx.Conj(a[j*lda+j]) - } - xj := x[jx] - ix := kx - for i := 0; i < j; i++ { - x[ix] -= xj * cmplx.Conj(a[j*lda+i]) - ix += incX - } - jx -= incX - } - } - } -} diff --git a/vendor/gonum.org/v1/gonum/blas/gonum/level2float32.go b/vendor/gonum.org/v1/gonum/blas/gonum/level2float32.go deleted file mode 100644 index 08e1927f79..0000000000 --- a/vendor/gonum.org/v1/gonum/blas/gonum/level2float32.go +++ /dev/null @@ -1,2296 +0,0 @@ -// Code generated by "go generate gonum.org/v1/gonum/blas/gonum”; DO NOT EDIT. - -// Copyright ©2014 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import ( - "gonum.org/v1/gonum/blas" - "gonum.org/v1/gonum/internal/asm/f32" -) - -var _ blas.Float32Level2 = Implementation{} - -// Sger performs the rank-one operation -// A += alpha * x * y^T -// where A is an m×n dense matrix, x and y are vectors, and alpha is a scalar. -// -// Float32 implementations are autogenerated and not directly tested. -func (Implementation) Sger(m, n int, alpha float32, x []float32, incX int, y []float32, incY int, a []float32, lda int) { - if m < 0 { - panic(mLT0) - } - if n < 0 { - panic(nLT0) - } - if lda < max(1, n) { - panic(badLdA) - } - if incX == 0 { - panic(zeroIncX) - } - if incY == 0 { - panic(zeroIncY) - } - - // Quick return if possible. - if m == 0 || n == 0 { - return - } - - // For zero matrix size the following slice length checks are trivially satisfied. - if (incX > 0 && len(x) <= (m-1)*incX) || (incX < 0 && len(x) <= (1-m)*incX) { - panic(shortX) - } - if (incY > 0 && len(y) <= (n-1)*incY) || (incY < 0 && len(y) <= (1-n)*incY) { - panic(shortY) - } - if len(a) < lda*(m-1)+n { - panic(shortA) - } - - // Quick return if possible. - if alpha == 0 { - return - } - f32.Ger(uintptr(m), uintptr(n), - alpha, - x, uintptr(incX), - y, uintptr(incY), - a, uintptr(lda)) -} - -// Sgbmv performs one of the matrix-vector operations -// y = alpha * A * x + beta * y if tA == blas.NoTrans -// y = alpha * A^T * x + beta * y if tA == blas.Trans or blas.ConjTrans -// where A is an m×n band matrix with kL sub-diagonals and kU super-diagonals, -// x and y are vectors, and alpha and beta are scalars. -// -// Float32 implementations are autogenerated and not directly tested. -func (Implementation) Sgbmv(tA blas.Transpose, m, n, kL, kU int, alpha float32, a []float32, lda int, x []float32, incX int, beta float32, y []float32, incY int) { - if tA != blas.NoTrans && tA != blas.Trans && tA != blas.ConjTrans { - panic(badTranspose) - } - if m < 0 { - panic(mLT0) - } - if n < 0 { - panic(nLT0) - } - if kL < 0 { - panic(kLLT0) - } - if kU < 0 { - panic(kULT0) - } - if lda < kL+kU+1 { - panic(badLdA) - } - if incX == 0 { - panic(zeroIncX) - } - if incY == 0 { - panic(zeroIncY) - } - - // Quick return if possible. - if m == 0 || n == 0 { - return - } - - // For zero matrix size the following slice length checks are trivially satisfied. - if len(a) < lda*(min(m, n+kL)-1)+kL+kU+1 { - panic(shortA) - } - lenX := m - lenY := n - if tA == blas.NoTrans { - lenX = n - lenY = m - } - if (incX > 0 && len(x) <= (lenX-1)*incX) || (incX < 0 && len(x) <= (1-lenX)*incX) { - panic(shortX) - } - if (incY > 0 && len(y) <= (lenY-1)*incY) || (incY < 0 && len(y) <= (1-lenY)*incY) { - panic(shortY) - } - - // Quick return if possible. - if alpha == 0 && beta == 1 { - return - } - - var kx, ky int - if incX < 0 { - kx = -(lenX - 1) * incX - } - if incY < 0 { - ky = -(lenY - 1) * incY - } - - // Form y = beta * y. - if beta != 1 { - if incY == 1 { - if beta == 0 { - for i := range y[:lenY] { - y[i] = 0 - } - } else { - f32.ScalUnitary(beta, y[:lenY]) - } - } else { - iy := ky - if beta == 0 { - for i := 0; i < lenY; i++ { - y[iy] = 0 - iy += incY - } - } else { - if incY > 0 { - f32.ScalInc(beta, y, uintptr(lenY), uintptr(incY)) - } else { - f32.ScalInc(beta, y, uintptr(lenY), uintptr(-incY)) - } - } - } - } - - if alpha == 0 { - return - } - - // i and j are indices of the compacted banded matrix. - // off is the offset into the dense matrix (off + j = densej) - nCol := kU + 1 + kL - if tA == blas.NoTrans { - iy := ky - if incX == 1 { - for i := 0; i < min(m, n+kL); i++ { - l := max(0, kL-i) - u := min(nCol, n+kL-i) - off := max(0, i-kL) - atmp := a[i*lda+l : i*lda+u] - xtmp := x[off : off+u-l] - var sum float32 - for j, v := range atmp { - sum += xtmp[j] * v - } - y[iy] += sum * alpha - iy += incY - } - return - } - for i := 0; i < min(m, n+kL); i++ { - l := max(0, kL-i) - u := min(nCol, n+kL-i) - off := max(0, i-kL) - atmp := a[i*lda+l : i*lda+u] - jx := kx - var sum float32 - for _, v := range atmp { - sum += x[off*incX+jx] * v - jx += incX - } - y[iy] += sum * alpha - iy += incY - } - return - } - if incX == 1 { - for i := 0; i < min(m, n+kL); i++ { - l := max(0, kL-i) - u := min(nCol, n+kL-i) - off := max(0, i-kL) - atmp := a[i*lda+l : i*lda+u] - tmp := alpha * x[i] - jy := ky - for _, v := range atmp { - y[jy+off*incY] += tmp * v - jy += incY - } - } - return - } - ix := kx - for i := 0; i < min(m, n+kL); i++ { - l := max(0, kL-i) - u := min(nCol, n+kL-i) - off := max(0, i-kL) - atmp := a[i*lda+l : i*lda+u] - tmp := alpha * x[ix] - jy := ky - for _, v := range atmp { - y[jy+off*incY] += tmp * v - jy += incY - } - ix += incX - } -} - -// Strmv performs one of the matrix-vector operations -// x = A * x if tA == blas.NoTrans -// x = A^T * x if tA == blas.Trans or blas.ConjTrans -// where A is an n×n triangular matrix, and x is a vector. -// -// Float32 implementations are autogenerated and not directly tested. -func (Implementation) Strmv(ul blas.Uplo, tA blas.Transpose, d blas.Diag, n int, a []float32, lda int, x []float32, incX int) { - if ul != blas.Lower && ul != blas.Upper { - panic(badUplo) - } - if tA != blas.NoTrans && tA != blas.Trans && tA != blas.ConjTrans { - panic(badTranspose) - } - if d != blas.NonUnit && d != blas.Unit { - panic(badDiag) - } - if n < 0 { - panic(nLT0) - } - if lda < max(1, n) { - panic(badLdA) - } - if incX == 0 { - panic(zeroIncX) - } - - // Quick return if possible. - if n == 0 { - return - } - - // For zero matrix size the following slice length checks are trivially satisfied. - if len(a) < lda*(n-1)+n { - panic(shortA) - } - if (incX > 0 && len(x) <= (n-1)*incX) || (incX < 0 && len(x) <= (1-n)*incX) { - panic(shortX) - } - - nonUnit := d != blas.Unit - if n == 1 { - if nonUnit { - x[0] *= a[0] - } - return - } - var kx int - if incX <= 0 { - kx = -(n - 1) * incX - } - if tA == blas.NoTrans { - if ul == blas.Upper { - if incX == 1 { - for i := 0; i < n; i++ { - ilda := i * lda - var tmp float32 - if nonUnit { - tmp = a[ilda+i] * x[i] - } else { - tmp = x[i] - } - x[i] = tmp + f32.DotUnitary(a[ilda+i+1:ilda+n], x[i+1:n]) - } - return - } - ix := kx - for i := 0; i < n; i++ { - ilda := i * lda - var tmp float32 - if nonUnit { - tmp = a[ilda+i] * x[ix] - } else { - tmp = x[ix] - } - x[ix] = tmp + f32.DotInc(x, a[ilda+i+1:ilda+n], uintptr(n-i-1), uintptr(incX), 1, uintptr(ix+incX), 0) - ix += incX - } - return - } - if incX == 1 { - for i := n - 1; i >= 0; i-- { - ilda := i * lda - var tmp float32 - if nonUnit { - tmp += a[ilda+i] * x[i] - } else { - tmp = x[i] - } - x[i] = tmp + f32.DotUnitary(a[ilda:ilda+i], x[:i]) - } - return - } - ix := kx + (n-1)*incX - for i := n - 1; i >= 0; i-- { - ilda := i * lda - var tmp float32 - if nonUnit { - tmp = a[ilda+i] * x[ix] - } else { - tmp = x[ix] - } - x[ix] = tmp + f32.DotInc(x, a[ilda:ilda+i], uintptr(i), uintptr(incX), 1, uintptr(kx), 0) - ix -= incX - } - return - } - // Cases where a is transposed. - if ul == blas.Upper { - if incX == 1 { - for i := n - 1; i >= 0; i-- { - ilda := i * lda - xi := x[i] - f32.AxpyUnitary(xi, a[ilda+i+1:ilda+n], x[i+1:n]) - if nonUnit { - x[i] *= a[ilda+i] - } - } - return - } - ix := kx + (n-1)*incX - for i := n - 1; i >= 0; i-- { - ilda := i * lda - xi := x[ix] - f32.AxpyInc(xi, a[ilda+i+1:ilda+n], x, uintptr(n-i-1), 1, uintptr(incX), 0, uintptr(kx+(i+1)*incX)) - if nonUnit { - x[ix] *= a[ilda+i] - } - ix -= incX - } - return - } - if incX == 1 { - for i := 0; i < n; i++ { - ilda := i * lda - xi := x[i] - f32.AxpyUnitary(xi, a[ilda:ilda+i], x[:i]) - if nonUnit { - x[i] *= a[i*lda+i] - } - } - return - } - ix := kx - for i := 0; i < n; i++ { - ilda := i * lda - xi := x[ix] - f32.AxpyInc(xi, a[ilda:ilda+i], x, uintptr(i), 1, uintptr(incX), 0, uintptr(kx)) - if nonUnit { - x[ix] *= a[ilda+i] - } - ix += incX - } -} - -// Strsv solves one of the systems of equations -// A * x = b if tA == blas.NoTrans -// A^T * x = b if tA == blas.Trans or blas.ConjTrans -// where A is an n×n triangular matrix, and x and b are vectors. -// -// At entry to the function, x contains the values of b, and the result is -// stored in-place into x. -// -// No test for singularity or near-singularity is included in this -// routine. Such tests must be performed before calling this routine. -// -// Float32 implementations are autogenerated and not directly tested. -func (Implementation) Strsv(ul blas.Uplo, tA blas.Transpose, d blas.Diag, n int, a []float32, lda int, x []float32, incX int) { - if ul != blas.Lower && ul != blas.Upper { - panic(badUplo) - } - if tA != blas.NoTrans && tA != blas.Trans && tA != blas.ConjTrans { - panic(badTranspose) - } - if d != blas.NonUnit && d != blas.Unit { - panic(badDiag) - } - if n < 0 { - panic(nLT0) - } - if lda < max(1, n) { - panic(badLdA) - } - if incX == 0 { - panic(zeroIncX) - } - - // Quick return if possible. - if n == 0 { - return - } - - // For zero matrix size the following slice length checks are trivially satisfied. - if len(a) < lda*(n-1)+n { - panic(shortA) - } - if (incX > 0 && len(x) <= (n-1)*incX) || (incX < 0 && len(x) <= (1-n)*incX) { - panic(shortX) - } - - if n == 1 { - if d == blas.NonUnit { - x[0] /= a[0] - } - return - } - - var kx int - if incX < 0 { - kx = -(n - 1) * incX - } - nonUnit := d == blas.NonUnit - if tA == blas.NoTrans { - if ul == blas.Upper { - if incX == 1 { - for i := n - 1; i >= 0; i-- { - var sum float32 - atmp := a[i*lda+i+1 : i*lda+n] - for j, v := range atmp { - jv := i + j + 1 - sum += x[jv] * v - } - x[i] -= sum - if nonUnit { - x[i] /= a[i*lda+i] - } - } - return - } - ix := kx + (n-1)*incX - for i := n - 1; i >= 0; i-- { - var sum float32 - jx := ix + incX - atmp := a[i*lda+i+1 : i*lda+n] - for _, v := range atmp { - sum += x[jx] * v - jx += incX - } - x[ix] -= sum - if nonUnit { - x[ix] /= a[i*lda+i] - } - ix -= incX - } - return - } - if incX == 1 { - for i := 0; i < n; i++ { - var sum float32 - atmp := a[i*lda : i*lda+i] - for j, v := range atmp { - sum += x[j] * v - } - x[i] -= sum - if nonUnit { - x[i] /= a[i*lda+i] - } - } - return - } - ix := kx - for i := 0; i < n; i++ { - jx := kx - var sum float32 - atmp := a[i*lda : i*lda+i] - for _, v := range atmp { - sum += x[jx] * v - jx += incX - } - x[ix] -= sum - if nonUnit { - x[ix] /= a[i*lda+i] - } - ix += incX - } - return - } - // Cases where a is transposed. - if ul == blas.Upper { - if incX == 1 { - for i := 0; i < n; i++ { - if nonUnit { - x[i] /= a[i*lda+i] - } - xi := x[i] - atmp := a[i*lda+i+1 : i*lda+n] - for j, v := range atmp { - jv := j + i + 1 - x[jv] -= v * xi - } - } - return - } - ix := kx - for i := 0; i < n; i++ { - if nonUnit { - x[ix] /= a[i*lda+i] - } - xi := x[ix] - jx := kx + (i+1)*incX - atmp := a[i*lda+i+1 : i*lda+n] - for _, v := range atmp { - x[jx] -= v * xi - jx += incX - } - ix += incX - } - return - } - if incX == 1 { - for i := n - 1; i >= 0; i-- { - if nonUnit { - x[i] /= a[i*lda+i] - } - xi := x[i] - atmp := a[i*lda : i*lda+i] - for j, v := range atmp { - x[j] -= v * xi - } - } - return - } - ix := kx + (n-1)*incX - for i := n - 1; i >= 0; i-- { - if nonUnit { - x[ix] /= a[i*lda+i] - } - xi := x[ix] - jx := kx - atmp := a[i*lda : i*lda+i] - for _, v := range atmp { - x[jx] -= v * xi - jx += incX - } - ix -= incX - } -} - -// Ssymv performs the matrix-vector operation -// y = alpha * A * x + beta * y -// where A is an n×n symmetric matrix, x and y are vectors, and alpha and -// beta are scalars. -// -// Float32 implementations are autogenerated and not directly tested. -func (Implementation) Ssymv(ul blas.Uplo, n int, alpha float32, a []float32, lda int, x []float32, incX int, beta float32, y []float32, incY int) { - if ul != blas.Lower && ul != blas.Upper { - panic(badUplo) - } - if n < 0 { - panic(nLT0) - } - if lda < max(1, n) { - panic(badLdA) - } - if incX == 0 { - panic(zeroIncX) - } - if incY == 0 { - panic(zeroIncY) - } - - // Quick return if possible. - if n == 0 { - return - } - - // For zero matrix size the following slice length checks are trivially satisfied. - if len(a) < lda*(n-1)+n { - panic(shortA) - } - if (incX > 0 && len(x) <= (n-1)*incX) || (incX < 0 && len(x) <= (1-n)*incX) { - panic(shortX) - } - if (incY > 0 && len(y) <= (n-1)*incY) || (incY < 0 && len(y) <= (1-n)*incY) { - panic(shortY) - } - - // Quick return if possible. - if alpha == 0 && beta == 1 { - return - } - - // Set up start points - var kx, ky int - if incX < 0 { - kx = -(n - 1) * incX - } - if incY < 0 { - ky = -(n - 1) * incY - } - - // Form y = beta * y - if beta != 1 { - if incY == 1 { - if beta == 0 { - for i := range y[:n] { - y[i] = 0 - } - } else { - f32.ScalUnitary(beta, y[:n]) - } - } else { - iy := ky - if beta == 0 { - for i := 0; i < n; i++ { - y[iy] = 0 - iy += incY - } - } else { - if incY > 0 { - f32.ScalInc(beta, y, uintptr(n), uintptr(incY)) - } else { - f32.ScalInc(beta, y, uintptr(n), uintptr(-incY)) - } - } - } - } - - if alpha == 0 { - return - } - - if n == 1 { - y[0] += alpha * a[0] * x[0] - return - } - - if ul == blas.Upper { - if incX == 1 { - iy := ky - for i := 0; i < n; i++ { - xv := x[i] * alpha - sum := x[i] * a[i*lda+i] - jy := ky + (i+1)*incY - atmp := a[i*lda+i+1 : i*lda+n] - for j, v := range atmp { - jp := j + i + 1 - sum += x[jp] * v - y[jy] += xv * v - jy += incY - } - y[iy] += alpha * sum - iy += incY - } - return - } - ix := kx - iy := ky - for i := 0; i < n; i++ { - xv := x[ix] * alpha - sum := x[ix] * a[i*lda+i] - jx := kx + (i+1)*incX - jy := ky + (i+1)*incY - atmp := a[i*lda+i+1 : i*lda+n] - for _, v := range atmp { - sum += x[jx] * v - y[jy] += xv * v - jx += incX - jy += incY - } - y[iy] += alpha * sum - ix += incX - iy += incY - } - return - } - // Cases where a is lower triangular. - if incX == 1 { - iy := ky - for i := 0; i < n; i++ { - jy := ky - xv := alpha * x[i] - atmp := a[i*lda : i*lda+i] - var sum float32 - for j, v := range atmp { - sum += x[j] * v - y[jy] += xv * v - jy += incY - } - sum += x[i] * a[i*lda+i] - sum *= alpha - y[iy] += sum - iy += incY - } - return - } - ix := kx - iy := ky - for i := 0; i < n; i++ { - jx := kx - jy := ky - xv := alpha * x[ix] - atmp := a[i*lda : i*lda+i] - var sum float32 - for _, v := range atmp { - sum += x[jx] * v - y[jy] += xv * v - jx += incX - jy += incY - } - sum += x[ix] * a[i*lda+i] - sum *= alpha - y[iy] += sum - ix += incX - iy += incY - } -} - -// Stbmv performs one of the matrix-vector operations -// x = A * x if tA == blas.NoTrans -// x = A^T * x if tA == blas.Trans or blas.ConjTrans -// where A is an n×n triangular band matrix with k+1 diagonals, and x is a vector. -// -// Float32 implementations are autogenerated and not directly tested. -func (Implementation) Stbmv(ul blas.Uplo, tA blas.Transpose, d blas.Diag, n, k int, a []float32, lda int, x []float32, incX int) { - if ul != blas.Lower && ul != blas.Upper { - panic(badUplo) - } - if tA != blas.NoTrans && tA != blas.Trans && tA != blas.ConjTrans { - panic(badTranspose) - } - if d != blas.NonUnit && d != blas.Unit { - panic(badDiag) - } - if n < 0 { - panic(nLT0) - } - if k < 0 { - panic(kLT0) - } - if lda < k+1 { - panic(badLdA) - } - if incX == 0 { - panic(zeroIncX) - } - - // Quick return if possible. - if n == 0 { - return - } - - // For zero matrix size the following slice length checks are trivially satisfied. - if len(a) < lda*(n-1)+k+1 { - panic(shortA) - } - if (incX > 0 && len(x) <= (n-1)*incX) || (incX < 0 && len(x) <= (1-n)*incX) { - panic(shortX) - } - - var kx int - if incX < 0 { - kx = -(n - 1) * incX - } - - nonunit := d != blas.Unit - - if tA == blas.NoTrans { - if ul == blas.Upper { - if incX == 1 { - for i := 0; i < n; i++ { - u := min(1+k, n-i) - var sum float32 - atmp := a[i*lda:] - xtmp := x[i:] - for j := 1; j < u; j++ { - sum += xtmp[j] * atmp[j] - } - if nonunit { - sum += xtmp[0] * atmp[0] - } else { - sum += xtmp[0] - } - x[i] = sum - } - return - } - ix := kx - for i := 0; i < n; i++ { - u := min(1+k, n-i) - var sum float32 - atmp := a[i*lda:] - jx := incX - for j := 1; j < u; j++ { - sum += x[ix+jx] * atmp[j] - jx += incX - } - if nonunit { - sum += x[ix] * atmp[0] - } else { - sum += x[ix] - } - x[ix] = sum - ix += incX - } - return - } - if incX == 1 { - for i := n - 1; i >= 0; i-- { - l := max(0, k-i) - atmp := a[i*lda:] - var sum float32 - for j := l; j < k; j++ { - sum += x[i-k+j] * atmp[j] - } - if nonunit { - sum += x[i] * atmp[k] - } else { - sum += x[i] - } - x[i] = sum - } - return - } - ix := kx + (n-1)*incX - for i := n - 1; i >= 0; i-- { - l := max(0, k-i) - atmp := a[i*lda:] - var sum float32 - jx := l * incX - for j := l; j < k; j++ { - sum += x[ix-k*incX+jx] * atmp[j] - jx += incX - } - if nonunit { - sum += x[ix] * atmp[k] - } else { - sum += x[ix] - } - x[ix] = sum - ix -= incX - } - return - } - if ul == blas.Upper { - if incX == 1 { - for i := n - 1; i >= 0; i-- { - u := k + 1 - if i < u { - u = i + 1 - } - var sum float32 - for j := 1; j < u; j++ { - sum += x[i-j] * a[(i-j)*lda+j] - } - if nonunit { - sum += x[i] * a[i*lda] - } else { - sum += x[i] - } - x[i] = sum - } - return - } - ix := kx + (n-1)*incX - for i := n - 1; i >= 0; i-- { - u := k + 1 - if i < u { - u = i + 1 - } - var sum float32 - jx := incX - for j := 1; j < u; j++ { - sum += x[ix-jx] * a[(i-j)*lda+j] - jx += incX - } - if nonunit { - sum += x[ix] * a[i*lda] - } else { - sum += x[ix] - } - x[ix] = sum - ix -= incX - } - return - } - if incX == 1 { - for i := 0; i < n; i++ { - u := k - if i+k >= n { - u = n - i - 1 - } - var sum float32 - for j := 0; j < u; j++ { - sum += x[i+j+1] * a[(i+j+1)*lda+k-j-1] - } - if nonunit { - sum += x[i] * a[i*lda+k] - } else { - sum += x[i] - } - x[i] = sum - } - return - } - ix := kx - for i := 0; i < n; i++ { - u := k - if i+k >= n { - u = n - i - 1 - } - var ( - sum float32 - jx int - ) - for j := 0; j < u; j++ { - sum += x[ix+jx+incX] * a[(i+j+1)*lda+k-j-1] - jx += incX - } - if nonunit { - sum += x[ix] * a[i*lda+k] - } else { - sum += x[ix] - } - x[ix] = sum - ix += incX - } -} - -// Stpmv performs one of the matrix-vector operations -// x = A * x if tA == blas.NoTrans -// x = A^T * x if tA == blas.Trans or blas.ConjTrans -// where A is an n×n triangular matrix in packed format, and x is a vector. -// -// Float32 implementations are autogenerated and not directly tested. -func (Implementation) Stpmv(ul blas.Uplo, tA blas.Transpose, d blas.Diag, n int, ap []float32, x []float32, incX int) { - if ul != blas.Lower && ul != blas.Upper { - panic(badUplo) - } - if tA != blas.NoTrans && tA != blas.Trans && tA != blas.ConjTrans { - panic(badTranspose) - } - if d != blas.NonUnit && d != blas.Unit { - panic(badDiag) - } - if n < 0 { - panic(nLT0) - } - if incX == 0 { - panic(zeroIncX) - } - - // Quick return if possible. - if n == 0 { - return - } - - // For zero matrix size the following slice length checks are trivially satisfied. - if len(ap) < n*(n+1)/2 { - panic(shortAP) - } - if (incX > 0 && len(x) <= (n-1)*incX) || (incX < 0 && len(x) <= (1-n)*incX) { - panic(shortX) - } - - var kx int - if incX < 0 { - kx = -(n - 1) * incX - } - - nonUnit := d == blas.NonUnit - var offset int // Offset is the index of (i,i) - if tA == blas.NoTrans { - if ul == blas.Upper { - if incX == 1 { - for i := 0; i < n; i++ { - xi := x[i] - if nonUnit { - xi *= ap[offset] - } - atmp := ap[offset+1 : offset+n-i] - xtmp := x[i+1:] - for j, v := range atmp { - xi += v * xtmp[j] - } - x[i] = xi - offset += n - i - } - return - } - ix := kx - for i := 0; i < n; i++ { - xix := x[ix] - if nonUnit { - xix *= ap[offset] - } - atmp := ap[offset+1 : offset+n-i] - jx := kx + (i+1)*incX - for _, v := range atmp { - xix += v * x[jx] - jx += incX - } - x[ix] = xix - offset += n - i - ix += incX - } - return - } - if incX == 1 { - offset = n*(n+1)/2 - 1 - for i := n - 1; i >= 0; i-- { - xi := x[i] - if nonUnit { - xi *= ap[offset] - } - atmp := ap[offset-i : offset] - for j, v := range atmp { - xi += v * x[j] - } - x[i] = xi - offset -= i + 1 - } - return - } - ix := kx + (n-1)*incX - offset = n*(n+1)/2 - 1 - for i := n - 1; i >= 0; i-- { - xix := x[ix] - if nonUnit { - xix *= ap[offset] - } - atmp := ap[offset-i : offset] - jx := kx - for _, v := range atmp { - xix += v * x[jx] - jx += incX - } - x[ix] = xix - offset -= i + 1 - ix -= incX - } - return - } - // Cases where ap is transposed. - if ul == blas.Upper { - if incX == 1 { - offset = n*(n+1)/2 - 1 - for i := n - 1; i >= 0; i-- { - xi := x[i] - atmp := ap[offset+1 : offset+n-i] - xtmp := x[i+1:] - for j, v := range atmp { - xtmp[j] += v * xi - } - if nonUnit { - x[i] *= ap[offset] - } - offset -= n - i + 1 - } - return - } - ix := kx + (n-1)*incX - offset = n*(n+1)/2 - 1 - for i := n - 1; i >= 0; i-- { - xix := x[ix] - jx := kx + (i+1)*incX - atmp := ap[offset+1 : offset+n-i] - for _, v := range atmp { - x[jx] += v * xix - jx += incX - } - if nonUnit { - x[ix] *= ap[offset] - } - offset -= n - i + 1 - ix -= incX - } - return - } - if incX == 1 { - for i := 0; i < n; i++ { - xi := x[i] - atmp := ap[offset-i : offset] - for j, v := range atmp { - x[j] += v * xi - } - if nonUnit { - x[i] *= ap[offset] - } - offset += i + 2 - } - return - } - ix := kx - for i := 0; i < n; i++ { - xix := x[ix] - jx := kx - atmp := ap[offset-i : offset] - for _, v := range atmp { - x[jx] += v * xix - jx += incX - } - if nonUnit { - x[ix] *= ap[offset] - } - ix += incX - offset += i + 2 - } -} - -// Stbsv solves one of the systems of equations -// A * x = b if tA == blas.NoTrans -// A^T * x = b if tA == blas.Trans or tA == blas.ConjTrans -// where A is an n×n triangular band matrix with k+1 diagonals, -// and x and b are vectors. -// -// At entry to the function, x contains the values of b, and the result is -// stored in-place into x. -// -// No test for singularity or near-singularity is included in this -// routine. Such tests must be performed before calling this routine. -// -// Float32 implementations are autogenerated and not directly tested. -func (Implementation) Stbsv(ul blas.Uplo, tA blas.Transpose, d blas.Diag, n, k int, a []float32, lda int, x []float32, incX int) { - if ul != blas.Lower && ul != blas.Upper { - panic(badUplo) - } - if tA != blas.NoTrans && tA != blas.Trans && tA != blas.ConjTrans { - panic(badTranspose) - } - if d != blas.NonUnit && d != blas.Unit { - panic(badDiag) - } - if n < 0 { - panic(nLT0) - } - if k < 0 { - panic(kLT0) - } - if lda < k+1 { - panic(badLdA) - } - if incX == 0 { - panic(zeroIncX) - } - - // Quick return if possible. - if n == 0 { - return - } - - // For zero matrix size the following slice length checks are trivially satisfied. - if len(a) < lda*(n-1)+k+1 { - panic(shortA) - } - if (incX > 0 && len(x) <= (n-1)*incX) || (incX < 0 && len(x) <= (1-n)*incX) { - panic(shortX) - } - - var kx int - if incX < 0 { - kx = -(n - 1) * incX - } - nonUnit := d == blas.NonUnit - // Form x = A^-1 x. - // Several cases below use subslices for speed improvement. - // The incX != 1 cases usually do not because incX may be negative. - if tA == blas.NoTrans { - if ul == blas.Upper { - if incX == 1 { - for i := n - 1; i >= 0; i-- { - bands := k - if i+bands >= n { - bands = n - i - 1 - } - atmp := a[i*lda+1:] - xtmp := x[i+1 : i+bands+1] - var sum float32 - for j, v := range xtmp { - sum += v * atmp[j] - } - x[i] -= sum - if nonUnit { - x[i] /= a[i*lda] - } - } - return - } - ix := kx + (n-1)*incX - for i := n - 1; i >= 0; i-- { - max := k + 1 - if i+max > n { - max = n - i - } - atmp := a[i*lda:] - var ( - jx int - sum float32 - ) - for j := 1; j < max; j++ { - jx += incX - sum += x[ix+jx] * atmp[j] - } - x[ix] -= sum - if nonUnit { - x[ix] /= atmp[0] - } - ix -= incX - } - return - } - if incX == 1 { - for i := 0; i < n; i++ { - bands := k - if i-k < 0 { - bands = i - } - atmp := a[i*lda+k-bands:] - xtmp := x[i-bands : i] - var sum float32 - for j, v := range xtmp { - sum += v * atmp[j] - } - x[i] -= sum - if nonUnit { - x[i] /= atmp[bands] - } - } - return - } - ix := kx - for i := 0; i < n; i++ { - bands := k - if i-k < 0 { - bands = i - } - atmp := a[i*lda+k-bands:] - var ( - sum float32 - jx int - ) - for j := 0; j < bands; j++ { - sum += x[ix-bands*incX+jx] * atmp[j] - jx += incX - } - x[ix] -= sum - if nonUnit { - x[ix] /= atmp[bands] - } - ix += incX - } - return - } - // Cases where a is transposed. - if ul == blas.Upper { - if incX == 1 { - for i := 0; i < n; i++ { - bands := k - if i-k < 0 { - bands = i - } - var sum float32 - for j := 0; j < bands; j++ { - sum += x[i-bands+j] * a[(i-bands+j)*lda+bands-j] - } - x[i] -= sum - if nonUnit { - x[i] /= a[i*lda] - } - } - return - } - ix := kx - for i := 0; i < n; i++ { - bands := k - if i-k < 0 { - bands = i - } - var ( - sum float32 - jx int - ) - for j := 0; j < bands; j++ { - sum += x[ix-bands*incX+jx] * a[(i-bands+j)*lda+bands-j] - jx += incX - } - x[ix] -= sum - if nonUnit { - x[ix] /= a[i*lda] - } - ix += incX - } - return - } - if incX == 1 { - for i := n - 1; i >= 0; i-- { - bands := k - if i+bands >= n { - bands = n - i - 1 - } - var sum float32 - xtmp := x[i+1 : i+1+bands] - for j, v := range xtmp { - sum += v * a[(i+j+1)*lda+k-j-1] - } - x[i] -= sum - if nonUnit { - x[i] /= a[i*lda+k] - } - } - return - } - ix := kx + (n-1)*incX - for i := n - 1; i >= 0; i-- { - bands := k - if i+bands >= n { - bands = n - i - 1 - } - var ( - sum float32 - jx int - ) - for j := 0; j < bands; j++ { - sum += x[ix+jx+incX] * a[(i+j+1)*lda+k-j-1] - jx += incX - } - x[ix] -= sum - if nonUnit { - x[ix] /= a[i*lda+k] - } - ix -= incX - } -} - -// Ssbmv performs the matrix-vector operation -// y = alpha * A * x + beta * y -// where A is an n×n symmetric band matrix with k super-diagonals, x and y are -// vectors, and alpha and beta are scalars. -// -// Float32 implementations are autogenerated and not directly tested. -func (Implementation) Ssbmv(ul blas.Uplo, n, k int, alpha float32, a []float32, lda int, x []float32, incX int, beta float32, y []float32, incY int) { - if ul != blas.Lower && ul != blas.Upper { - panic(badUplo) - } - if n < 0 { - panic(nLT0) - } - if k < 0 { - panic(kLT0) - } - if lda < k+1 { - panic(badLdA) - } - if incX == 0 { - panic(zeroIncX) - } - if incY == 0 { - panic(zeroIncY) - } - - // Quick return if possible. - if n == 0 { - return - } - - // For zero matrix size the following slice length checks are trivially satisfied. - if len(a) < lda*(n-1)+k+1 { - panic(shortA) - } - if (incX > 0 && len(x) <= (n-1)*incX) || (incX < 0 && len(x) <= (1-n)*incX) { - panic(shortX) - } - if (incY > 0 && len(y) <= (n-1)*incY) || (incY < 0 && len(y) <= (1-n)*incY) { - panic(shortY) - } - - // Quick return if possible. - if alpha == 0 && beta == 1 { - return - } - - // Set up indexes - lenX := n - lenY := n - var kx, ky int - if incX < 0 { - kx = -(lenX - 1) * incX - } - if incY < 0 { - ky = -(lenY - 1) * incY - } - - // Form y = beta * y. - if beta != 1 { - if incY == 1 { - if beta == 0 { - for i := range y[:n] { - y[i] = 0 - } - } else { - f32.ScalUnitary(beta, y[:n]) - } - } else { - iy := ky - if beta == 0 { - for i := 0; i < n; i++ { - y[iy] = 0 - iy += incY - } - } else { - if incY > 0 { - f32.ScalInc(beta, y, uintptr(n), uintptr(incY)) - } else { - f32.ScalInc(beta, y, uintptr(n), uintptr(-incY)) - } - } - } - } - - if alpha == 0 { - return - } - - if ul == blas.Upper { - if incX == 1 { - iy := ky - for i := 0; i < n; i++ { - atmp := a[i*lda:] - tmp := alpha * x[i] - sum := tmp * atmp[0] - u := min(k, n-i-1) - jy := incY - for j := 1; j <= u; j++ { - v := atmp[j] - sum += alpha * x[i+j] * v - y[iy+jy] += tmp * v - jy += incY - } - y[iy] += sum - iy += incY - } - return - } - ix := kx - iy := ky - for i := 0; i < n; i++ { - atmp := a[i*lda:] - tmp := alpha * x[ix] - sum := tmp * atmp[0] - u := min(k, n-i-1) - jx := incX - jy := incY - for j := 1; j <= u; j++ { - v := atmp[j] - sum += alpha * x[ix+jx] * v - y[iy+jy] += tmp * v - jx += incX - jy += incY - } - y[iy] += sum - ix += incX - iy += incY - } - return - } - - // Casses where a has bands below the diagonal. - if incX == 1 { - iy := ky - for i := 0; i < n; i++ { - l := max(0, k-i) - tmp := alpha * x[i] - jy := l * incY - atmp := a[i*lda:] - for j := l; j < k; j++ { - v := atmp[j] - y[iy] += alpha * v * x[i-k+j] - y[iy-k*incY+jy] += tmp * v - jy += incY - } - y[iy] += tmp * atmp[k] - iy += incY - } - return - } - ix := kx - iy := ky - for i := 0; i < n; i++ { - l := max(0, k-i) - tmp := alpha * x[ix] - jx := l * incX - jy := l * incY - atmp := a[i*lda:] - for j := l; j < k; j++ { - v := atmp[j] - y[iy] += alpha * v * x[ix-k*incX+jx] - y[iy-k*incY+jy] += tmp * v - jx += incX - jy += incY - } - y[iy] += tmp * atmp[k] - ix += incX - iy += incY - } -} - -// Ssyr performs the symmetric rank-one update -// A += alpha * x * x^T -// where A is an n×n symmetric matrix, and x is a vector. -// -// Float32 implementations are autogenerated and not directly tested. -func (Implementation) Ssyr(ul blas.Uplo, n int, alpha float32, x []float32, incX int, a []float32, lda int) { - if ul != blas.Lower && ul != blas.Upper { - panic(badUplo) - } - if n < 0 { - panic(nLT0) - } - if lda < max(1, n) { - panic(badLdA) - } - if incX == 0 { - panic(zeroIncX) - } - - // Quick return if possible. - if n == 0 { - return - } - - // For zero matrix size the following slice length checks are trivially satisfied. - if (incX > 0 && len(x) <= (n-1)*incX) || (incX < 0 && len(x) <= (1-n)*incX) { - panic(shortX) - } - if len(a) < lda*(n-1)+n { - panic(shortA) - } - - // Quick return if possible. - if alpha == 0 { - return - } - - lenX := n - var kx int - if incX < 0 { - kx = -(lenX - 1) * incX - } - if ul == blas.Upper { - if incX == 1 { - for i := 0; i < n; i++ { - tmp := x[i] * alpha - if tmp != 0 { - atmp := a[i*lda+i : i*lda+n] - xtmp := x[i:n] - for j, v := range xtmp { - atmp[j] += v * tmp - } - } - } - return - } - ix := kx - for i := 0; i < n; i++ { - tmp := x[ix] * alpha - if tmp != 0 { - jx := ix - atmp := a[i*lda:] - for j := i; j < n; j++ { - atmp[j] += x[jx] * tmp - jx += incX - } - } - ix += incX - } - return - } - // Cases where a is lower triangular. - if incX == 1 { - for i := 0; i < n; i++ { - tmp := x[i] * alpha - if tmp != 0 { - atmp := a[i*lda:] - xtmp := x[:i+1] - for j, v := range xtmp { - atmp[j] += tmp * v - } - } - } - return - } - ix := kx - for i := 0; i < n; i++ { - tmp := x[ix] * alpha - if tmp != 0 { - atmp := a[i*lda:] - jx := kx - for j := 0; j < i+1; j++ { - atmp[j] += tmp * x[jx] - jx += incX - } - } - ix += incX - } -} - -// Ssyr2 performs the symmetric rank-two update -// A += alpha * x * y^T + alpha * y * x^T -// where A is an n×n symmetric matrix, x and y are vectors, and alpha is a scalar. -// -// Float32 implementations are autogenerated and not directly tested. -func (Implementation) Ssyr2(ul blas.Uplo, n int, alpha float32, x []float32, incX int, y []float32, incY int, a []float32, lda int) { - if ul != blas.Lower && ul != blas.Upper { - panic(badUplo) - } - if n < 0 { - panic(nLT0) - } - if lda < max(1, n) { - panic(badLdA) - } - if incX == 0 { - panic(zeroIncX) - } - if incY == 0 { - panic(zeroIncY) - } - - // Quick return if possible. - if n == 0 { - return - } - - // For zero matrix size the following slice length checks are trivially satisfied. - if (incX > 0 && len(x) <= (n-1)*incX) || (incX < 0 && len(x) <= (1-n)*incX) { - panic(shortX) - } - if (incY > 0 && len(y) <= (n-1)*incY) || (incY < 0 && len(y) <= (1-n)*incY) { - panic(shortY) - } - if len(a) < lda*(n-1)+n { - panic(shortA) - } - - // Quick return if possible. - if alpha == 0 { - return - } - - var ky, kx int - if incY < 0 { - ky = -(n - 1) * incY - } - if incX < 0 { - kx = -(n - 1) * incX - } - if ul == blas.Upper { - if incX == 1 && incY == 1 { - for i := 0; i < n; i++ { - xi := x[i] - yi := y[i] - atmp := a[i*lda:] - for j := i; j < n; j++ { - atmp[j] += alpha * (xi*y[j] + x[j]*yi) - } - } - return - } - ix := kx - iy := ky - for i := 0; i < n; i++ { - jx := kx + i*incX - jy := ky + i*incY - xi := x[ix] - yi := y[iy] - atmp := a[i*lda:] - for j := i; j < n; j++ { - atmp[j] += alpha * (xi*y[jy] + x[jx]*yi) - jx += incX - jy += incY - } - ix += incX - iy += incY - } - return - } - if incX == 1 && incY == 1 { - for i := 0; i < n; i++ { - xi := x[i] - yi := y[i] - atmp := a[i*lda:] - for j := 0; j <= i; j++ { - atmp[j] += alpha * (xi*y[j] + x[j]*yi) - } - } - return - } - ix := kx - iy := ky - for i := 0; i < n; i++ { - jx := kx - jy := ky - xi := x[ix] - yi := y[iy] - atmp := a[i*lda:] - for j := 0; j <= i; j++ { - atmp[j] += alpha * (xi*y[jy] + x[jx]*yi) - jx += incX - jy += incY - } - ix += incX - iy += incY - } -} - -// Stpsv solves one of the systems of equations -// A * x = b if tA == blas.NoTrans -// A^T * x = b if tA == blas.Trans or blas.ConjTrans -// where A is an n×n triangular matrix in packed format, and x and b are vectors. -// -// At entry to the function, x contains the values of b, and the result is -// stored in-place into x. -// -// No test for singularity or near-singularity is included in this -// routine. Such tests must be performed before calling this routine. -// -// Float32 implementations are autogenerated and not directly tested. -func (Implementation) Stpsv(ul blas.Uplo, tA blas.Transpose, d blas.Diag, n int, ap []float32, x []float32, incX int) { - if ul != blas.Lower && ul != blas.Upper { - panic(badUplo) - } - if tA != blas.NoTrans && tA != blas.Trans && tA != blas.ConjTrans { - panic(badTranspose) - } - if d != blas.NonUnit && d != blas.Unit { - panic(badDiag) - } - if n < 0 { - panic(nLT0) - } - if incX == 0 { - panic(zeroIncX) - } - - // Quick return if possible. - if n == 0 { - return - } - - // For zero matrix size the following slice length checks are trivially satisfied. - if len(ap) < n*(n+1)/2 { - panic(shortAP) - } - if (incX > 0 && len(x) <= (n-1)*incX) || (incX < 0 && len(x) <= (1-n)*incX) { - panic(shortX) - } - - var kx int - if incX < 0 { - kx = -(n - 1) * incX - } - - nonUnit := d == blas.NonUnit - var offset int // Offset is the index of (i,i) - if tA == blas.NoTrans { - if ul == blas.Upper { - offset = n*(n+1)/2 - 1 - if incX == 1 { - for i := n - 1; i >= 0; i-- { - atmp := ap[offset+1 : offset+n-i] - xtmp := x[i+1:] - var sum float32 - for j, v := range atmp { - sum += v * xtmp[j] - } - x[i] -= sum - if nonUnit { - x[i] /= ap[offset] - } - offset -= n - i + 1 - } - return - } - ix := kx + (n-1)*incX - for i := n - 1; i >= 0; i-- { - atmp := ap[offset+1 : offset+n-i] - jx := kx + (i+1)*incX - var sum float32 - for _, v := range atmp { - sum += v * x[jx] - jx += incX - } - x[ix] -= sum - if nonUnit { - x[ix] /= ap[offset] - } - ix -= incX - offset -= n - i + 1 - } - return - } - if incX == 1 { - for i := 0; i < n; i++ { - atmp := ap[offset-i : offset] - var sum float32 - for j, v := range atmp { - sum += v * x[j] - } - x[i] -= sum - if nonUnit { - x[i] /= ap[offset] - } - offset += i + 2 - } - return - } - ix := kx - for i := 0; i < n; i++ { - jx := kx - atmp := ap[offset-i : offset] - var sum float32 - for _, v := range atmp { - sum += v * x[jx] - jx += incX - } - x[ix] -= sum - if nonUnit { - x[ix] /= ap[offset] - } - ix += incX - offset += i + 2 - } - return - } - // Cases where ap is transposed. - if ul == blas.Upper { - if incX == 1 { - for i := 0; i < n; i++ { - if nonUnit { - x[i] /= ap[offset] - } - xi := x[i] - atmp := ap[offset+1 : offset+n-i] - xtmp := x[i+1:] - for j, v := range atmp { - xtmp[j] -= v * xi - } - offset += n - i - } - return - } - ix := kx - for i := 0; i < n; i++ { - if nonUnit { - x[ix] /= ap[offset] - } - xix := x[ix] - atmp := ap[offset+1 : offset+n-i] - jx := kx + (i+1)*incX - for _, v := range atmp { - x[jx] -= v * xix - jx += incX - } - ix += incX - offset += n - i - } - return - } - if incX == 1 { - offset = n*(n+1)/2 - 1 - for i := n - 1; i >= 0; i-- { - if nonUnit { - x[i] /= ap[offset] - } - xi := x[i] - atmp := ap[offset-i : offset] - for j, v := range atmp { - x[j] -= v * xi - } - offset -= i + 1 - } - return - } - ix := kx + (n-1)*incX - offset = n*(n+1)/2 - 1 - for i := n - 1; i >= 0; i-- { - if nonUnit { - x[ix] /= ap[offset] - } - xix := x[ix] - atmp := ap[offset-i : offset] - jx := kx - for _, v := range atmp { - x[jx] -= v * xix - jx += incX - } - ix -= incX - offset -= i + 1 - } -} - -// Sspmv performs the matrix-vector operation -// y = alpha * A * x + beta * y -// where A is an n×n symmetric matrix in packed format, x and y are vectors, -// and alpha and beta are scalars. -// -// Float32 implementations are autogenerated and not directly tested. -func (Implementation) Sspmv(ul blas.Uplo, n int, alpha float32, ap []float32, x []float32, incX int, beta float32, y []float32, incY int) { - if ul != blas.Lower && ul != blas.Upper { - panic(badUplo) - } - if n < 0 { - panic(nLT0) - } - if incX == 0 { - panic(zeroIncX) - } - if incY == 0 { - panic(zeroIncY) - } - - // Quick return if possible. - if n == 0 { - return - } - - // For zero matrix size the following slice length checks are trivially satisfied. - if len(ap) < n*(n+1)/2 { - panic(shortAP) - } - if (incX > 0 && len(x) <= (n-1)*incX) || (incX < 0 && len(x) <= (1-n)*incX) { - panic(shortX) - } - if (incY > 0 && len(y) <= (n-1)*incY) || (incY < 0 && len(y) <= (1-n)*incY) { - panic(shortY) - } - - // Quick return if possible. - if alpha == 0 && beta == 1 { - return - } - - // Set up start points - var kx, ky int - if incX < 0 { - kx = -(n - 1) * incX - } - if incY < 0 { - ky = -(n - 1) * incY - } - - // Form y = beta * y. - if beta != 1 { - if incY == 1 { - if beta == 0 { - for i := range y[:n] { - y[i] = 0 - } - } else { - f32.ScalUnitary(beta, y[:n]) - } - } else { - iy := ky - if beta == 0 { - for i := 0; i < n; i++ { - y[iy] = 0 - iy += incY - } - } else { - if incY > 0 { - f32.ScalInc(beta, y, uintptr(n), uintptr(incY)) - } else { - f32.ScalInc(beta, y, uintptr(n), uintptr(-incY)) - } - } - } - } - - if alpha == 0 { - return - } - - if n == 1 { - y[0] += alpha * ap[0] * x[0] - return - } - var offset int // Offset is the index of (i,i). - if ul == blas.Upper { - if incX == 1 { - iy := ky - for i := 0; i < n; i++ { - xv := x[i] * alpha - sum := ap[offset] * x[i] - atmp := ap[offset+1 : offset+n-i] - xtmp := x[i+1:] - jy := ky + (i+1)*incY - for j, v := range atmp { - sum += v * xtmp[j] - y[jy] += v * xv - jy += incY - } - y[iy] += alpha * sum - iy += incY - offset += n - i - } - return - } - ix := kx - iy := ky - for i := 0; i < n; i++ { - xv := x[ix] * alpha - sum := ap[offset] * x[ix] - atmp := ap[offset+1 : offset+n-i] - jx := kx + (i+1)*incX - jy := ky + (i+1)*incY - for _, v := range atmp { - sum += v * x[jx] - y[jy] += v * xv - jx += incX - jy += incY - } - y[iy] += alpha * sum - ix += incX - iy += incY - offset += n - i - } - return - } - if incX == 1 { - iy := ky - for i := 0; i < n; i++ { - xv := x[i] * alpha - atmp := ap[offset-i : offset] - jy := ky - var sum float32 - for j, v := range atmp { - sum += v * x[j] - y[jy] += v * xv - jy += incY - } - sum += ap[offset] * x[i] - y[iy] += alpha * sum - iy += incY - offset += i + 2 - } - return - } - ix := kx - iy := ky - for i := 0; i < n; i++ { - xv := x[ix] * alpha - atmp := ap[offset-i : offset] - jx := kx - jy := ky - var sum float32 - for _, v := range atmp { - sum += v * x[jx] - y[jy] += v * xv - jx += incX - jy += incY - } - - sum += ap[offset] * x[ix] - y[iy] += alpha * sum - ix += incX - iy += incY - offset += i + 2 - } -} - -// Sspr performs the symmetric rank-one operation -// A += alpha * x * x^T -// where A is an n×n symmetric matrix in packed format, x is a vector, and -// alpha is a scalar. -// -// Float32 implementations are autogenerated and not directly tested. -func (Implementation) Sspr(ul blas.Uplo, n int, alpha float32, x []float32, incX int, ap []float32) { - if ul != blas.Lower && ul != blas.Upper { - panic(badUplo) - } - if n < 0 { - panic(nLT0) - } - if incX == 0 { - panic(zeroIncX) - } - - // Quick return if possible. - if n == 0 { - return - } - - // For zero matrix size the following slice length checks are trivially satisfied. - if (incX > 0 && len(x) <= (n-1)*incX) || (incX < 0 && len(x) <= (1-n)*incX) { - panic(shortX) - } - if len(ap) < n*(n+1)/2 { - panic(shortAP) - } - - // Quick return if possible. - if alpha == 0 { - return - } - - lenX := n - var kx int - if incX < 0 { - kx = -(lenX - 1) * incX - } - var offset int // Offset is the index of (i,i). - if ul == blas.Upper { - if incX == 1 { - for i := 0; i < n; i++ { - atmp := ap[offset:] - xv := alpha * x[i] - xtmp := x[i:n] - for j, v := range xtmp { - atmp[j] += xv * v - } - offset += n - i - } - return - } - ix := kx - for i := 0; i < n; i++ { - jx := kx + i*incX - atmp := ap[offset:] - xv := alpha * x[ix] - for j := 0; j < n-i; j++ { - atmp[j] += xv * x[jx] - jx += incX - } - ix += incX - offset += n - i - } - return - } - if incX == 1 { - for i := 0; i < n; i++ { - atmp := ap[offset-i:] - xv := alpha * x[i] - xtmp := x[:i+1] - for j, v := range xtmp { - atmp[j] += xv * v - } - offset += i + 2 - } - return - } - ix := kx - for i := 0; i < n; i++ { - jx := kx - atmp := ap[offset-i:] - xv := alpha * x[ix] - for j := 0; j <= i; j++ { - atmp[j] += xv * x[jx] - jx += incX - } - ix += incX - offset += i + 2 - } -} - -// Sspr2 performs the symmetric rank-2 update -// A += alpha * x * y^T + alpha * y * x^T -// where A is an n×n symmetric matrix in packed format, x and y are vectors, -// and alpha is a scalar. -// -// Float32 implementations are autogenerated and not directly tested. -func (Implementation) Sspr2(ul blas.Uplo, n int, alpha float32, x []float32, incX int, y []float32, incY int, ap []float32) { - if ul != blas.Lower && ul != blas.Upper { - panic(badUplo) - } - if n < 0 { - panic(nLT0) - } - if incX == 0 { - panic(zeroIncX) - } - if incY == 0 { - panic(zeroIncY) - } - - // Quick return if possible. - if n == 0 { - return - } - - // For zero matrix size the following slice length checks are trivially satisfied. - if (incX > 0 && len(x) <= (n-1)*incX) || (incX < 0 && len(x) <= (1-n)*incX) { - panic(shortX) - } - if (incY > 0 && len(y) <= (n-1)*incY) || (incY < 0 && len(y) <= (1-n)*incY) { - panic(shortY) - } - if len(ap) < n*(n+1)/2 { - panic(shortAP) - } - - // Quick return if possible. - if alpha == 0 { - return - } - - var ky, kx int - if incY < 0 { - ky = -(n - 1) * incY - } - if incX < 0 { - kx = -(n - 1) * incX - } - var offset int // Offset is the index of (i,i). - if ul == blas.Upper { - if incX == 1 && incY == 1 { - for i := 0; i < n; i++ { - atmp := ap[offset:] - xi := x[i] - yi := y[i] - xtmp := x[i:n] - ytmp := y[i:n] - for j, v := range xtmp { - atmp[j] += alpha * (xi*ytmp[j] + v*yi) - } - offset += n - i - } - return - } - ix := kx - iy := ky - for i := 0; i < n; i++ { - jx := kx + i*incX - jy := ky + i*incY - atmp := ap[offset:] - xi := x[ix] - yi := y[iy] - for j := 0; j < n-i; j++ { - atmp[j] += alpha * (xi*y[jy] + x[jx]*yi) - jx += incX - jy += incY - } - ix += incX - iy += incY - offset += n - i - } - return - } - if incX == 1 && incY == 1 { - for i := 0; i < n; i++ { - atmp := ap[offset-i:] - xi := x[i] - yi := y[i] - xtmp := x[:i+1] - for j, v := range xtmp { - atmp[j] += alpha * (xi*y[j] + v*yi) - } - offset += i + 2 - } - return - } - ix := kx - iy := ky - for i := 0; i < n; i++ { - jx := kx - jy := ky - atmp := ap[offset-i:] - for j := 0; j <= i; j++ { - atmp[j] += alpha * (x[ix]*y[jy] + x[jx]*y[iy]) - jx += incX - jy += incY - } - ix += incX - iy += incY - offset += i + 2 - } -} diff --git a/vendor/gonum.org/v1/gonum/blas/gonum/level2float64.go b/vendor/gonum.org/v1/gonum/blas/gonum/level2float64.go deleted file mode 100644 index 261257888d..0000000000 --- a/vendor/gonum.org/v1/gonum/blas/gonum/level2float64.go +++ /dev/null @@ -1,2264 +0,0 @@ -// Copyright ©2014 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import ( - "gonum.org/v1/gonum/blas" - "gonum.org/v1/gonum/internal/asm/f64" -) - -var _ blas.Float64Level2 = Implementation{} - -// Dger performs the rank-one operation -// A += alpha * x * y^T -// where A is an m×n dense matrix, x and y are vectors, and alpha is a scalar. -func (Implementation) Dger(m, n int, alpha float64, x []float64, incX int, y []float64, incY int, a []float64, lda int) { - if m < 0 { - panic(mLT0) - } - if n < 0 { - panic(nLT0) - } - if lda < max(1, n) { - panic(badLdA) - } - if incX == 0 { - panic(zeroIncX) - } - if incY == 0 { - panic(zeroIncY) - } - - // Quick return if possible. - if m == 0 || n == 0 { - return - } - - // For zero matrix size the following slice length checks are trivially satisfied. - if (incX > 0 && len(x) <= (m-1)*incX) || (incX < 0 && len(x) <= (1-m)*incX) { - panic(shortX) - } - if (incY > 0 && len(y) <= (n-1)*incY) || (incY < 0 && len(y) <= (1-n)*incY) { - panic(shortY) - } - if len(a) < lda*(m-1)+n { - panic(shortA) - } - - // Quick return if possible. - if alpha == 0 { - return - } - f64.Ger(uintptr(m), uintptr(n), - alpha, - x, uintptr(incX), - y, uintptr(incY), - a, uintptr(lda)) -} - -// Dgbmv performs one of the matrix-vector operations -// y = alpha * A * x + beta * y if tA == blas.NoTrans -// y = alpha * A^T * x + beta * y if tA == blas.Trans or blas.ConjTrans -// where A is an m×n band matrix with kL sub-diagonals and kU super-diagonals, -// x and y are vectors, and alpha and beta are scalars. -func (Implementation) Dgbmv(tA blas.Transpose, m, n, kL, kU int, alpha float64, a []float64, lda int, x []float64, incX int, beta float64, y []float64, incY int) { - if tA != blas.NoTrans && tA != blas.Trans && tA != blas.ConjTrans { - panic(badTranspose) - } - if m < 0 { - panic(mLT0) - } - if n < 0 { - panic(nLT0) - } - if kL < 0 { - panic(kLLT0) - } - if kU < 0 { - panic(kULT0) - } - if lda < kL+kU+1 { - panic(badLdA) - } - if incX == 0 { - panic(zeroIncX) - } - if incY == 0 { - panic(zeroIncY) - } - - // Quick return if possible. - if m == 0 || n == 0 { - return - } - - // For zero matrix size the following slice length checks are trivially satisfied. - if len(a) < lda*(min(m, n+kL)-1)+kL+kU+1 { - panic(shortA) - } - lenX := m - lenY := n - if tA == blas.NoTrans { - lenX = n - lenY = m - } - if (incX > 0 && len(x) <= (lenX-1)*incX) || (incX < 0 && len(x) <= (1-lenX)*incX) { - panic(shortX) - } - if (incY > 0 && len(y) <= (lenY-1)*incY) || (incY < 0 && len(y) <= (1-lenY)*incY) { - panic(shortY) - } - - // Quick return if possible. - if alpha == 0 && beta == 1 { - return - } - - var kx, ky int - if incX < 0 { - kx = -(lenX - 1) * incX - } - if incY < 0 { - ky = -(lenY - 1) * incY - } - - // Form y = beta * y. - if beta != 1 { - if incY == 1 { - if beta == 0 { - for i := range y[:lenY] { - y[i] = 0 - } - } else { - f64.ScalUnitary(beta, y[:lenY]) - } - } else { - iy := ky - if beta == 0 { - for i := 0; i < lenY; i++ { - y[iy] = 0 - iy += incY - } - } else { - if incY > 0 { - f64.ScalInc(beta, y, uintptr(lenY), uintptr(incY)) - } else { - f64.ScalInc(beta, y, uintptr(lenY), uintptr(-incY)) - } - } - } - } - - if alpha == 0 { - return - } - - // i and j are indices of the compacted banded matrix. - // off is the offset into the dense matrix (off + j = densej) - nCol := kU + 1 + kL - if tA == blas.NoTrans { - iy := ky - if incX == 1 { - for i := 0; i < min(m, n+kL); i++ { - l := max(0, kL-i) - u := min(nCol, n+kL-i) - off := max(0, i-kL) - atmp := a[i*lda+l : i*lda+u] - xtmp := x[off : off+u-l] - var sum float64 - for j, v := range atmp { - sum += xtmp[j] * v - } - y[iy] += sum * alpha - iy += incY - } - return - } - for i := 0; i < min(m, n+kL); i++ { - l := max(0, kL-i) - u := min(nCol, n+kL-i) - off := max(0, i-kL) - atmp := a[i*lda+l : i*lda+u] - jx := kx - var sum float64 - for _, v := range atmp { - sum += x[off*incX+jx] * v - jx += incX - } - y[iy] += sum * alpha - iy += incY - } - return - } - if incX == 1 { - for i := 0; i < min(m, n+kL); i++ { - l := max(0, kL-i) - u := min(nCol, n+kL-i) - off := max(0, i-kL) - atmp := a[i*lda+l : i*lda+u] - tmp := alpha * x[i] - jy := ky - for _, v := range atmp { - y[jy+off*incY] += tmp * v - jy += incY - } - } - return - } - ix := kx - for i := 0; i < min(m, n+kL); i++ { - l := max(0, kL-i) - u := min(nCol, n+kL-i) - off := max(0, i-kL) - atmp := a[i*lda+l : i*lda+u] - tmp := alpha * x[ix] - jy := ky - for _, v := range atmp { - y[jy+off*incY] += tmp * v - jy += incY - } - ix += incX - } -} - -// Dtrmv performs one of the matrix-vector operations -// x = A * x if tA == blas.NoTrans -// x = A^T * x if tA == blas.Trans or blas.ConjTrans -// where A is an n×n triangular matrix, and x is a vector. -func (Implementation) Dtrmv(ul blas.Uplo, tA blas.Transpose, d blas.Diag, n int, a []float64, lda int, x []float64, incX int) { - if ul != blas.Lower && ul != blas.Upper { - panic(badUplo) - } - if tA != blas.NoTrans && tA != blas.Trans && tA != blas.ConjTrans { - panic(badTranspose) - } - if d != blas.NonUnit && d != blas.Unit { - panic(badDiag) - } - if n < 0 { - panic(nLT0) - } - if lda < max(1, n) { - panic(badLdA) - } - if incX == 0 { - panic(zeroIncX) - } - - // Quick return if possible. - if n == 0 { - return - } - - // For zero matrix size the following slice length checks are trivially satisfied. - if len(a) < lda*(n-1)+n { - panic(shortA) - } - if (incX > 0 && len(x) <= (n-1)*incX) || (incX < 0 && len(x) <= (1-n)*incX) { - panic(shortX) - } - - nonUnit := d != blas.Unit - if n == 1 { - if nonUnit { - x[0] *= a[0] - } - return - } - var kx int - if incX <= 0 { - kx = -(n - 1) * incX - } - if tA == blas.NoTrans { - if ul == blas.Upper { - if incX == 1 { - for i := 0; i < n; i++ { - ilda := i * lda - var tmp float64 - if nonUnit { - tmp = a[ilda+i] * x[i] - } else { - tmp = x[i] - } - x[i] = tmp + f64.DotUnitary(a[ilda+i+1:ilda+n], x[i+1:n]) - } - return - } - ix := kx - for i := 0; i < n; i++ { - ilda := i * lda - var tmp float64 - if nonUnit { - tmp = a[ilda+i] * x[ix] - } else { - tmp = x[ix] - } - x[ix] = tmp + f64.DotInc(x, a[ilda+i+1:ilda+n], uintptr(n-i-1), uintptr(incX), 1, uintptr(ix+incX), 0) - ix += incX - } - return - } - if incX == 1 { - for i := n - 1; i >= 0; i-- { - ilda := i * lda - var tmp float64 - if nonUnit { - tmp += a[ilda+i] * x[i] - } else { - tmp = x[i] - } - x[i] = tmp + f64.DotUnitary(a[ilda:ilda+i], x[:i]) - } - return - } - ix := kx + (n-1)*incX - for i := n - 1; i >= 0; i-- { - ilda := i * lda - var tmp float64 - if nonUnit { - tmp = a[ilda+i] * x[ix] - } else { - tmp = x[ix] - } - x[ix] = tmp + f64.DotInc(x, a[ilda:ilda+i], uintptr(i), uintptr(incX), 1, uintptr(kx), 0) - ix -= incX - } - return - } - // Cases where a is transposed. - if ul == blas.Upper { - if incX == 1 { - for i := n - 1; i >= 0; i-- { - ilda := i * lda - xi := x[i] - f64.AxpyUnitary(xi, a[ilda+i+1:ilda+n], x[i+1:n]) - if nonUnit { - x[i] *= a[ilda+i] - } - } - return - } - ix := kx + (n-1)*incX - for i := n - 1; i >= 0; i-- { - ilda := i * lda - xi := x[ix] - f64.AxpyInc(xi, a[ilda+i+1:ilda+n], x, uintptr(n-i-1), 1, uintptr(incX), 0, uintptr(kx+(i+1)*incX)) - if nonUnit { - x[ix] *= a[ilda+i] - } - ix -= incX - } - return - } - if incX == 1 { - for i := 0; i < n; i++ { - ilda := i * lda - xi := x[i] - f64.AxpyUnitary(xi, a[ilda:ilda+i], x[:i]) - if nonUnit { - x[i] *= a[i*lda+i] - } - } - return - } - ix := kx - for i := 0; i < n; i++ { - ilda := i * lda - xi := x[ix] - f64.AxpyInc(xi, a[ilda:ilda+i], x, uintptr(i), 1, uintptr(incX), 0, uintptr(kx)) - if nonUnit { - x[ix] *= a[ilda+i] - } - ix += incX - } -} - -// Dtrsv solves one of the systems of equations -// A * x = b if tA == blas.NoTrans -// A^T * x = b if tA == blas.Trans or blas.ConjTrans -// where A is an n×n triangular matrix, and x and b are vectors. -// -// At entry to the function, x contains the values of b, and the result is -// stored in-place into x. -// -// No test for singularity or near-singularity is included in this -// routine. Such tests must be performed before calling this routine. -func (Implementation) Dtrsv(ul blas.Uplo, tA blas.Transpose, d blas.Diag, n int, a []float64, lda int, x []float64, incX int) { - if ul != blas.Lower && ul != blas.Upper { - panic(badUplo) - } - if tA != blas.NoTrans && tA != blas.Trans && tA != blas.ConjTrans { - panic(badTranspose) - } - if d != blas.NonUnit && d != blas.Unit { - panic(badDiag) - } - if n < 0 { - panic(nLT0) - } - if lda < max(1, n) { - panic(badLdA) - } - if incX == 0 { - panic(zeroIncX) - } - - // Quick return if possible. - if n == 0 { - return - } - - // For zero matrix size the following slice length checks are trivially satisfied. - if len(a) < lda*(n-1)+n { - panic(shortA) - } - if (incX > 0 && len(x) <= (n-1)*incX) || (incX < 0 && len(x) <= (1-n)*incX) { - panic(shortX) - } - - if n == 1 { - if d == blas.NonUnit { - x[0] /= a[0] - } - return - } - - var kx int - if incX < 0 { - kx = -(n - 1) * incX - } - nonUnit := d == blas.NonUnit - if tA == blas.NoTrans { - if ul == blas.Upper { - if incX == 1 { - for i := n - 1; i >= 0; i-- { - var sum float64 - atmp := a[i*lda+i+1 : i*lda+n] - for j, v := range atmp { - jv := i + j + 1 - sum += x[jv] * v - } - x[i] -= sum - if nonUnit { - x[i] /= a[i*lda+i] - } - } - return - } - ix := kx + (n-1)*incX - for i := n - 1; i >= 0; i-- { - var sum float64 - jx := ix + incX - atmp := a[i*lda+i+1 : i*lda+n] - for _, v := range atmp { - sum += x[jx] * v - jx += incX - } - x[ix] -= sum - if nonUnit { - x[ix] /= a[i*lda+i] - } - ix -= incX - } - return - } - if incX == 1 { - for i := 0; i < n; i++ { - var sum float64 - atmp := a[i*lda : i*lda+i] - for j, v := range atmp { - sum += x[j] * v - } - x[i] -= sum - if nonUnit { - x[i] /= a[i*lda+i] - } - } - return - } - ix := kx - for i := 0; i < n; i++ { - jx := kx - var sum float64 - atmp := a[i*lda : i*lda+i] - for _, v := range atmp { - sum += x[jx] * v - jx += incX - } - x[ix] -= sum - if nonUnit { - x[ix] /= a[i*lda+i] - } - ix += incX - } - return - } - // Cases where a is transposed. - if ul == blas.Upper { - if incX == 1 { - for i := 0; i < n; i++ { - if nonUnit { - x[i] /= a[i*lda+i] - } - xi := x[i] - atmp := a[i*lda+i+1 : i*lda+n] - for j, v := range atmp { - jv := j + i + 1 - x[jv] -= v * xi - } - } - return - } - ix := kx - for i := 0; i < n; i++ { - if nonUnit { - x[ix] /= a[i*lda+i] - } - xi := x[ix] - jx := kx + (i+1)*incX - atmp := a[i*lda+i+1 : i*lda+n] - for _, v := range atmp { - x[jx] -= v * xi - jx += incX - } - ix += incX - } - return - } - if incX == 1 { - for i := n - 1; i >= 0; i-- { - if nonUnit { - x[i] /= a[i*lda+i] - } - xi := x[i] - atmp := a[i*lda : i*lda+i] - for j, v := range atmp { - x[j] -= v * xi - } - } - return - } - ix := kx + (n-1)*incX - for i := n - 1; i >= 0; i-- { - if nonUnit { - x[ix] /= a[i*lda+i] - } - xi := x[ix] - jx := kx - atmp := a[i*lda : i*lda+i] - for _, v := range atmp { - x[jx] -= v * xi - jx += incX - } - ix -= incX - } -} - -// Dsymv performs the matrix-vector operation -// y = alpha * A * x + beta * y -// where A is an n×n symmetric matrix, x and y are vectors, and alpha and -// beta are scalars. -func (Implementation) Dsymv(ul blas.Uplo, n int, alpha float64, a []float64, lda int, x []float64, incX int, beta float64, y []float64, incY int) { - if ul != blas.Lower && ul != blas.Upper { - panic(badUplo) - } - if n < 0 { - panic(nLT0) - } - if lda < max(1, n) { - panic(badLdA) - } - if incX == 0 { - panic(zeroIncX) - } - if incY == 0 { - panic(zeroIncY) - } - - // Quick return if possible. - if n == 0 { - return - } - - // For zero matrix size the following slice length checks are trivially satisfied. - if len(a) < lda*(n-1)+n { - panic(shortA) - } - if (incX > 0 && len(x) <= (n-1)*incX) || (incX < 0 && len(x) <= (1-n)*incX) { - panic(shortX) - } - if (incY > 0 && len(y) <= (n-1)*incY) || (incY < 0 && len(y) <= (1-n)*incY) { - panic(shortY) - } - - // Quick return if possible. - if alpha == 0 && beta == 1 { - return - } - - // Set up start points - var kx, ky int - if incX < 0 { - kx = -(n - 1) * incX - } - if incY < 0 { - ky = -(n - 1) * incY - } - - // Form y = beta * y - if beta != 1 { - if incY == 1 { - if beta == 0 { - for i := range y[:n] { - y[i] = 0 - } - } else { - f64.ScalUnitary(beta, y[:n]) - } - } else { - iy := ky - if beta == 0 { - for i := 0; i < n; i++ { - y[iy] = 0 - iy += incY - } - } else { - if incY > 0 { - f64.ScalInc(beta, y, uintptr(n), uintptr(incY)) - } else { - f64.ScalInc(beta, y, uintptr(n), uintptr(-incY)) - } - } - } - } - - if alpha == 0 { - return - } - - if n == 1 { - y[0] += alpha * a[0] * x[0] - return - } - - if ul == blas.Upper { - if incX == 1 { - iy := ky - for i := 0; i < n; i++ { - xv := x[i] * alpha - sum := x[i] * a[i*lda+i] - jy := ky + (i+1)*incY - atmp := a[i*lda+i+1 : i*lda+n] - for j, v := range atmp { - jp := j + i + 1 - sum += x[jp] * v - y[jy] += xv * v - jy += incY - } - y[iy] += alpha * sum - iy += incY - } - return - } - ix := kx - iy := ky - for i := 0; i < n; i++ { - xv := x[ix] * alpha - sum := x[ix] * a[i*lda+i] - jx := kx + (i+1)*incX - jy := ky + (i+1)*incY - atmp := a[i*lda+i+1 : i*lda+n] - for _, v := range atmp { - sum += x[jx] * v - y[jy] += xv * v - jx += incX - jy += incY - } - y[iy] += alpha * sum - ix += incX - iy += incY - } - return - } - // Cases where a is lower triangular. - if incX == 1 { - iy := ky - for i := 0; i < n; i++ { - jy := ky - xv := alpha * x[i] - atmp := a[i*lda : i*lda+i] - var sum float64 - for j, v := range atmp { - sum += x[j] * v - y[jy] += xv * v - jy += incY - } - sum += x[i] * a[i*lda+i] - sum *= alpha - y[iy] += sum - iy += incY - } - return - } - ix := kx - iy := ky - for i := 0; i < n; i++ { - jx := kx - jy := ky - xv := alpha * x[ix] - atmp := a[i*lda : i*lda+i] - var sum float64 - for _, v := range atmp { - sum += x[jx] * v - y[jy] += xv * v - jx += incX - jy += incY - } - sum += x[ix] * a[i*lda+i] - sum *= alpha - y[iy] += sum - ix += incX - iy += incY - } -} - -// Dtbmv performs one of the matrix-vector operations -// x = A * x if tA == blas.NoTrans -// x = A^T * x if tA == blas.Trans or blas.ConjTrans -// where A is an n×n triangular band matrix with k+1 diagonals, and x is a vector. -func (Implementation) Dtbmv(ul blas.Uplo, tA blas.Transpose, d blas.Diag, n, k int, a []float64, lda int, x []float64, incX int) { - if ul != blas.Lower && ul != blas.Upper { - panic(badUplo) - } - if tA != blas.NoTrans && tA != blas.Trans && tA != blas.ConjTrans { - panic(badTranspose) - } - if d != blas.NonUnit && d != blas.Unit { - panic(badDiag) - } - if n < 0 { - panic(nLT0) - } - if k < 0 { - panic(kLT0) - } - if lda < k+1 { - panic(badLdA) - } - if incX == 0 { - panic(zeroIncX) - } - - // Quick return if possible. - if n == 0 { - return - } - - // For zero matrix size the following slice length checks are trivially satisfied. - if len(a) < lda*(n-1)+k+1 { - panic(shortA) - } - if (incX > 0 && len(x) <= (n-1)*incX) || (incX < 0 && len(x) <= (1-n)*incX) { - panic(shortX) - } - - var kx int - if incX < 0 { - kx = -(n - 1) * incX - } - - nonunit := d != blas.Unit - - if tA == blas.NoTrans { - if ul == blas.Upper { - if incX == 1 { - for i := 0; i < n; i++ { - u := min(1+k, n-i) - var sum float64 - atmp := a[i*lda:] - xtmp := x[i:] - for j := 1; j < u; j++ { - sum += xtmp[j] * atmp[j] - } - if nonunit { - sum += xtmp[0] * atmp[0] - } else { - sum += xtmp[0] - } - x[i] = sum - } - return - } - ix := kx - for i := 0; i < n; i++ { - u := min(1+k, n-i) - var sum float64 - atmp := a[i*lda:] - jx := incX - for j := 1; j < u; j++ { - sum += x[ix+jx] * atmp[j] - jx += incX - } - if nonunit { - sum += x[ix] * atmp[0] - } else { - sum += x[ix] - } - x[ix] = sum - ix += incX - } - return - } - if incX == 1 { - for i := n - 1; i >= 0; i-- { - l := max(0, k-i) - atmp := a[i*lda:] - var sum float64 - for j := l; j < k; j++ { - sum += x[i-k+j] * atmp[j] - } - if nonunit { - sum += x[i] * atmp[k] - } else { - sum += x[i] - } - x[i] = sum - } - return - } - ix := kx + (n-1)*incX - for i := n - 1; i >= 0; i-- { - l := max(0, k-i) - atmp := a[i*lda:] - var sum float64 - jx := l * incX - for j := l; j < k; j++ { - sum += x[ix-k*incX+jx] * atmp[j] - jx += incX - } - if nonunit { - sum += x[ix] * atmp[k] - } else { - sum += x[ix] - } - x[ix] = sum - ix -= incX - } - return - } - if ul == blas.Upper { - if incX == 1 { - for i := n - 1; i >= 0; i-- { - u := k + 1 - if i < u { - u = i + 1 - } - var sum float64 - for j := 1; j < u; j++ { - sum += x[i-j] * a[(i-j)*lda+j] - } - if nonunit { - sum += x[i] * a[i*lda] - } else { - sum += x[i] - } - x[i] = sum - } - return - } - ix := kx + (n-1)*incX - for i := n - 1; i >= 0; i-- { - u := k + 1 - if i < u { - u = i + 1 - } - var sum float64 - jx := incX - for j := 1; j < u; j++ { - sum += x[ix-jx] * a[(i-j)*lda+j] - jx += incX - } - if nonunit { - sum += x[ix] * a[i*lda] - } else { - sum += x[ix] - } - x[ix] = sum - ix -= incX - } - return - } - if incX == 1 { - for i := 0; i < n; i++ { - u := k - if i+k >= n { - u = n - i - 1 - } - var sum float64 - for j := 0; j < u; j++ { - sum += x[i+j+1] * a[(i+j+1)*lda+k-j-1] - } - if nonunit { - sum += x[i] * a[i*lda+k] - } else { - sum += x[i] - } - x[i] = sum - } - return - } - ix := kx - for i := 0; i < n; i++ { - u := k - if i+k >= n { - u = n - i - 1 - } - var ( - sum float64 - jx int - ) - for j := 0; j < u; j++ { - sum += x[ix+jx+incX] * a[(i+j+1)*lda+k-j-1] - jx += incX - } - if nonunit { - sum += x[ix] * a[i*lda+k] - } else { - sum += x[ix] - } - x[ix] = sum - ix += incX - } -} - -// Dtpmv performs one of the matrix-vector operations -// x = A * x if tA == blas.NoTrans -// x = A^T * x if tA == blas.Trans or blas.ConjTrans -// where A is an n×n triangular matrix in packed format, and x is a vector. -func (Implementation) Dtpmv(ul blas.Uplo, tA blas.Transpose, d blas.Diag, n int, ap []float64, x []float64, incX int) { - if ul != blas.Lower && ul != blas.Upper { - panic(badUplo) - } - if tA != blas.NoTrans && tA != blas.Trans && tA != blas.ConjTrans { - panic(badTranspose) - } - if d != blas.NonUnit && d != blas.Unit { - panic(badDiag) - } - if n < 0 { - panic(nLT0) - } - if incX == 0 { - panic(zeroIncX) - } - - // Quick return if possible. - if n == 0 { - return - } - - // For zero matrix size the following slice length checks are trivially satisfied. - if len(ap) < n*(n+1)/2 { - panic(shortAP) - } - if (incX > 0 && len(x) <= (n-1)*incX) || (incX < 0 && len(x) <= (1-n)*incX) { - panic(shortX) - } - - var kx int - if incX < 0 { - kx = -(n - 1) * incX - } - - nonUnit := d == blas.NonUnit - var offset int // Offset is the index of (i,i) - if tA == blas.NoTrans { - if ul == blas.Upper { - if incX == 1 { - for i := 0; i < n; i++ { - xi := x[i] - if nonUnit { - xi *= ap[offset] - } - atmp := ap[offset+1 : offset+n-i] - xtmp := x[i+1:] - for j, v := range atmp { - xi += v * xtmp[j] - } - x[i] = xi - offset += n - i - } - return - } - ix := kx - for i := 0; i < n; i++ { - xix := x[ix] - if nonUnit { - xix *= ap[offset] - } - atmp := ap[offset+1 : offset+n-i] - jx := kx + (i+1)*incX - for _, v := range atmp { - xix += v * x[jx] - jx += incX - } - x[ix] = xix - offset += n - i - ix += incX - } - return - } - if incX == 1 { - offset = n*(n+1)/2 - 1 - for i := n - 1; i >= 0; i-- { - xi := x[i] - if nonUnit { - xi *= ap[offset] - } - atmp := ap[offset-i : offset] - for j, v := range atmp { - xi += v * x[j] - } - x[i] = xi - offset -= i + 1 - } - return - } - ix := kx + (n-1)*incX - offset = n*(n+1)/2 - 1 - for i := n - 1; i >= 0; i-- { - xix := x[ix] - if nonUnit { - xix *= ap[offset] - } - atmp := ap[offset-i : offset] - jx := kx - for _, v := range atmp { - xix += v * x[jx] - jx += incX - } - x[ix] = xix - offset -= i + 1 - ix -= incX - } - return - } - // Cases where ap is transposed. - if ul == blas.Upper { - if incX == 1 { - offset = n*(n+1)/2 - 1 - for i := n - 1; i >= 0; i-- { - xi := x[i] - atmp := ap[offset+1 : offset+n-i] - xtmp := x[i+1:] - for j, v := range atmp { - xtmp[j] += v * xi - } - if nonUnit { - x[i] *= ap[offset] - } - offset -= n - i + 1 - } - return - } - ix := kx + (n-1)*incX - offset = n*(n+1)/2 - 1 - for i := n - 1; i >= 0; i-- { - xix := x[ix] - jx := kx + (i+1)*incX - atmp := ap[offset+1 : offset+n-i] - for _, v := range atmp { - x[jx] += v * xix - jx += incX - } - if nonUnit { - x[ix] *= ap[offset] - } - offset -= n - i + 1 - ix -= incX - } - return - } - if incX == 1 { - for i := 0; i < n; i++ { - xi := x[i] - atmp := ap[offset-i : offset] - for j, v := range atmp { - x[j] += v * xi - } - if nonUnit { - x[i] *= ap[offset] - } - offset += i + 2 - } - return - } - ix := kx - for i := 0; i < n; i++ { - xix := x[ix] - jx := kx - atmp := ap[offset-i : offset] - for _, v := range atmp { - x[jx] += v * xix - jx += incX - } - if nonUnit { - x[ix] *= ap[offset] - } - ix += incX - offset += i + 2 - } -} - -// Dtbsv solves one of the systems of equations -// A * x = b if tA == blas.NoTrans -// A^T * x = b if tA == blas.Trans or tA == blas.ConjTrans -// where A is an n×n triangular band matrix with k+1 diagonals, -// and x and b are vectors. -// -// At entry to the function, x contains the values of b, and the result is -// stored in-place into x. -// -// No test for singularity or near-singularity is included in this -// routine. Such tests must be performed before calling this routine. -func (Implementation) Dtbsv(ul blas.Uplo, tA blas.Transpose, d blas.Diag, n, k int, a []float64, lda int, x []float64, incX int) { - if ul != blas.Lower && ul != blas.Upper { - panic(badUplo) - } - if tA != blas.NoTrans && tA != blas.Trans && tA != blas.ConjTrans { - panic(badTranspose) - } - if d != blas.NonUnit && d != blas.Unit { - panic(badDiag) - } - if n < 0 { - panic(nLT0) - } - if k < 0 { - panic(kLT0) - } - if lda < k+1 { - panic(badLdA) - } - if incX == 0 { - panic(zeroIncX) - } - - // Quick return if possible. - if n == 0 { - return - } - - // For zero matrix size the following slice length checks are trivially satisfied. - if len(a) < lda*(n-1)+k+1 { - panic(shortA) - } - if (incX > 0 && len(x) <= (n-1)*incX) || (incX < 0 && len(x) <= (1-n)*incX) { - panic(shortX) - } - - var kx int - if incX < 0 { - kx = -(n - 1) * incX - } - nonUnit := d == blas.NonUnit - // Form x = A^-1 x. - // Several cases below use subslices for speed improvement. - // The incX != 1 cases usually do not because incX may be negative. - if tA == blas.NoTrans { - if ul == blas.Upper { - if incX == 1 { - for i := n - 1; i >= 0; i-- { - bands := k - if i+bands >= n { - bands = n - i - 1 - } - atmp := a[i*lda+1:] - xtmp := x[i+1 : i+bands+1] - var sum float64 - for j, v := range xtmp { - sum += v * atmp[j] - } - x[i] -= sum - if nonUnit { - x[i] /= a[i*lda] - } - } - return - } - ix := kx + (n-1)*incX - for i := n - 1; i >= 0; i-- { - max := k + 1 - if i+max > n { - max = n - i - } - atmp := a[i*lda:] - var ( - jx int - sum float64 - ) - for j := 1; j < max; j++ { - jx += incX - sum += x[ix+jx] * atmp[j] - } - x[ix] -= sum - if nonUnit { - x[ix] /= atmp[0] - } - ix -= incX - } - return - } - if incX == 1 { - for i := 0; i < n; i++ { - bands := k - if i-k < 0 { - bands = i - } - atmp := a[i*lda+k-bands:] - xtmp := x[i-bands : i] - var sum float64 - for j, v := range xtmp { - sum += v * atmp[j] - } - x[i] -= sum - if nonUnit { - x[i] /= atmp[bands] - } - } - return - } - ix := kx - for i := 0; i < n; i++ { - bands := k - if i-k < 0 { - bands = i - } - atmp := a[i*lda+k-bands:] - var ( - sum float64 - jx int - ) - for j := 0; j < bands; j++ { - sum += x[ix-bands*incX+jx] * atmp[j] - jx += incX - } - x[ix] -= sum - if nonUnit { - x[ix] /= atmp[bands] - } - ix += incX - } - return - } - // Cases where a is transposed. - if ul == blas.Upper { - if incX == 1 { - for i := 0; i < n; i++ { - bands := k - if i-k < 0 { - bands = i - } - var sum float64 - for j := 0; j < bands; j++ { - sum += x[i-bands+j] * a[(i-bands+j)*lda+bands-j] - } - x[i] -= sum - if nonUnit { - x[i] /= a[i*lda] - } - } - return - } - ix := kx - for i := 0; i < n; i++ { - bands := k - if i-k < 0 { - bands = i - } - var ( - sum float64 - jx int - ) - for j := 0; j < bands; j++ { - sum += x[ix-bands*incX+jx] * a[(i-bands+j)*lda+bands-j] - jx += incX - } - x[ix] -= sum - if nonUnit { - x[ix] /= a[i*lda] - } - ix += incX - } - return - } - if incX == 1 { - for i := n - 1; i >= 0; i-- { - bands := k - if i+bands >= n { - bands = n - i - 1 - } - var sum float64 - xtmp := x[i+1 : i+1+bands] - for j, v := range xtmp { - sum += v * a[(i+j+1)*lda+k-j-1] - } - x[i] -= sum - if nonUnit { - x[i] /= a[i*lda+k] - } - } - return - } - ix := kx + (n-1)*incX - for i := n - 1; i >= 0; i-- { - bands := k - if i+bands >= n { - bands = n - i - 1 - } - var ( - sum float64 - jx int - ) - for j := 0; j < bands; j++ { - sum += x[ix+jx+incX] * a[(i+j+1)*lda+k-j-1] - jx += incX - } - x[ix] -= sum - if nonUnit { - x[ix] /= a[i*lda+k] - } - ix -= incX - } -} - -// Dsbmv performs the matrix-vector operation -// y = alpha * A * x + beta * y -// where A is an n×n symmetric band matrix with k super-diagonals, x and y are -// vectors, and alpha and beta are scalars. -func (Implementation) Dsbmv(ul blas.Uplo, n, k int, alpha float64, a []float64, lda int, x []float64, incX int, beta float64, y []float64, incY int) { - if ul != blas.Lower && ul != blas.Upper { - panic(badUplo) - } - if n < 0 { - panic(nLT0) - } - if k < 0 { - panic(kLT0) - } - if lda < k+1 { - panic(badLdA) - } - if incX == 0 { - panic(zeroIncX) - } - if incY == 0 { - panic(zeroIncY) - } - - // Quick return if possible. - if n == 0 { - return - } - - // For zero matrix size the following slice length checks are trivially satisfied. - if len(a) < lda*(n-1)+k+1 { - panic(shortA) - } - if (incX > 0 && len(x) <= (n-1)*incX) || (incX < 0 && len(x) <= (1-n)*incX) { - panic(shortX) - } - if (incY > 0 && len(y) <= (n-1)*incY) || (incY < 0 && len(y) <= (1-n)*incY) { - panic(shortY) - } - - // Quick return if possible. - if alpha == 0 && beta == 1 { - return - } - - // Set up indexes - lenX := n - lenY := n - var kx, ky int - if incX < 0 { - kx = -(lenX - 1) * incX - } - if incY < 0 { - ky = -(lenY - 1) * incY - } - - // Form y = beta * y. - if beta != 1 { - if incY == 1 { - if beta == 0 { - for i := range y[:n] { - y[i] = 0 - } - } else { - f64.ScalUnitary(beta, y[:n]) - } - } else { - iy := ky - if beta == 0 { - for i := 0; i < n; i++ { - y[iy] = 0 - iy += incY - } - } else { - if incY > 0 { - f64.ScalInc(beta, y, uintptr(n), uintptr(incY)) - } else { - f64.ScalInc(beta, y, uintptr(n), uintptr(-incY)) - } - } - } - } - - if alpha == 0 { - return - } - - if ul == blas.Upper { - if incX == 1 { - iy := ky - for i := 0; i < n; i++ { - atmp := a[i*lda:] - tmp := alpha * x[i] - sum := tmp * atmp[0] - u := min(k, n-i-1) - jy := incY - for j := 1; j <= u; j++ { - v := atmp[j] - sum += alpha * x[i+j] * v - y[iy+jy] += tmp * v - jy += incY - } - y[iy] += sum - iy += incY - } - return - } - ix := kx - iy := ky - for i := 0; i < n; i++ { - atmp := a[i*lda:] - tmp := alpha * x[ix] - sum := tmp * atmp[0] - u := min(k, n-i-1) - jx := incX - jy := incY - for j := 1; j <= u; j++ { - v := atmp[j] - sum += alpha * x[ix+jx] * v - y[iy+jy] += tmp * v - jx += incX - jy += incY - } - y[iy] += sum - ix += incX - iy += incY - } - return - } - - // Casses where a has bands below the diagonal. - if incX == 1 { - iy := ky - for i := 0; i < n; i++ { - l := max(0, k-i) - tmp := alpha * x[i] - jy := l * incY - atmp := a[i*lda:] - for j := l; j < k; j++ { - v := atmp[j] - y[iy] += alpha * v * x[i-k+j] - y[iy-k*incY+jy] += tmp * v - jy += incY - } - y[iy] += tmp * atmp[k] - iy += incY - } - return - } - ix := kx - iy := ky - for i := 0; i < n; i++ { - l := max(0, k-i) - tmp := alpha * x[ix] - jx := l * incX - jy := l * incY - atmp := a[i*lda:] - for j := l; j < k; j++ { - v := atmp[j] - y[iy] += alpha * v * x[ix-k*incX+jx] - y[iy-k*incY+jy] += tmp * v - jx += incX - jy += incY - } - y[iy] += tmp * atmp[k] - ix += incX - iy += incY - } -} - -// Dsyr performs the symmetric rank-one update -// A += alpha * x * x^T -// where A is an n×n symmetric matrix, and x is a vector. -func (Implementation) Dsyr(ul blas.Uplo, n int, alpha float64, x []float64, incX int, a []float64, lda int) { - if ul != blas.Lower && ul != blas.Upper { - panic(badUplo) - } - if n < 0 { - panic(nLT0) - } - if lda < max(1, n) { - panic(badLdA) - } - if incX == 0 { - panic(zeroIncX) - } - - // Quick return if possible. - if n == 0 { - return - } - - // For zero matrix size the following slice length checks are trivially satisfied. - if (incX > 0 && len(x) <= (n-1)*incX) || (incX < 0 && len(x) <= (1-n)*incX) { - panic(shortX) - } - if len(a) < lda*(n-1)+n { - panic(shortA) - } - - // Quick return if possible. - if alpha == 0 { - return - } - - lenX := n - var kx int - if incX < 0 { - kx = -(lenX - 1) * incX - } - if ul == blas.Upper { - if incX == 1 { - for i := 0; i < n; i++ { - tmp := x[i] * alpha - if tmp != 0 { - atmp := a[i*lda+i : i*lda+n] - xtmp := x[i:n] - for j, v := range xtmp { - atmp[j] += v * tmp - } - } - } - return - } - ix := kx - for i := 0; i < n; i++ { - tmp := x[ix] * alpha - if tmp != 0 { - jx := ix - atmp := a[i*lda:] - for j := i; j < n; j++ { - atmp[j] += x[jx] * tmp - jx += incX - } - } - ix += incX - } - return - } - // Cases where a is lower triangular. - if incX == 1 { - for i := 0; i < n; i++ { - tmp := x[i] * alpha - if tmp != 0 { - atmp := a[i*lda:] - xtmp := x[:i+1] - for j, v := range xtmp { - atmp[j] += tmp * v - } - } - } - return - } - ix := kx - for i := 0; i < n; i++ { - tmp := x[ix] * alpha - if tmp != 0 { - atmp := a[i*lda:] - jx := kx - for j := 0; j < i+1; j++ { - atmp[j] += tmp * x[jx] - jx += incX - } - } - ix += incX - } -} - -// Dsyr2 performs the symmetric rank-two update -// A += alpha * x * y^T + alpha * y * x^T -// where A is an n×n symmetric matrix, x and y are vectors, and alpha is a scalar. -func (Implementation) Dsyr2(ul blas.Uplo, n int, alpha float64, x []float64, incX int, y []float64, incY int, a []float64, lda int) { - if ul != blas.Lower && ul != blas.Upper { - panic(badUplo) - } - if n < 0 { - panic(nLT0) - } - if lda < max(1, n) { - panic(badLdA) - } - if incX == 0 { - panic(zeroIncX) - } - if incY == 0 { - panic(zeroIncY) - } - - // Quick return if possible. - if n == 0 { - return - } - - // For zero matrix size the following slice length checks are trivially satisfied. - if (incX > 0 && len(x) <= (n-1)*incX) || (incX < 0 && len(x) <= (1-n)*incX) { - panic(shortX) - } - if (incY > 0 && len(y) <= (n-1)*incY) || (incY < 0 && len(y) <= (1-n)*incY) { - panic(shortY) - } - if len(a) < lda*(n-1)+n { - panic(shortA) - } - - // Quick return if possible. - if alpha == 0 { - return - } - - var ky, kx int - if incY < 0 { - ky = -(n - 1) * incY - } - if incX < 0 { - kx = -(n - 1) * incX - } - if ul == blas.Upper { - if incX == 1 && incY == 1 { - for i := 0; i < n; i++ { - xi := x[i] - yi := y[i] - atmp := a[i*lda:] - for j := i; j < n; j++ { - atmp[j] += alpha * (xi*y[j] + x[j]*yi) - } - } - return - } - ix := kx - iy := ky - for i := 0; i < n; i++ { - jx := kx + i*incX - jy := ky + i*incY - xi := x[ix] - yi := y[iy] - atmp := a[i*lda:] - for j := i; j < n; j++ { - atmp[j] += alpha * (xi*y[jy] + x[jx]*yi) - jx += incX - jy += incY - } - ix += incX - iy += incY - } - return - } - if incX == 1 && incY == 1 { - for i := 0; i < n; i++ { - xi := x[i] - yi := y[i] - atmp := a[i*lda:] - for j := 0; j <= i; j++ { - atmp[j] += alpha * (xi*y[j] + x[j]*yi) - } - } - return - } - ix := kx - iy := ky - for i := 0; i < n; i++ { - jx := kx - jy := ky - xi := x[ix] - yi := y[iy] - atmp := a[i*lda:] - for j := 0; j <= i; j++ { - atmp[j] += alpha * (xi*y[jy] + x[jx]*yi) - jx += incX - jy += incY - } - ix += incX - iy += incY - } -} - -// Dtpsv solves one of the systems of equations -// A * x = b if tA == blas.NoTrans -// A^T * x = b if tA == blas.Trans or blas.ConjTrans -// where A is an n×n triangular matrix in packed format, and x and b are vectors. -// -// At entry to the function, x contains the values of b, and the result is -// stored in-place into x. -// -// No test for singularity or near-singularity is included in this -// routine. Such tests must be performed before calling this routine. -func (Implementation) Dtpsv(ul blas.Uplo, tA blas.Transpose, d blas.Diag, n int, ap []float64, x []float64, incX int) { - if ul != blas.Lower && ul != blas.Upper { - panic(badUplo) - } - if tA != blas.NoTrans && tA != blas.Trans && tA != blas.ConjTrans { - panic(badTranspose) - } - if d != blas.NonUnit && d != blas.Unit { - panic(badDiag) - } - if n < 0 { - panic(nLT0) - } - if incX == 0 { - panic(zeroIncX) - } - - // Quick return if possible. - if n == 0 { - return - } - - // For zero matrix size the following slice length checks are trivially satisfied. - if len(ap) < n*(n+1)/2 { - panic(shortAP) - } - if (incX > 0 && len(x) <= (n-1)*incX) || (incX < 0 && len(x) <= (1-n)*incX) { - panic(shortX) - } - - var kx int - if incX < 0 { - kx = -(n - 1) * incX - } - - nonUnit := d == blas.NonUnit - var offset int // Offset is the index of (i,i) - if tA == blas.NoTrans { - if ul == blas.Upper { - offset = n*(n+1)/2 - 1 - if incX == 1 { - for i := n - 1; i >= 0; i-- { - atmp := ap[offset+1 : offset+n-i] - xtmp := x[i+1:] - var sum float64 - for j, v := range atmp { - sum += v * xtmp[j] - } - x[i] -= sum - if nonUnit { - x[i] /= ap[offset] - } - offset -= n - i + 1 - } - return - } - ix := kx + (n-1)*incX - for i := n - 1; i >= 0; i-- { - atmp := ap[offset+1 : offset+n-i] - jx := kx + (i+1)*incX - var sum float64 - for _, v := range atmp { - sum += v * x[jx] - jx += incX - } - x[ix] -= sum - if nonUnit { - x[ix] /= ap[offset] - } - ix -= incX - offset -= n - i + 1 - } - return - } - if incX == 1 { - for i := 0; i < n; i++ { - atmp := ap[offset-i : offset] - var sum float64 - for j, v := range atmp { - sum += v * x[j] - } - x[i] -= sum - if nonUnit { - x[i] /= ap[offset] - } - offset += i + 2 - } - return - } - ix := kx - for i := 0; i < n; i++ { - jx := kx - atmp := ap[offset-i : offset] - var sum float64 - for _, v := range atmp { - sum += v * x[jx] - jx += incX - } - x[ix] -= sum - if nonUnit { - x[ix] /= ap[offset] - } - ix += incX - offset += i + 2 - } - return - } - // Cases where ap is transposed. - if ul == blas.Upper { - if incX == 1 { - for i := 0; i < n; i++ { - if nonUnit { - x[i] /= ap[offset] - } - xi := x[i] - atmp := ap[offset+1 : offset+n-i] - xtmp := x[i+1:] - for j, v := range atmp { - xtmp[j] -= v * xi - } - offset += n - i - } - return - } - ix := kx - for i := 0; i < n; i++ { - if nonUnit { - x[ix] /= ap[offset] - } - xix := x[ix] - atmp := ap[offset+1 : offset+n-i] - jx := kx + (i+1)*incX - for _, v := range atmp { - x[jx] -= v * xix - jx += incX - } - ix += incX - offset += n - i - } - return - } - if incX == 1 { - offset = n*(n+1)/2 - 1 - for i := n - 1; i >= 0; i-- { - if nonUnit { - x[i] /= ap[offset] - } - xi := x[i] - atmp := ap[offset-i : offset] - for j, v := range atmp { - x[j] -= v * xi - } - offset -= i + 1 - } - return - } - ix := kx + (n-1)*incX - offset = n*(n+1)/2 - 1 - for i := n - 1; i >= 0; i-- { - if nonUnit { - x[ix] /= ap[offset] - } - xix := x[ix] - atmp := ap[offset-i : offset] - jx := kx - for _, v := range atmp { - x[jx] -= v * xix - jx += incX - } - ix -= incX - offset -= i + 1 - } -} - -// Dspmv performs the matrix-vector operation -// y = alpha * A * x + beta * y -// where A is an n×n symmetric matrix in packed format, x and y are vectors, -// and alpha and beta are scalars. -func (Implementation) Dspmv(ul blas.Uplo, n int, alpha float64, ap []float64, x []float64, incX int, beta float64, y []float64, incY int) { - if ul != blas.Lower && ul != blas.Upper { - panic(badUplo) - } - if n < 0 { - panic(nLT0) - } - if incX == 0 { - panic(zeroIncX) - } - if incY == 0 { - panic(zeroIncY) - } - - // Quick return if possible. - if n == 0 { - return - } - - // For zero matrix size the following slice length checks are trivially satisfied. - if len(ap) < n*(n+1)/2 { - panic(shortAP) - } - if (incX > 0 && len(x) <= (n-1)*incX) || (incX < 0 && len(x) <= (1-n)*incX) { - panic(shortX) - } - if (incY > 0 && len(y) <= (n-1)*incY) || (incY < 0 && len(y) <= (1-n)*incY) { - panic(shortY) - } - - // Quick return if possible. - if alpha == 0 && beta == 1 { - return - } - - // Set up start points - var kx, ky int - if incX < 0 { - kx = -(n - 1) * incX - } - if incY < 0 { - ky = -(n - 1) * incY - } - - // Form y = beta * y. - if beta != 1 { - if incY == 1 { - if beta == 0 { - for i := range y[:n] { - y[i] = 0 - } - } else { - f64.ScalUnitary(beta, y[:n]) - } - } else { - iy := ky - if beta == 0 { - for i := 0; i < n; i++ { - y[iy] = 0 - iy += incY - } - } else { - if incY > 0 { - f64.ScalInc(beta, y, uintptr(n), uintptr(incY)) - } else { - f64.ScalInc(beta, y, uintptr(n), uintptr(-incY)) - } - } - } - } - - if alpha == 0 { - return - } - - if n == 1 { - y[0] += alpha * ap[0] * x[0] - return - } - var offset int // Offset is the index of (i,i). - if ul == blas.Upper { - if incX == 1 { - iy := ky - for i := 0; i < n; i++ { - xv := x[i] * alpha - sum := ap[offset] * x[i] - atmp := ap[offset+1 : offset+n-i] - xtmp := x[i+1:] - jy := ky + (i+1)*incY - for j, v := range atmp { - sum += v * xtmp[j] - y[jy] += v * xv - jy += incY - } - y[iy] += alpha * sum - iy += incY - offset += n - i - } - return - } - ix := kx - iy := ky - for i := 0; i < n; i++ { - xv := x[ix] * alpha - sum := ap[offset] * x[ix] - atmp := ap[offset+1 : offset+n-i] - jx := kx + (i+1)*incX - jy := ky + (i+1)*incY - for _, v := range atmp { - sum += v * x[jx] - y[jy] += v * xv - jx += incX - jy += incY - } - y[iy] += alpha * sum - ix += incX - iy += incY - offset += n - i - } - return - } - if incX == 1 { - iy := ky - for i := 0; i < n; i++ { - xv := x[i] * alpha - atmp := ap[offset-i : offset] - jy := ky - var sum float64 - for j, v := range atmp { - sum += v * x[j] - y[jy] += v * xv - jy += incY - } - sum += ap[offset] * x[i] - y[iy] += alpha * sum - iy += incY - offset += i + 2 - } - return - } - ix := kx - iy := ky - for i := 0; i < n; i++ { - xv := x[ix] * alpha - atmp := ap[offset-i : offset] - jx := kx - jy := ky - var sum float64 - for _, v := range atmp { - sum += v * x[jx] - y[jy] += v * xv - jx += incX - jy += incY - } - - sum += ap[offset] * x[ix] - y[iy] += alpha * sum - ix += incX - iy += incY - offset += i + 2 - } -} - -// Dspr performs the symmetric rank-one operation -// A += alpha * x * x^T -// where A is an n×n symmetric matrix in packed format, x is a vector, and -// alpha is a scalar. -func (Implementation) Dspr(ul blas.Uplo, n int, alpha float64, x []float64, incX int, ap []float64) { - if ul != blas.Lower && ul != blas.Upper { - panic(badUplo) - } - if n < 0 { - panic(nLT0) - } - if incX == 0 { - panic(zeroIncX) - } - - // Quick return if possible. - if n == 0 { - return - } - - // For zero matrix size the following slice length checks are trivially satisfied. - if (incX > 0 && len(x) <= (n-1)*incX) || (incX < 0 && len(x) <= (1-n)*incX) { - panic(shortX) - } - if len(ap) < n*(n+1)/2 { - panic(shortAP) - } - - // Quick return if possible. - if alpha == 0 { - return - } - - lenX := n - var kx int - if incX < 0 { - kx = -(lenX - 1) * incX - } - var offset int // Offset is the index of (i,i). - if ul == blas.Upper { - if incX == 1 { - for i := 0; i < n; i++ { - atmp := ap[offset:] - xv := alpha * x[i] - xtmp := x[i:n] - for j, v := range xtmp { - atmp[j] += xv * v - } - offset += n - i - } - return - } - ix := kx - for i := 0; i < n; i++ { - jx := kx + i*incX - atmp := ap[offset:] - xv := alpha * x[ix] - for j := 0; j < n-i; j++ { - atmp[j] += xv * x[jx] - jx += incX - } - ix += incX - offset += n - i - } - return - } - if incX == 1 { - for i := 0; i < n; i++ { - atmp := ap[offset-i:] - xv := alpha * x[i] - xtmp := x[:i+1] - for j, v := range xtmp { - atmp[j] += xv * v - } - offset += i + 2 - } - return - } - ix := kx - for i := 0; i < n; i++ { - jx := kx - atmp := ap[offset-i:] - xv := alpha * x[ix] - for j := 0; j <= i; j++ { - atmp[j] += xv * x[jx] - jx += incX - } - ix += incX - offset += i + 2 - } -} - -// Dspr2 performs the symmetric rank-2 update -// A += alpha * x * y^T + alpha * y * x^T -// where A is an n×n symmetric matrix in packed format, x and y are vectors, -// and alpha is a scalar. -func (Implementation) Dspr2(ul blas.Uplo, n int, alpha float64, x []float64, incX int, y []float64, incY int, ap []float64) { - if ul != blas.Lower && ul != blas.Upper { - panic(badUplo) - } - if n < 0 { - panic(nLT0) - } - if incX == 0 { - panic(zeroIncX) - } - if incY == 0 { - panic(zeroIncY) - } - - // Quick return if possible. - if n == 0 { - return - } - - // For zero matrix size the following slice length checks are trivially satisfied. - if (incX > 0 && len(x) <= (n-1)*incX) || (incX < 0 && len(x) <= (1-n)*incX) { - panic(shortX) - } - if (incY > 0 && len(y) <= (n-1)*incY) || (incY < 0 && len(y) <= (1-n)*incY) { - panic(shortY) - } - if len(ap) < n*(n+1)/2 { - panic(shortAP) - } - - // Quick return if possible. - if alpha == 0 { - return - } - - var ky, kx int - if incY < 0 { - ky = -(n - 1) * incY - } - if incX < 0 { - kx = -(n - 1) * incX - } - var offset int // Offset is the index of (i,i). - if ul == blas.Upper { - if incX == 1 && incY == 1 { - for i := 0; i < n; i++ { - atmp := ap[offset:] - xi := x[i] - yi := y[i] - xtmp := x[i:n] - ytmp := y[i:n] - for j, v := range xtmp { - atmp[j] += alpha * (xi*ytmp[j] + v*yi) - } - offset += n - i - } - return - } - ix := kx - iy := ky - for i := 0; i < n; i++ { - jx := kx + i*incX - jy := ky + i*incY - atmp := ap[offset:] - xi := x[ix] - yi := y[iy] - for j := 0; j < n-i; j++ { - atmp[j] += alpha * (xi*y[jy] + x[jx]*yi) - jx += incX - jy += incY - } - ix += incX - iy += incY - offset += n - i - } - return - } - if incX == 1 && incY == 1 { - for i := 0; i < n; i++ { - atmp := ap[offset-i:] - xi := x[i] - yi := y[i] - xtmp := x[:i+1] - for j, v := range xtmp { - atmp[j] += alpha * (xi*y[j] + v*yi) - } - offset += i + 2 - } - return - } - ix := kx - iy := ky - for i := 0; i < n; i++ { - jx := kx - jy := ky - atmp := ap[offset-i:] - for j := 0; j <= i; j++ { - atmp[j] += alpha * (x[ix]*y[jy] + x[jx]*y[iy]) - jx += incX - jy += incY - } - ix += incX - iy += incY - offset += i + 2 - } -} diff --git a/vendor/gonum.org/v1/gonum/blas/gonum/level3cmplx128.go b/vendor/gonum.org/v1/gonum/blas/gonum/level3cmplx128.go deleted file mode 100644 index e4a2bb5e9b..0000000000 --- a/vendor/gonum.org/v1/gonum/blas/gonum/level3cmplx128.go +++ /dev/null @@ -1,1715 +0,0 @@ -// Copyright ©2019 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import ( - "math/cmplx" - - "gonum.org/v1/gonum/blas" - "gonum.org/v1/gonum/internal/asm/c128" -) - -var _ blas.Complex128Level3 = Implementation{} - -// Zgemm performs one of the matrix-matrix operations -// C = alpha * op(A) * op(B) + beta * C -// where op(X) is one of -// op(X) = X or op(X) = X^T or op(X) = X^H, -// alpha and beta are scalars, and A, B and C are matrices, with op(A) an m×k matrix, -// op(B) a k×n matrix and C an m×n matrix. -func (Implementation) Zgemm(tA, tB blas.Transpose, m, n, k int, alpha complex128, a []complex128, lda int, b []complex128, ldb int, beta complex128, c []complex128, ldc int) { - switch tA { - default: - panic(badTranspose) - case blas.NoTrans, blas.Trans, blas.ConjTrans: - } - switch tB { - default: - panic(badTranspose) - case blas.NoTrans, blas.Trans, blas.ConjTrans: - } - switch { - case m < 0: - panic(mLT0) - case n < 0: - panic(nLT0) - case k < 0: - panic(kLT0) - } - rowA, colA := m, k - if tA != blas.NoTrans { - rowA, colA = k, m - } - if lda < max(1, colA) { - panic(badLdA) - } - rowB, colB := k, n - if tB != blas.NoTrans { - rowB, colB = n, k - } - if ldb < max(1, colB) { - panic(badLdB) - } - if ldc < max(1, n) { - panic(badLdC) - } - - // Quick return if possible. - if m == 0 || n == 0 { - return - } - - // For zero matrix size the following slice length checks are trivially satisfied. - if len(a) < (rowA-1)*lda+colA { - panic(shortA) - } - if len(b) < (rowB-1)*ldb+colB { - panic(shortB) - } - if len(c) < (m-1)*ldc+n { - panic(shortC) - } - - // Quick return if possible. - if (alpha == 0 || k == 0) && beta == 1 { - return - } - - if alpha == 0 { - if beta == 0 { - for i := 0; i < m; i++ { - for j := 0; j < n; j++ { - c[i*ldc+j] = 0 - } - } - } else { - for i := 0; i < m; i++ { - for j := 0; j < n; j++ { - c[i*ldc+j] *= beta - } - } - } - return - } - - switch tA { - case blas.NoTrans: - switch tB { - case blas.NoTrans: - // Form C = alpha * A * B + beta * C. - for i := 0; i < m; i++ { - switch { - case beta == 0: - for j := 0; j < n; j++ { - c[i*ldc+j] = 0 - } - case beta != 1: - for j := 0; j < n; j++ { - c[i*ldc+j] *= beta - } - } - for l := 0; l < k; l++ { - tmp := alpha * a[i*lda+l] - for j := 0; j < n; j++ { - c[i*ldc+j] += tmp * b[l*ldb+j] - } - } - } - case blas.Trans: - // Form C = alpha * A * B^T + beta * C. - for i := 0; i < m; i++ { - switch { - case beta == 0: - for j := 0; j < n; j++ { - c[i*ldc+j] = 0 - } - case beta != 1: - for j := 0; j < n; j++ { - c[i*ldc+j] *= beta - } - } - for l := 0; l < k; l++ { - tmp := alpha * a[i*lda+l] - for j := 0; j < n; j++ { - c[i*ldc+j] += tmp * b[j*ldb+l] - } - } - } - case blas.ConjTrans: - // Form C = alpha * A * B^H + beta * C. - for i := 0; i < m; i++ { - switch { - case beta == 0: - for j := 0; j < n; j++ { - c[i*ldc+j] = 0 - } - case beta != 1: - for j := 0; j < n; j++ { - c[i*ldc+j] *= beta - } - } - for l := 0; l < k; l++ { - tmp := alpha * a[i*lda+l] - for j := 0; j < n; j++ { - c[i*ldc+j] += tmp * cmplx.Conj(b[j*ldb+l]) - } - } - } - } - case blas.Trans: - switch tB { - case blas.NoTrans: - // Form C = alpha * A^T * B + beta * C. - for i := 0; i < m; i++ { - for j := 0; j < n; j++ { - var tmp complex128 - for l := 0; l < k; l++ { - tmp += a[l*lda+i] * b[l*ldb+j] - } - if beta == 0 { - c[i*ldc+j] = alpha * tmp - } else { - c[i*ldc+j] = alpha*tmp + beta*c[i*ldc+j] - } - } - } - case blas.Trans: - // Form C = alpha * A^T * B^T + beta * C. - for i := 0; i < m; i++ { - for j := 0; j < n; j++ { - var tmp complex128 - for l := 0; l < k; l++ { - tmp += a[l*lda+i] * b[j*ldb+l] - } - if beta == 0 { - c[i*ldc+j] = alpha * tmp - } else { - c[i*ldc+j] = alpha*tmp + beta*c[i*ldc+j] - } - } - } - case blas.ConjTrans: - // Form C = alpha * A^T * B^H + beta * C. - for i := 0; i < m; i++ { - for j := 0; j < n; j++ { - var tmp complex128 - for l := 0; l < k; l++ { - tmp += a[l*lda+i] * cmplx.Conj(b[j*ldb+l]) - } - if beta == 0 { - c[i*ldc+j] = alpha * tmp - } else { - c[i*ldc+j] = alpha*tmp + beta*c[i*ldc+j] - } - } - } - } - case blas.ConjTrans: - switch tB { - case blas.NoTrans: - // Form C = alpha * A^H * B + beta * C. - for i := 0; i < m; i++ { - for j := 0; j < n; j++ { - var tmp complex128 - for l := 0; l < k; l++ { - tmp += cmplx.Conj(a[l*lda+i]) * b[l*ldb+j] - } - if beta == 0 { - c[i*ldc+j] = alpha * tmp - } else { - c[i*ldc+j] = alpha*tmp + beta*c[i*ldc+j] - } - } - } - case blas.Trans: - // Form C = alpha * A^H * B^T + beta * C. - for i := 0; i < m; i++ { - for j := 0; j < n; j++ { - var tmp complex128 - for l := 0; l < k; l++ { - tmp += cmplx.Conj(a[l*lda+i]) * b[j*ldb+l] - } - if beta == 0 { - c[i*ldc+j] = alpha * tmp - } else { - c[i*ldc+j] = alpha*tmp + beta*c[i*ldc+j] - } - } - } - case blas.ConjTrans: - // Form C = alpha * A^H * B^H + beta * C. - for i := 0; i < m; i++ { - for j := 0; j < n; j++ { - var tmp complex128 - for l := 0; l < k; l++ { - tmp += cmplx.Conj(a[l*lda+i]) * cmplx.Conj(b[j*ldb+l]) - } - if beta == 0 { - c[i*ldc+j] = alpha * tmp - } else { - c[i*ldc+j] = alpha*tmp + beta*c[i*ldc+j] - } - } - } - } - } -} - -// Zhemm performs one of the matrix-matrix operations -// C = alpha*A*B + beta*C if side == blas.Left -// C = alpha*B*A + beta*C if side == blas.Right -// where alpha and beta are scalars, A is an m×m or n×n hermitian matrix and B -// and C are m×n matrices. The imaginary parts of the diagonal elements of A are -// assumed to be zero. -func (Implementation) Zhemm(side blas.Side, uplo blas.Uplo, m, n int, alpha complex128, a []complex128, lda int, b []complex128, ldb int, beta complex128, c []complex128, ldc int) { - na := m - if side == blas.Right { - na = n - } - switch { - case side != blas.Left && side != blas.Right: - panic(badSide) - case uplo != blas.Lower && uplo != blas.Upper: - panic(badUplo) - case m < 0: - panic(mLT0) - case n < 0: - panic(nLT0) - case lda < max(1, na): - panic(badLdA) - case ldb < max(1, n): - panic(badLdB) - case ldc < max(1, n): - panic(badLdC) - } - - // Quick return if possible. - if m == 0 || n == 0 { - return - } - - // For zero matrix size the following slice length checks are trivially satisfied. - if len(a) < lda*(na-1)+na { - panic(shortA) - } - if len(b) < ldb*(m-1)+n { - panic(shortB) - } - if len(c) < ldc*(m-1)+n { - panic(shortC) - } - - // Quick return if possible. - if alpha == 0 && beta == 1 { - return - } - - if alpha == 0 { - if beta == 0 { - for i := 0; i < m; i++ { - ci := c[i*ldc : i*ldc+n] - for j := range ci { - ci[j] = 0 - } - } - } else { - for i := 0; i < m; i++ { - ci := c[i*ldc : i*ldc+n] - c128.ScalUnitary(beta, ci) - } - } - return - } - - if side == blas.Left { - // Form C = alpha*A*B + beta*C. - for i := 0; i < m; i++ { - atmp := alpha * complex(real(a[i*lda+i]), 0) - bi := b[i*ldb : i*ldb+n] - ci := c[i*ldc : i*ldc+n] - if beta == 0 { - for j, bij := range bi { - ci[j] = atmp * bij - } - } else { - for j, bij := range bi { - ci[j] = atmp*bij + beta*ci[j] - } - } - if uplo == blas.Upper { - for k := 0; k < i; k++ { - atmp = alpha * cmplx.Conj(a[k*lda+i]) - c128.AxpyUnitary(atmp, b[k*ldb:k*ldb+n], ci) - } - for k := i + 1; k < m; k++ { - atmp = alpha * a[i*lda+k] - c128.AxpyUnitary(atmp, b[k*ldb:k*ldb+n], ci) - } - } else { - for k := 0; k < i; k++ { - atmp = alpha * a[i*lda+k] - c128.AxpyUnitary(atmp, b[k*ldb:k*ldb+n], ci) - } - for k := i + 1; k < m; k++ { - atmp = alpha * cmplx.Conj(a[k*lda+i]) - c128.AxpyUnitary(atmp, b[k*ldb:k*ldb+n], ci) - } - } - } - } else { - // Form C = alpha*B*A + beta*C. - if uplo == blas.Upper { - for i := 0; i < m; i++ { - for j := n - 1; j >= 0; j-- { - abij := alpha * b[i*ldb+j] - aj := a[j*lda+j+1 : j*lda+n] - bi := b[i*ldb+j+1 : i*ldb+n] - ci := c[i*ldc+j+1 : i*ldc+n] - var tmp complex128 - for k, ajk := range aj { - ci[k] += abij * ajk - tmp += bi[k] * cmplx.Conj(ajk) - } - ajj := complex(real(a[j*lda+j]), 0) - if beta == 0 { - c[i*ldc+j] = abij*ajj + alpha*tmp - } else { - c[i*ldc+j] = abij*ajj + alpha*tmp + beta*c[i*ldc+j] - } - } - } - } else { - for i := 0; i < m; i++ { - for j := 0; j < n; j++ { - abij := alpha * b[i*ldb+j] - aj := a[j*lda : j*lda+j] - bi := b[i*ldb : i*ldb+j] - ci := c[i*ldc : i*ldc+j] - var tmp complex128 - for k, ajk := range aj { - ci[k] += abij * ajk - tmp += bi[k] * cmplx.Conj(ajk) - } - ajj := complex(real(a[j*lda+j]), 0) - if beta == 0 { - c[i*ldc+j] = abij*ajj + alpha*tmp - } else { - c[i*ldc+j] = abij*ajj + alpha*tmp + beta*c[i*ldc+j] - } - } - } - } - } -} - -// Zherk performs one of the hermitian rank-k operations -// C = alpha*A*A^H + beta*C if trans == blas.NoTrans -// C = alpha*A^H*A + beta*C if trans == blas.ConjTrans -// where alpha and beta are real scalars, C is an n×n hermitian matrix and A is -// an n×k matrix in the first case and a k×n matrix in the second case. -// -// The imaginary parts of the diagonal elements of C are assumed to be zero, and -// on return they will be set to zero. -func (Implementation) Zherk(uplo blas.Uplo, trans blas.Transpose, n, k int, alpha float64, a []complex128, lda int, beta float64, c []complex128, ldc int) { - var rowA, colA int - switch trans { - default: - panic(badTranspose) - case blas.NoTrans: - rowA, colA = n, k - case blas.ConjTrans: - rowA, colA = k, n - } - switch { - case uplo != blas.Lower && uplo != blas.Upper: - panic(badUplo) - case n < 0: - panic(nLT0) - case k < 0: - panic(kLT0) - case lda < max(1, colA): - panic(badLdA) - case ldc < max(1, n): - panic(badLdC) - } - - // Quick return if possible. - if n == 0 { - return - } - - // For zero matrix size the following slice length checks are trivially satisfied. - if len(a) < (rowA-1)*lda+colA { - panic(shortA) - } - if len(c) < (n-1)*ldc+n { - panic(shortC) - } - - // Quick return if possible. - if (alpha == 0 || k == 0) && beta == 1 { - return - } - - if alpha == 0 { - if uplo == blas.Upper { - if beta == 0 { - for i := 0; i < n; i++ { - ci := c[i*ldc+i : i*ldc+n] - for j := range ci { - ci[j] = 0 - } - } - } else { - for i := 0; i < n; i++ { - ci := c[i*ldc+i : i*ldc+n] - ci[0] = complex(beta*real(ci[0]), 0) - if i != n-1 { - c128.DscalUnitary(beta, ci[1:]) - } - } - } - } else { - if beta == 0 { - for i := 0; i < n; i++ { - ci := c[i*ldc : i*ldc+i+1] - for j := range ci { - ci[j] = 0 - } - } - } else { - for i := 0; i < n; i++ { - ci := c[i*ldc : i*ldc+i+1] - if i != 0 { - c128.DscalUnitary(beta, ci[:i]) - } - ci[i] = complex(beta*real(ci[i]), 0) - } - } - } - return - } - - calpha := complex(alpha, 0) - if trans == blas.NoTrans { - // Form C = alpha*A*A^H + beta*C. - cbeta := complex(beta, 0) - if uplo == blas.Upper { - for i := 0; i < n; i++ { - ci := c[i*ldc+i : i*ldc+n] - ai := a[i*lda : i*lda+k] - switch { - case beta == 0: - // Handle the i-th diagonal element of C. - ci[0] = complex(alpha*real(c128.DotcUnitary(ai, ai)), 0) - // Handle the remaining elements on the i-th row of C. - for jc := range ci[1:] { - j := i + 1 + jc - ci[jc+1] = calpha * c128.DotcUnitary(a[j*lda:j*lda+k], ai) - } - case beta != 1: - cii := calpha*c128.DotcUnitary(ai, ai) + cbeta*ci[0] - ci[0] = complex(real(cii), 0) - for jc, cij := range ci[1:] { - j := i + 1 + jc - ci[jc+1] = calpha*c128.DotcUnitary(a[j*lda:j*lda+k], ai) + cbeta*cij - } - default: - cii := calpha*c128.DotcUnitary(ai, ai) + ci[0] - ci[0] = complex(real(cii), 0) - for jc, cij := range ci[1:] { - j := i + 1 + jc - ci[jc+1] = calpha*c128.DotcUnitary(a[j*lda:j*lda+k], ai) + cij - } - } - } - } else { - for i := 0; i < n; i++ { - ci := c[i*ldc : i*ldc+i+1] - ai := a[i*lda : i*lda+k] - switch { - case beta == 0: - // Handle the first i-1 elements on the i-th row of C. - for j := range ci[:i] { - ci[j] = calpha * c128.DotcUnitary(a[j*lda:j*lda+k], ai) - } - // Handle the i-th diagonal element of C. - ci[i] = complex(alpha*real(c128.DotcUnitary(ai, ai)), 0) - case beta != 1: - for j, cij := range ci[:i] { - ci[j] = calpha*c128.DotcUnitary(a[j*lda:j*lda+k], ai) + cbeta*cij - } - cii := calpha*c128.DotcUnitary(ai, ai) + cbeta*ci[i] - ci[i] = complex(real(cii), 0) - default: - for j, cij := range ci[:i] { - ci[j] = calpha*c128.DotcUnitary(a[j*lda:j*lda+k], ai) + cij - } - cii := calpha*c128.DotcUnitary(ai, ai) + ci[i] - ci[i] = complex(real(cii), 0) - } - } - } - } else { - // Form C = alpha*A^H*A + beta*C. - if uplo == blas.Upper { - for i := 0; i < n; i++ { - ci := c[i*ldc+i : i*ldc+n] - switch { - case beta == 0: - for jc := range ci { - ci[jc] = 0 - } - case beta != 1: - c128.DscalUnitary(beta, ci) - ci[0] = complex(real(ci[0]), 0) - default: - ci[0] = complex(real(ci[0]), 0) - } - for j := 0; j < k; j++ { - aji := cmplx.Conj(a[j*lda+i]) - if aji != 0 { - c128.AxpyUnitary(calpha*aji, a[j*lda+i:j*lda+n], ci) - } - } - c[i*ldc+i] = complex(real(c[i*ldc+i]), 0) - } - } else { - for i := 0; i < n; i++ { - ci := c[i*ldc : i*ldc+i+1] - switch { - case beta == 0: - for j := range ci { - ci[j] = 0 - } - case beta != 1: - c128.DscalUnitary(beta, ci) - ci[i] = complex(real(ci[i]), 0) - default: - ci[i] = complex(real(ci[i]), 0) - } - for j := 0; j < k; j++ { - aji := cmplx.Conj(a[j*lda+i]) - if aji != 0 { - c128.AxpyUnitary(calpha*aji, a[j*lda:j*lda+i+1], ci) - } - } - c[i*ldc+i] = complex(real(c[i*ldc+i]), 0) - } - } - } -} - -// Zher2k performs one of the hermitian rank-2k operations -// C = alpha*A*B^H + conj(alpha)*B*A^H + beta*C if trans == blas.NoTrans -// C = alpha*A^H*B + conj(alpha)*B^H*A + beta*C if trans == blas.ConjTrans -// where alpha and beta are scalars with beta real, C is an n×n hermitian matrix -// and A and B are n×k matrices in the first case and k×n matrices in the second case. -// -// The imaginary parts of the diagonal elements of C are assumed to be zero, and -// on return they will be set to zero. -func (Implementation) Zher2k(uplo blas.Uplo, trans blas.Transpose, n, k int, alpha complex128, a []complex128, lda int, b []complex128, ldb int, beta float64, c []complex128, ldc int) { - var row, col int - switch trans { - default: - panic(badTranspose) - case blas.NoTrans: - row, col = n, k - case blas.ConjTrans: - row, col = k, n - } - switch { - case uplo != blas.Lower && uplo != blas.Upper: - panic(badUplo) - case n < 0: - panic(nLT0) - case k < 0: - panic(kLT0) - case lda < max(1, col): - panic(badLdA) - case ldb < max(1, col): - panic(badLdB) - case ldc < max(1, n): - panic(badLdC) - } - - // Quick return if possible. - if n == 0 { - return - } - - // For zero matrix size the following slice length checks are trivially satisfied. - if len(a) < (row-1)*lda+col { - panic(shortA) - } - if len(b) < (row-1)*ldb+col { - panic(shortB) - } - if len(c) < (n-1)*ldc+n { - panic(shortC) - } - - // Quick return if possible. - if (alpha == 0 || k == 0) && beta == 1 { - return - } - - if alpha == 0 { - if uplo == blas.Upper { - if beta == 0 { - for i := 0; i < n; i++ { - ci := c[i*ldc+i : i*ldc+n] - for j := range ci { - ci[j] = 0 - } - } - } else { - for i := 0; i < n; i++ { - ci := c[i*ldc+i : i*ldc+n] - ci[0] = complex(beta*real(ci[0]), 0) - if i != n-1 { - c128.DscalUnitary(beta, ci[1:]) - } - } - } - } else { - if beta == 0 { - for i := 0; i < n; i++ { - ci := c[i*ldc : i*ldc+i+1] - for j := range ci { - ci[j] = 0 - } - } - } else { - for i := 0; i < n; i++ { - ci := c[i*ldc : i*ldc+i+1] - if i != 0 { - c128.DscalUnitary(beta, ci[:i]) - } - ci[i] = complex(beta*real(ci[i]), 0) - } - } - } - return - } - - conjalpha := cmplx.Conj(alpha) - cbeta := complex(beta, 0) - if trans == blas.NoTrans { - // Form C = alpha*A*B^H + conj(alpha)*B*A^H + beta*C. - if uplo == blas.Upper { - for i := 0; i < n; i++ { - ci := c[i*ldc+i+1 : i*ldc+n] - ai := a[i*lda : i*lda+k] - bi := b[i*ldb : i*ldb+k] - if beta == 0 { - cii := alpha*c128.DotcUnitary(bi, ai) + conjalpha*c128.DotcUnitary(ai, bi) - c[i*ldc+i] = complex(real(cii), 0) - for jc := range ci { - j := i + 1 + jc - ci[jc] = alpha*c128.DotcUnitary(b[j*ldb:j*ldb+k], ai) + conjalpha*c128.DotcUnitary(a[j*lda:j*lda+k], bi) - } - } else { - cii := alpha*c128.DotcUnitary(bi, ai) + conjalpha*c128.DotcUnitary(ai, bi) + cbeta*c[i*ldc+i] - c[i*ldc+i] = complex(real(cii), 0) - for jc, cij := range ci { - j := i + 1 + jc - ci[jc] = alpha*c128.DotcUnitary(b[j*ldb:j*ldb+k], ai) + conjalpha*c128.DotcUnitary(a[j*lda:j*lda+k], bi) + cbeta*cij - } - } - } - } else { - for i := 0; i < n; i++ { - ci := c[i*ldc : i*ldc+i] - ai := a[i*lda : i*lda+k] - bi := b[i*ldb : i*ldb+k] - if beta == 0 { - for j := range ci { - ci[j] = alpha*c128.DotcUnitary(b[j*ldb:j*ldb+k], ai) + conjalpha*c128.DotcUnitary(a[j*lda:j*lda+k], bi) - } - cii := alpha*c128.DotcUnitary(bi, ai) + conjalpha*c128.DotcUnitary(ai, bi) - c[i*ldc+i] = complex(real(cii), 0) - } else { - for j, cij := range ci { - ci[j] = alpha*c128.DotcUnitary(b[j*ldb:j*ldb+k], ai) + conjalpha*c128.DotcUnitary(a[j*lda:j*lda+k], bi) + cbeta*cij - } - cii := alpha*c128.DotcUnitary(bi, ai) + conjalpha*c128.DotcUnitary(ai, bi) + cbeta*c[i*ldc+i] - c[i*ldc+i] = complex(real(cii), 0) - } - } - } - } else { - // Form C = alpha*A^H*B + conj(alpha)*B^H*A + beta*C. - if uplo == blas.Upper { - for i := 0; i < n; i++ { - ci := c[i*ldc+i : i*ldc+n] - switch { - case beta == 0: - for jc := range ci { - ci[jc] = 0 - } - case beta != 1: - c128.DscalUnitary(beta, ci) - ci[0] = complex(real(ci[0]), 0) - default: - ci[0] = complex(real(ci[0]), 0) - } - for j := 0; j < k; j++ { - aji := a[j*lda+i] - bji := b[j*ldb+i] - if aji != 0 { - c128.AxpyUnitary(alpha*cmplx.Conj(aji), b[j*ldb+i:j*ldb+n], ci) - } - if bji != 0 { - c128.AxpyUnitary(conjalpha*cmplx.Conj(bji), a[j*lda+i:j*lda+n], ci) - } - } - ci[0] = complex(real(ci[0]), 0) - } - } else { - for i := 0; i < n; i++ { - ci := c[i*ldc : i*ldc+i+1] - switch { - case beta == 0: - for j := range ci { - ci[j] = 0 - } - case beta != 1: - c128.DscalUnitary(beta, ci) - ci[i] = complex(real(ci[i]), 0) - default: - ci[i] = complex(real(ci[i]), 0) - } - for j := 0; j < k; j++ { - aji := a[j*lda+i] - bji := b[j*ldb+i] - if aji != 0 { - c128.AxpyUnitary(alpha*cmplx.Conj(aji), b[j*ldb:j*ldb+i+1], ci) - } - if bji != 0 { - c128.AxpyUnitary(conjalpha*cmplx.Conj(bji), a[j*lda:j*lda+i+1], ci) - } - } - ci[i] = complex(real(ci[i]), 0) - } - } - } -} - -// Zsymm performs one of the matrix-matrix operations -// C = alpha*A*B + beta*C if side == blas.Left -// C = alpha*B*A + beta*C if side == blas.Right -// where alpha and beta are scalars, A is an m×m or n×n symmetric matrix and B -// and C are m×n matrices. -func (Implementation) Zsymm(side blas.Side, uplo blas.Uplo, m, n int, alpha complex128, a []complex128, lda int, b []complex128, ldb int, beta complex128, c []complex128, ldc int) { - na := m - if side == blas.Right { - na = n - } - switch { - case side != blas.Left && side != blas.Right: - panic(badSide) - case uplo != blas.Lower && uplo != blas.Upper: - panic(badUplo) - case m < 0: - panic(mLT0) - case n < 0: - panic(nLT0) - case lda < max(1, na): - panic(badLdA) - case ldb < max(1, n): - panic(badLdB) - case ldc < max(1, n): - panic(badLdC) - } - - // Quick return if possible. - if m == 0 || n == 0 { - return - } - - // For zero matrix size the following slice length checks are trivially satisfied. - if len(a) < lda*(na-1)+na { - panic(shortA) - } - if len(b) < ldb*(m-1)+n { - panic(shortB) - } - if len(c) < ldc*(m-1)+n { - panic(shortC) - } - - // Quick return if possible. - if alpha == 0 && beta == 1 { - return - } - - if alpha == 0 { - if beta == 0 { - for i := 0; i < m; i++ { - ci := c[i*ldc : i*ldc+n] - for j := range ci { - ci[j] = 0 - } - } - } else { - for i := 0; i < m; i++ { - ci := c[i*ldc : i*ldc+n] - c128.ScalUnitary(beta, ci) - } - } - return - } - - if side == blas.Left { - // Form C = alpha*A*B + beta*C. - for i := 0; i < m; i++ { - atmp := alpha * a[i*lda+i] - bi := b[i*ldb : i*ldb+n] - ci := c[i*ldc : i*ldc+n] - if beta == 0 { - for j, bij := range bi { - ci[j] = atmp * bij - } - } else { - for j, bij := range bi { - ci[j] = atmp*bij + beta*ci[j] - } - } - if uplo == blas.Upper { - for k := 0; k < i; k++ { - atmp = alpha * a[k*lda+i] - c128.AxpyUnitary(atmp, b[k*ldb:k*ldb+n], ci) - } - for k := i + 1; k < m; k++ { - atmp = alpha * a[i*lda+k] - c128.AxpyUnitary(atmp, b[k*ldb:k*ldb+n], ci) - } - } else { - for k := 0; k < i; k++ { - atmp = alpha * a[i*lda+k] - c128.AxpyUnitary(atmp, b[k*ldb:k*ldb+n], ci) - } - for k := i + 1; k < m; k++ { - atmp = alpha * a[k*lda+i] - c128.AxpyUnitary(atmp, b[k*ldb:k*ldb+n], ci) - } - } - } - } else { - // Form C = alpha*B*A + beta*C. - if uplo == blas.Upper { - for i := 0; i < m; i++ { - for j := n - 1; j >= 0; j-- { - abij := alpha * b[i*ldb+j] - aj := a[j*lda+j+1 : j*lda+n] - bi := b[i*ldb+j+1 : i*ldb+n] - ci := c[i*ldc+j+1 : i*ldc+n] - var tmp complex128 - for k, ajk := range aj { - ci[k] += abij * ajk - tmp += bi[k] * ajk - } - if beta == 0 { - c[i*ldc+j] = abij*a[j*lda+j] + alpha*tmp - } else { - c[i*ldc+j] = abij*a[j*lda+j] + alpha*tmp + beta*c[i*ldc+j] - } - } - } - } else { - for i := 0; i < m; i++ { - for j := 0; j < n; j++ { - abij := alpha * b[i*ldb+j] - aj := a[j*lda : j*lda+j] - bi := b[i*ldb : i*ldb+j] - ci := c[i*ldc : i*ldc+j] - var tmp complex128 - for k, ajk := range aj { - ci[k] += abij * ajk - tmp += bi[k] * ajk - } - if beta == 0 { - c[i*ldc+j] = abij*a[j*lda+j] + alpha*tmp - } else { - c[i*ldc+j] = abij*a[j*lda+j] + alpha*tmp + beta*c[i*ldc+j] - } - } - } - } - } -} - -// Zsyrk performs one of the symmetric rank-k operations -// C = alpha*A*A^T + beta*C if trans == blas.NoTrans -// C = alpha*A^T*A + beta*C if trans == blas.Trans -// where alpha and beta are scalars, C is an n×n symmetric matrix and A is -// an n×k matrix in the first case and a k×n matrix in the second case. -func (Implementation) Zsyrk(uplo blas.Uplo, trans blas.Transpose, n, k int, alpha complex128, a []complex128, lda int, beta complex128, c []complex128, ldc int) { - var rowA, colA int - switch trans { - default: - panic(badTranspose) - case blas.NoTrans: - rowA, colA = n, k - case blas.Trans: - rowA, colA = k, n - } - switch { - case uplo != blas.Lower && uplo != blas.Upper: - panic(badUplo) - case n < 0: - panic(nLT0) - case k < 0: - panic(kLT0) - case lda < max(1, colA): - panic(badLdA) - case ldc < max(1, n): - panic(badLdC) - } - - // Quick return if possible. - if n == 0 { - return - } - - // For zero matrix size the following slice length checks are trivially satisfied. - if len(a) < (rowA-1)*lda+colA { - panic(shortA) - } - if len(c) < (n-1)*ldc+n { - panic(shortC) - } - - // Quick return if possible. - if (alpha == 0 || k == 0) && beta == 1 { - return - } - - if alpha == 0 { - if uplo == blas.Upper { - if beta == 0 { - for i := 0; i < n; i++ { - ci := c[i*ldc+i : i*ldc+n] - for j := range ci { - ci[j] = 0 - } - } - } else { - for i := 0; i < n; i++ { - ci := c[i*ldc+i : i*ldc+n] - c128.ScalUnitary(beta, ci) - } - } - } else { - if beta == 0 { - for i := 0; i < n; i++ { - ci := c[i*ldc : i*ldc+i+1] - for j := range ci { - ci[j] = 0 - } - } - } else { - for i := 0; i < n; i++ { - ci := c[i*ldc : i*ldc+i+1] - c128.ScalUnitary(beta, ci) - } - } - } - return - } - - if trans == blas.NoTrans { - // Form C = alpha*A*A^T + beta*C. - if uplo == blas.Upper { - for i := 0; i < n; i++ { - ci := c[i*ldc+i : i*ldc+n] - ai := a[i*lda : i*lda+k] - for jc, cij := range ci { - j := i + jc - ci[jc] = beta*cij + alpha*c128.DotuUnitary(ai, a[j*lda:j*lda+k]) - } - } - } else { - for i := 0; i < n; i++ { - ci := c[i*ldc : i*ldc+i+1] - ai := a[i*lda : i*lda+k] - for j, cij := range ci { - ci[j] = beta*cij + alpha*c128.DotuUnitary(ai, a[j*lda:j*lda+k]) - } - } - } - } else { - // Form C = alpha*A^T*A + beta*C. - if uplo == blas.Upper { - for i := 0; i < n; i++ { - ci := c[i*ldc+i : i*ldc+n] - switch { - case beta == 0: - for jc := range ci { - ci[jc] = 0 - } - case beta != 1: - for jc := range ci { - ci[jc] *= beta - } - } - for j := 0; j < k; j++ { - aji := a[j*lda+i] - if aji != 0 { - c128.AxpyUnitary(alpha*aji, a[j*lda+i:j*lda+n], ci) - } - } - } - } else { - for i := 0; i < n; i++ { - ci := c[i*ldc : i*ldc+i+1] - switch { - case beta == 0: - for j := range ci { - ci[j] = 0 - } - case beta != 1: - for j := range ci { - ci[j] *= beta - } - } - for j := 0; j < k; j++ { - aji := a[j*lda+i] - if aji != 0 { - c128.AxpyUnitary(alpha*aji, a[j*lda:j*lda+i+1], ci) - } - } - } - } - } -} - -// Zsyr2k performs one of the symmetric rank-2k operations -// C = alpha*A*B^T + alpha*B*A^T + beta*C if trans == blas.NoTrans -// C = alpha*A^T*B + alpha*B^T*A + beta*C if trans == blas.Trans -// where alpha and beta are scalars, C is an n×n symmetric matrix and A and B -// are n×k matrices in the first case and k×n matrices in the second case. -func (Implementation) Zsyr2k(uplo blas.Uplo, trans blas.Transpose, n, k int, alpha complex128, a []complex128, lda int, b []complex128, ldb int, beta complex128, c []complex128, ldc int) { - var row, col int - switch trans { - default: - panic(badTranspose) - case blas.NoTrans: - row, col = n, k - case blas.Trans: - row, col = k, n - } - switch { - case uplo != blas.Lower && uplo != blas.Upper: - panic(badUplo) - case n < 0: - panic(nLT0) - case k < 0: - panic(kLT0) - case lda < max(1, col): - panic(badLdA) - case ldb < max(1, col): - panic(badLdB) - case ldc < max(1, n): - panic(badLdC) - } - - // Quick return if possible. - if n == 0 { - return - } - - // For zero matrix size the following slice length checks are trivially satisfied. - if len(a) < (row-1)*lda+col { - panic(shortA) - } - if len(b) < (row-1)*ldb+col { - panic(shortB) - } - if len(c) < (n-1)*ldc+n { - panic(shortC) - } - - // Quick return if possible. - if (alpha == 0 || k == 0) && beta == 1 { - return - } - - if alpha == 0 { - if uplo == blas.Upper { - if beta == 0 { - for i := 0; i < n; i++ { - ci := c[i*ldc+i : i*ldc+n] - for j := range ci { - ci[j] = 0 - } - } - } else { - for i := 0; i < n; i++ { - ci := c[i*ldc+i : i*ldc+n] - c128.ScalUnitary(beta, ci) - } - } - } else { - if beta == 0 { - for i := 0; i < n; i++ { - ci := c[i*ldc : i*ldc+i+1] - for j := range ci { - ci[j] = 0 - } - } - } else { - for i := 0; i < n; i++ { - ci := c[i*ldc : i*ldc+i+1] - c128.ScalUnitary(beta, ci) - } - } - } - return - } - - if trans == blas.NoTrans { - // Form C = alpha*A*B^T + alpha*B*A^T + beta*C. - if uplo == blas.Upper { - for i := 0; i < n; i++ { - ci := c[i*ldc+i : i*ldc+n] - ai := a[i*lda : i*lda+k] - bi := b[i*ldb : i*ldb+k] - if beta == 0 { - for jc := range ci { - j := i + jc - ci[jc] = alpha*c128.DotuUnitary(ai, b[j*ldb:j*ldb+k]) + alpha*c128.DotuUnitary(bi, a[j*lda:j*lda+k]) - } - } else { - for jc, cij := range ci { - j := i + jc - ci[jc] = alpha*c128.DotuUnitary(ai, b[j*ldb:j*ldb+k]) + alpha*c128.DotuUnitary(bi, a[j*lda:j*lda+k]) + beta*cij - } - } - } - } else { - for i := 0; i < n; i++ { - ci := c[i*ldc : i*ldc+i+1] - ai := a[i*lda : i*lda+k] - bi := b[i*ldb : i*ldb+k] - if beta == 0 { - for j := range ci { - ci[j] = alpha*c128.DotuUnitary(ai, b[j*ldb:j*ldb+k]) + alpha*c128.DotuUnitary(bi, a[j*lda:j*lda+k]) - } - } else { - for j, cij := range ci { - ci[j] = alpha*c128.DotuUnitary(ai, b[j*ldb:j*ldb+k]) + alpha*c128.DotuUnitary(bi, a[j*lda:j*lda+k]) + beta*cij - } - } - } - } - } else { - // Form C = alpha*A^T*B + alpha*B^T*A + beta*C. - if uplo == blas.Upper { - for i := 0; i < n; i++ { - ci := c[i*ldc+i : i*ldc+n] - switch { - case beta == 0: - for jc := range ci { - ci[jc] = 0 - } - case beta != 1: - for jc := range ci { - ci[jc] *= beta - } - } - for j := 0; j < k; j++ { - aji := a[j*lda+i] - bji := b[j*ldb+i] - if aji != 0 { - c128.AxpyUnitary(alpha*aji, b[j*ldb+i:j*ldb+n], ci) - } - if bji != 0 { - c128.AxpyUnitary(alpha*bji, a[j*lda+i:j*lda+n], ci) - } - } - } - } else { - for i := 0; i < n; i++ { - ci := c[i*ldc : i*ldc+i+1] - switch { - case beta == 0: - for j := range ci { - ci[j] = 0 - } - case beta != 1: - for j := range ci { - ci[j] *= beta - } - } - for j := 0; j < k; j++ { - aji := a[j*lda+i] - bji := b[j*ldb+i] - if aji != 0 { - c128.AxpyUnitary(alpha*aji, b[j*ldb:j*ldb+i+1], ci) - } - if bji != 0 { - c128.AxpyUnitary(alpha*bji, a[j*lda:j*lda+i+1], ci) - } - } - } - } - } -} - -// Ztrmm performs one of the matrix-matrix operations -// B = alpha * op(A) * B if side == blas.Left, -// B = alpha * B * op(A) if side == blas.Right, -// where alpha is a scalar, B is an m×n matrix, A is a unit, or non-unit, -// upper or lower triangular matrix and op(A) is one of -// op(A) = A if trans == blas.NoTrans, -// op(A) = A^T if trans == blas.Trans, -// op(A) = A^H if trans == blas.ConjTrans. -func (Implementation) Ztrmm(side blas.Side, uplo blas.Uplo, trans blas.Transpose, diag blas.Diag, m, n int, alpha complex128, a []complex128, lda int, b []complex128, ldb int) { - na := m - if side == blas.Right { - na = n - } - switch { - case side != blas.Left && side != blas.Right: - panic(badSide) - case uplo != blas.Lower && uplo != blas.Upper: - panic(badUplo) - case trans != blas.NoTrans && trans != blas.Trans && trans != blas.ConjTrans: - panic(badTranspose) - case diag != blas.Unit && diag != blas.NonUnit: - panic(badDiag) - case m < 0: - panic(mLT0) - case n < 0: - panic(nLT0) - case lda < max(1, na): - panic(badLdA) - case ldb < max(1, n): - panic(badLdB) - } - - // Quick return if possible. - if m == 0 || n == 0 { - return - } - - // For zero matrix size the following slice length checks are trivially satisfied. - if len(a) < (na-1)*lda+na { - panic(shortA) - } - if len(b) < (m-1)*ldb+n { - panic(shortB) - } - - // Quick return if possible. - if alpha == 0 { - for i := 0; i < m; i++ { - bi := b[i*ldb : i*ldb+n] - for j := range bi { - bi[j] = 0 - } - } - return - } - - noConj := trans != blas.ConjTrans - noUnit := diag == blas.NonUnit - if side == blas.Left { - if trans == blas.NoTrans { - // Form B = alpha*A*B. - if uplo == blas.Upper { - for i := 0; i < m; i++ { - aii := alpha - if noUnit { - aii *= a[i*lda+i] - } - bi := b[i*ldb : i*ldb+n] - for j := range bi { - bi[j] *= aii - } - for ja, aij := range a[i*lda+i+1 : i*lda+m] { - j := ja + i + 1 - if aij != 0 { - c128.AxpyUnitary(alpha*aij, b[j*ldb:j*ldb+n], bi) - } - } - } - } else { - for i := m - 1; i >= 0; i-- { - aii := alpha - if noUnit { - aii *= a[i*lda+i] - } - bi := b[i*ldb : i*ldb+n] - for j := range bi { - bi[j] *= aii - } - for j, aij := range a[i*lda : i*lda+i] { - if aij != 0 { - c128.AxpyUnitary(alpha*aij, b[j*ldb:j*ldb+n], bi) - } - } - } - } - } else { - // Form B = alpha*A^T*B or B = alpha*A^H*B. - if uplo == blas.Upper { - for k := m - 1; k >= 0; k-- { - bk := b[k*ldb : k*ldb+n] - for ja, ajk := range a[k*lda+k+1 : k*lda+m] { - if ajk == 0 { - continue - } - j := k + 1 + ja - if noConj { - c128.AxpyUnitary(alpha*ajk, bk, b[j*ldb:j*ldb+n]) - } else { - c128.AxpyUnitary(alpha*cmplx.Conj(ajk), bk, b[j*ldb:j*ldb+n]) - } - } - akk := alpha - if noUnit { - if noConj { - akk *= a[k*lda+k] - } else { - akk *= cmplx.Conj(a[k*lda+k]) - } - } - if akk != 1 { - c128.ScalUnitary(akk, bk) - } - } - } else { - for k := 0; k < m; k++ { - bk := b[k*ldb : k*ldb+n] - for j, ajk := range a[k*lda : k*lda+k] { - if ajk == 0 { - continue - } - if noConj { - c128.AxpyUnitary(alpha*ajk, bk, b[j*ldb:j*ldb+n]) - } else { - c128.AxpyUnitary(alpha*cmplx.Conj(ajk), bk, b[j*ldb:j*ldb+n]) - } - } - akk := alpha - if noUnit { - if noConj { - akk *= a[k*lda+k] - } else { - akk *= cmplx.Conj(a[k*lda+k]) - } - } - if akk != 1 { - c128.ScalUnitary(akk, bk) - } - } - } - } - } else { - if trans == blas.NoTrans { - // Form B = alpha*B*A. - if uplo == blas.Upper { - for i := 0; i < m; i++ { - bi := b[i*ldb : i*ldb+n] - for k := n - 1; k >= 0; k-- { - abik := alpha * bi[k] - if abik == 0 { - continue - } - bi[k] = abik - if noUnit { - bi[k] *= a[k*lda+k] - } - c128.AxpyUnitary(abik, a[k*lda+k+1:k*lda+n], bi[k+1:]) - } - } - } else { - for i := 0; i < m; i++ { - bi := b[i*ldb : i*ldb+n] - for k := 0; k < n; k++ { - abik := alpha * bi[k] - if abik == 0 { - continue - } - bi[k] = abik - if noUnit { - bi[k] *= a[k*lda+k] - } - c128.AxpyUnitary(abik, a[k*lda:k*lda+k], bi[:k]) - } - } - } - } else { - // Form B = alpha*B*A^T or B = alpha*B*A^H. - if uplo == blas.Upper { - for i := 0; i < m; i++ { - bi := b[i*ldb : i*ldb+n] - for j, bij := range bi { - if noConj { - if noUnit { - bij *= a[j*lda+j] - } - bij += c128.DotuUnitary(a[j*lda+j+1:j*lda+n], bi[j+1:n]) - } else { - if noUnit { - bij *= cmplx.Conj(a[j*lda+j]) - } - bij += c128.DotcUnitary(a[j*lda+j+1:j*lda+n], bi[j+1:n]) - } - bi[j] = alpha * bij - } - } - } else { - for i := 0; i < m; i++ { - bi := b[i*ldb : i*ldb+n] - for j := n - 1; j >= 0; j-- { - bij := bi[j] - if noConj { - if noUnit { - bij *= a[j*lda+j] - } - bij += c128.DotuUnitary(a[j*lda:j*lda+j], bi[:j]) - } else { - if noUnit { - bij *= cmplx.Conj(a[j*lda+j]) - } - bij += c128.DotcUnitary(a[j*lda:j*lda+j], bi[:j]) - } - bi[j] = alpha * bij - } - } - } - } - } -} - -// Ztrsm solves one of the matrix equations -// op(A) * X = alpha * B if side == blas.Left, -// X * op(A) = alpha * B if side == blas.Right, -// where alpha is a scalar, X and B are m×n matrices, A is a unit or -// non-unit, upper or lower triangular matrix and op(A) is one of -// op(A) = A if transA == blas.NoTrans, -// op(A) = A^T if transA == blas.Trans, -// op(A) = A^H if transA == blas.ConjTrans. -// On return the matrix X is overwritten on B. -func (Implementation) Ztrsm(side blas.Side, uplo blas.Uplo, transA blas.Transpose, diag blas.Diag, m, n int, alpha complex128, a []complex128, lda int, b []complex128, ldb int) { - na := m - if side == blas.Right { - na = n - } - switch { - case side != blas.Left && side != blas.Right: - panic(badSide) - case uplo != blas.Lower && uplo != blas.Upper: - panic(badUplo) - case transA != blas.NoTrans && transA != blas.Trans && transA != blas.ConjTrans: - panic(badTranspose) - case diag != blas.Unit && diag != blas.NonUnit: - panic(badDiag) - case m < 0: - panic(mLT0) - case n < 0: - panic(nLT0) - case lda < max(1, na): - panic(badLdA) - case ldb < max(1, n): - panic(badLdB) - } - - // Quick return if possible. - if m == 0 || n == 0 { - return - } - - // For zero matrix size the following slice length checks are trivially satisfied. - if len(a) < (na-1)*lda+na { - panic(shortA) - } - if len(b) < (m-1)*ldb+n { - panic(shortB) - } - - if alpha == 0 { - for i := 0; i < m; i++ { - for j := 0; j < n; j++ { - b[i*ldb+j] = 0 - } - } - return - } - - noConj := transA != blas.ConjTrans - noUnit := diag == blas.NonUnit - if side == blas.Left { - if transA == blas.NoTrans { - // Form B = alpha*inv(A)*B. - if uplo == blas.Upper { - for i := m - 1; i >= 0; i-- { - bi := b[i*ldb : i*ldb+n] - if alpha != 1 { - c128.ScalUnitary(alpha, bi) - } - for ka, aik := range a[i*lda+i+1 : i*lda+m] { - k := i + 1 + ka - if aik != 0 { - c128.AxpyUnitary(-aik, b[k*ldb:k*ldb+n], bi) - } - } - if noUnit { - c128.ScalUnitary(1/a[i*lda+i], bi) - } - } - } else { - for i := 0; i < m; i++ { - bi := b[i*ldb : i*ldb+n] - if alpha != 1 { - c128.ScalUnitary(alpha, bi) - } - for j, aij := range a[i*lda : i*lda+i] { - if aij != 0 { - c128.AxpyUnitary(-aij, b[j*ldb:j*ldb+n], bi) - } - } - if noUnit { - c128.ScalUnitary(1/a[i*lda+i], bi) - } - } - } - } else { - // Form B = alpha*inv(A^T)*B or B = alpha*inv(A^H)*B. - if uplo == blas.Upper { - for i := 0; i < m; i++ { - bi := b[i*ldb : i*ldb+n] - if noUnit { - if noConj { - c128.ScalUnitary(1/a[i*lda+i], bi) - } else { - c128.ScalUnitary(1/cmplx.Conj(a[i*lda+i]), bi) - } - } - for ja, aij := range a[i*lda+i+1 : i*lda+m] { - if aij == 0 { - continue - } - j := i + 1 + ja - if noConj { - c128.AxpyUnitary(-aij, bi, b[j*ldb:j*ldb+n]) - } else { - c128.AxpyUnitary(-cmplx.Conj(aij), bi, b[j*ldb:j*ldb+n]) - } - } - if alpha != 1 { - c128.ScalUnitary(alpha, bi) - } - } - } else { - for i := m - 1; i >= 0; i-- { - bi := b[i*ldb : i*ldb+n] - if noUnit { - if noConj { - c128.ScalUnitary(1/a[i*lda+i], bi) - } else { - c128.ScalUnitary(1/cmplx.Conj(a[i*lda+i]), bi) - } - } - for j, aij := range a[i*lda : i*lda+i] { - if aij == 0 { - continue - } - if noConj { - c128.AxpyUnitary(-aij, bi, b[j*ldb:j*ldb+n]) - } else { - c128.AxpyUnitary(-cmplx.Conj(aij), bi, b[j*ldb:j*ldb+n]) - } - } - if alpha != 1 { - c128.ScalUnitary(alpha, bi) - } - } - } - } - } else { - if transA == blas.NoTrans { - // Form B = alpha*B*inv(A). - if uplo == blas.Upper { - for i := 0; i < m; i++ { - bi := b[i*ldb : i*ldb+n] - if alpha != 1 { - c128.ScalUnitary(alpha, bi) - } - for j, bij := range bi { - if bij == 0 { - continue - } - if noUnit { - bi[j] /= a[j*lda+j] - } - c128.AxpyUnitary(-bi[j], a[j*lda+j+1:j*lda+n], bi[j+1:n]) - } - } - } else { - for i := 0; i < m; i++ { - bi := b[i*ldb : i*ldb+n] - if alpha != 1 { - c128.ScalUnitary(alpha, bi) - } - for j := n - 1; j >= 0; j-- { - if bi[j] == 0 { - continue - } - if noUnit { - bi[j] /= a[j*lda+j] - } - c128.AxpyUnitary(-bi[j], a[j*lda:j*lda+j], bi[:j]) - } - } - } - } else { - // Form B = alpha*B*inv(A^T) or B = alpha*B*inv(A^H). - if uplo == blas.Upper { - for i := 0; i < m; i++ { - bi := b[i*ldb : i*ldb+n] - for j := n - 1; j >= 0; j-- { - bij := alpha * bi[j] - if noConj { - bij -= c128.DotuUnitary(a[j*lda+j+1:j*lda+n], bi[j+1:n]) - if noUnit { - bij /= a[j*lda+j] - } - } else { - bij -= c128.DotcUnitary(a[j*lda+j+1:j*lda+n], bi[j+1:n]) - if noUnit { - bij /= cmplx.Conj(a[j*lda+j]) - } - } - bi[j] = bij - } - } - } else { - for i := 0; i < m; i++ { - bi := b[i*ldb : i*ldb+n] - for j, bij := range bi { - bij *= alpha - if noConj { - bij -= c128.DotuUnitary(a[j*lda:j*lda+j], bi[:j]) - if noUnit { - bij /= a[j*lda+j] - } - } else { - bij -= c128.DotcUnitary(a[j*lda:j*lda+j], bi[:j]) - if noUnit { - bij /= cmplx.Conj(a[j*lda+j]) - } - } - bi[j] = bij - } - } - } - } - } -} diff --git a/vendor/gonum.org/v1/gonum/blas/gonum/level3cmplx64.go b/vendor/gonum.org/v1/gonum/blas/gonum/level3cmplx64.go deleted file mode 100644 index 436c545065..0000000000 --- a/vendor/gonum.org/v1/gonum/blas/gonum/level3cmplx64.go +++ /dev/null @@ -1,1735 +0,0 @@ -// Code generated by "go generate gonum.org/v1/gonum/blas/gonum”; DO NOT EDIT. - -// Copyright ©2019 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import ( - cmplx "gonum.org/v1/gonum/internal/cmplx64" - - "gonum.org/v1/gonum/blas" - "gonum.org/v1/gonum/internal/asm/c64" -) - -var _ blas.Complex64Level3 = Implementation{} - -// Cgemm performs one of the matrix-matrix operations -// C = alpha * op(A) * op(B) + beta * C -// where op(X) is one of -// op(X) = X or op(X) = X^T or op(X) = X^H, -// alpha and beta are scalars, and A, B and C are matrices, with op(A) an m×k matrix, -// op(B) a k×n matrix and C an m×n matrix. -// -// Complex64 implementations are autogenerated and not directly tested. -func (Implementation) Cgemm(tA, tB blas.Transpose, m, n, k int, alpha complex64, a []complex64, lda int, b []complex64, ldb int, beta complex64, c []complex64, ldc int) { - switch tA { - default: - panic(badTranspose) - case blas.NoTrans, blas.Trans, blas.ConjTrans: - } - switch tB { - default: - panic(badTranspose) - case blas.NoTrans, blas.Trans, blas.ConjTrans: - } - switch { - case m < 0: - panic(mLT0) - case n < 0: - panic(nLT0) - case k < 0: - panic(kLT0) - } - rowA, colA := m, k - if tA != blas.NoTrans { - rowA, colA = k, m - } - if lda < max(1, colA) { - panic(badLdA) - } - rowB, colB := k, n - if tB != blas.NoTrans { - rowB, colB = n, k - } - if ldb < max(1, colB) { - panic(badLdB) - } - if ldc < max(1, n) { - panic(badLdC) - } - - // Quick return if possible. - if m == 0 || n == 0 { - return - } - - // For zero matrix size the following slice length checks are trivially satisfied. - if len(a) < (rowA-1)*lda+colA { - panic(shortA) - } - if len(b) < (rowB-1)*ldb+colB { - panic(shortB) - } - if len(c) < (m-1)*ldc+n { - panic(shortC) - } - - // Quick return if possible. - if (alpha == 0 || k == 0) && beta == 1 { - return - } - - if alpha == 0 { - if beta == 0 { - for i := 0; i < m; i++ { - for j := 0; j < n; j++ { - c[i*ldc+j] = 0 - } - } - } else { - for i := 0; i < m; i++ { - for j := 0; j < n; j++ { - c[i*ldc+j] *= beta - } - } - } - return - } - - switch tA { - case blas.NoTrans: - switch tB { - case blas.NoTrans: - // Form C = alpha * A * B + beta * C. - for i := 0; i < m; i++ { - switch { - case beta == 0: - for j := 0; j < n; j++ { - c[i*ldc+j] = 0 - } - case beta != 1: - for j := 0; j < n; j++ { - c[i*ldc+j] *= beta - } - } - for l := 0; l < k; l++ { - tmp := alpha * a[i*lda+l] - for j := 0; j < n; j++ { - c[i*ldc+j] += tmp * b[l*ldb+j] - } - } - } - case blas.Trans: - // Form C = alpha * A * B^T + beta * C. - for i := 0; i < m; i++ { - switch { - case beta == 0: - for j := 0; j < n; j++ { - c[i*ldc+j] = 0 - } - case beta != 1: - for j := 0; j < n; j++ { - c[i*ldc+j] *= beta - } - } - for l := 0; l < k; l++ { - tmp := alpha * a[i*lda+l] - for j := 0; j < n; j++ { - c[i*ldc+j] += tmp * b[j*ldb+l] - } - } - } - case blas.ConjTrans: - // Form C = alpha * A * B^H + beta * C. - for i := 0; i < m; i++ { - switch { - case beta == 0: - for j := 0; j < n; j++ { - c[i*ldc+j] = 0 - } - case beta != 1: - for j := 0; j < n; j++ { - c[i*ldc+j] *= beta - } - } - for l := 0; l < k; l++ { - tmp := alpha * a[i*lda+l] - for j := 0; j < n; j++ { - c[i*ldc+j] += tmp * cmplx.Conj(b[j*ldb+l]) - } - } - } - } - case blas.Trans: - switch tB { - case blas.NoTrans: - // Form C = alpha * A^T * B + beta * C. - for i := 0; i < m; i++ { - for j := 0; j < n; j++ { - var tmp complex64 - for l := 0; l < k; l++ { - tmp += a[l*lda+i] * b[l*ldb+j] - } - if beta == 0 { - c[i*ldc+j] = alpha * tmp - } else { - c[i*ldc+j] = alpha*tmp + beta*c[i*ldc+j] - } - } - } - case blas.Trans: - // Form C = alpha * A^T * B^T + beta * C. - for i := 0; i < m; i++ { - for j := 0; j < n; j++ { - var tmp complex64 - for l := 0; l < k; l++ { - tmp += a[l*lda+i] * b[j*ldb+l] - } - if beta == 0 { - c[i*ldc+j] = alpha * tmp - } else { - c[i*ldc+j] = alpha*tmp + beta*c[i*ldc+j] - } - } - } - case blas.ConjTrans: - // Form C = alpha * A^T * B^H + beta * C. - for i := 0; i < m; i++ { - for j := 0; j < n; j++ { - var tmp complex64 - for l := 0; l < k; l++ { - tmp += a[l*lda+i] * cmplx.Conj(b[j*ldb+l]) - } - if beta == 0 { - c[i*ldc+j] = alpha * tmp - } else { - c[i*ldc+j] = alpha*tmp + beta*c[i*ldc+j] - } - } - } - } - case blas.ConjTrans: - switch tB { - case blas.NoTrans: - // Form C = alpha * A^H * B + beta * C. - for i := 0; i < m; i++ { - for j := 0; j < n; j++ { - var tmp complex64 - for l := 0; l < k; l++ { - tmp += cmplx.Conj(a[l*lda+i]) * b[l*ldb+j] - } - if beta == 0 { - c[i*ldc+j] = alpha * tmp - } else { - c[i*ldc+j] = alpha*tmp + beta*c[i*ldc+j] - } - } - } - case blas.Trans: - // Form C = alpha * A^H * B^T + beta * C. - for i := 0; i < m; i++ { - for j := 0; j < n; j++ { - var tmp complex64 - for l := 0; l < k; l++ { - tmp += cmplx.Conj(a[l*lda+i]) * b[j*ldb+l] - } - if beta == 0 { - c[i*ldc+j] = alpha * tmp - } else { - c[i*ldc+j] = alpha*tmp + beta*c[i*ldc+j] - } - } - } - case blas.ConjTrans: - // Form C = alpha * A^H * B^H + beta * C. - for i := 0; i < m; i++ { - for j := 0; j < n; j++ { - var tmp complex64 - for l := 0; l < k; l++ { - tmp += cmplx.Conj(a[l*lda+i]) * cmplx.Conj(b[j*ldb+l]) - } - if beta == 0 { - c[i*ldc+j] = alpha * tmp - } else { - c[i*ldc+j] = alpha*tmp + beta*c[i*ldc+j] - } - } - } - } - } -} - -// Chemm performs one of the matrix-matrix operations -// C = alpha*A*B + beta*C if side == blas.Left -// C = alpha*B*A + beta*C if side == blas.Right -// where alpha and beta are scalars, A is an m×m or n×n hermitian matrix and B -// and C are m×n matrices. The imaginary parts of the diagonal elements of A are -// assumed to be zero. -// -// Complex64 implementations are autogenerated and not directly tested. -func (Implementation) Chemm(side blas.Side, uplo blas.Uplo, m, n int, alpha complex64, a []complex64, lda int, b []complex64, ldb int, beta complex64, c []complex64, ldc int) { - na := m - if side == blas.Right { - na = n - } - switch { - case side != blas.Left && side != blas.Right: - panic(badSide) - case uplo != blas.Lower && uplo != blas.Upper: - panic(badUplo) - case m < 0: - panic(mLT0) - case n < 0: - panic(nLT0) - case lda < max(1, na): - panic(badLdA) - case ldb < max(1, n): - panic(badLdB) - case ldc < max(1, n): - panic(badLdC) - } - - // Quick return if possible. - if m == 0 || n == 0 { - return - } - - // For zero matrix size the following slice length checks are trivially satisfied. - if len(a) < lda*(na-1)+na { - panic(shortA) - } - if len(b) < ldb*(m-1)+n { - panic(shortB) - } - if len(c) < ldc*(m-1)+n { - panic(shortC) - } - - // Quick return if possible. - if alpha == 0 && beta == 1 { - return - } - - if alpha == 0 { - if beta == 0 { - for i := 0; i < m; i++ { - ci := c[i*ldc : i*ldc+n] - for j := range ci { - ci[j] = 0 - } - } - } else { - for i := 0; i < m; i++ { - ci := c[i*ldc : i*ldc+n] - c64.ScalUnitary(beta, ci) - } - } - return - } - - if side == blas.Left { - // Form C = alpha*A*B + beta*C. - for i := 0; i < m; i++ { - atmp := alpha * complex(real(a[i*lda+i]), 0) - bi := b[i*ldb : i*ldb+n] - ci := c[i*ldc : i*ldc+n] - if beta == 0 { - for j, bij := range bi { - ci[j] = atmp * bij - } - } else { - for j, bij := range bi { - ci[j] = atmp*bij + beta*ci[j] - } - } - if uplo == blas.Upper { - for k := 0; k < i; k++ { - atmp = alpha * cmplx.Conj(a[k*lda+i]) - c64.AxpyUnitary(atmp, b[k*ldb:k*ldb+n], ci) - } - for k := i + 1; k < m; k++ { - atmp = alpha * a[i*lda+k] - c64.AxpyUnitary(atmp, b[k*ldb:k*ldb+n], ci) - } - } else { - for k := 0; k < i; k++ { - atmp = alpha * a[i*lda+k] - c64.AxpyUnitary(atmp, b[k*ldb:k*ldb+n], ci) - } - for k := i + 1; k < m; k++ { - atmp = alpha * cmplx.Conj(a[k*lda+i]) - c64.AxpyUnitary(atmp, b[k*ldb:k*ldb+n], ci) - } - } - } - } else { - // Form C = alpha*B*A + beta*C. - if uplo == blas.Upper { - for i := 0; i < m; i++ { - for j := n - 1; j >= 0; j-- { - abij := alpha * b[i*ldb+j] - aj := a[j*lda+j+1 : j*lda+n] - bi := b[i*ldb+j+1 : i*ldb+n] - ci := c[i*ldc+j+1 : i*ldc+n] - var tmp complex64 - for k, ajk := range aj { - ci[k] += abij * ajk - tmp += bi[k] * cmplx.Conj(ajk) - } - ajj := complex(real(a[j*lda+j]), 0) - if beta == 0 { - c[i*ldc+j] = abij*ajj + alpha*tmp - } else { - c[i*ldc+j] = abij*ajj + alpha*tmp + beta*c[i*ldc+j] - } - } - } - } else { - for i := 0; i < m; i++ { - for j := 0; j < n; j++ { - abij := alpha * b[i*ldb+j] - aj := a[j*lda : j*lda+j] - bi := b[i*ldb : i*ldb+j] - ci := c[i*ldc : i*ldc+j] - var tmp complex64 - for k, ajk := range aj { - ci[k] += abij * ajk - tmp += bi[k] * cmplx.Conj(ajk) - } - ajj := complex(real(a[j*lda+j]), 0) - if beta == 0 { - c[i*ldc+j] = abij*ajj + alpha*tmp - } else { - c[i*ldc+j] = abij*ajj + alpha*tmp + beta*c[i*ldc+j] - } - } - } - } - } -} - -// Cherk performs one of the hermitian rank-k operations -// C = alpha*A*A^H + beta*C if trans == blas.NoTrans -// C = alpha*A^H*A + beta*C if trans == blas.ConjTrans -// where alpha and beta are real scalars, C is an n×n hermitian matrix and A is -// an n×k matrix in the first case and a k×n matrix in the second case. -// -// The imaginary parts of the diagonal elements of C are assumed to be zero, and -// on return they will be set to zero. -// -// Complex64 implementations are autogenerated and not directly tested. -func (Implementation) Cherk(uplo blas.Uplo, trans blas.Transpose, n, k int, alpha float32, a []complex64, lda int, beta float32, c []complex64, ldc int) { - var rowA, colA int - switch trans { - default: - panic(badTranspose) - case blas.NoTrans: - rowA, colA = n, k - case blas.ConjTrans: - rowA, colA = k, n - } - switch { - case uplo != blas.Lower && uplo != blas.Upper: - panic(badUplo) - case n < 0: - panic(nLT0) - case k < 0: - panic(kLT0) - case lda < max(1, colA): - panic(badLdA) - case ldc < max(1, n): - panic(badLdC) - } - - // Quick return if possible. - if n == 0 { - return - } - - // For zero matrix size the following slice length checks are trivially satisfied. - if len(a) < (rowA-1)*lda+colA { - panic(shortA) - } - if len(c) < (n-1)*ldc+n { - panic(shortC) - } - - // Quick return if possible. - if (alpha == 0 || k == 0) && beta == 1 { - return - } - - if alpha == 0 { - if uplo == blas.Upper { - if beta == 0 { - for i := 0; i < n; i++ { - ci := c[i*ldc+i : i*ldc+n] - for j := range ci { - ci[j] = 0 - } - } - } else { - for i := 0; i < n; i++ { - ci := c[i*ldc+i : i*ldc+n] - ci[0] = complex(beta*real(ci[0]), 0) - if i != n-1 { - c64.SscalUnitary(beta, ci[1:]) - } - } - } - } else { - if beta == 0 { - for i := 0; i < n; i++ { - ci := c[i*ldc : i*ldc+i+1] - for j := range ci { - ci[j] = 0 - } - } - } else { - for i := 0; i < n; i++ { - ci := c[i*ldc : i*ldc+i+1] - if i != 0 { - c64.SscalUnitary(beta, ci[:i]) - } - ci[i] = complex(beta*real(ci[i]), 0) - } - } - } - return - } - - calpha := complex(alpha, 0) - if trans == blas.NoTrans { - // Form C = alpha*A*A^H + beta*C. - cbeta := complex(beta, 0) - if uplo == blas.Upper { - for i := 0; i < n; i++ { - ci := c[i*ldc+i : i*ldc+n] - ai := a[i*lda : i*lda+k] - switch { - case beta == 0: - // Handle the i-th diagonal element of C. - ci[0] = complex(alpha*real(c64.DotcUnitary(ai, ai)), 0) - // Handle the remaining elements on the i-th row of C. - for jc := range ci[1:] { - j := i + 1 + jc - ci[jc+1] = calpha * c64.DotcUnitary(a[j*lda:j*lda+k], ai) - } - case beta != 1: - cii := calpha*c64.DotcUnitary(ai, ai) + cbeta*ci[0] - ci[0] = complex(real(cii), 0) - for jc, cij := range ci[1:] { - j := i + 1 + jc - ci[jc+1] = calpha*c64.DotcUnitary(a[j*lda:j*lda+k], ai) + cbeta*cij - } - default: - cii := calpha*c64.DotcUnitary(ai, ai) + ci[0] - ci[0] = complex(real(cii), 0) - for jc, cij := range ci[1:] { - j := i + 1 + jc - ci[jc+1] = calpha*c64.DotcUnitary(a[j*lda:j*lda+k], ai) + cij - } - } - } - } else { - for i := 0; i < n; i++ { - ci := c[i*ldc : i*ldc+i+1] - ai := a[i*lda : i*lda+k] - switch { - case beta == 0: - // Handle the first i-1 elements on the i-th row of C. - for j := range ci[:i] { - ci[j] = calpha * c64.DotcUnitary(a[j*lda:j*lda+k], ai) - } - // Handle the i-th diagonal element of C. - ci[i] = complex(alpha*real(c64.DotcUnitary(ai, ai)), 0) - case beta != 1: - for j, cij := range ci[:i] { - ci[j] = calpha*c64.DotcUnitary(a[j*lda:j*lda+k], ai) + cbeta*cij - } - cii := calpha*c64.DotcUnitary(ai, ai) + cbeta*ci[i] - ci[i] = complex(real(cii), 0) - default: - for j, cij := range ci[:i] { - ci[j] = calpha*c64.DotcUnitary(a[j*lda:j*lda+k], ai) + cij - } - cii := calpha*c64.DotcUnitary(ai, ai) + ci[i] - ci[i] = complex(real(cii), 0) - } - } - } - } else { - // Form C = alpha*A^H*A + beta*C. - if uplo == blas.Upper { - for i := 0; i < n; i++ { - ci := c[i*ldc+i : i*ldc+n] - switch { - case beta == 0: - for jc := range ci { - ci[jc] = 0 - } - case beta != 1: - c64.SscalUnitary(beta, ci) - ci[0] = complex(real(ci[0]), 0) - default: - ci[0] = complex(real(ci[0]), 0) - } - for j := 0; j < k; j++ { - aji := cmplx.Conj(a[j*lda+i]) - if aji != 0 { - c64.AxpyUnitary(calpha*aji, a[j*lda+i:j*lda+n], ci) - } - } - c[i*ldc+i] = complex(real(c[i*ldc+i]), 0) - } - } else { - for i := 0; i < n; i++ { - ci := c[i*ldc : i*ldc+i+1] - switch { - case beta == 0: - for j := range ci { - ci[j] = 0 - } - case beta != 1: - c64.SscalUnitary(beta, ci) - ci[i] = complex(real(ci[i]), 0) - default: - ci[i] = complex(real(ci[i]), 0) - } - for j := 0; j < k; j++ { - aji := cmplx.Conj(a[j*lda+i]) - if aji != 0 { - c64.AxpyUnitary(calpha*aji, a[j*lda:j*lda+i+1], ci) - } - } - c[i*ldc+i] = complex(real(c[i*ldc+i]), 0) - } - } - } -} - -// Cher2k performs one of the hermitian rank-2k operations -// C = alpha*A*B^H + conj(alpha)*B*A^H + beta*C if trans == blas.NoTrans -// C = alpha*A^H*B + conj(alpha)*B^H*A + beta*C if trans == blas.ConjTrans -// where alpha and beta are scalars with beta real, C is an n×n hermitian matrix -// and A and B are n×k matrices in the first case and k×n matrices in the second case. -// -// The imaginary parts of the diagonal elements of C are assumed to be zero, and -// on return they will be set to zero. -// -// Complex64 implementations are autogenerated and not directly tested. -func (Implementation) Cher2k(uplo blas.Uplo, trans blas.Transpose, n, k int, alpha complex64, a []complex64, lda int, b []complex64, ldb int, beta float32, c []complex64, ldc int) { - var row, col int - switch trans { - default: - panic(badTranspose) - case blas.NoTrans: - row, col = n, k - case blas.ConjTrans: - row, col = k, n - } - switch { - case uplo != blas.Lower && uplo != blas.Upper: - panic(badUplo) - case n < 0: - panic(nLT0) - case k < 0: - panic(kLT0) - case lda < max(1, col): - panic(badLdA) - case ldb < max(1, col): - panic(badLdB) - case ldc < max(1, n): - panic(badLdC) - } - - // Quick return if possible. - if n == 0 { - return - } - - // For zero matrix size the following slice length checks are trivially satisfied. - if len(a) < (row-1)*lda+col { - panic(shortA) - } - if len(b) < (row-1)*ldb+col { - panic(shortB) - } - if len(c) < (n-1)*ldc+n { - panic(shortC) - } - - // Quick return if possible. - if (alpha == 0 || k == 0) && beta == 1 { - return - } - - if alpha == 0 { - if uplo == blas.Upper { - if beta == 0 { - for i := 0; i < n; i++ { - ci := c[i*ldc+i : i*ldc+n] - for j := range ci { - ci[j] = 0 - } - } - } else { - for i := 0; i < n; i++ { - ci := c[i*ldc+i : i*ldc+n] - ci[0] = complex(beta*real(ci[0]), 0) - if i != n-1 { - c64.SscalUnitary(beta, ci[1:]) - } - } - } - } else { - if beta == 0 { - for i := 0; i < n; i++ { - ci := c[i*ldc : i*ldc+i+1] - for j := range ci { - ci[j] = 0 - } - } - } else { - for i := 0; i < n; i++ { - ci := c[i*ldc : i*ldc+i+1] - if i != 0 { - c64.SscalUnitary(beta, ci[:i]) - } - ci[i] = complex(beta*real(ci[i]), 0) - } - } - } - return - } - - conjalpha := cmplx.Conj(alpha) - cbeta := complex(beta, 0) - if trans == blas.NoTrans { - // Form C = alpha*A*B^H + conj(alpha)*B*A^H + beta*C. - if uplo == blas.Upper { - for i := 0; i < n; i++ { - ci := c[i*ldc+i+1 : i*ldc+n] - ai := a[i*lda : i*lda+k] - bi := b[i*ldb : i*ldb+k] - if beta == 0 { - cii := alpha*c64.DotcUnitary(bi, ai) + conjalpha*c64.DotcUnitary(ai, bi) - c[i*ldc+i] = complex(real(cii), 0) - for jc := range ci { - j := i + 1 + jc - ci[jc] = alpha*c64.DotcUnitary(b[j*ldb:j*ldb+k], ai) + conjalpha*c64.DotcUnitary(a[j*lda:j*lda+k], bi) - } - } else { - cii := alpha*c64.DotcUnitary(bi, ai) + conjalpha*c64.DotcUnitary(ai, bi) + cbeta*c[i*ldc+i] - c[i*ldc+i] = complex(real(cii), 0) - for jc, cij := range ci { - j := i + 1 + jc - ci[jc] = alpha*c64.DotcUnitary(b[j*ldb:j*ldb+k], ai) + conjalpha*c64.DotcUnitary(a[j*lda:j*lda+k], bi) + cbeta*cij - } - } - } - } else { - for i := 0; i < n; i++ { - ci := c[i*ldc : i*ldc+i] - ai := a[i*lda : i*lda+k] - bi := b[i*ldb : i*ldb+k] - if beta == 0 { - for j := range ci { - ci[j] = alpha*c64.DotcUnitary(b[j*ldb:j*ldb+k], ai) + conjalpha*c64.DotcUnitary(a[j*lda:j*lda+k], bi) - } - cii := alpha*c64.DotcUnitary(bi, ai) + conjalpha*c64.DotcUnitary(ai, bi) - c[i*ldc+i] = complex(real(cii), 0) - } else { - for j, cij := range ci { - ci[j] = alpha*c64.DotcUnitary(b[j*ldb:j*ldb+k], ai) + conjalpha*c64.DotcUnitary(a[j*lda:j*lda+k], bi) + cbeta*cij - } - cii := alpha*c64.DotcUnitary(bi, ai) + conjalpha*c64.DotcUnitary(ai, bi) + cbeta*c[i*ldc+i] - c[i*ldc+i] = complex(real(cii), 0) - } - } - } - } else { - // Form C = alpha*A^H*B + conj(alpha)*B^H*A + beta*C. - if uplo == blas.Upper { - for i := 0; i < n; i++ { - ci := c[i*ldc+i : i*ldc+n] - switch { - case beta == 0: - for jc := range ci { - ci[jc] = 0 - } - case beta != 1: - c64.SscalUnitary(beta, ci) - ci[0] = complex(real(ci[0]), 0) - default: - ci[0] = complex(real(ci[0]), 0) - } - for j := 0; j < k; j++ { - aji := a[j*lda+i] - bji := b[j*ldb+i] - if aji != 0 { - c64.AxpyUnitary(alpha*cmplx.Conj(aji), b[j*ldb+i:j*ldb+n], ci) - } - if bji != 0 { - c64.AxpyUnitary(conjalpha*cmplx.Conj(bji), a[j*lda+i:j*lda+n], ci) - } - } - ci[0] = complex(real(ci[0]), 0) - } - } else { - for i := 0; i < n; i++ { - ci := c[i*ldc : i*ldc+i+1] - switch { - case beta == 0: - for j := range ci { - ci[j] = 0 - } - case beta != 1: - c64.SscalUnitary(beta, ci) - ci[i] = complex(real(ci[i]), 0) - default: - ci[i] = complex(real(ci[i]), 0) - } - for j := 0; j < k; j++ { - aji := a[j*lda+i] - bji := b[j*ldb+i] - if aji != 0 { - c64.AxpyUnitary(alpha*cmplx.Conj(aji), b[j*ldb:j*ldb+i+1], ci) - } - if bji != 0 { - c64.AxpyUnitary(conjalpha*cmplx.Conj(bji), a[j*lda:j*lda+i+1], ci) - } - } - ci[i] = complex(real(ci[i]), 0) - } - } - } -} - -// Csymm performs one of the matrix-matrix operations -// C = alpha*A*B + beta*C if side == blas.Left -// C = alpha*B*A + beta*C if side == blas.Right -// where alpha and beta are scalars, A is an m×m or n×n symmetric matrix and B -// and C are m×n matrices. -// -// Complex64 implementations are autogenerated and not directly tested. -func (Implementation) Csymm(side blas.Side, uplo blas.Uplo, m, n int, alpha complex64, a []complex64, lda int, b []complex64, ldb int, beta complex64, c []complex64, ldc int) { - na := m - if side == blas.Right { - na = n - } - switch { - case side != blas.Left && side != blas.Right: - panic(badSide) - case uplo != blas.Lower && uplo != blas.Upper: - panic(badUplo) - case m < 0: - panic(mLT0) - case n < 0: - panic(nLT0) - case lda < max(1, na): - panic(badLdA) - case ldb < max(1, n): - panic(badLdB) - case ldc < max(1, n): - panic(badLdC) - } - - // Quick return if possible. - if m == 0 || n == 0 { - return - } - - // For zero matrix size the following slice length checks are trivially satisfied. - if len(a) < lda*(na-1)+na { - panic(shortA) - } - if len(b) < ldb*(m-1)+n { - panic(shortB) - } - if len(c) < ldc*(m-1)+n { - panic(shortC) - } - - // Quick return if possible. - if alpha == 0 && beta == 1 { - return - } - - if alpha == 0 { - if beta == 0 { - for i := 0; i < m; i++ { - ci := c[i*ldc : i*ldc+n] - for j := range ci { - ci[j] = 0 - } - } - } else { - for i := 0; i < m; i++ { - ci := c[i*ldc : i*ldc+n] - c64.ScalUnitary(beta, ci) - } - } - return - } - - if side == blas.Left { - // Form C = alpha*A*B + beta*C. - for i := 0; i < m; i++ { - atmp := alpha * a[i*lda+i] - bi := b[i*ldb : i*ldb+n] - ci := c[i*ldc : i*ldc+n] - if beta == 0 { - for j, bij := range bi { - ci[j] = atmp * bij - } - } else { - for j, bij := range bi { - ci[j] = atmp*bij + beta*ci[j] - } - } - if uplo == blas.Upper { - for k := 0; k < i; k++ { - atmp = alpha * a[k*lda+i] - c64.AxpyUnitary(atmp, b[k*ldb:k*ldb+n], ci) - } - for k := i + 1; k < m; k++ { - atmp = alpha * a[i*lda+k] - c64.AxpyUnitary(atmp, b[k*ldb:k*ldb+n], ci) - } - } else { - for k := 0; k < i; k++ { - atmp = alpha * a[i*lda+k] - c64.AxpyUnitary(atmp, b[k*ldb:k*ldb+n], ci) - } - for k := i + 1; k < m; k++ { - atmp = alpha * a[k*lda+i] - c64.AxpyUnitary(atmp, b[k*ldb:k*ldb+n], ci) - } - } - } - } else { - // Form C = alpha*B*A + beta*C. - if uplo == blas.Upper { - for i := 0; i < m; i++ { - for j := n - 1; j >= 0; j-- { - abij := alpha * b[i*ldb+j] - aj := a[j*lda+j+1 : j*lda+n] - bi := b[i*ldb+j+1 : i*ldb+n] - ci := c[i*ldc+j+1 : i*ldc+n] - var tmp complex64 - for k, ajk := range aj { - ci[k] += abij * ajk - tmp += bi[k] * ajk - } - if beta == 0 { - c[i*ldc+j] = abij*a[j*lda+j] + alpha*tmp - } else { - c[i*ldc+j] = abij*a[j*lda+j] + alpha*tmp + beta*c[i*ldc+j] - } - } - } - } else { - for i := 0; i < m; i++ { - for j := 0; j < n; j++ { - abij := alpha * b[i*ldb+j] - aj := a[j*lda : j*lda+j] - bi := b[i*ldb : i*ldb+j] - ci := c[i*ldc : i*ldc+j] - var tmp complex64 - for k, ajk := range aj { - ci[k] += abij * ajk - tmp += bi[k] * ajk - } - if beta == 0 { - c[i*ldc+j] = abij*a[j*lda+j] + alpha*tmp - } else { - c[i*ldc+j] = abij*a[j*lda+j] + alpha*tmp + beta*c[i*ldc+j] - } - } - } - } - } -} - -// Csyrk performs one of the symmetric rank-k operations -// C = alpha*A*A^T + beta*C if trans == blas.NoTrans -// C = alpha*A^T*A + beta*C if trans == blas.Trans -// where alpha and beta are scalars, C is an n×n symmetric matrix and A is -// an n×k matrix in the first case and a k×n matrix in the second case. -// -// Complex64 implementations are autogenerated and not directly tested. -func (Implementation) Csyrk(uplo blas.Uplo, trans blas.Transpose, n, k int, alpha complex64, a []complex64, lda int, beta complex64, c []complex64, ldc int) { - var rowA, colA int - switch trans { - default: - panic(badTranspose) - case blas.NoTrans: - rowA, colA = n, k - case blas.Trans: - rowA, colA = k, n - } - switch { - case uplo != blas.Lower && uplo != blas.Upper: - panic(badUplo) - case n < 0: - panic(nLT0) - case k < 0: - panic(kLT0) - case lda < max(1, colA): - panic(badLdA) - case ldc < max(1, n): - panic(badLdC) - } - - // Quick return if possible. - if n == 0 { - return - } - - // For zero matrix size the following slice length checks are trivially satisfied. - if len(a) < (rowA-1)*lda+colA { - panic(shortA) - } - if len(c) < (n-1)*ldc+n { - panic(shortC) - } - - // Quick return if possible. - if (alpha == 0 || k == 0) && beta == 1 { - return - } - - if alpha == 0 { - if uplo == blas.Upper { - if beta == 0 { - for i := 0; i < n; i++ { - ci := c[i*ldc+i : i*ldc+n] - for j := range ci { - ci[j] = 0 - } - } - } else { - for i := 0; i < n; i++ { - ci := c[i*ldc+i : i*ldc+n] - c64.ScalUnitary(beta, ci) - } - } - } else { - if beta == 0 { - for i := 0; i < n; i++ { - ci := c[i*ldc : i*ldc+i+1] - for j := range ci { - ci[j] = 0 - } - } - } else { - for i := 0; i < n; i++ { - ci := c[i*ldc : i*ldc+i+1] - c64.ScalUnitary(beta, ci) - } - } - } - return - } - - if trans == blas.NoTrans { - // Form C = alpha*A*A^T + beta*C. - if uplo == blas.Upper { - for i := 0; i < n; i++ { - ci := c[i*ldc+i : i*ldc+n] - ai := a[i*lda : i*lda+k] - for jc, cij := range ci { - j := i + jc - ci[jc] = beta*cij + alpha*c64.DotuUnitary(ai, a[j*lda:j*lda+k]) - } - } - } else { - for i := 0; i < n; i++ { - ci := c[i*ldc : i*ldc+i+1] - ai := a[i*lda : i*lda+k] - for j, cij := range ci { - ci[j] = beta*cij + alpha*c64.DotuUnitary(ai, a[j*lda:j*lda+k]) - } - } - } - } else { - // Form C = alpha*A^T*A + beta*C. - if uplo == blas.Upper { - for i := 0; i < n; i++ { - ci := c[i*ldc+i : i*ldc+n] - switch { - case beta == 0: - for jc := range ci { - ci[jc] = 0 - } - case beta != 1: - for jc := range ci { - ci[jc] *= beta - } - } - for j := 0; j < k; j++ { - aji := a[j*lda+i] - if aji != 0 { - c64.AxpyUnitary(alpha*aji, a[j*lda+i:j*lda+n], ci) - } - } - } - } else { - for i := 0; i < n; i++ { - ci := c[i*ldc : i*ldc+i+1] - switch { - case beta == 0: - for j := range ci { - ci[j] = 0 - } - case beta != 1: - for j := range ci { - ci[j] *= beta - } - } - for j := 0; j < k; j++ { - aji := a[j*lda+i] - if aji != 0 { - c64.AxpyUnitary(alpha*aji, a[j*lda:j*lda+i+1], ci) - } - } - } - } - } -} - -// Csyr2k performs one of the symmetric rank-2k operations -// C = alpha*A*B^T + alpha*B*A^T + beta*C if trans == blas.NoTrans -// C = alpha*A^T*B + alpha*B^T*A + beta*C if trans == blas.Trans -// where alpha and beta are scalars, C is an n×n symmetric matrix and A and B -// are n×k matrices in the first case and k×n matrices in the second case. -// -// Complex64 implementations are autogenerated and not directly tested. -func (Implementation) Csyr2k(uplo blas.Uplo, trans blas.Transpose, n, k int, alpha complex64, a []complex64, lda int, b []complex64, ldb int, beta complex64, c []complex64, ldc int) { - var row, col int - switch trans { - default: - panic(badTranspose) - case blas.NoTrans: - row, col = n, k - case blas.Trans: - row, col = k, n - } - switch { - case uplo != blas.Lower && uplo != blas.Upper: - panic(badUplo) - case n < 0: - panic(nLT0) - case k < 0: - panic(kLT0) - case lda < max(1, col): - panic(badLdA) - case ldb < max(1, col): - panic(badLdB) - case ldc < max(1, n): - panic(badLdC) - } - - // Quick return if possible. - if n == 0 { - return - } - - // For zero matrix size the following slice length checks are trivially satisfied. - if len(a) < (row-1)*lda+col { - panic(shortA) - } - if len(b) < (row-1)*ldb+col { - panic(shortB) - } - if len(c) < (n-1)*ldc+n { - panic(shortC) - } - - // Quick return if possible. - if (alpha == 0 || k == 0) && beta == 1 { - return - } - - if alpha == 0 { - if uplo == blas.Upper { - if beta == 0 { - for i := 0; i < n; i++ { - ci := c[i*ldc+i : i*ldc+n] - for j := range ci { - ci[j] = 0 - } - } - } else { - for i := 0; i < n; i++ { - ci := c[i*ldc+i : i*ldc+n] - c64.ScalUnitary(beta, ci) - } - } - } else { - if beta == 0 { - for i := 0; i < n; i++ { - ci := c[i*ldc : i*ldc+i+1] - for j := range ci { - ci[j] = 0 - } - } - } else { - for i := 0; i < n; i++ { - ci := c[i*ldc : i*ldc+i+1] - c64.ScalUnitary(beta, ci) - } - } - } - return - } - - if trans == blas.NoTrans { - // Form C = alpha*A*B^T + alpha*B*A^T + beta*C. - if uplo == blas.Upper { - for i := 0; i < n; i++ { - ci := c[i*ldc+i : i*ldc+n] - ai := a[i*lda : i*lda+k] - bi := b[i*ldb : i*ldb+k] - if beta == 0 { - for jc := range ci { - j := i + jc - ci[jc] = alpha*c64.DotuUnitary(ai, b[j*ldb:j*ldb+k]) + alpha*c64.DotuUnitary(bi, a[j*lda:j*lda+k]) - } - } else { - for jc, cij := range ci { - j := i + jc - ci[jc] = alpha*c64.DotuUnitary(ai, b[j*ldb:j*ldb+k]) + alpha*c64.DotuUnitary(bi, a[j*lda:j*lda+k]) + beta*cij - } - } - } - } else { - for i := 0; i < n; i++ { - ci := c[i*ldc : i*ldc+i+1] - ai := a[i*lda : i*lda+k] - bi := b[i*ldb : i*ldb+k] - if beta == 0 { - for j := range ci { - ci[j] = alpha*c64.DotuUnitary(ai, b[j*ldb:j*ldb+k]) + alpha*c64.DotuUnitary(bi, a[j*lda:j*lda+k]) - } - } else { - for j, cij := range ci { - ci[j] = alpha*c64.DotuUnitary(ai, b[j*ldb:j*ldb+k]) + alpha*c64.DotuUnitary(bi, a[j*lda:j*lda+k]) + beta*cij - } - } - } - } - } else { - // Form C = alpha*A^T*B + alpha*B^T*A + beta*C. - if uplo == blas.Upper { - for i := 0; i < n; i++ { - ci := c[i*ldc+i : i*ldc+n] - switch { - case beta == 0: - for jc := range ci { - ci[jc] = 0 - } - case beta != 1: - for jc := range ci { - ci[jc] *= beta - } - } - for j := 0; j < k; j++ { - aji := a[j*lda+i] - bji := b[j*ldb+i] - if aji != 0 { - c64.AxpyUnitary(alpha*aji, b[j*ldb+i:j*ldb+n], ci) - } - if bji != 0 { - c64.AxpyUnitary(alpha*bji, a[j*lda+i:j*lda+n], ci) - } - } - } - } else { - for i := 0; i < n; i++ { - ci := c[i*ldc : i*ldc+i+1] - switch { - case beta == 0: - for j := range ci { - ci[j] = 0 - } - case beta != 1: - for j := range ci { - ci[j] *= beta - } - } - for j := 0; j < k; j++ { - aji := a[j*lda+i] - bji := b[j*ldb+i] - if aji != 0 { - c64.AxpyUnitary(alpha*aji, b[j*ldb:j*ldb+i+1], ci) - } - if bji != 0 { - c64.AxpyUnitary(alpha*bji, a[j*lda:j*lda+i+1], ci) - } - } - } - } - } -} - -// Ctrmm performs one of the matrix-matrix operations -// B = alpha * op(A) * B if side == blas.Left, -// B = alpha * B * op(A) if side == blas.Right, -// where alpha is a scalar, B is an m×n matrix, A is a unit, or non-unit, -// upper or lower triangular matrix and op(A) is one of -// op(A) = A if trans == blas.NoTrans, -// op(A) = A^T if trans == blas.Trans, -// op(A) = A^H if trans == blas.ConjTrans. -// -// Complex64 implementations are autogenerated and not directly tested. -func (Implementation) Ctrmm(side blas.Side, uplo blas.Uplo, trans blas.Transpose, diag blas.Diag, m, n int, alpha complex64, a []complex64, lda int, b []complex64, ldb int) { - na := m - if side == blas.Right { - na = n - } - switch { - case side != blas.Left && side != blas.Right: - panic(badSide) - case uplo != blas.Lower && uplo != blas.Upper: - panic(badUplo) - case trans != blas.NoTrans && trans != blas.Trans && trans != blas.ConjTrans: - panic(badTranspose) - case diag != blas.Unit && diag != blas.NonUnit: - panic(badDiag) - case m < 0: - panic(mLT0) - case n < 0: - panic(nLT0) - case lda < max(1, na): - panic(badLdA) - case ldb < max(1, n): - panic(badLdB) - } - - // Quick return if possible. - if m == 0 || n == 0 { - return - } - - // For zero matrix size the following slice length checks are trivially satisfied. - if len(a) < (na-1)*lda+na { - panic(shortA) - } - if len(b) < (m-1)*ldb+n { - panic(shortB) - } - - // Quick return if possible. - if alpha == 0 { - for i := 0; i < m; i++ { - bi := b[i*ldb : i*ldb+n] - for j := range bi { - bi[j] = 0 - } - } - return - } - - noConj := trans != blas.ConjTrans - noUnit := diag == blas.NonUnit - if side == blas.Left { - if trans == blas.NoTrans { - // Form B = alpha*A*B. - if uplo == blas.Upper { - for i := 0; i < m; i++ { - aii := alpha - if noUnit { - aii *= a[i*lda+i] - } - bi := b[i*ldb : i*ldb+n] - for j := range bi { - bi[j] *= aii - } - for ja, aij := range a[i*lda+i+1 : i*lda+m] { - j := ja + i + 1 - if aij != 0 { - c64.AxpyUnitary(alpha*aij, b[j*ldb:j*ldb+n], bi) - } - } - } - } else { - for i := m - 1; i >= 0; i-- { - aii := alpha - if noUnit { - aii *= a[i*lda+i] - } - bi := b[i*ldb : i*ldb+n] - for j := range bi { - bi[j] *= aii - } - for j, aij := range a[i*lda : i*lda+i] { - if aij != 0 { - c64.AxpyUnitary(alpha*aij, b[j*ldb:j*ldb+n], bi) - } - } - } - } - } else { - // Form B = alpha*A^T*B or B = alpha*A^H*B. - if uplo == blas.Upper { - for k := m - 1; k >= 0; k-- { - bk := b[k*ldb : k*ldb+n] - for ja, ajk := range a[k*lda+k+1 : k*lda+m] { - if ajk == 0 { - continue - } - j := k + 1 + ja - if noConj { - c64.AxpyUnitary(alpha*ajk, bk, b[j*ldb:j*ldb+n]) - } else { - c64.AxpyUnitary(alpha*cmplx.Conj(ajk), bk, b[j*ldb:j*ldb+n]) - } - } - akk := alpha - if noUnit { - if noConj { - akk *= a[k*lda+k] - } else { - akk *= cmplx.Conj(a[k*lda+k]) - } - } - if akk != 1 { - c64.ScalUnitary(akk, bk) - } - } - } else { - for k := 0; k < m; k++ { - bk := b[k*ldb : k*ldb+n] - for j, ajk := range a[k*lda : k*lda+k] { - if ajk == 0 { - continue - } - if noConj { - c64.AxpyUnitary(alpha*ajk, bk, b[j*ldb:j*ldb+n]) - } else { - c64.AxpyUnitary(alpha*cmplx.Conj(ajk), bk, b[j*ldb:j*ldb+n]) - } - } - akk := alpha - if noUnit { - if noConj { - akk *= a[k*lda+k] - } else { - akk *= cmplx.Conj(a[k*lda+k]) - } - } - if akk != 1 { - c64.ScalUnitary(akk, bk) - } - } - } - } - } else { - if trans == blas.NoTrans { - // Form B = alpha*B*A. - if uplo == blas.Upper { - for i := 0; i < m; i++ { - bi := b[i*ldb : i*ldb+n] - for k := n - 1; k >= 0; k-- { - abik := alpha * bi[k] - if abik == 0 { - continue - } - bi[k] = abik - if noUnit { - bi[k] *= a[k*lda+k] - } - c64.AxpyUnitary(abik, a[k*lda+k+1:k*lda+n], bi[k+1:]) - } - } - } else { - for i := 0; i < m; i++ { - bi := b[i*ldb : i*ldb+n] - for k := 0; k < n; k++ { - abik := alpha * bi[k] - if abik == 0 { - continue - } - bi[k] = abik - if noUnit { - bi[k] *= a[k*lda+k] - } - c64.AxpyUnitary(abik, a[k*lda:k*lda+k], bi[:k]) - } - } - } - } else { - // Form B = alpha*B*A^T or B = alpha*B*A^H. - if uplo == blas.Upper { - for i := 0; i < m; i++ { - bi := b[i*ldb : i*ldb+n] - for j, bij := range bi { - if noConj { - if noUnit { - bij *= a[j*lda+j] - } - bij += c64.DotuUnitary(a[j*lda+j+1:j*lda+n], bi[j+1:n]) - } else { - if noUnit { - bij *= cmplx.Conj(a[j*lda+j]) - } - bij += c64.DotcUnitary(a[j*lda+j+1:j*lda+n], bi[j+1:n]) - } - bi[j] = alpha * bij - } - } - } else { - for i := 0; i < m; i++ { - bi := b[i*ldb : i*ldb+n] - for j := n - 1; j >= 0; j-- { - bij := bi[j] - if noConj { - if noUnit { - bij *= a[j*lda+j] - } - bij += c64.DotuUnitary(a[j*lda:j*lda+j], bi[:j]) - } else { - if noUnit { - bij *= cmplx.Conj(a[j*lda+j]) - } - bij += c64.DotcUnitary(a[j*lda:j*lda+j], bi[:j]) - } - bi[j] = alpha * bij - } - } - } - } - } -} - -// Ctrsm solves one of the matrix equations -// op(A) * X = alpha * B if side == blas.Left, -// X * op(A) = alpha * B if side == blas.Right, -// where alpha is a scalar, X and B are m×n matrices, A is a unit or -// non-unit, upper or lower triangular matrix and op(A) is one of -// op(A) = A if transA == blas.NoTrans, -// op(A) = A^T if transA == blas.Trans, -// op(A) = A^H if transA == blas.ConjTrans. -// On return the matrix X is overwritten on B. -// -// Complex64 implementations are autogenerated and not directly tested. -func (Implementation) Ctrsm(side blas.Side, uplo blas.Uplo, transA blas.Transpose, diag blas.Diag, m, n int, alpha complex64, a []complex64, lda int, b []complex64, ldb int) { - na := m - if side == blas.Right { - na = n - } - switch { - case side != blas.Left && side != blas.Right: - panic(badSide) - case uplo != blas.Lower && uplo != blas.Upper: - panic(badUplo) - case transA != blas.NoTrans && transA != blas.Trans && transA != blas.ConjTrans: - panic(badTranspose) - case diag != blas.Unit && diag != blas.NonUnit: - panic(badDiag) - case m < 0: - panic(mLT0) - case n < 0: - panic(nLT0) - case lda < max(1, na): - panic(badLdA) - case ldb < max(1, n): - panic(badLdB) - } - - // Quick return if possible. - if m == 0 || n == 0 { - return - } - - // For zero matrix size the following slice length checks are trivially satisfied. - if len(a) < (na-1)*lda+na { - panic(shortA) - } - if len(b) < (m-1)*ldb+n { - panic(shortB) - } - - if alpha == 0 { - for i := 0; i < m; i++ { - for j := 0; j < n; j++ { - b[i*ldb+j] = 0 - } - } - return - } - - noConj := transA != blas.ConjTrans - noUnit := diag == blas.NonUnit - if side == blas.Left { - if transA == blas.NoTrans { - // Form B = alpha*inv(A)*B. - if uplo == blas.Upper { - for i := m - 1; i >= 0; i-- { - bi := b[i*ldb : i*ldb+n] - if alpha != 1 { - c64.ScalUnitary(alpha, bi) - } - for ka, aik := range a[i*lda+i+1 : i*lda+m] { - k := i + 1 + ka - if aik != 0 { - c64.AxpyUnitary(-aik, b[k*ldb:k*ldb+n], bi) - } - } - if noUnit { - c64.ScalUnitary(1/a[i*lda+i], bi) - } - } - } else { - for i := 0; i < m; i++ { - bi := b[i*ldb : i*ldb+n] - if alpha != 1 { - c64.ScalUnitary(alpha, bi) - } - for j, aij := range a[i*lda : i*lda+i] { - if aij != 0 { - c64.AxpyUnitary(-aij, b[j*ldb:j*ldb+n], bi) - } - } - if noUnit { - c64.ScalUnitary(1/a[i*lda+i], bi) - } - } - } - } else { - // Form B = alpha*inv(A^T)*B or B = alpha*inv(A^H)*B. - if uplo == blas.Upper { - for i := 0; i < m; i++ { - bi := b[i*ldb : i*ldb+n] - if noUnit { - if noConj { - c64.ScalUnitary(1/a[i*lda+i], bi) - } else { - c64.ScalUnitary(1/cmplx.Conj(a[i*lda+i]), bi) - } - } - for ja, aij := range a[i*lda+i+1 : i*lda+m] { - if aij == 0 { - continue - } - j := i + 1 + ja - if noConj { - c64.AxpyUnitary(-aij, bi, b[j*ldb:j*ldb+n]) - } else { - c64.AxpyUnitary(-cmplx.Conj(aij), bi, b[j*ldb:j*ldb+n]) - } - } - if alpha != 1 { - c64.ScalUnitary(alpha, bi) - } - } - } else { - for i := m - 1; i >= 0; i-- { - bi := b[i*ldb : i*ldb+n] - if noUnit { - if noConj { - c64.ScalUnitary(1/a[i*lda+i], bi) - } else { - c64.ScalUnitary(1/cmplx.Conj(a[i*lda+i]), bi) - } - } - for j, aij := range a[i*lda : i*lda+i] { - if aij == 0 { - continue - } - if noConj { - c64.AxpyUnitary(-aij, bi, b[j*ldb:j*ldb+n]) - } else { - c64.AxpyUnitary(-cmplx.Conj(aij), bi, b[j*ldb:j*ldb+n]) - } - } - if alpha != 1 { - c64.ScalUnitary(alpha, bi) - } - } - } - } - } else { - if transA == blas.NoTrans { - // Form B = alpha*B*inv(A). - if uplo == blas.Upper { - for i := 0; i < m; i++ { - bi := b[i*ldb : i*ldb+n] - if alpha != 1 { - c64.ScalUnitary(alpha, bi) - } - for j, bij := range bi { - if bij == 0 { - continue - } - if noUnit { - bi[j] /= a[j*lda+j] - } - c64.AxpyUnitary(-bi[j], a[j*lda+j+1:j*lda+n], bi[j+1:n]) - } - } - } else { - for i := 0; i < m; i++ { - bi := b[i*ldb : i*ldb+n] - if alpha != 1 { - c64.ScalUnitary(alpha, bi) - } - for j := n - 1; j >= 0; j-- { - if bi[j] == 0 { - continue - } - if noUnit { - bi[j] /= a[j*lda+j] - } - c64.AxpyUnitary(-bi[j], a[j*lda:j*lda+j], bi[:j]) - } - } - } - } else { - // Form B = alpha*B*inv(A^T) or B = alpha*B*inv(A^H). - if uplo == blas.Upper { - for i := 0; i < m; i++ { - bi := b[i*ldb : i*ldb+n] - for j := n - 1; j >= 0; j-- { - bij := alpha * bi[j] - if noConj { - bij -= c64.DotuUnitary(a[j*lda+j+1:j*lda+n], bi[j+1:n]) - if noUnit { - bij /= a[j*lda+j] - } - } else { - bij -= c64.DotcUnitary(a[j*lda+j+1:j*lda+n], bi[j+1:n]) - if noUnit { - bij /= cmplx.Conj(a[j*lda+j]) - } - } - bi[j] = bij - } - } - } else { - for i := 0; i < m; i++ { - bi := b[i*ldb : i*ldb+n] - for j, bij := range bi { - bij *= alpha - if noConj { - bij -= c64.DotuUnitary(a[j*lda:j*lda+j], bi[:j]) - if noUnit { - bij /= a[j*lda+j] - } - } else { - bij -= c64.DotcUnitary(a[j*lda:j*lda+j], bi[:j]) - if noUnit { - bij /= cmplx.Conj(a[j*lda+j]) - } - } - bi[j] = bij - } - } - } - } - } -} diff --git a/vendor/gonum.org/v1/gonum/blas/gonum/level3float32.go b/vendor/gonum.org/v1/gonum/blas/gonum/level3float32.go deleted file mode 100644 index 13c4a792e9..0000000000 --- a/vendor/gonum.org/v1/gonum/blas/gonum/level3float32.go +++ /dev/null @@ -1,876 +0,0 @@ -// Code generated by "go generate gonum.org/v1/gonum/blas/gonum”; DO NOT EDIT. - -// Copyright ©2014 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import ( - "gonum.org/v1/gonum/blas" - "gonum.org/v1/gonum/internal/asm/f32" -) - -var _ blas.Float32Level3 = Implementation{} - -// Strsm solves one of the matrix equations -// A * X = alpha * B if tA == blas.NoTrans and side == blas.Left -// A^T * X = alpha * B if tA == blas.Trans or blas.ConjTrans, and side == blas.Left -// X * A = alpha * B if tA == blas.NoTrans and side == blas.Right -// X * A^T = alpha * B if tA == blas.Trans or blas.ConjTrans, and side == blas.Right -// where A is an n×n or m×m triangular matrix, X and B are m×n matrices, and alpha is a -// scalar. -// -// At entry to the function, X contains the values of B, and the result is -// stored in-place into X. -// -// No check is made that A is invertible. -// -// Float32 implementations are autogenerated and not directly tested. -func (Implementation) Strsm(s blas.Side, ul blas.Uplo, tA blas.Transpose, d blas.Diag, m, n int, alpha float32, a []float32, lda int, b []float32, ldb int) { - if s != blas.Left && s != blas.Right { - panic(badSide) - } - if ul != blas.Lower && ul != blas.Upper { - panic(badUplo) - } - if tA != blas.NoTrans && tA != blas.Trans && tA != blas.ConjTrans { - panic(badTranspose) - } - if d != blas.NonUnit && d != blas.Unit { - panic(badDiag) - } - if m < 0 { - panic(mLT0) - } - if n < 0 { - panic(nLT0) - } - k := n - if s == blas.Left { - k = m - } - if lda < max(1, k) { - panic(badLdA) - } - if ldb < max(1, n) { - panic(badLdB) - } - - // Quick return if possible. - if m == 0 || n == 0 { - return - } - - // For zero matrix size the following slice length checks are trivially satisfied. - if len(a) < lda*(k-1)+k { - panic(shortA) - } - if len(b) < ldb*(m-1)+n { - panic(shortB) - } - - if alpha == 0 { - for i := 0; i < m; i++ { - btmp := b[i*ldb : i*ldb+n] - for j := range btmp { - btmp[j] = 0 - } - } - return - } - nonUnit := d == blas.NonUnit - if s == blas.Left { - if tA == blas.NoTrans { - if ul == blas.Upper { - for i := m - 1; i >= 0; i-- { - btmp := b[i*ldb : i*ldb+n] - if alpha != 1 { - f32.ScalUnitary(alpha, btmp) - } - for ka, va := range a[i*lda+i+1 : i*lda+m] { - if va != 0 { - k := ka + i + 1 - f32.AxpyUnitary(-va, b[k*ldb:k*ldb+n], btmp) - } - } - if nonUnit { - tmp := 1 / a[i*lda+i] - f32.ScalUnitary(tmp, btmp) - } - } - return - } - for i := 0; i < m; i++ { - btmp := b[i*ldb : i*ldb+n] - if alpha != 1 { - f32.ScalUnitary(alpha, btmp) - } - for k, va := range a[i*lda : i*lda+i] { - if va != 0 { - f32.AxpyUnitary(-va, b[k*ldb:k*ldb+n], btmp) - } - } - if nonUnit { - tmp := 1 / a[i*lda+i] - f32.ScalUnitary(tmp, btmp) - } - } - return - } - // Cases where a is transposed - if ul == blas.Upper { - for k := 0; k < m; k++ { - btmpk := b[k*ldb : k*ldb+n] - if nonUnit { - tmp := 1 / a[k*lda+k] - f32.ScalUnitary(tmp, btmpk) - } - for ia, va := range a[k*lda+k+1 : k*lda+m] { - if va != 0 { - i := ia + k + 1 - f32.AxpyUnitary(-va, btmpk, b[i*ldb:i*ldb+n]) - } - } - if alpha != 1 { - f32.ScalUnitary(alpha, btmpk) - } - } - return - } - for k := m - 1; k >= 0; k-- { - btmpk := b[k*ldb : k*ldb+n] - if nonUnit { - tmp := 1 / a[k*lda+k] - f32.ScalUnitary(tmp, btmpk) - } - for i, va := range a[k*lda : k*lda+k] { - if va != 0 { - f32.AxpyUnitary(-va, btmpk, b[i*ldb:i*ldb+n]) - } - } - if alpha != 1 { - f32.ScalUnitary(alpha, btmpk) - } - } - return - } - // Cases where a is to the right of X. - if tA == blas.NoTrans { - if ul == blas.Upper { - for i := 0; i < m; i++ { - btmp := b[i*ldb : i*ldb+n] - if alpha != 1 { - f32.ScalUnitary(alpha, btmp) - } - for k, vb := range btmp { - if vb == 0 { - continue - } - if nonUnit { - btmp[k] /= a[k*lda+k] - } - f32.AxpyUnitary(-btmp[k], a[k*lda+k+1:k*lda+n], btmp[k+1:n]) - } - } - return - } - for i := 0; i < m; i++ { - btmp := b[i*ldb : i*ldb+n] - if alpha != 1 { - f32.ScalUnitary(alpha, btmp) - } - for k := n - 1; k >= 0; k-- { - if btmp[k] == 0 { - continue - } - if nonUnit { - btmp[k] /= a[k*lda+k] - } - f32.AxpyUnitary(-btmp[k], a[k*lda:k*lda+k], btmp[:k]) - } - } - return - } - // Cases where a is transposed. - if ul == blas.Upper { - for i := 0; i < m; i++ { - btmp := b[i*ldb : i*ldb+n] - for j := n - 1; j >= 0; j-- { - tmp := alpha*btmp[j] - f32.DotUnitary(a[j*lda+j+1:j*lda+n], btmp[j+1:]) - if nonUnit { - tmp /= a[j*lda+j] - } - btmp[j] = tmp - } - } - return - } - for i := 0; i < m; i++ { - btmp := b[i*ldb : i*ldb+n] - for j := 0; j < n; j++ { - tmp := alpha*btmp[j] - f32.DotUnitary(a[j*lda:j*lda+j], btmp[:j]) - if nonUnit { - tmp /= a[j*lda+j] - } - btmp[j] = tmp - } - } -} - -// Ssymm performs one of the matrix-matrix operations -// C = alpha * A * B + beta * C if side == blas.Left -// C = alpha * B * A + beta * C if side == blas.Right -// where A is an n×n or m×m symmetric matrix, B and C are m×n matrices, and alpha -// is a scalar. -// -// Float32 implementations are autogenerated and not directly tested. -func (Implementation) Ssymm(s blas.Side, ul blas.Uplo, m, n int, alpha float32, a []float32, lda int, b []float32, ldb int, beta float32, c []float32, ldc int) { - if s != blas.Right && s != blas.Left { - panic(badSide) - } - if ul != blas.Lower && ul != blas.Upper { - panic(badUplo) - } - if m < 0 { - panic(mLT0) - } - if n < 0 { - panic(nLT0) - } - k := n - if s == blas.Left { - k = m - } - if lda < max(1, k) { - panic(badLdA) - } - if ldb < max(1, n) { - panic(badLdB) - } - if ldc < max(1, n) { - panic(badLdC) - } - - // Quick return if possible. - if m == 0 || n == 0 { - return - } - - // For zero matrix size the following slice length checks are trivially satisfied. - if len(a) < lda*(k-1)+k { - panic(shortA) - } - if len(b) < ldb*(m-1)+n { - panic(shortB) - } - if len(c) < ldc*(m-1)+n { - panic(shortC) - } - - // Quick return if possible. - if alpha == 0 && beta == 1 { - return - } - - if alpha == 0 { - if beta == 0 { - for i := 0; i < m; i++ { - ctmp := c[i*ldc : i*ldc+n] - for j := range ctmp { - ctmp[j] = 0 - } - } - return - } - for i := 0; i < m; i++ { - ctmp := c[i*ldc : i*ldc+n] - for j := 0; j < n; j++ { - ctmp[j] *= beta - } - } - return - } - - isUpper := ul == blas.Upper - if s == blas.Left { - for i := 0; i < m; i++ { - atmp := alpha * a[i*lda+i] - btmp := b[i*ldb : i*ldb+n] - ctmp := c[i*ldc : i*ldc+n] - for j, v := range btmp { - ctmp[j] *= beta - ctmp[j] += atmp * v - } - - for k := 0; k < i; k++ { - var atmp float32 - if isUpper { - atmp = a[k*lda+i] - } else { - atmp = a[i*lda+k] - } - atmp *= alpha - f32.AxpyUnitary(atmp, b[k*ldb:k*ldb+n], ctmp) - } - for k := i + 1; k < m; k++ { - var atmp float32 - if isUpper { - atmp = a[i*lda+k] - } else { - atmp = a[k*lda+i] - } - atmp *= alpha - f32.AxpyUnitary(atmp, b[k*ldb:k*ldb+n], ctmp) - } - } - return - } - if isUpper { - for i := 0; i < m; i++ { - for j := n - 1; j >= 0; j-- { - tmp := alpha * b[i*ldb+j] - var tmp2 float32 - atmp := a[j*lda+j+1 : j*lda+n] - btmp := b[i*ldb+j+1 : i*ldb+n] - ctmp := c[i*ldc+j+1 : i*ldc+n] - for k, v := range atmp { - ctmp[k] += tmp * v - tmp2 += btmp[k] * v - } - c[i*ldc+j] *= beta - c[i*ldc+j] += tmp*a[j*lda+j] + alpha*tmp2 - } - } - return - } - for i := 0; i < m; i++ { - for j := 0; j < n; j++ { - tmp := alpha * b[i*ldb+j] - var tmp2 float32 - atmp := a[j*lda : j*lda+j] - btmp := b[i*ldb : i*ldb+j] - ctmp := c[i*ldc : i*ldc+j] - for k, v := range atmp { - ctmp[k] += tmp * v - tmp2 += btmp[k] * v - } - c[i*ldc+j] *= beta - c[i*ldc+j] += tmp*a[j*lda+j] + alpha*tmp2 - } - } -} - -// Ssyrk performs one of the symmetric rank-k operations -// C = alpha * A * A^T + beta * C if tA == blas.NoTrans -// C = alpha * A^T * A + beta * C if tA == blas.Trans or tA == blas.ConjTrans -// where A is an n×k or k×n matrix, C is an n×n symmetric matrix, and alpha and -// beta are scalars. -// -// Float32 implementations are autogenerated and not directly tested. -func (Implementation) Ssyrk(ul blas.Uplo, tA blas.Transpose, n, k int, alpha float32, a []float32, lda int, beta float32, c []float32, ldc int) { - if ul != blas.Lower && ul != blas.Upper { - panic(badUplo) - } - if tA != blas.Trans && tA != blas.NoTrans && tA != blas.ConjTrans { - panic(badTranspose) - } - if n < 0 { - panic(nLT0) - } - if k < 0 { - panic(kLT0) - } - row, col := k, n - if tA == blas.NoTrans { - row, col = n, k - } - if lda < max(1, col) { - panic(badLdA) - } - if ldc < max(1, n) { - panic(badLdC) - } - - // Quick return if possible. - if n == 0 { - return - } - - // For zero matrix size the following slice length checks are trivially satisfied. - if len(a) < lda*(row-1)+col { - panic(shortA) - } - if len(c) < ldc*(n-1)+n { - panic(shortC) - } - - if alpha == 0 { - if beta == 0 { - if ul == blas.Upper { - for i := 0; i < n; i++ { - ctmp := c[i*ldc+i : i*ldc+n] - for j := range ctmp { - ctmp[j] = 0 - } - } - return - } - for i := 0; i < n; i++ { - ctmp := c[i*ldc : i*ldc+i+1] - for j := range ctmp { - ctmp[j] = 0 - } - } - return - } - if ul == blas.Upper { - for i := 0; i < n; i++ { - ctmp := c[i*ldc+i : i*ldc+n] - for j := range ctmp { - ctmp[j] *= beta - } - } - return - } - for i := 0; i < n; i++ { - ctmp := c[i*ldc : i*ldc+i+1] - for j := range ctmp { - ctmp[j] *= beta - } - } - return - } - if tA == blas.NoTrans { - if ul == blas.Upper { - for i := 0; i < n; i++ { - ctmp := c[i*ldc+i : i*ldc+n] - atmp := a[i*lda : i*lda+k] - if beta == 0 { - for jc := range ctmp { - j := jc + i - ctmp[jc] = alpha * f32.DotUnitary(atmp, a[j*lda:j*lda+k]) - } - } else { - for jc, vc := range ctmp { - j := jc + i - ctmp[jc] = vc*beta + alpha*f32.DotUnitary(atmp, a[j*lda:j*lda+k]) - } - } - } - return - } - for i := 0; i < n; i++ { - ctmp := c[i*ldc : i*ldc+i+1] - atmp := a[i*lda : i*lda+k] - if beta == 0 { - for j := range ctmp { - ctmp[j] = alpha * f32.DotUnitary(a[j*lda:j*lda+k], atmp) - } - } else { - for j, vc := range ctmp { - ctmp[j] = vc*beta + alpha*f32.DotUnitary(a[j*lda:j*lda+k], atmp) - } - } - } - return - } - // Cases where a is transposed. - if ul == blas.Upper { - for i := 0; i < n; i++ { - ctmp := c[i*ldc+i : i*ldc+n] - if beta == 0 { - for j := range ctmp { - ctmp[j] = 0 - } - } else if beta != 1 { - for j := range ctmp { - ctmp[j] *= beta - } - } - for l := 0; l < k; l++ { - tmp := alpha * a[l*lda+i] - if tmp != 0 { - f32.AxpyUnitary(tmp, a[l*lda+i:l*lda+n], ctmp) - } - } - } - return - } - for i := 0; i < n; i++ { - ctmp := c[i*ldc : i*ldc+i+1] - if beta != 1 { - for j := range ctmp { - ctmp[j] *= beta - } - } - for l := 0; l < k; l++ { - tmp := alpha * a[l*lda+i] - if tmp != 0 { - f32.AxpyUnitary(tmp, a[l*lda:l*lda+i+1], ctmp) - } - } - } -} - -// Ssyr2k performs one of the symmetric rank 2k operations -// C = alpha * A * B^T + alpha * B * A^T + beta * C if tA == blas.NoTrans -// C = alpha * A^T * B + alpha * B^T * A + beta * C if tA == blas.Trans or tA == blas.ConjTrans -// where A and B are n×k or k×n matrices, C is an n×n symmetric matrix, and -// alpha and beta are scalars. -// -// Float32 implementations are autogenerated and not directly tested. -func (Implementation) Ssyr2k(ul blas.Uplo, tA blas.Transpose, n, k int, alpha float32, a []float32, lda int, b []float32, ldb int, beta float32, c []float32, ldc int) { - if ul != blas.Lower && ul != blas.Upper { - panic(badUplo) - } - if tA != blas.Trans && tA != blas.NoTrans && tA != blas.ConjTrans { - panic(badTranspose) - } - if n < 0 { - panic(nLT0) - } - if k < 0 { - panic(kLT0) - } - row, col := k, n - if tA == blas.NoTrans { - row, col = n, k - } - if lda < max(1, col) { - panic(badLdA) - } - if ldb < max(1, col) { - panic(badLdB) - } - if ldc < max(1, n) { - panic(badLdC) - } - - // Quick return if possible. - if n == 0 { - return - } - - // For zero matrix size the following slice length checks are trivially satisfied. - if len(a) < lda*(row-1)+col { - panic(shortA) - } - if len(b) < ldb*(row-1)+col { - panic(shortB) - } - if len(c) < ldc*(n-1)+n { - panic(shortC) - } - - if alpha == 0 { - if beta == 0 { - if ul == blas.Upper { - for i := 0; i < n; i++ { - ctmp := c[i*ldc+i : i*ldc+n] - for j := range ctmp { - ctmp[j] = 0 - } - } - return - } - for i := 0; i < n; i++ { - ctmp := c[i*ldc : i*ldc+i+1] - for j := range ctmp { - ctmp[j] = 0 - } - } - return - } - if ul == blas.Upper { - for i := 0; i < n; i++ { - ctmp := c[i*ldc+i : i*ldc+n] - for j := range ctmp { - ctmp[j] *= beta - } - } - return - } - for i := 0; i < n; i++ { - ctmp := c[i*ldc : i*ldc+i+1] - for j := range ctmp { - ctmp[j] *= beta - } - } - return - } - if tA == blas.NoTrans { - if ul == blas.Upper { - for i := 0; i < n; i++ { - atmp := a[i*lda : i*lda+k] - btmp := b[i*ldb : i*ldb+k] - ctmp := c[i*ldc+i : i*ldc+n] - for jc := range ctmp { - j := i + jc - var tmp1, tmp2 float32 - binner := b[j*ldb : j*ldb+k] - for l, v := range a[j*lda : j*lda+k] { - tmp1 += v * btmp[l] - tmp2 += atmp[l] * binner[l] - } - ctmp[jc] *= beta - ctmp[jc] += alpha * (tmp1 + tmp2) - } - } - return - } - for i := 0; i < n; i++ { - atmp := a[i*lda : i*lda+k] - btmp := b[i*ldb : i*ldb+k] - ctmp := c[i*ldc : i*ldc+i+1] - for j := 0; j <= i; j++ { - var tmp1, tmp2 float32 - binner := b[j*ldb : j*ldb+k] - for l, v := range a[j*lda : j*lda+k] { - tmp1 += v * btmp[l] - tmp2 += atmp[l] * binner[l] - } - ctmp[j] *= beta - ctmp[j] += alpha * (tmp1 + tmp2) - } - } - return - } - if ul == blas.Upper { - for i := 0; i < n; i++ { - ctmp := c[i*ldc+i : i*ldc+n] - if beta != 1 { - for j := range ctmp { - ctmp[j] *= beta - } - } - for l := 0; l < k; l++ { - tmp1 := alpha * b[l*ldb+i] - tmp2 := alpha * a[l*lda+i] - btmp := b[l*ldb+i : l*ldb+n] - if tmp1 != 0 || tmp2 != 0 { - for j, v := range a[l*lda+i : l*lda+n] { - ctmp[j] += v*tmp1 + btmp[j]*tmp2 - } - } - } - } - return - } - for i := 0; i < n; i++ { - ctmp := c[i*ldc : i*ldc+i+1] - if beta != 1 { - for j := range ctmp { - ctmp[j] *= beta - } - } - for l := 0; l < k; l++ { - tmp1 := alpha * b[l*ldb+i] - tmp2 := alpha * a[l*lda+i] - btmp := b[l*ldb : l*ldb+i+1] - if tmp1 != 0 || tmp2 != 0 { - for j, v := range a[l*lda : l*lda+i+1] { - ctmp[j] += v*tmp1 + btmp[j]*tmp2 - } - } - } - } -} - -// Strmm performs one of the matrix-matrix operations -// B = alpha * A * B if tA == blas.NoTrans and side == blas.Left -// B = alpha * A^T * B if tA == blas.Trans or blas.ConjTrans, and side == blas.Left -// B = alpha * B * A if tA == blas.NoTrans and side == blas.Right -// B = alpha * B * A^T if tA == blas.Trans or blas.ConjTrans, and side == blas.Right -// where A is an n×n or m×m triangular matrix, B is an m×n matrix, and alpha is a scalar. -// -// Float32 implementations are autogenerated and not directly tested. -func (Implementation) Strmm(s blas.Side, ul blas.Uplo, tA blas.Transpose, d blas.Diag, m, n int, alpha float32, a []float32, lda int, b []float32, ldb int) { - if s != blas.Left && s != blas.Right { - panic(badSide) - } - if ul != blas.Lower && ul != blas.Upper { - panic(badUplo) - } - if tA != blas.NoTrans && tA != blas.Trans && tA != blas.ConjTrans { - panic(badTranspose) - } - if d != blas.NonUnit && d != blas.Unit { - panic(badDiag) - } - if m < 0 { - panic(mLT0) - } - if n < 0 { - panic(nLT0) - } - k := n - if s == blas.Left { - k = m - } - if lda < max(1, k) { - panic(badLdA) - } - if ldb < max(1, n) { - panic(badLdB) - } - - // Quick return if possible. - if m == 0 || n == 0 { - return - } - - // For zero matrix size the following slice length checks are trivially satisfied. - if len(a) < lda*(k-1)+k { - panic(shortA) - } - if len(b) < ldb*(m-1)+n { - panic(shortB) - } - - if alpha == 0 { - for i := 0; i < m; i++ { - btmp := b[i*ldb : i*ldb+n] - for j := range btmp { - btmp[j] = 0 - } - } - return - } - - nonUnit := d == blas.NonUnit - if s == blas.Left { - if tA == blas.NoTrans { - if ul == blas.Upper { - for i := 0; i < m; i++ { - tmp := alpha - if nonUnit { - tmp *= a[i*lda+i] - } - btmp := b[i*ldb : i*ldb+n] - f32.ScalUnitary(tmp, btmp) - for ka, va := range a[i*lda+i+1 : i*lda+m] { - k := ka + i + 1 - if va != 0 { - f32.AxpyUnitary(alpha*va, b[k*ldb:k*ldb+n], btmp) - } - } - } - return - } - for i := m - 1; i >= 0; i-- { - tmp := alpha - if nonUnit { - tmp *= a[i*lda+i] - } - btmp := b[i*ldb : i*ldb+n] - f32.ScalUnitary(tmp, btmp) - for k, va := range a[i*lda : i*lda+i] { - if va != 0 { - f32.AxpyUnitary(alpha*va, b[k*ldb:k*ldb+n], btmp) - } - } - } - return - } - // Cases where a is transposed. - if ul == blas.Upper { - for k := m - 1; k >= 0; k-- { - btmpk := b[k*ldb : k*ldb+n] - for ia, va := range a[k*lda+k+1 : k*lda+m] { - i := ia + k + 1 - btmp := b[i*ldb : i*ldb+n] - if va != 0 { - f32.AxpyUnitary(alpha*va, btmpk, btmp) - } - } - tmp := alpha - if nonUnit { - tmp *= a[k*lda+k] - } - if tmp != 1 { - f32.ScalUnitary(tmp, btmpk) - } - } - return - } - for k := 0; k < m; k++ { - btmpk := b[k*ldb : k*ldb+n] - for i, va := range a[k*lda : k*lda+k] { - btmp := b[i*ldb : i*ldb+n] - if va != 0 { - f32.AxpyUnitary(alpha*va, btmpk, btmp) - } - } - tmp := alpha - if nonUnit { - tmp *= a[k*lda+k] - } - if tmp != 1 { - f32.ScalUnitary(tmp, btmpk) - } - } - return - } - // Cases where a is on the right - if tA == blas.NoTrans { - if ul == blas.Upper { - for i := 0; i < m; i++ { - btmp := b[i*ldb : i*ldb+n] - for k := n - 1; k >= 0; k-- { - tmp := alpha * btmp[k] - if tmp == 0 { - continue - } - btmp[k] = tmp - if nonUnit { - btmp[k] *= a[k*lda+k] - } - f32.AxpyUnitary(tmp, a[k*lda+k+1:k*lda+n], btmp[k+1:n]) - } - } - return - } - for i := 0; i < m; i++ { - btmp := b[i*ldb : i*ldb+n] - for k := 0; k < n; k++ { - tmp := alpha * btmp[k] - if tmp == 0 { - continue - } - btmp[k] = tmp - if nonUnit { - btmp[k] *= a[k*lda+k] - } - f32.AxpyUnitary(tmp, a[k*lda:k*lda+k], btmp[:k]) - } - } - return - } - // Cases where a is transposed. - if ul == blas.Upper { - for i := 0; i < m; i++ { - btmp := b[i*ldb : i*ldb+n] - for j, vb := range btmp { - tmp := vb - if nonUnit { - tmp *= a[j*lda+j] - } - tmp += f32.DotUnitary(a[j*lda+j+1:j*lda+n], btmp[j+1:n]) - btmp[j] = alpha * tmp - } - } - return - } - for i := 0; i < m; i++ { - btmp := b[i*ldb : i*ldb+n] - for j := n - 1; j >= 0; j-- { - tmp := btmp[j] - if nonUnit { - tmp *= a[j*lda+j] - } - tmp += f32.DotUnitary(a[j*lda:j*lda+j], btmp[:j]) - btmp[j] = alpha * tmp - } - } -} diff --git a/vendor/gonum.org/v1/gonum/blas/gonum/level3float64.go b/vendor/gonum.org/v1/gonum/blas/gonum/level3float64.go deleted file mode 100644 index 9eebd90691..0000000000 --- a/vendor/gonum.org/v1/gonum/blas/gonum/level3float64.go +++ /dev/null @@ -1,864 +0,0 @@ -// Copyright ©2014 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import ( - "gonum.org/v1/gonum/blas" - "gonum.org/v1/gonum/internal/asm/f64" -) - -var _ blas.Float64Level3 = Implementation{} - -// Dtrsm solves one of the matrix equations -// A * X = alpha * B if tA == blas.NoTrans and side == blas.Left -// A^T * X = alpha * B if tA == blas.Trans or blas.ConjTrans, and side == blas.Left -// X * A = alpha * B if tA == blas.NoTrans and side == blas.Right -// X * A^T = alpha * B if tA == blas.Trans or blas.ConjTrans, and side == blas.Right -// where A is an n×n or m×m triangular matrix, X and B are m×n matrices, and alpha is a -// scalar. -// -// At entry to the function, X contains the values of B, and the result is -// stored in-place into X. -// -// No check is made that A is invertible. -func (Implementation) Dtrsm(s blas.Side, ul blas.Uplo, tA blas.Transpose, d blas.Diag, m, n int, alpha float64, a []float64, lda int, b []float64, ldb int) { - if s != blas.Left && s != blas.Right { - panic(badSide) - } - if ul != blas.Lower && ul != blas.Upper { - panic(badUplo) - } - if tA != blas.NoTrans && tA != blas.Trans && tA != blas.ConjTrans { - panic(badTranspose) - } - if d != blas.NonUnit && d != blas.Unit { - panic(badDiag) - } - if m < 0 { - panic(mLT0) - } - if n < 0 { - panic(nLT0) - } - k := n - if s == blas.Left { - k = m - } - if lda < max(1, k) { - panic(badLdA) - } - if ldb < max(1, n) { - panic(badLdB) - } - - // Quick return if possible. - if m == 0 || n == 0 { - return - } - - // For zero matrix size the following slice length checks are trivially satisfied. - if len(a) < lda*(k-1)+k { - panic(shortA) - } - if len(b) < ldb*(m-1)+n { - panic(shortB) - } - - if alpha == 0 { - for i := 0; i < m; i++ { - btmp := b[i*ldb : i*ldb+n] - for j := range btmp { - btmp[j] = 0 - } - } - return - } - nonUnit := d == blas.NonUnit - if s == blas.Left { - if tA == blas.NoTrans { - if ul == blas.Upper { - for i := m - 1; i >= 0; i-- { - btmp := b[i*ldb : i*ldb+n] - if alpha != 1 { - f64.ScalUnitary(alpha, btmp) - } - for ka, va := range a[i*lda+i+1 : i*lda+m] { - if va != 0 { - k := ka + i + 1 - f64.AxpyUnitary(-va, b[k*ldb:k*ldb+n], btmp) - } - } - if nonUnit { - tmp := 1 / a[i*lda+i] - f64.ScalUnitary(tmp, btmp) - } - } - return - } - for i := 0; i < m; i++ { - btmp := b[i*ldb : i*ldb+n] - if alpha != 1 { - f64.ScalUnitary(alpha, btmp) - } - for k, va := range a[i*lda : i*lda+i] { - if va != 0 { - f64.AxpyUnitary(-va, b[k*ldb:k*ldb+n], btmp) - } - } - if nonUnit { - tmp := 1 / a[i*lda+i] - f64.ScalUnitary(tmp, btmp) - } - } - return - } - // Cases where a is transposed - if ul == blas.Upper { - for k := 0; k < m; k++ { - btmpk := b[k*ldb : k*ldb+n] - if nonUnit { - tmp := 1 / a[k*lda+k] - f64.ScalUnitary(tmp, btmpk) - } - for ia, va := range a[k*lda+k+1 : k*lda+m] { - if va != 0 { - i := ia + k + 1 - f64.AxpyUnitary(-va, btmpk, b[i*ldb:i*ldb+n]) - } - } - if alpha != 1 { - f64.ScalUnitary(alpha, btmpk) - } - } - return - } - for k := m - 1; k >= 0; k-- { - btmpk := b[k*ldb : k*ldb+n] - if nonUnit { - tmp := 1 / a[k*lda+k] - f64.ScalUnitary(tmp, btmpk) - } - for i, va := range a[k*lda : k*lda+k] { - if va != 0 { - f64.AxpyUnitary(-va, btmpk, b[i*ldb:i*ldb+n]) - } - } - if alpha != 1 { - f64.ScalUnitary(alpha, btmpk) - } - } - return - } - // Cases where a is to the right of X. - if tA == blas.NoTrans { - if ul == blas.Upper { - for i := 0; i < m; i++ { - btmp := b[i*ldb : i*ldb+n] - if alpha != 1 { - f64.ScalUnitary(alpha, btmp) - } - for k, vb := range btmp { - if vb == 0 { - continue - } - if nonUnit { - btmp[k] /= a[k*lda+k] - } - f64.AxpyUnitary(-btmp[k], a[k*lda+k+1:k*lda+n], btmp[k+1:n]) - } - } - return - } - for i := 0; i < m; i++ { - btmp := b[i*ldb : i*ldb+n] - if alpha != 1 { - f64.ScalUnitary(alpha, btmp) - } - for k := n - 1; k >= 0; k-- { - if btmp[k] == 0 { - continue - } - if nonUnit { - btmp[k] /= a[k*lda+k] - } - f64.AxpyUnitary(-btmp[k], a[k*lda:k*lda+k], btmp[:k]) - } - } - return - } - // Cases where a is transposed. - if ul == blas.Upper { - for i := 0; i < m; i++ { - btmp := b[i*ldb : i*ldb+n] - for j := n - 1; j >= 0; j-- { - tmp := alpha*btmp[j] - f64.DotUnitary(a[j*lda+j+1:j*lda+n], btmp[j+1:]) - if nonUnit { - tmp /= a[j*lda+j] - } - btmp[j] = tmp - } - } - return - } - for i := 0; i < m; i++ { - btmp := b[i*ldb : i*ldb+n] - for j := 0; j < n; j++ { - tmp := alpha*btmp[j] - f64.DotUnitary(a[j*lda:j*lda+j], btmp[:j]) - if nonUnit { - tmp /= a[j*lda+j] - } - btmp[j] = tmp - } - } -} - -// Dsymm performs one of the matrix-matrix operations -// C = alpha * A * B + beta * C if side == blas.Left -// C = alpha * B * A + beta * C if side == blas.Right -// where A is an n×n or m×m symmetric matrix, B and C are m×n matrices, and alpha -// is a scalar. -func (Implementation) Dsymm(s blas.Side, ul blas.Uplo, m, n int, alpha float64, a []float64, lda int, b []float64, ldb int, beta float64, c []float64, ldc int) { - if s != blas.Right && s != blas.Left { - panic(badSide) - } - if ul != blas.Lower && ul != blas.Upper { - panic(badUplo) - } - if m < 0 { - panic(mLT0) - } - if n < 0 { - panic(nLT0) - } - k := n - if s == blas.Left { - k = m - } - if lda < max(1, k) { - panic(badLdA) - } - if ldb < max(1, n) { - panic(badLdB) - } - if ldc < max(1, n) { - panic(badLdC) - } - - // Quick return if possible. - if m == 0 || n == 0 { - return - } - - // For zero matrix size the following slice length checks are trivially satisfied. - if len(a) < lda*(k-1)+k { - panic(shortA) - } - if len(b) < ldb*(m-1)+n { - panic(shortB) - } - if len(c) < ldc*(m-1)+n { - panic(shortC) - } - - // Quick return if possible. - if alpha == 0 && beta == 1 { - return - } - - if alpha == 0 { - if beta == 0 { - for i := 0; i < m; i++ { - ctmp := c[i*ldc : i*ldc+n] - for j := range ctmp { - ctmp[j] = 0 - } - } - return - } - for i := 0; i < m; i++ { - ctmp := c[i*ldc : i*ldc+n] - for j := 0; j < n; j++ { - ctmp[j] *= beta - } - } - return - } - - isUpper := ul == blas.Upper - if s == blas.Left { - for i := 0; i < m; i++ { - atmp := alpha * a[i*lda+i] - btmp := b[i*ldb : i*ldb+n] - ctmp := c[i*ldc : i*ldc+n] - for j, v := range btmp { - ctmp[j] *= beta - ctmp[j] += atmp * v - } - - for k := 0; k < i; k++ { - var atmp float64 - if isUpper { - atmp = a[k*lda+i] - } else { - atmp = a[i*lda+k] - } - atmp *= alpha - f64.AxpyUnitary(atmp, b[k*ldb:k*ldb+n], ctmp) - } - for k := i + 1; k < m; k++ { - var atmp float64 - if isUpper { - atmp = a[i*lda+k] - } else { - atmp = a[k*lda+i] - } - atmp *= alpha - f64.AxpyUnitary(atmp, b[k*ldb:k*ldb+n], ctmp) - } - } - return - } - if isUpper { - for i := 0; i < m; i++ { - for j := n - 1; j >= 0; j-- { - tmp := alpha * b[i*ldb+j] - var tmp2 float64 - atmp := a[j*lda+j+1 : j*lda+n] - btmp := b[i*ldb+j+1 : i*ldb+n] - ctmp := c[i*ldc+j+1 : i*ldc+n] - for k, v := range atmp { - ctmp[k] += tmp * v - tmp2 += btmp[k] * v - } - c[i*ldc+j] *= beta - c[i*ldc+j] += tmp*a[j*lda+j] + alpha*tmp2 - } - } - return - } - for i := 0; i < m; i++ { - for j := 0; j < n; j++ { - tmp := alpha * b[i*ldb+j] - var tmp2 float64 - atmp := a[j*lda : j*lda+j] - btmp := b[i*ldb : i*ldb+j] - ctmp := c[i*ldc : i*ldc+j] - for k, v := range atmp { - ctmp[k] += tmp * v - tmp2 += btmp[k] * v - } - c[i*ldc+j] *= beta - c[i*ldc+j] += tmp*a[j*lda+j] + alpha*tmp2 - } - } -} - -// Dsyrk performs one of the symmetric rank-k operations -// C = alpha * A * A^T + beta * C if tA == blas.NoTrans -// C = alpha * A^T * A + beta * C if tA == blas.Trans or tA == blas.ConjTrans -// where A is an n×k or k×n matrix, C is an n×n symmetric matrix, and alpha and -// beta are scalars. -func (Implementation) Dsyrk(ul blas.Uplo, tA blas.Transpose, n, k int, alpha float64, a []float64, lda int, beta float64, c []float64, ldc int) { - if ul != blas.Lower && ul != blas.Upper { - panic(badUplo) - } - if tA != blas.Trans && tA != blas.NoTrans && tA != blas.ConjTrans { - panic(badTranspose) - } - if n < 0 { - panic(nLT0) - } - if k < 0 { - panic(kLT0) - } - row, col := k, n - if tA == blas.NoTrans { - row, col = n, k - } - if lda < max(1, col) { - panic(badLdA) - } - if ldc < max(1, n) { - panic(badLdC) - } - - // Quick return if possible. - if n == 0 { - return - } - - // For zero matrix size the following slice length checks are trivially satisfied. - if len(a) < lda*(row-1)+col { - panic(shortA) - } - if len(c) < ldc*(n-1)+n { - panic(shortC) - } - - if alpha == 0 { - if beta == 0 { - if ul == blas.Upper { - for i := 0; i < n; i++ { - ctmp := c[i*ldc+i : i*ldc+n] - for j := range ctmp { - ctmp[j] = 0 - } - } - return - } - for i := 0; i < n; i++ { - ctmp := c[i*ldc : i*ldc+i+1] - for j := range ctmp { - ctmp[j] = 0 - } - } - return - } - if ul == blas.Upper { - for i := 0; i < n; i++ { - ctmp := c[i*ldc+i : i*ldc+n] - for j := range ctmp { - ctmp[j] *= beta - } - } - return - } - for i := 0; i < n; i++ { - ctmp := c[i*ldc : i*ldc+i+1] - for j := range ctmp { - ctmp[j] *= beta - } - } - return - } - if tA == blas.NoTrans { - if ul == blas.Upper { - for i := 0; i < n; i++ { - ctmp := c[i*ldc+i : i*ldc+n] - atmp := a[i*lda : i*lda+k] - if beta == 0 { - for jc := range ctmp { - j := jc + i - ctmp[jc] = alpha * f64.DotUnitary(atmp, a[j*lda:j*lda+k]) - } - } else { - for jc, vc := range ctmp { - j := jc + i - ctmp[jc] = vc*beta + alpha*f64.DotUnitary(atmp, a[j*lda:j*lda+k]) - } - } - } - return - } - for i := 0; i < n; i++ { - ctmp := c[i*ldc : i*ldc+i+1] - atmp := a[i*lda : i*lda+k] - if beta == 0 { - for j := range ctmp { - ctmp[j] = alpha * f64.DotUnitary(a[j*lda:j*lda+k], atmp) - } - } else { - for j, vc := range ctmp { - ctmp[j] = vc*beta + alpha*f64.DotUnitary(a[j*lda:j*lda+k], atmp) - } - } - } - return - } - // Cases where a is transposed. - if ul == blas.Upper { - for i := 0; i < n; i++ { - ctmp := c[i*ldc+i : i*ldc+n] - if beta == 0 { - for j := range ctmp { - ctmp[j] = 0 - } - } else if beta != 1 { - for j := range ctmp { - ctmp[j] *= beta - } - } - for l := 0; l < k; l++ { - tmp := alpha * a[l*lda+i] - if tmp != 0 { - f64.AxpyUnitary(tmp, a[l*lda+i:l*lda+n], ctmp) - } - } - } - return - } - for i := 0; i < n; i++ { - ctmp := c[i*ldc : i*ldc+i+1] - if beta != 1 { - for j := range ctmp { - ctmp[j] *= beta - } - } - for l := 0; l < k; l++ { - tmp := alpha * a[l*lda+i] - if tmp != 0 { - f64.AxpyUnitary(tmp, a[l*lda:l*lda+i+1], ctmp) - } - } - } -} - -// Dsyr2k performs one of the symmetric rank 2k operations -// C = alpha * A * B^T + alpha * B * A^T + beta * C if tA == blas.NoTrans -// C = alpha * A^T * B + alpha * B^T * A + beta * C if tA == blas.Trans or tA == blas.ConjTrans -// where A and B are n×k or k×n matrices, C is an n×n symmetric matrix, and -// alpha and beta are scalars. -func (Implementation) Dsyr2k(ul blas.Uplo, tA blas.Transpose, n, k int, alpha float64, a []float64, lda int, b []float64, ldb int, beta float64, c []float64, ldc int) { - if ul != blas.Lower && ul != blas.Upper { - panic(badUplo) - } - if tA != blas.Trans && tA != blas.NoTrans && tA != blas.ConjTrans { - panic(badTranspose) - } - if n < 0 { - panic(nLT0) - } - if k < 0 { - panic(kLT0) - } - row, col := k, n - if tA == blas.NoTrans { - row, col = n, k - } - if lda < max(1, col) { - panic(badLdA) - } - if ldb < max(1, col) { - panic(badLdB) - } - if ldc < max(1, n) { - panic(badLdC) - } - - // Quick return if possible. - if n == 0 { - return - } - - // For zero matrix size the following slice length checks are trivially satisfied. - if len(a) < lda*(row-1)+col { - panic(shortA) - } - if len(b) < ldb*(row-1)+col { - panic(shortB) - } - if len(c) < ldc*(n-1)+n { - panic(shortC) - } - - if alpha == 0 { - if beta == 0 { - if ul == blas.Upper { - for i := 0; i < n; i++ { - ctmp := c[i*ldc+i : i*ldc+n] - for j := range ctmp { - ctmp[j] = 0 - } - } - return - } - for i := 0; i < n; i++ { - ctmp := c[i*ldc : i*ldc+i+1] - for j := range ctmp { - ctmp[j] = 0 - } - } - return - } - if ul == blas.Upper { - for i := 0; i < n; i++ { - ctmp := c[i*ldc+i : i*ldc+n] - for j := range ctmp { - ctmp[j] *= beta - } - } - return - } - for i := 0; i < n; i++ { - ctmp := c[i*ldc : i*ldc+i+1] - for j := range ctmp { - ctmp[j] *= beta - } - } - return - } - if tA == blas.NoTrans { - if ul == blas.Upper { - for i := 0; i < n; i++ { - atmp := a[i*lda : i*lda+k] - btmp := b[i*ldb : i*ldb+k] - ctmp := c[i*ldc+i : i*ldc+n] - for jc := range ctmp { - j := i + jc - var tmp1, tmp2 float64 - binner := b[j*ldb : j*ldb+k] - for l, v := range a[j*lda : j*lda+k] { - tmp1 += v * btmp[l] - tmp2 += atmp[l] * binner[l] - } - ctmp[jc] *= beta - ctmp[jc] += alpha * (tmp1 + tmp2) - } - } - return - } - for i := 0; i < n; i++ { - atmp := a[i*lda : i*lda+k] - btmp := b[i*ldb : i*ldb+k] - ctmp := c[i*ldc : i*ldc+i+1] - for j := 0; j <= i; j++ { - var tmp1, tmp2 float64 - binner := b[j*ldb : j*ldb+k] - for l, v := range a[j*lda : j*lda+k] { - tmp1 += v * btmp[l] - tmp2 += atmp[l] * binner[l] - } - ctmp[j] *= beta - ctmp[j] += alpha * (tmp1 + tmp2) - } - } - return - } - if ul == blas.Upper { - for i := 0; i < n; i++ { - ctmp := c[i*ldc+i : i*ldc+n] - if beta != 1 { - for j := range ctmp { - ctmp[j] *= beta - } - } - for l := 0; l < k; l++ { - tmp1 := alpha * b[l*ldb+i] - tmp2 := alpha * a[l*lda+i] - btmp := b[l*ldb+i : l*ldb+n] - if tmp1 != 0 || tmp2 != 0 { - for j, v := range a[l*lda+i : l*lda+n] { - ctmp[j] += v*tmp1 + btmp[j]*tmp2 - } - } - } - } - return - } - for i := 0; i < n; i++ { - ctmp := c[i*ldc : i*ldc+i+1] - if beta != 1 { - for j := range ctmp { - ctmp[j] *= beta - } - } - for l := 0; l < k; l++ { - tmp1 := alpha * b[l*ldb+i] - tmp2 := alpha * a[l*lda+i] - btmp := b[l*ldb : l*ldb+i+1] - if tmp1 != 0 || tmp2 != 0 { - for j, v := range a[l*lda : l*lda+i+1] { - ctmp[j] += v*tmp1 + btmp[j]*tmp2 - } - } - } - } -} - -// Dtrmm performs one of the matrix-matrix operations -// B = alpha * A * B if tA == blas.NoTrans and side == blas.Left -// B = alpha * A^T * B if tA == blas.Trans or blas.ConjTrans, and side == blas.Left -// B = alpha * B * A if tA == blas.NoTrans and side == blas.Right -// B = alpha * B * A^T if tA == blas.Trans or blas.ConjTrans, and side == blas.Right -// where A is an n×n or m×m triangular matrix, B is an m×n matrix, and alpha is a scalar. -func (Implementation) Dtrmm(s blas.Side, ul blas.Uplo, tA blas.Transpose, d blas.Diag, m, n int, alpha float64, a []float64, lda int, b []float64, ldb int) { - if s != blas.Left && s != blas.Right { - panic(badSide) - } - if ul != blas.Lower && ul != blas.Upper { - panic(badUplo) - } - if tA != blas.NoTrans && tA != blas.Trans && tA != blas.ConjTrans { - panic(badTranspose) - } - if d != blas.NonUnit && d != blas.Unit { - panic(badDiag) - } - if m < 0 { - panic(mLT0) - } - if n < 0 { - panic(nLT0) - } - k := n - if s == blas.Left { - k = m - } - if lda < max(1, k) { - panic(badLdA) - } - if ldb < max(1, n) { - panic(badLdB) - } - - // Quick return if possible. - if m == 0 || n == 0 { - return - } - - // For zero matrix size the following slice length checks are trivially satisfied. - if len(a) < lda*(k-1)+k { - panic(shortA) - } - if len(b) < ldb*(m-1)+n { - panic(shortB) - } - - if alpha == 0 { - for i := 0; i < m; i++ { - btmp := b[i*ldb : i*ldb+n] - for j := range btmp { - btmp[j] = 0 - } - } - return - } - - nonUnit := d == blas.NonUnit - if s == blas.Left { - if tA == blas.NoTrans { - if ul == blas.Upper { - for i := 0; i < m; i++ { - tmp := alpha - if nonUnit { - tmp *= a[i*lda+i] - } - btmp := b[i*ldb : i*ldb+n] - f64.ScalUnitary(tmp, btmp) - for ka, va := range a[i*lda+i+1 : i*lda+m] { - k := ka + i + 1 - if va != 0 { - f64.AxpyUnitary(alpha*va, b[k*ldb:k*ldb+n], btmp) - } - } - } - return - } - for i := m - 1; i >= 0; i-- { - tmp := alpha - if nonUnit { - tmp *= a[i*lda+i] - } - btmp := b[i*ldb : i*ldb+n] - f64.ScalUnitary(tmp, btmp) - for k, va := range a[i*lda : i*lda+i] { - if va != 0 { - f64.AxpyUnitary(alpha*va, b[k*ldb:k*ldb+n], btmp) - } - } - } - return - } - // Cases where a is transposed. - if ul == blas.Upper { - for k := m - 1; k >= 0; k-- { - btmpk := b[k*ldb : k*ldb+n] - for ia, va := range a[k*lda+k+1 : k*lda+m] { - i := ia + k + 1 - btmp := b[i*ldb : i*ldb+n] - if va != 0 { - f64.AxpyUnitary(alpha*va, btmpk, btmp) - } - } - tmp := alpha - if nonUnit { - tmp *= a[k*lda+k] - } - if tmp != 1 { - f64.ScalUnitary(tmp, btmpk) - } - } - return - } - for k := 0; k < m; k++ { - btmpk := b[k*ldb : k*ldb+n] - for i, va := range a[k*lda : k*lda+k] { - btmp := b[i*ldb : i*ldb+n] - if va != 0 { - f64.AxpyUnitary(alpha*va, btmpk, btmp) - } - } - tmp := alpha - if nonUnit { - tmp *= a[k*lda+k] - } - if tmp != 1 { - f64.ScalUnitary(tmp, btmpk) - } - } - return - } - // Cases where a is on the right - if tA == blas.NoTrans { - if ul == blas.Upper { - for i := 0; i < m; i++ { - btmp := b[i*ldb : i*ldb+n] - for k := n - 1; k >= 0; k-- { - tmp := alpha * btmp[k] - if tmp == 0 { - continue - } - btmp[k] = tmp - if nonUnit { - btmp[k] *= a[k*lda+k] - } - f64.AxpyUnitary(tmp, a[k*lda+k+1:k*lda+n], btmp[k+1:n]) - } - } - return - } - for i := 0; i < m; i++ { - btmp := b[i*ldb : i*ldb+n] - for k := 0; k < n; k++ { - tmp := alpha * btmp[k] - if tmp == 0 { - continue - } - btmp[k] = tmp - if nonUnit { - btmp[k] *= a[k*lda+k] - } - f64.AxpyUnitary(tmp, a[k*lda:k*lda+k], btmp[:k]) - } - } - return - } - // Cases where a is transposed. - if ul == blas.Upper { - for i := 0; i < m; i++ { - btmp := b[i*ldb : i*ldb+n] - for j, vb := range btmp { - tmp := vb - if nonUnit { - tmp *= a[j*lda+j] - } - tmp += f64.DotUnitary(a[j*lda+j+1:j*lda+n], btmp[j+1:n]) - btmp[j] = alpha * tmp - } - } - return - } - for i := 0; i < m; i++ { - btmp := b[i*ldb : i*ldb+n] - for j := n - 1; j >= 0; j-- { - tmp := btmp[j] - if nonUnit { - tmp *= a[j*lda+j] - } - tmp += f64.DotUnitary(a[j*lda:j*lda+j], btmp[:j]) - btmp[j] = alpha * tmp - } - } -} diff --git a/vendor/gonum.org/v1/gonum/blas/gonum/sgemm.go b/vendor/gonum.org/v1/gonum/blas/gonum/sgemm.go deleted file mode 100644 index e868a1050c..0000000000 --- a/vendor/gonum.org/v1/gonum/blas/gonum/sgemm.go +++ /dev/null @@ -1,318 +0,0 @@ -// Code generated by "go generate gonum.org/v1/gonum/blas/gonum”; DO NOT EDIT. - -// Copyright ©2014 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import ( - "runtime" - "sync" - - "gonum.org/v1/gonum/blas" - "gonum.org/v1/gonum/internal/asm/f32" -) - -// Sgemm performs one of the matrix-matrix operations -// C = alpha * A * B + beta * C -// C = alpha * A^T * B + beta * C -// C = alpha * A * B^T + beta * C -// C = alpha * A^T * B^T + beta * C -// where A is an m×k or k×m dense matrix, B is an n×k or k×n dense matrix, C is -// an m×n matrix, and alpha and beta are scalars. tA and tB specify whether A or -// B are transposed. -// -// Float32 implementations are autogenerated and not directly tested. -func (Implementation) Sgemm(tA, tB blas.Transpose, m, n, k int, alpha float32, a []float32, lda int, b []float32, ldb int, beta float32, c []float32, ldc int) { - switch tA { - default: - panic(badTranspose) - case blas.NoTrans, blas.Trans, blas.ConjTrans: - } - switch tB { - default: - panic(badTranspose) - case blas.NoTrans, blas.Trans, blas.ConjTrans: - } - if m < 0 { - panic(mLT0) - } - if n < 0 { - panic(nLT0) - } - if k < 0 { - panic(kLT0) - } - aTrans := tA == blas.Trans || tA == blas.ConjTrans - if aTrans { - if lda < max(1, m) { - panic(badLdA) - } - } else { - if lda < max(1, k) { - panic(badLdA) - } - } - bTrans := tB == blas.Trans || tB == blas.ConjTrans - if bTrans { - if ldb < max(1, k) { - panic(badLdB) - } - } else { - if ldb < max(1, n) { - panic(badLdB) - } - } - if ldc < max(1, n) { - panic(badLdC) - } - - // Quick return if possible. - if m == 0 || n == 0 { - return - } - - // For zero matrix size the following slice length checks are trivially satisfied. - if aTrans { - if len(a) < (k-1)*lda+m { - panic(shortA) - } - } else { - if len(a) < (m-1)*lda+k { - panic(shortA) - } - } - if bTrans { - if len(b) < (n-1)*ldb+k { - panic(shortB) - } - } else { - if len(b) < (k-1)*ldb+n { - panic(shortB) - } - } - if len(c) < (m-1)*ldc+n { - panic(shortC) - } - - // Quick return if possible. - if (alpha == 0 || k == 0) && beta == 1 { - return - } - - // scale c - if beta != 1 { - if beta == 0 { - for i := 0; i < m; i++ { - ctmp := c[i*ldc : i*ldc+n] - for j := range ctmp { - ctmp[j] = 0 - } - } - } else { - for i := 0; i < m; i++ { - ctmp := c[i*ldc : i*ldc+n] - for j := range ctmp { - ctmp[j] *= beta - } - } - } - } - - sgemmParallel(aTrans, bTrans, m, n, k, a, lda, b, ldb, c, ldc, alpha) -} - -func sgemmParallel(aTrans, bTrans bool, m, n, k int, a []float32, lda int, b []float32, ldb int, c []float32, ldc int, alpha float32) { - // dgemmParallel computes a parallel matrix multiplication by partitioning - // a and b into sub-blocks, and updating c with the multiplication of the sub-block - // In all cases, - // A = [ A_11 A_12 ... A_1j - // A_21 A_22 ... A_2j - // ... - // A_i1 A_i2 ... A_ij] - // - // and same for B. All of the submatrix sizes are blockSize×blockSize except - // at the edges. - // - // In all cases, there is one dimension for each matrix along which - // C must be updated sequentially. - // Cij = \sum_k Aik Bki, (A * B) - // Cij = \sum_k Aki Bkj, (A^T * B) - // Cij = \sum_k Aik Bjk, (A * B^T) - // Cij = \sum_k Aki Bjk, (A^T * B^T) - // - // This code computes one {i, j} block sequentially along the k dimension, - // and computes all of the {i, j} blocks concurrently. This - // partitioning allows Cij to be updated in-place without race-conditions. - // Instead of launching a goroutine for each possible concurrent computation, - // a number of worker goroutines are created and channels are used to pass - // available and completed cases. - // - // http://alexkr.com/docs/matrixmult.pdf is a good reference on matrix-matrix - // multiplies, though this code does not copy matrices to attempt to eliminate - // cache misses. - - maxKLen := k - parBlocks := blocks(m, blockSize) * blocks(n, blockSize) - if parBlocks < minParBlock { - // The matrix multiplication is small in the dimensions where it can be - // computed concurrently. Just do it in serial. - sgemmSerial(aTrans, bTrans, m, n, k, a, lda, b, ldb, c, ldc, alpha) - return - } - - nWorkers := runtime.GOMAXPROCS(0) - if parBlocks < nWorkers { - nWorkers = parBlocks - } - // There is a tradeoff between the workers having to wait for work - // and a large buffer making operations slow. - buf := buffMul * nWorkers - if buf > parBlocks { - buf = parBlocks - } - - sendChan := make(chan subMul, buf) - - // Launch workers. A worker receives an {i, j} submatrix of c, and computes - // A_ik B_ki (or the transposed version) storing the result in c_ij. When the - // channel is finally closed, it signals to the waitgroup that it has finished - // computing. - var wg sync.WaitGroup - for i := 0; i < nWorkers; i++ { - wg.Add(1) - go func() { - defer wg.Done() - for sub := range sendChan { - i := sub.i - j := sub.j - leni := blockSize - if i+leni > m { - leni = m - i - } - lenj := blockSize - if j+lenj > n { - lenj = n - j - } - - cSub := sliceView32(c, ldc, i, j, leni, lenj) - - // Compute A_ik B_kj for all k - for k := 0; k < maxKLen; k += blockSize { - lenk := blockSize - if k+lenk > maxKLen { - lenk = maxKLen - k - } - var aSub, bSub []float32 - if aTrans { - aSub = sliceView32(a, lda, k, i, lenk, leni) - } else { - aSub = sliceView32(a, lda, i, k, leni, lenk) - } - if bTrans { - bSub = sliceView32(b, ldb, j, k, lenj, lenk) - } else { - bSub = sliceView32(b, ldb, k, j, lenk, lenj) - } - sgemmSerial(aTrans, bTrans, leni, lenj, lenk, aSub, lda, bSub, ldb, cSub, ldc, alpha) - } - } - }() - } - - // Send out all of the {i, j} subblocks for computation. - for i := 0; i < m; i += blockSize { - for j := 0; j < n; j += blockSize { - sendChan <- subMul{ - i: i, - j: j, - } - } - } - close(sendChan) - wg.Wait() -} - -// sgemmSerial is serial matrix multiply -func sgemmSerial(aTrans, bTrans bool, m, n, k int, a []float32, lda int, b []float32, ldb int, c []float32, ldc int, alpha float32) { - switch { - case !aTrans && !bTrans: - sgemmSerialNotNot(m, n, k, a, lda, b, ldb, c, ldc, alpha) - return - case aTrans && !bTrans: - sgemmSerialTransNot(m, n, k, a, lda, b, ldb, c, ldc, alpha) - return - case !aTrans && bTrans: - sgemmSerialNotTrans(m, n, k, a, lda, b, ldb, c, ldc, alpha) - return - case aTrans && bTrans: - sgemmSerialTransTrans(m, n, k, a, lda, b, ldb, c, ldc, alpha) - return - default: - panic("unreachable") - } -} - -// sgemmSerial where neither a nor b are transposed -func sgemmSerialNotNot(m, n, k int, a []float32, lda int, b []float32, ldb int, c []float32, ldc int, alpha float32) { - // This style is used instead of the literal [i*stride +j]) is used because - // approximately 5 times faster as of go 1.3. - for i := 0; i < m; i++ { - ctmp := c[i*ldc : i*ldc+n] - for l, v := range a[i*lda : i*lda+k] { - tmp := alpha * v - if tmp != 0 { - f32.AxpyUnitary(tmp, b[l*ldb:l*ldb+n], ctmp) - } - } - } -} - -// sgemmSerial where neither a is transposed and b is not -func sgemmSerialTransNot(m, n, k int, a []float32, lda int, b []float32, ldb int, c []float32, ldc int, alpha float32) { - // This style is used instead of the literal [i*stride +j]) is used because - // approximately 5 times faster as of go 1.3. - for l := 0; l < k; l++ { - btmp := b[l*ldb : l*ldb+n] - for i, v := range a[l*lda : l*lda+m] { - tmp := alpha * v - if tmp != 0 { - ctmp := c[i*ldc : i*ldc+n] - f32.AxpyUnitary(tmp, btmp, ctmp) - } - } - } -} - -// sgemmSerial where neither a is not transposed and b is -func sgemmSerialNotTrans(m, n, k int, a []float32, lda int, b []float32, ldb int, c []float32, ldc int, alpha float32) { - // This style is used instead of the literal [i*stride +j]) is used because - // approximately 5 times faster as of go 1.3. - for i := 0; i < m; i++ { - atmp := a[i*lda : i*lda+k] - ctmp := c[i*ldc : i*ldc+n] - for j := 0; j < n; j++ { - ctmp[j] += alpha * f32.DotUnitary(atmp, b[j*ldb:j*ldb+k]) - } - } -} - -// sgemmSerial where both are transposed -func sgemmSerialTransTrans(m, n, k int, a []float32, lda int, b []float32, ldb int, c []float32, ldc int, alpha float32) { - // This style is used instead of the literal [i*stride +j]) is used because - // approximately 5 times faster as of go 1.3. - for l := 0; l < k; l++ { - for i, v := range a[l*lda : l*lda+m] { - tmp := alpha * v - if tmp != 0 { - ctmp := c[i*ldc : i*ldc+n] - f32.AxpyInc(tmp, b[l:], ctmp, uintptr(n), uintptr(ldb), 1, 0, 0) - } - } - } -} - -func sliceView32(a []float32, lda, i, j, r, c int) []float32 { - return a[i*lda+j : (i+r-1)*lda+j+c] -} diff --git a/vendor/gonum.org/v1/gonum/blas/gonum/single_precision.bash b/vendor/gonum.org/v1/gonum/blas/gonum/single_precision.bash deleted file mode 100644 index 53db63a7f0..0000000000 --- a/vendor/gonum.org/v1/gonum/blas/gonum/single_precision.bash +++ /dev/null @@ -1,218 +0,0 @@ -#!/usr/bin/env bash - -# Copyright ©2015 The Gonum Authors. All rights reserved. -# Use of this source code is governed by a BSD-style -# license that can be found in the LICENSE file. - -WARNINGF32='//\ -// Float32 implementations are autogenerated and not directly tested.\ -' -WARNINGC64='//\ -// Complex64 implementations are autogenerated and not directly tested.\ -' - -# Level1 routines. - -echo Generating level1float32.go -echo -e '// Code generated by "go generate gonum.org/v1/gonum/blas/gonum”; DO NOT EDIT.\n' > level1float32.go -cat level1float64.go \ -| gofmt -r 'blas.Float64Level1 -> blas.Float32Level1' \ -\ -| gofmt -r 'float64 -> float32' \ -| gofmt -r 'blas.DrotmParams -> blas.SrotmParams' \ -\ -| gofmt -r 'f64.AxpyInc -> f32.AxpyInc' \ -| gofmt -r 'f64.AxpyUnitary -> f32.AxpyUnitary' \ -| gofmt -r 'f64.DotUnitary -> f32.DotUnitary' \ -| gofmt -r 'f64.ScalInc -> f32.ScalInc' \ -| gofmt -r 'f64.ScalUnitary -> f32.ScalUnitary' \ -\ -| sed -e "s_^\(func (Implementation) \)D\(.*\)\$_$WARNINGF32\1S\2_" \ - -e 's_^// D_// S_' \ - -e "s_^\(func (Implementation) \)Id\(.*\)\$_$WARNINGF32\1Is\2_" \ - -e 's_^// Id_// Is_' \ - -e 's_"gonum.org/v1/gonum/internal/asm/f64"_"gonum.org/v1/gonum/internal/asm/f32"_' \ - -e 's_"math"_math "gonum.org/v1/gonum/internal/math32"_' \ ->> level1float32.go - -echo Generating level1cmplx64.go -echo -e '// Code generated by "go generate gonum.org/v1/gonum/blas/gonum”; DO NOT EDIT.\n' > level1cmplx64.go -cat level1cmplx128.go \ -| gofmt -r 'blas.Complex128Level1 -> blas.Complex64Level1' \ -\ -| gofmt -r 'float64 -> float32' \ -| gofmt -r 'complex128 -> complex64' \ -\ -| gofmt -r 'c128.AxpyInc -> c64.AxpyInc' \ -| gofmt -r 'c128.AxpyUnitary -> c64.AxpyUnitary' \ -| gofmt -r 'c128.DotcInc -> c64.DotcInc' \ -| gofmt -r 'c128.DotcUnitary -> c64.DotcUnitary' \ -| gofmt -r 'c128.DotuInc -> c64.DotuInc' \ -| gofmt -r 'c128.DotuUnitary -> c64.DotuUnitary' \ -| gofmt -r 'c128.ScalInc -> c64.ScalInc' \ -| gofmt -r 'c128.ScalUnitary -> c64.ScalUnitary' \ -| gofmt -r 'dcabs1 -> scabs1' \ -\ -| sed -e "s_^\(func (Implementation) \)Zdot\(.*\)\$_$WARNINGC64\1Cdot\2_" \ - -e 's_^// Zdot_// Cdot_' \ - -e "s_^\(func (Implementation) \)Zdscal\(.*\)\$_$WARNINGC64\1Csscal\2_" \ - -e 's_^// Zdscal_// Csscal_' \ - -e "s_^\(func (Implementation) \)Z\(.*\)\$_$WARNINGC64\1C\2_" \ - -e 's_^// Z_// C_' \ - -e "s_^\(func (Implementation) \)Iz\(.*\)\$_$WARNINGC64\1Ic\2_" \ - -e 's_^// Iz_// Ic_' \ - -e "s_^\(func (Implementation) \)Dz\(.*\)\$_$WARNINGC64\1Sc\2_" \ - -e 's_^// Dz_// Sc_' \ - -e 's_"gonum.org/v1/gonum/internal/asm/c128"_"gonum.org/v1/gonum/internal/asm/c64"_' \ - -e 's_"math"_math "gonum.org/v1/gonum/internal/math32"_' \ ->> level1cmplx64.go - -echo Generating level1float32_sdot.go -echo -e '// Code generated by "go generate gonum.org/v1/gonum/blas/gonum”; DO NOT EDIT.\n' > level1float32_sdot.go -cat level1float64_ddot.go \ -| gofmt -r 'float64 -> float32' \ -\ -| gofmt -r 'f64.DotInc -> f32.DotInc' \ -| gofmt -r 'f64.DotUnitary -> f32.DotUnitary' \ -\ -| sed -e "s_^\(func (Implementation) \)D\(.*\)\$_$WARNINGF32\1S\2_" \ - -e 's_^// D_// S_' \ - -e 's_"gonum.org/v1/gonum/internal/asm/f64"_"gonum.org/v1/gonum/internal/asm/f32"_' \ ->> level1float32_sdot.go - -echo Generating level1float32_dsdot.go -echo -e '// Code generated by "go generate gonum.org/v1/gonum/blas/gonum”; DO NOT EDIT.\n' > level1float32_dsdot.go -cat level1float64_ddot.go \ -| gofmt -r '[]float64 -> []float32' \ -\ -| gofmt -r 'f64.DotInc -> f32.DdotInc' \ -| gofmt -r 'f64.DotUnitary -> f32.DdotUnitary' \ -\ -| sed -e "s_^\(func (Implementation) \)D\(.*\)\$_$WARNINGF32\1Ds\2_" \ - -e 's_^// D_// Ds_' \ - -e 's_"gonum.org/v1/gonum/internal/asm/f64"_"gonum.org/v1/gonum/internal/asm/f32"_' \ ->> level1float32_dsdot.go - -echo Generating level1float32_sdsdot.go -echo -e '// Code generated by "go generate gonum.org/v1/gonum/blas/gonum”; DO NOT EDIT.\n' > level1float32_sdsdot.go -cat level1float64_ddot.go \ -| gofmt -r 'float64 -> float32' \ -\ -| gofmt -r 'f64.DotInc(x, y, f(n), f(incX), f(incY), f(ix), f(iy)) -> alpha + float32(f32.DdotInc(x, y, f(n), f(incX), f(incY), f(ix), f(iy)))' \ -| gofmt -r 'f64.DotUnitary(a, b) -> alpha + float32(f32.DdotUnitary(a, b))' \ -\ -| sed -e "s_^\(func (Implementation) \)D\(.*\)\$_$WARNINGF32\1Sds\2_" \ - -e 's_^// D\(.*\)$_// Sds\1 plus a constant_' \ - -e 's_\\sum_alpha + \\sum_' \ - -e 's/n int/n int, alpha float32/' \ - -e 's_"gonum.org/v1/gonum/internal/asm/f64"_"gonum.org/v1/gonum/internal/asm/f32"_' \ ->> level1float32_sdsdot.go - - -# Level2 routines. - -echo Generating level2float32.go -echo -e '// Code generated by "go generate gonum.org/v1/gonum/blas/gonum”; DO NOT EDIT.\n' > level2float32.go -cat level2float64.go \ -| gofmt -r 'blas.Float64Level2 -> blas.Float32Level2' \ -\ -| gofmt -r 'float64 -> float32' \ -\ -| gofmt -r 'f64.AxpyInc -> f32.AxpyInc' \ -| gofmt -r 'f64.AxpyIncTo -> f32.AxpyIncTo' \ -| gofmt -r 'f64.AxpyUnitary -> f32.AxpyUnitary' \ -| gofmt -r 'f64.AxpyUnitaryTo -> f32.AxpyUnitaryTo' \ -| gofmt -r 'f64.DotInc -> f32.DotInc' \ -| gofmt -r 'f64.DotUnitary -> f32.DotUnitary' \ -| gofmt -r 'f64.ScalInc -> f32.ScalInc' \ -| gofmt -r 'f64.ScalUnitary -> f32.ScalUnitary' \ -| gofmt -r 'f64.Ger -> f32.Ger' \ -\ -| sed -e "s_^\(func (Implementation) \)D\(.*\)\$_$WARNINGF32\1S\2_" \ - -e 's_^// D_// S_' \ - -e 's_"gonum.org/v1/gonum/internal/asm/f64"_"gonum.org/v1/gonum/internal/asm/f32"_' \ ->> level2float32.go - -echo Generating level2cmplx64.go -echo -e '// Code generated by "go generate gonum.org/v1/gonum/blas/gonum”; DO NOT EDIT.\n' > level2cmplx64.go -cat level2cmplx128.go \ -| gofmt -r 'blas.Complex128Level2 -> blas.Complex64Level2' \ -\ -| gofmt -r 'complex128 -> complex64' \ -| gofmt -r 'float64 -> float32' \ -\ -| gofmt -r 'c128.AxpyInc -> c64.AxpyInc' \ -| gofmt -r 'c128.AxpyUnitary -> c64.AxpyUnitary' \ -| gofmt -r 'c128.DotuInc -> c64.DotuInc' \ -| gofmt -r 'c128.DotuUnitary -> c64.DotuUnitary' \ -| gofmt -r 'c128.ScalInc -> c64.ScalInc' \ -| gofmt -r 'c128.ScalUnitary -> c64.ScalUnitary' \ -\ -| sed -e "s_^\(func (Implementation) \)Z\(.*\)\$_$WARNINGC64\1C\2_" \ - -e 's_^// Z_// C_' \ - -e 's_"gonum.org/v1/gonum/internal/asm/c128"_"gonum.org/v1/gonum/internal/asm/c64"_' \ - -e 's_"math/cmplx"_cmplx "gonum.org/v1/gonum/internal/cmplx64"_' \ ->> level2cmplx64.go - -# Level3 routines. - -echo Generating level3float32.go -echo -e '// Code generated by "go generate gonum.org/v1/gonum/blas/gonum”; DO NOT EDIT.\n' > level3float32.go -cat level3float64.go \ -| gofmt -r 'blas.Float64Level3 -> blas.Float32Level3' \ -\ -| gofmt -r 'float64 -> float32' \ -\ -| gofmt -r 'f64.AxpyUnitaryTo -> f32.AxpyUnitaryTo' \ -| gofmt -r 'f64.AxpyUnitary -> f32.AxpyUnitary' \ -| gofmt -r 'f64.DotUnitary -> f32.DotUnitary' \ -| gofmt -r 'f64.ScalUnitary -> f32.ScalUnitary' \ -\ -| sed -e "s_^\(func (Implementation) \)D\(.*\)\$_$WARNINGF32\1S\2_" \ - -e 's_^// D_// S_' \ - -e 's_"gonum.org/v1/gonum/internal/asm/f64"_"gonum.org/v1/gonum/internal/asm/f32"_' \ ->> level3float32.go - -echo Generating sgemm.go -echo -e '// Code generated by "go generate gonum.org/v1/gonum/blas/gonum”; DO NOT EDIT.\n' > sgemm.go -cat dgemm.go \ -| gofmt -r 'float64 -> float32' \ -| gofmt -r 'sliceView64 -> sliceView32' \ -\ -| gofmt -r 'dgemmParallel -> sgemmParallel' \ -| gofmt -r 'computeNumBlocks64 -> computeNumBlocks32' \ -| gofmt -r 'dgemmSerial -> sgemmSerial' \ -| gofmt -r 'dgemmSerialNotNot -> sgemmSerialNotNot' \ -| gofmt -r 'dgemmSerialTransNot -> sgemmSerialTransNot' \ -| gofmt -r 'dgemmSerialNotTrans -> sgemmSerialNotTrans' \ -| gofmt -r 'dgemmSerialTransTrans -> sgemmSerialTransTrans' \ -\ -| gofmt -r 'f64.AxpyInc -> f32.AxpyInc' \ -| gofmt -r 'f64.AxpyUnitary -> f32.AxpyUnitary' \ -| gofmt -r 'f64.DotUnitary -> f32.DotUnitary' \ -\ -| sed -e "s_^\(func (Implementation) \)D\(.*\)\$_$WARNINGF32\1S\2_" \ - -e 's_^// D_// S_' \ - -e 's_^// d_// s_' \ - -e 's_"gonum.org/v1/gonum/internal/asm/f64"_"gonum.org/v1/gonum/internal/asm/f32"_' \ ->> sgemm.go - -echo Generating level3cmplx64.go -echo -e '// Code generated by "go generate gonum.org/v1/gonum/blas/gonum”; DO NOT EDIT.\n' > level3cmplx64.go -cat level3cmplx128.go \ -| gofmt -r 'blas.Complex128Level3 -> blas.Complex64Level3' \ -\ -| gofmt -r 'float64 -> float32' \ -| gofmt -r 'complex128 -> complex64' \ -\ -| gofmt -r 'c128.ScalUnitary -> c64.ScalUnitary' \ -| gofmt -r 'c128.DscalUnitary -> c64.SscalUnitary' \ -| gofmt -r 'c128.DotcUnitary -> c64.DotcUnitary' \ -| gofmt -r 'c128.AxpyUnitary -> c64.AxpyUnitary' \ -| gofmt -r 'c128.DotuUnitary -> c64.DotuUnitary' \ -\ -| sed -e "s_^\(func (Implementation) \)Z\(.*\)\$_$WARNINGC64\1C\2_" \ - -e 's_^// Z_// C_' \ - -e 's_"gonum.org/v1/gonum/internal/asm/c128"_"gonum.org/v1/gonum/internal/asm/c64"_' \ - -e 's_"math/cmplx"_cmplx "gonum.org/v1/gonum/internal/cmplx64"_' \ ->> level3cmplx64.go diff --git a/vendor/gonum.org/v1/gonum/floats/README.md b/vendor/gonum.org/v1/gonum/floats/README.md deleted file mode 100644 index ee867bb7bf..0000000000 --- a/vendor/gonum.org/v1/gonum/floats/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Gonum floats [![GoDoc](https://godoc.org/gonum.org/v1/gonum/floats?status.svg)](https://godoc.org/gonum.org/v1/gonum/floats) - -Package floats provides a set of helper routines for dealing with slices of float64. -The functions avoid allocations to allow for use within tight loops without garbage collection overhead. diff --git a/vendor/gonum.org/v1/gonum/floats/doc.go b/vendor/gonum.org/v1/gonum/floats/doc.go deleted file mode 100644 index bfe05c1918..0000000000 --- a/vendor/gonum.org/v1/gonum/floats/doc.go +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright ©2017 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package floats provides a set of helper routines for dealing with slices -// of float64. The functions avoid allocations to allow for use within tight -// loops without garbage collection overhead. -// -// The convention used is that when a slice is being modified in place, it has -// the name dst. -package floats // import "gonum.org/v1/gonum/floats" diff --git a/vendor/gonum.org/v1/gonum/floats/floats.go b/vendor/gonum.org/v1/gonum/floats/floats.go deleted file mode 100644 index ae004a6215..0000000000 --- a/vendor/gonum.org/v1/gonum/floats/floats.go +++ /dev/null @@ -1,933 +0,0 @@ -// Copyright ©2013 The Gonum Authors. All rights reserved. -// Use of this code is governed by a BSD-style -// license that can be found in the LICENSE file - -package floats - -import ( - "errors" - "math" - "sort" - "strconv" - - "gonum.org/v1/gonum/internal/asm/f64" -) - -// Add adds, element-wise, the elements of s and dst, and stores in dst. -// Panics if the lengths of dst and s do not match. -func Add(dst, s []float64) { - if len(dst) != len(s) { - panic("floats: length of the slices do not match") - } - f64.AxpyUnitaryTo(dst, 1, s, dst) -} - -// AddTo adds, element-wise, the elements of s and t and -// stores the result in dst. Panics if the lengths of s, t and dst do not match. -func AddTo(dst, s, t []float64) []float64 { - if len(s) != len(t) { - panic("floats: length of adders do not match") - } - if len(dst) != len(s) { - panic("floats: length of destination does not match length of adder") - } - f64.AxpyUnitaryTo(dst, 1, s, t) - return dst -} - -// AddConst adds the scalar c to all of the values in dst. -func AddConst(c float64, dst []float64) { - f64.AddConst(c, dst) -} - -// AddScaled performs dst = dst + alpha * s. -// It panics if the lengths of dst and s are not equal. -func AddScaled(dst []float64, alpha float64, s []float64) { - if len(dst) != len(s) { - panic("floats: length of destination and source to not match") - } - f64.AxpyUnitaryTo(dst, alpha, s, dst) -} - -// AddScaledTo performs dst = y + alpha * s, where alpha is a scalar, -// and dst, y and s are all slices. -// It panics if the lengths of dst, y, and s are not equal. -// -// At the return of the function, dst[i] = y[i] + alpha * s[i] -func AddScaledTo(dst, y []float64, alpha float64, s []float64) []float64 { - if len(dst) != len(s) || len(dst) != len(y) { - panic("floats: lengths of slices do not match") - } - f64.AxpyUnitaryTo(dst, alpha, s, y) - return dst -} - -// argsort is a helper that implements sort.Interface, as used by -// Argsort. -type argsort struct { - s []float64 - inds []int -} - -func (a argsort) Len() int { - return len(a.s) -} - -func (a argsort) Less(i, j int) bool { - return a.s[i] < a.s[j] -} - -func (a argsort) Swap(i, j int) { - a.s[i], a.s[j] = a.s[j], a.s[i] - a.inds[i], a.inds[j] = a.inds[j], a.inds[i] -} - -// Argsort sorts the elements of dst while tracking their original order. -// At the conclusion of Argsort, dst will contain the original elements of dst -// but sorted in increasing order, and inds will contain the original position -// of the elements in the slice such that dst[i] = origDst[inds[i]]. -// It panics if the lengths of dst and inds do not match. -func Argsort(dst []float64, inds []int) { - if len(dst) != len(inds) { - panic("floats: length of inds does not match length of slice") - } - for i := range dst { - inds[i] = i - } - - a := argsort{s: dst, inds: inds} - sort.Sort(a) -} - -// Count applies the function f to every element of s and returns the number -// of times the function returned true. -func Count(f func(float64) bool, s []float64) int { - var n int - for _, val := range s { - if f(val) { - n++ - } - } - return n -} - -// CumProd finds the cumulative product of the first i elements in -// s and puts them in place into the ith element of the -// destination dst. A panic will occur if the lengths of arguments -// do not match. -// -// At the return of the function, dst[i] = s[i] * s[i-1] * s[i-2] * ... -func CumProd(dst, s []float64) []float64 { - if len(dst) != len(s) { - panic("floats: length of destination does not match length of the source") - } - if len(dst) == 0 { - return dst - } - return f64.CumProd(dst, s) -} - -// CumSum finds the cumulative sum of the first i elements in -// s and puts them in place into the ith element of the -// destination dst. A panic will occur if the lengths of arguments -// do not match. -// -// At the return of the function, dst[i] = s[i] + s[i-1] + s[i-2] + ... -func CumSum(dst, s []float64) []float64 { - if len(dst) != len(s) { - panic("floats: length of destination does not match length of the source") - } - if len(dst) == 0 { - return dst - } - return f64.CumSum(dst, s) -} - -// Distance computes the L-norm of s - t. See Norm for special cases. -// A panic will occur if the lengths of s and t do not match. -func Distance(s, t []float64, L float64) float64 { - if len(s) != len(t) { - panic("floats: slice lengths do not match") - } - if len(s) == 0 { - return 0 - } - var norm float64 - if L == 2 { - for i, v := range s { - diff := t[i] - v - norm = math.Hypot(norm, diff) - } - return norm - } - if L == 1 { - for i, v := range s { - norm += math.Abs(t[i] - v) - } - return norm - } - if math.IsInf(L, 1) { - for i, v := range s { - absDiff := math.Abs(t[i] - v) - if absDiff > norm { - norm = absDiff - } - } - return norm - } - for i, v := range s { - norm += math.Pow(math.Abs(t[i]-v), L) - } - return math.Pow(norm, 1/L) -} - -// Div performs element-wise division dst / s -// and stores the value in dst. It panics if the -// lengths of s and t are not equal. -func Div(dst, s []float64) { - if len(dst) != len(s) { - panic("floats: slice lengths do not match") - } - f64.Div(dst, s) -} - -// DivTo performs element-wise division s / t -// and stores the value in dst. It panics if the -// lengths of s, t, and dst are not equal. -func DivTo(dst, s, t []float64) []float64 { - if len(s) != len(t) || len(dst) != len(t) { - panic("floats: slice lengths do not match") - } - return f64.DivTo(dst, s, t) -} - -// Dot computes the dot product of s1 and s2, i.e. -// sum_{i = 1}^N s1[i]*s2[i]. -// A panic will occur if lengths of arguments do not match. -func Dot(s1, s2 []float64) float64 { - if len(s1) != len(s2) { - panic("floats: lengths of the slices do not match") - } - return f64.DotUnitary(s1, s2) -} - -// Equal returns true if the slices have equal lengths and -// all elements are numerically identical. -func Equal(s1, s2 []float64) bool { - if len(s1) != len(s2) { - return false - } - for i, val := range s1 { - if s2[i] != val { - return false - } - } - return true -} - -// EqualApprox returns true if the slices have equal lengths and -// all element pairs have an absolute tolerance less than tol or a -// relative tolerance less than tol. -func EqualApprox(s1, s2 []float64, tol float64) bool { - if len(s1) != len(s2) { - return false - } - for i, a := range s1 { - if !EqualWithinAbsOrRel(a, s2[i], tol, tol) { - return false - } - } - return true -} - -// EqualFunc returns true if the slices have the same lengths -// and the function returns true for all element pairs. -func EqualFunc(s1, s2 []float64, f func(float64, float64) bool) bool { - if len(s1) != len(s2) { - return false - } - for i, val := range s1 { - if !f(val, s2[i]) { - return false - } - } - return true -} - -// EqualWithinAbs returns true if a and b have an absolute -// difference of less than tol. -func EqualWithinAbs(a, b, tol float64) bool { - return a == b || math.Abs(a-b) <= tol -} - -const minNormalFloat64 = 2.2250738585072014e-308 - -// EqualWithinRel returns true if the difference between a and b -// is not greater than tol times the greater value. -func EqualWithinRel(a, b, tol float64) bool { - if a == b { - return true - } - delta := math.Abs(a - b) - if delta <= minNormalFloat64 { - return delta <= tol*minNormalFloat64 - } - // We depend on the division in this relationship to identify - // infinities (we rely on the NaN to fail the test) otherwise - // we compare Infs of the same sign and evaluate Infs as equal - // independent of sign. - return delta/math.Max(math.Abs(a), math.Abs(b)) <= tol -} - -// EqualWithinAbsOrRel returns true if a and b are equal to within -// the absolute tolerance. -func EqualWithinAbsOrRel(a, b, absTol, relTol float64) bool { - if EqualWithinAbs(a, b, absTol) { - return true - } - return EqualWithinRel(a, b, relTol) -} - -// EqualWithinULP returns true if a and b are equal to within -// the specified number of floating point units in the last place. -func EqualWithinULP(a, b float64, ulp uint) bool { - if a == b { - return true - } - if math.IsNaN(a) || math.IsNaN(b) { - return false - } - if math.Signbit(a) != math.Signbit(b) { - return math.Float64bits(math.Abs(a))+math.Float64bits(math.Abs(b)) <= uint64(ulp) - } - return ulpDiff(math.Float64bits(a), math.Float64bits(b)) <= uint64(ulp) -} - -func ulpDiff(a, b uint64) uint64 { - if a > b { - return a - b - } - return b - a -} - -// EqualLengths returns true if all of the slices have equal length, -// and false otherwise. Returns true if there are no input slices. -func EqualLengths(slices ...[]float64) bool { - // This length check is needed: http://play.golang.org/p/sdty6YiLhM - if len(slices) == 0 { - return true - } - l := len(slices[0]) - for i := 1; i < len(slices); i++ { - if len(slices[i]) != l { - return false - } - } - return true -} - -// Find applies f to every element of s and returns the indices of the first -// k elements for which the f returns true, or all such elements -// if k < 0. -// Find will reslice inds to have 0 length, and will append -// found indices to inds. -// If k > 0 and there are fewer than k elements in s satisfying f, -// all of the found elements will be returned along with an error. -// At the return of the function, the input inds will be in an undetermined state. -func Find(inds []int, f func(float64) bool, s []float64, k int) ([]int, error) { - // inds is also returned to allow for calling with nil - - // Reslice inds to have zero length - inds = inds[:0] - - // If zero elements requested, can just return - if k == 0 { - return inds, nil - } - - // If k < 0, return all of the found indices - if k < 0 { - for i, val := range s { - if f(val) { - inds = append(inds, i) - } - } - return inds, nil - } - - // Otherwise, find the first k elements - nFound := 0 - for i, val := range s { - if f(val) { - inds = append(inds, i) - nFound++ - if nFound == k { - return inds, nil - } - } - } - // Finished iterating over the loop, which means k elements were not found - return inds, errors.New("floats: insufficient elements found") -} - -// HasNaN returns true if the slice s has any values that are NaN and false -// otherwise. -func HasNaN(s []float64) bool { - for _, v := range s { - if math.IsNaN(v) { - return true - } - } - return false -} - -// LogSpan returns a set of n equally spaced points in log space between, -// l and u where N is equal to len(dst). The first element of the -// resulting dst will be l and the final element of dst will be u. -// Panics if len(dst) < 2 -// Note that this call will return NaNs if either l or u are negative, and -// will return all zeros if l or u is zero. -// Also returns the mutated slice dst, so that it can be used in range, like: -// -// for i, x := range LogSpan(dst, l, u) { ... } -func LogSpan(dst []float64, l, u float64) []float64 { - Span(dst, math.Log(l), math.Log(u)) - for i := range dst { - dst[i] = math.Exp(dst[i]) - } - return dst -} - -// LogSumExp returns the log of the sum of the exponentials of the values in s. -// Panics if s is an empty slice. -func LogSumExp(s []float64) float64 { - // Want to do this in a numerically stable way which avoids - // overflow and underflow - // First, find the maximum value in the slice. - maxval := Max(s) - if math.IsInf(maxval, 0) { - // If it's infinity either way, the logsumexp will be infinity as well - // returning now avoids NaNs - return maxval - } - var lse float64 - // Compute the sumexp part - for _, val := range s { - lse += math.Exp(val - maxval) - } - // Take the log and add back on the constant taken out - return math.Log(lse) + maxval -} - -// Max returns the maximum value in the input slice. If the slice is empty, Max will panic. -func Max(s []float64) float64 { - return s[MaxIdx(s)] -} - -// MaxIdx returns the index of the maximum value in the input slice. If several -// entries have the maximum value, the first such index is returned. If the slice -// is empty, MaxIdx will panic. -func MaxIdx(s []float64) int { - if len(s) == 0 { - panic("floats: zero slice length") - } - max := math.NaN() - var ind int - for i, v := range s { - if math.IsNaN(v) { - continue - } - if v > max || math.IsNaN(max) { - max = v - ind = i - } - } - return ind -} - -// Min returns the maximum value in the input slice. If the slice is empty, Min will panic. -func Min(s []float64) float64 { - return s[MinIdx(s)] -} - -// MinIdx returns the index of the minimum value in the input slice. If several -// entries have the maximum value, the first such index is returned. If the slice -// is empty, MinIdx will panic. -func MinIdx(s []float64) int { - if len(s) == 0 { - panic("floats: zero slice length") - } - min := math.NaN() - var ind int - for i, v := range s { - if math.IsNaN(v) { - continue - } - if v < min || math.IsNaN(min) { - min = v - ind = i - } - } - return ind -} - -// Mul performs element-wise multiplication between dst -// and s and stores the value in dst. Panics if the -// lengths of s and t are not equal. -func Mul(dst, s []float64) { - if len(dst) != len(s) { - panic("floats: slice lengths do not match") - } - for i, val := range s { - dst[i] *= val - } -} - -// MulTo performs element-wise multiplication between s -// and t and stores the value in dst. Panics if the -// lengths of s, t, and dst are not equal. -func MulTo(dst, s, t []float64) []float64 { - if len(s) != len(t) || len(dst) != len(t) { - panic("floats: slice lengths do not match") - } - for i, val := range t { - dst[i] = val * s[i] - } - return dst -} - -const ( - nanBits = 0x7ff8000000000000 - nanMask = 0xfff8000000000000 -) - -// NaNWith returns an IEEE 754 "quiet not-a-number" value with the -// payload specified in the low 51 bits of payload. -// The NaN returned by math.NaN has a bit pattern equal to NaNWith(1). -func NaNWith(payload uint64) float64 { - return math.Float64frombits(nanBits | (payload &^ nanMask)) -} - -// NaNPayload returns the lowest 51 bits payload of an IEEE 754 "quiet -// not-a-number". For values of f other than quiet-NaN, NaNPayload -// returns zero and false. -func NaNPayload(f float64) (payload uint64, ok bool) { - b := math.Float64bits(f) - if b&nanBits != nanBits { - return 0, false - } - return b &^ nanMask, true -} - -// NearestIdx returns the index of the element in s -// whose value is nearest to v. If several such -// elements exist, the lowest index is returned. -// NearestIdx panics if len(s) == 0. -func NearestIdx(s []float64, v float64) int { - if len(s) == 0 { - panic("floats: zero length slice") - } - switch { - case math.IsNaN(v): - return 0 - case math.IsInf(v, 1): - return MaxIdx(s) - case math.IsInf(v, -1): - return MinIdx(s) - } - var ind int - dist := math.NaN() - for i, val := range s { - newDist := math.Abs(v - val) - // A NaN distance will not be closer. - if math.IsNaN(newDist) { - continue - } - if newDist < dist || math.IsNaN(dist) { - dist = newDist - ind = i - } - } - return ind -} - -// NearestIdxForSpan return the index of a hypothetical vector created -// by Span with length n and bounds l and u whose value is closest -// to v. That is, NearestIdxForSpan(n, l, u, v) is equivalent to -// Nearest(Span(make([]float64, n),l,u),v) without an allocation. -// NearestIdxForSpan panics if n is less than two. -func NearestIdxForSpan(n int, l, u float64, v float64) int { - if n <= 1 { - panic("floats: span must have length >1") - } - if math.IsNaN(v) { - return 0 - } - - // Special cases for Inf and NaN. - switch { - case math.IsNaN(l) && !math.IsNaN(u): - return n - 1 - case math.IsNaN(u): - return 0 - case math.IsInf(l, 0) && math.IsInf(u, 0): - if l == u { - return 0 - } - if n%2 == 1 { - if !math.IsInf(v, 0) { - return n / 2 - } - if math.Copysign(1, v) == math.Copysign(1, l) { - return 0 - } - return n/2 + 1 - } - if math.Copysign(1, v) == math.Copysign(1, l) { - return 0 - } - return n / 2 - case math.IsInf(l, 0): - if v == l { - return 0 - } - return n - 1 - case math.IsInf(u, 0): - if v == u { - return n - 1 - } - return 0 - case math.IsInf(v, -1): - if l <= u { - return 0 - } - return n - 1 - case math.IsInf(v, 1): - if u <= l { - return 0 - } - return n - 1 - } - - // Special cases for v outside (l, u) and (u, l). - switch { - case l < u: - if v <= l { - return 0 - } - if v >= u { - return n - 1 - } - case l > u: - if v >= l { - return 0 - } - if v <= u { - return n - 1 - } - default: - return 0 - } - - // Can't guarantee anything about exactly halfway between - // because of floating point weirdness. - return int((float64(n)-1)/(u-l)*(v-l) + 0.5) -} - -// Norm returns the L norm of the slice S, defined as -// (sum_{i=1}^N s[i]^L)^{1/L} -// Special cases: -// L = math.Inf(1) gives the maximum absolute value. -// Does not correctly compute the zero norm (use Count). -func Norm(s []float64, L float64) float64 { - // Should this complain if L is not positive? - // Should this be done in log space for better numerical stability? - // would be more cost - // maybe only if L is high? - if len(s) == 0 { - return 0 - } - if L == 2 { - twoNorm := math.Abs(s[0]) - for i := 1; i < len(s); i++ { - twoNorm = math.Hypot(twoNorm, s[i]) - } - return twoNorm - } - var norm float64 - if L == 1 { - for _, val := range s { - norm += math.Abs(val) - } - return norm - } - if math.IsInf(L, 1) { - for _, val := range s { - norm = math.Max(norm, math.Abs(val)) - } - return norm - } - for _, val := range s { - norm += math.Pow(math.Abs(val), L) - } - return math.Pow(norm, 1/L) -} - -// ParseWithNA converts the string s to a float64 in v. -// If s equals missing, w is returned as 0, otherwise 1. -func ParseWithNA(s, missing string) (v, w float64, err error) { - if s == missing { - return 0, 0, nil - } - v, err = strconv.ParseFloat(s, 64) - if err == nil { - w = 1 - } - return v, w, err -} - -// Prod returns the product of the elements of the slice. -// Returns 1 if len(s) = 0. -func Prod(s []float64) float64 { - prod := 1.0 - for _, val := range s { - prod *= val - } - return prod -} - -// Reverse reverses the order of elements in the slice. -func Reverse(s []float64) { - for i, j := 0, len(s)-1; i < j; i, j = i+1, j-1 { - s[i], s[j] = s[j], s[i] - } -} - -// Round returns the half away from zero rounded value of x with prec precision. -// -// Special cases are: -// Round(±0) = +0 -// Round(±Inf) = ±Inf -// Round(NaN) = NaN -func Round(x float64, prec int) float64 { - if x == 0 { - // Make sure zero is returned - // without the negative bit set. - return 0 - } - // Fast path for positive precision on integers. - if prec >= 0 && x == math.Trunc(x) { - return x - } - pow := math.Pow10(prec) - intermed := x * pow - if math.IsInf(intermed, 0) { - return x - } - if x < 0 { - x = math.Ceil(intermed - 0.5) - } else { - x = math.Floor(intermed + 0.5) - } - - if x == 0 { - return 0 - } - - return x / pow -} - -// RoundEven returns the half even rounded value of x with prec precision. -// -// Special cases are: -// RoundEven(±0) = +0 -// RoundEven(±Inf) = ±Inf -// RoundEven(NaN) = NaN -func RoundEven(x float64, prec int) float64 { - if x == 0 { - // Make sure zero is returned - // without the negative bit set. - return 0 - } - // Fast path for positive precision on integers. - if prec >= 0 && x == math.Trunc(x) { - return x - } - pow := math.Pow10(prec) - intermed := x * pow - if math.IsInf(intermed, 0) { - return x - } - if isHalfway(intermed) { - correction, _ := math.Modf(math.Mod(intermed, 2)) - intermed += correction - if intermed > 0 { - x = math.Floor(intermed) - } else { - x = math.Ceil(intermed) - } - } else { - if x < 0 { - x = math.Ceil(intermed - 0.5) - } else { - x = math.Floor(intermed + 0.5) - } - } - - if x == 0 { - return 0 - } - - return x / pow -} - -func isHalfway(x float64) bool { - _, frac := math.Modf(x) - frac = math.Abs(frac) - return frac == 0.5 || (math.Nextafter(frac, math.Inf(-1)) < 0.5 && math.Nextafter(frac, math.Inf(1)) > 0.5) -} - -// Same returns true if the input slices have the same length and the all elements -// have the same value with NaN treated as the same. -func Same(s, t []float64) bool { - if len(s) != len(t) { - return false - } - for i, v := range s { - w := t[i] - if v != w && !(math.IsNaN(v) && math.IsNaN(w)) { - return false - } - } - return true -} - -// Scale multiplies every element in dst by the scalar c. -func Scale(c float64, dst []float64) { - if len(dst) > 0 { - f64.ScalUnitary(c, dst) - } -} - -// ScaleTo multiplies the elements in s by c and stores the result in dst. -func ScaleTo(dst []float64, c float64, s []float64) []float64 { - if len(dst) != len(s) { - panic("floats: lengths of slices do not match") - } - if len(dst) > 0 { - f64.ScalUnitaryTo(dst, c, s) - } - return dst -} - -// Span returns a set of N equally spaced points between l and u, where N -// is equal to the length of the destination. The first element of the destination -// is l, the final element of the destination is u. -// -// Panics if len(dst) < 2. -// -// Span also returns the mutated slice dst, so that it can be used in range expressions, -// like: -// -// for i, x := range Span(dst, l, u) { ... } -func Span(dst []float64, l, u float64) []float64 { - n := len(dst) - if n < 2 { - panic("floats: destination must have length >1") - } - - // Special cases for Inf and NaN. - switch { - case math.IsNaN(l): - for i := range dst[:len(dst)-1] { - dst[i] = math.NaN() - } - dst[len(dst)-1] = u - return dst - case math.IsNaN(u): - for i := range dst[1:] { - dst[i+1] = math.NaN() - } - dst[0] = l - return dst - case math.IsInf(l, 0) && math.IsInf(u, 0): - for i := range dst[:len(dst)/2] { - dst[i] = l - dst[len(dst)-i-1] = u - } - if len(dst)%2 == 1 { - if l != u { - dst[len(dst)/2] = 0 - } else { - dst[len(dst)/2] = l - } - } - return dst - case math.IsInf(l, 0): - for i := range dst[:len(dst)-1] { - dst[i] = l - } - dst[len(dst)-1] = u - return dst - case math.IsInf(u, 0): - for i := range dst[1:] { - dst[i+1] = u - } - dst[0] = l - return dst - } - - step := (u - l) / float64(n-1) - for i := range dst { - dst[i] = l + step*float64(i) - } - return dst -} - -// Sub subtracts, element-wise, the elements of s from dst. Panics if -// the lengths of dst and s do not match. -func Sub(dst, s []float64) { - if len(dst) != len(s) { - panic("floats: length of the slices do not match") - } - f64.AxpyUnitaryTo(dst, -1, s, dst) -} - -// SubTo subtracts, element-wise, the elements of t from s and -// stores the result in dst. Panics if the lengths of s, t and dst do not match. -func SubTo(dst, s, t []float64) []float64 { - if len(s) != len(t) { - panic("floats: length of subtractor and subtractee do not match") - } - if len(dst) != len(s) { - panic("floats: length of destination does not match length of subtractor") - } - f64.AxpyUnitaryTo(dst, -1, t, s) - return dst -} - -// Sum returns the sum of the elements of the slice. -func Sum(s []float64) float64 { - return f64.Sum(s) -} - -// Within returns the first index i where s[i] <= v < s[i+1]. Within panics if: -// - len(s) < 2 -// - s is not sorted -func Within(s []float64, v float64) int { - if len(s) < 2 { - panic("floats: slice length less than 2") - } - if !sort.Float64sAreSorted(s) { - panic("floats: input slice not sorted") - } - if v < s[0] || v >= s[len(s)-1] || math.IsNaN(v) { - return -1 - } - for i, f := range s[1:] { - if v < f { - return i - } - } - return -1 -} diff --git a/vendor/gonum.org/v1/gonum/graph/.gitignore b/vendor/gonum.org/v1/gonum/graph/.gitignore deleted file mode 100644 index 86e0d24044..0000000000 --- a/vendor/gonum.org/v1/gonum/graph/.gitignore +++ /dev/null @@ -1 +0,0 @@ -test.out \ No newline at end of file diff --git a/vendor/gonum.org/v1/gonum/graph/README.md b/vendor/gonum.org/v1/gonum/graph/README.md deleted file mode 100644 index f0a9505ed0..0000000000 --- a/vendor/gonum.org/v1/gonum/graph/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Gonum graph [![GoDoc](https://godoc.org/gonum.org/v1/gonum/graph?status.svg)](https://godoc.org/gonum.org/v1/gonum/graph) - -This is a generalized graph package for the Go language. diff --git a/vendor/gonum.org/v1/gonum/graph/doc.go b/vendor/gonum.org/v1/gonum/graph/doc.go deleted file mode 100644 index 7eedd09ce8..0000000000 --- a/vendor/gonum.org/v1/gonum/graph/doc.go +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright ©2014 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package graph defines graph interfaces. -// -// Routines to test contract compliance by user implemented graph types -// are available in gonum.org/v1/gonum/graph/testgraph. -package graph // import "gonum.org/v1/gonum/graph" diff --git a/vendor/gonum.org/v1/gonum/graph/graph.go b/vendor/gonum.org/v1/gonum/graph/graph.go deleted file mode 100644 index c973583d87..0000000000 --- a/vendor/gonum.org/v1/gonum/graph/graph.go +++ /dev/null @@ -1,282 +0,0 @@ -// Copyright ©2014 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package graph - -// Node is a graph node. It returns a graph-unique integer ID. -type Node interface { - ID() int64 -} - -// Edge is a graph edge. In directed graphs, the direction of the -// edge is given from -> to, otherwise the edge is semantically -// unordered. -type Edge interface { - // From returns the from node of the edge. - From() Node - - // To returns the to node of the edge. - To() Node - - // ReversedEdge returns an edge that has - // the end points of the receiver swapped. - ReversedEdge() Edge -} - -// WeightedEdge is a weighted graph edge. In directed graphs, the direction -// of the edge is given from -> to, otherwise the edge is semantically -// unordered. -type WeightedEdge interface { - Edge - Weight() float64 -} - -// Graph is a generalized graph. -type Graph interface { - // Node returns the node with the given ID if it exists - // in the graph, and nil otherwise. - Node(id int64) Node - - // Nodes returns all the nodes in the graph. - // - // Nodes must not return nil. - Nodes() Nodes - - // From returns all nodes that can be reached directly - // from the node with the given ID. - // - // From must not return nil. - From(id int64) Nodes - - // HasEdgeBetween returns whether an edge exists between - // nodes with IDs xid and yid without considering direction. - HasEdgeBetween(xid, yid int64) bool - - // Edge returns the edge from u to v, with IDs uid and vid, - // if such an edge exists and nil otherwise. The node v - // must be directly reachable from u as defined by the - // From method. - Edge(uid, vid int64) Edge -} - -// Weighted is a weighted graph. -type Weighted interface { - Graph - - // WeightedEdge returns the weighted edge from u to v - // with IDs uid and vid if such an edge exists and - // nil otherwise. The node v must be directly - // reachable from u as defined by the From method. - WeightedEdge(uid, vid int64) WeightedEdge - - // Weight returns the weight for the edge between - // x and y with IDs xid and yid if Edge(xid, yid) - // returns a non-nil Edge. - // If x and y are the same node or there is no - // joining edge between the two nodes the weight - // value returned is implementation dependent. - // Weight returns true if an edge exists between - // x and y or if x and y have the same ID, false - // otherwise. - Weight(xid, yid int64) (w float64, ok bool) -} - -// Undirected is an undirected graph. -type Undirected interface { - Graph - - // EdgeBetween returns the edge between nodes x and y - // with IDs xid and yid. - EdgeBetween(xid, yid int64) Edge -} - -// WeightedUndirected is a weighted undirected graph. -type WeightedUndirected interface { - Weighted - - // WeightedEdgeBetween returns the edge between nodes - // x and y with IDs xid and yid. - WeightedEdgeBetween(xid, yid int64) WeightedEdge -} - -// Directed is a directed graph. -type Directed interface { - Graph - - // HasEdgeFromTo returns whether an edge exists - // in the graph from u to v with IDs uid and vid. - HasEdgeFromTo(uid, vid int64) bool - - // To returns all nodes that can reach directly - // to the node with the given ID. - // - // To must not return nil. - To(id int64) Nodes -} - -// WeightedDirected is a weighted directed graph. -type WeightedDirected interface { - Weighted - - // HasEdgeFromTo returns whether an edge exists - // in the graph from u to v with the IDs uid and - // vid. - HasEdgeFromTo(uid, vid int64) bool - - // To returns all nodes that can reach directly - // to the node with the given ID. - // - // To must not return nil. - To(id int64) Nodes -} - -// NodeAdder is an interface for adding arbitrary nodes to a graph. -type NodeAdder interface { - // NewNode returns a new Node with a unique - // arbitrary ID. - NewNode() Node - - // AddNode adds a node to the graph. AddNode panics if - // the added node ID matches an existing node ID. - AddNode(Node) -} - -// NodeRemover is an interface for removing nodes from a graph. -type NodeRemover interface { - // RemoveNode removes the node with the given ID - // from the graph, as well as any edges attached - // to it. If the node is not in the graph it is - // a no-op. - RemoveNode(id int64) -} - -// EdgeAdder is an interface for adding edges to a graph. -type EdgeAdder interface { - // NewEdge returns a new Edge from the source to the destination node. - NewEdge(from, to Node) Edge - - // SetEdge adds an edge from one node to another. - // If the graph supports node addition the nodes - // will be added if they do not exist, otherwise - // SetEdge will panic. - // The behavior of an EdgeAdder when the IDs - // returned by e.From() and e.To() are equal is - // implementation-dependent. - // Whether e, e.From() and e.To() are stored - // within the graph is implementation dependent. - SetEdge(e Edge) -} - -// WeightedEdgeAdder is an interface for adding edges to a graph. -type WeightedEdgeAdder interface { - // NewWeightedEdge returns a new WeightedEdge from - // the source to the destination node. - NewWeightedEdge(from, to Node, weight float64) WeightedEdge - - // SetWeightedEdge adds an edge from one node to - // another. If the graph supports node addition - // the nodes will be added if they do not exist, - // otherwise SetWeightedEdge will panic. - // The behavior of a WeightedEdgeAdder when the IDs - // returned by e.From() and e.To() are equal is - // implementation-dependent. - // Whether e, e.From() and e.To() are stored - // within the graph is implementation dependent. - SetWeightedEdge(e WeightedEdge) -} - -// EdgeRemover is an interface for removing nodes from a graph. -type EdgeRemover interface { - // RemoveEdge removes the edge with the given end - // IDs, leaving the terminal nodes. If the edge - // does not exist it is a no-op. - RemoveEdge(fid, tid int64) -} - -// Builder is a graph that can have nodes and edges added. -type Builder interface { - NodeAdder - EdgeAdder -} - -// WeightedBuilder is a graph that can have nodes and weighted edges added. -type WeightedBuilder interface { - NodeAdder - WeightedEdgeAdder -} - -// UndirectedBuilder is an undirected graph builder. -type UndirectedBuilder interface { - Undirected - Builder -} - -// UndirectedWeightedBuilder is an undirected weighted graph builder. -type UndirectedWeightedBuilder interface { - Undirected - WeightedBuilder -} - -// DirectedBuilder is a directed graph builder. -type DirectedBuilder interface { - Directed - Builder -} - -// DirectedWeightedBuilder is a directed weighted graph builder. -type DirectedWeightedBuilder interface { - Directed - WeightedBuilder -} - -// Copy copies nodes and edges as undirected edges from the source to the destination -// without first clearing the destination. Copy will panic if a node ID in the source -// graph matches a node ID in the destination. -// -// If the source is undirected and the destination is directed both directions will -// be present in the destination after the copy is complete. -func Copy(dst Builder, src Graph) { - nodes := src.Nodes() - for nodes.Next() { - dst.AddNode(nodes.Node()) - } - nodes.Reset() - for nodes.Next() { - u := nodes.Node() - uid := u.ID() - to := src.From(uid) - for to.Next() { - v := to.Node() - dst.SetEdge(src.Edge(uid, v.ID())) - } - } -} - -// CopyWeighted copies nodes and edges as undirected edges from the source to the destination -// without first clearing the destination. Copy will panic if a node ID in the source -// graph matches a node ID in the destination. -// -// If the source is undirected and the destination is directed both directions will -// be present in the destination after the copy is complete. -// -// If the source is a directed graph, the destination is undirected, and a fundamental -// cycle exists with two nodes where the edge weights differ, the resulting destination -// graph's edge weight between those nodes is undefined. If there is a defined function -// to resolve such conflicts, an UndirectWeighted may be used to do this. -func CopyWeighted(dst WeightedBuilder, src Weighted) { - nodes := src.Nodes() - for nodes.Next() { - dst.AddNode(nodes.Node()) - } - nodes.Reset() - for nodes.Next() { - u := nodes.Node() - uid := u.ID() - to := src.From(uid) - for to.Next() { - v := to.Node() - dst.SetWeightedEdge(src.WeightedEdge(uid, v.ID())) - } - } -} diff --git a/vendor/gonum.org/v1/gonum/graph/internal/linear/doc.go b/vendor/gonum.org/v1/gonum/graph/internal/linear/doc.go deleted file mode 100644 index 88d1cb80af..0000000000 --- a/vendor/gonum.org/v1/gonum/graph/internal/linear/doc.go +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright ©2017 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package linear provides common linear data structures. -package linear // import "gonum.org/v1/gonum/graph/internal/linear" diff --git a/vendor/gonum.org/v1/gonum/graph/internal/linear/linear.go b/vendor/gonum.org/v1/gonum/graph/internal/linear/linear.go deleted file mode 100644 index 62e19db6a9..0000000000 --- a/vendor/gonum.org/v1/gonum/graph/internal/linear/linear.go +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright ©2015 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package linear - -import ( - "gonum.org/v1/gonum/graph" -) - -// NodeStack implements a LIFO stack of graph.Node. -type NodeStack []graph.Node - -// Len returns the number of graph.Nodes on the stack. -func (s *NodeStack) Len() int { return len(*s) } - -// Pop returns the last graph.Node on the stack and removes it -// from the stack. -func (s *NodeStack) Pop() graph.Node { - v := *s - v, n := v[:len(v)-1], v[len(v)-1] - *s = v - return n -} - -// Push adds the node n to the stack at the last position. -func (s *NodeStack) Push(n graph.Node) { *s = append(*s, n) } - -// NodeQueue implements a FIFO queue. -type NodeQueue struct { - head int - data []graph.Node -} - -// Len returns the number of graph.Nodes in the queue. -func (q *NodeQueue) Len() int { return len(q.data) - q.head } - -// Enqueue adds the node n to the back of the queue. -func (q *NodeQueue) Enqueue(n graph.Node) { - if len(q.data) == cap(q.data) && q.head > 0 { - l := q.Len() - copy(q.data, q.data[q.head:]) - q.head = 0 - q.data = append(q.data[:l], n) - } else { - q.data = append(q.data, n) - } -} - -// Dequeue returns the graph.Node at the front of the queue and -// removes it from the queue. -func (q *NodeQueue) Dequeue() graph.Node { - if q.Len() == 0 { - panic("queue: empty queue") - } - - var n graph.Node - n, q.data[q.head] = q.data[q.head], nil - q.head++ - - if q.Len() == 0 { - q.head = 0 - q.data = q.data[:0] - } - - return n -} - -// Reset clears the queue for reuse. -func (q *NodeQueue) Reset() { - q.head = 0 - q.data = q.data[:0] -} diff --git a/vendor/gonum.org/v1/gonum/graph/internal/ordered/doc.go b/vendor/gonum.org/v1/gonum/graph/internal/ordered/doc.go deleted file mode 100644 index 563df6f2e6..0000000000 --- a/vendor/gonum.org/v1/gonum/graph/internal/ordered/doc.go +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright ©2017 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package ordered provides common sort ordering types. -package ordered // import "gonum.org/v1/gonum/graph/internal/ordered" diff --git a/vendor/gonum.org/v1/gonum/graph/internal/ordered/sort.go b/vendor/gonum.org/v1/gonum/graph/internal/ordered/sort.go deleted file mode 100644 index a7250d1f37..0000000000 --- a/vendor/gonum.org/v1/gonum/graph/internal/ordered/sort.go +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright ©2015 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package ordered - -import "gonum.org/v1/gonum/graph" - -// ByID implements the sort.Interface sorting a slice of graph.Node -// by ID. -type ByID []graph.Node - -func (n ByID) Len() int { return len(n) } -func (n ByID) Less(i, j int) bool { return n[i].ID() < n[j].ID() } -func (n ByID) Swap(i, j int) { n[i], n[j] = n[j], n[i] } - -// BySliceValues implements the sort.Interface sorting a slice of -// []int64 lexically by the values of the []int64. -type BySliceValues [][]int64 - -func (c BySliceValues) Len() int { return len(c) } -func (c BySliceValues) Less(i, j int) bool { - a, b := c[i], c[j] - l := len(a) - if len(b) < l { - l = len(b) - } - for k, v := range a[:l] { - if v < b[k] { - return true - } - if v > b[k] { - return false - } - } - return len(a) < len(b) -} -func (c BySliceValues) Swap(i, j int) { c[i], c[j] = c[j], c[i] } - -// BySliceIDs implements the sort.Interface sorting a slice of -// []graph.Node lexically by the IDs of the []graph.Node. -type BySliceIDs [][]graph.Node - -func (c BySliceIDs) Len() int { return len(c) } -func (c BySliceIDs) Less(i, j int) bool { - a, b := c[i], c[j] - l := len(a) - if len(b) < l { - l = len(b) - } - for k, v := range a[:l] { - if v.ID() < b[k].ID() { - return true - } - if v.ID() > b[k].ID() { - return false - } - } - return len(a) < len(b) -} -func (c BySliceIDs) Swap(i, j int) { c[i], c[j] = c[j], c[i] } - -// Int64s implements the sort.Interface sorting a slice of -// int64. -type Int64s []int64 - -func (s Int64s) Len() int { return len(s) } -func (s Int64s) Less(i, j int) bool { return s[i] < s[j] } -func (s Int64s) Swap(i, j int) { s[i], s[j] = s[j], s[i] } - -// Reverse reverses the order of nodes. -func Reverse(nodes []graph.Node) { - for i, j := 0, len(nodes)-1; i < j; i, j = i+1, j-1 { - nodes[i], nodes[j] = nodes[j], nodes[i] - } -} - -// LinesByIDs implements the sort.Interface sorting a slice of graph.LinesByIDs -// lexically by the From IDs, then by the To IDs, finally by the Line IDs. -type LinesByIDs []graph.Line - -func (n LinesByIDs) Len() int { return len(n) } -func (n LinesByIDs) Less(i, j int) bool { - a, b := n[i], n[j] - if a.From().ID() != b.From().ID() { - return a.From().ID() < b.From().ID() - } - if a.To().ID() != b.To().ID() { - return a.To().ID() < b.To().ID() - } - return n[i].ID() < n[j].ID() -} -func (n LinesByIDs) Swap(i, j int) { n[i], n[j] = n[j], n[i] } diff --git a/vendor/gonum.org/v1/gonum/graph/internal/set/doc.go b/vendor/gonum.org/v1/gonum/graph/internal/set/doc.go deleted file mode 100644 index 86f2afc4e9..0000000000 --- a/vendor/gonum.org/v1/gonum/graph/internal/set/doc.go +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright ©2017 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package set provides integer and graph.Node sets. -package set // import "gonum.org/v1/gonum/graph/internal/set" diff --git a/vendor/gonum.org/v1/gonum/graph/internal/set/same.go b/vendor/gonum.org/v1/gonum/graph/internal/set/same.go deleted file mode 100644 index f95a4e1287..0000000000 --- a/vendor/gonum.org/v1/gonum/graph/internal/set/same.go +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright ©2014 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build !appengine,!safe - -package set - -import "unsafe" - -// same determines whether two sets are backed by the same store. In the -// current implementation using hash maps it makes use of the fact that -// hash maps are passed as a pointer to a runtime Hmap struct. A map is -// not seen by the runtime as a pointer though, so we use unsafe to get -// the maps' pointer values to compare. -func same(a, b Nodes) bool { - return *(*uintptr)(unsafe.Pointer(&a)) == *(*uintptr)(unsafe.Pointer(&b)) -} - -// intsSame determines whether two sets are backed by the same store. In the -// current implementation using hash maps it makes use of the fact that -// hash maps are passed as a pointer to a runtime Hmap struct. A map is -// not seen by the runtime as a pointer though, so we use unsafe to get -// the maps' pointer values to compare. -func intsSame(a, b Ints) bool { - return *(*uintptr)(unsafe.Pointer(&a)) == *(*uintptr)(unsafe.Pointer(&b)) -} - -// int64sSame determines whether two sets are backed by the same store. In the -// current implementation using hash maps it makes use of the fact that -// hash maps are passed as a pointer to a runtime Hmap struct. A map is -// not seen by the runtime as a pointer though, so we use unsafe to get -// the maps' pointer values to compare. -func int64sSame(a, b Int64s) bool { - return *(*uintptr)(unsafe.Pointer(&a)) == *(*uintptr)(unsafe.Pointer(&b)) -} diff --git a/vendor/gonum.org/v1/gonum/graph/internal/set/same_appengine.go b/vendor/gonum.org/v1/gonum/graph/internal/set/same_appengine.go deleted file mode 100644 index 4ff4f4ed22..0000000000 --- a/vendor/gonum.org/v1/gonum/graph/internal/set/same_appengine.go +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright ©2014 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build appengine safe - -package set - -import "reflect" - -// same determines whether two sets are backed by the same store. In the -// current implementation using hash maps it makes use of the fact that -// hash maps are passed as a pointer to a runtime Hmap struct. A map is -// not seen by the runtime as a pointer though, so we use reflect to get -// the maps' pointer values to compare. -func same(a, b Nodes) bool { - return reflect.ValueOf(a).Pointer() == reflect.ValueOf(b).Pointer() -} - -// intsSame determines whether two sets are backed by the same store. In the -// current implementation using hash maps it makes use of the fact that -// hash maps are passed as a pointer to a runtime Hmap struct. A map is -// not seen by the runtime as a pointer though, so we use reflect to get -// the maps' pointer values to compare. -func intsSame(a, b Ints) bool { - return reflect.ValueOf(a).Pointer() == reflect.ValueOf(b).Pointer() -} - -// int64sSame determines whether two sets are backed by the same store. In the -// current implementation using hash maps it makes use of the fact that -// hash maps are passed as a pointer to a runtime Hmap struct. A map is -// not seen by the runtime as a pointer though, so we use reflect to get -// the maps' pointer values to compare. -func int64sSame(a, b Int64s) bool { - return reflect.ValueOf(a).Pointer() == reflect.ValueOf(b).Pointer() -} diff --git a/vendor/gonum.org/v1/gonum/graph/internal/set/set.go b/vendor/gonum.org/v1/gonum/graph/internal/set/set.go deleted file mode 100644 index 0506b8e97d..0000000000 --- a/vendor/gonum.org/v1/gonum/graph/internal/set/set.go +++ /dev/null @@ -1,228 +0,0 @@ -// Copyright ©2014 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package set - -import "gonum.org/v1/gonum/graph" - -// Ints is a set of int identifiers. -type Ints map[int]struct{} - -// The simple accessor methods for Ints are provided to allow ease of -// implementation change should the need arise. - -// Add inserts an element into the set. -func (s Ints) Add(e int) { - s[e] = struct{}{} -} - -// Has reports the existence of the element in the set. -func (s Ints) Has(e int) bool { - _, ok := s[e] - return ok -} - -// Remove deletes the specified element from the set. -func (s Ints) Remove(e int) { - delete(s, e) -} - -// Count reports the number of elements stored in the set. -func (s Ints) Count() int { - return len(s) -} - -// IntsEqual reports set equality between the parameters. Sets are equal if -// and only if they have the same elements. -func IntsEqual(a, b Ints) bool { - if intsSame(a, b) { - return true - } - - if len(a) != len(b) { - return false - } - - for e := range a { - if _, ok := b[e]; !ok { - return false - } - } - - return true -} - -// Int64s is a set of int64 identifiers. -type Int64s map[int64]struct{} - -// The simple accessor methods for Ints are provided to allow ease of -// implementation change should the need arise. - -// Add inserts an element into the set. -func (s Int64s) Add(e int64) { - s[e] = struct{}{} -} - -// Has reports the existence of the element in the set. -func (s Int64s) Has(e int64) bool { - _, ok := s[e] - return ok -} - -// Remove deletes the specified element from the set. -func (s Int64s) Remove(e int64) { - delete(s, e) -} - -// Count reports the number of elements stored in the set. -func (s Int64s) Count() int { - return len(s) -} - -// Int64sEqual reports set equality between the parameters. Sets are equal if -// and only if they have the same elements. -func Int64sEqual(a, b Int64s) bool { - if int64sSame(a, b) { - return true - } - - if len(a) != len(b) { - return false - } - - for e := range a { - if _, ok := b[e]; !ok { - return false - } - } - - return true -} - -// Nodes is a set of nodes keyed in their integer identifiers. -type Nodes map[int64]graph.Node - -// NewNodes returns a new Nodes. -func NewNodes() Nodes { - return make(Nodes) -} - -// NewNodes returns a new Nodes with the given size hint, n. -func NewNodesSize(n int) Nodes { - return make(Nodes, n) -} - -// The simple accessor methods for Nodes are provided to allow ease of -// implementation change should the need arise. - -// Add inserts an element into the set. -func (s Nodes) Add(n graph.Node) { - s[n.ID()] = n -} - -// Remove deletes the specified element from the set. -func (s Nodes) Remove(e graph.Node) { - delete(s, e.ID()) -} - -// Count returns the number of element in the set. -func (s Nodes) Count() int { - return len(s) -} - -// Has reports the existence of the elements in the set. -func (s Nodes) Has(n graph.Node) bool { - _, ok := s[n.ID()] - return ok -} - -// CloneNodes returns a clone of src. -func CloneNodes(src Nodes) Nodes { - dst := make(Nodes, len(src)) - for e, n := range src { - dst[e] = n - } - return dst -} - -// Equal reports set equality between the parameters. Sets are equal if -// and only if they have the same elements. -func Equal(a, b Nodes) bool { - if same(a, b) { - return true - } - - if len(a) != len(b) { - return false - } - - for e := range a { - if _, ok := b[e]; !ok { - return false - } - } - - return true -} - -// UnionOfNodes returns the union of a and b. -// -// The union of two sets, a and b, is the set containing all the -// elements of each, for instance: -// -// {a,b,c} UNION {d,e,f} = {a,b,c,d,e,f} -// -// Since sets may not have repetition, unions of two sets that overlap -// do not contain repeat elements, that is: -// -// {a,b,c} UNION {b,c,d} = {a,b,c,d} -// -func UnionOfNodes(a, b Nodes) Nodes { - if same(a, b) { - return CloneNodes(a) - } - - dst := make(Nodes) - for e, n := range a { - dst[e] = n - } - for e, n := range b { - dst[e] = n - } - - return dst -} - -// IntersectionOfNodes returns the intersection of a and b. -// -// The intersection of two sets, a and b, is the set containing all -// the elements shared between the two sets, for instance: -// -// {a,b,c} INTERSECT {b,c,d} = {b,c} -// -// The intersection between a set and itself is itself, and thus -// effectively a copy operation: -// -// {a,b,c} INTERSECT {a,b,c} = {a,b,c} -// -// The intersection between two sets that share no elements is the empty -// set: -// -// {a,b,c} INTERSECT {d,e,f} = {} -// -func IntersectionOfNodes(a, b Nodes) Nodes { - if same(a, b) { - return CloneNodes(a) - } - dst := make(Nodes) - if len(a) > len(b) { - a, b = b, a - } - for e, n := range a { - if _, ok := b[e]; ok { - dst[e] = n - } - } - return dst -} diff --git a/vendor/gonum.org/v1/gonum/graph/internal/uid/uid.go b/vendor/gonum.org/v1/gonum/graph/internal/uid/uid.go deleted file mode 100644 index 5f503c13da..0000000000 --- a/vendor/gonum.org/v1/gonum/graph/internal/uid/uid.go +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright ©2014 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package uid implements unique ID provision for graphs. -package uid - -import "gonum.org/v1/gonum/graph/internal/set" - -// Max is the maximum value of int64. -const Max = int64(^uint64(0) >> 1) - -// Set implements available ID storage. -type Set struct { - maxID int64 - used, free set.Int64s -} - -// NewSet returns a new Set. The returned value should not be passed except by pointer. -func NewSet() Set { - return Set{maxID: -1, used: make(set.Int64s), free: make(set.Int64s)} -} - -// NewID returns a new unique ID. The ID returned is not considered used -// until passed in a call to use. -func (s *Set) NewID() int64 { - for id := range s.free { - return id - } - if s.maxID != Max { - return s.maxID + 1 - } - for id := int64(0); id <= s.maxID+1; id++ { - if !s.used.Has(id) { - return id - } - } - panic("unreachable") -} - -// Use adds the id to the used IDs in the Set. -func (s *Set) Use(id int64) { - s.used.Add(id) - s.free.Remove(id) - if id > s.maxID { - s.maxID = id - } -} - -// Release frees the id for reuse. -func (s *Set) Release(id int64) { - s.free.Add(id) - s.used.Remove(id) -} diff --git a/vendor/gonum.org/v1/gonum/graph/iterator/doc.go b/vendor/gonum.org/v1/gonum/graph/iterator/doc.go deleted file mode 100644 index 0983bc7c36..0000000000 --- a/vendor/gonum.org/v1/gonum/graph/iterator/doc.go +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright ©2018 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package iterator provides node, edge and line iterators. -// -// The iterators provided satisfy the graph.Nodes, graph.Edges and -// graph.Lines interfaces. -package iterator diff --git a/vendor/gonum.org/v1/gonum/graph/iterator/edges.go b/vendor/gonum.org/v1/gonum/graph/iterator/edges.go deleted file mode 100644 index 21ef0433e8..0000000000 --- a/vendor/gonum.org/v1/gonum/graph/iterator/edges.go +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright ©2018 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package iterator - -import "gonum.org/v1/gonum/graph" - -// OrderedEdges implements the graph.Edges and graph.EdgeSlicer interfaces. -// The iteration order of OrderedEdges is the order of edges passed to -// NewEdgeIterator. -type OrderedEdges struct { - idx int - edges []graph.Edge -} - -// NewOrderedEdges returns an OrderedEdges initialized with the provided edges. -func NewOrderedEdges(edges []graph.Edge) *OrderedEdges { - return &OrderedEdges{idx: -1, edges: edges} -} - -// Len returns the remaining number of edges to be iterated over. -func (e *OrderedEdges) Len() int { - if e.idx >= len(e.edges) { - return 0 - } - if e.idx <= 0 { - return len(e.edges) - } - return len(e.edges[e.idx:]) -} - -// Next returns whether the next call of Edge will return a valid edge. -func (e *OrderedEdges) Next() bool { - if uint(e.idx)+1 < uint(len(e.edges)) { - e.idx++ - return true - } - e.idx = len(e.edges) - return false -} - -// Edge returns the current edge of the iterator. Next must have been -// called prior to a call to Edge. -func (e *OrderedEdges) Edge() graph.Edge { - if e.idx >= len(e.edges) || e.idx < 0 { - return nil - } - return e.edges[e.idx] -} - -// EdgeSlice returns all the remaining edges in the iterator and advances -// the iterator. -func (e *OrderedEdges) EdgeSlice() []graph.Edge { - if e.idx >= len(e.edges) { - return nil - } - idx := e.idx - if idx == -1 { - idx = 0 - } - e.idx = len(e.edges) - return e.edges[idx:] -} - -// Reset returns the iterator to its initial state. -func (e *OrderedEdges) Reset() { - e.idx = -1 -} - -// OrderedWeightedEdges implements the graph.Edges and graph.EdgeSlicer interfaces. -// The iteration order of OrderedWeightedEdges is the order of edges passed to -// NewEdgeIterator. -type OrderedWeightedEdges struct { - idx int - edges []graph.WeightedEdge -} - -// NewOrderedWeightedEdges returns an OrderedWeightedEdges initialized with the provided edges. -func NewOrderedWeightedEdges(edges []graph.WeightedEdge) *OrderedWeightedEdges { - return &OrderedWeightedEdges{idx: -1, edges: edges} -} - -// Len returns the remaining number of edges to be iterated over. -func (e *OrderedWeightedEdges) Len() int { - if e.idx >= len(e.edges) { - return 0 - } - if e.idx <= 0 { - return len(e.edges) - } - return len(e.edges[e.idx:]) -} - -// Next returns whether the next call of WeightedEdge will return a valid edge. -func (e *OrderedWeightedEdges) Next() bool { - if uint(e.idx)+1 < uint(len(e.edges)) { - e.idx++ - return true - } - e.idx = len(e.edges) - return false -} - -// WeightedEdge returns the current edge of the iterator. Next must have been -// called prior to a call to WeightedEdge. -func (e *OrderedWeightedEdges) WeightedEdge() graph.WeightedEdge { - if e.idx >= len(e.edges) || e.idx < 0 { - return nil - } - return e.edges[e.idx] -} - -// WeightedEdgeSlice returns all the remaining edges in the iterator and advances -// the iterator. -func (e *OrderedWeightedEdges) WeightedEdgeSlice() []graph.WeightedEdge { - if e.idx >= len(e.edges) { - return nil - } - idx := e.idx - if idx == -1 { - idx = 0 - } - e.idx = len(e.edges) - return e.edges[idx:] -} - -// Reset returns the iterator to its initial state. -func (e *OrderedWeightedEdges) Reset() { - e.idx = -1 -} diff --git a/vendor/gonum.org/v1/gonum/graph/iterator/lines.go b/vendor/gonum.org/v1/gonum/graph/iterator/lines.go deleted file mode 100644 index ed655df016..0000000000 --- a/vendor/gonum.org/v1/gonum/graph/iterator/lines.go +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright ©2018 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package iterator - -import "gonum.org/v1/gonum/graph" - -// OrderedLines implements the graph.Lines and graph.LineSlicer interfaces. -// The iteration order of OrderedLines is the order of lines passed to -// NewLineIterator. -type OrderedLines struct { - idx int - lines []graph.Line -} - -// NewOrderedLines returns an OrderedLines initialized with the provided lines. -func NewOrderedLines(lines []graph.Line) *OrderedLines { - return &OrderedLines{idx: -1, lines: lines} -} - -// Len returns the remaining number of lines to be iterated over. -func (e *OrderedLines) Len() int { - if e.idx >= len(e.lines) { - return 0 - } - if e.idx <= 0 { - return len(e.lines) - } - return len(e.lines[e.idx:]) -} - -// Next returns whether the next call of Line will return a valid line. -func (e *OrderedLines) Next() bool { - if uint(e.idx)+1 < uint(len(e.lines)) { - e.idx++ - return true - } - e.idx = len(e.lines) - return false -} - -// Line returns the current line of the iterator. Next must have been -// called prior to a call to Line. -func (e *OrderedLines) Line() graph.Line { - if e.idx >= len(e.lines) || e.idx < 0 { - return nil - } - return e.lines[e.idx] -} - -// LineSlice returns all the remaining lines in the iterator and advances -// the iterator. -func (e *OrderedLines) LineSlice() []graph.Line { - if e.idx >= len(e.lines) { - return nil - } - idx := e.idx - if idx == -1 { - idx = 0 - } - e.idx = len(e.lines) - return e.lines[idx:] -} - -// Reset returns the iterator to its initial state. -func (e *OrderedLines) Reset() { - e.idx = -1 -} - -// OrderedWeightedLines implements the graph.Lines and graph.LineSlicer interfaces. -// The iteration order of OrderedWeightedLines is the order of lines passed to -// NewLineIterator. -type OrderedWeightedLines struct { - idx int - lines []graph.WeightedLine -} - -// NewWeightedLineIterator returns an OrderedWeightedLines initialized with the provided lines. -func NewOrderedWeightedLines(lines []graph.WeightedLine) *OrderedWeightedLines { - return &OrderedWeightedLines{idx: -1, lines: lines} -} - -// Len returns the remaining number of lines to be iterated over. -func (e *OrderedWeightedLines) Len() int { - if e.idx >= len(e.lines) { - return 0 - } - if e.idx <= 0 { - return len(e.lines) - } - return len(e.lines[e.idx:]) -} - -// Next returns whether the next call of WeightedLine will return a valid line. -func (e *OrderedWeightedLines) Next() bool { - if uint(e.idx)+1 < uint(len(e.lines)) { - e.idx++ - return true - } - e.idx = len(e.lines) - return false -} - -// WeightedLine returns the current line of the iterator. Next must have been -// called prior to a call to WeightedLine. -func (e *OrderedWeightedLines) WeightedLine() graph.WeightedLine { - if e.idx >= len(e.lines) || e.idx < 0 { - return nil - } - return e.lines[e.idx] -} - -// WeightedLineSlice returns all the remaining lines in the iterator and advances -// the iterator. -func (e *OrderedWeightedLines) WeightedLineSlice() []graph.WeightedLine { - if e.idx >= len(e.lines) { - return nil - } - idx := e.idx - if idx == -1 { - idx = 0 - } - e.idx = len(e.lines) - return e.lines[idx:] -} - -// Reset returns the iterator to its initial state. -func (e *OrderedWeightedLines) Reset() { - e.idx = -1 -} diff --git a/vendor/gonum.org/v1/gonum/graph/iterator/nodes.go b/vendor/gonum.org/v1/gonum/graph/iterator/nodes.go deleted file mode 100644 index 952dd770f2..0000000000 --- a/vendor/gonum.org/v1/gonum/graph/iterator/nodes.go +++ /dev/null @@ -1,125 +0,0 @@ -// Copyright ©2018 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package iterator - -import "gonum.org/v1/gonum/graph" - -// OrderedNodes implements the graph.Nodes and graph.NodeSlicer interfaces. -// The iteration order of OrderedNodes is the order of nodes passed to -// NewNodeIterator. -type OrderedNodes struct { - idx int - nodes []graph.Node -} - -// NewOrderedNodes returns a OrderedNodes initialized with the provided nodes. -func NewOrderedNodes(nodes []graph.Node) *OrderedNodes { - return &OrderedNodes{idx: -1, nodes: nodes} -} - -// Len returns the remaining number of nodes to be iterated over. -func (n *OrderedNodes) Len() int { - if n.idx >= len(n.nodes) { - return 0 - } - if n.idx <= 0 { - return len(n.nodes) - } - return len(n.nodes[n.idx:]) -} - -// Next returns whether the next call of Node will return a valid node. -func (n *OrderedNodes) Next() bool { - if uint(n.idx)+1 < uint(len(n.nodes)) { - n.idx++ - return true - } - n.idx = len(n.nodes) - return false -} - -// Node returns the current node of the iterator. Next must have been -// called prior to a call to Node. -func (n *OrderedNodes) Node() graph.Node { - if n.idx >= len(n.nodes) || n.idx < 0 { - return nil - } - return n.nodes[n.idx] -} - -// NodeSlice returns all the remaining nodes in the iterator and advances -// the iterator. -func (n *OrderedNodes) NodeSlice() []graph.Node { - if n.idx >= len(n.nodes) { - return nil - } - idx := n.idx - if idx == -1 { - idx = 0 - } - n.idx = len(n.nodes) - return n.nodes[idx:] -} - -// Reset returns the iterator to its initial state. -func (n *OrderedNodes) Reset() { - n.idx = -1 -} - -// ImplicitNodes implements the graph.Nodes interface for a set of nodes over -// a contiguous ID range. -type ImplicitNodes struct { - beg, end int - curr int - newNode func(id int) graph.Node -} - -// NewImplicitNodes returns a new implicit node iterator spanning nodes in [beg,end). -// The provided new func maps the id to a graph.Node. NewImplicitNodes will panic -// if beg is greater than end. -func NewImplicitNodes(beg, end int, new func(id int) graph.Node) *ImplicitNodes { - if beg > end { - panic("iterator: invalid range") - } - return &ImplicitNodes{beg: beg, end: end, curr: beg - 1, newNode: new} -} - -// Len returns the remaining number of nodes to be iterated over. -func (n *ImplicitNodes) Len() int { - return n.end - n.curr - 1 -} - -// Next returns whether the next call of Node will return a valid node. -func (n *ImplicitNodes) Next() bool { - if n.curr == n.end { - return false - } - n.curr++ - return n.curr < n.end -} - -// Node returns the current node of the iterator. Next must have been -// called prior to a call to Node. -func (n *ImplicitNodes) Node() graph.Node { - if n.Len() == -1 || n.curr < n.beg { - return nil - } - return n.newNode(n.curr) -} - -// Reset returns the iterator to its initial state. -func (n *ImplicitNodes) Reset() { - n.curr = n.beg - 1 -} - -// NodeSlice returns all the remaining nodes in the iterator and advances -// the iterator. -func (n *ImplicitNodes) NodeSlice() []graph.Node { - nodes := make([]graph.Node, 0, n.Len()) - for n.curr++; n.curr < n.end; n.curr++ { - nodes = append(nodes, n.newNode(n.curr)) - } - return nodes -} diff --git a/vendor/gonum.org/v1/gonum/graph/multigraph.go b/vendor/gonum.org/v1/gonum/graph/multigraph.go deleted file mode 100644 index 038a3d515f..0000000000 --- a/vendor/gonum.org/v1/gonum/graph/multigraph.go +++ /dev/null @@ -1,198 +0,0 @@ -// Copyright ©2014 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package graph - -// Line is an edge in a multigraph. A Line returns an ID that must -// distinguish Lines sharing Node end points. -type Line interface { - // From returns the from node of the edge. - From() Node - - // To returns the to node of the edge. - To() Node - - // ReversedLine returns a line that has the - // end points of the receiver swapped. - ReversedLine() Line - - // ID returns the unique ID for the Line. - ID() int64 -} - -// WeightedLine is a weighted multigraph edge. -type WeightedLine interface { - Line - Weight() float64 -} - -// Multigraph is a generalized multigraph. -type Multigraph interface { - // Node returns the node with the given ID if it exists - // in the multigraph, and nil otherwise. - Node(id int64) Node - - // Nodes returns all the nodes in the multigraph. - // - // Nodes must not return nil. - Nodes() Nodes - - // From returns all nodes that can be reached directly - // from the node with the given ID. - // - // From must not return nil. - From(id int64) Nodes - - // HasEdgeBetween returns whether an edge exists between - // nodes with IDs xid and yid without considering direction. - HasEdgeBetween(xid, yid int64) bool - - // Lines returns the lines from u to v, with IDs uid and - // vid, if any such lines exist and nil otherwise. The - // node v must be directly reachable from u as defined by - // the From method. - // - // Lines must not return nil. - Lines(uid, vid int64) Lines -} - -// WeightedMultigraph is a weighted multigraph. -type WeightedMultigraph interface { - Multigraph - - // WeightedLines returns the weighted lines from u to v - // with IDs uid and vid if any such lines exist and nil - // otherwise. The node v must be directly reachable - // from u as defined by the From method. - // - // WeightedLines must not return nil. - WeightedLines(uid, vid int64) WeightedLines -} - -// UndirectedMultigraph is an undirected multigraph. -type UndirectedMultigraph interface { - Multigraph - - // LinesBetween returns the lines between nodes x and y - // with IDs xid and yid. - // - // LinesBetween must not return nil. - LinesBetween(xid, yid int64) Lines -} - -// WeightedUndirectedMultigraph is a weighted undirected multigraph. -type WeightedUndirectedMultigraph interface { - WeightedMultigraph - - // WeightedLinesBetween returns the lines between nodes - // x and y with IDs xid and yid. - // - // WeightedLinesBetween must not return nil. - WeightedLinesBetween(xid, yid int64) WeightedLines -} - -// DirectedMultigraph is a directed multigraph. -type DirectedMultigraph interface { - Multigraph - - // HasEdgeFromTo returns whether an edge exists - // in the multigraph from u to v with IDs uid - // and vid. - HasEdgeFromTo(uid, vid int64) bool - - // To returns all nodes that can reach directly - // to the node with the given ID. - // - // To must not return nil. - To(id int64) Nodes -} - -// WeightedDirectedMultigraph is a weighted directed multigraph. -type WeightedDirectedMultigraph interface { - WeightedMultigraph - - // HasEdgeFromTo returns whether an edge exists - // in the multigraph from u to v with IDs uid - // and vid. - HasEdgeFromTo(uid, vid int64) bool - - // To returns all nodes that can reach directly - // to the node with the given ID. - // - // To must not return nil. - To(id int64) Nodes -} - -// LineAdder is an interface for adding lines to a multigraph. -type LineAdder interface { - // NewLine returns a new Line from the source to the destination node. - NewLine(from, to Node) Line - - // SetLine adds a Line from one node to another. - // If the multigraph supports node addition the nodes - // will be added if they do not exist, otherwise - // SetLine will panic. - // Whether l, l.From() and l.To() are stored - // within the graph is implementation dependent. - SetLine(l Line) -} - -// WeightedLineAdder is an interface for adding lines to a multigraph. -type WeightedLineAdder interface { - // NewWeightedLine returns a new WeightedLine from - // the source to the destination node. - NewWeightedLine(from, to Node, weight float64) WeightedLine - - // SetWeightedLine adds a weighted line from one node - // to another. If the multigraph supports node addition - // the nodes will be added if they do not exist, - // otherwise SetWeightedLine will panic. - // Whether l, l.From() and l.To() are stored - // within the graph is implementation dependent. - SetWeightedLine(l WeightedLine) -} - -// LineRemover is an interface for removing lines from a multigraph. -type LineRemover interface { - // RemoveLine removes the line with the given end - // and line IDs, leaving the terminal nodes. If - // the line does not exist it is a no-op. - RemoveLine(fid, tid, id int64) -} - -// MultigraphBuilder is a multigraph that can have nodes and lines added. -type MultigraphBuilder interface { - NodeAdder - LineAdder -} - -// WeightedMultigraphBuilder is a multigraph that can have nodes and weighted lines added. -type WeightedMultigraphBuilder interface { - NodeAdder - WeightedLineAdder -} - -// UndirectedMultgraphBuilder is an undirected multigraph builder. -type UndirectedMultigraphBuilder interface { - UndirectedMultigraph - MultigraphBuilder -} - -// UndirectedWeightedMultigraphBuilder is an undirected weighted multigraph builder. -type UndirectedWeightedMultigraphBuilder interface { - UndirectedMultigraph - WeightedMultigraphBuilder -} - -// DirectedMultigraphBuilder is a directed multigraph builder. -type DirectedMultigraphBuilder interface { - DirectedMultigraph - MultigraphBuilder -} - -// DirectedWeightedMultigraphBuilder is a directed weighted multigraph builder. -type DirectedWeightedMultigraphBuilder interface { - DirectedMultigraph - WeightedMultigraphBuilder -} diff --git a/vendor/gonum.org/v1/gonum/graph/nodes_edges.go b/vendor/gonum.org/v1/gonum/graph/nodes_edges.go deleted file mode 100644 index 3d5dae1fa1..0000000000 --- a/vendor/gonum.org/v1/gonum/graph/nodes_edges.go +++ /dev/null @@ -1,300 +0,0 @@ -// Copyright ©2018 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package graph - -// Iterator is an item iterator. -type Iterator interface { - // Next advances the iterator and returns whether - // the next call to the item method will return a - // non-nil item. - // - // Next should be called prior to any call to the - // iterator's item retrieval method after the - // iterator has been obtained or reset. - // - // The order of iteration is implementation - // dependent. - Next() bool - - // Len returns the number of items remaining in the - // iterator. - // - // If the number of items in the iterator is unknown, - // too large to materialize or too costly to calculate - // then Len may return a negative value. - // In this case the consuming function must be able - // to operate on the items of the iterator directly - // without materializing the items into a slice. - // The magnitude of a negative length has - // implementation-dependent semantics. - Len() int - - // Reset returns the iterator to its start position. - Reset() -} - -// Nodes is a Node iterator. -type Nodes interface { - Iterator - - // Node returns the current Node from the iterator. - Node() Node -} - -// NodeSlicer wraps the NodeSlice method. -type NodeSlicer interface { - // NodeSlice returns the set of nodes remaining - // to be iterated by a Nodes iterator. - // The holder of the iterator may arbitrarily - // change elements in the returned slice, but - // those changes may be reflected to other - // iterators. - NodeSlice() []Node -} - -// NodesOf returns it.Len() nodes from it. If it is a NodeSlicer, the NodeSlice method -// is used to obtain the nodes. It is safe to pass a nil Nodes to NodesOf. -// -// If the Nodes has an indeterminate length, NodesOf will panic. -func NodesOf(it Nodes) []Node { - if it == nil { - return nil - } - len := it.Len() - switch { - case len == 0: - return nil - case len < 0: - panic("graph: called NodesOf on indeterminate iterator") - } - switch it := it.(type) { - case NodeSlicer: - return it.NodeSlice() - } - n := make([]Node, 0, len) - for it.Next() { - n = append(n, it.Node()) - } - return n -} - -// Edges is an Edge iterator. -type Edges interface { - Iterator - - // Edge returns the current Edge from the iterator. - Edge() Edge -} - -// EdgeSlicer wraps the EdgeSlice method. -type EdgeSlicer interface { - // EdgeSlice returns the set of edges remaining - // to be iterated by an Edges iterator. - // The holder of the iterator may arbitrarily - // change elements in the returned slice, but - // those changes may be reflected to other - // iterators. - EdgeSlice() []Edge -} - -// EdgesOf returns it.Len() nodes from it. If it is an EdgeSlicer, the EdgeSlice method is used -// to obtain the edges. It is safe to pass a nil Edges to EdgesOf. -// -// If the Edges has an indeterminate length, EdgesOf will panic. -func EdgesOf(it Edges) []Edge { - if it == nil { - return nil - } - len := it.Len() - switch { - case len == 0: - return nil - case len < 0: - panic("graph: called EdgesOf on indeterminate iterator") - } - switch it := it.(type) { - case EdgeSlicer: - return it.EdgeSlice() - } - e := make([]Edge, 0, len) - for it.Next() { - e = append(e, it.Edge()) - } - return e -} - -// WeightedEdges is a WeightedEdge iterator. -type WeightedEdges interface { - Iterator - - // Edge returns the current Edge from the iterator. - WeightedEdge() WeightedEdge -} - -// WeightedEdgeSlicer wraps the WeightedEdgeSlice method. -type WeightedEdgeSlicer interface { - // EdgeSlice returns the set of edges remaining - // to be iterated by an Edges iterator. - // The holder of the iterator may arbitrarily - // change elements in the returned slice, but - // those changes may be reflected to other - // iterators. - WeightedEdgeSlice() []WeightedEdge -} - -// WeightedEdgesOf returns it.Len() weighted edge from it. If it is a WeightedEdgeSlicer, the -// WeightedEdgeSlice method is used to obtain the edges. It is safe to pass a nil WeightedEdges -// to WeightedEdgesOf. -// -// If the WeightedEdges has an indeterminate length, WeightedEdgesOf will panic. -func WeightedEdgesOf(it WeightedEdges) []WeightedEdge { - if it == nil { - return nil - } - len := it.Len() - switch { - case len == 0: - return nil - case len < 0: - panic("graph: called WeightedEdgesOf on indeterminate iterator") - } - switch it := it.(type) { - case WeightedEdgeSlicer: - return it.WeightedEdgeSlice() - } - e := make([]WeightedEdge, 0, len) - for it.Next() { - e = append(e, it.WeightedEdge()) - } - return e -} - -// Lines is a Line iterator. -type Lines interface { - Iterator - - // Line returns the current Line from the iterator. - Line() Line -} - -// LineSlicer wraps the LineSlice method. -type LineSlicer interface { - // LineSlice returns the set of lines remaining - // to be iterated by an Lines iterator. - // The holder of the iterator may arbitrarily - // change elements in the returned slice, but - // those changes may be reflected to other - // iterators. - LineSlice() []Line -} - -// LinesOf returns it.Len() nodes from it. If it is a LineSlicer, the LineSlice method is used -// to obtain the lines. It is safe to pass a nil Lines to LinesOf. -// -// If the Lines has an indeterminate length, LinesOf will panic. -func LinesOf(it Lines) []Line { - if it == nil { - return nil - } - len := it.Len() - switch { - case len == 0: - return nil - case len < 0: - panic("graph: called LinesOf on indeterminate iterator") - } - switch it := it.(type) { - case LineSlicer: - return it.LineSlice() - } - l := make([]Line, 0, len) - for it.Next() { - l = append(l, it.Line()) - } - return l -} - -// WeightedLines is a WeightedLine iterator. -type WeightedLines interface { - Iterator - - // Line returns the current Line from the iterator. - WeightedLine() WeightedLine -} - -// WeightedLineSlicer wraps the WeightedLineSlice method. -type WeightedLineSlicer interface { - // LineSlice returns the set of lines remaining - // to be iterated by an Lines iterator. - // The holder of the iterator may arbitrarily - // change elements in the returned slice, but - // those changes may be reflected to other - // iterators. - WeightedLineSlice() []WeightedLine -} - -// WeightedLinesOf returns it.Len() weighted line from it. If it is a WeightedLineSlicer, the -// WeightedLineSlice method is used to obtain the lines. It is safe to pass a nil WeightedLines -// to WeightedLinesOf. -// -// If the WeightedLines has an indeterminate length, WeightedLinesOf will panic. -func WeightedLinesOf(it WeightedLines) []WeightedLine { - if it == nil { - return nil - } - len := it.Len() - switch { - case len == 0: - return nil - case len < 0: - panic("graph: called WeightedLinesOf on indeterminate iterator") - } - switch it := it.(type) { - case WeightedLineSlicer: - return it.WeightedLineSlice() - } - l := make([]WeightedLine, 0, len) - for it.Next() { - l = append(l, it.WeightedLine()) - } - return l -} - -// Empty is an empty set of nodes, edges or lines. It should be used when -// a graph returns a zero-length Iterator. Empty implements the slicer -// interfaces for nodes, edges and lines, returning nil for each of these. -const Empty = nothing - -var ( - _ Iterator = Empty - _ Nodes = Empty - _ NodeSlicer = Empty - _ Edges = Empty - _ EdgeSlicer = Empty - _ WeightedEdges = Empty - _ WeightedEdgeSlicer = Empty - _ Lines = Empty - _ LineSlicer = Empty - _ WeightedLines = Empty - _ WeightedLineSlicer = Empty -) - -const nothing = empty(true) - -type empty bool - -func (empty) Next() bool { return false } -func (empty) Len() int { return 0 } -func (empty) Reset() {} -func (empty) Node() Node { return nil } -func (empty) NodeSlice() []Node { return nil } -func (empty) Edge() Edge { return nil } -func (empty) EdgeSlice() []Edge { return nil } -func (empty) WeightedEdge() WeightedEdge { return nil } -func (empty) WeightedEdgeSlice() []WeightedEdge { return nil } -func (empty) Line() Line { return nil } -func (empty) LineSlice() []Line { return nil } -func (empty) WeightedLine() WeightedLine { return nil } -func (empty) WeightedLineSlice() []WeightedLine { return nil } diff --git a/vendor/gonum.org/v1/gonum/graph/simple/dense_directed_matrix.go b/vendor/gonum.org/v1/gonum/graph/simple/dense_directed_matrix.go deleted file mode 100644 index 3daca9adec..0000000000 --- a/vendor/gonum.org/v1/gonum/graph/simple/dense_directed_matrix.go +++ /dev/null @@ -1,301 +0,0 @@ -// Copyright ©2014 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package simple - -import ( - "sort" - - "gonum.org/v1/gonum/graph" - "gonum.org/v1/gonum/graph/internal/ordered" - "gonum.org/v1/gonum/graph/iterator" - "gonum.org/v1/gonum/mat" -) - -var ( - dm *DirectedMatrix - - _ graph.Graph = dm - _ graph.Directed = dm - _ edgeSetter = dm - _ weightedEdgeSetter = dm -) - -// DirectedMatrix represents a directed graph using an adjacency -// matrix such that all IDs are in a contiguous block from 0 to n-1. -// Edges are stored implicitly as an edge weight, so edges stored in -// the graph are not recoverable. -type DirectedMatrix struct { - mat *mat.Dense - nodes []graph.Node - - self float64 - absent float64 -} - -// NewDirectedMatrix creates a directed dense graph with n nodes. -// All edges are initialized with the weight given by init. The self parameter -// specifies the cost of self connection, and absent specifies the weight -// returned for absent edges. -func NewDirectedMatrix(n int, init, self, absent float64) *DirectedMatrix { - matrix := make([]float64, n*n) - if init != 0 { - for i := range matrix { - matrix[i] = init - } - } - for i := 0; i < len(matrix); i += n + 1 { - matrix[i] = self - } - return &DirectedMatrix{ - mat: mat.NewDense(n, n, matrix), - self: self, - absent: absent, - } -} - -// NewDirectedMatrixFrom creates a directed dense graph with the given nodes. -// The IDs of the nodes must be contiguous from 0 to len(nodes)-1, but may -// be in any order. If IDs are not contiguous NewDirectedMatrixFrom will panic. -// All edges are initialized with the weight given by init. The self parameter -// specifies the cost of self connection, and absent specifies the weight -// returned for absent edges. -func NewDirectedMatrixFrom(nodes []graph.Node, init, self, absent float64) *DirectedMatrix { - sort.Sort(ordered.ByID(nodes)) - for i, n := range nodes { - if int64(i) != n.ID() { - panic("simple: non-contiguous node IDs") - } - } - g := NewDirectedMatrix(len(nodes), init, self, absent) - g.nodes = nodes - return g -} - -// Edge returns the edge from u to v if such an edge exists and nil otherwise. -// The node v must be directly reachable from u as defined by the From method. -func (g *DirectedMatrix) Edge(uid, vid int64) graph.Edge { - return g.WeightedEdge(uid, vid) -} - -// Edges returns all the edges in the graph. -func (g *DirectedMatrix) Edges() graph.Edges { - var edges []graph.Edge - r, _ := g.mat.Dims() - for i := 0; i < r; i++ { - for j := 0; j < r; j++ { - if i == j { - continue - } - if w := g.mat.At(i, j); !isSame(w, g.absent) { - edges = append(edges, WeightedEdge{F: g.Node(int64(i)), T: g.Node(int64(j)), W: w}) - } - } - } - if len(edges) == 0 { - return graph.Empty - } - return iterator.NewOrderedEdges(edges) -} - -// From returns all nodes in g that can be reached directly from n. -func (g *DirectedMatrix) From(id int64) graph.Nodes { - if !g.has(id) { - return graph.Empty - } - var nodes []graph.Node - _, c := g.mat.Dims() - for j := 0; j < c; j++ { - if int64(j) == id { - continue - } - // id is not greater than maximum int by this point. - if !isSame(g.mat.At(int(id), j), g.absent) { - nodes = append(nodes, g.Node(int64(j))) - } - } - if len(nodes) == 0 { - return graph.Empty - } - return iterator.NewOrderedNodes(nodes) -} - -// HasEdgeBetween returns whether an edge exists between nodes x and y without -// considering direction. -func (g *DirectedMatrix) HasEdgeBetween(xid, yid int64) bool { - if !g.has(xid) { - return false - } - if !g.has(yid) { - return false - } - // xid and yid are not greater than maximum int by this point. - return xid != yid && (!isSame(g.mat.At(int(xid), int(yid)), g.absent) || !isSame(g.mat.At(int(yid), int(xid)), g.absent)) -} - -// HasEdgeFromTo returns whether an edge exists in the graph from u to v. -func (g *DirectedMatrix) HasEdgeFromTo(uid, vid int64) bool { - if !g.has(uid) { - return false - } - if !g.has(vid) { - return false - } - // uid and vid are not greater than maximum int by this point. - return uid != vid && !isSame(g.mat.At(int(uid), int(vid)), g.absent) -} - -// Matrix returns the mat.Matrix representation of the graph. The orientation -// of the matrix is such that the matrix entry at G_{ij} is the weight of the edge -// from node i to node j. -func (g *DirectedMatrix) Matrix() mat.Matrix { - // Prevent alteration of dimensions of the returned matrix. - m := *g.mat - return &m -} - -// Node returns the node with the given ID if it exists in the graph, -// and nil otherwise. -func (g *DirectedMatrix) Node(id int64) graph.Node { - if !g.has(id) { - return nil - } - if g.nodes == nil { - return Node(id) - } - return g.nodes[id] -} - -// Nodes returns all the nodes in the graph. -func (g *DirectedMatrix) Nodes() graph.Nodes { - if g.nodes != nil { - nodes := make([]graph.Node, len(g.nodes)) - copy(nodes, g.nodes) - return iterator.NewOrderedNodes(nodes) - } - r, _ := g.mat.Dims() - // Matrix graphs must have at least one node. - return iterator.NewImplicitNodes(0, r, newSimpleNode) -} - -// RemoveEdge removes the edge with the given end point nodes from the graph, leaving the terminal -// nodes. If the edge does not exist it is a no-op. -func (g *DirectedMatrix) RemoveEdge(fid, tid int64) { - if !g.has(fid) { - return - } - if !g.has(tid) { - return - } - // fid and tid are not greater than maximum int by this point. - g.mat.Set(int(fid), int(tid), g.absent) -} - -// SetEdge sets e, an edge from one node to another with unit weight. If the ends of the edge -// are not in g or the edge is a self loop, SetEdge panics. SetEdge will store the nodes of -// e in the graph if it was initialized with NewDirectedMatrixFrom. -func (g *DirectedMatrix) SetEdge(e graph.Edge) { - g.setWeightedEdge(e, 1) -} - -// SetWeightedEdge sets e, an edge from one node to another. If the ends of the edge are not in g -// or the edge is a self loop, SetWeightedEdge panics. SetWeightedEdge will store the nodes of -// e in the graph if it was initialized with NewDirectedMatrixFrom. -func (g *DirectedMatrix) SetWeightedEdge(e graph.WeightedEdge) { - g.setWeightedEdge(e, e.Weight()) -} - -func (g *DirectedMatrix) setWeightedEdge(e graph.Edge, weight float64) { - from := e.From() - fid := from.ID() - to := e.To() - tid := to.ID() - if fid == tid { - panic("simple: set illegal edge") - } - if int64(int(fid)) != fid { - panic("simple: unavailable from node ID for dense graph") - } - if int64(int(tid)) != tid { - panic("simple: unavailable to node ID for dense graph") - } - if g.nodes != nil { - g.nodes[fid] = from - g.nodes[tid] = to - } - // fid and tid are not greater than maximum int by this point. - g.mat.Set(int(fid), int(tid), weight) -} - -// To returns all nodes in g that can reach directly to n. -func (g *DirectedMatrix) To(id int64) graph.Nodes { - if !g.has(id) { - return graph.Empty - } - var nodes []graph.Node - r, _ := g.mat.Dims() - for i := 0; i < r; i++ { - if int64(i) == id { - continue - } - // id is not greater than maximum int by this point. - if !isSame(g.mat.At(i, int(id)), g.absent) { - nodes = append(nodes, g.Node(int64(i))) - } - } - if len(nodes) == 0 { - return graph.Empty - } - return iterator.NewOrderedNodes(nodes) -} - -// Weight returns the weight for the edge between x and y if Edge(x, y) returns a non-nil Edge. -// If x and y are the same node or there is no joining edge between the two nodes the weight -// value returned is either the graph's absent or self value. Weight returns true if an edge -// exists between x and y or if x and y have the same ID, false otherwise. -func (g *DirectedMatrix) Weight(xid, yid int64) (w float64, ok bool) { - if xid == yid { - return g.self, true - } - if g.HasEdgeFromTo(xid, yid) { - // xid and yid are not greater than maximum int by this point. - return g.mat.At(int(xid), int(yid)), true - } - return g.absent, false -} - -// WeightedEdge returns the weighted edge from u to v if such an edge exists and nil otherwise. -// The node v must be directly reachable from u as defined by the From method. -func (g *DirectedMatrix) WeightedEdge(uid, vid int64) graph.WeightedEdge { - if g.HasEdgeFromTo(uid, vid) { - // xid and yid are not greater than maximum int by this point. - return WeightedEdge{F: g.Node(uid), T: g.Node(vid), W: g.mat.At(int(uid), int(vid))} - } - return nil -} - -// WeightedEdges returns all the edges in the graph. -func (g *DirectedMatrix) WeightedEdges() graph.WeightedEdges { - var edges []graph.WeightedEdge - r, _ := g.mat.Dims() - for i := 0; i < r; i++ { - for j := 0; j < r; j++ { - if i == j { - continue - } - if w := g.mat.At(i, j); !isSame(w, g.absent) { - edges = append(edges, WeightedEdge{F: g.Node(int64(i)), T: g.Node(int64(j)), W: w}) - } - } - } - if len(edges) == 0 { - return graph.Empty - } - return iterator.NewOrderedWeightedEdges(edges) -} - -func (g *DirectedMatrix) has(id int64) bool { - r, _ := g.mat.Dims() - return 0 <= id && id < int64(r) -} diff --git a/vendor/gonum.org/v1/gonum/graph/simple/dense_undirected_matrix.go b/vendor/gonum.org/v1/gonum/graph/simple/dense_undirected_matrix.go deleted file mode 100644 index f51debb4fc..0000000000 --- a/vendor/gonum.org/v1/gonum/graph/simple/dense_undirected_matrix.go +++ /dev/null @@ -1,268 +0,0 @@ -// Copyright ©2014 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package simple - -import ( - "sort" - - "gonum.org/v1/gonum/graph" - "gonum.org/v1/gonum/graph/internal/ordered" - "gonum.org/v1/gonum/graph/iterator" - "gonum.org/v1/gonum/mat" -) - -var ( - um *UndirectedMatrix - - _ graph.Graph = um - _ graph.Undirected = um - _ edgeSetter = um - _ weightedEdgeSetter = um -) - -// UndirectedMatrix represents an undirected graph using an adjacency -// matrix such that all IDs are in a contiguous block from 0 to n-1. -// Edges are stored implicitly as an edge weight, so edges stored in -// the graph are not recoverable. -type UndirectedMatrix struct { - mat *mat.SymDense - nodes []graph.Node - - self float64 - absent float64 -} - -// NewUndirectedMatrix creates an undirected dense graph with n nodes. -// All edges are initialized with the weight given by init. The self parameter -// specifies the cost of self connection, and absent specifies the weight -// returned for absent edges. -func NewUndirectedMatrix(n int, init, self, absent float64) *UndirectedMatrix { - matrix := make([]float64, n*n) - if init != 0 { - for i := range matrix { - matrix[i] = init - } - } - for i := 0; i < len(matrix); i += n + 1 { - matrix[i] = self - } - return &UndirectedMatrix{ - mat: mat.NewSymDense(n, matrix), - self: self, - absent: absent, - } -} - -// NewUndirectedMatrixFrom creates an undirected dense graph with the given nodes. -// The IDs of the nodes must be contiguous from 0 to len(nodes)-1, but may -// be in any order. If IDs are not contiguous NewUndirectedMatrixFrom will panic. -// All edges are initialized with the weight given by init. The self parameter -// specifies the cost of self connection, and absent specifies the weight -// returned for absent edges. -func NewUndirectedMatrixFrom(nodes []graph.Node, init, self, absent float64) *UndirectedMatrix { - sort.Sort(ordered.ByID(nodes)) - for i, n := range nodes { - if int64(i) != n.ID() { - panic("simple: non-contiguous node IDs") - } - } - g := NewUndirectedMatrix(len(nodes), init, self, absent) - g.nodes = nodes - return g -} - -// Edge returns the edge from u to v if such an edge exists and nil otherwise. -// The node v must be directly reachable from u as defined by the From method. -func (g *UndirectedMatrix) Edge(uid, vid int64) graph.Edge { - return g.WeightedEdgeBetween(uid, vid) -} - -// EdgeBetween returns the edge between nodes x and y. -func (g *UndirectedMatrix) EdgeBetween(uid, vid int64) graph.Edge { - return g.WeightedEdgeBetween(uid, vid) -} - -// Edges returns all the edges in the graph. -func (g *UndirectedMatrix) Edges() graph.Edges { - var edges []graph.Edge - r, _ := g.mat.Dims() - for i := 0; i < r; i++ { - for j := i + 1; j < r; j++ { - if w := g.mat.At(i, j); !isSame(w, g.absent) { - edges = append(edges, WeightedEdge{F: g.Node(int64(i)), T: g.Node(int64(j)), W: w}) - } - } - } - if len(edges) == 0 { - return graph.Empty - } - return iterator.NewOrderedEdges(edges) -} - -// From returns all nodes in g that can be reached directly from n. -func (g *UndirectedMatrix) From(id int64) graph.Nodes { - if !g.has(id) { - return graph.Empty - } - var nodes []graph.Node - r := g.mat.Symmetric() - for i := 0; i < r; i++ { - if int64(i) == id { - continue - } - // id is not greater than maximum int by this point. - if !isSame(g.mat.At(int(id), i), g.absent) { - nodes = append(nodes, g.Node(int64(i))) - } - } - if len(nodes) == 0 { - return graph.Empty - } - return iterator.NewOrderedNodes(nodes) -} - -// HasEdgeBetween returns whether an edge exists between nodes x and y. -func (g *UndirectedMatrix) HasEdgeBetween(uid, vid int64) bool { - if !g.has(uid) { - return false - } - if !g.has(vid) { - return false - } - // uid and vid are not greater than maximum int by this point. - return uid != vid && !isSame(g.mat.At(int(uid), int(vid)), g.absent) -} - -// Matrix returns the mat.Matrix representation of the graph. -func (g *UndirectedMatrix) Matrix() mat.Matrix { - // Prevent alteration of dimensions of the returned matrix. - m := *g.mat - return &m -} - -// Node returns the node with the given ID if it exists in the graph, -// and nil otherwise. -func (g *UndirectedMatrix) Node(id int64) graph.Node { - if !g.has(id) { - return nil - } - if g.nodes == nil { - return Node(id) - } - return g.nodes[id] -} - -// Nodes returns all the nodes in the graph. -func (g *UndirectedMatrix) Nodes() graph.Nodes { - if g.nodes != nil { - nodes := make([]graph.Node, len(g.nodes)) - copy(nodes, g.nodes) - return iterator.NewOrderedNodes(nodes) - } - r := g.mat.Symmetric() - // Matrix graphs must have at least one node. - return iterator.NewImplicitNodes(0, r, newSimpleNode) -} - -// RemoveEdge removes the edge with the given end point IDs from the graph, leaving the terminal -// nodes. If the edge does not exist it is a no-op. -func (g *UndirectedMatrix) RemoveEdge(fid, tid int64) { - if !g.has(fid) { - return - } - if !g.has(tid) { - return - } - // fid and tid are not greater than maximum int by this point. - g.mat.SetSym(int(fid), int(tid), g.absent) -} - -// SetEdge sets e, an edge from one node to another with unit weight. If the ends of the edge are -// not in g or the edge is a self loop, SetEdge panics. SetEdge will store the nodes of -// e in the graph if it was initialized with NewUndirectedMatrixFrom. -func (g *UndirectedMatrix) SetEdge(e graph.Edge) { - g.setWeightedEdge(e, 1) -} - -// SetWeightedEdge sets e, an edge from one node to another. If the ends of the edge are not in g -// or the edge is a self loop, SetWeightedEdge panics. SetWeightedEdge will store the nodes of -// e in the graph if it was initialized with NewUndirectedMatrixFrom. -func (g *UndirectedMatrix) SetWeightedEdge(e graph.WeightedEdge) { - g.setWeightedEdge(e, e.Weight()) -} - -func (g *UndirectedMatrix) setWeightedEdge(e graph.Edge, weight float64) { - from := e.From() - fid := from.ID() - to := e.To() - tid := to.ID() - if fid == tid { - panic("simple: set illegal edge") - } - if int64(int(fid)) != fid { - panic("simple: unavailable from node ID for dense graph") - } - if int64(int(tid)) != tid { - panic("simple: unavailable to node ID for dense graph") - } - if g.nodes != nil { - g.nodes[fid] = from - g.nodes[tid] = to - } - // fid and tid are not greater than maximum int by this point. - g.mat.SetSym(int(fid), int(tid), weight) -} - -// Weight returns the weight for the edge between x and y if Edge(x, y) returns a non-nil Edge. -// If x and y are the same node or there is no joining edge between the two nodes the weight -// value returned is either the graph's absent or self value. Weight returns true if an edge -// exists between x and y or if x and y have the same ID, false otherwise. -func (g *UndirectedMatrix) Weight(xid, yid int64) (w float64, ok bool) { - if xid == yid { - return g.self, true - } - if g.HasEdgeBetween(xid, yid) { - // xid and yid are not greater than maximum int by this point. - return g.mat.At(int(xid), int(yid)), true - } - return g.absent, false -} - -// WeightedEdge returns the weighted edge from u to v if such an edge exists and nil otherwise. -// The node v must be directly reachable from u as defined by the From method. -func (g *UndirectedMatrix) WeightedEdge(uid, vid int64) graph.WeightedEdge { - return g.WeightedEdgeBetween(uid, vid) -} - -// WeightedEdgeBetween returns the weighted edge between nodes x and y. -func (g *UndirectedMatrix) WeightedEdgeBetween(uid, vid int64) graph.WeightedEdge { - if g.HasEdgeBetween(uid, vid) { - // uid and vid are not greater than maximum int by this point. - return WeightedEdge{F: g.Node(uid), T: g.Node(vid), W: g.mat.At(int(uid), int(vid))} - } - return nil -} - -// WeightedEdges returns all the edges in the graph. -func (g *UndirectedMatrix) WeightedEdges() graph.WeightedEdges { - var edges []graph.WeightedEdge - r, _ := g.mat.Dims() - for i := 0; i < r; i++ { - for j := i + 1; j < r; j++ { - if w := g.mat.At(i, j); !isSame(w, g.absent) { - edges = append(edges, WeightedEdge{F: g.Node(int64(i)), T: g.Node(int64(j)), W: w}) - } - } - } - if len(edges) == 0 { - return graph.Empty - } - return iterator.NewOrderedWeightedEdges(edges) -} - -func (g *UndirectedMatrix) has(id int64) bool { - r := g.mat.Symmetric() - return 0 <= id && id < int64(r) -} diff --git a/vendor/gonum.org/v1/gonum/graph/simple/directed.go b/vendor/gonum.org/v1/gonum/graph/simple/directed.go deleted file mode 100644 index f19efbd0a2..0000000000 --- a/vendor/gonum.org/v1/gonum/graph/simple/directed.go +++ /dev/null @@ -1,235 +0,0 @@ -// Copyright ©2014 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package simple - -import ( - "fmt" - - "gonum.org/v1/gonum/graph" - "gonum.org/v1/gonum/graph/internal/uid" - "gonum.org/v1/gonum/graph/iterator" -) - -var ( - dg *DirectedGraph - - _ graph.Graph = dg - _ graph.Directed = dg - _ graph.NodeAdder = dg - _ graph.NodeRemover = dg - _ graph.EdgeAdder = dg - _ graph.EdgeRemover = dg -) - -// DirectedGraph implements a generalized directed graph. -type DirectedGraph struct { - nodes map[int64]graph.Node - from map[int64]map[int64]graph.Edge - to map[int64]map[int64]graph.Edge - - nodeIDs uid.Set -} - -// NewDirectedGraph returns a DirectedGraph. -func NewDirectedGraph() *DirectedGraph { - return &DirectedGraph{ - nodes: make(map[int64]graph.Node), - from: make(map[int64]map[int64]graph.Edge), - to: make(map[int64]map[int64]graph.Edge), - - nodeIDs: uid.NewSet(), - } -} - -// AddNode adds n to the graph. It panics if the added node ID matches an existing node ID. -func (g *DirectedGraph) AddNode(n graph.Node) { - if _, exists := g.nodes[n.ID()]; exists { - panic(fmt.Sprintf("simple: node ID collision: %d", n.ID())) - } - g.nodes[n.ID()] = n - g.from[n.ID()] = make(map[int64]graph.Edge) - g.to[n.ID()] = make(map[int64]graph.Edge) - g.nodeIDs.Use(n.ID()) -} - -// Edge returns the edge from u to v if such an edge exists and nil otherwise. -// The node v must be directly reachable from u as defined by the From method. -func (g *DirectedGraph) Edge(uid, vid int64) graph.Edge { - edge, ok := g.from[uid][vid] - if !ok { - return nil - } - return edge -} - -// Edges returns all the edges in the graph. -func (g *DirectedGraph) Edges() graph.Edges { - var edges []graph.Edge - for _, u := range g.nodes { - for _, e := range g.from[u.ID()] { - edges = append(edges, e) - } - } - if len(edges) == 0 { - return graph.Empty - } - return iterator.NewOrderedEdges(edges) -} - -// From returns all nodes in g that can be reached directly from n. -func (g *DirectedGraph) From(id int64) graph.Nodes { - if _, ok := g.from[id]; !ok { - return graph.Empty - } - - from := make([]graph.Node, len(g.from[id])) - i := 0 - for vid := range g.from[id] { - from[i] = g.nodes[vid] - i++ - } - if len(from) == 0 { - return graph.Empty - } - return iterator.NewOrderedNodes(from) -} - -// HasEdgeBetween returns whether an edge exists between nodes x and y without -// considering direction. -func (g *DirectedGraph) HasEdgeBetween(xid, yid int64) bool { - if _, ok := g.from[xid][yid]; ok { - return true - } - _, ok := g.from[yid][xid] - return ok -} - -// HasEdgeFromTo returns whether an edge exists in the graph from u to v. -func (g *DirectedGraph) HasEdgeFromTo(uid, vid int64) bool { - if _, ok := g.from[uid][vid]; !ok { - return false - } - return true -} - -// NewEdge returns a new Edge from the source to the destination node. -func (g *DirectedGraph) NewEdge(from, to graph.Node) graph.Edge { - return &Edge{F: from, T: to} -} - -// NewNode returns a new unique Node to be added to g. The Node's ID does -// not become valid in g until the Node is added to g. -func (g *DirectedGraph) NewNode() graph.Node { - if len(g.nodes) == 0 { - return Node(0) - } - if int64(len(g.nodes)) == uid.Max { - panic("simple: cannot allocate node: no slot") - } - return Node(g.nodeIDs.NewID()) -} - -// Node returns the node with the given ID if it exists in the graph, -// and nil otherwise. -func (g *DirectedGraph) Node(id int64) graph.Node { - return g.nodes[id] -} - -// Nodes returns all the nodes in the graph. -func (g *DirectedGraph) Nodes() graph.Nodes { - if len(g.nodes) == 0 { - return graph.Empty - } - nodes := make([]graph.Node, len(g.nodes)) - i := 0 - for _, n := range g.nodes { - nodes[i] = n - i++ - } - return iterator.NewOrderedNodes(nodes) -} - -// RemoveEdge removes the edge with the given end point IDs from the graph, leaving the terminal -// nodes. If the edge does not exist it is a no-op. -func (g *DirectedGraph) RemoveEdge(fid, tid int64) { - if _, ok := g.nodes[fid]; !ok { - return - } - if _, ok := g.nodes[tid]; !ok { - return - } - - delete(g.from[fid], tid) - delete(g.to[tid], fid) -} - -// RemoveNode removes the node with the given ID from the graph, as well as any edges attached -// to it. If the node is not in the graph it is a no-op. -func (g *DirectedGraph) RemoveNode(id int64) { - if _, ok := g.nodes[id]; !ok { - return - } - delete(g.nodes, id) - - for from := range g.from[id] { - delete(g.to[from], id) - } - delete(g.from, id) - - for to := range g.to[id] { - delete(g.from[to], id) - } - delete(g.to, id) - - g.nodeIDs.Release(id) -} - -// SetEdge adds e, an edge from one node to another. If the nodes do not exist, they are added -// and are set to the nodes of the edge otherwise. -// It will panic if the IDs of the e.From and e.To are equal. -func (g *DirectedGraph) SetEdge(e graph.Edge) { - var ( - from = e.From() - fid = from.ID() - to = e.To() - tid = to.ID() - ) - - if fid == tid { - panic("simple: adding self edge") - } - - if _, ok := g.nodes[fid]; !ok { - g.AddNode(from) - } else { - g.nodes[fid] = from - } - if _, ok := g.nodes[tid]; !ok { - g.AddNode(to) - } else { - g.nodes[tid] = to - } - - g.from[fid][tid] = e - g.to[tid][fid] = e -} - -// To returns all nodes in g that can reach directly to n. -func (g *DirectedGraph) To(id int64) graph.Nodes { - if _, ok := g.from[id]; !ok { - return graph.Empty - } - - to := make([]graph.Node, len(g.to[id])) - i := 0 - for uid := range g.to[id] { - to[i] = g.nodes[uid] - i++ - } - if len(to) == 0 { - return graph.Empty - } - return iterator.NewOrderedNodes(to) -} diff --git a/vendor/gonum.org/v1/gonum/graph/simple/doc.go b/vendor/gonum.org/v1/gonum/graph/simple/doc.go deleted file mode 100644 index dc3f24c54f..0000000000 --- a/vendor/gonum.org/v1/gonum/graph/simple/doc.go +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright ©2017 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package simple provides a suite of simple graph implementations satisfying -// the gonum/graph interfaces. -// -// All types in simple return the graph.Empty value for empty iterators. -package simple // import "gonum.org/v1/gonum/graph/simple" diff --git a/vendor/gonum.org/v1/gonum/graph/simple/simple.go b/vendor/gonum.org/v1/gonum/graph/simple/simple.go deleted file mode 100644 index 3b45765877..0000000000 --- a/vendor/gonum.org/v1/gonum/graph/simple/simple.go +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright ©2014 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package simple - -import ( - "math" - - "gonum.org/v1/gonum/graph" -) - -// Node is a simple graph node. -type Node int64 - -// ID returns the ID number of the node. -func (n Node) ID() int64 { - return int64(n) -} - -func newSimpleNode(id int) graph.Node { - return Node(id) -} - -// Edge is a simple graph edge. -type Edge struct { - F, T graph.Node -} - -// From returns the from-node of the edge. -func (e Edge) From() graph.Node { return e.F } - -// To returns the to-node of the edge. -func (e Edge) To() graph.Node { return e.T } - -// ReversedLine returns a new Edge with the F and T fields -// swapped. -func (e Edge) ReversedEdge() graph.Edge { return Edge{F: e.T, T: e.F} } - -// WeightedEdge is a simple weighted graph edge. -type WeightedEdge struct { - F, T graph.Node - W float64 -} - -// From returns the from-node of the edge. -func (e WeightedEdge) From() graph.Node { return e.F } - -// To returns the to-node of the edge. -func (e WeightedEdge) To() graph.Node { return e.T } - -// ReversedLine returns a new Edge with the F and T fields -// swapped. The weight of the new Edge is the same as -// the weight of the receiver. -func (e WeightedEdge) ReversedEdge() graph.Edge { return WeightedEdge{F: e.T, T: e.F, W: e.W} } - -// Weight returns the weight of the edge. -func (e WeightedEdge) Weight() float64 { return e.W } - -// isSame returns whether two float64 values are the same where NaN values -// are equalable. -func isSame(a, b float64) bool { - return a == b || (math.IsNaN(a) && math.IsNaN(b)) -} - -type edgeSetter interface { - SetEdge(e graph.Edge) -} - -type weightedEdgeSetter interface { - SetWeightedEdge(e graph.WeightedEdge) -} diff --git a/vendor/gonum.org/v1/gonum/graph/simple/undirected.go b/vendor/gonum.org/v1/gonum/graph/simple/undirected.go deleted file mode 100644 index 841a8e380c..0000000000 --- a/vendor/gonum.org/v1/gonum/graph/simple/undirected.go +++ /dev/null @@ -1,216 +0,0 @@ -// Copyright ©2014 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package simple - -import ( - "fmt" - - "gonum.org/v1/gonum/graph" - "gonum.org/v1/gonum/graph/internal/uid" - "gonum.org/v1/gonum/graph/iterator" -) - -var ( - ug *UndirectedGraph - - _ graph.Graph = ug - _ graph.Undirected = ug - _ graph.NodeAdder = ug - _ graph.NodeRemover = ug - _ graph.EdgeAdder = ug - _ graph.EdgeRemover = ug -) - -// UndirectedGraph implements a generalized undirected graph. -type UndirectedGraph struct { - nodes map[int64]graph.Node - edges map[int64]map[int64]graph.Edge - - nodeIDs uid.Set -} - -// NewUndirectedGraph returns an UndirectedGraph. -func NewUndirectedGraph() *UndirectedGraph { - return &UndirectedGraph{ - nodes: make(map[int64]graph.Node), - edges: make(map[int64]map[int64]graph.Edge), - - nodeIDs: uid.NewSet(), - } -} - -// AddNode adds n to the graph. It panics if the added node ID matches an existing node ID. -func (g *UndirectedGraph) AddNode(n graph.Node) { - if _, exists := g.nodes[n.ID()]; exists { - panic(fmt.Sprintf("simple: node ID collision: %d", n.ID())) - } - g.nodes[n.ID()] = n - g.edges[n.ID()] = make(map[int64]graph.Edge) - g.nodeIDs.Use(n.ID()) -} - -// Edge returns the edge from u to v if such an edge exists and nil otherwise. -// The node v must be directly reachable from u as defined by the From method. -func (g *UndirectedGraph) Edge(uid, vid int64) graph.Edge { - return g.EdgeBetween(uid, vid) -} - -// EdgeBetween returns the edge between nodes x and y. -func (g *UndirectedGraph) EdgeBetween(xid, yid int64) graph.Edge { - edge, ok := g.edges[xid][yid] - if !ok { - return nil - } - if edge.From().ID() == xid { - return edge - } - return edge.ReversedEdge() -} - -// Edges returns all the edges in the graph. -func (g *UndirectedGraph) Edges() graph.Edges { - if len(g.edges) == 0 { - return graph.Empty - } - var edges []graph.Edge - seen := make(map[[2]int64]struct{}) - for _, u := range g.edges { - for _, e := range u { - uid := e.From().ID() - vid := e.To().ID() - if _, ok := seen[[2]int64{uid, vid}]; ok { - continue - } - seen[[2]int64{uid, vid}] = struct{}{} - seen[[2]int64{vid, uid}] = struct{}{} - edges = append(edges, e) - } - } - if len(edges) == 0 { - return graph.Empty - } - return iterator.NewOrderedEdges(edges) -} - -// From returns all nodes in g that can be reached directly from n. -func (g *UndirectedGraph) From(id int64) graph.Nodes { - if _, ok := g.nodes[id]; !ok { - return graph.Empty - } - - nodes := make([]graph.Node, len(g.edges[id])) - i := 0 - for from := range g.edges[id] { - nodes[i] = g.nodes[from] - i++ - } - if len(nodes) == 0 { - return graph.Empty - } - return iterator.NewOrderedNodes(nodes) -} - -// HasEdgeBetween returns whether an edge exists between nodes x and y. -func (g *UndirectedGraph) HasEdgeBetween(xid, yid int64) bool { - _, ok := g.edges[xid][yid] - return ok -} - -// NewEdge returns a new Edge from the source to the destination node. -func (g *UndirectedGraph) NewEdge(from, to graph.Node) graph.Edge { - return &Edge{F: from, T: to} -} - -// NewNode returns a new unique Node to be added to g. The Node's ID does -// not become valid in g until the Node is added to g. -func (g *UndirectedGraph) NewNode() graph.Node { - if len(g.nodes) == 0 { - return Node(0) - } - if int64(len(g.nodes)) == uid.Max { - panic("simple: cannot allocate node: no slot") - } - return Node(g.nodeIDs.NewID()) -} - -// Node returns the node with the given ID if it exists in the graph, -// and nil otherwise. -func (g *UndirectedGraph) Node(id int64) graph.Node { - return g.nodes[id] -} - -// Nodes returns all the nodes in the graph. -func (g *UndirectedGraph) Nodes() graph.Nodes { - if len(g.nodes) == 0 { - return graph.Empty - } - nodes := make([]graph.Node, len(g.nodes)) - i := 0 - for _, n := range g.nodes { - nodes[i] = n - i++ - } - return iterator.NewOrderedNodes(nodes) -} - -// RemoveEdge removes the edge with the given end IDs from the graph, leaving the terminal nodes. -// If the edge does not exist it is a no-op. -func (g *UndirectedGraph) RemoveEdge(fid, tid int64) { - if _, ok := g.nodes[fid]; !ok { - return - } - if _, ok := g.nodes[tid]; !ok { - return - } - - delete(g.edges[fid], tid) - delete(g.edges[tid], fid) -} - -// RemoveNode removes the node with the given ID from the graph, as well as any edges attached -// to it. If the node is not in the graph it is a no-op. -func (g *UndirectedGraph) RemoveNode(id int64) { - if _, ok := g.nodes[id]; !ok { - return - } - delete(g.nodes, id) - - for from := range g.edges[id] { - delete(g.edges[from], id) - } - delete(g.edges, id) - - g.nodeIDs.Release(id) -} - -// SetEdge adds e, an edge from one node to another. If the nodes do not exist, they are added -// and are set to the nodes of the edge otherwise. -// It will panic if the IDs of the e.From and e.To are equal. -func (g *UndirectedGraph) SetEdge(e graph.Edge) { - var ( - from = e.From() - fid = from.ID() - to = e.To() - tid = to.ID() - ) - - if fid == tid { - panic("simple: adding self edge") - } - - if _, ok := g.nodes[fid]; !ok { - g.AddNode(from) - } else { - g.nodes[fid] = from - } - if _, ok := g.nodes[tid]; !ok { - g.AddNode(to) - } else { - g.nodes[tid] = to - } - - g.edges[fid][tid] = e - g.edges[tid][fid] = e -} diff --git a/vendor/gonum.org/v1/gonum/graph/simple/weighted_directed.go b/vendor/gonum.org/v1/gonum/graph/simple/weighted_directed.go deleted file mode 100644 index 92bd2842fd..0000000000 --- a/vendor/gonum.org/v1/gonum/graph/simple/weighted_directed.go +++ /dev/null @@ -1,279 +0,0 @@ -// Copyright ©2014 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package simple - -import ( - "fmt" - - "gonum.org/v1/gonum/graph" - "gonum.org/v1/gonum/graph/internal/uid" - "gonum.org/v1/gonum/graph/iterator" -) - -var ( - wdg *WeightedDirectedGraph - - _ graph.Graph = wdg - _ graph.Weighted = wdg - _ graph.Directed = wdg - _ graph.WeightedDirected = wdg - _ graph.NodeAdder = wdg - _ graph.NodeRemover = wdg - _ graph.WeightedEdgeAdder = wdg - _ graph.EdgeRemover = wdg -) - -// WeightedDirectedGraph implements a generalized weighted directed graph. -type WeightedDirectedGraph struct { - nodes map[int64]graph.Node - from map[int64]map[int64]graph.WeightedEdge - to map[int64]map[int64]graph.WeightedEdge - - self, absent float64 - - nodeIDs uid.Set -} - -// NewWeightedDirectedGraph returns a WeightedDirectedGraph with the specified self and absent -// edge weight values. -func NewWeightedDirectedGraph(self, absent float64) *WeightedDirectedGraph { - return &WeightedDirectedGraph{ - nodes: make(map[int64]graph.Node), - from: make(map[int64]map[int64]graph.WeightedEdge), - to: make(map[int64]map[int64]graph.WeightedEdge), - - self: self, - absent: absent, - - nodeIDs: uid.NewSet(), - } -} - -// AddNode adds n to the graph. It panics if the added node ID matches an existing node ID. -func (g *WeightedDirectedGraph) AddNode(n graph.Node) { - if _, exists := g.nodes[n.ID()]; exists { - panic(fmt.Sprintf("simple: node ID collision: %d", n.ID())) - } - g.nodes[n.ID()] = n - g.from[n.ID()] = make(map[int64]graph.WeightedEdge) - g.to[n.ID()] = make(map[int64]graph.WeightedEdge) - g.nodeIDs.Use(n.ID()) -} - -// Edge returns the edge from u to v if such an edge exists and nil otherwise. -// The node v must be directly reachable from u as defined by the From method. -func (g *WeightedDirectedGraph) Edge(uid, vid int64) graph.Edge { - return g.WeightedEdge(uid, vid) -} - -// Edges returns all the edges in the graph. -func (g *WeightedDirectedGraph) Edges() graph.Edges { - var edges []graph.Edge - for _, u := range g.nodes { - for _, e := range g.from[u.ID()] { - edges = append(edges, e) - } - } - if len(edges) == 0 { - return graph.Empty - } - return iterator.NewOrderedEdges(edges) -} - -// From returns all nodes in g that can be reached directly from n. -func (g *WeightedDirectedGraph) From(id int64) graph.Nodes { - if _, ok := g.from[id]; !ok { - return graph.Empty - } - - from := make([]graph.Node, len(g.from[id])) - i := 0 - for vid := range g.from[id] { - from[i] = g.nodes[vid] - i++ - } - if len(from) == 0 { - return graph.Empty - } - return iterator.NewOrderedNodes(from) -} - -// HasEdgeBetween returns whether an edge exists between nodes x and y without -// considering direction. -func (g *WeightedDirectedGraph) HasEdgeBetween(xid, yid int64) bool { - if _, ok := g.from[xid][yid]; ok { - return true - } - _, ok := g.from[yid][xid] - return ok -} - -// HasEdgeFromTo returns whether an edge exists in the graph from u to v. -func (g *WeightedDirectedGraph) HasEdgeFromTo(uid, vid int64) bool { - if _, ok := g.from[uid][vid]; !ok { - return false - } - return true -} - -// NewNode returns a new unique Node to be added to g. The Node's ID does -// not become valid in g until the Node is added to g. -func (g *WeightedDirectedGraph) NewNode() graph.Node { - if len(g.nodes) == 0 { - return Node(0) - } - if int64(len(g.nodes)) == uid.Max { - panic("simple: cannot allocate node: no slot") - } - return Node(g.nodeIDs.NewID()) -} - -// NewWeightedEdge returns a new weighted edge from the source to the destination node. -func (g *WeightedDirectedGraph) NewWeightedEdge(from, to graph.Node, weight float64) graph.WeightedEdge { - return &WeightedEdge{F: from, T: to, W: weight} -} - -// Node returns the node with the given ID if it exists in the graph, -// and nil otherwise. -func (g *WeightedDirectedGraph) Node(id int64) graph.Node { - return g.nodes[id] -} - -// Nodes returns all the nodes in the graph. -func (g *WeightedDirectedGraph) Nodes() graph.Nodes { - if len(g.from) == 0 { - return graph.Empty - } - nodes := make([]graph.Node, len(g.nodes)) - i := 0 - for _, n := range g.nodes { - nodes[i] = n - i++ - } - return iterator.NewOrderedNodes(nodes) -} - -// RemoveEdge removes the edge with the given end point IDs from the graph, leaving the terminal -// nodes. If the edge does not exist it is a no-op. -func (g *WeightedDirectedGraph) RemoveEdge(fid, tid int64) { - if _, ok := g.nodes[fid]; !ok { - return - } - if _, ok := g.nodes[tid]; !ok { - return - } - - delete(g.from[fid], tid) - delete(g.to[tid], fid) -} - -// RemoveNode removes the node with the given ID from the graph, as well as any edges attached -// to it. If the node is not in the graph it is a no-op. -func (g *WeightedDirectedGraph) RemoveNode(id int64) { - if _, ok := g.nodes[id]; !ok { - return - } - delete(g.nodes, id) - - for from := range g.from[id] { - delete(g.to[from], id) - } - delete(g.from, id) - - for to := range g.to[id] { - delete(g.from[to], id) - } - delete(g.to, id) - - g.nodeIDs.Release(id) -} - -// SetWeightedEdge adds a weighted edge from one node to another. If the nodes do not exist, they are added -// and are set to the nodes of the edge otherwise. -// It will panic if the IDs of the e.From and e.To are equal. -func (g *WeightedDirectedGraph) SetWeightedEdge(e graph.WeightedEdge) { - var ( - from = e.From() - fid = from.ID() - to = e.To() - tid = to.ID() - ) - - if fid == tid { - panic("simple: adding self edge") - } - - if _, ok := g.nodes[fid]; !ok { - g.AddNode(from) - } else { - g.nodes[fid] = from - } - if _, ok := g.nodes[tid]; !ok { - g.AddNode(to) - } else { - g.nodes[tid] = to - } - - g.from[fid][tid] = e - g.to[tid][fid] = e -} - -// To returns all nodes in g that can reach directly to n. -func (g *WeightedDirectedGraph) To(id int64) graph.Nodes { - if _, ok := g.from[id]; !ok { - return graph.Empty - } - - to := make([]graph.Node, len(g.to[id])) - i := 0 - for uid := range g.to[id] { - to[i] = g.nodes[uid] - i++ - } - if len(to) == 0 { - return graph.Empty - } - return iterator.NewOrderedNodes(to) -} - -// Weight returns the weight for the edge between x and y if Edge(x, y) returns a non-nil Edge. -// If x and y are the same node or there is no joining edge between the two nodes the weight -// value returned is either the graph's absent or self value. Weight returns true if an edge -// exists between x and y or if x and y have the same ID, false otherwise. -func (g *WeightedDirectedGraph) Weight(xid, yid int64) (w float64, ok bool) { - if xid == yid { - return g.self, true - } - if to, ok := g.from[xid]; ok { - if e, ok := to[yid]; ok { - return e.Weight(), true - } - } - return g.absent, false -} - -// WeightedEdge returns the weighted edge from u to v if such an edge exists and nil otherwise. -// The node v must be directly reachable from u as defined by the From method. -func (g *WeightedDirectedGraph) WeightedEdge(uid, vid int64) graph.WeightedEdge { - edge, ok := g.from[uid][vid] - if !ok { - return nil - } - return edge -} - -// WeightedEdges returns all the weighted edges in the graph. -func (g *WeightedDirectedGraph) WeightedEdges() graph.WeightedEdges { - var edges []graph.WeightedEdge - for _, u := range g.nodes { - for _, e := range g.from[u.ID()] { - edges = append(edges, e) - } - } - if len(edges) == 0 { - return graph.Empty - } - return iterator.NewOrderedWeightedEdges(edges) -} diff --git a/vendor/gonum.org/v1/gonum/graph/simple/weighted_undirected.go b/vendor/gonum.org/v1/gonum/graph/simple/weighted_undirected.go deleted file mode 100644 index 5932576832..0000000000 --- a/vendor/gonum.org/v1/gonum/graph/simple/weighted_undirected.go +++ /dev/null @@ -1,273 +0,0 @@ -// Copyright ©2014 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package simple - -import ( - "fmt" - - "gonum.org/v1/gonum/graph" - "gonum.org/v1/gonum/graph/internal/uid" - "gonum.org/v1/gonum/graph/iterator" -) - -var ( - wug *WeightedUndirectedGraph - - _ graph.Graph = wug - _ graph.Weighted = wug - _ graph.Undirected = wug - _ graph.WeightedUndirected = wug - _ graph.NodeAdder = wug - _ graph.NodeRemover = wug - _ graph.WeightedEdgeAdder = wug - _ graph.EdgeRemover = wug -) - -// WeightedUndirectedGraph implements a generalized weighted undirected graph. -type WeightedUndirectedGraph struct { - nodes map[int64]graph.Node - edges map[int64]map[int64]graph.WeightedEdge - - self, absent float64 - - nodeIDs uid.Set -} - -// NewWeightedUndirectedGraph returns an WeightedUndirectedGraph with the specified self and absent -// edge weight values. -func NewWeightedUndirectedGraph(self, absent float64) *WeightedUndirectedGraph { - return &WeightedUndirectedGraph{ - nodes: make(map[int64]graph.Node), - edges: make(map[int64]map[int64]graph.WeightedEdge), - - self: self, - absent: absent, - - nodeIDs: uid.NewSet(), - } -} - -// AddNode adds n to the graph. It panics if the added node ID matches an existing node ID. -func (g *WeightedUndirectedGraph) AddNode(n graph.Node) { - if _, exists := g.nodes[n.ID()]; exists { - panic(fmt.Sprintf("simple: node ID collision: %d", n.ID())) - } - g.nodes[n.ID()] = n - g.edges[n.ID()] = make(map[int64]graph.WeightedEdge) - g.nodeIDs.Use(n.ID()) -} - -// Edge returns the edge from u to v if such an edge exists and nil otherwise. -// The node v must be directly reachable from u as defined by the From method. -func (g *WeightedUndirectedGraph) Edge(uid, vid int64) graph.Edge { - return g.WeightedEdgeBetween(uid, vid) -} - -// EdgeBetween returns the edge between nodes x and y. -func (g *WeightedUndirectedGraph) EdgeBetween(xid, yid int64) graph.Edge { - return g.WeightedEdgeBetween(xid, yid) -} - -// Edges returns all the edges in the graph. -func (g *WeightedUndirectedGraph) Edges() graph.Edges { - if len(g.edges) == 0 { - return graph.Empty - } - var edges []graph.Edge - seen := make(map[[2]int64]struct{}) - for _, u := range g.edges { - for _, e := range u { - uid := e.From().ID() - vid := e.To().ID() - if _, ok := seen[[2]int64{uid, vid}]; ok { - continue - } - seen[[2]int64{uid, vid}] = struct{}{} - seen[[2]int64{vid, uid}] = struct{}{} - edges = append(edges, e) - } - } - if len(edges) == 0 { - return graph.Empty - } - return iterator.NewOrderedEdges(edges) -} - -// From returns all nodes in g that can be reached directly from n. -func (g *WeightedUndirectedGraph) From(id int64) graph.Nodes { - if _, ok := g.nodes[id]; !ok { - return graph.Empty - } - - nodes := make([]graph.Node, len(g.edges[id])) - i := 0 - for from := range g.edges[id] { - nodes[i] = g.nodes[from] - i++ - } - if len(nodes) == 0 { - return graph.Empty - } - return iterator.NewOrderedNodes(nodes) -} - -// HasEdgeBetween returns whether an edge exists between nodes x and y. -func (g *WeightedUndirectedGraph) HasEdgeBetween(xid, yid int64) bool { - _, ok := g.edges[xid][yid] - return ok -} - -// NewNode returns a new unique Node to be added to g. The Node's ID does -// not become valid in g until the Node is added to g. -func (g *WeightedUndirectedGraph) NewNode() graph.Node { - if len(g.nodes) == 0 { - return Node(0) - } - if int64(len(g.nodes)) == uid.Max { - panic("simple: cannot allocate node: no slot") - } - return Node(g.nodeIDs.NewID()) -} - -// NewWeightedEdge returns a new weighted edge from the source to the destination node. -func (g *WeightedUndirectedGraph) NewWeightedEdge(from, to graph.Node, weight float64) graph.WeightedEdge { - return &WeightedEdge{F: from, T: to, W: weight} -} - -// Node returns the node with the given ID if it exists in the graph, -// and nil otherwise. -func (g *WeightedUndirectedGraph) Node(id int64) graph.Node { - return g.nodes[id] -} - -// Nodes returns all the nodes in the graph. -func (g *WeightedUndirectedGraph) Nodes() graph.Nodes { - if len(g.nodes) == 0 { - return graph.Empty - } - nodes := make([]graph.Node, len(g.nodes)) - i := 0 - for _, n := range g.nodes { - nodes[i] = n - i++ - } - return iterator.NewOrderedNodes(nodes) -} - -// RemoveEdge removes the edge with the given end point IDs from the graph, leaving the terminal -// nodes. If the edge does not exist it is a no-op. -func (g *WeightedUndirectedGraph) RemoveEdge(fid, tid int64) { - if _, ok := g.nodes[fid]; !ok { - return - } - if _, ok := g.nodes[tid]; !ok { - return - } - - delete(g.edges[fid], tid) - delete(g.edges[tid], fid) -} - -// RemoveNode removes the node with the given ID from the graph, as well as any edges attached -// to it. If the node is not in the graph it is a no-op. -func (g *WeightedUndirectedGraph) RemoveNode(id int64) { - if _, ok := g.nodes[id]; !ok { - return - } - delete(g.nodes, id) - - for from := range g.edges[id] { - delete(g.edges[from], id) - } - delete(g.edges, id) - - g.nodeIDs.Release(id) -} - -// SetWeightedEdge adds a weighted edge from one node to another. If the nodes do not exist, they are added -// and are set to the nodes of the edge otherwise. -// It will panic if the IDs of the e.From and e.To are equal. -func (g *WeightedUndirectedGraph) SetWeightedEdge(e graph.WeightedEdge) { - var ( - from = e.From() - fid = from.ID() - to = e.To() - tid = to.ID() - ) - - if fid == tid { - panic("simple: adding self edge") - } - - if _, ok := g.nodes[fid]; !ok { - g.AddNode(from) - } else { - g.nodes[fid] = from - } - if _, ok := g.nodes[tid]; !ok { - g.AddNode(to) - } else { - g.nodes[tid] = to - } - - g.edges[fid][tid] = e - g.edges[tid][fid] = e -} - -// Weight returns the weight for the edge between x and y if Edge(x, y) returns a non-nil Edge. -// If x and y are the same node or there is no joining edge between the two nodes the weight -// value returned is either the graph's absent or self value. Weight returns true if an edge -// exists between x and y or if x and y have the same ID, false otherwise. -func (g *WeightedUndirectedGraph) Weight(xid, yid int64) (w float64, ok bool) { - if xid == yid { - return g.self, true - } - if n, ok := g.edges[xid]; ok { - if e, ok := n[yid]; ok { - return e.Weight(), true - } - } - return g.absent, false -} - -// WeightedEdge returns the weighted edge from u to v if such an edge exists and nil otherwise. -// The node v must be directly reachable from u as defined by the From method. -func (g *WeightedUndirectedGraph) WeightedEdge(uid, vid int64) graph.WeightedEdge { - return g.WeightedEdgeBetween(uid, vid) -} - -// WeightedEdgeBetween returns the weighted edge between nodes x and y. -func (g *WeightedUndirectedGraph) WeightedEdgeBetween(xid, yid int64) graph.WeightedEdge { - edge, ok := g.edges[xid][yid] - if !ok { - return nil - } - if edge.From().ID() == xid { - return edge - } - return edge.ReversedEdge().(graph.WeightedEdge) -} - -// WeightedEdges returns all the weighted edges in the graph. -func (g *WeightedUndirectedGraph) WeightedEdges() graph.WeightedEdges { - var edges []graph.WeightedEdge - seen := make(map[[2]int64]struct{}) - for _, u := range g.edges { - for _, e := range u { - uid := e.From().ID() - vid := e.To().ID() - if _, ok := seen[[2]int64{uid, vid}]; ok { - continue - } - seen[[2]int64{uid, vid}] = struct{}{} - seen[[2]int64{vid, uid}] = struct{}{} - edges = append(edges, e) - } - } - if len(edges) == 0 { - return graph.Empty - } - return iterator.NewOrderedWeightedEdges(edges) -} diff --git a/vendor/gonum.org/v1/gonum/graph/topo/bron_kerbosch.go b/vendor/gonum.org/v1/gonum/graph/topo/bron_kerbosch.go deleted file mode 100644 index 83fdb5bdf8..0000000000 --- a/vendor/gonum.org/v1/gonum/graph/topo/bron_kerbosch.go +++ /dev/null @@ -1,250 +0,0 @@ -// Copyright ©2015 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package topo - -import ( - "gonum.org/v1/gonum/graph" - "gonum.org/v1/gonum/graph/internal/ordered" - "gonum.org/v1/gonum/graph/internal/set" -) - -// DegeneracyOrdering returns the degeneracy ordering and the k-cores of -// the undirected graph g. -func DegeneracyOrdering(g graph.Undirected) (order []graph.Node, cores [][]graph.Node) { - order, offsets := degeneracyOrdering(g) - - ordered.Reverse(order) - cores = make([][]graph.Node, len(offsets)) - offset := len(order) - for i, n := range offsets { - cores[i] = order[offset-n : offset] - offset -= n - } - return order, cores -} - -// KCore returns the k-core of the undirected graph g with nodes in an -// optimal ordering for the coloring number. -func KCore(k int, g graph.Undirected) []graph.Node { - order, offsets := degeneracyOrdering(g) - - var offset int - for _, n := range offsets[:k] { - offset += n - } - core := make([]graph.Node, len(order)-offset) - copy(core, order[offset:]) - return core -} - -// degeneracyOrdering is the common code for DegeneracyOrdering and KCore. It -// returns l, the nodes of g in optimal ordering for coloring number and -// s, a set of relative offsets into l for each k-core, where k is an index -// into s. -func degeneracyOrdering(g graph.Undirected) (l []graph.Node, s []int) { - nodes := graph.NodesOf(g.Nodes()) - - // The algorithm used here is essentially as described at - // http://en.wikipedia.org/w/index.php?title=Degeneracy_%28graph_theory%29&oldid=640308710 - - // Initialize an output list L in return parameters. - - // Compute a number d_v for each vertex v in G, - // the number of neighbors of v that are not already in L. - // Initially, these numbers are just the degrees of the vertices. - dv := make(map[int64]int, len(nodes)) - var ( - maxDegree int - neighbours = make(map[int64][]graph.Node) - ) - for _, n := range nodes { - id := n.ID() - adj := graph.NodesOf(g.From(id)) - neighbours[id] = adj - dv[id] = len(adj) - if len(adj) > maxDegree { - maxDegree = len(adj) - } - } - - // Initialize an array D such that D[i] contains a list of the - // vertices v that are not already in L for which d_v = i. - d := make([][]graph.Node, maxDegree+1) - for _, n := range nodes { - deg := dv[n.ID()] - d[deg] = append(d[deg], n) - } - - // Initialize k to 0. - k := 0 - // Repeat n times: - s = []int{0} - for range nodes { - // Scan the array cells D[0], D[1], ... until - // finding an i for which D[i] is nonempty. - var ( - i int - di []graph.Node - ) - for i, di = range d { - if len(di) != 0 { - break - } - } - - // Set k to max(k,i). - if i > k { - k = i - s = append(s, make([]int, k-len(s)+1)...) - } - - // Select a vertex v from D[i]. Add v to the - // beginning of L and remove it from D[i]. - var v graph.Node - v, d[i] = di[len(di)-1], di[:len(di)-1] - l = append(l, v) - s[k]++ - delete(dv, v.ID()) - - // For each neighbor w of v not already in L, - // subtract one from d_w and move w to the - // cell of D corresponding to the new value of d_w. - for _, w := range neighbours[v.ID()] { - dw, ok := dv[w.ID()] - if !ok { - continue - } - for i, n := range d[dw] { - if n.ID() == w.ID() { - d[dw][i], d[dw] = d[dw][len(d[dw])-1], d[dw][:len(d[dw])-1] - dw-- - d[dw] = append(d[dw], w) - break - } - } - dv[w.ID()] = dw - } - } - - return l, s -} - -// BronKerbosch returns the set of maximal cliques of the undirected graph g. -func BronKerbosch(g graph.Undirected) [][]graph.Node { - nodes := graph.NodesOf(g.Nodes()) - - // The algorithm used here is essentially BronKerbosch3 as described at - // http://en.wikipedia.org/w/index.php?title=Bron%E2%80%93Kerbosch_algorithm&oldid=656805858 - - p := set.NewNodesSize(len(nodes)) - for _, n := range nodes { - p.Add(n) - } - x := set.NewNodes() - var bk bronKerbosch - order, _ := degeneracyOrdering(g) - ordered.Reverse(order) - for _, v := range order { - neighbours := graph.NodesOf(g.From(v.ID())) - nv := set.NewNodesSize(len(neighbours)) - for _, n := range neighbours { - nv.Add(n) - } - bk.maximalCliquePivot(g, []graph.Node{v}, set.IntersectionOfNodes(p, nv), set.IntersectionOfNodes(x, nv)) - p.Remove(v) - x.Add(v) - } - return bk -} - -type bronKerbosch [][]graph.Node - -func (bk *bronKerbosch) maximalCliquePivot(g graph.Undirected, r []graph.Node, p, x set.Nodes) { - if len(p) == 0 && len(x) == 0 { - *bk = append(*bk, r) - return - } - - neighbours := bk.choosePivotFrom(g, p, x) - nu := set.NewNodesSize(len(neighbours)) - for _, n := range neighbours { - nu.Add(n) - } - for _, v := range p { - if nu.Has(v) { - continue - } - vid := v.ID() - neighbours := graph.NodesOf(g.From(vid)) - nv := set.NewNodesSize(len(neighbours)) - for _, n := range neighbours { - nv.Add(n) - } - - var found bool - for _, n := range r { - if n.ID() == vid { - found = true - break - } - } - var sr []graph.Node - if !found { - sr = append(r[:len(r):len(r)], v) - } - - bk.maximalCliquePivot(g, sr, set.IntersectionOfNodes(p, nv), set.IntersectionOfNodes(x, nv)) - p.Remove(v) - x.Add(v) - } -} - -func (*bronKerbosch) choosePivotFrom(g graph.Undirected, p, x set.Nodes) (neighbors []graph.Node) { - // TODO(kortschak): Investigate the impact of pivot choice that maximises - // |p ⋂ neighbours(u)| as a function of input size. Until then, leave as - // compile time option. - if !tomitaTanakaTakahashi { - for _, n := range p { - return graph.NodesOf(g.From(n.ID())) - } - for _, n := range x { - return graph.NodesOf(g.From(n.ID())) - } - panic("bronKerbosch: empty set") - } - - var ( - max = -1 - pivot graph.Node - ) - maxNeighbors := func(s set.Nodes) { - outer: - for _, u := range s { - nb := graph.NodesOf(g.From(u.ID())) - c := len(nb) - if c <= max { - continue - } - for n := range nb { - if _, ok := p[int64(n)]; ok { - continue - } - c-- - if c <= max { - continue outer - } - } - max = c - pivot = u - neighbors = nb - } - } - maxNeighbors(p) - maxNeighbors(x) - if pivot == nil { - panic("bronKerbosch: empty set") - } - return neighbors -} diff --git a/vendor/gonum.org/v1/gonum/graph/topo/clique_graph.go b/vendor/gonum.org/v1/gonum/graph/topo/clique_graph.go deleted file mode 100644 index 28f1b96ee7..0000000000 --- a/vendor/gonum.org/v1/gonum/graph/topo/clique_graph.go +++ /dev/null @@ -1,111 +0,0 @@ -// Copyright ©2017 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package topo - -import ( - "sort" - - "gonum.org/v1/gonum/graph" - "gonum.org/v1/gonum/graph/internal/ordered" - "gonum.org/v1/gonum/graph/internal/set" -) - -// Builder is a pure topological graph construction type. -type Builder interface { - AddNode(graph.Node) - SetEdge(graph.Edge) -} - -// CliqueGraph builds the clique graph of g in dst using Clique and CliqueGraphEdge -// nodes and edges. The nodes returned by calls to Nodes on the nodes and edges of -// the constructed graph are the cliques and the common nodes between cliques -// respectively. The dst graph is not cleared. -func CliqueGraph(dst Builder, g graph.Undirected) { - cliques := BronKerbosch(g) - - // Construct a consistent view of cliques in g. Sorting costs - // us a little, but not as much as the cliques themselves. - for _, c := range cliques { - sort.Sort(ordered.ByID(c)) - } - sort.Sort(ordered.BySliceIDs(cliques)) - - cliqueNodes := make(cliqueNodeSets, len(cliques)) - for id, c := range cliques { - s := set.NewNodesSize(len(c)) - for _, n := range c { - s.Add(n) - } - ns := &nodeSet{Clique: Clique{id: int64(id), nodes: c}, nodes: s} - dst.AddNode(ns.Clique) - for _, n := range c { - nid := n.ID() - cliqueNodes[nid] = append(cliqueNodes[nid], ns) - } - } - - for _, cliques := range cliqueNodes { - for i, uc := range cliques { - for _, vc := range cliques[i+1:] { - // Retain the nodes that contribute to the - // edge between the cliques. - var edgeNodes []graph.Node - switch 1 { - case len(uc.Clique.nodes): - edgeNodes = []graph.Node{uc.Clique.nodes[0]} - case len(vc.Clique.nodes): - edgeNodes = []graph.Node{vc.Clique.nodes[0]} - default: - for _, n := range set.IntersectionOfNodes(uc.nodes, vc.nodes) { - edgeNodes = append(edgeNodes, n) - } - sort.Sort(ordered.ByID(edgeNodes)) - } - - dst.SetEdge(CliqueGraphEdge{from: uc.Clique, to: vc.Clique, nodes: edgeNodes}) - } - } - } -} - -type cliqueNodeSets map[int64][]*nodeSet - -type nodeSet struct { - Clique - nodes set.Nodes -} - -// Clique is a node in a clique graph. -type Clique struct { - id int64 - nodes []graph.Node -} - -// ID returns the node ID. -func (n Clique) ID() int64 { return n.id } - -// Nodes returns the nodes in the clique. -func (n Clique) Nodes() []graph.Node { return n.nodes } - -// CliqueGraphEdge is an edge in a clique graph. -type CliqueGraphEdge struct { - from, to Clique - nodes []graph.Node -} - -// From returns the from node of the edge. -func (e CliqueGraphEdge) From() graph.Node { return e.from } - -// To returns the to node of the edge. -func (e CliqueGraphEdge) To() graph.Node { return e.to } - -// ReversedEdge returns a new CliqueGraphEdge with -// the edge end points swapped. The nodes of the -// new edge are shared with the receiver. -func (e CliqueGraphEdge) ReversedEdge() graph.Edge { e.from, e.to = e.to, e.from; return e } - -// Nodes returns the common nodes in the cliques of the underlying graph -// corresponding to the from and to nodes in the clique graph. -func (e CliqueGraphEdge) Nodes() []graph.Node { return e.nodes } diff --git a/vendor/gonum.org/v1/gonum/graph/topo/doc.go b/vendor/gonum.org/v1/gonum/graph/topo/doc.go deleted file mode 100644 index cbcdff1e70..0000000000 --- a/vendor/gonum.org/v1/gonum/graph/topo/doc.go +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright ©2017 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package topo provides graph topology analysis functions. -package topo // import "gonum.org/v1/gonum/graph/topo" diff --git a/vendor/gonum.org/v1/gonum/graph/topo/johnson_cycles.go b/vendor/gonum.org/v1/gonum/graph/topo/johnson_cycles.go deleted file mode 100644 index 8a78ba2f39..0000000000 --- a/vendor/gonum.org/v1/gonum/graph/topo/johnson_cycles.go +++ /dev/null @@ -1,285 +0,0 @@ -// Copyright ©2015 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package topo - -import ( - "sort" - - "gonum.org/v1/gonum/graph" - "gonum.org/v1/gonum/graph/internal/ordered" - "gonum.org/v1/gonum/graph/internal/set" - "gonum.org/v1/gonum/graph/iterator" -) - -// johnson implements Johnson's "Finding all the elementary -// circuits of a directed graph" algorithm. SIAM J. Comput. 4(1):1975. -// -// Comments in the johnson methods are kept in sync with the comments -// and labels from the paper. -type johnson struct { - adjacent johnsonGraph // SCC adjacency list. - b []set.Ints // Johnson's "B-list". - blocked []bool - s int - - stack []graph.Node - - result [][]graph.Node -} - -// DirectedCyclesIn returns the set of elementary cycles in the graph g. -func DirectedCyclesIn(g graph.Directed) [][]graph.Node { - jg := johnsonGraphFrom(g) - j := johnson{ - adjacent: jg, - b: make([]set.Ints, len(jg.orig)), - blocked: make([]bool, len(jg.orig)), - } - - // len(j.nodes) is the order of g. - for j.s < len(j.adjacent.orig)-1 { - // We use the previous SCC adjacency to reduce the work needed. - sccs := TarjanSCC(j.adjacent.subgraph(j.s)) - // A_k = adjacency structure of strong component K with least - // vertex in subgraph of G induced by {s, s+1, ... ,n}. - j.adjacent = j.adjacent.sccSubGraph(sccs, 2) // Only allow SCCs with >= 2 vertices. - if j.adjacent.order() == 0 { - break - } - - // s = least vertex in V_k - if s := j.adjacent.leastVertexIndex(); s < j.s { - j.s = s - } - for i, v := range j.adjacent.orig { - if !j.adjacent.nodes.Has(v.ID()) { - continue - } - if len(j.adjacent.succ[v.ID()]) > 0 { - j.blocked[i] = false - j.b[i] = make(set.Ints) - } - } - //L3: - _ = j.circuit(j.s) - j.s++ - } - - return j.result -} - -// circuit is the CIRCUIT sub-procedure in the paper. -func (j *johnson) circuit(v int) bool { - f := false - n := j.adjacent.orig[v] - j.stack = append(j.stack, n) - j.blocked[v] = true - - //L1: - for w := range j.adjacent.succ[n.ID()] { - w := j.adjacent.indexOf(w) - if w == j.s { - // Output circuit composed of stack followed by s. - r := make([]graph.Node, len(j.stack)+1) - copy(r, j.stack) - r[len(r)-1] = j.adjacent.orig[j.s] - j.result = append(j.result, r) - f = true - } else if !j.blocked[w] { - if j.circuit(w) { - f = true - } - } - } - - //L2: - if f { - j.unblock(v) - } else { - for w := range j.adjacent.succ[n.ID()] { - j.b[j.adjacent.indexOf(w)].Add(v) - } - } - j.stack = j.stack[:len(j.stack)-1] - - return f -} - -// unblock is the UNBLOCK sub-procedure in the paper. -func (j *johnson) unblock(u int) { - j.blocked[u] = false - for w := range j.b[u] { - j.b[u].Remove(w) - if j.blocked[w] { - j.unblock(w) - } - } -} - -// johnsonGraph is an edge list representation of a graph with helpers -// necessary for Johnson's algorithm -type johnsonGraph struct { - // Keep the original graph nodes and a - // look-up to into the non-sparse - // collection of potentially sparse IDs. - orig []graph.Node - index map[int64]int - - nodes set.Int64s - succ map[int64]set.Int64s -} - -// johnsonGraphFrom returns a deep copy of the graph g. -func johnsonGraphFrom(g graph.Directed) johnsonGraph { - nodes := graph.NodesOf(g.Nodes()) - sort.Sort(ordered.ByID(nodes)) - c := johnsonGraph{ - orig: nodes, - index: make(map[int64]int, len(nodes)), - - nodes: make(set.Int64s, len(nodes)), - succ: make(map[int64]set.Int64s), - } - for i, u := range nodes { - uid := u.ID() - c.index[uid] = i - for _, v := range graph.NodesOf(g.From(uid)) { - if c.succ[uid] == nil { - c.succ[uid] = make(set.Int64s) - c.nodes.Add(uid) - } - c.nodes.Add(v.ID()) - c.succ[uid].Add(v.ID()) - } - } - return c -} - -// order returns the order of the graph. -func (g johnsonGraph) order() int { return g.nodes.Count() } - -// indexOf returns the index of the retained node for the given node ID. -func (g johnsonGraph) indexOf(id int64) int { - return g.index[id] -} - -// leastVertexIndex returns the index into orig of the least vertex. -func (g johnsonGraph) leastVertexIndex() int { - for _, v := range g.orig { - if g.nodes.Has(v.ID()) { - return g.indexOf(v.ID()) - } - } - panic("johnsonCycles: empty set") -} - -// subgraph returns a subgraph of g induced by {s, s+1, ... , n}. The -// subgraph is destructively generated in g. -func (g johnsonGraph) subgraph(s int) johnsonGraph { - sn := g.orig[s].ID() - for u, e := range g.succ { - if u < sn { - g.nodes.Remove(u) - delete(g.succ, u) - continue - } - for v := range e { - if v < sn { - g.succ[u].Remove(v) - } - } - } - return g -} - -// sccSubGraph returns the graph of the tarjan's strongly connected -// components with each SCC containing at least min vertices. -// sccSubGraph returns nil if there is no SCC with at least min -// members. -func (g johnsonGraph) sccSubGraph(sccs [][]graph.Node, min int) johnsonGraph { - if len(g.nodes) == 0 { - g.nodes = nil - g.succ = nil - return g - } - sub := johnsonGraph{ - orig: g.orig, - index: g.index, - nodes: make(set.Int64s), - succ: make(map[int64]set.Int64s), - } - - var n int - for _, scc := range sccs { - if len(scc) < min { - continue - } - n++ - for _, u := range scc { - for _, v := range scc { - if _, ok := g.succ[u.ID()][v.ID()]; ok { - if sub.succ[u.ID()] == nil { - sub.succ[u.ID()] = make(set.Int64s) - sub.nodes.Add(u.ID()) - } - sub.nodes.Add(v.ID()) - sub.succ[u.ID()].Add(v.ID()) - } - } - } - } - if n == 0 { - g.nodes = nil - g.succ = nil - return g - } - - return sub -} - -// Nodes is required to satisfy Tarjan. -func (g johnsonGraph) Nodes() graph.Nodes { - n := make([]graph.Node, 0, len(g.nodes)) - for id := range g.nodes { - n = append(n, johnsonGraphNode(id)) - } - return iterator.NewOrderedNodes(n) -} - -// Successors is required to satisfy Tarjan. -func (g johnsonGraph) From(id int64) graph.Nodes { - adj := g.succ[id] - if len(adj) == 0 { - return graph.Empty - } - succ := make([]graph.Node, 0, len(adj)) - for id := range adj { - succ = append(succ, johnsonGraphNode(id)) - } - return iterator.NewOrderedNodes(succ) -} - -func (johnsonGraph) Has(int64) bool { - panic("topo: unintended use of johnsonGraph") -} -func (johnsonGraph) Node(int64) graph.Node { - panic("topo: unintended use of johnsonGraph") -} -func (johnsonGraph) HasEdgeBetween(_, _ int64) bool { - panic("topo: unintended use of johnsonGraph") -} -func (johnsonGraph) Edge(_, _ int64) graph.Edge { - panic("topo: unintended use of johnsonGraph") -} -func (johnsonGraph) HasEdgeFromTo(_, _ int64) bool { - panic("topo: unintended use of johnsonGraph") -} -func (johnsonGraph) To(int64) graph.Nodes { - panic("topo: unintended use of johnsonGraph") -} - -type johnsonGraphNode int64 - -func (n johnsonGraphNode) ID() int64 { return int64(n) } diff --git a/vendor/gonum.org/v1/gonum/graph/topo/non_tomita_choice.go b/vendor/gonum.org/v1/gonum/graph/topo/non_tomita_choice.go deleted file mode 100644 index 36171d6fed..0000000000 --- a/vendor/gonum.org/v1/gonum/graph/topo/non_tomita_choice.go +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright ©2015 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build !tomita - -package topo - -const tomitaTanakaTakahashi = false diff --git a/vendor/gonum.org/v1/gonum/graph/topo/paton_cycles.go b/vendor/gonum.org/v1/gonum/graph/topo/paton_cycles.go deleted file mode 100644 index 44b362a6fd..0000000000 --- a/vendor/gonum.org/v1/gonum/graph/topo/paton_cycles.go +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright ©2017 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package topo - -import ( - "gonum.org/v1/gonum/graph" - "gonum.org/v1/gonum/graph/internal/linear" - "gonum.org/v1/gonum/graph/internal/set" -) - -// UndirectedCyclesIn returns a set of cycles that forms a cycle basis in the graph g. -// Any cycle in g can be constructed as a symmetric difference of its elements. -func UndirectedCyclesIn(g graph.Undirected) [][]graph.Node { - // From "An algorithm for finding a fundamental set of cycles of a graph" - // https://doi.org/10.1145/363219.363232 - - var cycles [][]graph.Node - done := make(set.Int64s) - var tree linear.NodeStack - nodes := g.Nodes() - for nodes.Next() { - n := nodes.Node() - id := n.ID() - if done.Has(id) { - continue - } - done.Add(id) - - tree = tree[:0] - tree.Push(n) - from := sets{id: set.Int64s{}} - to := map[int64]graph.Node{id: n} - - for tree.Len() != 0 { - u := tree.Pop() - uid := u.ID() - adj := from[uid] - for _, v := range graph.NodesOf(g.From(uid)) { - vid := v.ID() - switch { - case uid == vid: - cycles = append(cycles, []graph.Node{u}) - case !from.has(vid): - done.Add(vid) - to[vid] = u - tree.Push(v) - from.add(uid, vid) - case !adj.Has(vid): - c := []graph.Node{v, u} - adj := from[vid] - p := to[uid] - for !adj.Has(p.ID()) { - c = append(c, p) - p = to[p.ID()] - } - c = append(c, p, c[0]) - cycles = append(cycles, c) - adj.Add(uid) - } - } - } - } - - return cycles -} - -type sets map[int64]set.Int64s - -func (s sets) add(uid, vid int64) { - e, ok := s[vid] - if !ok { - e = make(set.Int64s) - s[vid] = e - } - e.Add(uid) -} - -func (s sets) has(uid int64) bool { - _, ok := s[uid] - return ok -} diff --git a/vendor/gonum.org/v1/gonum/graph/topo/tarjan.go b/vendor/gonum.org/v1/gonum/graph/topo/tarjan.go deleted file mode 100644 index 6471292758..0000000000 --- a/vendor/gonum.org/v1/gonum/graph/topo/tarjan.go +++ /dev/null @@ -1,199 +0,0 @@ -// Copyright ©2015 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package topo - -import ( - "fmt" - "sort" - - "gonum.org/v1/gonum/graph" - "gonum.org/v1/gonum/graph/internal/ordered" - "gonum.org/v1/gonum/graph/internal/set" -) - -// Unorderable is an error containing sets of unorderable graph.Nodes. -type Unorderable [][]graph.Node - -// Error satisfies the error interface. -func (e Unorderable) Error() string { - const maxNodes = 10 - var n int - for _, c := range e { - n += len(c) - } - if n > maxNodes { - // Don't return errors that are too long. - return fmt.Sprintf("topo: no topological ordering: %d nodes in %d cyclic components", n, len(e)) - } - return fmt.Sprintf("topo: no topological ordering: cyclic components: %v", [][]graph.Node(e)) -} - -func lexical(nodes []graph.Node) { sort.Sort(ordered.ByID(nodes)) } - -// Sort performs a topological sort of the directed graph g returning the 'from' to 'to' -// sort order. If a topological ordering is not possible, an Unorderable error is returned -// listing cyclic components in g with each cyclic component's members sorted by ID. When -// an Unorderable error is returned, each cyclic component's topological position within -// the sorted nodes is marked with a nil graph.Node. -func Sort(g graph.Directed) (sorted []graph.Node, err error) { - sccs := TarjanSCC(g) - return sortedFrom(sccs, lexical) -} - -// SortStabilized performs a topological sort of the directed graph g returning the 'from' -// to 'to' sort order, or the order defined by the in place order sort function where there -// is no unambiguous topological ordering. If a topological ordering is not possible, an -// Unorderable error is returned listing cyclic components in g with each cyclic component's -// members sorted by the provided order function. If order is nil, nodes are ordered lexically -// by node ID. When an Unorderable error is returned, each cyclic component's topological -// position within the sorted nodes is marked with a nil graph.Node. -func SortStabilized(g graph.Directed, order func([]graph.Node)) (sorted []graph.Node, err error) { - if order == nil { - order = lexical - } - sccs := tarjanSCCstabilized(g, order) - return sortedFrom(sccs, order) -} - -func sortedFrom(sccs [][]graph.Node, order func([]graph.Node)) ([]graph.Node, error) { - sorted := make([]graph.Node, 0, len(sccs)) - var sc Unorderable - for _, s := range sccs { - if len(s) != 1 { - order(s) - sc = append(sc, s) - sorted = append(sorted, nil) - continue - } - sorted = append(sorted, s[0]) - } - var err error - if sc != nil { - for i, j := 0, len(sc)-1; i < j; i, j = i+1, j-1 { - sc[i], sc[j] = sc[j], sc[i] - } - err = sc - } - ordered.Reverse(sorted) - return sorted, err -} - -// TarjanSCC returns the strongly connected components of the graph g using Tarjan's algorithm. -// -// A strongly connected component of a graph is a set of vertices where it's possible to reach any -// vertex in the set from any other (meaning there's a cycle between them.) -// -// Generally speaking, a directed graph where the number of strongly connected components is equal -// to the number of nodes is acyclic, unless you count reflexive edges as a cycle (which requires -// only a little extra testing.) -// -func TarjanSCC(g graph.Directed) [][]graph.Node { - return tarjanSCCstabilized(g, nil) -} - -func tarjanSCCstabilized(g graph.Directed, order func([]graph.Node)) [][]graph.Node { - nodes := graph.NodesOf(g.Nodes()) - var succ func(id int64) []graph.Node - if order == nil { - succ = func(id int64) []graph.Node { - return graph.NodesOf(g.From(id)) - } - } else { - order(nodes) - ordered.Reverse(nodes) - - succ = func(id int64) []graph.Node { - to := graph.NodesOf(g.From(id)) - order(to) - ordered.Reverse(to) - return to - } - } - - t := tarjan{ - succ: succ, - - indexTable: make(map[int64]int, len(nodes)), - lowLink: make(map[int64]int, len(nodes)), - onStack: make(set.Int64s), - } - for _, v := range nodes { - if t.indexTable[v.ID()] == 0 { - t.strongconnect(v) - } - } - return t.sccs -} - -// tarjan implements Tarjan's strongly connected component finding -// algorithm. The implementation is from the pseudocode at -// -// http://en.wikipedia.org/wiki/Tarjan%27s_strongly_connected_components_algorithm?oldid=642744644 -// -type tarjan struct { - succ func(id int64) []graph.Node - - index int - indexTable map[int64]int - lowLink map[int64]int - onStack set.Int64s - - stack []graph.Node - - sccs [][]graph.Node -} - -// strongconnect is the strongconnect function described in the -// wikipedia article. -func (t *tarjan) strongconnect(v graph.Node) { - vID := v.ID() - - // Set the depth index for v to the smallest unused index. - t.index++ - t.indexTable[vID] = t.index - t.lowLink[vID] = t.index - t.stack = append(t.stack, v) - t.onStack.Add(vID) - - // Consider successors of v. - for _, w := range t.succ(vID) { - wID := w.ID() - if t.indexTable[wID] == 0 { - // Successor w has not yet been visited; recur on it. - t.strongconnect(w) - t.lowLink[vID] = min(t.lowLink[vID], t.lowLink[wID]) - } else if t.onStack.Has(wID) { - // Successor w is in stack s and hence in the current SCC. - t.lowLink[vID] = min(t.lowLink[vID], t.indexTable[wID]) - } - } - - // If v is a root node, pop the stack and generate an SCC. - if t.lowLink[vID] == t.indexTable[vID] { - // Start a new strongly connected component. - var ( - scc []graph.Node - w graph.Node - ) - for { - w, t.stack = t.stack[len(t.stack)-1], t.stack[:len(t.stack)-1] - t.onStack.Remove(w.ID()) - // Add w to current strongly connected component. - scc = append(scc, w) - if w.ID() == vID { - break - } - } - // Output the current strongly connected component. - t.sccs = append(t.sccs, scc) - } -} - -func min(a, b int) int { - if a < b { - return a - } - return b -} diff --git a/vendor/gonum.org/v1/gonum/graph/topo/tomita_choice.go b/vendor/gonum.org/v1/gonum/graph/topo/tomita_choice.go deleted file mode 100644 index f85a0d6c0f..0000000000 --- a/vendor/gonum.org/v1/gonum/graph/topo/tomita_choice.go +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright ©2015 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build tomita - -package topo - -const tomitaTanakaTakahashi = true diff --git a/vendor/gonum.org/v1/gonum/graph/topo/topo.go b/vendor/gonum.org/v1/gonum/graph/topo/topo.go deleted file mode 100644 index bece61a6ca..0000000000 --- a/vendor/gonum.org/v1/gonum/graph/topo/topo.go +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright ©2014 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package topo - -import ( - "gonum.org/v1/gonum/graph" - "gonum.org/v1/gonum/graph/traverse" -) - -// IsPathIn returns whether path is a path in g. -// -// As special cases, IsPathIn returns true for a zero length path or for -// a path of length 1 when the node in path exists in the graph. -func IsPathIn(g graph.Graph, path []graph.Node) bool { - switch len(path) { - case 0: - return true - case 1: - return g.Node(path[0].ID()) != nil - default: - var canReach func(uid, vid int64) bool - switch g := g.(type) { - case graph.Directed: - canReach = g.HasEdgeFromTo - default: - canReach = g.HasEdgeBetween - } - - for i, u := range path[:len(path)-1] { - if !canReach(u.ID(), path[i+1].ID()) { - return false - } - } - return true - } -} - -// PathExistsIn returns whether there is a path in g starting at from extending -// to to. -// -// PathExistsIn exists as a helper function. If many tests for path existence -// are being performed, other approaches will be more efficient. -func PathExistsIn(g graph.Graph, from, to graph.Node) bool { - var t traverse.BreadthFirst - return t.Walk(g, from, func(n graph.Node, _ int) bool { return n.ID() == to.ID() }) != nil -} - -// ConnectedComponents returns the connected components of the undirected graph g. -func ConnectedComponents(g graph.Undirected) [][]graph.Node { - var ( - w traverse.DepthFirst - c []graph.Node - cc [][]graph.Node - ) - during := func(n graph.Node) { - c = append(c, n) - } - after := func() { - cc = append(cc, []graph.Node(nil)) - cc[len(cc)-1] = append(cc[len(cc)-1], c...) - c = c[:0] - } - w.WalkAll(g, nil, after, during) - - return cc -} diff --git a/vendor/gonum.org/v1/gonum/graph/traverse/doc.go b/vendor/gonum.org/v1/gonum/graph/traverse/doc.go deleted file mode 100644 index dc98bbf437..0000000000 --- a/vendor/gonum.org/v1/gonum/graph/traverse/doc.go +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright ©2017 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package traverse provides basic graph traversal primitives. -package traverse // import "gonum.org/v1/gonum/graph/traverse" diff --git a/vendor/gonum.org/v1/gonum/graph/traverse/traverse.go b/vendor/gonum.org/v1/gonum/graph/traverse/traverse.go deleted file mode 100644 index 125b16114c..0000000000 --- a/vendor/gonum.org/v1/gonum/graph/traverse/traverse.go +++ /dev/null @@ -1,231 +0,0 @@ -// Copyright ©2015 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package traverse - -import ( - "gonum.org/v1/gonum/graph" - "gonum.org/v1/gonum/graph/internal/linear" - "gonum.org/v1/gonum/graph/internal/set" -) - -var _ Graph = graph.Graph(nil) - -// Graph is the subset of graph.Graph necessary for graph traversal. -type Graph interface { - // From returns all nodes that can be reached directly - // from the node with the given ID. - From(id int64) graph.Nodes - - // Edge returns the edge from u to v, with IDs uid and vid, - // if such an edge exists and nil otherwise. The node v - // must be directly reachable from u as defined by - // the From method. - Edge(uid, vid int64) graph.Edge -} - -// BreadthFirst implements stateful breadth-first graph traversal. -type BreadthFirst struct { - // Visit is called on all nodes on their first visit. - Visit func(graph.Node) - - // Traverse is called on all edges that may be traversed - // during the walk. This includes edges that would hop to - // an already visited node. - // - // The value returned by Traverse determines whether - // an edge can be traversed during the walk. - Traverse func(graph.Edge) bool - - queue linear.NodeQueue - visited set.Int64s -} - -// Walk performs a breadth-first traversal of the graph g starting from the given node, -// depending on the Traverse field and the until parameter if they are non-nil. -// The traversal follows edges for which Traverse(edge) is true and returns the first node -// for which until(node, depth) is true. During the traversal, if the Visit field is -// non-nil, it is called with each node the first time it is visited. -func (b *BreadthFirst) Walk(g Graph, from graph.Node, until func(n graph.Node, d int) bool) graph.Node { - if b.visited == nil { - b.visited = make(set.Int64s) - } - b.queue.Enqueue(from) - if b.Visit != nil && !b.visited.Has(from.ID()) { - b.Visit(from) - } - b.visited.Add(from.ID()) - - var ( - depth int - children int - untilNext = 1 - ) - for b.queue.Len() > 0 { - t := b.queue.Dequeue() - if until != nil && until(t, depth) { - return t - } - tid := t.ID() - to := g.From(tid) - for to.Next() { - n := to.Node() - nid := n.ID() - if b.Traverse != nil && !b.Traverse(g.Edge(tid, nid)) { - continue - } - if b.visited.Has(nid) { - continue - } - if b.Visit != nil { - b.Visit(n) - } - b.visited.Add(nid) - children++ - b.queue.Enqueue(n) - } - if untilNext--; untilNext == 0 { - depth++ - untilNext = children - children = 0 - } - } - - return nil -} - -// WalkAll calls Walk for each unvisited node of the graph g using edges independent -// of their direction. The functions before and after are called prior to commencing -// and after completing each walk if they are non-nil respectively. The function -// during is called on each node as it is traversed. -func (b *BreadthFirst) WalkAll(g graph.Undirected, before, after func(), during func(graph.Node)) { - b.Reset() - nodes := g.Nodes() - for nodes.Next() { - from := nodes.Node() - if b.Visited(from) { - continue - } - if before != nil { - before() - } - b.Walk(g, from, func(n graph.Node, _ int) bool { - if during != nil { - during(n) - } - return false - }) - if after != nil { - after() - } - } -} - -// Visited returned whether the node n was visited during a traverse. -func (b *BreadthFirst) Visited(n graph.Node) bool { - return b.visited.Has(n.ID()) -} - -// Reset resets the state of the traverser for reuse. -func (b *BreadthFirst) Reset() { - b.queue.Reset() - b.visited = nil -} - -// DepthFirst implements stateful depth-first graph traversal. -type DepthFirst struct { - // Visit is called on all nodes on their first visit. - Visit func(graph.Node) - - // Traverse is called on all edges that may be traversed - // during the walk. This includes edges that would hop to - // an already visited node. - // - // The value returned by Traverse determines whether an - // edge can be traversed during the walk. - Traverse func(graph.Edge) bool - - stack linear.NodeStack - visited set.Int64s -} - -// Walk performs a depth-first traversal of the graph g starting from the given node, -// depending on the Traverse field and the until parameter if they are non-nil. -// The traversal follows edges for which Traverse(edge) is true and returns the first node -// for which until(node) is true. During the traversal, if the Visit field is non-nil, it -// is called with each node the first time it is visited. -func (d *DepthFirst) Walk(g Graph, from graph.Node, until func(graph.Node) bool) graph.Node { - if d.visited == nil { - d.visited = make(set.Int64s) - } - d.stack.Push(from) - if d.Visit != nil && !d.visited.Has(from.ID()) { - d.Visit(from) - } - d.visited.Add(from.ID()) - - for d.stack.Len() > 0 { - t := d.stack.Pop() - if until != nil && until(t) { - return t - } - tid := t.ID() - to := g.From(tid) - for to.Next() { - n := to.Node() - nid := n.ID() - if d.Traverse != nil && !d.Traverse(g.Edge(tid, nid)) { - continue - } - if d.visited.Has(nid) { - continue - } - if d.Visit != nil { - d.Visit(n) - } - d.visited.Add(nid) - d.stack.Push(n) - } - } - - return nil -} - -// WalkAll calls Walk for each unvisited node of the graph g using edges independent -// of their direction. The functions before and after are called prior to commencing -// and after completing each walk if they are non-nil respectively. The function -// during is called on each node as it is traversed. -func (d *DepthFirst) WalkAll(g graph.Undirected, before, after func(), during func(graph.Node)) { - d.Reset() - nodes := g.Nodes() - for nodes.Next() { - from := nodes.Node() - if d.Visited(from) { - continue - } - if before != nil { - before() - } - d.Walk(g, from, func(n graph.Node) bool { - if during != nil { - during(n) - } - return false - }) - if after != nil { - after() - } - } -} - -// Visited returned whether the node n was visited during a traverse. -func (d *DepthFirst) Visited(n graph.Node) bool { - return d.visited.Has(n.ID()) -} - -// Reset resets the state of the traverser for reuse. -func (d *DepthFirst) Reset() { - d.stack = d.stack[:0] - d.visited = nil -} diff --git a/vendor/gonum.org/v1/gonum/graph/undirect.go b/vendor/gonum.org/v1/gonum/graph/undirect.go deleted file mode 100644 index 07ce64a060..0000000000 --- a/vendor/gonum.org/v1/gonum/graph/undirect.go +++ /dev/null @@ -1,270 +0,0 @@ -// Copyright ©2015 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package graph - -// Undirect converts a directed graph to an undirected graph. -type Undirect struct { - G Directed -} - -var _ Undirected = Undirect{} - -// Node returns the node with the given ID if it exists in the graph, -// and nil otherwise. -func (g Undirect) Node(id int64) Node { return g.G.Node(id) } - -// Nodes returns all the nodes in the graph. -func (g Undirect) Nodes() Nodes { return g.G.Nodes() } - -// From returns all nodes in g that can be reached directly from u. -func (g Undirect) From(uid int64) Nodes { - return newNodeFilterIterator(g.G.From(uid), g.G.To(uid)) -} - -// HasEdgeBetween returns whether an edge exists between nodes x and y. -func (g Undirect) HasEdgeBetween(xid, yid int64) bool { return g.G.HasEdgeBetween(xid, yid) } - -// Edge returns the edge from u to v if such an edge exists and nil otherwise. -// The node v must be directly reachable from u as defined by the From method. -// If an edge exists, the Edge returned is an EdgePair. The weight of -// the edge is determined by applying the Merge func to the weights of the -// edges between u and v. -func (g Undirect) Edge(uid, vid int64) Edge { return g.EdgeBetween(uid, vid) } - -// EdgeBetween returns the edge between nodes x and y. If an edge exists, the -// Edge returned is an EdgePair. The weight of the edge is determined by -// applying the Merge func to the weights of edges between x and y. -func (g Undirect) EdgeBetween(xid, yid int64) Edge { - fe := g.G.Edge(xid, yid) - re := g.G.Edge(yid, xid) - if fe == nil && re == nil { - return nil - } - - return EdgePair{fe, re} -} - -// UndirectWeighted converts a directed weighted graph to an undirected weighted graph, -// resolving edge weight conflicts. -type UndirectWeighted struct { - G WeightedDirected - - // Absent is the value used to - // represent absent edge weights - // passed to Merge if the reverse - // edge is present. - Absent float64 - - // Merge defines how discordant edge - // weights in G are resolved. A merge - // is performed if at least one edge - // exists between the nodes being - // considered. The edges corresponding - // to the two weights are also passed, - // in the same order. - // The order of weight parameters - // passed to Merge is not defined, so - // the function should be commutative. - // If Merge is nil, the arithmetic - // mean is used to merge weights. - Merge func(x, y float64, xe, ye Edge) float64 -} - -var ( - _ Undirected = UndirectWeighted{} - _ WeightedUndirected = UndirectWeighted{} -) - -// Node returns the node with the given ID if it exists in the graph, -// and nil otherwise. -func (g UndirectWeighted) Node(id int64) Node { return g.G.Node(id) } - -// Nodes returns all the nodes in the graph. -func (g UndirectWeighted) Nodes() Nodes { return g.G.Nodes() } - -// From returns all nodes in g that can be reached directly from u. -func (g UndirectWeighted) From(uid int64) Nodes { - return newNodeFilterIterator(g.G.From(uid), g.G.To(uid)) -} - -// HasEdgeBetween returns whether an edge exists between nodes x and y. -func (g UndirectWeighted) HasEdgeBetween(xid, yid int64) bool { return g.G.HasEdgeBetween(xid, yid) } - -// Edge returns the edge from u to v if such an edge exists and nil otherwise. -// The node v must be directly reachable from u as defined by the From method. -// If an edge exists, the Edge returned is an EdgePair. The weight of -// the edge is determined by applying the Merge func to the weights of the -// edges between u and v. -func (g UndirectWeighted) Edge(uid, vid int64) Edge { return g.WeightedEdgeBetween(uid, vid) } - -// WeightedEdge returns the weighted edge from u to v if such an edge exists and nil otherwise. -// The node v must be directly reachable from u as defined by the From method. -// If an edge exists, the Edge returned is an EdgePair. The weight of -// the edge is determined by applying the Merge func to the weights of the -// edges between u and v. -func (g UndirectWeighted) WeightedEdge(uid, vid int64) WeightedEdge { - return g.WeightedEdgeBetween(uid, vid) -} - -// EdgeBetween returns the edge between nodes x and y. If an edge exists, the -// Edge returned is an EdgePair. The weight of the edge is determined by -// applying the Merge func to the weights of edges between x and y. -func (g UndirectWeighted) EdgeBetween(xid, yid int64) Edge { - return g.WeightedEdgeBetween(xid, yid) -} - -// WeightedEdgeBetween returns the weighted edge between nodes x and y. If an edge exists, the -// Edge returned is an EdgePair. The weight of the edge is determined by -// applying the Merge func to the weights of edges between x and y. -func (g UndirectWeighted) WeightedEdgeBetween(xid, yid int64) WeightedEdge { - fe := g.G.Edge(xid, yid) - re := g.G.Edge(yid, xid) - if fe == nil && re == nil { - return nil - } - - f, ok := g.G.Weight(xid, yid) - if !ok { - f = g.Absent - } - r, ok := g.G.Weight(yid, xid) - if !ok { - r = g.Absent - } - - var w float64 - if g.Merge == nil { - w = (f + r) / 2 - } else { - w = g.Merge(f, r, fe, re) - } - return WeightedEdgePair{EdgePair: [2]Edge{fe, re}, W: w} -} - -// Weight returns the weight for the edge between x and y if Edge(x, y) returns a non-nil Edge. -// If x and y are the same node the internal node weight is returned. If there is no joining -// edge between the two nodes the weight value returned is zero. Weight returns true if an edge -// exists between x and y or if x and y have the same ID, false otherwise. -func (g UndirectWeighted) Weight(xid, yid int64) (w float64, ok bool) { - fe := g.G.Edge(xid, yid) - re := g.G.Edge(yid, xid) - - f, fOk := g.G.Weight(xid, yid) - if !fOk { - f = g.Absent - } - r, rOK := g.G.Weight(yid, xid) - if !rOK { - r = g.Absent - } - ok = fOk || rOK - - if g.Merge == nil { - return (f + r) / 2, ok - } - return g.Merge(f, r, fe, re), ok -} - -// EdgePair is an opposed pair of directed edges. -type EdgePair [2]Edge - -// From returns the from node of the first non-nil edge, or nil. -func (e EdgePair) From() Node { - if e[0] != nil { - return e[0].From() - } else if e[1] != nil { - return e[1].From() - } - return nil -} - -// To returns the to node of the first non-nil edge, or nil. -func (e EdgePair) To() Node { - if e[0] != nil { - return e[0].To() - } else if e[1] != nil { - return e[1].To() - } - return nil -} - -// ReversedEdge returns a new Edge with the end point of the -// edges in the pair swapped. -func (e EdgePair) ReversedEdge() Edge { - if e[0] != nil { - e[0] = e[0].ReversedEdge() - } - if e[1] != nil { - e[1] = e[1].ReversedEdge() - } - return e -} - -// WeightedEdgePair is an opposed pair of directed edges. -type WeightedEdgePair struct { - EdgePair - W float64 -} - -// ReversedEdge returns a new Edge with the end point of the -// edges in the pair swapped. -func (e WeightedEdgePair) ReversedEdge() Edge { - e.EdgePair = e.EdgePair.ReversedEdge().(EdgePair) - return e -} - -// Weight returns the merged edge weights of the two edges. -func (e WeightedEdgePair) Weight() float64 { return e.W } - -// nodeFilterIterator combines two Nodes to produce a single stream of -// unique nodes. -type nodeFilterIterator struct { - a, b Nodes - - // unique indicates the node in b with the key ID is unique. - unique map[int64]bool -} - -func newNodeFilterIterator(a, b Nodes) *nodeFilterIterator { - n := nodeFilterIterator{a: a, b: b, unique: make(map[int64]bool)} - for n.b.Next() { - n.unique[n.b.Node().ID()] = true - } - n.b.Reset() - for n.a.Next() { - n.unique[n.a.Node().ID()] = false - } - n.a.Reset() - return &n -} - -func (n *nodeFilterIterator) Len() int { - return len(n.unique) -} - -func (n *nodeFilterIterator) Next() bool { - n.Len() - if n.a.Next() { - return true - } - for n.b.Next() { - if n.unique[n.b.Node().ID()] { - return true - } - } - return false -} - -func (n *nodeFilterIterator) Node() Node { - if n.a.Len() != 0 { - return n.a.Node() - } - return n.b.Node() -} - -func (n *nodeFilterIterator) Reset() { - n.a.Reset() - n.b.Reset() -} diff --git a/vendor/gonum.org/v1/gonum/internal/asm/c128/axpyinc_amd64.s b/vendor/gonum.org/v1/gonum/internal/asm/c128/axpyinc_amd64.s deleted file mode 100644 index 0a4c14c292..0000000000 --- a/vendor/gonum.org/v1/gonum/internal/asm/c128/axpyinc_amd64.s +++ /dev/null @@ -1,134 +0,0 @@ -// Copyright ©2016 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//+build !noasm,!appengine,!safe - -#include "textflag.h" - -// MOVDDUP X2, X3 -#define MOVDDUP_X2_X3 BYTE $0xF2; BYTE $0x0F; BYTE $0x12; BYTE $0xDA -// MOVDDUP X4, X5 -#define MOVDDUP_X4_X5 BYTE $0xF2; BYTE $0x0F; BYTE $0x12; BYTE $0xEC -// MOVDDUP X6, X7 -#define MOVDDUP_X6_X7 BYTE $0xF2; BYTE $0x0F; BYTE $0x12; BYTE $0xFE -// MOVDDUP X8, X9 -#define MOVDDUP_X8_X9 BYTE $0xF2; BYTE $0x45; BYTE $0x0F; BYTE $0x12; BYTE $0xC8 - -// ADDSUBPD X2, X3 -#define ADDSUBPD_X2_X3 BYTE $0x66; BYTE $0x0F; BYTE $0xD0; BYTE $0xDA -// ADDSUBPD X4, X5 -#define ADDSUBPD_X4_X5 BYTE $0x66; BYTE $0x0F; BYTE $0xD0; BYTE $0xEC -// ADDSUBPD X6, X7 -#define ADDSUBPD_X6_X7 BYTE $0x66; BYTE $0x0F; BYTE $0xD0; BYTE $0xFE -// ADDSUBPD X8, X9 -#define ADDSUBPD_X8_X9 BYTE $0x66; BYTE $0x45; BYTE $0x0F; BYTE $0xD0; BYTE $0xC8 - -// func AxpyInc(alpha complex128, x, y []complex128, n, incX, incY, ix, iy uintptr) -TEXT ·AxpyInc(SB), NOSPLIT, $0 - MOVQ x_base+16(FP), SI // SI = &x - MOVQ y_base+40(FP), DI // DI = &y - MOVQ n+64(FP), CX // CX = n - CMPQ CX, $0 // if n==0 { return } - JE axpyi_end - MOVQ ix+88(FP), R8 // R8 = ix // Load the first index - SHLQ $4, R8 // R8 *= sizeof(complex128) - MOVQ iy+96(FP), R9 // R9 = iy - SHLQ $4, R9 // R9 *= sizeof(complex128) - LEAQ (SI)(R8*1), SI // SI = &(x[ix]) - LEAQ (DI)(R9*1), DI // DI = &(y[iy]) - MOVQ DI, DX // DX = DI // Separate Read/Write pointers - MOVQ incX+72(FP), R8 // R8 = incX - SHLQ $4, R8 // R8 *= sizeof(complex128) - MOVQ incY+80(FP), R9 // R9 = iy - SHLQ $4, R9 // R9 *= sizeof(complex128) - MOVUPS alpha+0(FP), X0 // X0 = { imag(a), real(a) } - MOVAPS X0, X1 - SHUFPD $0x1, X1, X1 // X1 = { real(a), imag(a) } - MOVAPS X0, X10 // Copy X0 and X1 for pipelining - MOVAPS X1, X11 - MOVQ CX, BX - ANDQ $3, CX // CX = n % 4 - SHRQ $2, BX // BX = floor( n / 4 ) - JZ axpyi_tail // if BX == 0 { goto axpyi_tail } - -axpyi_loop: // do { - MOVUPS (SI), X2 // X_i = { imag(x[i]), real(x[i]) } - MOVUPS (SI)(R8*1), X4 - LEAQ (SI)(R8*2), SI // SI = &(SI[incX*2]) - MOVUPS (SI), X6 - MOVUPS (SI)(R8*1), X8 - - // X_(i+1) = { real(x[i], real(x[i]) } - MOVDDUP_X2_X3 - MOVDDUP_X4_X5 - MOVDDUP_X6_X7 - MOVDDUP_X8_X9 - - // X_i = { imag(x[i]), imag(x[i]) } - SHUFPD $0x3, X2, X2 - SHUFPD $0x3, X4, X4 - SHUFPD $0x3, X6, X6 - SHUFPD $0x3, X8, X8 - - // X_i = { real(a) * imag(x[i]), imag(a) * imag(x[i]) } - // X_(i+1) = { imag(a) * real(x[i]), real(a) * real(x[i]) } - MULPD X1, X2 - MULPD X0, X3 - MULPD X11, X4 - MULPD X10, X5 - MULPD X1, X6 - MULPD X0, X7 - MULPD X11, X8 - MULPD X10, X9 - - // X_(i+1) = { - // imag(result[i]): imag(a)*real(x[i]) + real(a)*imag(x[i]), - // real(result[i]): real(a)*real(x[i]) - imag(a)*imag(x[i]) - // } - ADDSUBPD_X2_X3 - ADDSUBPD_X4_X5 - ADDSUBPD_X6_X7 - ADDSUBPD_X8_X9 - - // X_(i+1) = { imag(result[i]) + imag(y[i]), real(result[i]) + real(y[i]) } - ADDPD (DX), X3 - ADDPD (DX)(R9*1), X5 - LEAQ (DX)(R9*2), DX // DX = &(DX[incY*2]) - ADDPD (DX), X7 - ADDPD (DX)(R9*1), X9 - MOVUPS X3, (DI) // dst[i] = X_(i+1) - MOVUPS X5, (DI)(R9*1) - LEAQ (DI)(R9*2), DI - MOVUPS X7, (DI) - MOVUPS X9, (DI)(R9*1) - LEAQ (SI)(R8*2), SI // SI = &(SI[incX*2]) - LEAQ (DX)(R9*2), DX // DX = &(DX[incY*2]) - LEAQ (DI)(R9*2), DI // DI = &(DI[incY*2]) - DECQ BX - JNZ axpyi_loop // } while --BX > 0 - CMPQ CX, $0 // if CX == 0 { return } - JE axpyi_end - -axpyi_tail: // do { - MOVUPS (SI), X2 // X_i = { imag(x[i]), real(x[i]) } - MOVDDUP_X2_X3 // X_(i+1) = { real(x[i], real(x[i]) } - SHUFPD $0x3, X2, X2 // X_i = { imag(x[i]), imag(x[i]) } - MULPD X1, X2 // X_i = { real(a) * imag(x[i]), imag(a) * imag(x[i]) } - MULPD X0, X3 // X_(i+1) = { imag(a) * real(x[i]), real(a) * real(x[i]) } - - // X_(i+1) = { - // imag(result[i]): imag(a)*real(x[i]) + real(a)*imag(x[i]), - // real(result[i]): real(a)*real(x[i]) - imag(a)*imag(x[i]) - // } - ADDSUBPD_X2_X3 - - // X_(i+1) = { imag(result[i]) + imag(y[i]), real(result[i]) + real(y[i]) } - ADDPD (DI), X3 - MOVUPS X3, (DI) // y[i] = X_i - ADDQ R8, SI // SI = &(SI[incX]) - ADDQ R9, DI // DI = &(DI[incY]) - LOOP axpyi_tail // } while --CX > 0 - -axpyi_end: - RET diff --git a/vendor/gonum.org/v1/gonum/internal/asm/c128/axpyincto_amd64.s b/vendor/gonum.org/v1/gonum/internal/asm/c128/axpyincto_amd64.s deleted file mode 100644 index cb57f4bed3..0000000000 --- a/vendor/gonum.org/v1/gonum/internal/asm/c128/axpyincto_amd64.s +++ /dev/null @@ -1,141 +0,0 @@ -// Copyright ©2016 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//+build !noasm,!appengine,!safe - -#include "textflag.h" - -// MOVDDUP X2, X3 -#define MOVDDUP_X2_X3 BYTE $0xF2; BYTE $0x0F; BYTE $0x12; BYTE $0xDA -// MOVDDUP X4, X5 -#define MOVDDUP_X4_X5 BYTE $0xF2; BYTE $0x0F; BYTE $0x12; BYTE $0xEC -// MOVDDUP X6, X7 -#define MOVDDUP_X6_X7 BYTE $0xF2; BYTE $0x0F; BYTE $0x12; BYTE $0xFE -// MOVDDUP X8, X9 -#define MOVDDUP_X8_X9 BYTE $0xF2; BYTE $0x45; BYTE $0x0F; BYTE $0x12; BYTE $0xC8 - -// ADDSUBPD X2, X3 -#define ADDSUBPD_X2_X3 BYTE $0x66; BYTE $0x0F; BYTE $0xD0; BYTE $0xDA -// ADDSUBPD X4, X5 -#define ADDSUBPD_X4_X5 BYTE $0x66; BYTE $0x0F; BYTE $0xD0; BYTE $0xEC -// ADDSUBPD X6, X7 -#define ADDSUBPD_X6_X7 BYTE $0x66; BYTE $0x0F; BYTE $0xD0; BYTE $0xFE -// ADDSUBPD X8, X9 -#define ADDSUBPD_X8_X9 BYTE $0x66; BYTE $0x45; BYTE $0x0F; BYTE $0xD0; BYTE $0xC8 - -// func AxpyIncTo(dst []complex128, incDst, idst uintptr, alpha complex128, x, y []complex128, n, incX, incY, ix, iy uintptr) -TEXT ·AxpyIncTo(SB), NOSPLIT, $0 - MOVQ dst_base+0(FP), DI // DI = &dst - MOVQ x_base+56(FP), SI // SI = &x - MOVQ y_base+80(FP), DX // DX = &y - MOVQ n+104(FP), CX // CX = n - CMPQ CX, $0 // if n==0 { return } - JE axpyi_end - MOVQ ix+128(FP), R8 // R8 = ix // Load the first index - SHLQ $4, R8 // R8 *= sizeof(complex128) - MOVQ iy+136(FP), R9 // R9 = iy - SHLQ $4, R9 // R9 *= sizeof(complex128) - MOVQ idst+32(FP), R10 // R10 = idst - SHLQ $4, R10 // R10 *= sizeof(complex128) - LEAQ (SI)(R8*1), SI // SI = &(x[ix]) - LEAQ (DX)(R9*1), DX // DX = &(y[iy]) - LEAQ (DI)(R10*1), DI // DI = &(dst[idst]) - MOVQ incX+112(FP), R8 // R8 = incX - SHLQ $4, R8 // R8 *= sizeof(complex128) - MOVQ incY+120(FP), R9 // R9 = incY - SHLQ $4, R9 // R9 *= sizeof(complex128) - MOVQ incDst+24(FP), R10 // R10 = incDst - SHLQ $4, R10 // R10 *= sizeof(complex128) - MOVUPS alpha+40(FP), X0 // X0 = { imag(a), real(a) } - MOVAPS X0, X1 - SHUFPD $0x1, X1, X1 // X1 = { real(a), imag(a) } - MOVAPS X0, X10 // Copy X0 and X1 for pipelining - MOVAPS X1, X11 - MOVQ CX, BX - ANDQ $3, CX // CX = n % 4 - SHRQ $2, BX // BX = floor( n / 4 ) - JZ axpyi_tail // if BX == 0 { goto axpyi_tail } - -axpyi_loop: // do { - MOVUPS (SI), X2 // X_i = { imag(x[i]), real(x[i]) } - MOVUPS (SI)(R8*1), X4 - LEAQ (SI)(R8*2), SI // SI = &(SI[incX*2]) - - MOVUPS (SI), X6 - MOVUPS (SI)(R8*1), X8 - - // X_(i+1) = { real(x[i], real(x[i]) } - MOVDDUP_X2_X3 - MOVDDUP_X4_X5 - MOVDDUP_X6_X7 - MOVDDUP_X8_X9 - - // X_i = { imag(x[i]), imag(x[i]) } - SHUFPD $0x3, X2, X2 - SHUFPD $0x3, X4, X4 - SHUFPD $0x3, X6, X6 - SHUFPD $0x3, X8, X8 - - // X_i = { real(a) * imag(x[i]), imag(a) * imag(x[i]) } - // X_(i+1) = { imag(a) * real(x[i]), real(a) * real(x[i]) } - MULPD X1, X2 - MULPD X0, X3 - MULPD X11, X4 - MULPD X10, X5 - MULPD X1, X6 - MULPD X0, X7 - MULPD X11, X8 - MULPD X10, X9 - - // X_(i+1) = { - // imag(result[i]): imag(a)*real(x[i]) + real(a)*imag(x[i]), - // real(result[i]): real(a)*real(x[i]) - imag(a)*imag(x[i]) - // } - ADDSUBPD_X2_X3 - ADDSUBPD_X4_X5 - ADDSUBPD_X6_X7 - ADDSUBPD_X8_X9 - - // X_(i+1) = { imag(result[i]) + imag(y[i]), real(result[i]) + real(y[i]) } - ADDPD (DX), X3 - ADDPD (DX)(R9*1), X5 - LEAQ (DX)(R9*2), DX // DX = &(DX[incY*2]) - ADDPD (DX), X7 - ADDPD (DX)(R9*1), X9 - MOVUPS X3, (DI) // dst[i] = X_(i+1) - MOVUPS X5, (DI)(R10*1) - LEAQ (DI)(R10*2), DI - MOVUPS X7, (DI) - MOVUPS X9, (DI)(R10*1) - LEAQ (SI)(R8*2), SI // SI = &(SI[incX*2]) - LEAQ (DX)(R9*2), DX // DX = &(DX[incY*2]) - LEAQ (DI)(R10*2), DI // DI = &(DI[incDst*2]) - DECQ BX - JNZ axpyi_loop // } while --BX > 0 - CMPQ CX, $0 // if CX == 0 { return } - JE axpyi_end - -axpyi_tail: // do { - MOVUPS (SI), X2 // X_i = { imag(x[i]), real(x[i]) } - MOVDDUP_X2_X3 // X_(i+1) = { real(x[i], real(x[i]) } - SHUFPD $0x3, X2, X2 // X_i = { imag(x[i]), imag(x[i]) } - MULPD X1, X2 // X_i = { real(a) * imag(x[i]), imag(a) * imag(x[i]) } - MULPD X0, X3 // X_(i+1) = { imag(a) * real(x[i]), real(a) * real(x[i]) } - - // X_(i+1) = { - // imag(result[i]): imag(a)*real(x[i]) + real(a)*imag(x[i]), - // real(result[i]): real(a)*real(x[i]) - imag(a)*imag(x[i]) - // } - ADDSUBPD_X2_X3 - - // X_(i+1) = { imag(result[i]) + imag(y[i]), real(result[i]) + real(y[i]) } - ADDPD (DX), X3 - MOVUPS X3, (DI) // y[i] X_(i+1) - ADDQ R8, SI // SI += incX - ADDQ R9, DX // DX += incY - ADDQ R10, DI // DI += incDst - LOOP axpyi_tail // } while --CX > 0 - -axpyi_end: - RET diff --git a/vendor/gonum.org/v1/gonum/internal/asm/c128/axpyunitary_amd64.s b/vendor/gonum.org/v1/gonum/internal/asm/c128/axpyunitary_amd64.s deleted file mode 100644 index f1fddce71d..0000000000 --- a/vendor/gonum.org/v1/gonum/internal/asm/c128/axpyunitary_amd64.s +++ /dev/null @@ -1,122 +0,0 @@ -// Copyright ©2016 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//+build !noasm,!appengine,!safe - -#include "textflag.h" - -// MOVDDUP X2, X3 -#define MOVDDUP_X2_X3 BYTE $0xF2; BYTE $0x0F; BYTE $0x12; BYTE $0xDA -// MOVDDUP X4, X5 -#define MOVDDUP_X4_X5 BYTE $0xF2; BYTE $0x0F; BYTE $0x12; BYTE $0xEC -// MOVDDUP X6, X7 -#define MOVDDUP_X6_X7 BYTE $0xF2; BYTE $0x0F; BYTE $0x12; BYTE $0xFE -// MOVDDUP X8, X9 -#define MOVDDUP_X8_X9 BYTE $0xF2; BYTE $0x45; BYTE $0x0F; BYTE $0x12; BYTE $0xC8 - -// ADDSUBPD X2, X3 -#define ADDSUBPD_X2_X3 BYTE $0x66; BYTE $0x0F; BYTE $0xD0; BYTE $0xDA -// ADDSUBPD X4, X5 -#define ADDSUBPD_X4_X5 BYTE $0x66; BYTE $0x0F; BYTE $0xD0; BYTE $0xEC -// ADDSUBPD X6, X7 -#define ADDSUBPD_X6_X7 BYTE $0x66; BYTE $0x0F; BYTE $0xD0; BYTE $0xFE -// ADDSUBPD X8, X9 -#define ADDSUBPD_X8_X9 BYTE $0x66; BYTE $0x45; BYTE $0x0F; BYTE $0xD0; BYTE $0xC8 - -// func AxpyUnitary(alpha complex128, x, y []complex128) -TEXT ·AxpyUnitary(SB), NOSPLIT, $0 - MOVQ x_base+16(FP), SI // SI = &x - MOVQ y_base+40(FP), DI // DI = &y - MOVQ x_len+24(FP), CX // CX = min( len(x), len(y) ) - CMPQ y_len+48(FP), CX - CMOVQLE y_len+48(FP), CX - CMPQ CX, $0 // if CX == 0 { return } - JE caxy_end - PXOR X0, X0 // Clear work registers and cache-align loop - PXOR X1, X1 - MOVUPS alpha+0(FP), X0 // X0 = { imag(a), real(a) } - MOVAPS X0, X1 - SHUFPD $0x1, X1, X1 // X1 = { real(a), imag(a) } - XORQ AX, AX // i = 0 - MOVAPS X0, X10 // Copy X0 and X1 for pipelining - MOVAPS X1, X11 - MOVQ CX, BX - ANDQ $3, CX // CX = n % 4 - SHRQ $2, BX // BX = floor( n / 4 ) - JZ caxy_tail // if BX == 0 { goto caxy_tail } - -caxy_loop: // do { - MOVUPS (SI)(AX*8), X2 // X_i = { imag(x[i]), real(x[i]) } - MOVUPS 16(SI)(AX*8), X4 - MOVUPS 32(SI)(AX*8), X6 - MOVUPS 48(SI)(AX*8), X8 - - // X_(i+1) = { real(x[i], real(x[i]) } - MOVDDUP_X2_X3 - MOVDDUP_X4_X5 - MOVDDUP_X6_X7 - MOVDDUP_X8_X9 - - // X_i = { imag(x[i]), imag(x[i]) } - SHUFPD $0x3, X2, X2 - SHUFPD $0x3, X4, X4 - SHUFPD $0x3, X6, X6 - SHUFPD $0x3, X8, X8 - - // X_i = { real(a) * imag(x[i]), imag(a) * imag(x[i]) } - // X_(i+1) = { imag(a) * real(x[i]), real(a) * real(x[i]) } - MULPD X1, X2 - MULPD X0, X3 - MULPD X11, X4 - MULPD X10, X5 - MULPD X1, X6 - MULPD X0, X7 - MULPD X11, X8 - MULPD X10, X9 - - // X_(i+1) = { - // imag(result[i]): imag(a)*real(x[i]) + real(a)*imag(x[i]), - // real(result[i]): real(a)*real(x[i]) - imag(a)*imag(x[i]) - // } - ADDSUBPD_X2_X3 - ADDSUBPD_X4_X5 - ADDSUBPD_X6_X7 - ADDSUBPD_X8_X9 - - // X_(i+1) = { imag(result[i]) + imag(y[i]), real(result[i]) + real(y[i]) } - ADDPD (DI)(AX*8), X3 - ADDPD 16(DI)(AX*8), X5 - ADDPD 32(DI)(AX*8), X7 - ADDPD 48(DI)(AX*8), X9 - MOVUPS X3, (DI)(AX*8) // y[i] = X_(i+1) - MOVUPS X5, 16(DI)(AX*8) - MOVUPS X7, 32(DI)(AX*8) - MOVUPS X9, 48(DI)(AX*8) - ADDQ $8, AX // i += 8 - DECQ BX - JNZ caxy_loop // } while --BX > 0 - CMPQ CX, $0 // if CX == 0 { return } - JE caxy_end - -caxy_tail: // do { - MOVUPS (SI)(AX*8), X2 // X_i = { imag(x[i]), real(x[i]) } - MOVDDUP_X2_X3 // X_(i+1) = { real(x[i], real(x[i]) } - SHUFPD $0x3, X2, X2 // X_i = { imag(x[i]), imag(x[i]) } - MULPD X1, X2 // X_i = { real(a) * imag(x[i]), imag(a) * imag(x[i]) } - MULPD X0, X3 // X_(i+1) = { imag(a) * real(x[i]), real(a) * real(x[i]) } - - // X_(i+1) = { - // imag(result[i]): imag(a)*real(x[i]) + real(a)*imag(x[i]), - // real(result[i]): real(a)*real(x[i]) - imag(a)*imag(x[i]) - // } - ADDSUBPD_X2_X3 - - // X_(i+1) = { imag(result[i]) + imag(y[i]), real(result[i]) + real(y[i]) } - ADDPD (DI)(AX*8), X3 - MOVUPS X3, (DI)(AX*8) // y[i] = X_(i+1) - ADDQ $2, AX // i += 2 - LOOP caxy_tail // } while --CX > 0 - -caxy_end: - RET diff --git a/vendor/gonum.org/v1/gonum/internal/asm/c128/axpyunitaryto_amd64.s b/vendor/gonum.org/v1/gonum/internal/asm/c128/axpyunitaryto_amd64.s deleted file mode 100644 index b80015fda8..0000000000 --- a/vendor/gonum.org/v1/gonum/internal/asm/c128/axpyunitaryto_amd64.s +++ /dev/null @@ -1,123 +0,0 @@ -// Copyright ©2016 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//+build !noasm,!appengine,!safe - -#include "textflag.h" - -// MOVDDUP X2, X3 -#define MOVDDUP_X2_X3 BYTE $0xF2; BYTE $0x0F; BYTE $0x12; BYTE $0xDA -// MOVDDUP X4, X5 -#define MOVDDUP_X4_X5 BYTE $0xF2; BYTE $0x0F; BYTE $0x12; BYTE $0xEC -// MOVDDUP X6, X7 -#define MOVDDUP_X6_X7 BYTE $0xF2; BYTE $0x0F; BYTE $0x12; BYTE $0xFE -// MOVDDUP X8, X9 -#define MOVDDUP_X8_X9 BYTE $0xF2; BYTE $0x45; BYTE $0x0F; BYTE $0x12; BYTE $0xC8 - -// ADDSUBPD X2, X3 -#define ADDSUBPD_X2_X3 BYTE $0x66; BYTE $0x0F; BYTE $0xD0; BYTE $0xDA -// ADDSUBPD X4, X5 -#define ADDSUBPD_X4_X5 BYTE $0x66; BYTE $0x0F; BYTE $0xD0; BYTE $0xEC -// ADDSUBPD X6, X7 -#define ADDSUBPD_X6_X7 BYTE $0x66; BYTE $0x0F; BYTE $0xD0; BYTE $0xFE -// ADDSUBPD X8, X9 -#define ADDSUBPD_X8_X9 BYTE $0x66; BYTE $0x45; BYTE $0x0F; BYTE $0xD0; BYTE $0xC8 - -// func AxpyUnitaryTo(dst []complex128, alpha complex64, x, y []complex128) -TEXT ·AxpyUnitaryTo(SB), NOSPLIT, $0 - MOVQ dst_base+0(FP), DI // DI = &dst - MOVQ x_base+40(FP), SI // SI = &x - MOVQ y_base+64(FP), DX // DX = &y - MOVQ x_len+48(FP), CX // CX = min( len(x), len(y), len(dst) ) - CMPQ y_len+72(FP), CX - CMOVQLE y_len+72(FP), CX - CMPQ dst_len+8(FP), CX - CMOVQLE dst_len+8(FP), CX - CMPQ CX, $0 // if CX == 0 { return } - JE caxy_end - MOVUPS alpha+24(FP), X0 // X0 = { imag(a), real(a) } - MOVAPS X0, X1 - SHUFPD $0x1, X1, X1 // X1 = { real(a), imag(a) } - XORQ AX, AX // i = 0 - MOVAPS X0, X10 // Copy X0 and X1 for pipelining - MOVAPS X1, X11 - MOVQ CX, BX - ANDQ $3, CX // CX = n % 4 - SHRQ $2, BX // BX = floor( n / 4 ) - JZ caxy_tail // if BX == 0 { goto caxy_tail } - -caxy_loop: // do { - MOVUPS (SI)(AX*8), X2 // X_i = { imag(x[i]), real(x[i]) } - MOVUPS 16(SI)(AX*8), X4 - MOVUPS 32(SI)(AX*8), X6 - MOVUPS 48(SI)(AX*8), X8 - - // X_(i+1) = { real(x[i], real(x[i]) } - MOVDDUP_X2_X3 // Load and duplicate imag elements (xi, xi) - MOVDDUP_X4_X5 - MOVDDUP_X6_X7 - MOVDDUP_X8_X9 - - // X_i = { imag(x[i]), imag(x[i]) } - SHUFPD $0x3, X2, X2 // duplicate real elements (xr, xr) - SHUFPD $0x3, X4, X4 - SHUFPD $0x3, X6, X6 - SHUFPD $0x3, X8, X8 - - // X_i = { real(a) * imag(x[i]), imag(a) * imag(x[i]) } - // X_(i+1) = { imag(a) * real(x[i]), real(a) * real(x[i]) } - MULPD X1, X2 - MULPD X0, X3 - MULPD X11, X4 - MULPD X10, X5 - MULPD X1, X6 - MULPD X0, X7 - MULPD X11, X8 - MULPD X10, X9 - - // X_(i+1) = { - // imag(result[i]): imag(a)*real(x[i]) + real(a)*imag(x[i]), - // real(result[i]): real(a)*real(x[i]) - imag(a)*imag(x[i]) - // } - ADDSUBPD_X2_X3 - ADDSUBPD_X4_X5 - ADDSUBPD_X6_X7 - ADDSUBPD_X8_X9 - - // X_(i+1) = { imag(result[i]) + imag(y[i]), real(result[i]) + real(y[i]) } - ADDPD (DX)(AX*8), X3 - ADDPD 16(DX)(AX*8), X5 - ADDPD 32(DX)(AX*8), X7 - ADDPD 48(DX)(AX*8), X9 - MOVUPS X3, (DI)(AX*8) // y[i] = X_(i+1) - MOVUPS X5, 16(DI)(AX*8) - MOVUPS X7, 32(DI)(AX*8) - MOVUPS X9, 48(DI)(AX*8) - ADDQ $8, AX // i += 8 - DECQ BX - JNZ caxy_loop // } while --BX > 0 - CMPQ CX, $0 // if CX == 0 { return } - JE caxy_end - -caxy_tail: // Same calculation, but read in values to avoid trampling memory - MOVUPS (SI)(AX*8), X2 // X_i = { imag(x[i]), real(x[i]) } - MOVDDUP_X2_X3 // X_(i+1) = { real(x[i], real(x[i]) } - SHUFPD $0x3, X2, X2 // X_i = { imag(x[i]), imag(x[i]) } - MULPD X1, X2 // X_i = { real(a) * imag(x[i]), imag(a) * imag(x[i]) } - MULPD X0, X3 // X_(i+1) = { imag(a) * real(x[i]), real(a) * real(x[i]) } - - // X_(i+1) = { - // imag(result[i]): imag(a)*real(x[i]) + real(a)*imag(x[i]), - // real(result[i]): real(a)*real(x[i]) - imag(a)*imag(x[i]) - // } - ADDSUBPD_X2_X3 - - // X_(i+1) = { imag(result[i]) + imag(y[i]), real(result[i]) + real(y[i]) } - ADDPD (DX)(AX*8), X3 - MOVUPS X3, (DI)(AX*8) // y[i] = X_(i+1) - ADDQ $2, AX // i += 2 - LOOP caxy_tail // } while --CX > 0 - -caxy_end: - RET diff --git a/vendor/gonum.org/v1/gonum/internal/asm/c128/doc.go b/vendor/gonum.org/v1/gonum/internal/asm/c128/doc.go deleted file mode 100644 index 8802ff138a..0000000000 --- a/vendor/gonum.org/v1/gonum/internal/asm/c128/doc.go +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright ©2017 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package c128 provides complex128 vector primitives. -package c128 // import "gonum.org/v1/gonum/internal/asm/c128" diff --git a/vendor/gonum.org/v1/gonum/internal/asm/c128/dotcinc_amd64.s b/vendor/gonum.org/v1/gonum/internal/asm/c128/dotcinc_amd64.s deleted file mode 100644 index 301d294fa4..0000000000 --- a/vendor/gonum.org/v1/gonum/internal/asm/c128/dotcinc_amd64.s +++ /dev/null @@ -1,153 +0,0 @@ -// Copyright ©2016 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//+build !noasm,!appengine,!safe - -#include "textflag.h" - -#define MOVDDUP_XPTR__X3 LONG $0x1E120FF2 // MOVDDUP (SI), X3 -#define MOVDDUP_XPTR_INCX__X5 LONG $0x120F42F2; WORD $0x062C // MOVDDUP (SI)(R8*1), X5 -#define MOVDDUP_XPTR_INCX_2__X7 LONG $0x120F42F2; WORD $0x463C // MOVDDUP (SI)(R8*2), X7 -#define MOVDDUP_XPTR_INCx3X__X9 LONG $0x120F46F2; WORD $0x0E0C // MOVDDUP (SI)(R9*1), X9 - -#define MOVDDUP_8_XPTR__X2 LONG $0x56120FF2; BYTE $0x08 // MOVDDUP 8(SI), X2 -#define MOVDDUP_8_XPTR_INCX__X4 LONG $0x120F42F2; WORD $0x0664; BYTE $0x08 // MOVDDUP 8(SI)(R8*1), X4 -#define MOVDDUP_8_XPTR_INCX_2__X6 LONG $0x120F42F2; WORD $0x4674; BYTE $0x08 // MOVDDUP 8(SI)(R8*2), X6 -#define MOVDDUP_8_XPTR_INCx3X__X8 LONG $0x120F46F2; WORD $0x0E44; BYTE $0x08 // MOVDDUP 8(SI)(R9*1), X8 - -#define ADDSUBPD_X2_X3 LONG $0xDAD00F66 // ADDSUBPD X2, X3 -#define ADDSUBPD_X4_X5 LONG $0xECD00F66 // ADDSUBPD X4, X5 -#define ADDSUBPD_X6_X7 LONG $0xFED00F66 // ADDSUBPD X6, X7 -#define ADDSUBPD_X8_X9 LONG $0xD00F4566; BYTE $0xC8 // ADDSUBPD X8, X9 - -#define X_PTR SI -#define Y_PTR DI -#define LEN CX -#define TAIL BX -#define SUM X0 -#define P_SUM X1 -#define INC_X R8 -#define INCx3_X R9 -#define INC_Y R10 -#define INCx3_Y R11 -#define NEG1 X15 -#define P_NEG1 X14 - -// func DotcInc(x, y []complex128, n, incX, incY, ix, iy uintptr) (sum complex128) -TEXT ·DotcInc(SB), NOSPLIT, $0 - MOVQ x_base+0(FP), X_PTR // X_PTR = &x - MOVQ y_base+24(FP), Y_PTR // Y_PTR = &y - MOVQ n+48(FP), LEN // LEN = n - PXOR SUM, SUM // SUM = 0 - CMPQ LEN, $0 // if LEN == 0 { return } - JE dot_end - PXOR P_SUM, P_SUM // P_SUM = 0 - MOVQ ix+72(FP), INC_X // INC_X = ix * sizeof(complex128) - SHLQ $4, INC_X - MOVQ iy+80(FP), INC_Y // INC_Y = iy * sizeof(complex128) - SHLQ $4, INC_Y - LEAQ (X_PTR)(INC_X*1), X_PTR // X_PTR = &(X_PTR[ix]) - LEAQ (Y_PTR)(INC_Y*1), Y_PTR // Y_PTR = &(Y_PTR[iy]) - MOVQ incX+56(FP), INC_X // INC_X = incX - SHLQ $4, INC_X // INC_X *= sizeof(complex128) - MOVQ incY+64(FP), INC_Y // INC_Y = incY - SHLQ $4, INC_Y // INC_Y *= sizeof(complex128) - MOVSD $(-1.0), NEG1 - SHUFPD $0, NEG1, NEG1 // { -1, -1 } - MOVQ LEN, TAIL - ANDQ $3, TAIL // TAIL = n % 4 - SHRQ $2, LEN // LEN = floor( n / 4 ) - JZ dot_tail // if n <= 4 { goto dot_tail } - MOVAPS NEG1, P_NEG1 // Copy NEG1 to P_NEG1 for pipelining - LEAQ (INC_X)(INC_X*2), INCx3_X // INCx3_X = 3 * incX * sizeof(complex128) - LEAQ (INC_Y)(INC_Y*2), INCx3_Y // INCx3_Y = 3 * incY * sizeof(complex128) - -dot_loop: // do { - MOVDDUP_XPTR__X3 // X_(i+1) = { real(x[i], real(x[i]) } - MOVDDUP_XPTR_INCX__X5 - MOVDDUP_XPTR_INCX_2__X7 - MOVDDUP_XPTR_INCx3X__X9 - - MOVDDUP_8_XPTR__X2 // X_i = { imag(x[i]), imag(x[i]) } - MOVDDUP_8_XPTR_INCX__X4 - MOVDDUP_8_XPTR_INCX_2__X6 - MOVDDUP_8_XPTR_INCx3X__X8 - - // X_i = { -imag(x[i]), -imag(x[i]) } - MULPD NEG1, X2 - MULPD P_NEG1, X4 - MULPD NEG1, X6 - MULPD P_NEG1, X8 - - // X_j = { imag(y[i]), real(y[i]) } - MOVUPS (Y_PTR), X10 - MOVUPS (Y_PTR)(INC_Y*1), X11 - MOVUPS (Y_PTR)(INC_Y*2), X12 - MOVUPS (Y_PTR)(INCx3_Y*1), X13 - - // X_(i+1) = { imag(a) * real(x[i]), real(a) * real(x[i]) } - MULPD X10, X3 - MULPD X11, X5 - MULPD X12, X7 - MULPD X13, X9 - - // X_j = { real(y[i]), imag(y[i]) } - SHUFPD $0x1, X10, X10 - SHUFPD $0x1, X11, X11 - SHUFPD $0x1, X12, X12 - SHUFPD $0x1, X13, X13 - - // X_i = { real(a) * imag(x[i]), imag(a) * imag(x[i]) } - MULPD X10, X2 - MULPD X11, X4 - MULPD X12, X6 - MULPD X13, X8 - - // X_(i+1) = { - // imag(result[i]): imag(a)*real(x[i]) + real(a)*imag(x[i]), - // real(result[i]): real(a)*real(x[i]) - imag(a)*imag(x[i]) - // } - ADDSUBPD_X2_X3 - ADDSUBPD_X4_X5 - ADDSUBPD_X6_X7 - ADDSUBPD_X8_X9 - - // psum += result[i] - ADDPD X3, SUM - ADDPD X5, P_SUM - ADDPD X7, SUM - ADDPD X9, P_SUM - - LEAQ (X_PTR)(INC_X*4), X_PTR // X_PTR = &(X_PTR[incX*4]) - LEAQ (Y_PTR)(INC_Y*4), Y_PTR // Y_PTR = &(Y_PTR[incY*4]) - - DECQ LEN - JNZ dot_loop // } while --LEN > 0 - ADDPD P_SUM, SUM // sum += psum - CMPQ TAIL, $0 // if TAIL == 0 { return } - JE dot_end - -dot_tail: // do { - MOVDDUP_XPTR__X3 // X_(i+1) = { real(x[i], real(x[i]) } - MOVDDUP_8_XPTR__X2 // X_i = { imag(x[i]), imag(x[i]) } - MULPD NEG1, X2 // X_i = { -imag(x[i]) , -imag(x[i]) } - MOVUPS (Y_PTR), X10 // X_j = { imag(y[i]) , real(y[i]) } - MULPD X10, X3 // X_(i+1) = { imag(a) * real(x[i]), real(a) * real(x[i]) } - SHUFPD $0x1, X10, X10 // X_j = { real(y[i]) , imag(y[i]) } - MULPD X10, X2 // X_i = { real(a) * imag(x[i]), imag(a) * imag(x[i]) } - - // X_(i+1) = { - // imag(result[i]): imag(a)*real(x[i]) + real(a)*imag(x[i]), - // real(result[i]): real(a)*real(x[i]) - imag(a)*imag(x[i]) - // } - ADDSUBPD_X2_X3 - ADDPD X3, SUM // sum += result[i] - ADDQ INC_X, X_PTR // X_PTR += incX - ADDQ INC_Y, Y_PTR // Y_PTR += incY - DECQ TAIL - JNZ dot_tail // } while --TAIL > 0 - -dot_end: - MOVUPS SUM, sum+88(FP) - RET diff --git a/vendor/gonum.org/v1/gonum/internal/asm/c128/dotcunitary_amd64.s b/vendor/gonum.org/v1/gonum/internal/asm/c128/dotcunitary_amd64.s deleted file mode 100644 index 1db7e156d7..0000000000 --- a/vendor/gonum.org/v1/gonum/internal/asm/c128/dotcunitary_amd64.s +++ /dev/null @@ -1,143 +0,0 @@ -// Copyright ©2016 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//+build !noasm,!appengine,!safe - -#include "textflag.h" - -#define MOVDDUP_XPTR_IDX_8__X3 LONG $0x1C120FF2; BYTE $0xC6 // MOVDDUP (SI)(AX*8), X3 -#define MOVDDUP_16_XPTR_IDX_8__X5 LONG $0x6C120FF2; WORD $0x10C6 // MOVDDUP 16(SI)(AX*8), X5 -#define MOVDDUP_32_XPTR_IDX_8__X7 LONG $0x7C120FF2; WORD $0x20C6 // MOVDDUP 32(SI)(AX*8), X7 -#define MOVDDUP_48_XPTR_IDX_8__X9 LONG $0x120F44F2; WORD $0xC64C; BYTE $0x30 // MOVDDUP 48(SI)(AX*8), X9 - -#define MOVDDUP_XPTR_IIDX_8__X2 LONG $0x14120FF2; BYTE $0xD6 // MOVDDUP (SI)(DX*8), X2 -#define MOVDDUP_16_XPTR_IIDX_8__X4 LONG $0x64120FF2; WORD $0x10D6 // MOVDDUP 16(SI)(DX*8), X4 -#define MOVDDUP_32_XPTR_IIDX_8__X6 LONG $0x74120FF2; WORD $0x20D6 // MOVDDUP 32(SI)(DX*8), X6 -#define MOVDDUP_48_XPTR_IIDX_8__X8 LONG $0x120F44F2; WORD $0xD644; BYTE $0x30 // MOVDDUP 48(SI)(DX*8), X8 - -#define ADDSUBPD_X2_X3 LONG $0xDAD00F66 // ADDSUBPD X2, X3 -#define ADDSUBPD_X4_X5 LONG $0xECD00F66 // ADDSUBPD X4, X5 -#define ADDSUBPD_X6_X7 LONG $0xFED00F66 // ADDSUBPD X6, X7 -#define ADDSUBPD_X8_X9 LONG $0xD00F4566; BYTE $0xC8 // ADDSUBPD X8, X9 - -#define X_PTR SI -#define Y_PTR DI -#define LEN CX -#define TAIL BX -#define SUM X0 -#define P_SUM X1 -#define IDX AX -#define I_IDX DX -#define NEG1 X15 -#define P_NEG1 X14 - -// func DotcUnitary(x, y []complex128) (sum complex128) -TEXT ·DotcUnitary(SB), NOSPLIT, $0 - MOVQ x_base+0(FP), X_PTR // X_PTR = &x - MOVQ y_base+24(FP), Y_PTR // Y_PTR = &y - MOVQ x_len+8(FP), LEN // LEN = min( len(x), len(y) ) - CMPQ y_len+32(FP), LEN - CMOVQLE y_len+32(FP), LEN - PXOR SUM, SUM // sum = 0 - CMPQ LEN, $0 // if LEN == 0 { return } - JE dot_end - XORPS P_SUM, P_SUM // psum = 0 - MOVSD $(-1.0), NEG1 - SHUFPD $0, NEG1, NEG1 // { -1, -1 } - XORQ IDX, IDX // i := 0 - MOVQ $1, I_IDX // j := 1 - MOVQ LEN, TAIL - ANDQ $3, TAIL // TAIL = floor( TAIL / 4 ) - SHRQ $2, LEN // LEN = TAIL % 4 - JZ dot_tail // if LEN == 0 { goto dot_tail } - - MOVAPS NEG1, P_NEG1 // Copy NEG1 to P_NEG1 for pipelining - -dot_loop: // do { - MOVDDUP_XPTR_IDX_8__X3 // X_(i+1) = { real(x[i], real(x[i]) } - MOVDDUP_16_XPTR_IDX_8__X5 - MOVDDUP_32_XPTR_IDX_8__X7 - MOVDDUP_48_XPTR_IDX_8__X9 - - MOVDDUP_XPTR_IIDX_8__X2 // X_i = { imag(x[i]), imag(x[i]) } - MOVDDUP_16_XPTR_IIDX_8__X4 - MOVDDUP_32_XPTR_IIDX_8__X6 - MOVDDUP_48_XPTR_IIDX_8__X8 - - // X_i = { -imag(x[i]), -imag(x[i]) } - MULPD NEG1, X2 - MULPD P_NEG1, X4 - MULPD NEG1, X6 - MULPD P_NEG1, X8 - - // X_j = { imag(y[i]), real(y[i]) } - MOVUPS (Y_PTR)(IDX*8), X10 - MOVUPS 16(Y_PTR)(IDX*8), X11 - MOVUPS 32(Y_PTR)(IDX*8), X12 - MOVUPS 48(Y_PTR)(IDX*8), X13 - - // X_(i+1) = { imag(a) * real(x[i]), real(a) * real(x[i]) } - MULPD X10, X3 - MULPD X11, X5 - MULPD X12, X7 - MULPD X13, X9 - - // X_j = { real(y[i]), imag(y[i]) } - SHUFPD $0x1, X10, X10 - SHUFPD $0x1, X11, X11 - SHUFPD $0x1, X12, X12 - SHUFPD $0x1, X13, X13 - - // X_i = { real(a) * imag(x[i]), imag(a) * imag(x[i]) } - MULPD X10, X2 - MULPD X11, X4 - MULPD X12, X6 - MULPD X13, X8 - - // X_(i+1) = { - // imag(result[i]): imag(a)*real(x[i]) + real(a)*imag(x[i]), - // real(result[i]): real(a)*real(x[i]) - imag(a)*imag(x[i]) - // } - ADDSUBPD_X2_X3 - ADDSUBPD_X4_X5 - ADDSUBPD_X6_X7 - ADDSUBPD_X8_X9 - - // psum += result[i] - ADDPD X3, SUM - ADDPD X5, P_SUM - ADDPD X7, SUM - ADDPD X9, P_SUM - - ADDQ $8, IDX // IDX += 8 - ADDQ $8, I_IDX // I_IDX += 8 - DECQ LEN - JNZ dot_loop // } while --LEN > 0 - ADDPD P_SUM, SUM // sum += psum - CMPQ TAIL, $0 // if TAIL == 0 { return } - JE dot_end - -dot_tail: // do { - MOVDDUP_XPTR_IDX_8__X3 // X_(i+1) = { real(x[i]) , real(x[i]) } - MOVDDUP_XPTR_IIDX_8__X2 // X_i = { imag(x[i]) , imag(x[i]) } - MULPD NEG1, X2 // X_i = { -imag(x[i]) , -imag(x[i]) } - MOVUPS (Y_PTR)(IDX*8), X10 // X_j = { imag(y[i]) , real(y[i]) } - MULPD X10, X3 // X_(i+1) = { imag(a) * real(x[i]), real(a) * real(x[i]) } - SHUFPD $0x1, X10, X10 // X_j = { real(y[i]) , imag(y[i]) } - MULPD X10, X2 // X_i = { real(a) * imag(x[i]), imag(a) * imag(x[i]) } - - // X_(i+1) = { - // imag(result[i]): imag(a)*real(x[i]) + real(a)*imag(x[i]), - // real(result[i]): real(a)*real(x[i]) - imag(a)*imag(x[i]) - // } - ADDSUBPD_X2_X3 - ADDPD X3, SUM // SUM += result[i] - ADDQ $2, IDX // IDX += 2 - ADDQ $2, I_IDX // I_IDX += 2 - DECQ TAIL - JNZ dot_tail // } while --TAIL > 0 - -dot_end: - MOVUPS SUM, sum+48(FP) - RET diff --git a/vendor/gonum.org/v1/gonum/internal/asm/c128/dotuinc_amd64.s b/vendor/gonum.org/v1/gonum/internal/asm/c128/dotuinc_amd64.s deleted file mode 100644 index 386467fcbd..0000000000 --- a/vendor/gonum.org/v1/gonum/internal/asm/c128/dotuinc_amd64.s +++ /dev/null @@ -1,141 +0,0 @@ -// Copyright ©2016 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//+build !noasm,!appengine,!safe - -#include "textflag.h" - -#define MOVDDUP_XPTR__X3 LONG $0x1E120FF2 // MOVDDUP (SI), X3 -#define MOVDDUP_XPTR_INCX__X5 LONG $0x120F42F2; WORD $0x062C // MOVDDUP (SI)(R8*1), X5 -#define MOVDDUP_XPTR_INCX_2__X7 LONG $0x120F42F2; WORD $0x463C // MOVDDUP (SI)(R8*2), X7 -#define MOVDDUP_XPTR_INCx3X__X9 LONG $0x120F46F2; WORD $0x0E0C // MOVDDUP (SI)(R9*1), X9 - -#define MOVDDUP_8_XPTR__X2 LONG $0x56120FF2; BYTE $0x08 // MOVDDUP 8(SI), X2 -#define MOVDDUP_8_XPTR_INCX__X4 LONG $0x120F42F2; WORD $0x0664; BYTE $0x08 // MOVDDUP 8(SI)(R8*1), X4 -#define MOVDDUP_8_XPTR_INCX_2__X6 LONG $0x120F42F2; WORD $0x4674; BYTE $0x08 // MOVDDUP 8(SI)(R8*2), X6 -#define MOVDDUP_8_XPTR_INCx3X__X8 LONG $0x120F46F2; WORD $0x0E44; BYTE $0x08 // MOVDDUP 8(SI)(R9*1), X8 - -#define ADDSUBPD_X2_X3 LONG $0xDAD00F66 // ADDSUBPD X2, X3 -#define ADDSUBPD_X4_X5 LONG $0xECD00F66 // ADDSUBPD X4, X5 -#define ADDSUBPD_X6_X7 LONG $0xFED00F66 // ADDSUBPD X6, X7 -#define ADDSUBPD_X8_X9 LONG $0xD00F4566; BYTE $0xC8 // ADDSUBPD X8, X9 - -#define X_PTR SI -#define Y_PTR DI -#define LEN CX -#define TAIL BX -#define SUM X0 -#define P_SUM X1 -#define INC_X R8 -#define INCx3_X R9 -#define INC_Y R10 -#define INCx3_Y R11 - -// func DotuInc(x, y []complex128, n, incX, incY, ix, iy uintptr) (sum complex128) -TEXT ·DotuInc(SB), NOSPLIT, $0 - MOVQ x_base+0(FP), X_PTR // X_PTR = &x - MOVQ y_base+24(FP), Y_PTR // Y_PTR = &y - MOVQ n+48(FP), LEN // LEN = n - PXOR SUM, SUM // sum = 0 - CMPQ LEN, $0 // if LEN == 0 { return } - JE dot_end - MOVQ ix+72(FP), INC_X // INC_X = ix * sizeof(complex128) - SHLQ $4, INC_X - MOVQ iy+80(FP), INC_Y // INC_Y = iy * sizeof(complex128) - SHLQ $4, INC_Y - LEAQ (X_PTR)(INC_X*1), X_PTR // X_PTR = &(X_PTR[ix]) - LEAQ (Y_PTR)(INC_Y*1), Y_PTR // Y_PTR = &(Y_PTR[iy]) - MOVQ incX+56(FP), INC_X // INC_X = incX - SHLQ $4, INC_X // INC_X *= sizeof(complex128) - MOVQ incY+64(FP), INC_Y // INC_Y = incY - SHLQ $4, INC_Y // INC_Y *= sizeof(complex128) - MOVQ LEN, TAIL - ANDQ $3, TAIL // LEN = LEN % 4 - SHRQ $2, LEN // LEN = floor( LEN / 4 ) - JZ dot_tail // if LEN <= 4 { goto dot_tail } - PXOR P_SUM, P_SUM // psum = 0 - LEAQ (INC_X)(INC_X*2), INCx3_X // INCx3_X = 3 * incX * sizeof(complex128) - LEAQ (INC_Y)(INC_Y*2), INCx3_Y // INCx3_Y = 3 * incY * sizeof(complex128) - -dot_loop: // do { - MOVDDUP_XPTR__X3 // X_(i+1) = { real(x[i], real(x[i]) } - MOVDDUP_XPTR_INCX__X5 - MOVDDUP_XPTR_INCX_2__X7 - MOVDDUP_XPTR_INCx3X__X9 - - MOVDDUP_8_XPTR__X2 // X_i = { imag(x[i]), imag(x[i]) } - MOVDDUP_8_XPTR_INCX__X4 - MOVDDUP_8_XPTR_INCX_2__X6 - MOVDDUP_8_XPTR_INCx3X__X8 - - // X_j = { imag(y[i]), real(y[i]) } - MOVUPS (Y_PTR), X10 - MOVUPS (Y_PTR)(INC_Y*1), X11 - MOVUPS (Y_PTR)(INC_Y*2), X12 - MOVUPS (Y_PTR)(INCx3_Y*1), X13 - - // X_(i+1) = { imag(a) * real(x[i]), real(a) * real(x[i]) } - MULPD X10, X3 - MULPD X11, X5 - MULPD X12, X7 - MULPD X13, X9 - - // X_j = { real(y[i]), imag(y[i]) } - SHUFPD $0x1, X10, X10 - SHUFPD $0x1, X11, X11 - SHUFPD $0x1, X12, X12 - SHUFPD $0x1, X13, X13 - - // X_i = { real(a) * imag(x[i]), imag(a) * imag(x[i]) } - MULPD X10, X2 - MULPD X11, X4 - MULPD X12, X6 - MULPD X13, X8 - - // X_(i+1) = { - // imag(result[i]): imag(a)*real(x[i]) + real(a)*imag(x[i]), - // real(result[i]): real(a)*real(x[i]) - imag(a)*imag(x[i]) - // } - ADDSUBPD_X2_X3 - ADDSUBPD_X4_X5 - ADDSUBPD_X6_X7 - ADDSUBPD_X8_X9 - - // psum += result[i] - ADDPD X3, SUM - ADDPD X5, P_SUM - ADDPD X7, SUM - ADDPD X9, P_SUM - - LEAQ (X_PTR)(INC_X*4), X_PTR // X_PTR = &(X_PTR[incX*4]) - LEAQ (Y_PTR)(INC_Y*4), Y_PTR // Y_PTR = &(Y_PTR[incY*4]) - - DECQ LEN - JNZ dot_loop // } while --BX > 0 - ADDPD P_SUM, SUM // sum += psum - CMPQ TAIL, $0 // if TAIL == 0 { return } - JE dot_end - -dot_tail: // do { - MOVDDUP_XPTR__X3 // X_(i+1) = { real(x[i], real(x[i]) } - MOVDDUP_8_XPTR__X2 // X_i = { imag(x[i]), imag(x[i]) } - MOVUPS (Y_PTR), X10 // X_j = { imag(y[i]) , real(y[i]) } - MULPD X10, X3 // X_(i+1) = { imag(a) * real(x[i]), real(a) * real(x[i]) } - SHUFPD $0x1, X10, X10 // X_j = { real(y[i]) , imag(y[i]) } - MULPD X10, X2 // X_i = { real(a) * imag(x[i]), imag(a) * imag(x[i]) } - - // X_(i+1) = { - // imag(result[i]): imag(a)*real(x[i]) + real(a)*imag(x[i]), - // real(result[i]): real(a)*real(x[i]) - imag(a)*imag(x[i]) - // } - ADDSUBPD_X2_X3 - ADDPD X3, SUM // sum += result[i] - ADDQ INC_X, X_PTR // X_PTR += incX - ADDQ INC_Y, Y_PTR // Y_PTR += incY - DECQ TAIL // --TAIL - JNZ dot_tail // } while TAIL > 0 - -dot_end: - MOVUPS SUM, sum+88(FP) - RET diff --git a/vendor/gonum.org/v1/gonum/internal/asm/c128/dotuunitary_amd64.s b/vendor/gonum.org/v1/gonum/internal/asm/c128/dotuunitary_amd64.s deleted file mode 100644 index d0d507cdcd..0000000000 --- a/vendor/gonum.org/v1/gonum/internal/asm/c128/dotuunitary_amd64.s +++ /dev/null @@ -1,130 +0,0 @@ -// Copyright ©2016 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//+build !noasm,!appengine,!safe - -#include "textflag.h" - -#define MOVDDUP_XPTR_IDX_8__X3 LONG $0x1C120FF2; BYTE $0xC6 // MOVDDUP (SI)(AX*8), X3 -#define MOVDDUP_16_XPTR_IDX_8__X5 LONG $0x6C120FF2; WORD $0x10C6 // MOVDDUP 16(SI)(AX*8), X5 -#define MOVDDUP_32_XPTR_IDX_8__X7 LONG $0x7C120FF2; WORD $0x20C6 // MOVDDUP 32(SI)(AX*8), X7 -#define MOVDDUP_48_XPTR_IDX_8__X9 LONG $0x120F44F2; WORD $0xC64C; BYTE $0x30 // MOVDDUP 48(SI)(AX*8), X9 - -#define MOVDDUP_XPTR_IIDX_8__X2 LONG $0x14120FF2; BYTE $0xD6 // MOVDDUP (SI)(DX*8), X2 -#define MOVDDUP_16_XPTR_IIDX_8__X4 LONG $0x64120FF2; WORD $0x10D6 // MOVDDUP 16(SI)(DX*8), X4 -#define MOVDDUP_32_XPTR_IIDX_8__X6 LONG $0x74120FF2; WORD $0x20D6 // MOVDDUP 32(SI)(DX*8), X6 -#define MOVDDUP_48_XPTR_IIDX_8__X8 LONG $0x120F44F2; WORD $0xD644; BYTE $0x30 // MOVDDUP 48(SI)(DX*8), X8 - -#define ADDSUBPD_X2_X3 LONG $0xDAD00F66 // ADDSUBPD X2, X3 -#define ADDSUBPD_X4_X5 LONG $0xECD00F66 // ADDSUBPD X4, X5 -#define ADDSUBPD_X6_X7 LONG $0xFED00F66 // ADDSUBPD X6, X7 -#define ADDSUBPD_X8_X9 LONG $0xD00F4566; BYTE $0xC8 // ADDSUBPD X8, X9 - -#define X_PTR SI -#define Y_PTR DI -#define LEN CX -#define TAIL BX -#define SUM X0 -#define P_SUM X1 -#define IDX AX -#define I_IDX DX - -// func DotuUnitary(x, y []complex128) (sum complex128) -TEXT ·DotuUnitary(SB), NOSPLIT, $0 - MOVQ x_base+0(FP), X_PTR // X_PTR = &x - MOVQ y_base+24(FP), Y_PTR // Y_PTR = &y - MOVQ x_len+8(FP), LEN // LEN = min( len(x), len(y) ) - CMPQ y_len+32(FP), LEN - CMOVQLE y_len+32(FP), LEN - PXOR SUM, SUM // SUM = 0 - CMPQ LEN, $0 // if LEN == 0 { return } - JE dot_end - PXOR P_SUM, P_SUM // P_SUM = 0 - XORQ IDX, IDX // IDX = 0 - MOVQ $1, DX // j = 1 - MOVQ LEN, TAIL - ANDQ $3, TAIL // TAIL = floor( LEN / 4 ) - SHRQ $2, LEN // LEN = LEN % 4 - JZ dot_tail // if LEN == 0 { goto dot_tail } - -dot_loop: // do { - MOVDDUP_XPTR_IDX_8__X3 // X_(i+1) = { real(x[i], real(x[i]) } - MOVDDUP_16_XPTR_IDX_8__X5 - MOVDDUP_32_XPTR_IDX_8__X7 - MOVDDUP_48_XPTR_IDX_8__X9 - - MOVDDUP_XPTR_IIDX_8__X2 // X_i = { imag(x[i]), imag(x[i]) } - MOVDDUP_16_XPTR_IIDX_8__X4 - MOVDDUP_32_XPTR_IIDX_8__X6 - MOVDDUP_48_XPTR_IIDX_8__X8 - - // X_j = { imag(y[i]), real(y[i]) } - MOVUPS (Y_PTR)(IDX*8), X10 - MOVUPS 16(Y_PTR)(IDX*8), X11 - MOVUPS 32(Y_PTR)(IDX*8), X12 - MOVUPS 48(Y_PTR)(IDX*8), X13 - - // X_(i+1) = { imag(a) * real(x[i]), real(a) * real(x[i]) } - MULPD X10, X3 - MULPD X11, X5 - MULPD X12, X7 - MULPD X13, X9 - - // X_j = { real(y[i]), imag(y[i]) } - SHUFPD $0x1, X10, X10 - SHUFPD $0x1, X11, X11 - SHUFPD $0x1, X12, X12 - SHUFPD $0x1, X13, X13 - - // X_i = { real(a) * imag(x[i]), imag(a) * imag(x[i]) } - MULPD X10, X2 - MULPD X11, X4 - MULPD X12, X6 - MULPD X13, X8 - - // X_(i+1) = { - // imag(result[i]): imag(a)*real(x[i]) + real(a)*imag(x[i]), - // real(result[i]): real(a)*real(x[i]) - imag(a)*imag(x[i]) - // } - ADDSUBPD_X2_X3 - ADDSUBPD_X4_X5 - ADDSUBPD_X6_X7 - ADDSUBPD_X8_X9 - - // psum += result[i] - ADDPD X3, SUM - ADDPD X5, P_SUM - ADDPD X7, SUM - ADDPD X9, P_SUM - - ADDQ $8, IDX // IDX += 8 - ADDQ $8, I_IDX // I_IDX += 8 - DECQ LEN - JNZ dot_loop // } while --LEN > 0 - ADDPD P_SUM, SUM // SUM += P_SUM - CMPQ TAIL, $0 // if TAIL == 0 { return } - JE dot_end - -dot_tail: // do { - MOVDDUP_XPTR_IDX_8__X3 // X_(i+1) = { real(x[i] , real(x[i]) } - MOVDDUP_XPTR_IIDX_8__X2 // X_i = { imag(x[i]) , imag(x[i]) } - MOVUPS (Y_PTR)(IDX*8), X10 // X_j = { imag(y[i]) , real(y[i]) } - MULPD X10, X3 // X_(i+1) = { imag(a) * real(x[i]), real(a) * real(x[i]) } - SHUFPD $0x1, X10, X10 // X_j = { real(y[i]) , imag(y[i]) } - MULPD X10, X2 // X_i = { real(a) * imag(x[i]), imag(a) * imag(x[i]) } - - // X_(i+1) = { - // imag(result[i]): imag(a)*real(x[i]) + real(a)*imag(x[i]), - // real(result[i]): real(a)*real(x[i]) - imag(a)*imag(x[i]) - // } - ADDSUBPD_X2_X3 - ADDPD X3, SUM // psum += result[i] - ADDQ $2, IDX // IDX += 2 - ADDQ $2, I_IDX // I_IDX += 2 - DECQ TAIL // --TAIL - JNZ dot_tail // } while TAIL > 0 - -dot_end: - MOVUPS SUM, sum+48(FP) - RET diff --git a/vendor/gonum.org/v1/gonum/internal/asm/c128/dscalinc_amd64.s b/vendor/gonum.org/v1/gonum/internal/asm/c128/dscalinc_amd64.s deleted file mode 100644 index 40d5851a62..0000000000 --- a/vendor/gonum.org/v1/gonum/internal/asm/c128/dscalinc_amd64.s +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright ©2017 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//+build !noasm,!appengine,!safe - -#include "textflag.h" - -#define SRC SI -#define DST SI -#define LEN CX -#define TAIL BX -#define INC R9 -#define INC3 R10 -#define ALPHA X0 -#define ALPHA_2 X1 - -#define MOVDDUP_ALPHA LONG $0x44120FF2; WORD $0x0824 // MOVDDUP 8(SP), X0 - -// func DscalInc(alpha float64, x []complex128, n, inc uintptr) -TEXT ·DscalInc(SB), NOSPLIT, $0 - MOVQ x_base+8(FP), SRC // SRC = &x - MOVQ n+32(FP), LEN // LEN = n - CMPQ LEN, $0 // if LEN == 0 { return } - JE dscal_end - - MOVDDUP_ALPHA // ALPHA = alpha - MOVQ inc+40(FP), INC // INC = inc - SHLQ $4, INC // INC = INC * sizeof(complex128) - LEAQ (INC)(INC*2), INC3 // INC3 = 3 * INC - MOVUPS ALPHA, ALPHA_2 // Copy ALPHA and ALPHA_2 for pipelining - MOVQ LEN, TAIL // TAIL = LEN - SHRQ $2, LEN // LEN = floor( n / 4 ) - JZ dscal_tail // if LEN == 0 { goto dscal_tail } - -dscal_loop: // do { - MOVUPS (SRC), X2 // X_i = x[i] - MOVUPS (SRC)(INC*1), X3 - MOVUPS (SRC)(INC*2), X4 - MOVUPS (SRC)(INC3*1), X5 - - MULPD ALPHA, X2 // X_i *= ALPHA - MULPD ALPHA_2, X3 - MULPD ALPHA, X4 - MULPD ALPHA_2, X5 - - MOVUPS X2, (DST) // x[i] = X_i - MOVUPS X3, (DST)(INC*1) - MOVUPS X4, (DST)(INC*2) - MOVUPS X5, (DST)(INC3*1) - - LEAQ (SRC)(INC*4), SRC // SRC += INC*4 - DECQ LEN - JNZ dscal_loop // } while --LEN > 0 - -dscal_tail: - ANDQ $3, TAIL // TAIL = TAIL % 4 - JE dscal_end // if TAIL == 0 { return } - -dscal_tail_loop: // do { - MOVUPS (SRC), X2 // X_i = x[i] - MULPD ALPHA, X2 // X_i *= ALPHA - MOVUPS X2, (DST) // x[i] = X_i - ADDQ INC, SRC // SRC += INC - DECQ TAIL - JNZ dscal_tail_loop // } while --TAIL > 0 - -dscal_end: - RET diff --git a/vendor/gonum.org/v1/gonum/internal/asm/c128/dscalunitary_amd64.s b/vendor/gonum.org/v1/gonum/internal/asm/c128/dscalunitary_amd64.s deleted file mode 100644 index cbc0768aa0..0000000000 --- a/vendor/gonum.org/v1/gonum/internal/asm/c128/dscalunitary_amd64.s +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright ©2017 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//+build !noasm,!appengine,!safe - -#include "textflag.h" - -#define SRC SI -#define DST SI -#define LEN CX -#define IDX AX -#define TAIL BX -#define ALPHA X0 -#define ALPHA_2 X1 - -#define MOVDDUP_ALPHA LONG $0x44120FF2; WORD $0x0824 // MOVDDUP 8(SP), X0 - -// func DscalUnitary(alpha float64, x []complex128) -TEXT ·DscalUnitary(SB), NOSPLIT, $0 - MOVQ x_base+8(FP), SRC // SRC = &x - MOVQ x_len+16(FP), LEN // LEN = len(x) - CMPQ LEN, $0 // if LEN == 0 { return } - JE dscal_end - - MOVDDUP_ALPHA // ALPHA = alpha - XORQ IDX, IDX // IDX = 0 - MOVUPS ALPHA, ALPHA_2 // Copy ALPHA to ALPHA_2 for pipelining - MOVQ LEN, TAIL // TAIL = LEN - SHRQ $2, LEN // LEN = floor( n / 4 ) - JZ dscal_tail // if LEN == 0 { goto dscal_tail } - -dscal_loop: // do { - MOVUPS (SRC)(IDX*8), X2 // X_i = x[i] - MOVUPS 16(SRC)(IDX*8), X3 - MOVUPS 32(SRC)(IDX*8), X4 - MOVUPS 48(SRC)(IDX*8), X5 - - MULPD ALPHA, X2 // X_i *= ALPHA - MULPD ALPHA_2, X3 - MULPD ALPHA, X4 - MULPD ALPHA_2, X5 - - MOVUPS X2, (DST)(IDX*8) // x[i] = X_i - MOVUPS X3, 16(DST)(IDX*8) - MOVUPS X4, 32(DST)(IDX*8) - MOVUPS X5, 48(DST)(IDX*8) - - ADDQ $8, IDX // IDX += 8 - DECQ LEN - JNZ dscal_loop // } while --LEN > 0 - -dscal_tail: - ANDQ $3, TAIL // TAIL = TAIL % 4 - JZ dscal_end // if TAIL == 0 { return } - -dscal_tail_loop: // do { - MOVUPS (SRC)(IDX*8), X2 // X_i = x[i] - MULPD ALPHA, X2 // X_i *= ALPHA - MOVUPS X2, (DST)(IDX*8) // x[i] = X_i - ADDQ $2, IDX // IDX += 2 - DECQ TAIL - JNZ dscal_tail_loop // } while --TAIL > 0 - -dscal_end: - RET diff --git a/vendor/gonum.org/v1/gonum/internal/asm/c128/scal.go b/vendor/gonum.org/v1/gonum/internal/asm/c128/scal.go deleted file mode 100644 index 47a80e50c6..0000000000 --- a/vendor/gonum.org/v1/gonum/internal/asm/c128/scal.go +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright ©2016 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package c128 - -// ScalUnitaryTo is -// for i, v := range x { -// dst[i] = alpha * v -// } -func ScalUnitaryTo(dst []complex128, alpha complex128, x []complex128) { - for i, v := range x { - dst[i] = alpha * v - } -} - -// ScalIncTo is -// var idst, ix uintptr -// for i := 0; i < int(n); i++ { -// dst[idst] = alpha * x[ix] -// ix += incX -// idst += incDst -// } -func ScalIncTo(dst []complex128, incDst uintptr, alpha complex128, x []complex128, n, incX uintptr) { - var idst, ix uintptr - for i := 0; i < int(n); i++ { - dst[idst] = alpha * x[ix] - ix += incX - idst += incDst - } -} diff --git a/vendor/gonum.org/v1/gonum/internal/asm/c128/scalUnitary_amd64.s b/vendor/gonum.org/v1/gonum/internal/asm/c128/scalUnitary_amd64.s deleted file mode 100644 index 7b807b3a45..0000000000 --- a/vendor/gonum.org/v1/gonum/internal/asm/c128/scalUnitary_amd64.s +++ /dev/null @@ -1,116 +0,0 @@ -// Copyright ©2017 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//+build !noasm,!appengine,!safe - -#include "textflag.h" - -#define SRC SI -#define DST SI -#define LEN CX -#define IDX AX -#define TAIL BX -#define ALPHA X0 -#define ALPHA_C X1 -#define ALPHA2 X10 -#define ALPHA_C2 X11 - -#define MOVDDUP_X2_X3 LONG $0xDA120FF2 // MOVDDUP X2, X3 -#define MOVDDUP_X4_X5 LONG $0xEC120FF2 // MOVDDUP X4, X5 -#define MOVDDUP_X6_X7 LONG $0xFE120FF2 // MOVDDUP X6, X7 -#define MOVDDUP_X8_X9 LONG $0x120F45F2; BYTE $0xC8 // MOVDDUP X8, X9 - -#define ADDSUBPD_X2_X3 LONG $0xDAD00F66 // ADDSUBPD X2, X3 -#define ADDSUBPD_X4_X5 LONG $0xECD00F66 // ADDSUBPD X4, X5 -#define ADDSUBPD_X6_X7 LONG $0xFED00F66 // ADDSUBPD X6, X7 -#define ADDSUBPD_X8_X9 LONG $0xD00F4566; BYTE $0xC8 // ADDSUBPD X8, X9 - -// func ScalUnitary(alpha complex128, x []complex128) -TEXT ·ScalUnitary(SB), NOSPLIT, $0 - MOVQ x_base+16(FP), SRC // SRC = &x - MOVQ x_len+24(FP), LEN // LEN = len(x) - CMPQ LEN, $0 // if LEN == 0 { return } - JE scal_end - - MOVUPS alpha+0(FP), ALPHA // ALPHA = { imag(alpha), real(alpha) } - MOVAPS ALPHA, ALPHA_C - SHUFPD $0x1, ALPHA_C, ALPHA_C // ALPHA_C = { real(alpha), imag(alpha) } - - XORQ IDX, IDX // IDX = 0 - MOVAPS ALPHA, ALPHA2 // Copy ALPHA and ALPHA_C for pipelining - MOVAPS ALPHA_C, ALPHA_C2 - MOVQ LEN, TAIL - SHRQ $2, LEN // LEN = floor( n / 4 ) - JZ scal_tail // if BX == 0 { goto scal_tail } - -scal_loop: // do { - MOVUPS (SRC)(IDX*8), X2 // X_i = { imag(x[i]), real(x[i]) } - MOVUPS 16(SRC)(IDX*8), X4 - MOVUPS 32(SRC)(IDX*8), X6 - MOVUPS 48(SRC)(IDX*8), X8 - - // X_(i+1) = { real(x[i], real(x[i]) } - MOVDDUP_X2_X3 - MOVDDUP_X4_X5 - MOVDDUP_X6_X7 - MOVDDUP_X8_X9 - - // X_i = { imag(x[i]), imag(x[i]) } - SHUFPD $0x3, X2, X2 - SHUFPD $0x3, X4, X4 - SHUFPD $0x3, X6, X6 - SHUFPD $0x3, X8, X8 - - // X_i = { real(ALPHA) * imag(x[i]), imag(ALPHA) * imag(x[i]) } - // X_(i+1) = { imag(ALPHA) * real(x[i]), real(ALPHA) * real(x[i]) } - MULPD ALPHA_C, X2 - MULPD ALPHA, X3 - MULPD ALPHA_C2, X4 - MULPD ALPHA2, X5 - MULPD ALPHA_C, X6 - MULPD ALPHA, X7 - MULPD ALPHA_C2, X8 - MULPD ALPHA2, X9 - - // X_(i+1) = { - // imag(result[i]): imag(ALPHA)*real(x[i]) + real(ALPHA)*imag(x[i]), - // real(result[i]): real(ALPHA)*real(x[i]) - imag(ALPHA)*imag(x[i]) - // } - ADDSUBPD_X2_X3 - ADDSUBPD_X4_X5 - ADDSUBPD_X6_X7 - ADDSUBPD_X8_X9 - - MOVUPS X3, (DST)(IDX*8) // x[i] = X_(i+1) - MOVUPS X5, 16(DST)(IDX*8) - MOVUPS X7, 32(DST)(IDX*8) - MOVUPS X9, 48(DST)(IDX*8) - ADDQ $8, IDX // IDX += 8 - DECQ LEN - JNZ scal_loop // } while --LEN > 0 - -scal_tail: - ANDQ $3, TAIL // TAIL = TAIL % 4 - JZ scal_end // if TAIL == 0 { return } - -scal_tail_loop: // do { - MOVUPS (SRC)(IDX*8), X2 // X_i = { imag(x[i]), real(x[i]) } - MOVDDUP_X2_X3 // X_(i+1) = { real(x[i], real(x[i]) } - SHUFPD $0x3, X2, X2 // X_i = { imag(x[i]), imag(x[i]) } - MULPD ALPHA_C, X2 // X_i = { real(ALPHA) * imag(x[i]), imag(ALPHA) * imag(x[i]) } - MULPD ALPHA, X3 // X_(i+1) = { imag(ALPHA) * real(x[i]), real(ALPHA) * real(x[i]) } - - // X_(i+1) = { - // imag(result[i]): imag(ALPHA)*real(x[i]) + real(ALPHA)*imag(x[i]), - // real(result[i]): real(ALPHA)*real(x[i]) - imag(ALPHA)*imag(x[i]) - // } - ADDSUBPD_X2_X3 - - MOVUPS X3, (DST)(IDX*8) // x[i] = X_(i+1) - ADDQ $2, IDX // IDX += 2 - DECQ TAIL - JNZ scal_tail_loop // } while --LEN > 0 - -scal_end: - RET diff --git a/vendor/gonum.org/v1/gonum/internal/asm/c128/scalinc_amd64.s b/vendor/gonum.org/v1/gonum/internal/asm/c128/scalinc_amd64.s deleted file mode 100644 index 7857c1554f..0000000000 --- a/vendor/gonum.org/v1/gonum/internal/asm/c128/scalinc_amd64.s +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright ©2016 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//+build !noasm,!appengine,!safe - -#include "textflag.h" - -#define SRC SI -#define DST SI -#define LEN CX -#define TAIL BX -#define INC R9 -#define INC3 R10 -#define ALPHA X0 -#define ALPHA_C X1 -#define ALPHA2 X10 -#define ALPHA_C2 X11 - -#define MOVDDUP_X2_X3 LONG $0xDA120FF2 // MOVDDUP X2, X3 -#define MOVDDUP_X4_X5 LONG $0xEC120FF2 // MOVDDUP X4, X5 -#define MOVDDUP_X6_X7 LONG $0xFE120FF2 // MOVDDUP X6, X7 -#define MOVDDUP_X8_X9 LONG $0x120F45F2; BYTE $0xC8 // MOVDDUP X8, X9 - -#define ADDSUBPD_X2_X3 LONG $0xDAD00F66 // ADDSUBPD X2, X3 -#define ADDSUBPD_X4_X5 LONG $0xECD00F66 // ADDSUBPD X4, X5 -#define ADDSUBPD_X6_X7 LONG $0xFED00F66 // ADDSUBPD X6, X7 -#define ADDSUBPD_X8_X9 LONG $0xD00F4566; BYTE $0xC8 // ADDSUBPD X8, X9 - -// func ScalInc(alpha complex128, x []complex128, n, inc uintptr) -TEXT ·ScalInc(SB), NOSPLIT, $0 - MOVQ x_base+16(FP), SRC // SRC = &x - MOVQ n+40(FP), LEN // LEN = len(x) - CMPQ LEN, $0 - JE scal_end // if LEN == 0 { return } - - MOVQ inc+48(FP), INC // INC = inc - SHLQ $4, INC // INC = INC * sizeof(complex128) - LEAQ (INC)(INC*2), INC3 // INC3 = 3 * INC - - MOVUPS alpha+0(FP), ALPHA // ALPHA = { imag(alpha), real(alpha) } - MOVAPS ALPHA, ALPHA_C - SHUFPD $0x1, ALPHA_C, ALPHA_C // ALPHA_C = { real(alpha), imag(alpha) } - - MOVAPS ALPHA, ALPHA2 // Copy ALPHA and ALPHA_C for pipelining - MOVAPS ALPHA_C, ALPHA_C2 - MOVQ LEN, TAIL - SHRQ $2, LEN // LEN = floor( n / 4 ) - JZ scal_tail // if BX == 0 { goto scal_tail } - -scal_loop: // do { - MOVUPS (SRC), X2 // X_i = { imag(x[i]), real(x[i]) } - MOVUPS (SRC)(INC*1), X4 - MOVUPS (SRC)(INC*2), X6 - MOVUPS (SRC)(INC3*1), X8 - - // X_(i+1) = { real(x[i], real(x[i]) } - MOVDDUP_X2_X3 - MOVDDUP_X4_X5 - MOVDDUP_X6_X7 - MOVDDUP_X8_X9 - - // X_i = { imag(x[i]), imag(x[i]) } - SHUFPD $0x3, X2, X2 - SHUFPD $0x3, X4, X4 - SHUFPD $0x3, X6, X6 - SHUFPD $0x3, X8, X8 - - // X_i = { real(ALPHA) * imag(x[i]), imag(ALPHA) * imag(x[i]) } - // X_(i+1) = { imag(ALPHA) * real(x[i]), real(ALPHA) * real(x[i]) } - MULPD ALPHA_C, X2 - MULPD ALPHA, X3 - MULPD ALPHA_C2, X4 - MULPD ALPHA2, X5 - MULPD ALPHA_C, X6 - MULPD ALPHA, X7 - MULPD ALPHA_C2, X8 - MULPD ALPHA2, X9 - - // X_(i+1) = { - // imag(result[i]): imag(ALPHA)*real(x[i]) + real(ALPHA)*imag(x[i]), - // real(result[i]): real(ALPHA)*real(x[i]) - imag(ALPHA)*imag(x[i]) - // } - ADDSUBPD_X2_X3 - ADDSUBPD_X4_X5 - ADDSUBPD_X6_X7 - ADDSUBPD_X8_X9 - - MOVUPS X3, (DST) // x[i] = X_(i+1) - MOVUPS X5, (DST)(INC*1) - MOVUPS X7, (DST)(INC*2) - MOVUPS X9, (DST)(INC3*1) - - LEAQ (SRC)(INC*4), SRC // SRC = &(SRC[inc*4]) - DECQ LEN - JNZ scal_loop // } while --BX > 0 - -scal_tail: - ANDQ $3, TAIL // TAIL = TAIL % 4 - JE scal_end // if TAIL == 0 { return } - -scal_tail_loop: // do { - MOVUPS (SRC), X2 // X_i = { imag(x[i]), real(x[i]) } - MOVDDUP_X2_X3 // X_(i+1) = { real(x[i], real(x[i]) } - SHUFPD $0x3, X2, X2 // X_i = { imag(x[i]), imag(x[i]) } - MULPD ALPHA_C, X2 // X_i = { real(ALPHA) * imag(x[i]), imag(ALPHA) * imag(x[i]) } - MULPD ALPHA, X3 // X_(i+1) = { imag(ALPHA) * real(x[i]), real(ALPHA) * real(x[i]) } - - // X_(i+1) = { - // imag(result[i]): imag(ALPHA)*real(x[i]) + real(ALPHA)*imag(x[i]), - // real(result[i]): real(ALPHA)*real(x[i]) - imag(ALPHA)*imag(x[i]) - // } - ADDSUBPD_X2_X3 - - MOVUPS X3, (DST) // x[i] = X_i - ADDQ INC, SRC // SRC = &(SRC[incX]) - DECQ TAIL - JNZ scal_tail_loop // } while --TAIL > 0 - -scal_end: - RET diff --git a/vendor/gonum.org/v1/gonum/internal/asm/c128/stubs_amd64.go b/vendor/gonum.org/v1/gonum/internal/asm/c128/stubs_amd64.go deleted file mode 100644 index ad6b23ca4c..0000000000 --- a/vendor/gonum.org/v1/gonum/internal/asm/c128/stubs_amd64.go +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright ©2016 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build !noasm,!appengine,!safe - -package c128 - -// AxpyUnitary is -// for i, v := range x { -// y[i] += alpha * v -// } -func AxpyUnitary(alpha complex128, x, y []complex128) - -// AxpyUnitaryTo is -// for i, v := range x { -// dst[i] = alpha*v + y[i] -// } -func AxpyUnitaryTo(dst []complex128, alpha complex128, x, y []complex128) - -// AxpyInc is -// for i := 0; i < int(n); i++ { -// y[iy] += alpha * x[ix] -// ix += incX -// iy += incY -// } -func AxpyInc(alpha complex128, x, y []complex128, n, incX, incY, ix, iy uintptr) - -// AxpyIncTo is -// for i := 0; i < int(n); i++ { -// dst[idst] = alpha*x[ix] + y[iy] -// ix += incX -// iy += incY -// idst += incDst -// } -func AxpyIncTo(dst []complex128, incDst, idst uintptr, alpha complex128, x, y []complex128, n, incX, incY, ix, iy uintptr) - -// DscalUnitary is -// for i, v := range x { -// x[i] = complex(real(v)*alpha, imag(v)*alpha) -// } -func DscalUnitary(alpha float64, x []complex128) - -// DscalInc is -// var ix uintptr -// for i := 0; i < int(n); i++ { -// x[ix] = complex(real(x[ix])*alpha, imag(x[ix])*alpha) -// ix += inc -// } -func DscalInc(alpha float64, x []complex128, n, inc uintptr) - -// ScalInc is -// var ix uintptr -// for i := 0; i < int(n); i++ { -// x[ix] *= alpha -// ix += incX -// } -func ScalInc(alpha complex128, x []complex128, n, inc uintptr) - -// ScalUnitary is -// for i := range x { -// x[i] *= alpha -// } -func ScalUnitary(alpha complex128, x []complex128) - -// DotcUnitary is -// for i, v := range x { -// sum += y[i] * cmplx.Conj(v) -// } -// return sum -func DotcUnitary(x, y []complex128) (sum complex128) - -// DotcInc is -// for i := 0; i < int(n); i++ { -// sum += y[iy] * cmplx.Conj(x[ix]) -// ix += incX -// iy += incY -// } -// return sum -func DotcInc(x, y []complex128, n, incX, incY, ix, iy uintptr) (sum complex128) - -// DotuUnitary is -// for i, v := range x { -// sum += y[i] * v -// } -// return sum -func DotuUnitary(x, y []complex128) (sum complex128) - -// DotuInc is -// for i := 0; i < int(n); i++ { -// sum += y[iy] * x[ix] -// ix += incX -// iy += incY -// } -// return sum -func DotuInc(x, y []complex128, n, incX, incY, ix, iy uintptr) (sum complex128) diff --git a/vendor/gonum.org/v1/gonum/internal/asm/c128/stubs_noasm.go b/vendor/gonum.org/v1/gonum/internal/asm/c128/stubs_noasm.go deleted file mode 100644 index 6313e571c0..0000000000 --- a/vendor/gonum.org/v1/gonum/internal/asm/c128/stubs_noasm.go +++ /dev/null @@ -1,163 +0,0 @@ -// Copyright ©2016 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build !amd64 noasm appengine safe - -package c128 - -import "math/cmplx" - -// AxpyUnitary is -// for i, v := range x { -// y[i] += alpha * v -// } -func AxpyUnitary(alpha complex128, x, y []complex128) { - for i, v := range x { - y[i] += alpha * v - } -} - -// AxpyUnitaryTo is -// for i, v := range x { -// dst[i] = alpha*v + y[i] -// } -func AxpyUnitaryTo(dst []complex128, alpha complex128, x, y []complex128) { - for i, v := range x { - dst[i] = alpha*v + y[i] - } -} - -// AxpyInc is -// for i := 0; i < int(n); i++ { -// y[iy] += alpha * x[ix] -// ix += incX -// iy += incY -// } -func AxpyInc(alpha complex128, x, y []complex128, n, incX, incY, ix, iy uintptr) { - for i := 0; i < int(n); i++ { - y[iy] += alpha * x[ix] - ix += incX - iy += incY - } -} - -// AxpyIncTo is -// for i := 0; i < int(n); i++ { -// dst[idst] = alpha*x[ix] + y[iy] -// ix += incX -// iy += incY -// idst += incDst -// } -func AxpyIncTo(dst []complex128, incDst, idst uintptr, alpha complex128, x, y []complex128, n, incX, incY, ix, iy uintptr) { - for i := 0; i < int(n); i++ { - dst[idst] = alpha*x[ix] + y[iy] - ix += incX - iy += incY - idst += incDst - } -} - -// DscalUnitary is -// for i, v := range x { -// x[i] = complex(real(v)*alpha, imag(v)*alpha) -// } -func DscalUnitary(alpha float64, x []complex128) { - for i, v := range x { - x[i] = complex(real(v)*alpha, imag(v)*alpha) - } -} - -// DscalInc is -// var ix uintptr -// for i := 0; i < int(n); i++ { -// x[ix] = complex(real(x[ix])*alpha, imag(x[ix])*alpha) -// ix += inc -// } -func DscalInc(alpha float64, x []complex128, n, inc uintptr) { - var ix uintptr - for i := 0; i < int(n); i++ { - x[ix] = complex(real(x[ix])*alpha, imag(x[ix])*alpha) - ix += inc - } -} - -// ScalInc is -// var ix uintptr -// for i := 0; i < int(n); i++ { -// x[ix] *= alpha -// ix += incX -// } -func ScalInc(alpha complex128, x []complex128, n, inc uintptr) { - var ix uintptr - for i := 0; i < int(n); i++ { - x[ix] *= alpha - ix += inc - } -} - -// ScalUnitary is -// for i := range x { -// x[i] *= alpha -// } -func ScalUnitary(alpha complex128, x []complex128) { - for i := range x { - x[i] *= alpha - } -} - -// DotcUnitary is -// for i, v := range x { -// sum += y[i] * cmplx.Conj(v) -// } -// return sum -func DotcUnitary(x, y []complex128) (sum complex128) { - for i, v := range x { - sum += y[i] * cmplx.Conj(v) - } - return sum -} - -// DotcInc is -// for i := 0; i < int(n); i++ { -// sum += y[iy] * cmplx.Conj(x[ix]) -// ix += incX -// iy += incY -// } -// return sum -func DotcInc(x, y []complex128, n, incX, incY, ix, iy uintptr) (sum complex128) { - for i := 0; i < int(n); i++ { - sum += y[iy] * cmplx.Conj(x[ix]) - ix += incX - iy += incY - } - return sum -} - -// DotuUnitary is -// for i, v := range x { -// sum += y[i] * v -// } -// return sum -func DotuUnitary(x, y []complex128) (sum complex128) { - for i, v := range x { - sum += y[i] * v - } - return sum -} - -// DotuInc is -// for i := 0; i < int(n); i++ { -// sum += y[iy] * x[ix] -// ix += incX -// iy += incY -// } -// return sum -func DotuInc(x, y []complex128, n, incX, incY, ix, iy uintptr) (sum complex128) { - for i := 0; i < int(n); i++ { - sum += y[iy] * x[ix] - ix += incX - iy += incY - } - return sum -} diff --git a/vendor/gonum.org/v1/gonum/internal/asm/c64/axpyinc_amd64.s b/vendor/gonum.org/v1/gonum/internal/asm/c64/axpyinc_amd64.s deleted file mode 100644 index 841415dbc9..0000000000 --- a/vendor/gonum.org/v1/gonum/internal/asm/c64/axpyinc_amd64.s +++ /dev/null @@ -1,151 +0,0 @@ -// Copyright ©2016 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//+build !noasm,!appengine,!safe - -#include "textflag.h" - -// MOVSHDUP X3, X2 -#define MOVSHDUP_X3_X2 BYTE $0xF3; BYTE $0x0F; BYTE $0x16; BYTE $0xD3 -// MOVSLDUP X3, X3 -#define MOVSLDUP_X3_X3 BYTE $0xF3; BYTE $0x0F; BYTE $0x12; BYTE $0xDB -// ADDSUBPS X2, X3 -#define ADDSUBPS_X2_X3 BYTE $0xF2; BYTE $0x0F; BYTE $0xD0; BYTE $0xDA - -// MOVSHDUP X5, X4 -#define MOVSHDUP_X5_X4 BYTE $0xF3; BYTE $0x0F; BYTE $0x16; BYTE $0xE5 -// MOVSLDUP X5, X5 -#define MOVSLDUP_X5_X5 BYTE $0xF3; BYTE $0x0F; BYTE $0x12; BYTE $0xED -// ADDSUBPS X4, X5 -#define ADDSUBPS_X4_X5 BYTE $0xF2; BYTE $0x0F; BYTE $0xD0; BYTE $0xEC - -// MOVSHDUP X7, X6 -#define MOVSHDUP_X7_X6 BYTE $0xF3; BYTE $0x0F; BYTE $0x16; BYTE $0xF7 -// MOVSLDUP X7, X7 -#define MOVSLDUP_X7_X7 BYTE $0xF3; BYTE $0x0F; BYTE $0x12; BYTE $0xFF -// ADDSUBPS X6, X7 -#define ADDSUBPS_X6_X7 BYTE $0xF2; BYTE $0x0F; BYTE $0xD0; BYTE $0xFE - -// MOVSHDUP X9, X8 -#define MOVSHDUP_X9_X8 BYTE $0xF3; BYTE $0x45; BYTE $0x0F; BYTE $0x16; BYTE $0xC1 -// MOVSLDUP X9, X9 -#define MOVSLDUP_X9_X9 BYTE $0xF3; BYTE $0x45; BYTE $0x0F; BYTE $0x12; BYTE $0xC9 -// ADDSUBPS X8, X9 -#define ADDSUBPS_X8_X9 BYTE $0xF2; BYTE $0x45; BYTE $0x0F; BYTE $0xD0; BYTE $0xC8 - -// func AxpyInc(alpha complex64, x, y []complex64, n, incX, incY, ix, iy uintptr) -TEXT ·AxpyInc(SB), NOSPLIT, $0 - MOVQ x_base+8(FP), SI // SI = &x - MOVQ y_base+32(FP), DI // DI = &y - MOVQ n+56(FP), CX // CX = n - CMPQ CX, $0 // if n==0 { return } - JE axpyi_end - MOVQ ix+80(FP), R8 // R8 = ix - MOVQ iy+88(FP), R9 // R9 = iy - LEAQ (SI)(R8*8), SI // SI = &(x[ix]) - LEAQ (DI)(R9*8), DI // DI = &(y[iy]) - MOVQ DI, DX // DX = DI // Read/Write pointers - MOVQ incX+64(FP), R8 // R8 = incX - SHLQ $3, R8 // R8 *= sizeof(complex64) - MOVQ incY+72(FP), R9 // R9 = incY - SHLQ $3, R9 // R9 *= sizeof(complex64) - MOVSD alpha+0(FP), X0 // X0 = { 0, 0, imag(a), real(a) } - MOVAPS X0, X1 - SHUFPS $0x11, X1, X1 // X1 = { 0, 0, real(a), imag(a) } - MOVAPS X0, X10 // Copy X0 and X1 for pipelining - MOVAPS X1, X11 - MOVQ CX, BX - ANDQ $3, CX // CX = n % 4 - SHRQ $2, BX // BX = floor( n / 4 ) - JZ axpyi_tail // if BX == 0 { goto axpyi_tail } - -axpyi_loop: // do { - MOVSD (SI), X3 // X_i = { imag(x[i+1]), real(x[i+1]) } - MOVSD (SI)(R8*1), X5 - LEAQ (SI)(R8*2), SI // SI = &(SI[incX*2]) - MOVSD (SI), X7 - MOVSD (SI)(R8*1), X9 - - // X_(i-1) = { imag(x[i]), imag(x[i]) } - MOVSHDUP_X3_X2 - MOVSHDUP_X5_X4 - MOVSHDUP_X7_X6 - MOVSHDUP_X9_X8 - - // X_i = { real(x[i]), real(x[i]) } - MOVSLDUP_X3_X3 - MOVSLDUP_X5_X5 - MOVSLDUP_X7_X7 - MOVSLDUP_X9_X9 - - // X_(i-1) = { real(a) * imag(x[i]), imag(a) * imag(x[i]) } - // X_i = { imag(a) * real(x[i]), real(a) * real(x[i]) } - MULPS X1, X2 - MULPS X0, X3 - MULPS X11, X4 - MULPS X10, X5 - MULPS X1, X6 - MULPS X0, X7 - MULPS X11, X8 - MULPS X10, X9 - - // X_i = { - // imag(result[i]): imag(a)*real(x[i]) + real(a)*imag(x[i]), - // real(result[i]): real(a)*real(x[i]) - imag(a)*imag(x[i]), - // } - ADDSUBPS_X2_X3 - ADDSUBPS_X4_X5 - ADDSUBPS_X6_X7 - ADDSUBPS_X8_X9 - - // X_i = { imag(result[i]) + imag(y[i]), real(result[i]) + real(y[i]) } - MOVSD (DX), X2 - MOVSD (DX)(R9*1), X4 - LEAQ (DX)(R9*2), DX // DX = &(DX[incY*2]) - MOVSD (DX), X6 - MOVSD (DX)(R9*1), X8 - ADDPS X2, X3 - ADDPS X4, X5 - ADDPS X6, X7 - ADDPS X8, X9 - - MOVSD X3, (DI) // y[i] = X_i - MOVSD X5, (DI)(R9*1) - LEAQ (DI)(R9*2), DI // DI = &(DI[incDst]) - MOVSD X7, (DI) - MOVSD X9, (DI)(R9*1) - LEAQ (SI)(R8*2), SI // SI = &(SI[incX*2]) - LEAQ (DX)(R9*2), DX // DX = &(DX[incY*2]) - LEAQ (DI)(R9*2), DI // DI = &(DI[incDst]) - DECQ BX - JNZ axpyi_loop // } while --BX > 0 - CMPQ CX, $0 // if CX == 0 { return } - JE axpyi_end - -axpyi_tail: // do { - MOVSD (SI), X3 // X_i = { imag(x[i+1]), real(x[i+1]) } - MOVSHDUP_X3_X2 // X_(i-1) = { real(x[i]), real(x[i]) } - MOVSLDUP_X3_X3 // X_i = { imag(x[i]), imag(x[i]) } - - // X_i = { imag(a) * real(x[i]), real(a) * real(x[i]) } - // X_(i-1) = { real(a) * imag(x[i]), imag(a) * imag(x[i]) } - MULPS X1, X2 - MULPS X0, X3 - - // X_i = { - // imag(result[i]): imag(a)*real(x[i]) + real(a)*imag(x[i]), - // real(result[i]): real(a)*real(x[i]) - imag(a)*imag(x[i]), - // } - ADDSUBPS_X2_X3 // (ai*x1r+ar*x1i, ar*x1r-ai*x1i) - - // X_i = { imag(result[i]) + imag(y[i]), real(result[i]) + real(y[i]) } - MOVSD (DI), X4 - ADDPS X4, X3 - MOVSD X3, (DI) // y[i] = X_i - ADDQ R8, SI // SI += incX - ADDQ R9, DI // DI += incY - LOOP axpyi_tail // } while --CX > 0 - -axpyi_end: - RET diff --git a/vendor/gonum.org/v1/gonum/internal/asm/c64/axpyincto_amd64.s b/vendor/gonum.org/v1/gonum/internal/asm/c64/axpyincto_amd64.s deleted file mode 100644 index 5c5228dc21..0000000000 --- a/vendor/gonum.org/v1/gonum/internal/asm/c64/axpyincto_amd64.s +++ /dev/null @@ -1,156 +0,0 @@ -// Copyright ©2016 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//+build !noasm,!appengine,!safe - -#include "textflag.h" - -// MOVSHDUP X3, X2 -#define MOVSHDUP_X3_X2 BYTE $0xF3; BYTE $0x0F; BYTE $0x16; BYTE $0xD3 -// MOVSLDUP X3, X3 -#define MOVSLDUP_X3_X3 BYTE $0xF3; BYTE $0x0F; BYTE $0x12; BYTE $0xDB -// ADDSUBPS X2, X3 -#define ADDSUBPS_X2_X3 BYTE $0xF2; BYTE $0x0F; BYTE $0xD0; BYTE $0xDA - -// MOVSHDUP X5, X4 -#define MOVSHDUP_X5_X4 BYTE $0xF3; BYTE $0x0F; BYTE $0x16; BYTE $0xE5 -// MOVSLDUP X5, X5 -#define MOVSLDUP_X5_X5 BYTE $0xF3; BYTE $0x0F; BYTE $0x12; BYTE $0xED -// ADDSUBPS X4, X5 -#define ADDSUBPS_X4_X5 BYTE $0xF2; BYTE $0x0F; BYTE $0xD0; BYTE $0xEC - -// MOVSHDUP X7, X6 -#define MOVSHDUP_X7_X6 BYTE $0xF3; BYTE $0x0F; BYTE $0x16; BYTE $0xF7 -// MOVSLDUP X7, X7 -#define MOVSLDUP_X7_X7 BYTE $0xF3; BYTE $0x0F; BYTE $0x12; BYTE $0xFF -// ADDSUBPS X6, X7 -#define ADDSUBPS_X6_X7 BYTE $0xF2; BYTE $0x0F; BYTE $0xD0; BYTE $0xFE - -// MOVSHDUP X9, X8 -#define MOVSHDUP_X9_X8 BYTE $0xF3; BYTE $0x45; BYTE $0x0F; BYTE $0x16; BYTE $0xC1 -// MOVSLDUP X9, X9 -#define MOVSLDUP_X9_X9 BYTE $0xF3; BYTE $0x45; BYTE $0x0F; BYTE $0x12; BYTE $0xC9 -// ADDSUBPS X8, X9 -#define ADDSUBPS_X8_X9 BYTE $0xF2; BYTE $0x45; BYTE $0x0F; BYTE $0xD0; BYTE $0xC8 - -// func AxpyIncTo(dst []complex64, incDst, idst uintptr, alpha complex64, x, y []complex64, n, incX, incY, ix, iy uintptr) -TEXT ·AxpyIncTo(SB), NOSPLIT, $0 - MOVQ dst_base+0(FP), DI // DI = &dst - MOVQ x_base+48(FP), SI // SI = &x - MOVQ y_base+72(FP), DX // DX = &y - MOVQ n+96(FP), CX // CX = n - CMPQ CX, $0 // if n==0 { return } - JE axpyi_end - MOVQ ix+120(FP), R8 // Load the first index - MOVQ iy+128(FP), R9 - MOVQ idst+32(FP), R10 - LEAQ (SI)(R8*8), SI // SI = &(x[ix]) - LEAQ (DX)(R9*8), DX // DX = &(y[iy]) - LEAQ (DI)(R10*8), DI // DI = &(dst[idst]) - MOVQ incX+104(FP), R8 // Incrementors*8 for easy iteration (ADDQ) - SHLQ $3, R8 - MOVQ incY+112(FP), R9 - SHLQ $3, R9 - MOVQ incDst+24(FP), R10 - SHLQ $3, R10 - MOVSD alpha+40(FP), X0 // X0 = { 0, 0, imag(a), real(a) } - MOVAPS X0, X1 - SHUFPS $0x11, X1, X1 // X1 = { 0, 0, real(a), imag(a) } - MOVAPS X0, X10 // Copy X0 and X1 for pipelining - MOVAPS X1, X11 - MOVQ CX, BX - ANDQ $3, CX // CX = n % 4 - SHRQ $2, BX // BX = floor( n / 4 ) - JZ axpyi_tail // if BX == 0 { goto axpyi_tail } - -axpyi_loop: // do { - MOVSD (SI), X3 // X_i = { imag(x[i]), real(x[i]) } - MOVSD (SI)(R8*1), X5 - LEAQ (SI)(R8*2), SI // SI = &(SI[incX*2]) - MOVSD (SI), X7 - MOVSD (SI)(R8*1), X9 - - // X_(i-1) = { imag(x[i]), imag(x[i]) } - MOVSHDUP_X3_X2 - MOVSHDUP_X5_X4 - MOVSHDUP_X7_X6 - MOVSHDUP_X9_X8 - - // X_i = { real(x[i]), real(x[i]) } - MOVSLDUP_X3_X3 - MOVSLDUP_X5_X5 - MOVSLDUP_X7_X7 - MOVSLDUP_X9_X9 - - // X_(i-1) = { real(a) * imag(x[i]), imag(a) * imag(x[i]) } - // X_i = { imag(a) * real(x[i]), real(a) * real(x[i]) } - MULPS X1, X2 - MULPS X0, X3 - MULPS X11, X4 - MULPS X10, X5 - MULPS X1, X6 - MULPS X0, X7 - MULPS X11, X8 - MULPS X10, X9 - - // X_i = { - // imag(result[i]): imag(a)*real(x[i]) + real(a)*imag(x[i]), - // real(result[i]): real(a)*real(x[i]) - imag(a)*imag(x[i]), - // } - ADDSUBPS_X2_X3 - ADDSUBPS_X4_X5 - ADDSUBPS_X6_X7 - ADDSUBPS_X8_X9 - - // X_i = { imag(result[i]) + imag(y[i]), real(result[i]) + real(y[i]) } - MOVSD (DX), X2 - MOVSD (DX)(R9*1), X4 - LEAQ (DX)(R9*2), DX // DX = &(DX[incY*2]) - MOVSD (DX), X6 - MOVSD (DX)(R9*1), X8 - ADDPS X2, X3 - ADDPS X4, X5 - ADDPS X6, X7 - ADDPS X8, X9 - - MOVSD X3, (DI) // y[i] = X_i - MOVSD X5, (DI)(R10*1) - LEAQ (DI)(R10*2), DI // DI = &(DI[incDst]) - MOVSD X7, (DI) - MOVSD X9, (DI)(R10*1) - LEAQ (SI)(R8*2), SI // SI = &(SI[incX*2]) - LEAQ (DX)(R9*2), DX // DX = &(DX[incY*2]) - LEAQ (DI)(R10*2), DI // DI = &(DI[incDst]) - DECQ BX - JNZ axpyi_loop // } while --BX > 0 - CMPQ CX, $0 // if CX == 0 { return } - JE axpyi_end - -axpyi_tail: - MOVSD (SI), X3 // X_i = { imag(x[i]), real(x[i]) } - MOVSHDUP_X3_X2 // X_(i-1) = { imag(x[i]), imag(x[i]) } - MOVSLDUP_X3_X3 // X_i = { real(x[i]), real(x[i]) } - - // X_i = { imag(a) * real(x[i]), real(a) * real(x[i]) } - // X_(i-1) = { real(a) * imag(x[i]), imag(a) * imag(x[i]) } - MULPS X1, X2 - MULPS X0, X3 - - // X_i = { - // imag(result[i]): imag(a)*real(x[i]) + real(a)*imag(x[i]), - // real(result[i]): real(a)*real(x[i]) - imag(a)*imag(x[i]), - // } - ADDSUBPS_X2_X3 - - // X_i = { imag(result[i]) + imag(y[i]), real(result[i]) + real(y[i]) } - MOVSD (DX), X4 - ADDPS X4, X3 - MOVSD X3, (DI) // y[i] = X_i - ADDQ R8, SI // SI += incX - ADDQ R9, DX // DX += incY - ADDQ R10, DI // DI += incDst - LOOP axpyi_tail // } while --CX > 0 - -axpyi_end: - RET diff --git a/vendor/gonum.org/v1/gonum/internal/asm/c64/axpyunitary_amd64.s b/vendor/gonum.org/v1/gonum/internal/asm/c64/axpyunitary_amd64.s deleted file mode 100644 index ae744a4902..0000000000 --- a/vendor/gonum.org/v1/gonum/internal/asm/c64/axpyunitary_amd64.s +++ /dev/null @@ -1,160 +0,0 @@ -// Copyright ©2016 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//+build !noasm,!appengine,!safe - -#include "textflag.h" - -// MOVSHDUP X3, X2 -#define MOVSHDUP_X3_X2 BYTE $0xF3; BYTE $0x0F; BYTE $0x16; BYTE $0xD3 -// MOVSLDUP X3, X3 -#define MOVSLDUP_X3_X3 BYTE $0xF3; BYTE $0x0F; BYTE $0x12; BYTE $0xDB -// ADDSUBPS X2, X3 -#define ADDSUBPS_X2_X3 BYTE $0xF2; BYTE $0x0F; BYTE $0xD0; BYTE $0xDA - -// MOVSHDUP X5, X4 -#define MOVSHDUP_X5_X4 BYTE $0xF3; BYTE $0x0F; BYTE $0x16; BYTE $0xE5 -// MOVSLDUP X5, X5 -#define MOVSLDUP_X5_X5 BYTE $0xF3; BYTE $0x0F; BYTE $0x12; BYTE $0xED -// ADDSUBPS X4, X5 -#define ADDSUBPS_X4_X5 BYTE $0xF2; BYTE $0x0F; BYTE $0xD0; BYTE $0xEC - -// MOVSHDUP X7, X6 -#define MOVSHDUP_X7_X6 BYTE $0xF3; BYTE $0x0F; BYTE $0x16; BYTE $0xF7 -// MOVSLDUP X7, X7 -#define MOVSLDUP_X7_X7 BYTE $0xF3; BYTE $0x0F; BYTE $0x12; BYTE $0xFF -// ADDSUBPS X6, X7 -#define ADDSUBPS_X6_X7 BYTE $0xF2; BYTE $0x0F; BYTE $0xD0; BYTE $0xFE - -// MOVSHDUP X9, X8 -#define MOVSHDUP_X9_X8 BYTE $0xF3; BYTE $0x45; BYTE $0x0F; BYTE $0x16; BYTE $0xC1 -// MOVSLDUP X9, X9 -#define MOVSLDUP_X9_X9 BYTE $0xF3; BYTE $0x45; BYTE $0x0F; BYTE $0x12; BYTE $0xC9 -// ADDSUBPS X8, X9 -#define ADDSUBPS_X8_X9 BYTE $0xF2; BYTE $0x45; BYTE $0x0F; BYTE $0xD0; BYTE $0xC8 - -// func AxpyUnitary(alpha complex64, x, y []complex64) -TEXT ·AxpyUnitary(SB), NOSPLIT, $0 - MOVQ x_base+8(FP), SI // SI = &x - MOVQ y_base+32(FP), DI // DI = &y - MOVQ x_len+16(FP), CX // CX = min( len(x), len(y) ) - CMPQ y_len+40(FP), CX - CMOVQLE y_len+40(FP), CX - CMPQ CX, $0 // if CX == 0 { return } - JE caxy_end - PXOR X0, X0 // Clear work registers and cache-align loop - PXOR X1, X1 - MOVSD alpha+0(FP), X0 // X0 = { 0, 0, imag(a), real(a) } - SHUFPD $0, X0, X0 // X0 = { imag(a), real(a), imag(a), real(a) } - MOVAPS X0, X1 - SHUFPS $0x11, X1, X1 // X1 = { real(a), imag(a), real(a), imag(a) } - XORQ AX, AX // i = 0 - MOVQ DI, BX // Align on 16-byte boundary for ADDPS - ANDQ $15, BX // BX = &y & 15 - JZ caxy_no_trim // if BX == 0 { goto caxy_no_trim } - - // Trim first value in unaligned buffer - XORPS X2, X2 // Clear work registers and cache-align loop - XORPS X3, X3 - XORPS X4, X4 - MOVSD (SI)(AX*8), X3 // X3 = { imag(x[i]), real(x[i]) } - MOVSHDUP_X3_X2 // X2 = { imag(x[i]), imag(x[i]) } - MOVSLDUP_X3_X3 // X3 = { real(x[i]), real(x[i]) } - MULPS X1, X2 // X2 = { real(a) * imag(x[i]), imag(a) * imag(x[i]) } - MULPS X0, X3 // X3 = { imag(a) * real(x[i]), real(a) * real(x[i]) } - - // X3 = { imag(a)*real(x[i]) + real(a)*imag(x[i]), real(a)*real(x[i]) - imag(a)*imag(x[i]) } - ADDSUBPS_X2_X3 - MOVSD (DI)(AX*8), X4 // X3 += y[i] - ADDPS X4, X3 - MOVSD X3, (DI)(AX*8) // y[i] = X3 - INCQ AX // i++ - DECQ CX // --CX - JZ caxy_end // if CX == 0 { return } - -caxy_no_trim: - MOVAPS X0, X10 // Copy X0 and X1 for pipelineing - MOVAPS X1, X11 - MOVQ CX, BX - ANDQ $7, CX // CX = n % 8 - SHRQ $3, BX // BX = floor( n / 8 ) - JZ caxy_tail // if BX == 0 { goto caxy_tail } - -caxy_loop: // do { - // X_i = { imag(x[i]), real(x[i]), imag(x[i+1]), real(x[i+1]) } - MOVUPS (SI)(AX*8), X3 - MOVUPS 16(SI)(AX*8), X5 - MOVUPS 32(SI)(AX*8), X7 - MOVUPS 48(SI)(AX*8), X9 - - // X_(i-1) = { imag(x[i]), imag(x[i]), imag(x[i]+1), imag(x[i]+1) } - MOVSHDUP_X3_X2 - MOVSHDUP_X5_X4 - MOVSHDUP_X7_X6 - MOVSHDUP_X9_X8 - - // X_i = { real(x[i]), real(x[i]), real(x[i+1]), real(x[i+1]) } - MOVSLDUP_X3_X3 - MOVSLDUP_X5_X5 - MOVSLDUP_X7_X7 - MOVSLDUP_X9_X9 - - // X_i = { imag(a) * real(x[i]), real(a) * real(x[i]), - // imag(a) * real(x[i+1]), real(a) * real(x[i+1]) } - // X_(i-1) = { real(a) * imag(x[i]), imag(a) * imag(x[i]), - // real(a) * imag(x[i+1]), imag(a) * imag(x[i+1]) } - MULPS X1, X2 - MULPS X0, X3 - MULPS X11, X4 - MULPS X10, X5 - MULPS X1, X6 - MULPS X0, X7 - MULPS X11, X8 - MULPS X10, X9 - - // X_i = { - // imag(result[i]): imag(a)*real(x[i]) + real(a)*imag(x[i]), - // real(result[i]): real(a)*real(x[i]) - imag(a)*imag(x[i]), - // imag(result[i+1]): imag(a)*real(x[i+1]) + real(a)*imag(x[i+1]), - // real(result[i+1]): real(a)*real(x[i+1]) - imag(a)*imag(x[i+1]), - // } - ADDSUBPS_X2_X3 - ADDSUBPS_X4_X5 - ADDSUBPS_X6_X7 - ADDSUBPS_X8_X9 - - // X_i = { imag(result[i]) + imag(y[i]), real(result[i]) + real(y[i]), - // imag(result[i+1]) + imag(y[i+1]), real(result[i+1]) + real(y[i+1]) } - ADDPS (DI)(AX*8), X3 - ADDPS 16(DI)(AX*8), X5 - ADDPS 32(DI)(AX*8), X7 - ADDPS 48(DI)(AX*8), X9 - MOVUPS X3, (DI)(AX*8) // y[i:i+1] = X_i - MOVUPS X5, 16(DI)(AX*8) - MOVUPS X7, 32(DI)(AX*8) - MOVUPS X9, 48(DI)(AX*8) - ADDQ $8, AX // i += 8 - DECQ BX // --BX - JNZ caxy_loop // } while BX > 0 - CMPQ CX, $0 // if CX == 0 { return } - JE caxy_end - -caxy_tail: // do { - MOVSD (SI)(AX*8), X3 // X3 = { imag(x[i]), real(x[i]) } - MOVSHDUP_X3_X2 // X2 = { imag(x[i]), imag(x[i]) } - MOVSLDUP_X3_X3 // X3 = { real(x[i]), real(x[i]) } - MULPS X1, X2 // X2 = { real(a) * imag(x[i]), imag(a) * imag(x[i]) } - MULPS X0, X3 // X3 = { imag(a) * real(x[i]), real(a) * real(x[i]) } - - // X3 = { imag(a)*real(x[i]) + real(a)*imag(x[i]), - // real(a)*real(x[i]) - imag(a)*imag(x[i]) } - ADDSUBPS_X2_X3 - MOVSD (DI)(AX*8), X4 // X3 += y[i] - ADDPS X4, X3 - MOVSD X3, (DI)(AX*8) // y[i] = X3 - INCQ AX // ++i - LOOP caxy_tail // } while --CX > 0 - -caxy_end: - RET diff --git a/vendor/gonum.org/v1/gonum/internal/asm/c64/axpyunitaryto_amd64.s b/vendor/gonum.org/v1/gonum/internal/asm/c64/axpyunitaryto_amd64.s deleted file mode 100644 index a5d702092d..0000000000 --- a/vendor/gonum.org/v1/gonum/internal/asm/c64/axpyunitaryto_amd64.s +++ /dev/null @@ -1,157 +0,0 @@ -// Copyright ©2016 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//+build !noasm,!appengine,!safe - -#include "textflag.h" - -// MOVSHDUP X3, X2 -#define MOVSHDUP_X3_X2 BYTE $0xF3; BYTE $0x0F; BYTE $0x16; BYTE $0xD3 -// MOVSLDUP X3, X3 -#define MOVSLDUP_X3_X3 BYTE $0xF3; BYTE $0x0F; BYTE $0x12; BYTE $0xDB -// ADDSUBPS X2, X3 -#define ADDSUBPS_X2_X3 BYTE $0xF2; BYTE $0x0F; BYTE $0xD0; BYTE $0xDA - -// MOVSHDUP X5, X4 -#define MOVSHDUP_X5_X4 BYTE $0xF3; BYTE $0x0F; BYTE $0x16; BYTE $0xE5 -// MOVSLDUP X5, X5 -#define MOVSLDUP_X5_X5 BYTE $0xF3; BYTE $0x0F; BYTE $0x12; BYTE $0xED -// ADDSUBPS X4, X5 -#define ADDSUBPS_X4_X5 BYTE $0xF2; BYTE $0x0F; BYTE $0xD0; BYTE $0xEC - -// MOVSHDUP X7, X6 -#define MOVSHDUP_X7_X6 BYTE $0xF3; BYTE $0x0F; BYTE $0x16; BYTE $0xF7 -// MOVSLDUP X7, X7 -#define MOVSLDUP_X7_X7 BYTE $0xF3; BYTE $0x0F; BYTE $0x12; BYTE $0xFF -// ADDSUBPS X6, X7 -#define ADDSUBPS_X6_X7 BYTE $0xF2; BYTE $0x0F; BYTE $0xD0; BYTE $0xFE - -// MOVSHDUP X9, X8 -#define MOVSHDUP_X9_X8 BYTE $0xF3; BYTE $0x45; BYTE $0x0F; BYTE $0x16; BYTE $0xC1 -// MOVSLDUP X9, X9 -#define MOVSLDUP_X9_X9 BYTE $0xF3; BYTE $0x45; BYTE $0x0F; BYTE $0x12; BYTE $0xC9 -// ADDSUBPS X8, X9 -#define ADDSUBPS_X8_X9 BYTE $0xF2; BYTE $0x45; BYTE $0x0F; BYTE $0xD0; BYTE $0xC8 - -// func AxpyUnitaryTo(dst []complex64, alpha complex64, x, y []complex64) -TEXT ·AxpyUnitaryTo(SB), NOSPLIT, $0 - MOVQ dst_base+0(FP), DI // DI = &dst - MOVQ x_base+32(FP), SI // SI = &x - MOVQ y_base+56(FP), DX // DX = &y - MOVQ x_len+40(FP), CX - CMPQ y_len+64(FP), CX // CX = min( len(x), len(y), len(dst) ) - CMOVQLE y_len+64(FP), CX - CMPQ dst_len+8(FP), CX - CMOVQLE dst_len+8(FP), CX - CMPQ CX, $0 // if CX == 0 { return } - JE caxy_end - MOVSD alpha+24(FP), X0 // X0 = { 0, 0, imag(a), real(a) } - SHUFPD $0, X0, X0 // X0 = { imag(a), real(a), imag(a), real(a) } - MOVAPS X0, X1 - SHUFPS $0x11, X1, X1 // X1 = { real(a), imag(a), real(a), imag(a) } - XORQ AX, AX // i = 0 - MOVQ DX, BX // Align on 16-byte boundary for ADDPS - ANDQ $15, BX // BX = &y & 15 - JZ caxy_no_trim // if BX == 0 { goto caxy_no_trim } - - MOVSD (SI)(AX*8), X3 // X3 = { imag(x[i]), real(x[i]) } - MOVSHDUP_X3_X2 // X2 = { imag(x[i]), imag(x[i]) } - MOVSLDUP_X3_X3 // X3 = { real(x[i]), real(x[i]) } - MULPS X1, X2 // X2 = { real(a) * imag(x[i]), imag(a) * imag(x[i]) } - MULPS X0, X3 // X3 = { imag(a) * real(x[i]), real(a) * real(x[i]) } - - // X3 = { imag(a)*real(x[i]) + real(a)*imag(x[i]), real(a)*real(x[i]) - imag(a)*imag(x[i]) } - ADDSUBPS_X2_X3 - MOVSD (DX)(AX*8), X4 // X3 += y[i] - ADDPS X4, X3 - MOVSD X3, (DI)(AX*8) // dst[i] = X3 - INCQ AX // i++ - DECQ CX // --CX - JZ caxy_tail // if BX == 0 { goto caxy_tail } - -caxy_no_trim: - MOVAPS X0, X10 // Copy X0 and X1 for pipelineing - MOVAPS X1, X11 - MOVQ CX, BX - ANDQ $7, CX // CX = n % 8 - SHRQ $3, BX // BX = floor( n / 8 ) - JZ caxy_tail // if BX == 0 { goto caxy_tail } - -caxy_loop: - // X_i = { imag(x[i]), real(x[i]), imag(x[i+1]), real(x[i+1]) } - MOVUPS (SI)(AX*8), X3 - MOVUPS 16(SI)(AX*8), X5 - MOVUPS 32(SI)(AX*8), X7 - MOVUPS 48(SI)(AX*8), X9 - - // X_(i-1) = { imag(x[i]), imag(x[i]), imag(x[i]+1), imag(x[i]+1) } - MOVSHDUP_X3_X2 - MOVSHDUP_X5_X4 - MOVSHDUP_X7_X6 - MOVSHDUP_X9_X8 - - // X_i = { real(x[i]), real(x[i]), real(x[i+1]), real(x[i+1]) } - MOVSLDUP_X3_X3 - MOVSLDUP_X5_X5 - MOVSLDUP_X7_X7 - MOVSLDUP_X9_X9 - - // X_i = { imag(a) * real(x[i]), real(a) * real(x[i]), - // imag(a) * real(x[i+1]), real(a) * real(x[i+1]) } - // X_(i-1) = { real(a) * imag(x[i]), imag(a) * imag(x[i]), - // real(a) * imag(x[i+1]), imag(a) * imag(x[i+1]) } - MULPS X1, X2 - MULPS X0, X3 - MULPS X11, X4 - MULPS X10, X5 - MULPS X1, X6 - MULPS X0, X7 - MULPS X11, X8 - MULPS X10, X9 - - // X_i = { - // imag(result[i]): imag(a)*real(x[i]) + real(a)*imag(x[i]), - // real(result[i]): real(a)*real(x[i]) - imag(a)*imag(x[i]), - // imag(result[i+1]): imag(a)*real(x[i+1]) + real(a)*imag(x[i+1]), - // real(result[i+1]): real(a)*real(x[i+1]) - imag(a)*imag(x[i+1]), - // } - ADDSUBPS_X2_X3 - ADDSUBPS_X4_X5 - ADDSUBPS_X6_X7 - ADDSUBPS_X8_X9 - - // X_i = { imag(result[i]) + imag(y[i]), real(result[i]) + real(y[i]), - // imag(result[i+1]) + imag(y[i+1]), real(result[i+1]) + real(y[i+1]) } - ADDPS (DX)(AX*8), X3 - ADDPS 16(DX)(AX*8), X5 - ADDPS 32(DX)(AX*8), X7 - ADDPS 48(DX)(AX*8), X9 - MOVUPS X3, (DI)(AX*8) // y[i:i+1] = X_i - MOVUPS X5, 16(DI)(AX*8) - MOVUPS X7, 32(DI)(AX*8) - MOVUPS X9, 48(DI)(AX*8) - ADDQ $8, AX // i += 8 - DECQ BX // --BX - JNZ caxy_loop // } while BX > 0 - CMPQ CX, $0 // if CX == 0 { return } - JE caxy_end - -caxy_tail: // do { - MOVSD (SI)(AX*8), X3 // X3 = { imag(x[i]), real(x[i]) } - MOVSHDUP_X3_X2 // X2 = { imag(x[i]), imag(x[i]) } - MOVSLDUP_X3_X3 // X3 = { real(x[i]), real(x[i]) } - MULPS X1, X2 // X2 = { real(a) * imag(x[i]), imag(a) * imag(x[i]) } - MULPS X0, X3 // X3 = { imag(a) * real(x[i]), real(a) * real(x[i]) } - - // X3 = { imag(a)*real(x[i]) + real(a)*imag(x[i]), - // real(a)*real(x[i]) - imag(a)*imag(x[i]) } - ADDSUBPS_X2_X3 - MOVSD (DX)(AX*8), X4 // X3 += y[i] - ADDPS X4, X3 - MOVSD X3, (DI)(AX*8) // y[i] = X3 - INCQ AX // ++i - LOOP caxy_tail // } while --CX > 0 - -caxy_end: - RET diff --git a/vendor/gonum.org/v1/gonum/internal/asm/c64/conj.go b/vendor/gonum.org/v1/gonum/internal/asm/c64/conj.go deleted file mode 100644 index 910e1e5c73..0000000000 --- a/vendor/gonum.org/v1/gonum/internal/asm/c64/conj.go +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright ©2015 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package c64 - -func conj(c complex64) complex64 { return complex(real(c), -imag(c)) } diff --git a/vendor/gonum.org/v1/gonum/internal/asm/c64/doc.go b/vendor/gonum.org/v1/gonum/internal/asm/c64/doc.go deleted file mode 100644 index 35f1b2a26b..0000000000 --- a/vendor/gonum.org/v1/gonum/internal/asm/c64/doc.go +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright ©2017 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package c64 provides complex64 vector primitives. -package c64 // import "gonum.org/v1/gonum/internal/asm/c64" diff --git a/vendor/gonum.org/v1/gonum/internal/asm/c64/dotcinc_amd64.s b/vendor/gonum.org/v1/gonum/internal/asm/c64/dotcinc_amd64.s deleted file mode 100644 index 87de31d32a..0000000000 --- a/vendor/gonum.org/v1/gonum/internal/asm/c64/dotcinc_amd64.s +++ /dev/null @@ -1,160 +0,0 @@ -// Copyright ©2016 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//+build !noasm,!appengine,!safe - -#include "textflag.h" - -#define MOVSHDUP_X3_X2 LONG $0xD3160FF3 // MOVSHDUP X3, X2 -#define MOVSHDUP_X5_X4 LONG $0xE5160FF3 // MOVSHDUP X5, X4 -#define MOVSHDUP_X7_X6 LONG $0xF7160FF3 // MOVSHDUP X7, X6 -#define MOVSHDUP_X9_X8 LONG $0x160F45F3; BYTE $0xC1 // MOVSHDUP X9, X8 - -#define MOVSLDUP_X3_X3 LONG $0xDB120FF3 // MOVSLDUP X3, X3 -#define MOVSLDUP_X5_X5 LONG $0xED120FF3 // MOVSLDUP X5, X5 -#define MOVSLDUP_X7_X7 LONG $0xFF120FF3 // MOVSLDUP X7, X7 -#define MOVSLDUP_X9_X9 LONG $0x120F45F3; BYTE $0xC9 // MOVSLDUP X9, X9 - -#define ADDSUBPS_X2_X3 LONG $0xDAD00FF2 // ADDSUBPS X2, X3 -#define ADDSUBPS_X4_X5 LONG $0xECD00FF2 // ADDSUBPS X4, X5 -#define ADDSUBPS_X6_X7 LONG $0xFED00FF2 // ADDSUBPS X6, X7 -#define ADDSUBPS_X8_X9 LONG $0xD00F45F2; BYTE $0xC8 // ADDSUBPS X8, X9 - -#define X_PTR SI -#define Y_PTR DI -#define LEN CX -#define TAIL BX -#define SUM X0 -#define P_SUM X1 -#define INC_X R8 -#define INCx3_X R9 -#define INC_Y R10 -#define INCx3_Y R11 -#define NEG1 X15 -#define P_NEG1 X14 - -// func DotcInc(x, y []complex64, n, incX, incY, ix, iy uintptr) (sum complex64) -TEXT ·DotcInc(SB), NOSPLIT, $0 - MOVQ x_base+0(FP), X_PTR // X_PTR = &x - MOVQ y_base+24(FP), Y_PTR // Y_PTR = &y - PXOR SUM, SUM // SUM = 0 - PXOR P_SUM, P_SUM // P_SUM = 0 - MOVQ n+48(FP), LEN // LEN = n - CMPQ LEN, $0 // if LEN == 0 { return } - JE dotc_end - MOVQ ix+72(FP), INC_X - MOVQ iy+80(FP), INC_Y - LEAQ (X_PTR)(INC_X*8), X_PTR // X_PTR = &(X_PTR[ix]) - LEAQ (Y_PTR)(INC_Y*8), Y_PTR // Y_PTR = &(Y_PTR[iy]) - MOVQ incX+56(FP), INC_X // INC_X = incX * sizeof(complex64) - SHLQ $3, INC_X - MOVQ incY+64(FP), INC_Y // INC_Y = incY * sizeof(complex64) - SHLQ $3, INC_Y - MOVSS $(-1.0), NEG1 - SHUFPS $0, NEG1, NEG1 // { -1, -1, -1, -1 } - - MOVQ LEN, TAIL - ANDQ $3, TAIL // TAIL = LEN % 4 - SHRQ $2, LEN // LEN = floor( LEN / 4 ) - JZ dotc_tail // if LEN == 0 { goto dotc_tail } - - MOVUPS NEG1, P_NEG1 // Copy NEG1 for pipelining - LEAQ (INC_X)(INC_X*2), INCx3_X // INCx3_X = INC_X * 3 - LEAQ (INC_Y)(INC_Y*2), INCx3_Y // INCx3_Y = INC_Y * 3 - -dotc_loop: // do { - MOVSD (X_PTR), X3 // X_i = { imag(x[i]), real(x[i]) } - MOVSD (X_PTR)(INC_X*1), X5 - MOVSD (X_PTR)(INC_X*2), X7 - MOVSD (X_PTR)(INCx3_X*1), X9 - - // X_(i-1) = { imag(x[i]), imag(x[i]) } - MOVSHDUP_X3_X2 - MOVSHDUP_X5_X4 - MOVSHDUP_X7_X6 - MOVSHDUP_X9_X8 - - // X_i = { real(x[i]), real(x[i]) } - MOVSLDUP_X3_X3 - MOVSLDUP_X5_X5 - MOVSLDUP_X7_X7 - MOVSLDUP_X9_X9 - - // X_(i-1) = { -imag(x[i]), -imag(x[i]) } - MULPS NEG1, X2 - MULPS P_NEG1, X4 - MULPS NEG1, X6 - MULPS P_NEG1, X8 - - // X_j = { imag(y[i]), real(y[i]) } - MOVSD (Y_PTR), X10 - MOVSD (Y_PTR)(INC_Y*1), X11 - MOVSD (Y_PTR)(INC_Y*2), X12 - MOVSD (Y_PTR)(INCx3_Y*1), X13 - - // X_i = { imag(y[i]) * real(x[i]), real(y[i]) * real(x[i]) } - MULPS X10, X3 - MULPS X11, X5 - MULPS X12, X7 - MULPS X13, X9 - - // X_j = { real(y[i]), imag(y[i]) } - SHUFPS $0xB1, X10, X10 - SHUFPS $0xB1, X11, X11 - SHUFPS $0xB1, X12, X12 - SHUFPS $0xB1, X13, X13 - - // X_(i-1) = { real(y[i]) * imag(x[i]), imag(y[i]) * imag(x[i]) } - MULPS X10, X2 - MULPS X11, X4 - MULPS X12, X6 - MULPS X13, X8 - - // X_i = { - // imag(result[i]): imag(y[i]) * real(x[i]) + real(y[i]) * imag(x[i]), - // real(result[i]): real(y[i]) * real(x[i]) - imag(y[i]) * imag(x[i]) } - ADDSUBPS_X2_X3 - ADDSUBPS_X4_X5 - ADDSUBPS_X6_X7 - ADDSUBPS_X8_X9 - - // SUM += X_i - ADDPS X3, SUM - ADDPS X5, P_SUM - ADDPS X7, SUM - ADDPS X9, P_SUM - - LEAQ (X_PTR)(INC_X*4), X_PTR // X_PTR = &(X_PTR[INC_X*4]) - LEAQ (Y_PTR)(INC_Y*4), Y_PTR // Y_PTR = &(Y_PTR[INC_Y*4]) - - DECQ LEN - JNZ dotc_loop // } while --LEN > 0 - - ADDPS P_SUM, SUM // SUM = { P_SUM + SUM } - CMPQ TAIL, $0 // if TAIL == 0 { return } - JE dotc_end - -dotc_tail: // do { - MOVSD (X_PTR), X3 // X_i = { imag(x[i]), real(x[i]) } - MOVSHDUP_X3_X2 // X_(i-1) = { imag(x[i]), imag(x[i]) } - MOVSLDUP_X3_X3 // X_i = { real(x[i]), real(x[i]) } - MULPS NEG1, X2 // X_(i-1) = { -imag(x[i]), imag(x[i]) } - MOVUPS (Y_PTR), X10 // X_j = { imag(y[i]), real(y[i]) } - MULPS X10, X3 // X_i = { imag(y[i]) * real(x[i]), real(y[i]) * real(x[i]) } - SHUFPS $0x1, X10, X10 // X_j = { real(y[i]), imag(y[i]) } - MULPS X10, X2 // X_(i-1) = { real(y[i]) * imag(x[i]), imag(y[i]) * imag(x[i]) } - - // X_i = { - // imag(result[i]): imag(y[i])*real(x[i]) + real(y[i])*imag(x[i]), - // real(result[i]): real(y[i])*real(x[i]) - imag(y[i])*imag(x[i]) } - ADDSUBPS_X2_X3 - ADDPS X3, SUM // SUM += X_i - ADDQ INC_X, X_PTR // X_PTR += INC_X - ADDQ INC_Y, Y_PTR // Y_PTR += INC_Y - DECQ TAIL - JNZ dotc_tail // } while --TAIL > 0 - -dotc_end: - MOVSD SUM, sum+88(FP) // return SUM - RET diff --git a/vendor/gonum.org/v1/gonum/internal/asm/c64/dotcunitary_amd64.s b/vendor/gonum.org/v1/gonum/internal/asm/c64/dotcunitary_amd64.s deleted file mode 100644 index d53479ca49..0000000000 --- a/vendor/gonum.org/v1/gonum/internal/asm/c64/dotcunitary_amd64.s +++ /dev/null @@ -1,208 +0,0 @@ -// Copyright ©2017 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//+build !noasm,!appengine,!safe - -#include "textflag.h" - -#define MOVSLDUP_XPTR_IDX_8__X3 LONG $0x1C120FF3; BYTE $0xC6 // MOVSLDUP (SI)(AX*8), X3 -#define MOVSLDUP_16_XPTR_IDX_8__X5 LONG $0x6C120FF3; WORD $0x10C6 // MOVSLDUP 16(SI)(AX*8), X5 -#define MOVSLDUP_32_XPTR_IDX_8__X7 LONG $0x7C120FF3; WORD $0x20C6 // MOVSLDUP 32(SI)(AX*8), X7 -#define MOVSLDUP_48_XPTR_IDX_8__X9 LONG $0x120F44F3; WORD $0xC64C; BYTE $0x30 // MOVSLDUP 48(SI)(AX*8), X9 - -#define MOVSHDUP_XPTR_IDX_8__X2 LONG $0x14160FF3; BYTE $0xC6 // MOVSHDUP (SI)(AX*8), X2 -#define MOVSHDUP_16_XPTR_IDX_8__X4 LONG $0x64160FF3; WORD $0x10C6 // MOVSHDUP 16(SI)(AX*8), X4 -#define MOVSHDUP_32_XPTR_IDX_8__X6 LONG $0x74160FF3; WORD $0x20C6 // MOVSHDUP 32(SI)(AX*8), X6 -#define MOVSHDUP_48_XPTR_IDX_8__X8 LONG $0x160F44F3; WORD $0xC644; BYTE $0x30 // MOVSHDUP 48(SI)(AX*8), X8 - -#define MOVSHDUP_X3_X2 LONG $0xD3160FF3 // MOVSHDUP X3, X2 -#define MOVSLDUP_X3_X3 LONG $0xDB120FF3 // MOVSLDUP X3, X3 - -#define ADDSUBPS_X2_X3 LONG $0xDAD00FF2 // ADDSUBPS X2, X3 -#define ADDSUBPS_X4_X5 LONG $0xECD00FF2 // ADDSUBPS X4, X5 -#define ADDSUBPS_X6_X7 LONG $0xFED00FF2 // ADDSUBPS X6, X7 -#define ADDSUBPS_X8_X9 LONG $0xD00F45F2; BYTE $0xC8 // ADDSUBPS X8, X9 - -#define X_PTR SI -#define Y_PTR DI -#define LEN CX -#define TAIL BX -#define SUM X0 -#define P_SUM X1 -#define IDX AX -#define I_IDX DX -#define NEG1 X15 -#define P_NEG1 X14 - -// func DotcUnitary(x, y []complex64) (sum complex64) -TEXT ·DotcUnitary(SB), NOSPLIT, $0 - MOVQ x_base+0(FP), X_PTR // X_PTR = &x - MOVQ y_base+24(FP), Y_PTR // Y_PTR = &y - PXOR SUM, SUM // SUM = 0 - PXOR P_SUM, P_SUM // P_SUM = 0 - MOVQ x_len+8(FP), LEN // LEN = min( len(x), len(y) ) - CMPQ y_len+32(FP), LEN - CMOVQLE y_len+32(FP), LEN - CMPQ LEN, $0 // if LEN == 0 { return } - JE dotc_end - XORQ IDX, IDX // i = 0 - MOVSS $(-1.0), NEG1 - SHUFPS $0, NEG1, NEG1 // { -1, -1, -1, -1 } - - MOVQ X_PTR, DX - ANDQ $15, DX // DX = &x & 15 - JZ dotc_aligned // if DX == 0 { goto dotc_aligned } - - MOVSD (X_PTR)(IDX*8), X3 // X_i = { imag(x[i]), real(x[i]) } - MOVSHDUP_X3_X2 // X_(i-1) = { imag(x[i]), imag(x[i]) } - MOVSLDUP_X3_X3 // X_i = { real(x[i]), real(x[i]) } - MOVSD (Y_PTR)(IDX*8), X10 // X_j = { imag(y[i]), real(y[i]) } - MULPS NEG1, X2 // X_(i-1) = { -imag(x[i]), imag(x[i]) } - MULPS X10, X3 // X_i = { imag(y[i]) * real(x[i]), real(y[i]) * real(x[i]) } - SHUFPS $0x1, X10, X10 // X_j = { real(y[i]), imag(y[i]) } - MULPS X10, X2 // X_(i-1) = { real(y[i]) * imag(x[i]), imag(y[i]) * imag(x[i]) } - - // X_i = { - // imag(result[i]): imag(y[i])*real(x[i]) + real(y[i])*imag(x[i]), - // real(result[i]): real(y[i])*real(x[i]) - imag(y[i])*imag(x[i]) } - ADDSUBPS_X2_X3 - - MOVAPS X3, SUM // SUM = X_i - INCQ IDX // IDX++ - DECQ LEN // LEN-- - JZ dotc_ret // if LEN == 0 { goto dotc_ret } - -dotc_aligned: - MOVQ LEN, TAIL - ANDQ $7, TAIL // TAIL = LEN % 8 - SHRQ $3, LEN // LEN = floor( LEN / 8 ) - JZ dotc_tail // if LEN == 0 { return } - MOVUPS NEG1, P_NEG1 // Copy NEG1 for pipelining - -dotc_loop: // do { - MOVSLDUP_XPTR_IDX_8__X3 // X_i = { real(x[i]), real(x[i]), real(x[i+1]), real(x[i+1]) } - MOVSLDUP_16_XPTR_IDX_8__X5 - MOVSLDUP_32_XPTR_IDX_8__X7 - MOVSLDUP_48_XPTR_IDX_8__X9 - - MOVSHDUP_XPTR_IDX_8__X2 // X_(i-1) = { imag(x[i]), imag(x[i]), imag(x[i+1]), imag(x[i+1]) } - MOVSHDUP_16_XPTR_IDX_8__X4 - MOVSHDUP_32_XPTR_IDX_8__X6 - MOVSHDUP_48_XPTR_IDX_8__X8 - - // X_j = { imag(y[i]), real(y[i]), imag(y[i+1]), real(y[i+1]) } - MOVUPS (Y_PTR)(IDX*8), X10 - MOVUPS 16(Y_PTR)(IDX*8), X11 - MOVUPS 32(Y_PTR)(IDX*8), X12 - MOVUPS 48(Y_PTR)(IDX*8), X13 - - // X_(i-1) = { -imag(x[i]), -imag(x[i]), -imag(x[i]+1), -imag(x[i]+1) } - MULPS NEG1, X2 - MULPS P_NEG1, X4 - MULPS NEG1, X6 - MULPS P_NEG1, X8 - - // X_i = { imag(y[i]) * real(x[i]), real(y[i]) * real(x[i]), - // imag(y[i+1]) * real(x[i+1]), real(y[i+1]) * real(x[i+1]) } - MULPS X10, X3 - MULPS X11, X5 - MULPS X12, X7 - MULPS X13, X9 - - // X_j = { real(y[i]), imag(y[i]), real(y[i+1]), imag(y[i+1]) } - SHUFPS $0xB1, X10, X10 - SHUFPS $0xB1, X11, X11 - SHUFPS $0xB1, X12, X12 - SHUFPS $0xB1, X13, X13 - - // X_(i-1) = { real(y[i]) * imag(x[i]), imag(y[i]) * imag(x[i]), - // real(y[i+1]) * imag(x[i+1]), imag(y[i+1]) * imag(x[i+1]) } - MULPS X10, X2 - MULPS X11, X4 - MULPS X12, X6 - MULPS X13, X8 - - // X_i = { - // imag(result[i]): imag(y[i]) * real(x[i]) + real(y[i]) * imag(x[i]), - // real(result[i]): real(y[i]) * real(x[i]) - imag(y[i]) * imag(x[i]), - // imag(result[i+1]): imag(y[i+1]) * real(x[i+1]) + real(y[i+1]) * imag(x[i+1]), - // real(result[i+1]): real(y[i+1]) * real(x[i+1]) - imag(y[i+1]) * imag(x[i+1]), - // } - ADDSUBPS_X2_X3 - ADDSUBPS_X4_X5 - ADDSUBPS_X6_X7 - ADDSUBPS_X8_X9 - - // SUM += X_i - ADDPS X3, SUM - ADDPS X5, P_SUM - ADDPS X7, SUM - ADDPS X9, P_SUM - - ADDQ $8, IDX // IDX += 8 - DECQ LEN - JNZ dotc_loop // } while --LEN > 0 - - ADDPS SUM, P_SUM // P_SUM = { P_SUM[1] + SUM[1], P_SUM[0] + SUM[0] } - XORPS SUM, SUM // SUM = 0 - - CMPQ TAIL, $0 // if TAIL == 0 { return } - JE dotc_end - -dotc_tail: - MOVQ TAIL, LEN - SHRQ $1, LEN // LEN = floor( LEN / 2 ) - JZ dotc_tail_one // if LEN == 0 { goto dotc_tail_one } - -dotc_tail_two: // do { - MOVSLDUP_XPTR_IDX_8__X3 // X_i = { real(x[i]), real(x[i]), real(x[i+1]), real(x[i+1]) } - MOVSHDUP_XPTR_IDX_8__X2 // X_(i-1) = { imag(x[i]), imag(x[i]), imag(x[i]+1), imag(x[i]+1) } - MOVUPS (Y_PTR)(IDX*8), X10 // X_j = { imag(y[i]), real(y[i]) } - MULPS NEG1, X2 // X_(i-1) = { -imag(x[i]), imag(x[i]) } - MULPS X10, X3 // X_i = { imag(y[i]) * real(x[i]), real(y[i]) * real(x[i]) } - SHUFPS $0xB1, X10, X10 // X_j = { real(y[i]), imag(y[i]) } - MULPS X10, X2 // X_(i-1) = { real(y[i]) * imag(x[i]), imag(y[i]) * imag(x[i]) } - - // X_i = { - // imag(result[i]): imag(y[i])*real(x[i]) + real(y[i])*imag(x[i]), - // real(result[i]): real(y[i])*real(x[i]) - imag(y[i])*imag(x[i]) } - ADDSUBPS_X2_X3 - - ADDPS X3, SUM // SUM += X_i - - ADDQ $2, IDX // IDX += 2 - DECQ LEN - JNZ dotc_tail_two // } while --LEN > 0 - - ADDPS SUM, P_SUM // P_SUM = { P_SUM[1] + SUM[1], P_SUM[0] + SUM[0] } - XORPS SUM, SUM // SUM = 0 - - ANDQ $1, TAIL - JZ dotc_end - -dotc_tail_one: - MOVSD (X_PTR)(IDX*8), X3 // X_i = { imag(x[i]), real(x[i]) } - MOVSHDUP_X3_X2 // X_(i-1) = { imag(x[i]), imag(x[i]) } - MOVSLDUP_X3_X3 // X_i = { real(x[i]), real(x[i]) } - MOVSD (Y_PTR)(IDX*8), X10 // X_j = { imag(y[i]), real(y[i]) } - MULPS NEG1, X2 // X_(i-1) = { -imag(x[i]), imag(x[i]) } - MULPS X10, X3 // X_i = { imag(y[i]) * real(x[i]), real(y[i]) * real(x[i]) } - SHUFPS $0x1, X10, X10 // X_j = { real(y[i]), imag(y[i]) } - MULPS X10, X2 // X_(i-1) = { real(y[i]) * imag(x[i]), imag(y[i]) * imag(x[i]) } - - // X_i = { - // imag(result[i]): imag(y[i])*real(x[i]) + real(y[i])*imag(x[i]), - // real(result[i]): real(y[i])*real(x[i]) - imag(y[i])*imag(x[i]) } - ADDSUBPS_X2_X3 - - ADDPS X3, SUM // SUM += X_i - -dotc_end: - ADDPS P_SUM, SUM // SUM = { P_SUM[0] + SUM[0] } - MOVHLPS P_SUM, P_SUM // P_SUM = { P_SUM[1], P_SUM[1] } - ADDPS P_SUM, SUM // SUM = { P_SUM[1] + SUM[0] } - -dotc_ret: - MOVSD SUM, sum+48(FP) // return SUM - RET diff --git a/vendor/gonum.org/v1/gonum/internal/asm/c64/dotuinc_amd64.s b/vendor/gonum.org/v1/gonum/internal/asm/c64/dotuinc_amd64.s deleted file mode 100644 index bdee59becd..0000000000 --- a/vendor/gonum.org/v1/gonum/internal/asm/c64/dotuinc_amd64.s +++ /dev/null @@ -1,148 +0,0 @@ -// Copyright ©2016 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//+build !noasm,!appengine,!safe - -#include "textflag.h" - -#define MOVSHDUP_X3_X2 LONG $0xD3160FF3 // MOVSHDUP X3, X2 -#define MOVSHDUP_X5_X4 LONG $0xE5160FF3 // MOVSHDUP X5, X4 -#define MOVSHDUP_X7_X6 LONG $0xF7160FF3 // MOVSHDUP X7, X6 -#define MOVSHDUP_X9_X8 LONG $0x160F45F3; BYTE $0xC1 // MOVSHDUP X9, X8 - -#define MOVSLDUP_X3_X3 LONG $0xDB120FF3 // MOVSLDUP X3, X3 -#define MOVSLDUP_X5_X5 LONG $0xED120FF3 // MOVSLDUP X5, X5 -#define MOVSLDUP_X7_X7 LONG $0xFF120FF3 // MOVSLDUP X7, X7 -#define MOVSLDUP_X9_X9 LONG $0x120F45F3; BYTE $0xC9 // MOVSLDUP X9, X9 - -#define ADDSUBPS_X2_X3 LONG $0xDAD00FF2 // ADDSUBPS X2, X3 -#define ADDSUBPS_X4_X5 LONG $0xECD00FF2 // ADDSUBPS X4, X5 -#define ADDSUBPS_X6_X7 LONG $0xFED00FF2 // ADDSUBPS X6, X7 -#define ADDSUBPS_X8_X9 LONG $0xD00F45F2; BYTE $0xC8 // ADDSUBPS X8, X9 - -#define X_PTR SI -#define Y_PTR DI -#define LEN CX -#define TAIL BX -#define SUM X0 -#define P_SUM X1 -#define INC_X R8 -#define INCx3_X R9 -#define INC_Y R10 -#define INCx3_Y R11 - -// func DotuInc(x, y []complex64, n, incX, incY, ix, iy uintptr) (sum complex64) -TEXT ·DotuInc(SB), NOSPLIT, $0 - MOVQ x_base+0(FP), X_PTR // X_PTR = &x - MOVQ y_base+24(FP), Y_PTR // Y_PTR = &y - PXOR SUM, SUM // SUM = 0 - PXOR P_SUM, P_SUM // P_SUM = 0 - MOVQ n+48(FP), LEN // LEN = n - CMPQ LEN, $0 // if LEN == 0 { return } - JE dotu_end - MOVQ ix+72(FP), INC_X - MOVQ iy+80(FP), INC_Y - LEAQ (X_PTR)(INC_X*8), X_PTR // X_PTR = &(X_PTR[ix]) - LEAQ (Y_PTR)(INC_Y*8), Y_PTR // Y_PTR = &(Y_PTR[iy]) - MOVQ incX+56(FP), INC_X // INC_X = incX * sizeof(complex64) - SHLQ $3, INC_X - MOVQ incY+64(FP), INC_Y // INC_Y = incY * sizeof(complex64) - SHLQ $3, INC_Y - - MOVQ LEN, TAIL - ANDQ $3, TAIL // TAIL = LEN % 4 - SHRQ $2, LEN // LEN = floor( LEN / 4 ) - JZ dotu_tail // if TAIL == 0 { goto dotu_tail } - - LEAQ (INC_X)(INC_X*2), INCx3_X // INCx3_X = INC_X * 3 - LEAQ (INC_Y)(INC_Y*2), INCx3_Y // INCx3_Y = INC_Y * 3 - -dotu_loop: // do { - MOVSD (X_PTR), X3 // X_i = { imag(x[i]), real(x[i]) } - MOVSD (X_PTR)(INC_X*1), X5 - MOVSD (X_PTR)(INC_X*2), X7 - MOVSD (X_PTR)(INCx3_X*1), X9 - - // X_(i-1) = { imag(x[i]), imag(x[i]) } - MOVSHDUP_X3_X2 - MOVSHDUP_X5_X4 - MOVSHDUP_X7_X6 - MOVSHDUP_X9_X8 - - // X_i = { real(x[i]), real(x[i]) } - MOVSLDUP_X3_X3 - MOVSLDUP_X5_X5 - MOVSLDUP_X7_X7 - MOVSLDUP_X9_X9 - - // X_j = { imag(y[i]), real(y[i]) } - MOVSD (Y_PTR), X10 - MOVSD (Y_PTR)(INC_Y*1), X11 - MOVSD (Y_PTR)(INC_Y*2), X12 - MOVSD (Y_PTR)(INCx3_Y*1), X13 - - // X_i = { imag(y[i]) * real(x[i]), real(y[i]) * real(x[i]) } - MULPS X10, X3 - MULPS X11, X5 - MULPS X12, X7 - MULPS X13, X9 - - // X_j = { real(y[i]), imag(y[i]) } - SHUFPS $0xB1, X10, X10 - SHUFPS $0xB1, X11, X11 - SHUFPS $0xB1, X12, X12 - SHUFPS $0xB1, X13, X13 - - // X_(i-1) = { real(y[i]) * imag(x[i]), imag(y[i]) * imag(x[i]) } - MULPS X10, X2 - MULPS X11, X4 - MULPS X12, X6 - MULPS X13, X8 - - // X_i = { - // imag(result[i]): imag(y[i]) * real(x[i]) + real(y[i]) * imag(x[i]), - // real(result[i]): real(y[i]) * real(x[i]) - imag(y[i]) * imag(x[i]) } - ADDSUBPS_X2_X3 - ADDSUBPS_X4_X5 - ADDSUBPS_X6_X7 - ADDSUBPS_X8_X9 - - // SUM += X_i - ADDPS X3, SUM - ADDPS X5, P_SUM - ADDPS X7, SUM - ADDPS X9, P_SUM - - LEAQ (X_PTR)(INC_X*4), X_PTR // X_PTR = &(X_PTR[INC_X*4]) - LEAQ (Y_PTR)(INC_Y*4), Y_PTR // Y_PTR = &(Y_PTR[INC_Y*4]) - - DECQ LEN - JNZ dotu_loop // } while --LEN > 0 - - ADDPS P_SUM, SUM // SUM = { P_SUM + SUM } - CMPQ TAIL, $0 // if TAIL == 0 { return } - JE dotu_end - -dotu_tail: // do { - MOVSD (X_PTR), X3 // X_i = { imag(x[i]), real(x[i]) } - MOVSHDUP_X3_X2 // X_(i-1) = { imag(x[i]), imag(x[i]) } - MOVSLDUP_X3_X3 // X_i = { real(x[i]), real(x[i]) } - MOVUPS (Y_PTR), X10 // X_j = { imag(y[i]), real(y[i]) } - MULPS X10, X3 // X_i = { imag(y[i]) * real(x[i]), real(y[i]) * real(x[i]) } - SHUFPS $0x1, X10, X10 // X_j = { real(y[i]), imag(y[i]) } - MULPS X10, X2 // X_(i-1) = { real(y[i]) * imag(x[i]), imag(y[i]) * imag(x[i]) } - - // X_i = { - // imag(result[i]): imag(y[i])*real(x[i]) + real(y[i])*imag(x[i]), - // real(result[i]): real(y[i])*real(x[i]) - imag(y[i])*imag(x[i]) } - ADDSUBPS_X2_X3 - ADDPS X3, SUM // SUM += X_i - ADDQ INC_X, X_PTR // X_PTR += INC_X - ADDQ INC_Y, Y_PTR // Y_PTR += INC_Y - DECQ TAIL - JNZ dotu_tail // } while --TAIL > 0 - -dotu_end: - MOVSD SUM, sum+88(FP) // return SUM - RET diff --git a/vendor/gonum.org/v1/gonum/internal/asm/c64/dotuunitary_amd64.s b/vendor/gonum.org/v1/gonum/internal/asm/c64/dotuunitary_amd64.s deleted file mode 100644 index dce83a4671..0000000000 --- a/vendor/gonum.org/v1/gonum/internal/asm/c64/dotuunitary_amd64.s +++ /dev/null @@ -1,197 +0,0 @@ -// Copyright ©2017 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//+build !noasm,!appengine,!safe - -#include "textflag.h" - -#define MOVSLDUP_XPTR_IDX_8__X3 LONG $0x1C120FF3; BYTE $0xC6 // MOVSLDUP (SI)(AX*8), X3 -#define MOVSLDUP_16_XPTR_IDX_8__X5 LONG $0x6C120FF3; WORD $0x10C6 // MOVSLDUP 16(SI)(AX*8), X5 -#define MOVSLDUP_32_XPTR_IDX_8__X7 LONG $0x7C120FF3; WORD $0x20C6 // MOVSLDUP 32(SI)(AX*8), X7 -#define MOVSLDUP_48_XPTR_IDX_8__X9 LONG $0x120F44F3; WORD $0xC64C; BYTE $0x30 // MOVSLDUP 48(SI)(AX*8), X9 - -#define MOVSHDUP_XPTR_IDX_8__X2 LONG $0x14160FF3; BYTE $0xC6 // MOVSHDUP (SI)(AX*8), X2 -#define MOVSHDUP_16_XPTR_IDX_8__X4 LONG $0x64160FF3; WORD $0x10C6 // MOVSHDUP 16(SI)(AX*8), X4 -#define MOVSHDUP_32_XPTR_IDX_8__X6 LONG $0x74160FF3; WORD $0x20C6 // MOVSHDUP 32(SI)(AX*8), X6 -#define MOVSHDUP_48_XPTR_IDX_8__X8 LONG $0x160F44F3; WORD $0xC644; BYTE $0x30 // MOVSHDUP 48(SI)(AX*8), X8 - -#define MOVSHDUP_X3_X2 LONG $0xD3160FF3 // MOVSHDUP X3, X2 -#define MOVSLDUP_X3_X3 LONG $0xDB120FF3 // MOVSLDUP X3, X3 - -#define ADDSUBPS_X2_X3 LONG $0xDAD00FF2 // ADDSUBPS X2, X3 -#define ADDSUBPS_X4_X5 LONG $0xECD00FF2 // ADDSUBPS X4, X5 -#define ADDSUBPS_X6_X7 LONG $0xFED00FF2 // ADDSUBPS X6, X7 -#define ADDSUBPS_X8_X9 LONG $0xD00F45F2; BYTE $0xC8 // ADDSUBPS X8, X9 - -#define X_PTR SI -#define Y_PTR DI -#define LEN CX -#define TAIL BX -#define SUM X0 -#define P_SUM X1 -#define IDX AX -#define I_IDX DX -#define NEG1 X15 -#define P_NEG1 X14 - -// func DotuUnitary(x, y []complex64) (sum complex64) -TEXT ·DotuUnitary(SB), NOSPLIT, $0 - MOVQ x_base+0(FP), X_PTR // X_PTR = &x - MOVQ y_base+24(FP), Y_PTR // Y_PTR = &y - PXOR SUM, SUM // SUM = 0 - PXOR P_SUM, P_SUM // P_SUM = 0 - MOVQ x_len+8(FP), LEN // LEN = min( len(x), len(y) ) - CMPQ y_len+32(FP), LEN - CMOVQLE y_len+32(FP), LEN - CMPQ LEN, $0 // if LEN == 0 { return } - JE dotu_end - XORQ IDX, IDX // IDX = 0 - - MOVQ X_PTR, DX - ANDQ $15, DX // DX = &x & 15 - JZ dotu_aligned // if DX == 0 { goto dotu_aligned } - - MOVSD (X_PTR)(IDX*8), X3 // X_i = { imag(x[i]), real(x[i]) } - MOVSHDUP_X3_X2 // X_(i-1) = { imag(x[i]), imag(x[i]) } - MOVSLDUP_X3_X3 // X_i = { real(x[i]), real(x[i]) } - MOVSD (Y_PTR)(IDX*8), X10 // X_j = { imag(y[i]), real(y[i]) } - MULPS X10, X3 // X_i = { imag(y[i]) * real(x[i]), real(y[i]) * real(x[i]) } - SHUFPS $0x1, X10, X10 // X_j = { real(y[i]), imag(y[i]) } - MULPS X10, X2 // X_(i-1) = { real(y[i]) * imag(x[i]), imag(y[i]) * imag(x[i]) } - - // X_i = { - // imag(result[i]): imag(y[i])*real(x[i]) + real(y[i])*imag(x[i]), - // real(result[i]): real(y[i])*real(x[i]) - imag(y[i])*imag(x[i]) } - ADDSUBPS_X2_X3 - - MOVAPS X3, SUM // SUM = X_i - INCQ IDX // IDX++ - DECQ LEN // LEN-- - JZ dotu_end // if LEN == 0 { goto dotu_end } - -dotu_aligned: - MOVQ LEN, TAIL - ANDQ $7, TAIL // TAIL = LEN % 8 - SHRQ $3, LEN // LEN = floor( LEN / 8 ) - JZ dotu_tail // if LEN == 0 { goto dotu_tail } - PXOR P_SUM, P_SUM - -dotu_loop: // do { - MOVSLDUP_XPTR_IDX_8__X3 // X_i = { real(x[i]), real(x[i]), real(x[i+1]), real(x[i+1]) } - MOVSLDUP_16_XPTR_IDX_8__X5 - MOVSLDUP_32_XPTR_IDX_8__X7 - MOVSLDUP_48_XPTR_IDX_8__X9 - - MOVSHDUP_XPTR_IDX_8__X2 // X_(i-1) = { imag(x[i]), imag(x[i]), imag(x[i]+1), imag(x[i]+1) } - MOVSHDUP_16_XPTR_IDX_8__X4 - MOVSHDUP_32_XPTR_IDX_8__X6 - MOVSHDUP_48_XPTR_IDX_8__X8 - - // X_j = { imag(y[i]), real(y[i]), imag(y[i+1]), real(y[i+1]) } - MOVUPS (Y_PTR)(IDX*8), X10 - MOVUPS 16(Y_PTR)(IDX*8), X11 - MOVUPS 32(Y_PTR)(IDX*8), X12 - MOVUPS 48(Y_PTR)(IDX*8), X13 - - // X_i = { imag(y[i]) * real(x[i]), real(y[i]) * real(x[i]), - // imag(y[i+1]) * real(x[i+1]), real(y[i+1]) * real(x[i+1]) } - MULPS X10, X3 - MULPS X11, X5 - MULPS X12, X7 - MULPS X13, X9 - - // X_j = { real(y[i]), imag(y[i]), real(y[i+1]), imag(y[i+1]) } - SHUFPS $0xB1, X10, X10 - SHUFPS $0xB1, X11, X11 - SHUFPS $0xB1, X12, X12 - SHUFPS $0xB1, X13, X13 - - // X_(i-1) = { real(y[i]) * imag(x[i]), imag(y[i]) * imag(x[i]), - // real(y[i+1]) * imag(x[i+1]), imag(y[i+1]) * imag(x[i+1]) } - MULPS X10, X2 - MULPS X11, X4 - MULPS X12, X6 - MULPS X13, X8 - - // X_i = { - // imag(result[i]): imag(y[i]) * real(x[i]) + real(y[i]) * imag(x[i]), - // real(result[i]): real(y[i]) * real(x[i]) - imag(y[i]) * imag(x[i]), - // imag(result[i+1]): imag(y[i+1]) * real(x[i+1]) + real(y[i+1]) * imag(x[i+1]), - // real(result[i+1]): real(y[i+1]) * real(x[i+1]) - imag(y[i+1]) * imag(x[i+1]), - // } - ADDSUBPS_X2_X3 - ADDSUBPS_X4_X5 - ADDSUBPS_X6_X7 - ADDSUBPS_X8_X9 - - // SUM += X_i - ADDPS X3, SUM - ADDPS X5, P_SUM - ADDPS X7, SUM - ADDPS X9, P_SUM - - ADDQ $8, IDX // IDX += 8 - DECQ LEN - JNZ dotu_loop // } while --LEN > 0 - - ADDPS SUM, P_SUM // P_SUM = { P_SUM[1] + SUM[1], P_SUM[0] + SUM[0] } - XORPS SUM, SUM // SUM = 0 - - CMPQ TAIL, $0 // if TAIL == 0 { return } - JE dotu_end - -dotu_tail: - MOVQ TAIL, LEN - SHRQ $1, LEN // LEN = floor( LEN / 2 ) - JZ dotu_tail_one // if LEN == 0 { goto dotc_tail_one } - -dotu_tail_two: // do { - MOVSLDUP_XPTR_IDX_8__X3 // X_i = { real(x[i]), real(x[i]), real(x[i+1]), real(x[i+1]) } - MOVSHDUP_XPTR_IDX_8__X2 // X_(i-1) = { imag(x[i]), imag(x[i]), imag(x[i]+1), imag(x[i]+1) } - MOVUPS (Y_PTR)(IDX*8), X10 // X_j = { imag(y[i]), real(y[i]) } - MULPS X10, X3 // X_i = { imag(y[i]) * real(x[i]), real(y[i]) * real(x[i]) } - SHUFPS $0xB1, X10, X10 // X_j = { real(y[i]), imag(y[i]) } - MULPS X10, X2 // X_(i-1) = { real(y[i]) * imag(x[i]), imag(y[i]) * imag(x[i]) } - - // X_i = { - // imag(result[i]): imag(y[i])*real(x[i]) + real(y[i])*imag(x[i]), - // real(result[i]): real(y[i])*real(x[i]) - imag(y[i])*imag(x[i]) } - ADDSUBPS_X2_X3 - - ADDPS X3, SUM // SUM += X_i - - ADDQ $2, IDX // IDX += 2 - DECQ LEN - JNZ dotu_tail_two // } while --LEN > 0 - - ADDPS SUM, P_SUM // P_SUM = { P_SUM[1] + SUM[1], P_SUM[0] + SUM[0] } - XORPS SUM, SUM // SUM = 0 - - ANDQ $1, TAIL - JZ dotu_end - -dotu_tail_one: - MOVSD (X_PTR)(IDX*8), X3 // X_i = { imag(x[i]), real(x[i]) } - MOVSHDUP_X3_X2 // X_(i-1) = { imag(x[i]), imag(x[i]) } - MOVSLDUP_X3_X3 // X_i = { real(x[i]), real(x[i]) } - MOVSD (Y_PTR)(IDX*8), X10 // X_j = { imag(y[i]), real(y[i]) } - MULPS X10, X3 // X_i = { imag(y[i]) * real(x[i]), real(y[i]) * real(x[i]) } - SHUFPS $0x1, X10, X10 // X_j = { real(y[i]), imag(y[i]) } - MULPS X10, X2 // X_(i-1) = { real(y[i]) * imag(x[i]), imag(y[i]) * imag(x[i]) } - - // X_i = { - // imag(result[i]): imag(y[i])*real(x[i]) + real(y[i])*imag(x[i]), - // real(result[i]): real(y[i])*real(x[i]) - imag(y[i])*imag(x[i]) } - ADDSUBPS_X2_X3 - - ADDPS X3, SUM // SUM += X_i - -dotu_end: - ADDPS P_SUM, SUM // SUM = { P_SUM[0] + SUM[0] } - MOVHLPS P_SUM, P_SUM // P_SUM = { P_SUM[1], P_SUM[1] } - ADDPS P_SUM, SUM // SUM = { P_SUM[1] + SUM[0] } - -dotu_ret: - MOVSD SUM, sum+48(FP) // return SUM - RET diff --git a/vendor/gonum.org/v1/gonum/internal/asm/c64/scal.go b/vendor/gonum.org/v1/gonum/internal/asm/c64/scal.go deleted file mode 100644 index a84def8761..0000000000 --- a/vendor/gonum.org/v1/gonum/internal/asm/c64/scal.go +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright ©2016 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package c64 - -// ScalUnitary is -// for i := range x { -// x[i] *= alpha -// } -func ScalUnitary(alpha complex64, x []complex64) { - for i := range x { - x[i] *= alpha - } -} - -// ScalUnitaryTo is -// for i, v := range x { -// dst[i] = alpha * v -// } -func ScalUnitaryTo(dst []complex64, alpha complex64, x []complex64) { - for i, v := range x { - dst[i] = alpha * v - } -} - -// ScalInc is -// var ix uintptr -// for i := 0; i < int(n); i++ { -// x[ix] *= alpha -// ix += incX -// } -func ScalInc(alpha complex64, x []complex64, n, incX uintptr) { - var ix uintptr - for i := 0; i < int(n); i++ { - x[ix] *= alpha - ix += incX - } -} - -// ScalIncTo is -// var idst, ix uintptr -// for i := 0; i < int(n); i++ { -// dst[idst] = alpha * x[ix] -// ix += incX -// idst += incDst -// } -func ScalIncTo(dst []complex64, incDst uintptr, alpha complex64, x []complex64, n, incX uintptr) { - var idst, ix uintptr - for i := 0; i < int(n); i++ { - dst[idst] = alpha * x[ix] - ix += incX - idst += incDst - } -} - -// SscalUnitary is -// for i, v := range x { -// x[i] = complex(real(v)*alpha, imag(v)*alpha) -// } -func SscalUnitary(alpha float32, x []complex64) { - for i, v := range x { - x[i] = complex(real(v)*alpha, imag(v)*alpha) - } -} - -// SscalInc is -// var ix uintptr -// for i := 0; i < int(n); i++ { -// x[ix] = complex(real(x[ix])*alpha, imag(x[ix])*alpha) -// ix += inc -// } -func SscalInc(alpha float32, x []complex64, n, inc uintptr) { - var ix uintptr - for i := 0; i < int(n); i++ { - x[ix] = complex(real(x[ix])*alpha, imag(x[ix])*alpha) - ix += inc - } -} diff --git a/vendor/gonum.org/v1/gonum/internal/asm/c64/stubs_amd64.go b/vendor/gonum.org/v1/gonum/internal/asm/c64/stubs_amd64.go deleted file mode 100644 index 3e12d6bcd9..0000000000 --- a/vendor/gonum.org/v1/gonum/internal/asm/c64/stubs_amd64.go +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright ©2016 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build !noasm,!appengine,!safe - -package c64 - -// AxpyUnitary is -// for i, v := range x { -// y[i] += alpha * v -// } -func AxpyUnitary(alpha complex64, x, y []complex64) - -// AxpyUnitaryTo is -// for i, v := range x { -// dst[i] = alpha*v + y[i] -// } -func AxpyUnitaryTo(dst []complex64, alpha complex64, x, y []complex64) - -// AxpyInc is -// for i := 0; i < int(n); i++ { -// y[iy] += alpha * x[ix] -// ix += incX -// iy += incY -// } -func AxpyInc(alpha complex64, x, y []complex64, n, incX, incY, ix, iy uintptr) - -// AxpyIncTo is -// for i := 0; i < int(n); i++ { -// dst[idst] = alpha*x[ix] + y[iy] -// ix += incX -// iy += incY -// idst += incDst -// } -func AxpyIncTo(dst []complex64, incDst, idst uintptr, alpha complex64, x, y []complex64, n, incX, incY, ix, iy uintptr) - -// DotcUnitary is -// for i, v := range x { -// sum += y[i] * conj(v) -// } -// return sum -func DotcUnitary(x, y []complex64) (sum complex64) - -// DotcInc is -// for i := 0; i < int(n); i++ { -// sum += y[iy] * conj(x[ix]) -// ix += incX -// iy += incY -// } -// return sum -func DotcInc(x, y []complex64, n, incX, incY, ix, iy uintptr) (sum complex64) - -// DotuUnitary is -// for i, v := range x { -// sum += y[i] * v -// } -// return sum -func DotuUnitary(x, y []complex64) (sum complex64) - -// DotuInc is -// for i := 0; i < int(n); i++ { -// sum += y[iy] * x[ix] -// ix += incX -// iy += incY -// } -// return sum -func DotuInc(x, y []complex64, n, incX, incY, ix, iy uintptr) (sum complex64) diff --git a/vendor/gonum.org/v1/gonum/internal/asm/c64/stubs_noasm.go b/vendor/gonum.org/v1/gonum/internal/asm/c64/stubs_noasm.go deleted file mode 100644 index 411afcb2a0..0000000000 --- a/vendor/gonum.org/v1/gonum/internal/asm/c64/stubs_noasm.go +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright ©2016 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build !amd64 noasm appengine safe - -package c64 - -// AxpyUnitary is -// for i, v := range x { -// y[i] += alpha * v -// } -func AxpyUnitary(alpha complex64, x, y []complex64) { - for i, v := range x { - y[i] += alpha * v - } -} - -// AxpyUnitaryTo is -// for i, v := range x { -// dst[i] = alpha*v + y[i] -// } -func AxpyUnitaryTo(dst []complex64, alpha complex64, x, y []complex64) { - for i, v := range x { - dst[i] = alpha*v + y[i] - } -} - -// AxpyInc is -// for i := 0; i < int(n); i++ { -// y[iy] += alpha * x[ix] -// ix += incX -// iy += incY -// } -func AxpyInc(alpha complex64, x, y []complex64, n, incX, incY, ix, iy uintptr) { - for i := 0; i < int(n); i++ { - y[iy] += alpha * x[ix] - ix += incX - iy += incY - } -} - -// AxpyIncTo is -// for i := 0; i < int(n); i++ { -// dst[idst] = alpha*x[ix] + y[iy] -// ix += incX -// iy += incY -// idst += incDst -// } -func AxpyIncTo(dst []complex64, incDst, idst uintptr, alpha complex64, x, y []complex64, n, incX, incY, ix, iy uintptr) { - for i := 0; i < int(n); i++ { - dst[idst] = alpha*x[ix] + y[iy] - ix += incX - iy += incY - idst += incDst - } -} - -// DotcUnitary is -// for i, v := range x { -// sum += y[i] * conj(v) -// } -// return sum -func DotcUnitary(x, y []complex64) (sum complex64) { - for i, v := range x { - sum += y[i] * conj(v) - } - return sum -} - -// DotcInc is -// for i := 0; i < int(n); i++ { -// sum += y[iy] * conj(x[ix]) -// ix += incX -// iy += incY -// } -// return sum -func DotcInc(x, y []complex64, n, incX, incY, ix, iy uintptr) (sum complex64) { - for i := 0; i < int(n); i++ { - sum += y[iy] * conj(x[ix]) - ix += incX - iy += incY - } - return sum -} - -// DotuUnitary is -// for i, v := range x { -// sum += y[i] * v -// } -// return sum -func DotuUnitary(x, y []complex64) (sum complex64) { - for i, v := range x { - sum += y[i] * v - } - return sum -} - -// DotuInc is -// for i := 0; i < int(n); i++ { -// sum += y[iy] * x[ix] -// ix += incX -// iy += incY -// } -// return sum -func DotuInc(x, y []complex64, n, incX, incY, ix, iy uintptr) (sum complex64) { - for i := 0; i < int(n); i++ { - sum += y[iy] * x[ix] - ix += incX - iy += incY - } - return sum -} diff --git a/vendor/gonum.org/v1/gonum/internal/asm/f32/axpyinc_amd64.s b/vendor/gonum.org/v1/gonum/internal/asm/f32/axpyinc_amd64.s deleted file mode 100644 index 2d167c08f3..0000000000 --- a/vendor/gonum.org/v1/gonum/internal/asm/f32/axpyinc_amd64.s +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright ©2016 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//+build !noasm,!appengine,!safe - -#include "textflag.h" - -// func AxpyInc(alpha float32, x, y []float32, n, incX, incY, ix, iy uintptr) -TEXT ·AxpyInc(SB), NOSPLIT, $0 - MOVQ n+56(FP), CX // CX = n - CMPQ CX, $0 // if n==0 { return } - JLE axpyi_end - MOVQ x_base+8(FP), SI // SI = &x - MOVQ y_base+32(FP), DI // DI = &y - MOVQ ix+80(FP), R8 // R8 = ix - MOVQ iy+88(FP), R9 // R9 = iy - LEAQ (SI)(R8*4), SI // SI = &(x[ix]) - LEAQ (DI)(R9*4), DI // DI = &(y[iy]) - MOVQ DI, DX // DX = DI Read Pointer for y - MOVQ incX+64(FP), R8 // R8 = incX - SHLQ $2, R8 // R8 *= sizeof(float32) - MOVQ incY+72(FP), R9 // R9 = incY - SHLQ $2, R9 // R9 *= sizeof(float32) - MOVSS alpha+0(FP), X0 // X0 = alpha - MOVSS X0, X1 // X1 = X0 // for pipelining - MOVQ CX, BX - ANDQ $3, BX // BX = n % 4 - SHRQ $2, CX // CX = floor( n / 4 ) - JZ axpyi_tail_start // if CX == 0 { goto axpyi_tail_start } - -axpyi_loop: // Loop unrolled 4x do { - MOVSS (SI), X2 // X_i = x[i] - MOVSS (SI)(R8*1), X3 - LEAQ (SI)(R8*2), SI // SI = &(SI[incX*2]) - MOVSS (SI), X4 - MOVSS (SI)(R8*1), X5 - MULSS X1, X2 // X_i *= a - MULSS X0, X3 - MULSS X1, X4 - MULSS X0, X5 - ADDSS (DX), X2 // X_i += y[i] - ADDSS (DX)(R9*1), X3 - LEAQ (DX)(R9*2), DX // DX = &(DX[incY*2]) - ADDSS (DX), X4 - ADDSS (DX)(R9*1), X5 - MOVSS X2, (DI) // y[i] = X_i - MOVSS X3, (DI)(R9*1) - LEAQ (DI)(R9*2), DI // DI = &(DI[incY*2]) - MOVSS X4, (DI) - MOVSS X5, (DI)(R9*1) - LEAQ (SI)(R8*2), SI // SI = &(SI[incX*2]) // Increment addresses - LEAQ (DX)(R9*2), DX // DX = &(DX[incY*2]) - LEAQ (DI)(R9*2), DI // DI = &(DI[incY*2]) - LOOP axpyi_loop // } while --CX > 0 - CMPQ BX, $0 // if BX == 0 { return } - JE axpyi_end - -axpyi_tail_start: // Reset loop registers - MOVQ BX, CX // Loop counter: CX = BX - -axpyi_tail: // do { - MOVSS (SI), X2 // X2 = x[i] - MULSS X1, X2 // X2 *= a - ADDSS (DI), X2 // X2 += y[i] - MOVSS X2, (DI) // y[i] = X2 - ADDQ R8, SI // SI = &(SI[incX]) - ADDQ R9, DI // DI = &(DI[incY]) - LOOP axpyi_tail // } while --CX > 0 - -axpyi_end: - RET - diff --git a/vendor/gonum.org/v1/gonum/internal/asm/f32/axpyincto_amd64.s b/vendor/gonum.org/v1/gonum/internal/asm/f32/axpyincto_amd64.s deleted file mode 100644 index b79f9926c9..0000000000 --- a/vendor/gonum.org/v1/gonum/internal/asm/f32/axpyincto_amd64.s +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright ©2016 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//+build !noasm,!appengine,!safe - -#include "textflag.h" - -// func AxpyIncTo(dst []float32, incDst, idst uintptr, alpha float32, x, y []float32, n, incX, incY, ix, iy uintptr) -TEXT ·AxpyIncTo(SB), NOSPLIT, $0 - MOVQ n+96(FP), CX // CX = n - CMPQ CX, $0 // if n==0 { return } - JLE axpyi_end - MOVQ dst_base+0(FP), DI // DI = &dst - MOVQ x_base+48(FP), SI // SI = &x - MOVQ y_base+72(FP), DX // DX = &y - MOVQ ix+120(FP), R8 // R8 = ix // Load the first index - MOVQ iy+128(FP), R9 // R9 = iy - MOVQ idst+32(FP), R10 // R10 = idst - LEAQ (SI)(R8*4), SI // SI = &(x[ix]) - LEAQ (DX)(R9*4), DX // DX = &(y[iy]) - LEAQ (DI)(R10*4), DI // DI = &(dst[idst]) - MOVQ incX+104(FP), R8 // R8 = incX - SHLQ $2, R8 // R8 *= sizeof(float32) - MOVQ incY+112(FP), R9 // R9 = incY - SHLQ $2, R9 // R9 *= sizeof(float32) - MOVQ incDst+24(FP), R10 // R10 = incDst - SHLQ $2, R10 // R10 *= sizeof(float32) - MOVSS alpha+40(FP), X0 // X0 = alpha - MOVSS X0, X1 // X1 = X0 // for pipelining - MOVQ CX, BX - ANDQ $3, BX // BX = n % 4 - SHRQ $2, CX // CX = floor( n / 4 ) - JZ axpyi_tail_start // if CX == 0 { goto axpyi_tail_start } - -axpyi_loop: // Loop unrolled 4x do { - MOVSS (SI), X2 // X_i = x[i] - MOVSS (SI)(R8*1), X3 - LEAQ (SI)(R8*2), SI // SI = &(SI[incX*2]) - MOVSS (SI), X4 - MOVSS (SI)(R8*1), X5 - MULSS X1, X2 // X_i *= a - MULSS X0, X3 - MULSS X1, X4 - MULSS X0, X5 - ADDSS (DX), X2 // X_i += y[i] - ADDSS (DX)(R9*1), X3 - LEAQ (DX)(R9*2), DX // DX = &(DX[incY*2]) - ADDSS (DX), X4 - ADDSS (DX)(R9*1), X5 - MOVSS X2, (DI) // dst[i] = X_i - MOVSS X3, (DI)(R10*1) - LEAQ (DI)(R10*2), DI // DI = &(DI[incDst*2]) - MOVSS X4, (DI) - MOVSS X5, (DI)(R10*1) - LEAQ (SI)(R8*2), SI // SI = &(SI[incX*2]) // Increment addresses - LEAQ (DX)(R9*2), DX // DX = &(DX[incY*2]) - LEAQ (DI)(R10*2), DI // DI = &(DI[incDst*2]) - LOOP axpyi_loop // } while --CX > 0 - CMPQ BX, $0 // if BX == 0 { return } - JE axpyi_end - -axpyi_tail_start: // Reset loop registers - MOVQ BX, CX // Loop counter: CX = BX - -axpyi_tail: // do { - MOVSS (SI), X2 // X2 = x[i] - MULSS X1, X2 // X2 *= a - ADDSS (DX), X2 // X2 += y[i] - MOVSS X2, (DI) // dst[i] = X2 - ADDQ R8, SI // SI = &(SI[incX]) - ADDQ R9, DX // DX = &(DX[incY]) - ADDQ R10, DI // DI = &(DI[incY]) - LOOP axpyi_tail // } while --CX > 0 - -axpyi_end: - RET - diff --git a/vendor/gonum.org/v1/gonum/internal/asm/f32/axpyunitary_amd64.s b/vendor/gonum.org/v1/gonum/internal/asm/f32/axpyunitary_amd64.s deleted file mode 100644 index 97df90a07f..0000000000 --- a/vendor/gonum.org/v1/gonum/internal/asm/f32/axpyunitary_amd64.s +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright ©2016 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//+build !noasm,!appengine,!safe - -#include "textflag.h" - -// func AxpyUnitary(alpha float32, x, y []float32) -TEXT ·AxpyUnitary(SB), NOSPLIT, $0 - MOVQ x_base+8(FP), SI // SI = &x - MOVQ y_base+32(FP), DI // DI = &y - MOVQ x_len+16(FP), BX // BX = min( len(x), len(y) ) - CMPQ y_len+40(FP), BX - CMOVQLE y_len+40(FP), BX - CMPQ BX, $0 // if BX == 0 { return } - JE axpy_end - MOVSS alpha+0(FP), X0 - SHUFPS $0, X0, X0 // X0 = { a, a, a, a } - XORQ AX, AX // i = 0 - PXOR X2, X2 // 2 NOP instructions (PXOR) to align - PXOR X3, X3 // loop to cache line - MOVQ DI, CX - ANDQ $0xF, CX // Align on 16-byte boundary for ADDPS - JZ axpy_no_trim // if CX == 0 { goto axpy_no_trim } - - XORQ $0xF, CX // CX = 4 - floor( BX % 16 / 4 ) - INCQ CX - SHRQ $2, CX - -axpy_align: // Trim first value(s) in unaligned buffer do { - MOVSS (SI)(AX*4), X2 // X2 = x[i] - MULSS X0, X2 // X2 *= a - ADDSS (DI)(AX*4), X2 // X2 += y[i] - MOVSS X2, (DI)(AX*4) // y[i] = X2 - INCQ AX // i++ - DECQ BX - JZ axpy_end // if --BX == 0 { return } - LOOP axpy_align // } while --CX > 0 - -axpy_no_trim: - MOVUPS X0, X1 // Copy X0 to X1 for pipelining - MOVQ BX, CX - ANDQ $0xF, BX // BX = len % 16 - SHRQ $4, CX // CX = int( len / 16 ) - JZ axpy_tail4_start // if CX == 0 { return } - -axpy_loop: // Loop unrolled 16x do { - MOVUPS (SI)(AX*4), X2 // X2 = x[i:i+4] - MOVUPS 16(SI)(AX*4), X3 - MOVUPS 32(SI)(AX*4), X4 - MOVUPS 48(SI)(AX*4), X5 - MULPS X0, X2 // X2 *= a - MULPS X1, X3 - MULPS X0, X4 - MULPS X1, X5 - ADDPS (DI)(AX*4), X2 // X2 += y[i:i+4] - ADDPS 16(DI)(AX*4), X3 - ADDPS 32(DI)(AX*4), X4 - ADDPS 48(DI)(AX*4), X5 - MOVUPS X2, (DI)(AX*4) // dst[i:i+4] = X2 - MOVUPS X3, 16(DI)(AX*4) - MOVUPS X4, 32(DI)(AX*4) - MOVUPS X5, 48(DI)(AX*4) - ADDQ $16, AX // i += 16 - LOOP axpy_loop // while (--CX) > 0 - CMPQ BX, $0 // if BX == 0 { return } - JE axpy_end - -axpy_tail4_start: // Reset loop counter for 4-wide tail loop - MOVQ BX, CX // CX = floor( BX / 4 ) - SHRQ $2, CX - JZ axpy_tail_start // if CX == 0 { goto axpy_tail_start } - -axpy_tail4: // Loop unrolled 4x do { - MOVUPS (SI)(AX*4), X2 // X2 = x[i] - MULPS X0, X2 // X2 *= a - ADDPS (DI)(AX*4), X2 // X2 += y[i] - MOVUPS X2, (DI)(AX*4) // y[i] = X2 - ADDQ $4, AX // i += 4 - LOOP axpy_tail4 // } while --CX > 0 - -axpy_tail_start: // Reset loop counter for 1-wide tail loop - MOVQ BX, CX // CX = BX % 4 - ANDQ $3, CX - JZ axpy_end // if CX == 0 { return } - -axpy_tail: - MOVSS (SI)(AX*4), X1 // X1 = x[i] - MULSS X0, X1 // X1 *= a - ADDSS (DI)(AX*4), X1 // X1 += y[i] - MOVSS X1, (DI)(AX*4) // y[i] = X1 - INCQ AX // i++ - LOOP axpy_tail // } while --CX > 0 - -axpy_end: - RET diff --git a/vendor/gonum.org/v1/gonum/internal/asm/f32/axpyunitaryto_amd64.s b/vendor/gonum.org/v1/gonum/internal/asm/f32/axpyunitaryto_amd64.s deleted file mode 100644 index a826ca3125..0000000000 --- a/vendor/gonum.org/v1/gonum/internal/asm/f32/axpyunitaryto_amd64.s +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright ©2016 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//+build !noasm,!appengine,!safe - -#include "textflag.h" - -// func AxpyUnitaryTo(dst []float32, alpha float32, x, y []float32) -TEXT ·AxpyUnitaryTo(SB), NOSPLIT, $0 - MOVQ dst_base+0(FP), DI // DI = &dst - MOVQ x_base+32(FP), SI // SI = &x - MOVQ y_base+56(FP), DX // DX = &y - MOVQ x_len+40(FP), BX // BX = min( len(x), len(y), len(dst) ) - CMPQ y_len+64(FP), BX - CMOVQLE y_len+64(FP), BX - CMPQ dst_len+8(FP), BX - CMOVQLE dst_len+8(FP), BX - CMPQ BX, $0 // if BX == 0 { return } - JE axpy_end - MOVSS alpha+24(FP), X0 - SHUFPS $0, X0, X0 // X0 = { a, a, a, a, } - XORQ AX, AX // i = 0 - MOVQ DX, CX - ANDQ $0xF, CX // Align on 16-byte boundary for ADDPS - JZ axpy_no_trim // if CX == 0 { goto axpy_no_trim } - - XORQ $0xF, CX // CX = 4 - floor ( B % 16 / 4 ) - INCQ CX - SHRQ $2, CX - -axpy_align: // Trim first value(s) in unaligned buffer do { - MOVSS (SI)(AX*4), X2 // X2 = x[i] - MULSS X0, X2 // X2 *= a - ADDSS (DX)(AX*4), X2 // X2 += y[i] - MOVSS X2, (DI)(AX*4) // y[i] = X2 - INCQ AX // i++ - DECQ BX - JZ axpy_end // if --BX == 0 { return } - LOOP axpy_align // } while --CX > 0 - -axpy_no_trim: - MOVUPS X0, X1 // Copy X0 to X1 for pipelining - MOVQ BX, CX - ANDQ $0xF, BX // BX = len % 16 - SHRQ $4, CX // CX = floor( len / 16 ) - JZ axpy_tail4_start // if CX == 0 { return } - -axpy_loop: // Loop unrolled 16x do { - MOVUPS (SI)(AX*4), X2 // X2 = x[i:i+4] - MOVUPS 16(SI)(AX*4), X3 - MOVUPS 32(SI)(AX*4), X4 - MOVUPS 48(SI)(AX*4), X5 - MULPS X0, X2 // X2 *= a - MULPS X1, X3 - MULPS X0, X4 - MULPS X1, X5 - ADDPS (DX)(AX*4), X2 // X2 += y[i:i+4] - ADDPS 16(DX)(AX*4), X3 - ADDPS 32(DX)(AX*4), X4 - ADDPS 48(DX)(AX*4), X5 - MOVUPS X2, (DI)(AX*4) // dst[i:i+4] = X2 - MOVUPS X3, 16(DI)(AX*4) - MOVUPS X4, 32(DI)(AX*4) - MOVUPS X5, 48(DI)(AX*4) - ADDQ $16, AX // i += 16 - LOOP axpy_loop // while (--CX) > 0 - CMPQ BX, $0 // if BX == 0 { return } - JE axpy_end - -axpy_tail4_start: // Reset loop counter for 4-wide tail loop - MOVQ BX, CX // CX = floor( BX / 4 ) - SHRQ $2, CX - JZ axpy_tail_start // if CX == 0 { goto axpy_tail_start } - -axpy_tail4: // Loop unrolled 4x do { - MOVUPS (SI)(AX*4), X2 // X2 = x[i] - MULPS X0, X2 // X2 *= a - ADDPS (DX)(AX*4), X2 // X2 += y[i] - MOVUPS X2, (DI)(AX*4) // y[i] = X2 - ADDQ $4, AX // i += 4 - LOOP axpy_tail4 // } while --CX > 0 - -axpy_tail_start: // Reset loop counter for 1-wide tail loop - MOVQ BX, CX // CX = BX % 4 - ANDQ $3, CX - JZ axpy_end // if CX == 0 { return } - -axpy_tail: - MOVSS (SI)(AX*4), X1 // X1 = x[i] - MULSS X0, X1 // X1 *= a - ADDSS (DX)(AX*4), X1 // X1 += y[i] - MOVSS X1, (DI)(AX*4) // y[i] = X1 - INCQ AX // i++ - LOOP axpy_tail // } while --CX > 0 - -axpy_end: - RET diff --git a/vendor/gonum.org/v1/gonum/internal/asm/f32/ddotinc_amd64.s b/vendor/gonum.org/v1/gonum/internal/asm/f32/ddotinc_amd64.s deleted file mode 100644 index 4518e04952..0000000000 --- a/vendor/gonum.org/v1/gonum/internal/asm/f32/ddotinc_amd64.s +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright ©2017 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//+build !noasm,!appengine,!safe - -#include "textflag.h" - -#define X_PTR SI -#define Y_PTR DI -#define LEN CX -#define TAIL BX -#define INC_X R8 -#define INCx3_X R10 -#define INC_Y R9 -#define INCx3_Y R11 -#define SUM X0 -#define P_SUM X1 - -// func DdotInc(x, y []float32, n, incX, incY, ix, iy uintptr) (sum float64) -TEXT ·DdotInc(SB), NOSPLIT, $0 - MOVQ x_base+0(FP), X_PTR // X_PTR = &x - MOVQ y_base+24(FP), Y_PTR // Y_PTR = &y - MOVQ n+48(FP), LEN // LEN = n - PXOR SUM, SUM // SUM = 0 - CMPQ LEN, $0 - JE dot_end - - MOVQ ix+72(FP), INC_X // INC_X = ix - MOVQ iy+80(FP), INC_Y // INC_Y = iy - LEAQ (X_PTR)(INC_X*4), X_PTR // X_PTR = &(x[ix]) - LEAQ (Y_PTR)(INC_Y*4), Y_PTR // Y_PTR = &(y[iy]) - - MOVQ incX+56(FP), INC_X // INC_X = incX * sizeof(float32) - SHLQ $2, INC_X - MOVQ incY+64(FP), INC_Y // INC_Y = incY * sizeof(float32) - SHLQ $2, INC_Y - - MOVQ LEN, TAIL - ANDQ $3, TAIL // TAIL = LEN % 4 - SHRQ $2, LEN // LEN = floor( LEN / 4 ) - JZ dot_tail // if LEN == 0 { goto dot_tail } - - PXOR P_SUM, P_SUM // P_SUM = 0 for pipelining - LEAQ (INC_X)(INC_X*2), INCx3_X // INCx3_X = INC_X * 3 - LEAQ (INC_Y)(INC_Y*2), INCx3_Y // INCx3_Y = INC_Y * 3 - -dot_loop: // Loop unrolled 4x do { - CVTSS2SD (X_PTR), X2 // X_i = x[i:i+1] - CVTSS2SD (X_PTR)(INC_X*1), X3 - CVTSS2SD (X_PTR)(INC_X*2), X4 - CVTSS2SD (X_PTR)(INCx3_X*1), X5 - - CVTSS2SD (Y_PTR), X6 // X_j = y[i:i+1] - CVTSS2SD (Y_PTR)(INC_Y*1), X7 - CVTSS2SD (Y_PTR)(INC_Y*2), X8 - CVTSS2SD (Y_PTR)(INCx3_Y*1), X9 - - MULSD X6, X2 // X_i *= X_j - MULSD X7, X3 - MULSD X8, X4 - MULSD X9, X5 - - ADDSD X2, SUM // SUM += X_i - ADDSD X3, P_SUM - ADDSD X4, SUM - ADDSD X5, P_SUM - - LEAQ (X_PTR)(INC_X*4), X_PTR // X_PTR = &(X_PTR[INC_X * 4]) - LEAQ (Y_PTR)(INC_Y*4), Y_PTR // Y_PTR = &(Y_PTR[INC_Y * 4]) - - DECQ LEN - JNZ dot_loop // } while --LEN > 0 - - ADDSD P_SUM, SUM // SUM += P_SUM - CMPQ TAIL, $0 // if TAIL == 0 { return } - JE dot_end - -dot_tail: // do { - CVTSS2SD (X_PTR), X2 // X2 = x[i] - CVTSS2SD (Y_PTR), X3 // X2 *= y[i] - MULSD X3, X2 - ADDSD X2, SUM // SUM += X2 - ADDQ INC_X, X_PTR // X_PTR += INC_X - ADDQ INC_Y, Y_PTR // Y_PTR += INC_Y - DECQ TAIL - JNZ dot_tail // } while --TAIL > 0 - -dot_end: - MOVSD SUM, sum+88(FP) // return SUM - RET diff --git a/vendor/gonum.org/v1/gonum/internal/asm/f32/ddotunitary_amd64.s b/vendor/gonum.org/v1/gonum/internal/asm/f32/ddotunitary_amd64.s deleted file mode 100644 index 231cbd3bfb..0000000000 --- a/vendor/gonum.org/v1/gonum/internal/asm/f32/ddotunitary_amd64.s +++ /dev/null @@ -1,110 +0,0 @@ -// Copyright ©2017 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//+build !noasm,!appengine,!safe - -#include "textflag.h" - -#define HADDPD_SUM_SUM LONG $0xC07C0F66 // @ HADDPD X0, X0 - -#define X_PTR SI -#define Y_PTR DI -#define LEN CX -#define TAIL BX -#define IDX AX -#define SUM X0 -#define P_SUM X1 - -// func DdotUnitary(x, y []float32) (sum float32) -TEXT ·DdotUnitary(SB), NOSPLIT, $0 - MOVQ x_base+0(FP), X_PTR // X_PTR = &x - MOVQ y_base+24(FP), Y_PTR // Y_PTR = &y - MOVQ x_len+8(FP), LEN // LEN = min( len(x), len(y) ) - CMPQ y_len+32(FP), LEN - CMOVQLE y_len+32(FP), LEN - PXOR SUM, SUM // psum = 0 - CMPQ LEN, $0 - JE dot_end - - XORQ IDX, IDX - MOVQ Y_PTR, DX - ANDQ $0xF, DX // Align on 16-byte boundary for ADDPS - JZ dot_no_trim // if DX == 0 { goto dot_no_trim } - - SUBQ $16, DX - -dot_align: // Trim first value(s) in unaligned buffer do { - CVTSS2SD (X_PTR)(IDX*4), X2 // X2 = float64(x[i]) - CVTSS2SD (Y_PTR)(IDX*4), X3 // X3 = float64(y[i]) - MULSD X3, X2 - ADDSD X2, SUM // SUM += X2 - INCQ IDX // IDX++ - DECQ LEN - JZ dot_end // if --TAIL == 0 { return } - ADDQ $4, DX - JNZ dot_align // } while --LEN > 0 - -dot_no_trim: - PXOR P_SUM, P_SUM // P_SUM = 0 for pipelining - MOVQ LEN, TAIL - ANDQ $0x7, TAIL // TAIL = LEN % 8 - SHRQ $3, LEN // LEN = floor( LEN / 8 ) - JZ dot_tail_start // if LEN == 0 { goto dot_tail_start } - -dot_loop: // Loop unrolled 8x do { - CVTPS2PD (X_PTR)(IDX*4), X2 // X_i = x[i:i+1] - CVTPS2PD 8(X_PTR)(IDX*4), X3 - CVTPS2PD 16(X_PTR)(IDX*4), X4 - CVTPS2PD 24(X_PTR)(IDX*4), X5 - - CVTPS2PD (Y_PTR)(IDX*4), X6 // X_j = y[i:i+1] - CVTPS2PD 8(Y_PTR)(IDX*4), X7 - CVTPS2PD 16(Y_PTR)(IDX*4), X8 - CVTPS2PD 24(Y_PTR)(IDX*4), X9 - - MULPD X6, X2 // X_i *= X_j - MULPD X7, X3 - MULPD X8, X4 - MULPD X9, X5 - - ADDPD X2, SUM // SUM += X_i - ADDPD X3, P_SUM - ADDPD X4, SUM - ADDPD X5, P_SUM - - ADDQ $8, IDX // IDX += 8 - DECQ LEN - JNZ dot_loop // } while --LEN > 0 - - ADDPD P_SUM, SUM // SUM += P_SUM - CMPQ TAIL, $0 // if TAIL == 0 { return } - JE dot_end - -dot_tail_start: - MOVQ TAIL, LEN - SHRQ $1, LEN - JZ dot_tail_one - -dot_tail_two: - CVTPS2PD (X_PTR)(IDX*4), X2 // X_i = x[i:i+1] - CVTPS2PD (Y_PTR)(IDX*4), X6 // X_j = y[i:i+1] - MULPD X6, X2 // X_i *= X_j - ADDPD X2, SUM // SUM += X_i - ADDQ $2, IDX // IDX += 2 - DECQ LEN - JNZ dot_tail_two // } while --LEN > 0 - - ANDQ $1, TAIL - JZ dot_end - -dot_tail_one: - CVTSS2SD (X_PTR)(IDX*4), X2 // X2 = float64(x[i]) - CVTSS2SD (Y_PTR)(IDX*4), X3 // X3 = float64(y[i]) - MULSD X3, X2 // X2 *= X3 - ADDSD X2, SUM // SUM += X2 - -dot_end: - HADDPD_SUM_SUM // SUM = \sum{ SUM[i] } - MOVSD SUM, sum+48(FP) // return SUM - RET diff --git a/vendor/gonum.org/v1/gonum/internal/asm/f32/doc.go b/vendor/gonum.org/v1/gonum/internal/asm/f32/doc.go deleted file mode 100644 index 408847a698..0000000000 --- a/vendor/gonum.org/v1/gonum/internal/asm/f32/doc.go +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright ©2017 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package f32 provides float32 vector primitives. -package f32 // import "gonum.org/v1/gonum/internal/asm/f32" diff --git a/vendor/gonum.org/v1/gonum/internal/asm/f32/dotinc_amd64.s b/vendor/gonum.org/v1/gonum/internal/asm/f32/dotinc_amd64.s deleted file mode 100644 index 4d36b289c6..0000000000 --- a/vendor/gonum.org/v1/gonum/internal/asm/f32/dotinc_amd64.s +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright ©2017 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//+build !noasm,!appengine,!safe - -#include "textflag.h" - -#define X_PTR SI -#define Y_PTR DI -#define LEN CX -#define TAIL BX -#define INC_X R8 -#define INCx3_X R10 -#define INC_Y R9 -#define INCx3_Y R11 -#define SUM X0 -#define P_SUM X1 - -// func DotInc(x, y []float32, n, incX, incY, ix, iy uintptr) (sum float32) -TEXT ·DotInc(SB), NOSPLIT, $0 - MOVQ x_base+0(FP), X_PTR // X_PTR = &x - MOVQ y_base+24(FP), Y_PTR // Y_PTR = &y - PXOR SUM, SUM // SUM = 0 - MOVQ n+48(FP), LEN // LEN = n - CMPQ LEN, $0 - JE dot_end - - MOVQ ix+72(FP), INC_X // INC_X = ix - MOVQ iy+80(FP), INC_Y // INC_Y = iy - LEAQ (X_PTR)(INC_X*4), X_PTR // X_PTR = &(x[ix]) - LEAQ (Y_PTR)(INC_Y*4), Y_PTR // Y_PTR = &(y[iy]) - - MOVQ incX+56(FP), INC_X // INC_X := incX * sizeof(float32) - SHLQ $2, INC_X - MOVQ incY+64(FP), INC_Y // INC_Y := incY * sizeof(float32) - SHLQ $2, INC_Y - - MOVQ LEN, TAIL - ANDQ $0x3, TAIL // TAIL = LEN % 4 - SHRQ $2, LEN // LEN = floor( LEN / 4 ) - JZ dot_tail // if LEN == 0 { goto dot_tail } - - PXOR P_SUM, P_SUM // P_SUM = 0 for pipelining - LEAQ (INC_X)(INC_X*2), INCx3_X // INCx3_X = INC_X * 3 - LEAQ (INC_Y)(INC_Y*2), INCx3_Y // INCx3_Y = INC_Y * 3 - -dot_loop: // Loop unrolled 4x do { - MOVSS (X_PTR), X2 // X_i = x[i:i+1] - MOVSS (X_PTR)(INC_X*1), X3 - MOVSS (X_PTR)(INC_X*2), X4 - MOVSS (X_PTR)(INCx3_X*1), X5 - - MULSS (Y_PTR), X2 // X_i *= y[i:i+1] - MULSS (Y_PTR)(INC_Y*1), X3 - MULSS (Y_PTR)(INC_Y*2), X4 - MULSS (Y_PTR)(INCx3_Y*1), X5 - - ADDSS X2, SUM // SUM += X_i - ADDSS X3, P_SUM - ADDSS X4, SUM - ADDSS X5, P_SUM - - LEAQ (X_PTR)(INC_X*4), X_PTR // X_PTR = &(X_PTR[INC_X * 4]) - LEAQ (Y_PTR)(INC_Y*4), Y_PTR // Y_PTR = &(Y_PTR[INC_Y * 4]) - - DECQ LEN - JNZ dot_loop // } while --LEN > 0 - - ADDSS P_SUM, SUM // P_SUM += SUM - CMPQ TAIL, $0 // if TAIL == 0 { return } - JE dot_end - -dot_tail: // do { - MOVSS (X_PTR), X2 // X2 = x[i] - MULSS (Y_PTR), X2 // X2 *= y[i] - ADDSS X2, SUM // SUM += X2 - ADDQ INC_X, X_PTR // X_PTR += INC_X - ADDQ INC_Y, Y_PTR // Y_PTR += INC_Y - DECQ TAIL - JNZ dot_tail // } while --TAIL > 0 - -dot_end: - MOVSS SUM, sum+88(FP) // return SUM - RET diff --git a/vendor/gonum.org/v1/gonum/internal/asm/f32/dotunitary_amd64.s b/vendor/gonum.org/v1/gonum/internal/asm/f32/dotunitary_amd64.s deleted file mode 100644 index c32ede5a93..0000000000 --- a/vendor/gonum.org/v1/gonum/internal/asm/f32/dotunitary_amd64.s +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright ©2017 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//+build !noasm,!appengine,!safe - -#include "textflag.h" - -#define HADDPS_SUM_SUM LONG $0xC07C0FF2 // @ HADDPS X0, X0 - -#define X_PTR SI -#define Y_PTR DI -#define LEN CX -#define TAIL BX -#define IDX AX -#define SUM X0 -#define P_SUM X1 - -// func DotUnitary(x, y []float32) (sum float32) -TEXT ·DotUnitary(SB), NOSPLIT, $0 - MOVQ x_base+0(FP), X_PTR // X_PTR = &x - MOVQ y_base+24(FP), Y_PTR // Y_PTR = &y - PXOR SUM, SUM // SUM = 0 - MOVQ x_len+8(FP), LEN // LEN = min( len(x), len(y) ) - CMPQ y_len+32(FP), LEN - CMOVQLE y_len+32(FP), LEN - CMPQ LEN, $0 - JE dot_end - - XORQ IDX, IDX - MOVQ Y_PTR, DX - ANDQ $0xF, DX // Align on 16-byte boundary for MULPS - JZ dot_no_trim // if DX == 0 { goto dot_no_trim } - SUBQ $16, DX - -dot_align: // Trim first value(s) in unaligned buffer do { - MOVSS (X_PTR)(IDX*4), X2 // X2 = x[i] - MULSS (Y_PTR)(IDX*4), X2 // X2 *= y[i] - ADDSS X2, SUM // SUM += X2 - INCQ IDX // IDX++ - DECQ LEN - JZ dot_end // if --TAIL == 0 { return } - ADDQ $4, DX - JNZ dot_align // } while --DX > 0 - -dot_no_trim: - PXOR P_SUM, P_SUM // P_SUM = 0 for pipelining - MOVQ LEN, TAIL - ANDQ $0xF, TAIL // TAIL = LEN % 16 - SHRQ $4, LEN // LEN = floor( LEN / 16 ) - JZ dot_tail4_start // if LEN == 0 { goto dot_tail4_start } - -dot_loop: // Loop unrolled 16x do { - MOVUPS (X_PTR)(IDX*4), X2 // X_i = x[i:i+1] - MOVUPS 16(X_PTR)(IDX*4), X3 - MOVUPS 32(X_PTR)(IDX*4), X4 - MOVUPS 48(X_PTR)(IDX*4), X5 - - MULPS (Y_PTR)(IDX*4), X2 // X_i *= y[i:i+1] - MULPS 16(Y_PTR)(IDX*4), X3 - MULPS 32(Y_PTR)(IDX*4), X4 - MULPS 48(Y_PTR)(IDX*4), X5 - - ADDPS X2, SUM // SUM += X_i - ADDPS X3, P_SUM - ADDPS X4, SUM - ADDPS X5, P_SUM - - ADDQ $16, IDX // IDX += 16 - DECQ LEN - JNZ dot_loop // } while --LEN > 0 - - ADDPS P_SUM, SUM // SUM += P_SUM - CMPQ TAIL, $0 // if TAIL == 0 { return } - JE dot_end - -dot_tail4_start: // Reset loop counter for 4-wide tail loop - MOVQ TAIL, LEN // LEN = floor( TAIL / 4 ) - SHRQ $2, LEN - JZ dot_tail_start // if LEN == 0 { goto dot_tail_start } - -dot_tail4_loop: // Loop unrolled 4x do { - MOVUPS (X_PTR)(IDX*4), X2 // X_i = x[i:i+1] - MULPS (Y_PTR)(IDX*4), X2 // X_i *= y[i:i+1] - ADDPS X2, SUM // SUM += X_i - ADDQ $4, IDX // i += 4 - DECQ LEN - JNZ dot_tail4_loop // } while --LEN > 0 - -dot_tail_start: // Reset loop counter for 1-wide tail loop - ANDQ $3, TAIL // TAIL = TAIL % 4 - JZ dot_end // if TAIL == 0 { return } - -dot_tail: // do { - MOVSS (X_PTR)(IDX*4), X2 // X2 = x[i] - MULSS (Y_PTR)(IDX*4), X2 // X2 *= y[i] - ADDSS X2, SUM // psum += X2 - INCQ IDX // IDX++ - DECQ TAIL - JNZ dot_tail // } while --TAIL > 0 - -dot_end: - HADDPS_SUM_SUM // SUM = \sum{ SUM[i] } - HADDPS_SUM_SUM - MOVSS SUM, sum+48(FP) // return SUM - RET diff --git a/vendor/gonum.org/v1/gonum/internal/asm/f32/ge_amd64.go b/vendor/gonum.org/v1/gonum/internal/asm/f32/ge_amd64.go deleted file mode 100644 index 2b336a2af9..0000000000 --- a/vendor/gonum.org/v1/gonum/internal/asm/f32/ge_amd64.go +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright ©2017 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build !noasm,!appengine,!safe - -package f32 - -// Ger performs the rank-one operation -// A += alpha * x * y^T -// where A is an m×n dense matrix, x and y are vectors, and alpha is a scalar. -func Ger(m, n uintptr, alpha float32, - x []float32, incX uintptr, - y []float32, incY uintptr, - a []float32, lda uintptr) diff --git a/vendor/gonum.org/v1/gonum/internal/asm/f32/ge_amd64.s b/vendor/gonum.org/v1/gonum/internal/asm/f32/ge_amd64.s deleted file mode 100644 index e5e80c52c6..0000000000 --- a/vendor/gonum.org/v1/gonum/internal/asm/f32/ge_amd64.s +++ /dev/null @@ -1,757 +0,0 @@ -// Copyright ©2017 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//+build !noasm,!appengine,!safe - -#include "textflag.h" - -#define SIZE 4 -#define BITSIZE 2 -#define KERNELSIZE 3 - -#define M_DIM m+0(FP) -#define M CX -#define N_DIM n+8(FP) -#define N BX - -#define TMP1 R14 -#define TMP2 R15 - -#define X_PTR SI -#define Y y_base+56(FP) -#define Y_PTR DX -#define A_ROW AX -#define A_PTR DI - -#define INC_X R8 -#define INC3_X R9 - -#define INC_Y R10 -#define INC3_Y R11 - -#define LDA R12 -#define LDA3 R13 - -#define ALPHA X0 -#define ALPHA_SPILL al-16(SP) - -#define LOAD_ALPHA \ - MOVSS alpha+16(FP), ALPHA \ - SHUFPS $0, ALPHA, ALPHA - -#define LOAD_SCALED4 \ - PREFETCHNTA 16*SIZE(X_PTR) \ - MOVDDUP (X_PTR), X1 \ - MOVDDUP 2*SIZE(X_PTR), X3 \ - MOVSHDUP X1, X2 \ - MOVSHDUP X3, X4 \ - MOVSLDUP X1, X1 \ - MOVSLDUP X3, X3 \ - MULPS ALPHA, X1 \ - MULPS ALPHA, X2 \ - MULPS ALPHA, X3 \ - MULPS ALPHA, X4 - -#define LOAD_SCALED2 \ - MOVDDUP (X_PTR), X1 \ - MOVSHDUP X1, X2 \ - MOVSLDUP X1, X1 \ - MULPS ALPHA, X1 \ - MULPS ALPHA, X2 - -#define LOAD_SCALED1 \ - MOVSS (X_PTR), X1 \ - SHUFPS $0, X1, X1 \ - MULPS ALPHA, X1 - -#define LOAD_SCALED4_INC \ - PREFETCHNTA (X_PTR)(INC_X*8) \ - MOVSS (X_PTR), X1 \ - MOVSS (X_PTR)(INC_X*1), X2 \ - MOVSS (X_PTR)(INC_X*2), X3 \ - MOVSS (X_PTR)(INC3_X*1), X4 \ - SHUFPS $0, X1, X1 \ - SHUFPS $0, X2, X2 \ - SHUFPS $0, X3, X3 \ - SHUFPS $0, X4, X4 \ - MULPS ALPHA, X1 \ - MULPS ALPHA, X2 \ - MULPS ALPHA, X3 \ - MULPS ALPHA, X4 - -#define LOAD_SCALED2_INC \ - MOVSS (X_PTR), X1 \ - MOVSS (X_PTR)(INC_X*1), X2 \ - SHUFPS $0, X1, X1 \ - SHUFPS $0, X2, X2 \ - MULPS ALPHA, X1 \ - MULPS ALPHA, X2 - -#define KERNEL_LOAD8 \ - MOVUPS (Y_PTR), X5 \ - MOVUPS 4*SIZE(Y_PTR), X6 - -#define KERNEL_LOAD8_INC \ - MOVSS (Y_PTR), X5 \ - MOVSS (Y_PTR)(INC_Y*1), X6 \ - MOVSS (Y_PTR)(INC_Y*2), X7 \ - MOVSS (Y_PTR)(INC3_Y*1), X8 \ - UNPCKLPS X6, X5 \ - UNPCKLPS X8, X7 \ - MOVLHPS X7, X5 \ - LEAQ (Y_PTR)(INC_Y*4), Y_PTR \ - MOVSS (Y_PTR), X6 \ - MOVSS (Y_PTR)(INC_Y*1), X7 \ - MOVSS (Y_PTR)(INC_Y*2), X8 \ - MOVSS (Y_PTR)(INC3_Y*1), X9 \ - UNPCKLPS X7, X6 \ - UNPCKLPS X9, X8 \ - MOVLHPS X8, X6 - -#define KERNEL_LOAD4 \ - MOVUPS (Y_PTR), X5 - -#define KERNEL_LOAD4_INC \ - MOVSS (Y_PTR), X5 \ - MOVSS (Y_PTR)(INC_Y*1), X6 \ - MOVSS (Y_PTR)(INC_Y*2), X7 \ - MOVSS (Y_PTR)(INC3_Y*1), X8 \ - UNPCKLPS X6, X5 \ - UNPCKLPS X8, X7 \ - MOVLHPS X7, X5 - -#define KERNEL_LOAD2 \ - MOVSD (Y_PTR), X5 - -#define KERNEL_LOAD2_INC \ - MOVSS (Y_PTR), X5 \ - MOVSS (Y_PTR)(INC_Y*1), X6 \ - UNPCKLPS X6, X5 - -#define KERNEL_4x8 \ - MOVUPS X5, X7 \ - MOVUPS X6, X8 \ - MOVUPS X5, X9 \ - MOVUPS X6, X10 \ - MOVUPS X5, X11 \ - MOVUPS X6, X12 \ - MULPS X1, X5 \ - MULPS X1, X6 \ - MULPS X2, X7 \ - MULPS X2, X8 \ - MULPS X3, X9 \ - MULPS X3, X10 \ - MULPS X4, X11 \ - MULPS X4, X12 - -#define STORE_4x8 \ - MOVUPS ALPHA, ALPHA_SPILL \ - MOVUPS (A_PTR), X13 \ - ADDPS X13, X5 \ - MOVUPS 4*SIZE(A_PTR), X14 \ - ADDPS X14, X6 \ - MOVUPS (A_PTR)(LDA*1), X15 \ - ADDPS X15, X7 \ - MOVUPS 4*SIZE(A_PTR)(LDA*1), X0 \ - ADDPS X0, X8 \ - MOVUPS (A_PTR)(LDA*2), X13 \ - ADDPS X13, X9 \ - MOVUPS 4*SIZE(A_PTR)(LDA*2), X14 \ - ADDPS X14, X10 \ - MOVUPS (A_PTR)(LDA3*1), X15 \ - ADDPS X15, X11 \ - MOVUPS 4*SIZE(A_PTR)(LDA3*1), X0 \ - ADDPS X0, X12 \ - MOVUPS X5, (A_PTR) \ - MOVUPS X6, 4*SIZE(A_PTR) \ - MOVUPS X7, (A_PTR)(LDA*1) \ - MOVUPS X8, 4*SIZE(A_PTR)(LDA*1) \ - MOVUPS X9, (A_PTR)(LDA*2) \ - MOVUPS X10, 4*SIZE(A_PTR)(LDA*2) \ - MOVUPS X11, (A_PTR)(LDA3*1) \ - MOVUPS X12, 4*SIZE(A_PTR)(LDA3*1) \ - MOVUPS ALPHA_SPILL, ALPHA \ - ADDQ $8*SIZE, A_PTR - -#define KERNEL_4x4 \ - MOVUPS X5, X6 \ - MOVUPS X5, X7 \ - MOVUPS X5, X8 \ - MULPS X1, X5 \ - MULPS X2, X6 \ - MULPS X3, X7 \ - MULPS X4, X8 - -#define STORE_4x4 \ - MOVUPS (A_PTR), X13 \ - ADDPS X13, X5 \ - MOVUPS (A_PTR)(LDA*1), X14 \ - ADDPS X14, X6 \ - MOVUPS (A_PTR)(LDA*2), X15 \ - ADDPS X15, X7 \ - MOVUPS (A_PTR)(LDA3*1), X13 \ - ADDPS X13, X8 \ - MOVUPS X5, (A_PTR) \ - MOVUPS X6, (A_PTR)(LDA*1) \ - MOVUPS X7, (A_PTR)(LDA*2) \ - MOVUPS X8, (A_PTR)(LDA3*1) \ - ADDQ $4*SIZE, A_PTR - -#define KERNEL_4x2 \ - MOVUPS X5, X6 \ - MOVUPS X5, X7 \ - MOVUPS X5, X8 \ - MULPS X1, X5 \ - MULPS X2, X6 \ - MULPS X3, X7 \ - MULPS X4, X8 - -#define STORE_4x2 \ - MOVSD (A_PTR), X9 \ - ADDPS X9, X5 \ - MOVSD (A_PTR)(LDA*1), X10 \ - ADDPS X10, X6 \ - MOVSD (A_PTR)(LDA*2), X11 \ - ADDPS X11, X7 \ - MOVSD (A_PTR)(LDA3*1), X12 \ - ADDPS X12, X8 \ - MOVSD X5, (A_PTR) \ - MOVSD X6, (A_PTR)(LDA*1) \ - MOVSD X7, (A_PTR)(LDA*2) \ - MOVSD X8, (A_PTR)(LDA3*1) \ - ADDQ $2*SIZE, A_PTR - -#define KERNEL_4x1 \ - MOVSS (Y_PTR), X5 \ - MOVSS X5, X6 \ - MOVSS X5, X7 \ - MOVSS X5, X8 \ - MULSS X1, X5 \ - MULSS X2, X6 \ - MULSS X3, X7 \ - MULSS X4, X8 - -#define STORE_4x1 \ - ADDSS (A_PTR), X5 \ - ADDSS (A_PTR)(LDA*1), X6 \ - ADDSS (A_PTR)(LDA*2), X7 \ - ADDSS (A_PTR)(LDA3*1), X8 \ - MOVSS X5, (A_PTR) \ - MOVSS X6, (A_PTR)(LDA*1) \ - MOVSS X7, (A_PTR)(LDA*2) \ - MOVSS X8, (A_PTR)(LDA3*1) \ - ADDQ $SIZE, A_PTR - -#define KERNEL_2x8 \ - MOVUPS X5, X7 \ - MOVUPS X6, X8 \ - MULPS X1, X5 \ - MULPS X1, X6 \ - MULPS X2, X7 \ - MULPS X2, X8 - -#define STORE_2x8 \ - MOVUPS (A_PTR), X9 \ - ADDPS X9, X5 \ - MOVUPS 4*SIZE(A_PTR), X10 \ - ADDPS X10, X6 \ - MOVUPS (A_PTR)(LDA*1), X11 \ - ADDPS X11, X7 \ - MOVUPS 4*SIZE(A_PTR)(LDA*1), X12 \ - ADDPS X12, X8 \ - MOVUPS X5, (A_PTR) \ - MOVUPS X6, 4*SIZE(A_PTR) \ - MOVUPS X7, (A_PTR)(LDA*1) \ - MOVUPS X8, 4*SIZE(A_PTR)(LDA*1) \ - ADDQ $8*SIZE, A_PTR - -#define KERNEL_2x4 \ - MOVUPS X5, X6 \ - MULPS X1, X5 \ - MULPS X2, X6 - -#define STORE_2x4 \ - MOVUPS (A_PTR), X9 \ - ADDPS X9, X5 \ - MOVUPS (A_PTR)(LDA*1), X11 \ - ADDPS X11, X6 \ - MOVUPS X5, (A_PTR) \ - MOVUPS X6, (A_PTR)(LDA*1) \ - ADDQ $4*SIZE, A_PTR - -#define KERNEL_2x2 \ - MOVSD X5, X6 \ - MULPS X1, X5 \ - MULPS X2, X6 - -#define STORE_2x2 \ - MOVSD (A_PTR), X7 \ - ADDPS X7, X5 \ - MOVSD (A_PTR)(LDA*1), X8 \ - ADDPS X8, X6 \ - MOVSD X5, (A_PTR) \ - MOVSD X6, (A_PTR)(LDA*1) \ - ADDQ $2*SIZE, A_PTR - -#define KERNEL_2x1 \ - MOVSS (Y_PTR), X5 \ - MOVSS X5, X6 \ - MULSS X1, X5 \ - MULSS X2, X6 - -#define STORE_2x1 \ - ADDSS (A_PTR), X5 \ - ADDSS (A_PTR)(LDA*1), X6 \ - MOVSS X5, (A_PTR) \ - MOVSS X6, (A_PTR)(LDA*1) \ - ADDQ $SIZE, A_PTR - -#define KERNEL_1x8 \ - MULPS X1, X5 \ - MULPS X1, X6 - -#define STORE_1x8 \ - MOVUPS (A_PTR), X7 \ - ADDPS X7, X5 \ - MOVUPS 4*SIZE(A_PTR), X8 \ - ADDPS X8, X6 \ - MOVUPS X5, (A_PTR) \ - MOVUPS X6, 4*SIZE(A_PTR) \ - ADDQ $8*SIZE, A_PTR - -#define KERNEL_1x4 \ - MULPS X1, X5 \ - MULPS X1, X6 - -#define STORE_1x4 \ - MOVUPS (A_PTR), X7 \ - ADDPS X7, X5 \ - MOVUPS X5, (A_PTR) \ - ADDQ $4*SIZE, A_PTR - -#define KERNEL_1x2 \ - MULPS X1, X5 - -#define STORE_1x2 \ - MOVSD (A_PTR), X6 \ - ADDPS X6, X5 \ - MOVSD X5, (A_PTR) \ - ADDQ $2*SIZE, A_PTR - -#define KERNEL_1x1 \ - MOVSS (Y_PTR), X5 \ - MULSS X1, X5 - -#define STORE_1x1 \ - ADDSS (A_PTR), X5 \ - MOVSS X5, (A_PTR) \ - ADDQ $SIZE, A_PTR - -// func Ger(m, n uintptr, alpha float32, -// x []float32, incX uintptr, -// y []float32, incY uintptr, -// a []float32, lda uintptr) -TEXT ·Ger(SB), 0, $16-120 - MOVQ M_DIM, M - MOVQ N_DIM, N - CMPQ M, $0 - JE end - CMPQ N, $0 - JE end - - LOAD_ALPHA - - MOVQ x_base+24(FP), X_PTR - MOVQ y_base+56(FP), Y_PTR - MOVQ a_base+88(FP), A_ROW - MOVQ A_ROW, A_PTR - MOVQ lda+112(FP), LDA // LDA = LDA * sizeof(float32) - SHLQ $BITSIZE, LDA - LEAQ (LDA)(LDA*2), LDA3 // LDA3 = LDA * 3 - - CMPQ incY+80(FP), $1 // Check for dense vector Y (fast-path) - JNE inc - CMPQ incX+48(FP), $1 // Check for dense vector X (fast-path) - JNE inc - - SHRQ $2, M - JZ r2 - -r4: - - // LOAD 4 - LOAD_SCALED4 - - MOVQ N_DIM, N - SHRQ $KERNELSIZE, N - JZ r4c4 - -r4c8: - // 4x8 KERNEL - KERNEL_LOAD8 - KERNEL_4x8 - STORE_4x8 - - ADDQ $8*SIZE, Y_PTR - - DECQ N - JNZ r4c8 - -r4c4: - TESTQ $4, N_DIM - JZ r4c2 - - // 4x4 KERNEL - KERNEL_LOAD4 - KERNEL_4x4 - STORE_4x4 - - ADDQ $4*SIZE, Y_PTR - -r4c2: - TESTQ $2, N_DIM - JZ r4c1 - - // 4x2 KERNEL - KERNEL_LOAD2 - KERNEL_4x2 - STORE_4x2 - - ADDQ $2*SIZE, Y_PTR - -r4c1: - TESTQ $1, N_DIM - JZ r4end - - // 4x1 KERNEL - KERNEL_4x1 - STORE_4x1 - - ADDQ $SIZE, Y_PTR - -r4end: - ADDQ $4*SIZE, X_PTR - MOVQ Y, Y_PTR - LEAQ (A_ROW)(LDA*4), A_ROW - MOVQ A_ROW, A_PTR - - DECQ M - JNZ r4 - -r2: - TESTQ $2, M_DIM - JZ r1 - - // LOAD 2 - LOAD_SCALED2 - - MOVQ N_DIM, N - SHRQ $KERNELSIZE, N - JZ r2c4 - -r2c8: - // 2x8 KERNEL - KERNEL_LOAD8 - KERNEL_2x8 - STORE_2x8 - - ADDQ $8*SIZE, Y_PTR - - DECQ N - JNZ r2c8 - -r2c4: - TESTQ $4, N_DIM - JZ r2c2 - - // 2x4 KERNEL - KERNEL_LOAD4 - KERNEL_2x4 - STORE_2x4 - - ADDQ $4*SIZE, Y_PTR - -r2c2: - TESTQ $2, N_DIM - JZ r2c1 - - // 2x2 KERNEL - KERNEL_LOAD2 - KERNEL_2x2 - STORE_2x2 - - ADDQ $2*SIZE, Y_PTR - -r2c1: - TESTQ $1, N_DIM - JZ r2end - - // 2x1 KERNEL - KERNEL_2x1 - STORE_2x1 - - ADDQ $SIZE, Y_PTR - -r2end: - ADDQ $2*SIZE, X_PTR - MOVQ Y, Y_PTR - LEAQ (A_ROW)(LDA*2), A_ROW - MOVQ A_ROW, A_PTR - -r1: - TESTQ $1, M_DIM - JZ end - - // LOAD 1 - LOAD_SCALED1 - - MOVQ N_DIM, N - SHRQ $KERNELSIZE, N - JZ r1c4 - -r1c8: - // 1x8 KERNEL - KERNEL_LOAD8 - KERNEL_1x8 - STORE_1x8 - - ADDQ $8*SIZE, Y_PTR - - DECQ N - JNZ r1c8 - -r1c4: - TESTQ $4, N_DIM - JZ r1c2 - - // 1x4 KERNEL - KERNEL_LOAD4 - KERNEL_1x4 - STORE_1x4 - - ADDQ $4*SIZE, Y_PTR - -r1c2: - TESTQ $2, N_DIM - JZ r1c1 - - // 1x2 KERNEL - KERNEL_LOAD2 - KERNEL_1x2 - STORE_1x2 - - ADDQ $2*SIZE, Y_PTR - -r1c1: - TESTQ $1, N_DIM - JZ end - - // 1x1 KERNEL - KERNEL_1x1 - STORE_1x1 - -end: - RET - -inc: // Algorithm for incY != 0 ( split loads in kernel ) - - MOVQ incX+48(FP), INC_X // INC_X = incX * sizeof(float32) - SHLQ $BITSIZE, INC_X - MOVQ incY+80(FP), INC_Y // INC_Y = incY * sizeof(float32) - SHLQ $BITSIZE, INC_Y - LEAQ (INC_X)(INC_X*2), INC3_X // INC3_X = INC_X * 3 - LEAQ (INC_Y)(INC_Y*2), INC3_Y // INC3_Y = INC_Y * 3 - - XORQ TMP2, TMP2 - MOVQ M, TMP1 - SUBQ $1, TMP1 - IMULQ INC_X, TMP1 - NEGQ TMP1 - CMPQ INC_X, $0 - CMOVQLT TMP1, TMP2 - LEAQ (X_PTR)(TMP2*SIZE), X_PTR - - XORQ TMP2, TMP2 - MOVQ N, TMP1 - SUBQ $1, TMP1 - IMULQ INC_Y, TMP1 - NEGQ TMP1 - CMPQ INC_Y, $0 - CMOVQLT TMP1, TMP2 - LEAQ (Y_PTR)(TMP2*SIZE), Y_PTR - - SHRQ $2, M - JZ inc_r2 - -inc_r4: - // LOAD 4 - LOAD_SCALED4_INC - - MOVQ N_DIM, N - SHRQ $KERNELSIZE, N - JZ inc_r4c4 - -inc_r4c8: - // 4x4 KERNEL - KERNEL_LOAD8_INC - KERNEL_4x8 - STORE_4x8 - - LEAQ (Y_PTR)(INC_Y*4), Y_PTR - DECQ N - JNZ inc_r4c8 - -inc_r4c4: - TESTQ $4, N_DIM - JZ inc_r4c2 - - // 4x4 KERNEL - KERNEL_LOAD4_INC - KERNEL_4x4 - STORE_4x4 - - LEAQ (Y_PTR)(INC_Y*4), Y_PTR - -inc_r4c2: - TESTQ $2, N_DIM - JZ inc_r4c1 - - // 4x2 KERNEL - KERNEL_LOAD2_INC - KERNEL_4x2 - STORE_4x2 - - LEAQ (Y_PTR)(INC_Y*2), Y_PTR - -inc_r4c1: - TESTQ $1, N_DIM - JZ inc_r4end - - // 4x1 KERNEL - KERNEL_4x1 - STORE_4x1 - - ADDQ INC_Y, Y_PTR - -inc_r4end: - LEAQ (X_PTR)(INC_X*4), X_PTR - MOVQ Y, Y_PTR - LEAQ (A_ROW)(LDA*4), A_ROW - MOVQ A_ROW, A_PTR - - DECQ M - JNZ inc_r4 - -inc_r2: - TESTQ $2, M_DIM - JZ inc_r1 - - // LOAD 2 - LOAD_SCALED2_INC - - MOVQ N_DIM, N - SHRQ $KERNELSIZE, N - JZ inc_r2c4 - -inc_r2c8: - // 2x8 KERNEL - KERNEL_LOAD8_INC - KERNEL_2x8 - STORE_2x8 - - LEAQ (Y_PTR)(INC_Y*4), Y_PTR - DECQ N - JNZ inc_r2c8 - -inc_r2c4: - TESTQ $4, N_DIM - JZ inc_r2c2 - - // 2x4 KERNEL - KERNEL_LOAD4_INC - KERNEL_2x4 - STORE_2x4 - - LEAQ (Y_PTR)(INC_Y*4), Y_PTR - -inc_r2c2: - TESTQ $2, N_DIM - JZ inc_r2c1 - - // 2x2 KERNEL - KERNEL_LOAD2_INC - KERNEL_2x2 - STORE_2x2 - - LEAQ (Y_PTR)(INC_Y*2), Y_PTR - -inc_r2c1: - TESTQ $1, N_DIM - JZ inc_r2end - - // 2x1 KERNEL - KERNEL_2x1 - STORE_2x1 - - ADDQ INC_Y, Y_PTR - -inc_r2end: - LEAQ (X_PTR)(INC_X*2), X_PTR - MOVQ Y, Y_PTR - LEAQ (A_ROW)(LDA*2), A_ROW - MOVQ A_ROW, A_PTR - -inc_r1: - TESTQ $1, M_DIM - JZ end - - // LOAD 1 - LOAD_SCALED1 - - MOVQ N_DIM, N - SHRQ $KERNELSIZE, N - JZ inc_r1c4 - -inc_r1c8: - // 1x8 KERNEL - KERNEL_LOAD8_INC - KERNEL_1x8 - STORE_1x8 - - LEAQ (Y_PTR)(INC_Y*4), Y_PTR - DECQ N - JNZ inc_r1c8 - -inc_r1c4: - TESTQ $4, N_DIM - JZ inc_r1c2 - - // 1x4 KERNEL - KERNEL_LOAD4_INC - KERNEL_1x4 - STORE_1x4 - - LEAQ (Y_PTR)(INC_Y*4), Y_PTR - -inc_r1c2: - TESTQ $2, N_DIM - JZ inc_r1c1 - - // 1x2 KERNEL - KERNEL_LOAD2_INC - KERNEL_1x2 - STORE_1x2 - - LEAQ (Y_PTR)(INC_Y*2), Y_PTR - -inc_r1c1: - TESTQ $1, N_DIM - JZ inc_end - - // 1x1 KERNEL - KERNEL_1x1 - STORE_1x1 - -inc_end: - RET diff --git a/vendor/gonum.org/v1/gonum/internal/asm/f32/ge_noasm.go b/vendor/gonum.org/v1/gonum/internal/asm/f32/ge_noasm.go deleted file mode 100644 index d92f9968d0..0000000000 --- a/vendor/gonum.org/v1/gonum/internal/asm/f32/ge_noasm.go +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright ©2017 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build !amd64 noasm appengine safe - -package f32 - -// Ger performs the rank-one operation -// A += alpha * x * y^T -// where A is an m×n dense matrix, x and y are vectors, and alpha is a scalar. -func Ger(m, n uintptr, alpha float32, x []float32, incX uintptr, y []float32, incY uintptr, a []float32, lda uintptr) { - - if incX == 1 && incY == 1 { - x = x[:m] - y = y[:n] - for i, xv := range x { - AxpyUnitary(alpha*xv, y, a[uintptr(i)*lda:uintptr(i)*lda+n]) - } - return - } - - var ky, kx uintptr - if int(incY) < 0 { - ky = uintptr(-int(n-1) * int(incY)) - } - if int(incX) < 0 { - kx = uintptr(-int(m-1) * int(incX)) - } - - ix := kx - for i := 0; i < int(m); i++ { - AxpyInc(alpha*x[ix], y, a[uintptr(i)*lda:uintptr(i)*lda+n], uintptr(n), uintptr(incY), 1, uintptr(ky), 0) - ix += incX - } -} diff --git a/vendor/gonum.org/v1/gonum/internal/asm/f32/scal.go b/vendor/gonum.org/v1/gonum/internal/asm/f32/scal.go deleted file mode 100644 index d0867a4609..0000000000 --- a/vendor/gonum.org/v1/gonum/internal/asm/f32/scal.go +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright ©2016 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package f32 - -// ScalUnitary is -// for i := range x { -// x[i] *= alpha -// } -func ScalUnitary(alpha float32, x []float32) { - for i := range x { - x[i] *= alpha - } -} - -// ScalUnitaryTo is -// for i, v := range x { -// dst[i] = alpha * v -// } -func ScalUnitaryTo(dst []float32, alpha float32, x []float32) { - for i, v := range x { - dst[i] = alpha * v - } -} - -// ScalInc is -// var ix uintptr -// for i := 0; i < int(n); i++ { -// x[ix] *= alpha -// ix += incX -// } -func ScalInc(alpha float32, x []float32, n, incX uintptr) { - var ix uintptr - for i := 0; i < int(n); i++ { - x[ix] *= alpha - ix += incX - } -} - -// ScalIncTo is -// var idst, ix uintptr -// for i := 0; i < int(n); i++ { -// dst[idst] = alpha * x[ix] -// ix += incX -// idst += incDst -// } -func ScalIncTo(dst []float32, incDst uintptr, alpha float32, x []float32, n, incX uintptr) { - var idst, ix uintptr - for i := 0; i < int(n); i++ { - dst[idst] = alpha * x[ix] - ix += incX - idst += incDst - } -} diff --git a/vendor/gonum.org/v1/gonum/internal/asm/f32/stubs_amd64.go b/vendor/gonum.org/v1/gonum/internal/asm/f32/stubs_amd64.go deleted file mode 100644 index fcbce09e7c..0000000000 --- a/vendor/gonum.org/v1/gonum/internal/asm/f32/stubs_amd64.go +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright ©2016 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build !noasm,!appengine,!safe - -package f32 - -// AxpyUnitary is -// for i, v := range x { -// y[i] += alpha * v -// } -func AxpyUnitary(alpha float32, x, y []float32) - -// AxpyUnitaryTo is -// for i, v := range x { -// dst[i] = alpha*v + y[i] -// } -func AxpyUnitaryTo(dst []float32, alpha float32, x, y []float32) - -// AxpyInc is -// for i := 0; i < int(n); i++ { -// y[iy] += alpha * x[ix] -// ix += incX -// iy += incY -// } -func AxpyInc(alpha float32, x, y []float32, n, incX, incY, ix, iy uintptr) - -// AxpyIncTo is -// for i := 0; i < int(n); i++ { -// dst[idst] = alpha*x[ix] + y[iy] -// ix += incX -// iy += incY -// idst += incDst -// } -func AxpyIncTo(dst []float32, incDst, idst uintptr, alpha float32, x, y []float32, n, incX, incY, ix, iy uintptr) - -// DdotUnitary is -// for i, v := range x { -// sum += float64(y[i]) * float64(v) -// } -// return -func DdotUnitary(x, y []float32) (sum float64) - -// DdotInc is -// for i := 0; i < int(n); i++ { -// sum += float64(y[iy]) * float64(x[ix]) -// ix += incX -// iy += incY -// } -// return -func DdotInc(x, y []float32, n, incX, incY, ix, iy uintptr) (sum float64) - -// DotUnitary is -// for i, v := range x { -// sum += y[i] * v -// } -// return sum -func DotUnitary(x, y []float32) (sum float32) - -// DotInc is -// for i := 0; i < int(n); i++ { -// sum += y[iy] * x[ix] -// ix += incX -// iy += incY -// } -// return sum -func DotInc(x, y []float32, n, incX, incY, ix, iy uintptr) (sum float32) diff --git a/vendor/gonum.org/v1/gonum/internal/asm/f32/stubs_noasm.go b/vendor/gonum.org/v1/gonum/internal/asm/f32/stubs_noasm.go deleted file mode 100644 index 3b5b09702c..0000000000 --- a/vendor/gonum.org/v1/gonum/internal/asm/f32/stubs_noasm.go +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright ©2016 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build !amd64 noasm appengine safe - -package f32 - -// AxpyUnitary is -// for i, v := range x { -// y[i] += alpha * v -// } -func AxpyUnitary(alpha float32, x, y []float32) { - for i, v := range x { - y[i] += alpha * v - } -} - -// AxpyUnitaryTo is -// for i, v := range x { -// dst[i] = alpha*v + y[i] -// } -func AxpyUnitaryTo(dst []float32, alpha float32, x, y []float32) { - for i, v := range x { - dst[i] = alpha*v + y[i] - } -} - -// AxpyInc is -// for i := 0; i < int(n); i++ { -// y[iy] += alpha * x[ix] -// ix += incX -// iy += incY -// } -func AxpyInc(alpha float32, x, y []float32, n, incX, incY, ix, iy uintptr) { - for i := 0; i < int(n); i++ { - y[iy] += alpha * x[ix] - ix += incX - iy += incY - } -} - -// AxpyIncTo is -// for i := 0; i < int(n); i++ { -// dst[idst] = alpha*x[ix] + y[iy] -// ix += incX -// iy += incY -// idst += incDst -// } -func AxpyIncTo(dst []float32, incDst, idst uintptr, alpha float32, x, y []float32, n, incX, incY, ix, iy uintptr) { - for i := 0; i < int(n); i++ { - dst[idst] = alpha*x[ix] + y[iy] - ix += incX - iy += incY - idst += incDst - } -} - -// DotUnitary is -// for i, v := range x { -// sum += y[i] * v -// } -// return sum -func DotUnitary(x, y []float32) (sum float32) { - for i, v := range x { - sum += y[i] * v - } - return sum -} - -// DotInc is -// for i := 0; i < int(n); i++ { -// sum += y[iy] * x[ix] -// ix += incX -// iy += incY -// } -// return sum -func DotInc(x, y []float32, n, incX, incY, ix, iy uintptr) (sum float32) { - for i := 0; i < int(n); i++ { - sum += y[iy] * x[ix] - ix += incX - iy += incY - } - return sum -} - -// DdotUnitary is -// for i, v := range x { -// sum += float64(y[i]) * float64(v) -// } -// return -func DdotUnitary(x, y []float32) (sum float64) { - for i, v := range x { - sum += float64(y[i]) * float64(v) - } - return -} - -// DdotInc is -// for i := 0; i < int(n); i++ { -// sum += float64(y[iy]) * float64(x[ix]) -// ix += incX -// iy += incY -// } -// return -func DdotInc(x, y []float32, n, incX, incY, ix, iy uintptr) (sum float64) { - for i := 0; i < int(n); i++ { - sum += float64(y[iy]) * float64(x[ix]) - ix += incX - iy += incY - } - return -} diff --git a/vendor/gonum.org/v1/gonum/internal/asm/f64/abssum_amd64.s b/vendor/gonum.org/v1/gonum/internal/asm/f64/abssum_amd64.s deleted file mode 100644 index d9d61bb7b9..0000000000 --- a/vendor/gonum.org/v1/gonum/internal/asm/f64/abssum_amd64.s +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright ©2016 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build !noasm,!appengine,!safe - -#include "textflag.h" - -// func L1Norm(x []float64) float64 -TEXT ·L1Norm(SB), NOSPLIT, $0 - MOVQ x_base+0(FP), SI // SI = &x - MOVQ x_len+8(FP), CX // CX = len(x) - XORQ AX, AX // i = 0 - PXOR X0, X0 // p_sum_i = 0 - PXOR X1, X1 - PXOR X2, X2 - PXOR X3, X3 - PXOR X4, X4 - PXOR X5, X5 - PXOR X6, X6 - PXOR X7, X7 - CMPQ CX, $0 // if CX == 0 { return 0 } - JE absum_end - MOVQ CX, BX - ANDQ $7, BX // BX = len(x) % 8 - SHRQ $3, CX // CX = floor( len(x) / 8 ) - JZ absum_tail_start // if CX == 0 { goto absum_tail_start } - -absum_loop: // do { - // p_sum += max( p_sum + x[i], p_sum - x[i] ) - MOVUPS (SI)(AX*8), X8 // X_i = x[i:i+1] - MOVUPS 16(SI)(AX*8), X9 - MOVUPS 32(SI)(AX*8), X10 - MOVUPS 48(SI)(AX*8), X11 - ADDPD X8, X0 // p_sum_i += X_i ( positive values ) - ADDPD X9, X2 - ADDPD X10, X4 - ADDPD X11, X6 - SUBPD X8, X1 // p_sum_(i+1) -= X_i ( negative values ) - SUBPD X9, X3 - SUBPD X10, X5 - SUBPD X11, X7 - MAXPD X1, X0 // p_sum_i = max( p_sum_i, p_sum_(i+1) ) - MAXPD X3, X2 - MAXPD X5, X4 - MAXPD X7, X6 - MOVAPS X0, X1 // p_sum_(i+1) = p_sum_i - MOVAPS X2, X3 - MOVAPS X4, X5 - MOVAPS X6, X7 - ADDQ $8, AX // i += 8 - LOOP absum_loop // } while --CX > 0 - - // p_sum_0 = \sum_{i=1}^{3}( p_sum_(i*2) ) - ADDPD X3, X0 - ADDPD X5, X7 - ADDPD X7, X0 - - // p_sum_0[0] = p_sum_0[0] + p_sum_0[1] - MOVAPS X0, X1 - SHUFPD $0x3, X0, X0 // lower( p_sum_0 ) = upper( p_sum_0 ) - ADDSD X1, X0 - CMPQ BX, $0 - JE absum_end // if BX == 0 { goto absum_end } - -absum_tail_start: // Reset loop registers - MOVQ BX, CX // Loop counter: CX = BX - XORPS X8, X8 // X_8 = 0 - -absum_tail: // do { - // p_sum += max( p_sum + x[i], p_sum - x[i] ) - MOVSD (SI)(AX*8), X8 // X_8 = x[i] - MOVSD X0, X1 // p_sum_1 = p_sum_0 - ADDSD X8, X0 // p_sum_0 += X_8 - SUBSD X8, X1 // p_sum_1 -= X_8 - MAXSD X1, X0 // p_sum_0 = max( p_sum_0, p_sum_1 ) - INCQ AX // i++ - LOOP absum_tail // } while --CX > 0 - -absum_end: // return p_sum_0 - MOVSD X0, sum+24(FP) - RET diff --git a/vendor/gonum.org/v1/gonum/internal/asm/f64/abssuminc_amd64.s b/vendor/gonum.org/v1/gonum/internal/asm/f64/abssuminc_amd64.s deleted file mode 100644 index cac19aa64c..0000000000 --- a/vendor/gonum.org/v1/gonum/internal/asm/f64/abssuminc_amd64.s +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright ©2016 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build !noasm,!appengine,!safe - -#include "textflag.h" - -// func L1NormInc(x []float64, n, incX int) (sum float64) -TEXT ·L1NormInc(SB), NOSPLIT, $0 - MOVQ x_base+0(FP), SI // SI = &x - MOVQ n+24(FP), CX // CX = n - MOVQ incX+32(FP), AX // AX = increment * sizeof( float64 ) - SHLQ $3, AX - MOVQ AX, DX // DX = AX * 3 - IMULQ $3, DX - PXOR X0, X0 // p_sum_i = 0 - PXOR X1, X1 - PXOR X2, X2 - PXOR X3, X3 - PXOR X4, X4 - PXOR X5, X5 - PXOR X6, X6 - PXOR X7, X7 - CMPQ CX, $0 // if CX == 0 { return 0 } - JE absum_end - MOVQ CX, BX - ANDQ $7, BX // BX = n % 8 - SHRQ $3, CX // CX = floor( n / 8 ) - JZ absum_tail_start // if CX == 0 { goto absum_tail_start } - -absum_loop: // do { - // p_sum = max( p_sum + x[i], p_sum - x[i] ) - MOVSD (SI), X8 // X_i[0] = x[i] - MOVSD (SI)(AX*1), X9 - MOVSD (SI)(AX*2), X10 - MOVSD (SI)(DX*1), X11 - LEAQ (SI)(AX*4), SI // SI = SI + 4 - MOVHPD (SI), X8 // X_i[1] = x[i+4] - MOVHPD (SI)(AX*1), X9 - MOVHPD (SI)(AX*2), X10 - MOVHPD (SI)(DX*1), X11 - ADDPD X8, X0 // p_sum_i += X_i ( positive values ) - ADDPD X9, X2 - ADDPD X10, X4 - ADDPD X11, X6 - SUBPD X8, X1 // p_sum_(i+1) -= X_i ( negative values ) - SUBPD X9, X3 - SUBPD X10, X5 - SUBPD X11, X7 - MAXPD X1, X0 // p_sum_i = max( p_sum_i, p_sum_(i+1) ) - MAXPD X3, X2 - MAXPD X5, X4 - MAXPD X7, X6 - MOVAPS X0, X1 // p_sum_(i+1) = p_sum_i - MOVAPS X2, X3 - MOVAPS X4, X5 - MOVAPS X6, X7 - LEAQ (SI)(AX*4), SI // SI = SI + 4 - LOOP absum_loop // } while --CX > 0 - - // p_sum_0 = \sum_{i=1}^{3}( p_sum_(i*2) ) - ADDPD X3, X0 - ADDPD X5, X7 - ADDPD X7, X0 - - // p_sum_0[0] = p_sum_0[0] + p_sum_0[1] - MOVAPS X0, X1 - SHUFPD $0x3, X0, X0 // lower( p_sum_0 ) = upper( p_sum_0 ) - ADDSD X1, X0 - CMPQ BX, $0 - JE absum_end // if BX == 0 { goto absum_end } - -absum_tail_start: // Reset loop registers - MOVQ BX, CX // Loop counter: CX = BX - XORPS X8, X8 // X_8 = 0 - -absum_tail: // do { - // p_sum += max( p_sum + x[i], p_sum - x[i] ) - MOVSD (SI), X8 // X_8 = x[i] - MOVSD X0, X1 // p_sum_1 = p_sum_0 - ADDSD X8, X0 // p_sum_0 += X_8 - SUBSD X8, X1 // p_sum_1 -= X_8 - MAXSD X1, X0 // p_sum_0 = max( p_sum_0, p_sum_1 ) - ADDQ AX, SI // i++ - LOOP absum_tail // } while --CX > 0 - -absum_end: // return p_sum_0 - MOVSD X0, sum+40(FP) - RET diff --git a/vendor/gonum.org/v1/gonum/internal/asm/f64/add_amd64.s b/vendor/gonum.org/v1/gonum/internal/asm/f64/add_amd64.s deleted file mode 100644 index bc0ea6a407..0000000000 --- a/vendor/gonum.org/v1/gonum/internal/asm/f64/add_amd64.s +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright ©2016 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build !noasm,!appengine,!safe - -#include "textflag.h" - -// func Add(dst, s []float64) -TEXT ·Add(SB), NOSPLIT, $0 - MOVQ dst_base+0(FP), DI // DI = &dst - MOVQ dst_len+8(FP), CX // CX = len(dst) - MOVQ s_base+24(FP), SI // SI = &s - CMPQ s_len+32(FP), CX // CX = max( CX, len(s) ) - CMOVQLE s_len+32(FP), CX - CMPQ CX, $0 // if CX == 0 { return } - JE add_end - XORQ AX, AX - MOVQ DI, BX - ANDQ $0x0F, BX // BX = &dst & 15 - JZ add_no_trim // if BX == 0 { goto add_no_trim } - - // Align on 16-bit boundary - MOVSD (SI)(AX*8), X0 // X0 = s[i] - ADDSD (DI)(AX*8), X0 // X0 += dst[i] - MOVSD X0, (DI)(AX*8) // dst[i] = X0 - INCQ AX // i++ - DECQ CX // --CX - JE add_end // if CX == 0 { return } - -add_no_trim: - MOVQ CX, BX - ANDQ $7, BX // BX = len(dst) % 8 - SHRQ $3, CX // CX = floor( len(dst) / 8 ) - JZ add_tail_start // if CX == 0 { goto add_tail_start } - -add_loop: // Loop unrolled 8x do { - MOVUPS (SI)(AX*8), X0 // X_i = s[i:i+1] - MOVUPS 16(SI)(AX*8), X1 - MOVUPS 32(SI)(AX*8), X2 - MOVUPS 48(SI)(AX*8), X3 - ADDPD (DI)(AX*8), X0 // X_i += dst[i:i+1] - ADDPD 16(DI)(AX*8), X1 - ADDPD 32(DI)(AX*8), X2 - ADDPD 48(DI)(AX*8), X3 - MOVUPS X0, (DI)(AX*8) // dst[i:i+1] = X_i - MOVUPS X1, 16(DI)(AX*8) - MOVUPS X2, 32(DI)(AX*8) - MOVUPS X3, 48(DI)(AX*8) - ADDQ $8, AX // i += 8 - LOOP add_loop // } while --CX > 0 - CMPQ BX, $0 // if BX == 0 { return } - JE add_end - -add_tail_start: // Reset loop registers - MOVQ BX, CX // Loop counter: CX = BX - -add_tail: // do { - MOVSD (SI)(AX*8), X0 // X0 = s[i] - ADDSD (DI)(AX*8), X0 // X0 += dst[i] - MOVSD X0, (DI)(AX*8) // dst[i] = X0 - INCQ AX // ++i - LOOP add_tail // } while --CX > 0 - -add_end: - RET diff --git a/vendor/gonum.org/v1/gonum/internal/asm/f64/addconst_amd64.s b/vendor/gonum.org/v1/gonum/internal/asm/f64/addconst_amd64.s deleted file mode 100644 index 7cc68c78c9..0000000000 --- a/vendor/gonum.org/v1/gonum/internal/asm/f64/addconst_amd64.s +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright ©2016 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build !noasm,!appengine,!safe - -#include "textflag.h" - -// func Addconst(alpha float64, x []float64) -TEXT ·AddConst(SB), NOSPLIT, $0 - MOVQ x_base+8(FP), SI // SI = &x - MOVQ x_len+16(FP), CX // CX = len(x) - CMPQ CX, $0 // if len(x) == 0 { return } - JE ac_end - MOVSD alpha+0(FP), X4 // X4 = { a, a } - SHUFPD $0, X4, X4 - MOVUPS X4, X5 // X5 = X4 - XORQ AX, AX // i = 0 - MOVQ CX, BX - ANDQ $7, BX // BX = len(x) % 8 - SHRQ $3, CX // CX = floor( len(x) / 8 ) - JZ ac_tail_start // if CX == 0 { goto ac_tail_start } - -ac_loop: // Loop unrolled 8x do { - MOVUPS (SI)(AX*8), X0 // X_i = s[i:i+1] - MOVUPS 16(SI)(AX*8), X1 - MOVUPS 32(SI)(AX*8), X2 - MOVUPS 48(SI)(AX*8), X3 - ADDPD X4, X0 // X_i += a - ADDPD X5, X1 - ADDPD X4, X2 - ADDPD X5, X3 - MOVUPS X0, (SI)(AX*8) // s[i:i+1] = X_i - MOVUPS X1, 16(SI)(AX*8) - MOVUPS X2, 32(SI)(AX*8) - MOVUPS X3, 48(SI)(AX*8) - ADDQ $8, AX // i += 8 - LOOP ac_loop // } while --CX > 0 - CMPQ BX, $0 // if BX == 0 { return } - JE ac_end - -ac_tail_start: // Reset loop counters - MOVQ BX, CX // Loop counter: CX = BX - -ac_tail: // do { - MOVSD (SI)(AX*8), X0 // X0 = s[i] - ADDSD X4, X0 // X0 += a - MOVSD X0, (SI)(AX*8) // s[i] = X0 - INCQ AX // ++i - LOOP ac_tail // } while --CX > 0 - -ac_end: - RET diff --git a/vendor/gonum.org/v1/gonum/internal/asm/f64/axpy.go b/vendor/gonum.org/v1/gonum/internal/asm/f64/axpy.go deleted file mode 100644 index b832213981..0000000000 --- a/vendor/gonum.org/v1/gonum/internal/asm/f64/axpy.go +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright ©2015 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build !amd64 noasm appengine safe - -package f64 - -// AxpyUnitary is -// for i, v := range x { -// y[i] += alpha * v -// } -func AxpyUnitary(alpha float64, x, y []float64) { - for i, v := range x { - y[i] += alpha * v - } -} - -// AxpyUnitaryTo is -// for i, v := range x { -// dst[i] = alpha*v + y[i] -// } -func AxpyUnitaryTo(dst []float64, alpha float64, x, y []float64) { - for i, v := range x { - dst[i] = alpha*v + y[i] - } -} - -// AxpyInc is -// for i := 0; i < int(n); i++ { -// y[iy] += alpha * x[ix] -// ix += incX -// iy += incY -// } -func AxpyInc(alpha float64, x, y []float64, n, incX, incY, ix, iy uintptr) { - for i := 0; i < int(n); i++ { - y[iy] += alpha * x[ix] - ix += incX - iy += incY - } -} - -// AxpyIncTo is -// for i := 0; i < int(n); i++ { -// dst[idst] = alpha*x[ix] + y[iy] -// ix += incX -// iy += incY -// idst += incDst -// } -func AxpyIncTo(dst []float64, incDst, idst uintptr, alpha float64, x, y []float64, n, incX, incY, ix, iy uintptr) { - for i := 0; i < int(n); i++ { - dst[idst] = alpha*x[ix] + y[iy] - ix += incX - iy += incY - idst += incDst - } -} diff --git a/vendor/gonum.org/v1/gonum/internal/asm/f64/axpyinc_amd64.s b/vendor/gonum.org/v1/gonum/internal/asm/f64/axpyinc_amd64.s deleted file mode 100644 index 95fe9f9044..0000000000 --- a/vendor/gonum.org/v1/gonum/internal/asm/f64/axpyinc_amd64.s +++ /dev/null @@ -1,142 +0,0 @@ -// Copyright ©2015 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. -// -// Some of the loop unrolling code is copied from: -// http://golang.org/src/math/big/arith_amd64.s -// which is distributed under these terms: -// -// Copyright (c) 2012 The Go Authors. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -//+build !noasm,!appengine,!safe - -#include "textflag.h" - -#define X_PTR SI -#define Y_PTR DI -#define DST_PTR DI -#define IDX AX -#define LEN CX -#define TAIL BX -#define INC_X R8 -#define INCx3_X R11 -#define INC_Y R9 -#define INCx3_Y R12 -#define INC_DST R9 -#define INCx3_DST R12 -#define ALPHA X0 -#define ALPHA_2 X1 - -// func AxpyInc(alpha float64, x, y []float64, n, incX, incY, ix, iy uintptr) -TEXT ·AxpyInc(SB), NOSPLIT, $0 - MOVQ x_base+8(FP), X_PTR // X_PTR = &x - MOVQ y_base+32(FP), Y_PTR // Y_PTR = &y - MOVQ n+56(FP), LEN // LEN = n - CMPQ LEN, $0 // if LEN == 0 { return } - JE end - - MOVQ ix+80(FP), INC_X - MOVQ iy+88(FP), INC_Y - LEAQ (X_PTR)(INC_X*8), X_PTR // X_PTR = &(x[ix]) - LEAQ (Y_PTR)(INC_Y*8), Y_PTR // Y_PTR = &(y[iy]) - MOVQ Y_PTR, DST_PTR // DST_PTR = Y_PTR // Write pointer - - MOVQ incX+64(FP), INC_X // INC_X = incX * sizeof(float64) - SHLQ $3, INC_X - MOVQ incY+72(FP), INC_Y // INC_Y = incY * sizeof(float64) - SHLQ $3, INC_Y - - MOVSD alpha+0(FP), ALPHA // ALPHA = alpha - MOVQ LEN, TAIL - ANDQ $3, TAIL // TAIL = n % 4 - SHRQ $2, LEN // LEN = floor( n / 4 ) - JZ tail_start // if LEN == 0 { goto tail_start } - - MOVAPS ALPHA, ALPHA_2 // ALPHA_2 = ALPHA for pipelining - LEAQ (INC_X)(INC_X*2), INCx3_X // INCx3_X = INC_X * 3 - LEAQ (INC_Y)(INC_Y*2), INCx3_Y // INCx3_Y = INC_Y * 3 - -loop: // do { // y[i] += alpha * x[i] unrolled 4x. - MOVSD (X_PTR), X2 // X_i = x[i] - MOVSD (X_PTR)(INC_X*1), X3 - MOVSD (X_PTR)(INC_X*2), X4 - MOVSD (X_PTR)(INCx3_X*1), X5 - - MULSD ALPHA, X2 // X_i *= a - MULSD ALPHA_2, X3 - MULSD ALPHA, X4 - MULSD ALPHA_2, X5 - - ADDSD (Y_PTR), X2 // X_i += y[i] - ADDSD (Y_PTR)(INC_Y*1), X3 - ADDSD (Y_PTR)(INC_Y*2), X4 - ADDSD (Y_PTR)(INCx3_Y*1), X5 - - MOVSD X2, (DST_PTR) // y[i] = X_i - MOVSD X3, (DST_PTR)(INC_DST*1) - MOVSD X4, (DST_PTR)(INC_DST*2) - MOVSD X5, (DST_PTR)(INCx3_DST*1) - - LEAQ (X_PTR)(INC_X*4), X_PTR // X_PTR = &(X_PTR[incX*4]) - LEAQ (Y_PTR)(INC_Y*4), Y_PTR // Y_PTR = &(Y_PTR[incY*4]) - DECQ LEN - JNZ loop // } while --LEN > 0 - CMPQ TAIL, $0 // if TAIL == 0 { return } - JE end - -tail_start: // Reset Loop registers - MOVQ TAIL, LEN // Loop counter: LEN = TAIL - SHRQ $1, LEN // LEN = floor( LEN / 2 ) - JZ tail_one - -tail_two: - MOVSD (X_PTR), X2 // X_i = x[i] - MOVSD (X_PTR)(INC_X*1), X3 - MULSD ALPHA, X2 // X_i *= a - MULSD ALPHA, X3 - ADDSD (Y_PTR), X2 // X_i += y[i] - ADDSD (Y_PTR)(INC_Y*1), X3 - MOVSD X2, (DST_PTR) // y[i] = X_i - MOVSD X3, (DST_PTR)(INC_DST*1) - - LEAQ (X_PTR)(INC_X*2), X_PTR // X_PTR = &(X_PTR[incX*2]) - LEAQ (Y_PTR)(INC_Y*2), Y_PTR // Y_PTR = &(Y_PTR[incY*2]) - - ANDQ $1, TAIL - JZ end // if TAIL == 0 { goto end } - -tail_one: - // y[i] += alpha * x[i] for the last n % 4 iterations. - MOVSD (X_PTR), X2 // X2 = x[i] - MULSD ALPHA, X2 // X2 *= a - ADDSD (Y_PTR), X2 // X2 += y[i] - MOVSD X2, (DST_PTR) // y[i] = X2 - -end: - RET diff --git a/vendor/gonum.org/v1/gonum/internal/asm/f64/axpyincto_amd64.s b/vendor/gonum.org/v1/gonum/internal/asm/f64/axpyincto_amd64.s deleted file mode 100644 index dcb79d878e..0000000000 --- a/vendor/gonum.org/v1/gonum/internal/asm/f64/axpyincto_amd64.s +++ /dev/null @@ -1,148 +0,0 @@ -// Copyright ©2015 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. -// -// Some of the loop unrolling code is copied from: -// http://golang.org/src/math/big/arith_amd64.s -// which is distributed under these terms: -// -// Copyright (c) 2012 The Go Authors. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -//+build !noasm,!appengine,!safe - -#include "textflag.h" - -#define X_PTR SI -#define Y_PTR DI -#define DST_PTR DX -#define IDX AX -#define LEN CX -#define TAIL BX -#define INC_X R8 -#define INCx3_X R11 -#define INC_Y R9 -#define INCx3_Y R12 -#define INC_DST R10 -#define INCx3_DST R13 -#define ALPHA X0 -#define ALPHA_2 X1 - -// func AxpyIncTo(dst []float64, incDst, idst uintptr, alpha float64, x, y []float64, n, incX, incY, ix, iy uintptr) -TEXT ·AxpyIncTo(SB), NOSPLIT, $0 - MOVQ dst_base+0(FP), DST_PTR // DST_PTR := &dst - MOVQ x_base+48(FP), X_PTR // X_PTR := &x - MOVQ y_base+72(FP), Y_PTR // Y_PTR := &y - MOVQ n+96(FP), LEN // LEN := n - CMPQ LEN, $0 // if LEN == 0 { return } - JE end - - MOVQ ix+120(FP), INC_X - LEAQ (X_PTR)(INC_X*8), X_PTR // X_PTR = &(x[ix]) - MOVQ iy+128(FP), INC_Y - LEAQ (Y_PTR)(INC_Y*8), Y_PTR // Y_PTR = &(dst[idst]) - MOVQ idst+32(FP), INC_DST - LEAQ (DST_PTR)(INC_DST*8), DST_PTR // DST_PTR = &(y[iy]) - - MOVQ incX+104(FP), INC_X // INC_X = incX * sizeof(float64) - SHLQ $3, INC_X - MOVQ incY+112(FP), INC_Y // INC_Y = incY * sizeof(float64) - SHLQ $3, INC_Y - MOVQ incDst+24(FP), INC_DST // INC_DST = incDst * sizeof(float64) - SHLQ $3, INC_DST - MOVSD alpha+40(FP), ALPHA - - MOVQ LEN, TAIL - ANDQ $3, TAIL // TAIL = n % 4 - SHRQ $2, LEN // LEN = floor( n / 4 ) - JZ tail_start // if LEN == 0 { goto tail_start } - - MOVSD ALPHA, ALPHA_2 // ALPHA_2 = ALPHA for pipelining - LEAQ (INC_X)(INC_X*2), INCx3_X // INCx3_X = INC_X * 3 - LEAQ (INC_Y)(INC_Y*2), INCx3_Y // INCx3_Y = INC_Y * 3 - LEAQ (INC_DST)(INC_DST*2), INCx3_DST // INCx3_DST = INC_DST * 3 - -loop: // do { // y[i] += alpha * x[i] unrolled 2x. - MOVSD (X_PTR), X2 // X_i = x[i] - MOVSD (X_PTR)(INC_X*1), X3 - MOVSD (X_PTR)(INC_X*2), X4 - MOVSD (X_PTR)(INCx3_X*1), X5 - - MULSD ALPHA, X2 // X_i *= a - MULSD ALPHA_2, X3 - MULSD ALPHA, X4 - MULSD ALPHA_2, X5 - - ADDSD (Y_PTR), X2 // X_i += y[i] - ADDSD (Y_PTR)(INC_Y*1), X3 - ADDSD (Y_PTR)(INC_Y*2), X4 - ADDSD (Y_PTR)(INCx3_Y*1), X5 - - MOVSD X2, (DST_PTR) // y[i] = X_i - MOVSD X3, (DST_PTR)(INC_DST*1) - MOVSD X4, (DST_PTR)(INC_DST*2) - MOVSD X5, (DST_PTR)(INCx3_DST*1) - - LEAQ (X_PTR)(INC_X*4), X_PTR // X_PTR = &(X_PTR[incX*4]) - LEAQ (Y_PTR)(INC_Y*4), Y_PTR // Y_PTR = &(Y_PTR[incY*4]) - LEAQ (DST_PTR)(INC_DST*4), DST_PTR // DST_PTR = &(DST_PTR[incDst*4] - DECQ LEN - JNZ loop // } while --LEN > 0 - CMPQ TAIL, $0 // if TAIL == 0 { return } - JE end - -tail_start: // Reset Loop registers - MOVQ TAIL, LEN // Loop counter: LEN = TAIL - SHRQ $1, LEN // LEN = floor( LEN / 2 ) - JZ tail_one - -tail_two: - MOVSD (X_PTR), X2 // X_i = x[i] - MOVSD (X_PTR)(INC_X*1), X3 - MULSD ALPHA, X2 // X_i *= a - MULSD ALPHA, X3 - ADDSD (Y_PTR), X2 // X_i += y[i] - ADDSD (Y_PTR)(INC_Y*1), X3 - MOVSD X2, (DST_PTR) // y[i] = X_i - MOVSD X3, (DST_PTR)(INC_DST*1) - - LEAQ (X_PTR)(INC_X*2), X_PTR // X_PTR = &(X_PTR[incX*2]) - LEAQ (Y_PTR)(INC_Y*2), Y_PTR // Y_PTR = &(Y_PTR[incY*2]) - LEAQ (DST_PTR)(INC_DST*2), DST_PTR // DST_PTR = &(DST_PTR[incY*2] - - ANDQ $1, TAIL - JZ end // if TAIL == 0 { goto end } - -tail_one: - MOVSD (X_PTR), X2 // X2 = x[i] - MULSD ALPHA, X2 // X2 *= a - ADDSD (Y_PTR), X2 // X2 += y[i] - MOVSD X2, (DST_PTR) // y[i] = X2 - -end: - RET diff --git a/vendor/gonum.org/v1/gonum/internal/asm/f64/axpyunitary_amd64.s b/vendor/gonum.org/v1/gonum/internal/asm/f64/axpyunitary_amd64.s deleted file mode 100644 index bc290a1528..0000000000 --- a/vendor/gonum.org/v1/gonum/internal/asm/f64/axpyunitary_amd64.s +++ /dev/null @@ -1,134 +0,0 @@ -// Copyright ©2015 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. -// -// Some of the loop unrolling code is copied from: -// http://golang.org/src/math/big/arith_amd64.s -// which is distributed under these terms: -// -// Copyright (c) 2012 The Go Authors. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -//+build !noasm,!appengine,!safe - -#include "textflag.h" - -#define X_PTR SI -#define Y_PTR DI -#define DST_PTR DI -#define IDX AX -#define LEN CX -#define TAIL BX -#define ALPHA X0 -#define ALPHA_2 X1 - -// func AxpyUnitary(alpha float64, x, y []float64) -TEXT ·AxpyUnitary(SB), NOSPLIT, $0 - MOVQ x_base+8(FP), X_PTR // X_PTR := &x - MOVQ y_base+32(FP), Y_PTR // Y_PTR := &y - MOVQ x_len+16(FP), LEN // LEN = min( len(x), len(y) ) - CMPQ y_len+40(FP), LEN - CMOVQLE y_len+40(FP), LEN - CMPQ LEN, $0 // if LEN == 0 { return } - JE end - XORQ IDX, IDX - MOVSD alpha+0(FP), ALPHA // ALPHA := { alpha, alpha } - SHUFPD $0, ALPHA, ALPHA - MOVUPS ALPHA, ALPHA_2 // ALPHA_2 := ALPHA for pipelining - MOVQ Y_PTR, TAIL // Check memory alignment - ANDQ $15, TAIL // TAIL = &y % 16 - JZ no_trim // if TAIL == 0 { goto no_trim } - - // Align on 16-byte boundary - MOVSD (X_PTR), X2 // X2 := x[0] - MULSD ALPHA, X2 // X2 *= a - ADDSD (Y_PTR), X2 // X2 += y[0] - MOVSD X2, (DST_PTR) // y[0] = X2 - INCQ IDX // i++ - DECQ LEN // LEN-- - JZ end // if LEN == 0 { return } - -no_trim: - MOVQ LEN, TAIL - ANDQ $7, TAIL // TAIL := n % 8 - SHRQ $3, LEN // LEN = floor( n / 8 ) - JZ tail_start // if LEN == 0 { goto tail2_start } - -loop: // do { - // y[i] += alpha * x[i] unrolled 8x. - MOVUPS (X_PTR)(IDX*8), X2 // X_i = x[i] - MOVUPS 16(X_PTR)(IDX*8), X3 - MOVUPS 32(X_PTR)(IDX*8), X4 - MOVUPS 48(X_PTR)(IDX*8), X5 - - MULPD ALPHA, X2 // X_i *= a - MULPD ALPHA_2, X3 - MULPD ALPHA, X4 - MULPD ALPHA_2, X5 - - ADDPD (Y_PTR)(IDX*8), X2 // X_i += y[i] - ADDPD 16(Y_PTR)(IDX*8), X3 - ADDPD 32(Y_PTR)(IDX*8), X4 - ADDPD 48(Y_PTR)(IDX*8), X5 - - MOVUPS X2, (DST_PTR)(IDX*8) // y[i] = X_i - MOVUPS X3, 16(DST_PTR)(IDX*8) - MOVUPS X4, 32(DST_PTR)(IDX*8) - MOVUPS X5, 48(DST_PTR)(IDX*8) - - ADDQ $8, IDX // i += 8 - DECQ LEN - JNZ loop // } while --LEN > 0 - CMPQ TAIL, $0 // if TAIL == 0 { return } - JE end - -tail_start: // Reset loop registers - MOVQ TAIL, LEN // Loop counter: LEN = TAIL - SHRQ $1, LEN // LEN = floor( TAIL / 2 ) - JZ tail_one // if TAIL == 0 { goto tail } - -tail_two: // do { - MOVUPS (X_PTR)(IDX*8), X2 // X2 = x[i] - MULPD ALPHA, X2 // X2 *= a - ADDPD (Y_PTR)(IDX*8), X2 // X2 += y[i] - MOVUPS X2, (DST_PTR)(IDX*8) // y[i] = X2 - ADDQ $2, IDX // i += 2 - DECQ LEN - JNZ tail_two // } while --LEN > 0 - - ANDQ $1, TAIL - JZ end // if TAIL == 0 { goto end } - -tail_one: - MOVSD (X_PTR)(IDX*8), X2 // X2 = x[i] - MULSD ALPHA, X2 // X2 *= a - ADDSD (Y_PTR)(IDX*8), X2 // X2 += y[i] - MOVSD X2, (DST_PTR)(IDX*8) // y[i] = X2 - -end: - RET diff --git a/vendor/gonum.org/v1/gonum/internal/asm/f64/axpyunitaryto_amd64.s b/vendor/gonum.org/v1/gonum/internal/asm/f64/axpyunitaryto_amd64.s deleted file mode 100644 index 16798ebaab..0000000000 --- a/vendor/gonum.org/v1/gonum/internal/asm/f64/axpyunitaryto_amd64.s +++ /dev/null @@ -1,140 +0,0 @@ -// Copyright ©2015 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. -// -// Some of the loop unrolling code is copied from: -// http://golang.org/src/math/big/arith_amd64.s -// which is distributed under these terms: -// -// Copyright (c) 2012 The Go Authors. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -//+build !noasm,!appengine,!safe - -#include "textflag.h" - -#define X_PTR SI -#define Y_PTR DX -#define DST_PTR DI -#define IDX AX -#define LEN CX -#define TAIL BX -#define ALPHA X0 -#define ALPHA_2 X1 - -// func AxpyUnitaryTo(dst []float64, alpha float64, x, y []float64) -TEXT ·AxpyUnitaryTo(SB), NOSPLIT, $0 - MOVQ dst_base+0(FP), DST_PTR // DST_PTR := &dst - MOVQ x_base+32(FP), X_PTR // X_PTR := &x - MOVQ y_base+56(FP), Y_PTR // Y_PTR := &y - MOVQ x_len+40(FP), LEN // LEN = min( len(x), len(y), len(dst) ) - CMPQ y_len+64(FP), LEN - CMOVQLE y_len+64(FP), LEN - CMPQ dst_len+8(FP), LEN - CMOVQLE dst_len+8(FP), LEN - - CMPQ LEN, $0 - JE end // if LEN == 0 { return } - - XORQ IDX, IDX // IDX = 0 - MOVSD alpha+24(FP), ALPHA - SHUFPD $0, ALPHA, ALPHA // ALPHA := { alpha, alpha } - MOVQ Y_PTR, TAIL // Check memory alignment - ANDQ $15, TAIL // TAIL = &y % 16 - JZ no_trim // if TAIL == 0 { goto no_trim } - - // Align on 16-byte boundary - MOVSD (X_PTR), X2 // X2 := x[0] - MULSD ALPHA, X2 // X2 *= a - ADDSD (Y_PTR), X2 // X2 += y[0] - MOVSD X2, (DST_PTR) // y[0] = X2 - INCQ IDX // i++ - DECQ LEN // LEN-- - JZ end // if LEN == 0 { return } - -no_trim: - MOVQ LEN, TAIL - ANDQ $7, TAIL // TAIL := n % 8 - SHRQ $3, LEN // LEN = floor( n / 8 ) - JZ tail_start // if LEN == 0 { goto tail_start } - - MOVUPS ALPHA, ALPHA_2 // ALPHA_2 := ALPHA for pipelining - -loop: // do { - // y[i] += alpha * x[i] unrolled 8x. - MOVUPS (X_PTR)(IDX*8), X2 // X_i = x[i] - MOVUPS 16(X_PTR)(IDX*8), X3 - MOVUPS 32(X_PTR)(IDX*8), X4 - MOVUPS 48(X_PTR)(IDX*8), X5 - - MULPD ALPHA, X2 // X_i *= alpha - MULPD ALPHA_2, X3 - MULPD ALPHA, X4 - MULPD ALPHA_2, X5 - - ADDPD (Y_PTR)(IDX*8), X2 // X_i += y[i] - ADDPD 16(Y_PTR)(IDX*8), X3 - ADDPD 32(Y_PTR)(IDX*8), X4 - ADDPD 48(Y_PTR)(IDX*8), X5 - - MOVUPS X2, (DST_PTR)(IDX*8) // y[i] = X_i - MOVUPS X3, 16(DST_PTR)(IDX*8) - MOVUPS X4, 32(DST_PTR)(IDX*8) - MOVUPS X5, 48(DST_PTR)(IDX*8) - - ADDQ $8, IDX // i += 8 - DECQ LEN - JNZ loop // } while --LEN > 0 - CMPQ TAIL, $0 // if TAIL == 0 { return } - JE end - -tail_start: // Reset loop registers - MOVQ TAIL, LEN // Loop counter: LEN = TAIL - SHRQ $1, LEN // LEN = floor( TAIL / 2 ) - JZ tail_one // if LEN == 0 { goto tail } - -tail_two: // do { - MOVUPS (X_PTR)(IDX*8), X2 // X2 = x[i] - MULPD ALPHA, X2 // X2 *= alpha - ADDPD (Y_PTR)(IDX*8), X2 // X2 += y[i] - MOVUPS X2, (DST_PTR)(IDX*8) // y[i] = X2 - ADDQ $2, IDX // i += 2 - DECQ LEN - JNZ tail_two // } while --LEN > 0 - - ANDQ $1, TAIL - JZ end // if TAIL == 0 { goto end } - -tail_one: - MOVSD (X_PTR)(IDX*8), X2 // X2 = x[i] - MULSD ALPHA, X2 // X2 *= a - ADDSD (Y_PTR)(IDX*8), X2 // X2 += y[i] - MOVSD X2, (DST_PTR)(IDX*8) // y[i] = X2 - -end: - RET diff --git a/vendor/gonum.org/v1/gonum/internal/asm/f64/cumprod_amd64.s b/vendor/gonum.org/v1/gonum/internal/asm/f64/cumprod_amd64.s deleted file mode 100644 index 32bd1572b7..0000000000 --- a/vendor/gonum.org/v1/gonum/internal/asm/f64/cumprod_amd64.s +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright ©2016 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build !noasm,!appengine,!safe - -#include "textflag.h" - -TEXT ·CumProd(SB), NOSPLIT, $0 - MOVQ dst_base+0(FP), DI // DI = &dst - MOVQ dst_len+8(FP), CX // CX = len(dst) - MOVQ s_base+24(FP), SI // SI = &s - CMPQ s_len+32(FP), CX // CX = max( CX, len(s) ) - CMOVQLE s_len+32(FP), CX - MOVQ CX, ret_len+56(FP) // len(ret) = CX - CMPQ CX, $0 // if CX == 0 { return } - JE cp_end - XORQ AX, AX // i = 0 - - MOVSD (SI), X5 // p_prod = { s[0], s[0] } - SHUFPD $0, X5, X5 - MOVSD X5, (DI) // dst[0] = s[0] - INCQ AX // ++i - DECQ CX // -- CX - JZ cp_end // if CX == 0 { return } - - MOVQ CX, BX - ANDQ $3, BX // BX = CX % 4 - SHRQ $2, CX // CX = floor( CX / 4 ) - JZ cp_tail_start // if CX == 0 { goto cp_tail_start } - -cp_loop: // Loop unrolled 4x do { - MOVUPS (SI)(AX*8), X0 // X0 = s[i:i+1] - MOVUPS 16(SI)(AX*8), X2 - MOVAPS X0, X1 // X1 = X0 - MOVAPS X2, X3 - SHUFPD $1, X1, X1 // { X1[0], X1[1] } = { X1[1], X1[0] } - SHUFPD $1, X3, X3 - MULPD X0, X1 // X1 *= X0 - MULPD X2, X3 - SHUFPD $2, X1, X0 // { X0[0], X0[1] } = { X0[0], X1[1] } - SHUFPD $3, X1, X1 // { X1[0], X1[1] } = { X1[1], X1[1] } - SHUFPD $2, X3, X2 - SHUFPD $3, X3, X3 - MULPD X5, X0 // X0 *= p_prod - MULPD X1, X5 // p_prod *= X1 - MULPD X5, X2 - MOVUPS X0, (DI)(AX*8) // dst[i] = X0 - MOVUPS X2, 16(DI)(AX*8) - MULPD X3, X5 - ADDQ $4, AX // i += 4 - LOOP cp_loop // } while --CX > 0 - - // if BX == 0 { return } - CMPQ BX, $0 - JE cp_end - -cp_tail_start: // Reset loop registers - MOVQ BX, CX // Loop counter: CX = BX - -cp_tail: // do { - MULSD (SI)(AX*8), X5 // p_prod *= s[i] - MOVSD X5, (DI)(AX*8) // dst[i] = p_prod - INCQ AX // ++i - LOOP cp_tail // } while --CX > 0 - -cp_end: - MOVQ DI, ret_base+48(FP) // &ret = &dst - MOVQ dst_cap+16(FP), SI // cap(ret) = cap(dst) - MOVQ SI, ret_cap+64(FP) - RET diff --git a/vendor/gonum.org/v1/gonum/internal/asm/f64/cumsum_amd64.s b/vendor/gonum.org/v1/gonum/internal/asm/f64/cumsum_amd64.s deleted file mode 100644 index 10d7fdab91..0000000000 --- a/vendor/gonum.org/v1/gonum/internal/asm/f64/cumsum_amd64.s +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright ©2016 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build !noasm,!appengine,!safe - -#include "textflag.h" - -TEXT ·CumSum(SB), NOSPLIT, $0 - MOVQ dst_base+0(FP), DI // DI = &dst - MOVQ dst_len+8(FP), CX // CX = len(dst) - MOVQ s_base+24(FP), SI // SI = &s - CMPQ s_len+32(FP), CX // CX = max( CX, len(s) ) - CMOVQLE s_len+32(FP), CX - MOVQ CX, ret_len+56(FP) // len(ret) = CX - CMPQ CX, $0 // if CX == 0 { return } - JE cs_end - XORQ AX, AX // i = 0 - PXOR X5, X5 // p_sum = 0 - MOVQ CX, BX - ANDQ $3, BX // BX = CX % 4 - SHRQ $2, CX // CX = floor( CX / 4 ) - JZ cs_tail_start // if CX == 0 { goto cs_tail_start } - -cs_loop: // Loop unrolled 4x do { - MOVUPS (SI)(AX*8), X0 // X0 = s[i:i+1] - MOVUPS 16(SI)(AX*8), X2 - MOVAPS X0, X1 // X1 = X0 - MOVAPS X2, X3 - SHUFPD $1, X1, X1 // { X1[0], X1[1] } = { X1[1], X1[0] } - SHUFPD $1, X3, X3 - ADDPD X0, X1 // X1 += X0 - ADDPD X2, X3 - SHUFPD $2, X1, X0 // { X0[0], X0[1] } = { X0[0], X1[1] } - SHUFPD $3, X1, X1 // { X1[0], X1[1] } = { X1[1], X1[1] } - SHUFPD $2, X3, X2 - SHUFPD $3, X3, X3 - ADDPD X5, X0 // X0 += p_sum - ADDPD X1, X5 // p_sum += X1 - ADDPD X5, X2 - MOVUPS X0, (DI)(AX*8) // dst[i] = X0 - MOVUPS X2, 16(DI)(AX*8) - ADDPD X3, X5 - ADDQ $4, AX // i += 4 - LOOP cs_loop // } while --CX > 0 - - // if BX == 0 { return } - CMPQ BX, $0 - JE cs_end - -cs_tail_start: // Reset loop registers - MOVQ BX, CX // Loop counter: CX = BX - -cs_tail: // do { - ADDSD (SI)(AX*8), X5 // p_sum *= s[i] - MOVSD X5, (DI)(AX*8) // dst[i] = p_sum - INCQ AX // ++i - LOOP cs_tail // } while --CX > 0 - -cs_end: - MOVQ DI, ret_base+48(FP) // &ret = &dst - MOVQ dst_cap+16(FP), SI // cap(ret) = cap(dst) - MOVQ SI, ret_cap+64(FP) - RET diff --git a/vendor/gonum.org/v1/gonum/internal/asm/f64/div_amd64.s b/vendor/gonum.org/v1/gonum/internal/asm/f64/div_amd64.s deleted file mode 100644 index 1a4e9eec9a..0000000000 --- a/vendor/gonum.org/v1/gonum/internal/asm/f64/div_amd64.s +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright ©2016 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build !noasm,!appengine,!safe - -#include "textflag.h" - -// func Div(dst, s []float64) -TEXT ·Div(SB), NOSPLIT, $0 - MOVQ dst_base+0(FP), DI // DI = &dst - MOVQ dst_len+8(FP), CX // CX = len(dst) - MOVQ s_base+24(FP), SI // SI = &s - CMPQ s_len+32(FP), CX // CX = max( CX, len(s) ) - CMOVQLE s_len+32(FP), CX - CMPQ CX, $0 // if CX == 0 { return } - JE div_end - XORQ AX, AX // i = 0 - MOVQ SI, BX - ANDQ $15, BX // BX = &s & 15 - JZ div_no_trim // if BX == 0 { goto div_no_trim } - - // Align on 16-bit boundary - MOVSD (DI)(AX*8), X0 // X0 = dst[i] - DIVSD (SI)(AX*8), X0 // X0 /= s[i] - MOVSD X0, (DI)(AX*8) // dst[i] = X0 - INCQ AX // ++i - DECQ CX // --CX - JZ div_end // if CX == 0 { return } - -div_no_trim: - MOVQ CX, BX - ANDQ $7, BX // BX = len(dst) % 8 - SHRQ $3, CX // CX = floor( len(dst) / 8 ) - JZ div_tail_start // if CX == 0 { goto div_tail_start } - -div_loop: // Loop unrolled 8x do { - MOVUPS (DI)(AX*8), X0 // X0 = dst[i:i+1] - MOVUPS 16(DI)(AX*8), X1 - MOVUPS 32(DI)(AX*8), X2 - MOVUPS 48(DI)(AX*8), X3 - DIVPD (SI)(AX*8), X0 // X0 /= s[i:i+1] - DIVPD 16(SI)(AX*8), X1 - DIVPD 32(SI)(AX*8), X2 - DIVPD 48(SI)(AX*8), X3 - MOVUPS X0, (DI)(AX*8) // dst[i] = X0 - MOVUPS X1, 16(DI)(AX*8) - MOVUPS X2, 32(DI)(AX*8) - MOVUPS X3, 48(DI)(AX*8) - ADDQ $8, AX // i += 8 - LOOP div_loop // } while --CX > 0 - CMPQ BX, $0 // if BX == 0 { return } - JE div_end - -div_tail_start: // Reset loop registers - MOVQ BX, CX // Loop counter: CX = BX - -div_tail: // do { - MOVSD (DI)(AX*8), X0 // X0 = dst[i] - DIVSD (SI)(AX*8), X0 // X0 /= s[i] - MOVSD X0, (DI)(AX*8) // dst[i] = X0 - INCQ AX // ++i - LOOP div_tail // } while --CX > 0 - -div_end: - RET - diff --git a/vendor/gonum.org/v1/gonum/internal/asm/f64/divto_amd64.s b/vendor/gonum.org/v1/gonum/internal/asm/f64/divto_amd64.s deleted file mode 100644 index 16ab9b7ec6..0000000000 --- a/vendor/gonum.org/v1/gonum/internal/asm/f64/divto_amd64.s +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright ©2016 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build !noasm,!appengine,!safe - -#include "textflag.h" - -// func DivTo(dst, x, y []float64) -TEXT ·DivTo(SB), NOSPLIT, $0 - MOVQ dst_base+0(FP), DI // DI = &dst - MOVQ dst_len+8(FP), CX // CX = len(dst) - MOVQ x_base+24(FP), SI // SI = &x - MOVQ y_base+48(FP), DX // DX = &y - CMPQ x_len+32(FP), CX // CX = max( len(dst), len(x), len(y) ) - CMOVQLE x_len+32(FP), CX - CMPQ y_len+56(FP), CX - CMOVQLE y_len+56(FP), CX - MOVQ CX, ret_len+80(FP) // len(ret) = CX - CMPQ CX, $0 // if CX == 0 { return } - JE div_end - XORQ AX, AX // i = 0 - MOVQ DX, BX - ANDQ $15, BX // BX = &y & OxF - JZ div_no_trim // if BX == 0 { goto div_no_trim } - - // Align on 16-bit boundary - MOVSD (SI)(AX*8), X0 // X0 = s[i] - DIVSD (DX)(AX*8), X0 // X0 /= t[i] - MOVSD X0, (DI)(AX*8) // dst[i] = X0 - INCQ AX // ++i - DECQ CX // --CX - JZ div_end // if CX == 0 { return } - -div_no_trim: - MOVQ CX, BX - ANDQ $7, BX // BX = len(dst) % 8 - SHRQ $3, CX // CX = floor( len(dst) / 8 ) - JZ div_tail_start // if CX == 0 { goto div_tail_start } - -div_loop: // Loop unrolled 8x do { - MOVUPS (SI)(AX*8), X0 // X0 = x[i:i+1] - MOVUPS 16(SI)(AX*8), X1 - MOVUPS 32(SI)(AX*8), X2 - MOVUPS 48(SI)(AX*8), X3 - DIVPD (DX)(AX*8), X0 // X0 /= y[i:i+1] - DIVPD 16(DX)(AX*8), X1 - DIVPD 32(DX)(AX*8), X2 - DIVPD 48(DX)(AX*8), X3 - MOVUPS X0, (DI)(AX*8) // dst[i:i+1] = X0 - MOVUPS X1, 16(DI)(AX*8) - MOVUPS X2, 32(DI)(AX*8) - MOVUPS X3, 48(DI)(AX*8) - ADDQ $8, AX // i += 8 - LOOP div_loop // } while --CX > 0 - CMPQ BX, $0 // if BX == 0 { return } - JE div_end - -div_tail_start: // Reset loop registers - MOVQ BX, CX // Loop counter: CX = BX - -div_tail: // do { - MOVSD (SI)(AX*8), X0 // X0 = x[i] - DIVSD (DX)(AX*8), X0 // X0 /= y[i] - MOVSD X0, (DI)(AX*8) - INCQ AX // ++i - LOOP div_tail // } while --CX > 0 - -div_end: - MOVQ DI, ret_base+72(FP) // &ret = &dst - MOVQ dst_cap+16(FP), DI // cap(ret) = cap(dst) - MOVQ DI, ret_cap+88(FP) - RET diff --git a/vendor/gonum.org/v1/gonum/internal/asm/f64/doc.go b/vendor/gonum.org/v1/gonum/internal/asm/f64/doc.go deleted file mode 100644 index 33c76c1e03..0000000000 --- a/vendor/gonum.org/v1/gonum/internal/asm/f64/doc.go +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright ©2017 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package f64 provides float64 vector primitives. -package f64 // import "gonum.org/v1/gonum/internal/asm/f64" diff --git a/vendor/gonum.org/v1/gonum/internal/asm/f64/dot.go b/vendor/gonum.org/v1/gonum/internal/asm/f64/dot.go deleted file mode 100644 index b77138d1a8..0000000000 --- a/vendor/gonum.org/v1/gonum/internal/asm/f64/dot.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright ©2015 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build !amd64 noasm appengine safe - -package f64 - -// DotUnitary is -// for i, v := range x { -// sum += y[i] * v -// } -// return sum -func DotUnitary(x, y []float64) (sum float64) { - for i, v := range x { - sum += y[i] * v - } - return sum -} - -// DotInc is -// for i := 0; i < int(n); i++ { -// sum += y[iy] * x[ix] -// ix += incX -// iy += incY -// } -// return sum -func DotInc(x, y []float64, n, incX, incY, ix, iy uintptr) (sum float64) { - for i := 0; i < int(n); i++ { - sum += y[iy] * x[ix] - ix += incX - iy += incY - } - return sum -} diff --git a/vendor/gonum.org/v1/gonum/internal/asm/f64/dot_amd64.s b/vendor/gonum.org/v1/gonum/internal/asm/f64/dot_amd64.s deleted file mode 100644 index eff25059f1..0000000000 --- a/vendor/gonum.org/v1/gonum/internal/asm/f64/dot_amd64.s +++ /dev/null @@ -1,145 +0,0 @@ -// Copyright ©2015 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. -// -// Some of the loop unrolling code is copied from: -// http://golang.org/src/math/big/arith_amd64.s -// which is distributed under these terms: -// -// Copyright (c) 2012 The Go Authors. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -//+build !noasm,!appengine,!safe - -#include "textflag.h" - -// func DdotUnitary(x, y []float64) (sum float64) -// This function assumes len(y) >= len(x). -TEXT ·DotUnitary(SB), NOSPLIT, $0 - MOVQ x+0(FP), R8 - MOVQ x_len+8(FP), DI // n = len(x) - MOVQ y+24(FP), R9 - - MOVSD $(0.0), X7 // sum = 0 - MOVSD $(0.0), X8 // sum = 0 - - MOVQ $0, SI // i = 0 - SUBQ $4, DI // n -= 4 - JL tail_uni // if n < 0 goto tail_uni - -loop_uni: - // sum += x[i] * y[i] unrolled 4x. - MOVUPD 0(R8)(SI*8), X0 - MOVUPD 0(R9)(SI*8), X1 - MOVUPD 16(R8)(SI*8), X2 - MOVUPD 16(R9)(SI*8), X3 - MULPD X1, X0 - MULPD X3, X2 - ADDPD X0, X7 - ADDPD X2, X8 - - ADDQ $4, SI // i += 4 - SUBQ $4, DI // n -= 4 - JGE loop_uni // if n >= 0 goto loop_uni - -tail_uni: - ADDQ $4, DI // n += 4 - JLE end_uni // if n <= 0 goto end_uni - -onemore_uni: - // sum += x[i] * y[i] for the remaining 1-3 elements. - MOVSD 0(R8)(SI*8), X0 - MOVSD 0(R9)(SI*8), X1 - MULSD X1, X0 - ADDSD X0, X7 - - ADDQ $1, SI // i++ - SUBQ $1, DI // n-- - JNZ onemore_uni // if n != 0 goto onemore_uni - -end_uni: - // Add the four sums together. - ADDPD X8, X7 - MOVSD X7, X0 - UNPCKHPD X7, X7 - ADDSD X0, X7 - MOVSD X7, sum+48(FP) // Return final sum. - RET - -// func DdotInc(x, y []float64, n, incX, incY, ix, iy uintptr) (sum float64) -TEXT ·DotInc(SB), NOSPLIT, $0 - MOVQ x+0(FP), R8 - MOVQ y+24(FP), R9 - MOVQ n+48(FP), CX - MOVQ incX+56(FP), R11 - MOVQ incY+64(FP), R12 - MOVQ ix+72(FP), R13 - MOVQ iy+80(FP), R14 - - MOVSD $(0.0), X7 // sum = 0 - LEAQ (R8)(R13*8), SI // p = &x[ix] - LEAQ (R9)(R14*8), DI // q = &y[ix] - SHLQ $3, R11 // incX *= sizeof(float64) - SHLQ $3, R12 // indY *= sizeof(float64) - - SUBQ $2, CX // n -= 2 - JL tail_inc // if n < 0 goto tail_inc - -loop_inc: - // sum += *p * *q unrolled 2x. - MOVHPD (SI), X0 - MOVHPD (DI), X1 - ADDQ R11, SI // p += incX - ADDQ R12, DI // q += incY - MOVLPD (SI), X0 - MOVLPD (DI), X1 - ADDQ R11, SI // p += incX - ADDQ R12, DI // q += incY - - MULPD X1, X0 - ADDPD X0, X7 - - SUBQ $2, CX // n -= 2 - JGE loop_inc // if n >= 0 goto loop_inc - -tail_inc: - ADDQ $2, CX // n += 2 - JLE end_inc // if n <= 0 goto end_inc - - // sum += *p * *q for the last iteration if n is odd. - MOVSD (SI), X0 - MULSD (DI), X0 - ADDSD X0, X7 - -end_inc: - // Add the two sums together. - MOVSD X7, X0 - UNPCKHPD X7, X7 - ADDSD X0, X7 - MOVSD X7, sum+88(FP) // Return final sum. - RET diff --git a/vendor/gonum.org/v1/gonum/internal/asm/f64/ge_amd64.go b/vendor/gonum.org/v1/gonum/internal/asm/f64/ge_amd64.go deleted file mode 100644 index 00c99e9323..0000000000 --- a/vendor/gonum.org/v1/gonum/internal/asm/f64/ge_amd64.go +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright ©2017 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build !noasm,!appengine,!safe - -package f64 - -// Ger performs the rank-one operation -// A += alpha * x * y^T -// where A is an m×n dense matrix, x and y are vectors, and alpha is a scalar. -func Ger(m, n uintptr, alpha float64, x []float64, incX uintptr, y []float64, incY uintptr, a []float64, lda uintptr) - -// GemvN computes -// y = alpha * A * x + beta * y -// where A is an m×n dense matrix, x and y are vectors, and alpha and beta are scalars. -func GemvN(m, n uintptr, alpha float64, a []float64, lda uintptr, x []float64, incX uintptr, beta float64, y []float64, incY uintptr) - -// GemvT computes -// y = alpha * A^T * x + beta * y -// where A is an m×n dense matrix, x and y are vectors, and alpha and beta are scalars. -func GemvT(m, n uintptr, alpha float64, a []float64, lda uintptr, x []float64, incX uintptr, beta float64, y []float64, incY uintptr) diff --git a/vendor/gonum.org/v1/gonum/internal/asm/f64/ge_noasm.go b/vendor/gonum.org/v1/gonum/internal/asm/f64/ge_noasm.go deleted file mode 100644 index 2a1cfd5cdd..0000000000 --- a/vendor/gonum.org/v1/gonum/internal/asm/f64/ge_noasm.go +++ /dev/null @@ -1,118 +0,0 @@ -// Copyright ©2017 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build !amd64 noasm appengine safe - -package f64 - -// Ger performs the rank-one operation -// A += alpha * x * y^T -// where A is an m×n dense matrix, x and y are vectors, and alpha is a scalar. -func Ger(m, n uintptr, alpha float64, x []float64, incX uintptr, y []float64, incY uintptr, a []float64, lda uintptr) { - if incX == 1 && incY == 1 { - x = x[:m] - y = y[:n] - for i, xv := range x { - AxpyUnitary(alpha*xv, y, a[uintptr(i)*lda:uintptr(i)*lda+n]) - } - return - } - - var ky, kx uintptr - if int(incY) < 0 { - ky = uintptr(-int(n-1) * int(incY)) - } - if int(incX) < 0 { - kx = uintptr(-int(m-1) * int(incX)) - } - - ix := kx - for i := 0; i < int(m); i++ { - AxpyInc(alpha*x[ix], y, a[uintptr(i)*lda:uintptr(i)*lda+n], n, incY, 1, ky, 0) - ix += incX - } -} - -// GemvN computes -// y = alpha * A * x + beta * y -// where A is an m×n dense matrix, x and y are vectors, and alpha and beta are scalars. -func GemvN(m, n uintptr, alpha float64, a []float64, lda uintptr, x []float64, incX uintptr, beta float64, y []float64, incY uintptr) { - var kx, ky, i uintptr - if int(incX) < 0 { - kx = uintptr(-int(n-1) * int(incX)) - } - if int(incY) < 0 { - ky = uintptr(-int(m-1) * int(incY)) - } - - if incX == 1 && incY == 1 { - if beta == 0 { - for i = 0; i < m; i++ { - y[i] = alpha * DotUnitary(a[lda*i:lda*i+n], x) - } - return - } - for i = 0; i < m; i++ { - y[i] = y[i]*beta + alpha*DotUnitary(a[lda*i:lda*i+n], x) - } - return - } - iy := ky - if beta == 0 { - for i = 0; i < m; i++ { - y[iy] = alpha * DotInc(x, a[lda*i:lda*i+n], n, incX, 1, kx, 0) - iy += incY - } - return - } - for i = 0; i < m; i++ { - y[iy] = y[iy]*beta + alpha*DotInc(x, a[lda*i:lda*i+n], n, incX, 1, kx, 0) - iy += incY - } -} - -// GemvT computes -// y = alpha * A^T * x + beta * y -// where A is an m×n dense matrix, x and y are vectors, and alpha and beta are scalars. -func GemvT(m, n uintptr, alpha float64, a []float64, lda uintptr, x []float64, incX uintptr, beta float64, y []float64, incY uintptr) { - var kx, ky, i uintptr - if int(incX) < 0 { - kx = uintptr(-int(m-1) * int(incX)) - } - if int(incY) < 0 { - ky = uintptr(-int(n-1) * int(incY)) - } - switch { - case beta == 0: // beta == 0 is special-cased to memclear - if incY == 1 { - for i := range y { - y[i] = 0 - } - } else { - iy := ky - for i := 0; i < int(n); i++ { - y[iy] = 0 - iy += incY - } - } - case int(incY) < 0: - ScalInc(beta, y, n, uintptr(int(-incY))) - case incY == 1: - ScalUnitary(beta, y[:n]) - default: - ScalInc(beta, y, n, incY) - } - - if incX == 1 && incY == 1 { - for i = 0; i < m; i++ { - AxpyUnitaryTo(y, alpha*x[i], a[lda*i:lda*i+n], y) - } - return - } - ix := kx - for i = 0; i < m; i++ { - AxpyInc(alpha*x[ix], a[lda*i:lda*i+n], y, n, 1, incY, 0, ky) - ix += incX - } -} diff --git a/vendor/gonum.org/v1/gonum/internal/asm/f64/gemvN_amd64.s b/vendor/gonum.org/v1/gonum/internal/asm/f64/gemvN_amd64.s deleted file mode 100644 index 8d2a6a71a5..0000000000 --- a/vendor/gonum.org/v1/gonum/internal/asm/f64/gemvN_amd64.s +++ /dev/null @@ -1,685 +0,0 @@ -// Copyright ©2017 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//+build !noasm,!appengine,!safe - -#include "textflag.h" - -#define SIZE 8 - -#define M_DIM m+0(FP) -#define M CX -#define N_DIM n+8(FP) -#define N BX - -#define TMP1 R14 -#define TMP2 R15 - -#define X_PTR SI -#define X x_base+56(FP) -#define INC_X R8 -#define INC3_X R9 - -#define Y_PTR DX -#define Y y_base+96(FP) -#define INC_Y R10 -#define INC3_Y R11 - -#define A_ROW AX -#define A_PTR DI -#define LDA R12 -#define LDA3 R13 - -#define ALPHA X15 -#define BETA X14 - -#define INIT4 \ - XORPS X0, X0 \ - XORPS X1, X1 \ - XORPS X2, X2 \ - XORPS X3, X3 - -#define INIT2 \ - XORPS X0, X0 \ - XORPS X1, X1 - -#define INIT1 \ - XORPS X0, X0 - -#define KERNEL_LOAD4 \ - MOVUPS (X_PTR), X12 \ - MOVUPS 2*SIZE(X_PTR), X13 - -#define KERNEL_LOAD2 \ - MOVUPS (X_PTR), X12 - -#define KERNEL_LOAD4_INC \ - MOVSD (X_PTR), X12 \ - MOVHPD (X_PTR)(INC_X*1), X12 \ - MOVSD (X_PTR)(INC_X*2), X13 \ - MOVHPD (X_PTR)(INC3_X*1), X13 - -#define KERNEL_LOAD2_INC \ - MOVSD (X_PTR), X12 \ - MOVHPD (X_PTR)(INC_X*1), X12 - -#define KERNEL_4x4 \ - MOVUPS (A_PTR), X4 \ - MOVUPS 2*SIZE(A_PTR), X5 \ - MOVUPS (A_PTR)(LDA*1), X6 \ - MOVUPS 2*SIZE(A_PTR)(LDA*1), X7 \ - MOVUPS (A_PTR)(LDA*2), X8 \ - MOVUPS 2*SIZE(A_PTR)(LDA*2), X9 \ - MOVUPS (A_PTR)(LDA3*1), X10 \ - MOVUPS 2*SIZE(A_PTR)(LDA3*1), X11 \ - MULPD X12, X4 \ - MULPD X13, X5 \ - MULPD X12, X6 \ - MULPD X13, X7 \ - MULPD X12, X8 \ - MULPD X13, X9 \ - MULPD X12, X10 \ - MULPD X13, X11 \ - ADDPD X4, X0 \ - ADDPD X5, X0 \ - ADDPD X6, X1 \ - ADDPD X7, X1 \ - ADDPD X8, X2 \ - ADDPD X9, X2 \ - ADDPD X10, X3 \ - ADDPD X11, X3 \ - ADDQ $4*SIZE, A_PTR - -#define KERNEL_4x2 \ - MOVUPS (A_PTR), X4 \ - MOVUPS (A_PTR)(LDA*1), X5 \ - MOVUPS (A_PTR)(LDA*2), X6 \ - MOVUPS (A_PTR)(LDA3*1), X7 \ - MULPD X12, X4 \ - MULPD X12, X5 \ - MULPD X12, X6 \ - MULPD X12, X7 \ - ADDPD X4, X0 \ - ADDPD X5, X1 \ - ADDPD X6, X2 \ - ADDPD X7, X3 \ - ADDQ $2*SIZE, A_PTR - -#define KERNEL_4x1 \ - MOVDDUP (X_PTR), X12 \ - MOVSD (A_PTR), X4 \ - MOVHPD (A_PTR)(LDA*1), X4 \ - MOVSD (A_PTR)(LDA*2), X5 \ - MOVHPD (A_PTR)(LDA3*1), X5 \ - MULPD X12, X4 \ - MULPD X12, X5 \ - ADDPD X4, X0 \ - ADDPD X5, X2 \ - ADDQ $SIZE, A_PTR - -#define STORE4 \ - MOVUPS (Y_PTR), X4 \ - MOVUPS 2*SIZE(Y_PTR), X5 \ - MULPD ALPHA, X0 \ - MULPD ALPHA, X2 \ - MULPD BETA, X4 \ - MULPD BETA, X5 \ - ADDPD X0, X4 \ - ADDPD X2, X5 \ - MOVUPS X4, (Y_PTR) \ - MOVUPS X5, 2*SIZE(Y_PTR) - -#define STORE4_INC \ - MOVSD (Y_PTR), X4 \ - MOVHPD (Y_PTR)(INC_Y*1), X4 \ - MOVSD (Y_PTR)(INC_Y*2), X5 \ - MOVHPD (Y_PTR)(INC3_Y*1), X5 \ - MULPD ALPHA, X0 \ - MULPD ALPHA, X2 \ - MULPD BETA, X4 \ - MULPD BETA, X5 \ - ADDPD X0, X4 \ - ADDPD X2, X5 \ - MOVLPD X4, (Y_PTR) \ - MOVHPD X4, (Y_PTR)(INC_Y*1) \ - MOVLPD X5, (Y_PTR)(INC_Y*2) \ - MOVHPD X5, (Y_PTR)(INC3_Y*1) - -#define KERNEL_2x4 \ - MOVUPS (A_PTR), X8 \ - MOVUPS 2*SIZE(A_PTR), X9 \ - MOVUPS (A_PTR)(LDA*1), X10 \ - MOVUPS 2*SIZE(A_PTR)(LDA*1), X11 \ - MULPD X12, X8 \ - MULPD X13, X9 \ - MULPD X12, X10 \ - MULPD X13, X11 \ - ADDPD X8, X0 \ - ADDPD X10, X1 \ - ADDPD X9, X0 \ - ADDPD X11, X1 \ - ADDQ $4*SIZE, A_PTR - -#define KERNEL_2x2 \ - MOVUPS (A_PTR), X8 \ - MOVUPS (A_PTR)(LDA*1), X9 \ - MULPD X12, X8 \ - MULPD X12, X9 \ - ADDPD X8, X0 \ - ADDPD X9, X1 \ - ADDQ $2*SIZE, A_PTR - -#define KERNEL_2x1 \ - MOVDDUP (X_PTR), X12 \ - MOVSD (A_PTR), X8 \ - MOVHPD (A_PTR)(LDA*1), X8 \ - MULPD X12, X8 \ - ADDPD X8, X0 \ - ADDQ $SIZE, A_PTR - -#define STORE2 \ - MOVUPS (Y_PTR), X4 \ - MULPD ALPHA, X0 \ - MULPD BETA, X4 \ - ADDPD X0, X4 \ - MOVUPS X4, (Y_PTR) - -#define STORE2_INC \ - MOVSD (Y_PTR), X4 \ - MOVHPD (Y_PTR)(INC_Y*1), X4 \ - MULPD ALPHA, X0 \ - MULPD BETA, X4 \ - ADDPD X0, X4 \ - MOVSD X4, (Y_PTR) \ - MOVHPD X4, (Y_PTR)(INC_Y*1) - -#define KERNEL_1x4 \ - MOVUPS (A_PTR), X8 \ - MOVUPS 2*SIZE(A_PTR), X9 \ - MULPD X12, X8 \ - MULPD X13, X9 \ - ADDPD X8, X0 \ - ADDPD X9, X0 \ - ADDQ $4*SIZE, A_PTR - -#define KERNEL_1x2 \ - MOVUPS (A_PTR), X8 \ - MULPD X12, X8 \ - ADDPD X8, X0 \ - ADDQ $2*SIZE, A_PTR - -#define KERNEL_1x1 \ - MOVSD (X_PTR), X12 \ - MOVSD (A_PTR), X8 \ - MULSD X12, X8 \ - ADDSD X8, X0 \ - ADDQ $SIZE, A_PTR - -#define STORE1 \ - HADDPD X0, X0 \ - MOVSD (Y_PTR), X4 \ - MULSD ALPHA, X0 \ - MULSD BETA, X4 \ - ADDSD X0, X4 \ - MOVSD X4, (Y_PTR) - -// func GemvN(m, n int, -// alpha float64, -// a []float64, lda int, -// x []float64, incX int, -// beta float64, -// y []float64, incY int) -TEXT ·GemvN(SB), NOSPLIT, $32-128 - MOVQ M_DIM, M - MOVQ N_DIM, N - CMPQ M, $0 - JE end - CMPQ N, $0 - JE end - - MOVDDUP alpha+16(FP), ALPHA - MOVDDUP beta+88(FP), BETA - - MOVQ x_base+56(FP), X_PTR - MOVQ y_base+96(FP), Y_PTR - MOVQ a_base+24(FP), A_ROW - MOVQ incY+120(FP), INC_Y - MOVQ lda+48(FP), LDA // LDA = LDA * sizeof(float64) - SHLQ $3, LDA - LEAQ (LDA)(LDA*2), LDA3 // LDA3 = LDA * 3 - MOVQ A_ROW, A_PTR - - XORQ TMP2, TMP2 - MOVQ M, TMP1 - SUBQ $1, TMP1 - IMULQ INC_Y, TMP1 - NEGQ TMP1 - CMPQ INC_Y, $0 - CMOVQLT TMP1, TMP2 - LEAQ (Y_PTR)(TMP2*SIZE), Y_PTR - MOVQ Y_PTR, Y - - SHLQ $3, INC_Y // INC_Y = incY * sizeof(float64) - LEAQ (INC_Y)(INC_Y*2), INC3_Y // INC3_Y = INC_Y * 3 - - MOVSD $0.0, X0 - COMISD BETA, X0 - JNE gemv_start // if beta != 0 { goto gemv_start } - -gemv_clear: // beta == 0 is special cased to clear memory (no nan handling) - XORPS X0, X0 - XORPS X1, X1 - XORPS X2, X2 - XORPS X3, X3 - - CMPQ incY+120(FP), $1 // Check for dense vector X (fast-path) - JNE inc_clear - - SHRQ $3, M - JZ clear4 - -clear8: - MOVUPS X0, (Y_PTR) - MOVUPS X1, 16(Y_PTR) - MOVUPS X2, 32(Y_PTR) - MOVUPS X3, 48(Y_PTR) - ADDQ $8*SIZE, Y_PTR - DECQ M - JNZ clear8 - -clear4: - TESTQ $4, M_DIM - JZ clear2 - MOVUPS X0, (Y_PTR) - MOVUPS X1, 16(Y_PTR) - ADDQ $4*SIZE, Y_PTR - -clear2: - TESTQ $2, M_DIM - JZ clear1 - MOVUPS X0, (Y_PTR) - ADDQ $2*SIZE, Y_PTR - -clear1: - TESTQ $1, M_DIM - JZ prep_end - MOVSD X0, (Y_PTR) - - JMP prep_end - -inc_clear: - SHRQ $2, M - JZ inc_clear2 - -inc_clear4: - MOVSD X0, (Y_PTR) - MOVSD X1, (Y_PTR)(INC_Y*1) - MOVSD X2, (Y_PTR)(INC_Y*2) - MOVSD X3, (Y_PTR)(INC3_Y*1) - LEAQ (Y_PTR)(INC_Y*4), Y_PTR - DECQ M - JNZ inc_clear4 - -inc_clear2: - TESTQ $2, M_DIM - JZ inc_clear1 - MOVSD X0, (Y_PTR) - MOVSD X1, (Y_PTR)(INC_Y*1) - LEAQ (Y_PTR)(INC_Y*2), Y_PTR - -inc_clear1: - TESTQ $1, M_DIM - JZ prep_end - MOVSD X0, (Y_PTR) - -prep_end: - MOVQ Y, Y_PTR - MOVQ M_DIM, M - -gemv_start: - CMPQ incX+80(FP), $1 // Check for dense vector X (fast-path) - JNE inc - - SHRQ $2, M - JZ r2 - -r4: - // LOAD 4 - INIT4 - - MOVQ N_DIM, N - SHRQ $2, N - JZ r4c2 - -r4c4: - // 4x4 KERNEL - KERNEL_LOAD4 - KERNEL_4x4 - - ADDQ $4*SIZE, X_PTR - - DECQ N - JNZ r4c4 - -r4c2: - TESTQ $2, N_DIM - JZ r4c1 - - // 4x2 KERNEL - KERNEL_LOAD2 - KERNEL_4x2 - - ADDQ $2*SIZE, X_PTR - -r4c1: - HADDPD X1, X0 - HADDPD X3, X2 - TESTQ $1, N_DIM - JZ r4end - - // 4x1 KERNEL - KERNEL_4x1 - - ADDQ $SIZE, X_PTR - -r4end: - CMPQ INC_Y, $SIZE - JNZ r4st_inc - - STORE4 - ADDQ $4*SIZE, Y_PTR - JMP r4inc - -r4st_inc: - STORE4_INC - LEAQ (Y_PTR)(INC_Y*4), Y_PTR - -r4inc: - MOVQ X, X_PTR - LEAQ (A_ROW)(LDA*4), A_ROW - MOVQ A_ROW, A_PTR - - DECQ M - JNZ r4 - -r2: - TESTQ $2, M_DIM - JZ r1 - - // LOAD 2 - INIT2 - - MOVQ N_DIM, N - SHRQ $2, N - JZ r2c2 - -r2c4: - // 2x4 KERNEL - KERNEL_LOAD4 - KERNEL_2x4 - - ADDQ $4*SIZE, X_PTR - - DECQ N - JNZ r2c4 - -r2c2: - TESTQ $2, N_DIM - JZ r2c1 - - // 2x2 KERNEL - KERNEL_LOAD2 - KERNEL_2x2 - - ADDQ $2*SIZE, X_PTR - -r2c1: - HADDPD X1, X0 - TESTQ $1, N_DIM - JZ r2end - - // 2x1 KERNEL - KERNEL_2x1 - - ADDQ $SIZE, X_PTR - -r2end: - CMPQ INC_Y, $SIZE - JNE r2st_inc - - STORE2 - ADDQ $2*SIZE, Y_PTR - JMP r2inc - -r2st_inc: - STORE2_INC - LEAQ (Y_PTR)(INC_Y*2), Y_PTR - -r2inc: - MOVQ X, X_PTR - LEAQ (A_ROW)(LDA*2), A_ROW - MOVQ A_ROW, A_PTR - -r1: - TESTQ $1, M_DIM - JZ end - - // LOAD 1 - INIT1 - - MOVQ N_DIM, N - SHRQ $2, N - JZ r1c2 - -r1c4: - // 1x4 KERNEL - KERNEL_LOAD4 - KERNEL_1x4 - - ADDQ $4*SIZE, X_PTR - - DECQ N - JNZ r1c4 - -r1c2: - TESTQ $2, N_DIM - JZ r1c1 - - // 1x2 KERNEL - KERNEL_LOAD2 - KERNEL_1x2 - - ADDQ $2*SIZE, X_PTR - -r1c1: - - TESTQ $1, N_DIM - JZ r1end - - // 1x1 KERNEL - KERNEL_1x1 - -r1end: - STORE1 - -end: - RET - -inc: // Algorithm for incX != 1 ( split loads in kernel ) - MOVQ incX+80(FP), INC_X // INC_X = incX - - XORQ TMP2, TMP2 // TMP2 = 0 - MOVQ N, TMP1 // TMP1 = N - SUBQ $1, TMP1 // TMP1 -= 1 - NEGQ TMP1 // TMP1 = -TMP1 - IMULQ INC_X, TMP1 // TMP1 *= INC_X - CMPQ INC_X, $0 // if INC_X < 0 { TMP2 = TMP1 } - CMOVQLT TMP1, TMP2 - LEAQ (X_PTR)(TMP2*SIZE), X_PTR // X_PTR = X_PTR[TMP2] - MOVQ X_PTR, X // X = X_PTR - - SHLQ $3, INC_X - LEAQ (INC_X)(INC_X*2), INC3_X // INC3_X = INC_X * 3 - - SHRQ $2, M - JZ inc_r2 - -inc_r4: - // LOAD 4 - INIT4 - - MOVQ N_DIM, N - SHRQ $2, N - JZ inc_r4c2 - -inc_r4c4: - // 4x4 KERNEL - KERNEL_LOAD4_INC - KERNEL_4x4 - - LEAQ (X_PTR)(INC_X*4), X_PTR - - DECQ N - JNZ inc_r4c4 - -inc_r4c2: - TESTQ $2, N_DIM - JZ inc_r4c1 - - // 4x2 KERNEL - KERNEL_LOAD2_INC - KERNEL_4x2 - - LEAQ (X_PTR)(INC_X*2), X_PTR - -inc_r4c1: - HADDPD X1, X0 - HADDPD X3, X2 - TESTQ $1, N_DIM - JZ inc_r4end - - // 4x1 KERNEL - KERNEL_4x1 - - ADDQ INC_X, X_PTR - -inc_r4end: - CMPQ INC_Y, $SIZE - JNE inc_r4st_inc - - STORE4 - ADDQ $4*SIZE, Y_PTR - JMP inc_r4inc - -inc_r4st_inc: - STORE4_INC - LEAQ (Y_PTR)(INC_Y*4), Y_PTR - -inc_r4inc: - MOVQ X, X_PTR - LEAQ (A_ROW)(LDA*4), A_ROW - MOVQ A_ROW, A_PTR - - DECQ M - JNZ inc_r4 - -inc_r2: - TESTQ $2, M_DIM - JZ inc_r1 - - // LOAD 2 - INIT2 - - MOVQ N_DIM, N - SHRQ $2, N - JZ inc_r2c2 - -inc_r2c4: - // 2x4 KERNEL - KERNEL_LOAD4_INC - KERNEL_2x4 - - LEAQ (X_PTR)(INC_X*4), X_PTR - DECQ N - JNZ inc_r2c4 - -inc_r2c2: - TESTQ $2, N_DIM - JZ inc_r2c1 - - // 2x2 KERNEL - KERNEL_LOAD2_INC - KERNEL_2x2 - - LEAQ (X_PTR)(INC_X*2), X_PTR - -inc_r2c1: - HADDPD X1, X0 - TESTQ $1, N_DIM - JZ inc_r2end - - // 2x1 KERNEL - KERNEL_2x1 - - ADDQ INC_X, X_PTR - -inc_r2end: - CMPQ INC_Y, $SIZE - JNE inc_r2st_inc - - STORE2 - ADDQ $2*SIZE, Y_PTR - JMP inc_r2inc - -inc_r2st_inc: - STORE2_INC - LEAQ (Y_PTR)(INC_Y*2), Y_PTR - -inc_r2inc: - MOVQ X, X_PTR - LEAQ (A_ROW)(LDA*2), A_ROW - MOVQ A_ROW, A_PTR - -inc_r1: - TESTQ $1, M_DIM - JZ inc_end - - // LOAD 1 - INIT1 - - MOVQ N_DIM, N - SHRQ $2, N - JZ inc_r1c2 - -inc_r1c4: - // 1x4 KERNEL - KERNEL_LOAD4_INC - KERNEL_1x4 - - LEAQ (X_PTR)(INC_X*4), X_PTR - DECQ N - JNZ inc_r1c4 - -inc_r1c2: - TESTQ $2, N_DIM - JZ inc_r1c1 - - // 1x2 KERNEL - KERNEL_LOAD2_INC - KERNEL_1x2 - - LEAQ (X_PTR)(INC_X*2), X_PTR - -inc_r1c1: - TESTQ $1, N_DIM - JZ inc_r1end - - // 1x1 KERNEL - KERNEL_1x1 - -inc_r1end: - STORE1 - -inc_end: - RET diff --git a/vendor/gonum.org/v1/gonum/internal/asm/f64/gemvT_amd64.s b/vendor/gonum.org/v1/gonum/internal/asm/f64/gemvT_amd64.s deleted file mode 100644 index ff7d60fb68..0000000000 --- a/vendor/gonum.org/v1/gonum/internal/asm/f64/gemvT_amd64.s +++ /dev/null @@ -1,745 +0,0 @@ -// Copyright ©2017 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//+build !noasm,!appengine,!safe - -#include "textflag.h" - -#define SIZE 8 - -#define M_DIM n+8(FP) -#define M CX -#define N_DIM m+0(FP) -#define N BX - -#define TMP1 R14 -#define TMP2 R15 - -#define X_PTR SI -#define X x_base+56(FP) -#define Y_PTR DX -#define Y y_base+96(FP) -#define A_ROW AX -#define A_PTR DI - -#define INC_X R8 -#define INC3_X R9 - -#define INC_Y R10 -#define INC3_Y R11 - -#define LDA R12 -#define LDA3 R13 - -#define ALPHA X15 -#define BETA X14 - -#define INIT4 \ - MOVDDUP (X_PTR), X8 \ - MOVDDUP (X_PTR)(INC_X*1), X9 \ - MOVDDUP (X_PTR)(INC_X*2), X10 \ - MOVDDUP (X_PTR)(INC3_X*1), X11 \ - MULPD ALPHA, X8 \ - MULPD ALPHA, X9 \ - MULPD ALPHA, X10 \ - MULPD ALPHA, X11 - -#define INIT2 \ - MOVDDUP (X_PTR), X8 \ - MOVDDUP (X_PTR)(INC_X*1), X9 \ - MULPD ALPHA, X8 \ - MULPD ALPHA, X9 - -#define INIT1 \ - MOVDDUP (X_PTR), X8 \ - MULPD ALPHA, X8 - -#define KERNEL_LOAD4 \ - MOVUPS (Y_PTR), X0 \ - MOVUPS 2*SIZE(Y_PTR), X1 - -#define KERNEL_LOAD2 \ - MOVUPS (Y_PTR), X0 - -#define KERNEL_LOAD4_INC \ - MOVSD (Y_PTR), X0 \ - MOVHPD (Y_PTR)(INC_Y*1), X0 \ - MOVSD (Y_PTR)(INC_Y*2), X1 \ - MOVHPD (Y_PTR)(INC3_Y*1), X1 - -#define KERNEL_LOAD2_INC \ - MOVSD (Y_PTR), X0 \ - MOVHPD (Y_PTR)(INC_Y*1), X0 - -#define KERNEL_4x4 \ - MOVUPS (A_PTR), X4 \ - MOVUPS 2*SIZE(A_PTR), X5 \ - MOVUPS (A_PTR)(LDA*1), X6 \ - MOVUPS 2*SIZE(A_PTR)(LDA*1), X7 \ - MULPD X8, X4 \ - MULPD X8, X5 \ - MULPD X9, X6 \ - MULPD X9, X7 \ - ADDPD X4, X0 \ - ADDPD X5, X1 \ - ADDPD X6, X0 \ - ADDPD X7, X1 \ - MOVUPS (A_PTR)(LDA*2), X4 \ - MOVUPS 2*SIZE(A_PTR)(LDA*2), X5 \ - MOVUPS (A_PTR)(LDA3*1), X6 \ - MOVUPS 2*SIZE(A_PTR)(LDA3*1), X7 \ - MULPD X10, X4 \ - MULPD X10, X5 \ - MULPD X11, X6 \ - MULPD X11, X7 \ - ADDPD X4, X0 \ - ADDPD X5, X1 \ - ADDPD X6, X0 \ - ADDPD X7, X1 \ - ADDQ $4*SIZE, A_PTR - -#define KERNEL_4x2 \ - MOVUPS (A_PTR), X4 \ - MOVUPS 2*SIZE(A_PTR), X5 \ - MOVUPS (A_PTR)(LDA*1), X6 \ - MOVUPS 2*SIZE(A_PTR)(LDA*1), X7 \ - MULPD X8, X4 \ - MULPD X8, X5 \ - MULPD X9, X6 \ - MULPD X9, X7 \ - ADDPD X4, X0 \ - ADDPD X5, X1 \ - ADDPD X6, X0 \ - ADDPD X7, X1 \ - ADDQ $4*SIZE, A_PTR - -#define KERNEL_4x1 \ - MOVUPS (A_PTR), X4 \ - MOVUPS 2*SIZE(A_PTR), X5 \ - MULPD X8, X4 \ - MULPD X8, X5 \ - ADDPD X4, X0 \ - ADDPD X5, X1 \ - ADDQ $4*SIZE, A_PTR - -#define STORE4 \ - MOVUPS X0, (Y_PTR) \ - MOVUPS X1, 2*SIZE(Y_PTR) - -#define STORE4_INC \ - MOVLPD X0, (Y_PTR) \ - MOVHPD X0, (Y_PTR)(INC_Y*1) \ - MOVLPD X1, (Y_PTR)(INC_Y*2) \ - MOVHPD X1, (Y_PTR)(INC3_Y*1) - -#define KERNEL_2x4 \ - MOVUPS (A_PTR), X4 \ - MOVUPS (A_PTR)(LDA*1), X5 \ - MOVUPS (A_PTR)(LDA*2), X6 \ - MOVUPS (A_PTR)(LDA3*1), X7 \ - MULPD X8, X4 \ - MULPD X9, X5 \ - MULPD X10, X6 \ - MULPD X11, X7 \ - ADDPD X4, X0 \ - ADDPD X5, X0 \ - ADDPD X6, X0 \ - ADDPD X7, X0 \ - ADDQ $2*SIZE, A_PTR - -#define KERNEL_2x2 \ - MOVUPS (A_PTR), X4 \ - MOVUPS (A_PTR)(LDA*1), X5 \ - MULPD X8, X4 \ - MULPD X9, X5 \ - ADDPD X4, X0 \ - ADDPD X5, X0 \ - ADDQ $2*SIZE, A_PTR - -#define KERNEL_2x1 \ - MOVUPS (A_PTR), X4 \ - MULPD X8, X4 \ - ADDPD X4, X0 \ - ADDQ $2*SIZE, A_PTR - -#define STORE2 \ - MOVUPS X0, (Y_PTR) - -#define STORE2_INC \ - MOVLPD X0, (Y_PTR) \ - MOVHPD X0, (Y_PTR)(INC_Y*1) - -#define KERNEL_1x4 \ - MOVSD (Y_PTR), X0 \ - MOVSD (A_PTR), X4 \ - MOVSD (A_PTR)(LDA*1), X5 \ - MOVSD (A_PTR)(LDA*2), X6 \ - MOVSD (A_PTR)(LDA3*1), X7 \ - MULSD X8, X4 \ - MULSD X9, X5 \ - MULSD X10, X6 \ - MULSD X11, X7 \ - ADDSD X4, X0 \ - ADDSD X5, X0 \ - ADDSD X6, X0 \ - ADDSD X7, X0 \ - MOVSD X0, (Y_PTR) \ - ADDQ $SIZE, A_PTR - -#define KERNEL_1x2 \ - MOVSD (Y_PTR), X0 \ - MOVSD (A_PTR), X4 \ - MOVSD (A_PTR)(LDA*1), X5 \ - MULSD X8, X4 \ - MULSD X9, X5 \ - ADDSD X4, X0 \ - ADDSD X5, X0 \ - MOVSD X0, (Y_PTR) \ - ADDQ $SIZE, A_PTR - -#define KERNEL_1x1 \ - MOVSD (Y_PTR), X0 \ - MOVSD (A_PTR), X4 \ - MULSD X8, X4 \ - ADDSD X4, X0 \ - MOVSD X0, (Y_PTR) \ - ADDQ $SIZE, A_PTR - -#define SCALE_8(PTR, SCAL) \ - MOVUPS (PTR), X0 \ - MOVUPS 16(PTR), X1 \ - MOVUPS 32(PTR), X2 \ - MOVUPS 48(PTR), X3 \ - MULPD SCAL, X0 \ - MULPD SCAL, X1 \ - MULPD SCAL, X2 \ - MULPD SCAL, X3 \ - MOVUPS X0, (PTR) \ - MOVUPS X1, 16(PTR) \ - MOVUPS X2, 32(PTR) \ - MOVUPS X3, 48(PTR) - -#define SCALE_4(PTR, SCAL) \ - MOVUPS (PTR), X0 \ - MOVUPS 16(PTR), X1 \ - MULPD SCAL, X0 \ - MULPD SCAL, X1 \ - MOVUPS X0, (PTR) \ - MOVUPS X1, 16(PTR) \ - -#define SCALE_2(PTR, SCAL) \ - MOVUPS (PTR), X0 \ - MULPD SCAL, X0 \ - MOVUPS X0, (PTR) \ - -#define SCALE_1(PTR, SCAL) \ - MOVSD (PTR), X0 \ - MULSD SCAL, X0 \ - MOVSD X0, (PTR) \ - -#define SCALEINC_4(PTR, INC, INC3, SCAL) \ - MOVSD (PTR), X0 \ - MOVSD (PTR)(INC*1), X1 \ - MOVSD (PTR)(INC*2), X2 \ - MOVSD (PTR)(INC3*1), X3 \ - MULSD SCAL, X0 \ - MULSD SCAL, X1 \ - MULSD SCAL, X2 \ - MULSD SCAL, X3 \ - MOVSD X0, (PTR) \ - MOVSD X1, (PTR)(INC*1) \ - MOVSD X2, (PTR)(INC*2) \ - MOVSD X3, (PTR)(INC3*1) - -#define SCALEINC_2(PTR, INC, SCAL) \ - MOVSD (PTR), X0 \ - MOVSD (PTR)(INC*1), X1 \ - MULSD SCAL, X0 \ - MULSD SCAL, X1 \ - MOVSD X0, (PTR) \ - MOVSD X1, (PTR)(INC*1) - -// func GemvT(m, n int, -// alpha float64, -// a []float64, lda int, -// x []float64, incX int, -// beta float64, -// y []float64, incY int) -TEXT ·GemvT(SB), NOSPLIT, $32-128 - MOVQ M_DIM, M - MOVQ N_DIM, N - CMPQ M, $0 - JE end - CMPQ N, $0 - JE end - - MOVDDUP alpha+16(FP), ALPHA - - MOVQ x_base+56(FP), X_PTR - MOVQ y_base+96(FP), Y_PTR - MOVQ a_base+24(FP), A_ROW - MOVQ incY+120(FP), INC_Y // INC_Y = incY * sizeof(float64) - MOVQ lda+48(FP), LDA // LDA = LDA * sizeof(float64) - SHLQ $3, LDA - LEAQ (LDA)(LDA*2), LDA3 // LDA3 = LDA * 3 - MOVQ A_ROW, A_PTR - - MOVQ incX+80(FP), INC_X // INC_X = incX * sizeof(float64) - - XORQ TMP2, TMP2 - MOVQ N, TMP1 - SUBQ $1, TMP1 - NEGQ TMP1 - IMULQ INC_X, TMP1 - CMPQ INC_X, $0 - CMOVQLT TMP1, TMP2 - LEAQ (X_PTR)(TMP2*SIZE), X_PTR - MOVQ X_PTR, X - - SHLQ $3, INC_X - LEAQ (INC_X)(INC_X*2), INC3_X // INC3_X = INC_X * 3 - - CMPQ incY+120(FP), $1 // Check for dense vector Y (fast-path) - JNE inc - - MOVSD $1.0, X0 - COMISD beta+88(FP), X0 - JE gemv_start - - MOVSD $0.0, X0 - COMISD beta+88(FP), X0 - JE gemv_clear - - MOVDDUP beta+88(FP), BETA - SHRQ $3, M - JZ scal4 - -scal8: - SCALE_8(Y_PTR, BETA) - ADDQ $8*SIZE, Y_PTR - DECQ M - JNZ scal8 - -scal4: - TESTQ $4, M_DIM - JZ scal2 - SCALE_4(Y_PTR, BETA) - ADDQ $4*SIZE, Y_PTR - -scal2: - TESTQ $2, M_DIM - JZ scal1 - SCALE_2(Y_PTR, BETA) - ADDQ $2*SIZE, Y_PTR - -scal1: - TESTQ $1, M_DIM - JZ prep_end - SCALE_1(Y_PTR, BETA) - - JMP prep_end - -gemv_clear: // beta == 0 is special cased to clear memory (no nan handling) - XORPS X0, X0 - XORPS X1, X1 - XORPS X2, X2 - XORPS X3, X3 - - SHRQ $3, M - JZ clear4 - -clear8: - MOVUPS X0, (Y_PTR) - MOVUPS X1, 16(Y_PTR) - MOVUPS X2, 32(Y_PTR) - MOVUPS X3, 48(Y_PTR) - ADDQ $8*SIZE, Y_PTR - DECQ M - JNZ clear8 - -clear4: - TESTQ $4, M_DIM - JZ clear2 - MOVUPS X0, (Y_PTR) - MOVUPS X1, 16(Y_PTR) - ADDQ $4*SIZE, Y_PTR - -clear2: - TESTQ $2, M_DIM - JZ clear1 - MOVUPS X0, (Y_PTR) - ADDQ $2*SIZE, Y_PTR - -clear1: - TESTQ $1, M_DIM - JZ prep_end - MOVSD X0, (Y_PTR) - -prep_end: - MOVQ Y, Y_PTR - MOVQ M_DIM, M - -gemv_start: - SHRQ $2, N - JZ c2 - -c4: - // LOAD 4 - INIT4 - - MOVQ M_DIM, M - SHRQ $2, M - JZ c4r2 - -c4r4: - // 4x4 KERNEL - KERNEL_LOAD4 - KERNEL_4x4 - STORE4 - - ADDQ $4*SIZE, Y_PTR - - DECQ M - JNZ c4r4 - -c4r2: - TESTQ $2, M_DIM - JZ c4r1 - - // 4x2 KERNEL - KERNEL_LOAD2 - KERNEL_2x4 - STORE2 - - ADDQ $2*SIZE, Y_PTR - -c4r1: - TESTQ $1, M_DIM - JZ c4end - - // 4x1 KERNEL - KERNEL_1x4 - - ADDQ $SIZE, Y_PTR - -c4end: - LEAQ (X_PTR)(INC_X*4), X_PTR - MOVQ Y, Y_PTR - LEAQ (A_ROW)(LDA*4), A_ROW - MOVQ A_ROW, A_PTR - - DECQ N - JNZ c4 - -c2: - TESTQ $2, N_DIM - JZ c1 - - // LOAD 2 - INIT2 - - MOVQ M_DIM, M - SHRQ $2, M - JZ c2r2 - -c2r4: - // 2x4 KERNEL - KERNEL_LOAD4 - KERNEL_4x2 - STORE4 - - ADDQ $4*SIZE, Y_PTR - - DECQ M - JNZ c2r4 - -c2r2: - TESTQ $2, M_DIM - JZ c2r1 - - // 2x2 KERNEL - KERNEL_LOAD2 - KERNEL_2x2 - STORE2 - - ADDQ $2*SIZE, Y_PTR - -c2r1: - TESTQ $1, M_DIM - JZ c2end - - // 2x1 KERNEL - KERNEL_1x2 - - ADDQ $SIZE, Y_PTR - -c2end: - LEAQ (X_PTR)(INC_X*2), X_PTR - MOVQ Y, Y_PTR - LEAQ (A_ROW)(LDA*2), A_ROW - MOVQ A_ROW, A_PTR - -c1: - TESTQ $1, N_DIM - JZ end - - // LOAD 1 - INIT1 - - MOVQ M_DIM, M - SHRQ $2, M - JZ c1r2 - -c1r4: - // 1x4 KERNEL - KERNEL_LOAD4 - KERNEL_4x1 - STORE4 - - ADDQ $4*SIZE, Y_PTR - - DECQ M - JNZ c1r4 - -c1r2: - TESTQ $2, M_DIM - JZ c1r1 - - // 1x2 KERNEL - KERNEL_LOAD2 - KERNEL_2x1 - STORE2 - - ADDQ $2*SIZE, Y_PTR - -c1r1: - TESTQ $1, M_DIM - JZ end - - // 1x1 KERNEL - KERNEL_1x1 - -end: - RET - -inc: // Algorithm for incX != 0 ( split loads in kernel ) - XORQ TMP2, TMP2 - MOVQ M, TMP1 - SUBQ $1, TMP1 - IMULQ INC_Y, TMP1 - NEGQ TMP1 - CMPQ INC_Y, $0 - CMOVQLT TMP1, TMP2 - LEAQ (Y_PTR)(TMP2*SIZE), Y_PTR - MOVQ Y_PTR, Y - - SHLQ $3, INC_Y - LEAQ (INC_Y)(INC_Y*2), INC3_Y // INC3_Y = INC_Y * 3 - - MOVSD $1.0, X0 - COMISD beta+88(FP), X0 - JE inc_gemv_start - - MOVSD $0.0, X0 - COMISD beta+88(FP), X0 - JE inc_gemv_clear - - MOVDDUP beta+88(FP), BETA - SHRQ $2, M - JZ inc_scal2 - -inc_scal4: - SCALEINC_4(Y_PTR, INC_Y, INC3_Y, BETA) - LEAQ (Y_PTR)(INC_Y*4), Y_PTR - DECQ M - JNZ inc_scal4 - -inc_scal2: - TESTQ $2, M_DIM - JZ inc_scal1 - - SCALEINC_2(Y_PTR, INC_Y, BETA) - LEAQ (Y_PTR)(INC_Y*2), Y_PTR - -inc_scal1: - TESTQ $1, M_DIM - JZ inc_prep_end - SCALE_1(Y_PTR, BETA) - - JMP inc_prep_end - -inc_gemv_clear: // beta == 0 is special-cased to clear memory (no nan handling) - XORPS X0, X0 - XORPS X1, X1 - XORPS X2, X2 - XORPS X3, X3 - - SHRQ $2, M - JZ inc_clear2 - -inc_clear4: - MOVSD X0, (Y_PTR) - MOVSD X1, (Y_PTR)(INC_Y*1) - MOVSD X2, (Y_PTR)(INC_Y*2) - MOVSD X3, (Y_PTR)(INC3_Y*1) - LEAQ (Y_PTR)(INC_Y*4), Y_PTR - DECQ M - JNZ inc_clear4 - -inc_clear2: - TESTQ $2, M_DIM - JZ inc_clear1 - MOVSD X0, (Y_PTR) - MOVSD X1, (Y_PTR)(INC_Y*1) - LEAQ (Y_PTR)(INC_Y*2), Y_PTR - -inc_clear1: - TESTQ $1, M_DIM - JZ inc_prep_end - MOVSD X0, (Y_PTR) - -inc_prep_end: - MOVQ Y, Y_PTR - MOVQ M_DIM, M - -inc_gemv_start: - SHRQ $2, N - JZ inc_c2 - -inc_c4: - // LOAD 4 - INIT4 - - MOVQ M_DIM, M - SHRQ $2, M - JZ inc_c4r2 - -inc_c4r4: - // 4x4 KERNEL - KERNEL_LOAD4_INC - KERNEL_4x4 - STORE4_INC - - LEAQ (Y_PTR)(INC_Y*4), Y_PTR - - DECQ M - JNZ inc_c4r4 - -inc_c4r2: - TESTQ $2, M_DIM - JZ inc_c4r1 - - // 4x2 KERNEL - KERNEL_LOAD2_INC - KERNEL_2x4 - STORE2_INC - - LEAQ (Y_PTR)(INC_Y*2), Y_PTR - -inc_c4r1: - TESTQ $1, M_DIM - JZ inc_c4end - - // 4x1 KERNEL - KERNEL_1x4 - - ADDQ INC_Y, Y_PTR - -inc_c4end: - LEAQ (X_PTR)(INC_X*4), X_PTR - MOVQ Y, Y_PTR - LEAQ (A_ROW)(LDA*4), A_ROW - MOVQ A_ROW, A_PTR - - DECQ N - JNZ inc_c4 - -inc_c2: - TESTQ $2, N_DIM - JZ inc_c1 - - // LOAD 2 - INIT2 - - MOVQ M_DIM, M - SHRQ $2, M - JZ inc_c2r2 - -inc_c2r4: - // 2x4 KERNEL - KERNEL_LOAD4_INC - KERNEL_4x2 - STORE4_INC - - LEAQ (Y_PTR)(INC_Y*4), Y_PTR - DECQ M - JNZ inc_c2r4 - -inc_c2r2: - TESTQ $2, M_DIM - JZ inc_c2r1 - - // 2x2 KERNEL - KERNEL_LOAD2_INC - KERNEL_2x2 - STORE2_INC - - LEAQ (Y_PTR)(INC_Y*2), Y_PTR - -inc_c2r1: - TESTQ $1, M_DIM - JZ inc_c2end - - // 2x1 KERNEL - KERNEL_1x2 - - ADDQ INC_Y, Y_PTR - -inc_c2end: - LEAQ (X_PTR)(INC_X*2), X_PTR - MOVQ Y, Y_PTR - LEAQ (A_ROW)(LDA*2), A_ROW - MOVQ A_ROW, A_PTR - -inc_c1: - TESTQ $1, N_DIM - JZ inc_end - - // LOAD 1 - INIT1 - - MOVQ M_DIM, M - SHRQ $2, M - JZ inc_c1r2 - -inc_c1r4: - // 1x4 KERNEL - KERNEL_LOAD4_INC - KERNEL_4x1 - STORE4_INC - - LEAQ (Y_PTR)(INC_Y*4), Y_PTR - DECQ M - JNZ inc_c1r4 - -inc_c1r2: - TESTQ $2, M_DIM - JZ inc_c1r1 - - // 1x2 KERNEL - KERNEL_LOAD2_INC - KERNEL_2x1 - STORE2_INC - - LEAQ (Y_PTR)(INC_Y*2), Y_PTR - -inc_c1r1: - TESTQ $1, M_DIM - JZ inc_end - - // 1x1 KERNEL - KERNEL_1x1 - -inc_end: - RET diff --git a/vendor/gonum.org/v1/gonum/internal/asm/f64/ger_amd64.s b/vendor/gonum.org/v1/gonum/internal/asm/f64/ger_amd64.s deleted file mode 100644 index 8c1b36a65e..0000000000 --- a/vendor/gonum.org/v1/gonum/internal/asm/f64/ger_amd64.s +++ /dev/null @@ -1,591 +0,0 @@ -// Copyright ©2017 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//+build !noasm,!appengine,!safe - -#include "textflag.h" - -#define SIZE 8 - -#define M_DIM m+0(FP) -#define M CX -#define N_DIM n+8(FP) -#define N BX - -#define TMP1 R14 -#define TMP2 R15 - -#define X_PTR SI -#define Y y_base+56(FP) -#define Y_PTR DX -#define A_ROW AX -#define A_PTR DI - -#define INC_X R8 -#define INC3_X R9 - -#define INC_Y R10 -#define INC3_Y R11 - -#define LDA R12 -#define LDA3 R13 - -#define ALPHA X0 - -#define LOAD4 \ - PREFETCHNTA (X_PTR )(INC_X*8) \ - MOVDDUP (X_PTR), X1 \ - MOVDDUP (X_PTR)(INC_X*1), X2 \ - MOVDDUP (X_PTR)(INC_X*2), X3 \ - MOVDDUP (X_PTR)(INC3_X*1), X4 \ - MULPD ALPHA, X1 \ - MULPD ALPHA, X2 \ - MULPD ALPHA, X3 \ - MULPD ALPHA, X4 - -#define LOAD2 \ - MOVDDUP (X_PTR), X1 \ - MOVDDUP (X_PTR)(INC_X*1), X2 \ - MULPD ALPHA, X1 \ - MULPD ALPHA, X2 - -#define LOAD1 \ - MOVDDUP (X_PTR), X1 \ - MULPD ALPHA, X1 - -#define KERNEL_LOAD4 \ - MOVUPS (Y_PTR), X5 \ - MOVUPS 2*SIZE(Y_PTR), X6 - -#define KERNEL_LOAD4_INC \ - MOVLPD (Y_PTR), X5 \ - MOVHPD (Y_PTR)(INC_Y*1), X5 \ - MOVLPD (Y_PTR)(INC_Y*2), X6 \ - MOVHPD (Y_PTR)(INC3_Y*1), X6 - -#define KERNEL_LOAD2 \ - MOVUPS (Y_PTR), X5 - -#define KERNEL_LOAD2_INC \ - MOVLPD (Y_PTR), X5 \ - MOVHPD (Y_PTR)(INC_Y*1), X5 - -#define KERNEL_4x4 \ - MOVUPS X5, X7 \ - MOVUPS X6, X8 \ - MOVUPS X5, X9 \ - MOVUPS X6, X10 \ - MOVUPS X5, X11 \ - MOVUPS X6, X12 \ - MULPD X1, X5 \ - MULPD X1, X6 \ - MULPD X2, X7 \ - MULPD X2, X8 \ - MULPD X3, X9 \ - MULPD X3, X10 \ - MULPD X4, X11 \ - MULPD X4, X12 - -#define STORE_4x4 \ - MOVUPS (A_PTR), X13 \ - ADDPD X13, X5 \ - MOVUPS 2*SIZE(A_PTR), X14 \ - ADDPD X14, X6 \ - MOVUPS (A_PTR)(LDA*1), X15 \ - ADDPD X15, X7 \ - MOVUPS 2*SIZE(A_PTR)(LDA*1), X0 \ - ADDPD X0, X8 \ - MOVUPS (A_PTR)(LDA*2), X13 \ - ADDPD X13, X9 \ - MOVUPS 2*SIZE(A_PTR)(LDA*2), X14 \ - ADDPD X14, X10 \ - MOVUPS (A_PTR)(LDA3*1), X15 \ - ADDPD X15, X11 \ - MOVUPS 2*SIZE(A_PTR)(LDA3*1), X0 \ - ADDPD X0, X12 \ - MOVUPS X5, (A_PTR) \ - MOVUPS X6, 2*SIZE(A_PTR) \ - MOVUPS X7, (A_PTR)(LDA*1) \ - MOVUPS X8, 2*SIZE(A_PTR)(LDA*1) \ - MOVUPS X9, (A_PTR)(LDA*2) \ - MOVUPS X10, 2*SIZE(A_PTR)(LDA*2) \ - MOVUPS X11, (A_PTR)(LDA3*1) \ - MOVUPS X12, 2*SIZE(A_PTR)(LDA3*1) \ - ADDQ $4*SIZE, A_PTR - -#define KERNEL_4x2 \ - MOVUPS X5, X6 \ - MOVUPS X5, X7 \ - MOVUPS X5, X8 \ - MULPD X1, X5 \ - MULPD X2, X6 \ - MULPD X3, X7 \ - MULPD X4, X8 - -#define STORE_4x2 \ - MOVUPS (A_PTR), X9 \ - ADDPD X9, X5 \ - MOVUPS (A_PTR)(LDA*1), X10 \ - ADDPD X10, X6 \ - MOVUPS (A_PTR)(LDA*2), X11 \ - ADDPD X11, X7 \ - MOVUPS (A_PTR)(LDA3*1), X12 \ - ADDPD X12, X8 \ - MOVUPS X5, (A_PTR) \ - MOVUPS X6, (A_PTR)(LDA*1) \ - MOVUPS X7, (A_PTR)(LDA*2) \ - MOVUPS X8, (A_PTR)(LDA3*1) \ - ADDQ $2*SIZE, A_PTR - -#define KERNEL_4x1 \ - MOVSD (Y_PTR), X5 \ - MOVSD X5, X6 \ - MOVSD X5, X7 \ - MOVSD X5, X8 \ - MULSD X1, X5 \ - MULSD X2, X6 \ - MULSD X3, X7 \ - MULSD X4, X8 - -#define STORE_4x1 \ - ADDSD (A_PTR), X5 \ - ADDSD (A_PTR)(LDA*1), X6 \ - ADDSD (A_PTR)(LDA*2), X7 \ - ADDSD (A_PTR)(LDA3*1), X8 \ - MOVSD X5, (A_PTR) \ - MOVSD X6, (A_PTR)(LDA*1) \ - MOVSD X7, (A_PTR)(LDA*2) \ - MOVSD X8, (A_PTR)(LDA3*1) \ - ADDQ $SIZE, A_PTR - -#define KERNEL_2x4 \ - MOVUPS X5, X7 \ - MOVUPS X6, X8 \ - MULPD X1, X5 \ - MULPD X1, X6 \ - MULPD X2, X7 \ - MULPD X2, X8 - -#define STORE_2x4 \ - MOVUPS (A_PTR), X9 \ - ADDPD X9, X5 \ - MOVUPS 2*SIZE(A_PTR), X10 \ - ADDPD X10, X6 \ - MOVUPS (A_PTR)(LDA*1), X11 \ - ADDPD X11, X7 \ - MOVUPS 2*SIZE(A_PTR)(LDA*1), X12 \ - ADDPD X12, X8 \ - MOVUPS X5, (A_PTR) \ - MOVUPS X6, 2*SIZE(A_PTR) \ - MOVUPS X7, (A_PTR)(LDA*1) \ - MOVUPS X8, 2*SIZE(A_PTR)(LDA*1) \ - ADDQ $4*SIZE, A_PTR - -#define KERNEL_2x2 \ - MOVUPS X5, X6 \ - MULPD X1, X5 \ - MULPD X2, X6 - -#define STORE_2x2 \ - MOVUPS (A_PTR), X7 \ - ADDPD X7, X5 \ - MOVUPS (A_PTR)(LDA*1), X8 \ - ADDPD X8, X6 \ - MOVUPS X5, (A_PTR) \ - MOVUPS X6, (A_PTR)(LDA*1) \ - ADDQ $2*SIZE, A_PTR - -#define KERNEL_2x1 \ - MOVSD (Y_PTR), X5 \ - MOVSD X5, X6 \ - MULSD X1, X5 \ - MULSD X2, X6 - -#define STORE_2x1 \ - ADDSD (A_PTR), X5 \ - ADDSD (A_PTR)(LDA*1), X6 \ - MOVSD X5, (A_PTR) \ - MOVSD X6, (A_PTR)(LDA*1) \ - ADDQ $SIZE, A_PTR - -#define KERNEL_1x4 \ - MULPD X1, X5 \ - MULPD X1, X6 - -#define STORE_1x4 \ - MOVUPS (A_PTR), X7 \ - ADDPD X7, X5 \ - MOVUPS 2*SIZE(A_PTR), X8 \ - ADDPD X8, X6 \ - MOVUPS X5, (A_PTR) \ - MOVUPS X6, 2*SIZE(A_PTR) \ - ADDQ $4*SIZE, A_PTR - -#define KERNEL_1x2 \ - MULPD X1, X5 - -#define STORE_1x2 \ - MOVUPS (A_PTR), X6 \ - ADDPD X6, X5 \ - MOVUPS X5, (A_PTR) \ - ADDQ $2*SIZE, A_PTR - -#define KERNEL_1x1 \ - MOVSD (Y_PTR), X5 \ - MULSD X1, X5 - -#define STORE_1x1 \ - ADDSD (A_PTR), X5 \ - MOVSD X5, (A_PTR) \ - ADDQ $SIZE, A_PTR - -// func Ger(m, n uintptr, alpha float64, -// x []float64, incX uintptr, -// y []float64, incY uintptr, -// a []float64, lda uintptr) -TEXT ·Ger(SB), NOSPLIT, $0 - MOVQ M_DIM, M - MOVQ N_DIM, N - CMPQ M, $0 - JE end - CMPQ N, $0 - JE end - - MOVDDUP alpha+16(FP), ALPHA - - MOVQ x_base+24(FP), X_PTR - MOVQ y_base+56(FP), Y_PTR - MOVQ a_base+88(FP), A_ROW - MOVQ incX+48(FP), INC_X // INC_X = incX * sizeof(float64) - SHLQ $3, INC_X - MOVQ lda+112(FP), LDA // LDA = LDA * sizeof(float64) - SHLQ $3, LDA - LEAQ (LDA)(LDA*2), LDA3 // LDA3 = LDA * 3 - LEAQ (INC_X)(INC_X*2), INC3_X // INC3_X = INC_X * 3 - MOVQ A_ROW, A_PTR - - XORQ TMP2, TMP2 - MOVQ M, TMP1 - SUBQ $1, TMP1 - IMULQ INC_X, TMP1 - NEGQ TMP1 - CMPQ INC_X, $0 - CMOVQLT TMP1, TMP2 - LEAQ (X_PTR)(TMP2*SIZE), X_PTR - - CMPQ incY+80(FP), $1 // Check for dense vector Y (fast-path) - JG inc - JL end - - SHRQ $2, M - JZ r2 - -r4: - // LOAD 4 - LOAD4 - - MOVQ N_DIM, N - SHRQ $2, N - JZ r4c2 - -r4c4: - // 4x4 KERNEL - KERNEL_LOAD4 - KERNEL_4x4 - STORE_4x4 - - ADDQ $4*SIZE, Y_PTR - - DECQ N - JNZ r4c4 - - // Reload ALPHA after it's clobbered by STORE_4x4 - MOVDDUP alpha+16(FP), ALPHA - -r4c2: - TESTQ $2, N_DIM - JZ r4c1 - - // 4x2 KERNEL - KERNEL_LOAD2 - KERNEL_4x2 - STORE_4x2 - - ADDQ $2*SIZE, Y_PTR - -r4c1: - TESTQ $1, N_DIM - JZ r4end - - // 4x1 KERNEL - KERNEL_4x1 - STORE_4x1 - - ADDQ $SIZE, Y_PTR - -r4end: - LEAQ (X_PTR)(INC_X*4), X_PTR - MOVQ Y, Y_PTR - LEAQ (A_ROW)(LDA*4), A_ROW - MOVQ A_ROW, A_PTR - - DECQ M - JNZ r4 - -r2: - TESTQ $2, M_DIM - JZ r1 - - // LOAD 2 - LOAD2 - - MOVQ N_DIM, N - SHRQ $2, N - JZ r2c2 - -r2c4: - // 2x4 KERNEL - KERNEL_LOAD4 - KERNEL_2x4 - STORE_2x4 - - ADDQ $4*SIZE, Y_PTR - - DECQ N - JNZ r2c4 - -r2c2: - TESTQ $2, N_DIM - JZ r2c1 - - // 2x2 KERNEL - KERNEL_LOAD2 - KERNEL_2x2 - STORE_2x2 - - ADDQ $2*SIZE, Y_PTR - -r2c1: - TESTQ $1, N_DIM - JZ r2end - - // 2x1 KERNEL - KERNEL_2x1 - STORE_2x1 - - ADDQ $SIZE, Y_PTR - -r2end: - LEAQ (X_PTR)(INC_X*2), X_PTR - MOVQ Y, Y_PTR - LEAQ (A_ROW)(LDA*2), A_ROW - MOVQ A_ROW, A_PTR - -r1: - TESTQ $1, M_DIM - JZ end - - // LOAD 1 - LOAD1 - - MOVQ N_DIM, N - SHRQ $2, N - JZ r1c2 - -r1c4: - // 1x4 KERNEL - KERNEL_LOAD4 - KERNEL_1x4 - STORE_1x4 - - ADDQ $4*SIZE, Y_PTR - - DECQ N - JNZ r1c4 - -r1c2: - TESTQ $2, N_DIM - JZ r1c1 - - // 1x2 KERNEL - KERNEL_LOAD2 - KERNEL_1x2 - STORE_1x2 - - ADDQ $2*SIZE, Y_PTR - -r1c1: - TESTQ $1, N_DIM - JZ end - - // 1x1 KERNEL - KERNEL_1x1 - STORE_1x1 - - ADDQ $SIZE, Y_PTR - -end: - RET - -inc: // Algorithm for incY != 1 ( split loads in kernel ) - - MOVQ incY+80(FP), INC_Y // INC_Y = incY * sizeof(float64) - SHLQ $3, INC_Y - LEAQ (INC_Y)(INC_Y*2), INC3_Y // INC3_Y = INC_Y * 3 - - XORQ TMP2, TMP2 - MOVQ N, TMP1 - SUBQ $1, TMP1 - IMULQ INC_Y, TMP1 - NEGQ TMP1 - CMPQ INC_Y, $0 - CMOVQLT TMP1, TMP2 - LEAQ (Y_PTR)(TMP2*SIZE), Y_PTR - - SHRQ $2, M - JZ inc_r2 - -inc_r4: - // LOAD 4 - LOAD4 - - MOVQ N_DIM, N - SHRQ $2, N - JZ inc_r4c2 - -inc_r4c4: - // 4x4 KERNEL - KERNEL_LOAD4_INC - KERNEL_4x4 - STORE_4x4 - - LEAQ (Y_PTR)(INC_Y*4), Y_PTR - DECQ N - JNZ inc_r4c4 - - // Reload ALPHA after it's clobbered by STORE_4x4 - MOVDDUP alpha+16(FP), ALPHA - -inc_r4c2: - TESTQ $2, N_DIM - JZ inc_r4c1 - - // 4x2 KERNEL - KERNEL_LOAD2_INC - KERNEL_4x2 - STORE_4x2 - - LEAQ (Y_PTR)(INC_Y*2), Y_PTR - -inc_r4c1: - TESTQ $1, N_DIM - JZ inc_r4end - - // 4x1 KERNEL - KERNEL_4x1 - STORE_4x1 - - ADDQ INC_Y, Y_PTR - -inc_r4end: - LEAQ (X_PTR)(INC_X*4), X_PTR - MOVQ Y, Y_PTR - LEAQ (A_ROW)(LDA*4), A_ROW - MOVQ A_ROW, A_PTR - - DECQ M - JNZ inc_r4 - -inc_r2: - TESTQ $2, M_DIM - JZ inc_r1 - - // LOAD 2 - LOAD2 - - MOVQ N_DIM, N - SHRQ $2, N - JZ inc_r2c2 - -inc_r2c4: - // 2x4 KERNEL - KERNEL_LOAD4_INC - KERNEL_2x4 - STORE_2x4 - - LEAQ (Y_PTR)(INC_Y*4), Y_PTR - DECQ N - JNZ inc_r2c4 - -inc_r2c2: - TESTQ $2, N_DIM - JZ inc_r2c1 - - // 2x2 KERNEL - KERNEL_LOAD2_INC - KERNEL_2x2 - STORE_2x2 - - LEAQ (Y_PTR)(INC_Y*2), Y_PTR - -inc_r2c1: - TESTQ $1, N_DIM - JZ inc_r2end - - // 2x1 KERNEL - KERNEL_2x1 - STORE_2x1 - - ADDQ INC_Y, Y_PTR - -inc_r2end: - LEAQ (X_PTR)(INC_X*2), X_PTR - MOVQ Y, Y_PTR - LEAQ (A_ROW)(LDA*2), A_ROW - MOVQ A_ROW, A_PTR - -inc_r1: - TESTQ $1, M_DIM - JZ end - - // LOAD 1 - LOAD1 - - MOVQ N_DIM, N - SHRQ $2, N - JZ inc_r1c2 - -inc_r1c4: - // 1x4 KERNEL - KERNEL_LOAD4_INC - KERNEL_1x4 - STORE_1x4 - - LEAQ (Y_PTR)(INC_Y*4), Y_PTR - DECQ N - JNZ inc_r1c4 - -inc_r1c2: - TESTQ $2, N_DIM - JZ inc_r1c1 - - // 1x2 KERNEL - KERNEL_LOAD2_INC - KERNEL_1x2 - STORE_1x2 - - LEAQ (Y_PTR)(INC_Y*2), Y_PTR - -inc_r1c1: - TESTQ $1, N_DIM - JZ end - - // 1x1 KERNEL - KERNEL_1x1 - STORE_1x1 - - ADDQ INC_Y, Y_PTR - -inc_end: - RET diff --git a/vendor/gonum.org/v1/gonum/internal/asm/f64/l1norm_amd64.s b/vendor/gonum.org/v1/gonum/internal/asm/f64/l1norm_amd64.s deleted file mode 100644 index f87f856cad..0000000000 --- a/vendor/gonum.org/v1/gonum/internal/asm/f64/l1norm_amd64.s +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright ©2016 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build !noasm,!appengine,!safe - -#include "textflag.h" - -// func L1Dist(s, t []float64) float64 -TEXT ·L1Dist(SB), NOSPLIT, $0 - MOVQ s_base+0(FP), DI // DI = &s - MOVQ t_base+24(FP), SI // SI = &t - MOVQ s_len+8(FP), CX // CX = len(s) - CMPQ t_len+32(FP), CX // CX = max( CX, len(t) ) - CMOVQLE t_len+32(FP), CX - PXOR X3, X3 // norm = 0 - CMPQ CX, $0 // if CX == 0 { return 0 } - JE l1_end - XORQ AX, AX // i = 0 - MOVQ CX, BX - ANDQ $1, BX // BX = CX % 2 - SHRQ $1, CX // CX = floor( CX / 2 ) - JZ l1_tail_start // if CX == 0 { return 0 } - -l1_loop: // Loop unrolled 2x do { - MOVUPS (SI)(AX*8), X0 // X0 = t[i:i+1] - MOVUPS (DI)(AX*8), X1 // X1 = s[i:i+1] - MOVAPS X0, X2 - SUBPD X1, X0 - SUBPD X2, X1 - MAXPD X1, X0 // X0 = max( X0 - X1, X1 - X0 ) - ADDPD X0, X3 // norm += X0 - ADDQ $2, AX // i += 2 - LOOP l1_loop // } while --CX > 0 - CMPQ BX, $0 // if BX == 0 { return } - JE l1_end - -l1_tail_start: // Reset loop registers - MOVQ BX, CX // Loop counter: CX = BX - PXOR X0, X0 // reset X0, X1 to break dependencies - PXOR X1, X1 - -l1_tail: - MOVSD (SI)(AX*8), X0 // X0 = t[i] - MOVSD (DI)(AX*8), X1 // x1 = s[i] - MOVAPD X0, X2 - SUBSD X1, X0 - SUBSD X2, X1 - MAXSD X1, X0 // X0 = max( X0 - X1, X1 - X0 ) - ADDSD X0, X3 // norm += X0 - -l1_end: - MOVAPS X3, X2 - SHUFPD $1, X2, X2 - ADDSD X3, X2 // X2 = X3[1] + X3[0] - MOVSD X2, ret+48(FP) // return X2 - RET - diff --git a/vendor/gonum.org/v1/gonum/internal/asm/f64/linfnorm_amd64.s b/vendor/gonum.org/v1/gonum/internal/asm/f64/linfnorm_amd64.s deleted file mode 100644 index b062592800..0000000000 --- a/vendor/gonum.org/v1/gonum/internal/asm/f64/linfnorm_amd64.s +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright ©2016 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build !noasm,!appengine,!safe - -#include "textflag.h" - -// func LinfDist(s, t []float64) float64 -TEXT ·LinfDist(SB), NOSPLIT, $0 - MOVQ s_base+0(FP), DI // DI = &s - MOVQ t_base+24(FP), SI // SI = &t - MOVQ s_len+8(FP), CX // CX = len(s) - CMPQ t_len+32(FP), CX // CX = max( CX, len(t) ) - CMOVQLE t_len+32(FP), CX - PXOR X3, X3 // norm = 0 - CMPQ CX, $0 // if CX == 0 { return 0 } - JE l1_end - XORQ AX, AX // i = 0 - MOVQ CX, BX - ANDQ $1, BX // BX = CX % 2 - SHRQ $1, CX // CX = floor( CX / 2 ) - JZ l1_tail_start // if CX == 0 { return 0 } - -l1_loop: // Loop unrolled 2x do { - MOVUPS (SI)(AX*8), X0 // X0 = t[i:i+1] - MOVUPS (DI)(AX*8), X1 // X1 = s[i:i+1] - MOVAPS X0, X2 - SUBPD X1, X0 - SUBPD X2, X1 - MAXPD X1, X0 // X0 = max( X0 - X1, X1 - X0 ) - MAXPD X0, X3 // norm = max( norm, X0 ) - ADDQ $2, AX // i += 2 - LOOP l1_loop // } while --CX > 0 - CMPQ BX, $0 // if BX == 0 { return } - JE l1_end - -l1_tail_start: // Reset loop registers - MOVQ BX, CX // Loop counter: CX = BX - PXOR X0, X0 // reset X0, X1 to break dependencies - PXOR X1, X1 - -l1_tail: - MOVSD (SI)(AX*8), X0 // X0 = t[i] - MOVSD (DI)(AX*8), X1 // X1 = s[i] - MOVAPD X0, X2 - SUBSD X1, X0 - SUBSD X2, X1 - MAXSD X1, X0 // X0 = max( X0 - X1, X1 - X0 ) - MAXSD X0, X3 // norm = max( norm, X0 ) - -l1_end: - MOVAPS X3, X2 - SHUFPD $1, X2, X2 - MAXSD X3, X2 // X2 = max( X3[1], X3[0] ) - MOVSD X2, ret+48(FP) // return X2 - RET diff --git a/vendor/gonum.org/v1/gonum/internal/asm/f64/scal.go b/vendor/gonum.org/v1/gonum/internal/asm/f64/scal.go deleted file mode 100644 index 3cc7aca69a..0000000000 --- a/vendor/gonum.org/v1/gonum/internal/asm/f64/scal.go +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright ©2016 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build !amd64 noasm appengine safe - -package f64 - -// ScalUnitary is -// for i := range x { -// x[i] *= alpha -// } -func ScalUnitary(alpha float64, x []float64) { - for i := range x { - x[i] *= alpha - } -} - -// ScalUnitaryTo is -// for i, v := range x { -// dst[i] = alpha * v -// } -func ScalUnitaryTo(dst []float64, alpha float64, x []float64) { - for i, v := range x { - dst[i] = alpha * v - } -} - -// ScalInc is -// var ix uintptr -// for i := 0; i < int(n); i++ { -// x[ix] *= alpha -// ix += incX -// } -func ScalInc(alpha float64, x []float64, n, incX uintptr) { - var ix uintptr - for i := 0; i < int(n); i++ { - x[ix] *= alpha - ix += incX - } -} - -// ScalIncTo is -// var idst, ix uintptr -// for i := 0; i < int(n); i++ { -// dst[idst] = alpha * x[ix] -// ix += incX -// idst += incDst -// } -func ScalIncTo(dst []float64, incDst uintptr, alpha float64, x []float64, n, incX uintptr) { - var idst, ix uintptr - for i := 0; i < int(n); i++ { - dst[idst] = alpha * x[ix] - ix += incX - idst += incDst - } -} diff --git a/vendor/gonum.org/v1/gonum/internal/asm/f64/scalinc_amd64.s b/vendor/gonum.org/v1/gonum/internal/asm/f64/scalinc_amd64.s deleted file mode 100644 index fb8b545eba..0000000000 --- a/vendor/gonum.org/v1/gonum/internal/asm/f64/scalinc_amd64.s +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright ©2016 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. -// -// Some of the loop unrolling code is copied from: -// http://golang.org/src/math/big/arith_amd64.s -// which is distributed under these terms: -// -// Copyright (c) 2012 The Go Authors. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -//+build !noasm,!appengine,!safe - -#include "textflag.h" - -#define X_PTR SI -#define LEN CX -#define TAIL BX -#define INC_X R8 -#define INCx3_X R9 -#define ALPHA X0 -#define ALPHA_2 X1 - -// func ScalInc(alpha float64, x []float64, n, incX uintptr) -TEXT ·ScalInc(SB), NOSPLIT, $0 - MOVSD alpha+0(FP), ALPHA // ALPHA = alpha - MOVQ x_base+8(FP), X_PTR // X_PTR = &x - MOVQ incX+40(FP), INC_X // INC_X = incX - SHLQ $3, INC_X // INC_X *= sizeof(float64) - MOVQ n+32(FP), LEN // LEN = n - CMPQ LEN, $0 - JE end // if LEN == 0 { return } - - MOVQ LEN, TAIL - ANDQ $3, TAIL // TAIL = LEN % 4 - SHRQ $2, LEN // LEN = floor( LEN / 4 ) - JZ tail_start // if LEN == 0 { goto tail_start } - - MOVUPS ALPHA, ALPHA_2 // ALPHA_2 = ALPHA for pipelining - LEAQ (INC_X)(INC_X*2), INCx3_X // INCx3_X = INC_X * 3 - -loop: // do { // x[i] *= alpha unrolled 4x. - MOVSD (X_PTR), X2 // X_i = x[i] - MOVSD (X_PTR)(INC_X*1), X3 - MOVSD (X_PTR)(INC_X*2), X4 - MOVSD (X_PTR)(INCx3_X*1), X5 - - MULSD ALPHA, X2 // X_i *= a - MULSD ALPHA_2, X3 - MULSD ALPHA, X4 - MULSD ALPHA_2, X5 - - MOVSD X2, (X_PTR) // x[i] = X_i - MOVSD X3, (X_PTR)(INC_X*1) - MOVSD X4, (X_PTR)(INC_X*2) - MOVSD X5, (X_PTR)(INCx3_X*1) - - LEAQ (X_PTR)(INC_X*4), X_PTR // X_PTR = &(X_PTR[incX*4]) - DECQ LEN - JNZ loop // } while --LEN > 0 - CMPQ TAIL, $0 - JE end // if TAIL == 0 { return } - -tail_start: // Reset loop registers - MOVQ TAIL, LEN // Loop counter: LEN = TAIL - SHRQ $1, LEN // LEN = floor( LEN / 2 ) - JZ tail_one - -tail_two: // do { - MOVSD (X_PTR), X2 // X_i = x[i] - MOVSD (X_PTR)(INC_X*1), X3 - MULSD ALPHA, X2 // X_i *= a - MULSD ALPHA, X3 - MOVSD X2, (X_PTR) // x[i] = X_i - MOVSD X3, (X_PTR)(INC_X*1) - - LEAQ (X_PTR)(INC_X*2), X_PTR // X_PTR = &(X_PTR[incX*2]) - - ANDQ $1, TAIL - JZ end - -tail_one: - MOVSD (X_PTR), X2 // X_i = x[i] - MULSD ALPHA, X2 // X_i *= ALPHA - MOVSD X2, (X_PTR) // x[i] = X_i - -end: - RET diff --git a/vendor/gonum.org/v1/gonum/internal/asm/f64/scalincto_amd64.s b/vendor/gonum.org/v1/gonum/internal/asm/f64/scalincto_amd64.s deleted file mode 100644 index 186fd1c05f..0000000000 --- a/vendor/gonum.org/v1/gonum/internal/asm/f64/scalincto_amd64.s +++ /dev/null @@ -1,122 +0,0 @@ -// Copyright ©2016 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. -// -// Some of the loop unrolling code is copied from: -// http://golang.org/src/math/big/arith_amd64.s -// which is distributed under these terms: -// -// Copyright (c) 2012 The Go Authors. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -//+build !noasm,!appengine,!safe - -#include "textflag.h" - -#define X_PTR SI -#define DST_PTR DI -#define LEN CX -#define TAIL BX -#define INC_X R8 -#define INCx3_X R9 -#define INC_DST R10 -#define INCx3_DST R11 -#define ALPHA X0 -#define ALPHA_2 X1 - -// func ScalIncTo(dst []float64, incDst uintptr, alpha float64, x []float64, n, incX uintptr) -TEXT ·ScalIncTo(SB), NOSPLIT, $0 - MOVQ dst_base+0(FP), DST_PTR // DST_PTR = &dst - MOVQ incDst+24(FP), INC_DST // INC_DST = incDst - SHLQ $3, INC_DST // INC_DST *= sizeof(float64) - MOVSD alpha+32(FP), ALPHA // ALPHA = alpha - MOVQ x_base+40(FP), X_PTR // X_PTR = &x - MOVQ n+64(FP), LEN // LEN = n - MOVQ incX+72(FP), INC_X // INC_X = incX - SHLQ $3, INC_X // INC_X *= sizeof(float64) - CMPQ LEN, $0 - JE end // if LEN == 0 { return } - - MOVQ LEN, TAIL - ANDQ $3, TAIL // TAIL = LEN % 4 - SHRQ $2, LEN // LEN = floor( LEN / 4 ) - JZ tail_start // if LEN == 0 { goto tail_start } - - MOVUPS ALPHA, ALPHA_2 // ALPHA_2 = ALPHA for pipelining - LEAQ (INC_X)(INC_X*2), INCx3_X // INCx3_X = INC_X * 3 - LEAQ (INC_DST)(INC_DST*2), INCx3_DST // INCx3_DST = INC_DST * 3 - -loop: // do { // x[i] *= alpha unrolled 4x. - MOVSD (X_PTR), X2 // X_i = x[i] - MOVSD (X_PTR)(INC_X*1), X3 - MOVSD (X_PTR)(INC_X*2), X4 - MOVSD (X_PTR)(INCx3_X*1), X5 - - MULSD ALPHA, X2 // X_i *= a - MULSD ALPHA_2, X3 - MULSD ALPHA, X4 - MULSD ALPHA_2, X5 - - MOVSD X2, (DST_PTR) // dst[i] = X_i - MOVSD X3, (DST_PTR)(INC_DST*1) - MOVSD X4, (DST_PTR)(INC_DST*2) - MOVSD X5, (DST_PTR)(INCx3_DST*1) - - LEAQ (X_PTR)(INC_X*4), X_PTR // X_PTR = &(X_PTR[incX*4]) - LEAQ (DST_PTR)(INC_DST*4), DST_PTR // DST_PTR = &(DST_PTR[incDst*4]) - DECQ LEN - JNZ loop // } while --LEN > 0 - CMPQ TAIL, $0 - JE end // if TAIL == 0 { return } - -tail_start: // Reset loop registers - MOVQ TAIL, LEN // Loop counter: LEN = TAIL - SHRQ $1, LEN // LEN = floor( LEN / 2 ) - JZ tail_one - -tail_two: - MOVSD (X_PTR), X2 // X_i = x[i] - MOVSD (X_PTR)(INC_X*1), X3 - MULSD ALPHA, X2 // X_i *= a - MULSD ALPHA, X3 - MOVSD X2, (DST_PTR) // dst[i] = X_i - MOVSD X3, (DST_PTR)(INC_DST*1) - - LEAQ (X_PTR)(INC_X*2), X_PTR // X_PTR = &(X_PTR[incX*2]) - LEAQ (DST_PTR)(INC_DST*2), DST_PTR // DST_PTR = &(DST_PTR[incDst*2]) - - ANDQ $1, TAIL - JZ end - -tail_one: - MOVSD (X_PTR), X2 // X_i = x[i] - MULSD ALPHA, X2 // X_i *= ALPHA - MOVSD X2, (DST_PTR) // x[i] = X_i - -end: - RET diff --git a/vendor/gonum.org/v1/gonum/internal/asm/f64/scalunitary_amd64.s b/vendor/gonum.org/v1/gonum/internal/asm/f64/scalunitary_amd64.s deleted file mode 100644 index f852c7f7c8..0000000000 --- a/vendor/gonum.org/v1/gonum/internal/asm/f64/scalunitary_amd64.s +++ /dev/null @@ -1,112 +0,0 @@ -// Copyright ©2016 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. -// -// Some of the loop unrolling code is copied from: -// http://golang.org/src/math/big/arith_amd64.s -// which is distributed under these terms: -// -// Copyright (c) 2012 The Go Authors. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -//+build !noasm,!appengine,!safe - -#include "textflag.h" - -#define MOVDDUP_ALPHA LONG $0x44120FF2; WORD $0x0824 // @ MOVDDUP XMM0, 8[RSP] - -#define X_PTR SI -#define DST_PTR DI -#define IDX AX -#define LEN CX -#define TAIL BX -#define ALPHA X0 -#define ALPHA_2 X1 - -// func ScalUnitary(alpha float64, x []float64) -TEXT ·ScalUnitary(SB), NOSPLIT, $0 - MOVDDUP_ALPHA // ALPHA = { alpha, alpha } - MOVQ x_base+8(FP), X_PTR // X_PTR = &x - MOVQ x_len+16(FP), LEN // LEN = len(x) - CMPQ LEN, $0 - JE end // if LEN == 0 { return } - XORQ IDX, IDX // IDX = 0 - - MOVQ LEN, TAIL - ANDQ $7, TAIL // TAIL = LEN % 8 - SHRQ $3, LEN // LEN = floor( LEN / 8 ) - JZ tail_start // if LEN == 0 { goto tail_start } - - MOVUPS ALPHA, ALPHA_2 - -loop: // do { // x[i] *= alpha unrolled 8x. - MOVUPS (X_PTR)(IDX*8), X2 // X_i = x[i] - MOVUPS 16(X_PTR)(IDX*8), X3 - MOVUPS 32(X_PTR)(IDX*8), X4 - MOVUPS 48(X_PTR)(IDX*8), X5 - - MULPD ALPHA, X2 // X_i *= ALPHA - MULPD ALPHA_2, X3 - MULPD ALPHA, X4 - MULPD ALPHA_2, X5 - - MOVUPS X2, (X_PTR)(IDX*8) // x[i] = X_i - MOVUPS X3, 16(X_PTR)(IDX*8) - MOVUPS X4, 32(X_PTR)(IDX*8) - MOVUPS X5, 48(X_PTR)(IDX*8) - - ADDQ $8, IDX // i += 8 - DECQ LEN - JNZ loop // while --LEN > 0 - CMPQ TAIL, $0 - JE end // if TAIL == 0 { return } - -tail_start: // Reset loop registers - MOVQ TAIL, LEN // Loop counter: LEN = TAIL - SHRQ $1, LEN // LEN = floor( TAIL / 2 ) - JZ tail_one // if n == 0 goto end - -tail_two: // do { - MOVUPS (X_PTR)(IDX*8), X2 // X_i = x[i] - MULPD ALPHA, X2 // X_i *= ALPHA - MOVUPS X2, (X_PTR)(IDX*8) // x[i] = X_i - ADDQ $2, IDX // i += 2 - DECQ LEN - JNZ tail_two // while --LEN > 0 - - ANDQ $1, TAIL - JZ end // if TAIL == 0 { return } - -tail_one: - // x[i] *= alpha for the remaining element. - MOVSD (X_PTR)(IDX*8), X2 - MULSD ALPHA, X2 - MOVSD X2, (X_PTR)(IDX*8) - -end: - RET diff --git a/vendor/gonum.org/v1/gonum/internal/asm/f64/scalunitaryto_amd64.s b/vendor/gonum.org/v1/gonum/internal/asm/f64/scalunitaryto_amd64.s deleted file mode 100644 index d2b607f525..0000000000 --- a/vendor/gonum.org/v1/gonum/internal/asm/f64/scalunitaryto_amd64.s +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright ©2016 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. -// -// Some of the loop unrolling code is copied from: -// http://golang.org/src/math/big/arith_amd64.s -// which is distributed under these terms: -// -// Copyright (c) 2012 The Go Authors. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -//+build !noasm,!appengine,!safe - -#include "textflag.h" - -#define MOVDDUP_ALPHA LONG $0x44120FF2; WORD $0x2024 // @ MOVDDUP 32(SP), X0 /*XMM0, 32[RSP]*/ - -#define X_PTR SI -#define DST_PTR DI -#define IDX AX -#define LEN CX -#define TAIL BX -#define ALPHA X0 -#define ALPHA_2 X1 - -// func ScalUnitaryTo(dst []float64, alpha float64, x []float64) -// This function assumes len(dst) >= len(x). -TEXT ·ScalUnitaryTo(SB), NOSPLIT, $0 - MOVQ x_base+32(FP), X_PTR // X_PTR = &x - MOVQ dst_base+0(FP), DST_PTR // DST_PTR = &dst - MOVDDUP_ALPHA // ALPHA = { alpha, alpha } - MOVQ x_len+40(FP), LEN // LEN = len(x) - CMPQ LEN, $0 - JE end // if LEN == 0 { return } - - XORQ IDX, IDX // IDX = 0 - MOVQ LEN, TAIL - ANDQ $7, TAIL // TAIL = LEN % 8 - SHRQ $3, LEN // LEN = floor( LEN / 8 ) - JZ tail_start // if LEN == 0 { goto tail_start } - - MOVUPS ALPHA, ALPHA_2 // ALPHA_2 = ALPHA for pipelining - -loop: // do { // dst[i] = alpha * x[i] unrolled 8x. - MOVUPS (X_PTR)(IDX*8), X2 // X_i = x[i] - MOVUPS 16(X_PTR)(IDX*8), X3 - MOVUPS 32(X_PTR)(IDX*8), X4 - MOVUPS 48(X_PTR)(IDX*8), X5 - - MULPD ALPHA, X2 // X_i *= ALPHA - MULPD ALPHA_2, X3 - MULPD ALPHA, X4 - MULPD ALPHA_2, X5 - - MOVUPS X2, (DST_PTR)(IDX*8) // dst[i] = X_i - MOVUPS X3, 16(DST_PTR)(IDX*8) - MOVUPS X4, 32(DST_PTR)(IDX*8) - MOVUPS X5, 48(DST_PTR)(IDX*8) - - ADDQ $8, IDX // i += 8 - DECQ LEN - JNZ loop // while --LEN > 0 - CMPQ TAIL, $0 - JE end // if TAIL == 0 { return } - -tail_start: // Reset loop counters - MOVQ TAIL, LEN // Loop counter: LEN = TAIL - SHRQ $1, LEN // LEN = floor( TAIL / 2 ) - JZ tail_one // if LEN == 0 { goto tail_one } - -tail_two: // do { - MOVUPS (X_PTR)(IDX*8), X2 // X_i = x[i] - MULPD ALPHA, X2 // X_i *= ALPHA - MOVUPS X2, (DST_PTR)(IDX*8) // dst[i] = X_i - ADDQ $2, IDX // i += 2 - DECQ LEN - JNZ tail_two // while --LEN > 0 - - ANDQ $1, TAIL - JZ end // if TAIL == 0 { return } - -tail_one: - MOVSD (X_PTR)(IDX*8), X2 // X_i = x[i] - MULSD ALPHA, X2 // X_i *= ALPHA - MOVSD X2, (DST_PTR)(IDX*8) // dst[i] = X_i - -end: - RET diff --git a/vendor/gonum.org/v1/gonum/internal/asm/f64/stubs_amd64.go b/vendor/gonum.org/v1/gonum/internal/asm/f64/stubs_amd64.go deleted file mode 100644 index a51b94514a..0000000000 --- a/vendor/gonum.org/v1/gonum/internal/asm/f64/stubs_amd64.go +++ /dev/null @@ -1,172 +0,0 @@ -// Copyright ©2015 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build !noasm,!appengine,!safe - -package f64 - -// L1Norm is -// for _, v := range x { -// sum += math.Abs(v) -// } -// return sum -func L1Norm(x []float64) (sum float64) - -// L1NormInc is -// for i := 0; i < n*incX; i += incX { -// sum += math.Abs(x[i]) -// } -// return sum -func L1NormInc(x []float64, n, incX int) (sum float64) - -// AddConst is -// for i := range x { -// x[i] += alpha -// } -func AddConst(alpha float64, x []float64) - -// Add is -// for i, v := range s { -// dst[i] += v -// } -func Add(dst, s []float64) - -// AxpyUnitary is -// for i, v := range x { -// y[i] += alpha * v -// } -func AxpyUnitary(alpha float64, x, y []float64) - -// AxpyUnitaryTo is -// for i, v := range x { -// dst[i] = alpha*v + y[i] -// } -func AxpyUnitaryTo(dst []float64, alpha float64, x, y []float64) - -// AxpyInc is -// for i := 0; i < int(n); i++ { -// y[iy] += alpha * x[ix] -// ix += incX -// iy += incY -// } -func AxpyInc(alpha float64, x, y []float64, n, incX, incY, ix, iy uintptr) - -// AxpyIncTo is -// for i := 0; i < int(n); i++ { -// dst[idst] = alpha*x[ix] + y[iy] -// ix += incX -// iy += incY -// idst += incDst -// } -func AxpyIncTo(dst []float64, incDst, idst uintptr, alpha float64, x, y []float64, n, incX, incY, ix, iy uintptr) - -// CumSum is -// if len(s) == 0 { -// return dst -// } -// dst[0] = s[0] -// for i, v := range s[1:] { -// dst[i+1] = dst[i] + v -// } -// return dst -func CumSum(dst, s []float64) []float64 - -// CumProd is -// if len(s) == 0 { -// return dst -// } -// dst[0] = s[0] -// for i, v := range s[1:] { -// dst[i+1] = dst[i] * v -// } -// return dst -func CumProd(dst, s []float64) []float64 - -// Div is -// for i, v := range s { -// dst[i] /= v -// } -func Div(dst, s []float64) - -// DivTo is -// for i, v := range s { -// dst[i] = v / t[i] -// } -// return dst -func DivTo(dst, x, y []float64) []float64 - -// DotUnitary is -// for i, v := range x { -// sum += y[i] * v -// } -// return sum -func DotUnitary(x, y []float64) (sum float64) - -// DotInc is -// for i := 0; i < int(n); i++ { -// sum += y[iy] * x[ix] -// ix += incX -// iy += incY -// } -// return sum -func DotInc(x, y []float64, n, incX, incY, ix, iy uintptr) (sum float64) - -// L1Dist is -// var norm float64 -// for i, v := range s { -// norm += math.Abs(t[i] - v) -// } -// return norm -func L1Dist(s, t []float64) float64 - -// LinfDist is -// var norm float64 -// if len(s) == 0 { -// return 0 -// } -// norm = math.Abs(t[0] - s[0]) -// for i, v := range s[1:] { -// absDiff := math.Abs(t[i+1] - v) -// if absDiff > norm || math.IsNaN(norm) { -// norm = absDiff -// } -// } -// return norm -func LinfDist(s, t []float64) float64 - -// ScalUnitary is -// for i := range x { -// x[i] *= alpha -// } -func ScalUnitary(alpha float64, x []float64) - -// ScalUnitaryTo is -// for i, v := range x { -// dst[i] = alpha * v -// } -func ScalUnitaryTo(dst []float64, alpha float64, x []float64) - -// ScalInc is -// var ix uintptr -// for i := 0; i < int(n); i++ { -// x[ix] *= alpha -// ix += incX -// } -func ScalInc(alpha float64, x []float64, n, incX uintptr) - -// ScalIncTo is -// var idst, ix uintptr -// for i := 0; i < int(n); i++ { -// dst[idst] = alpha * x[ix] -// ix += incX -// idst += incDst -// } -func ScalIncTo(dst []float64, incDst uintptr, alpha float64, x []float64, n, incX uintptr) - -// Sum is -// var sum float64 -// for i := range x { -// sum += x[i] -// } -func Sum(x []float64) float64 diff --git a/vendor/gonum.org/v1/gonum/internal/asm/f64/stubs_noasm.go b/vendor/gonum.org/v1/gonum/internal/asm/f64/stubs_noasm.go deleted file mode 100644 index 670978aa47..0000000000 --- a/vendor/gonum.org/v1/gonum/internal/asm/f64/stubs_noasm.go +++ /dev/null @@ -1,170 +0,0 @@ -// Copyright ©2016 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build !amd64 noasm appengine safe - -package f64 - -import "math" - -// L1Norm is -// for _, v := range x { -// sum += math.Abs(v) -// } -// return sum -func L1Norm(x []float64) (sum float64) { - for _, v := range x { - sum += math.Abs(v) - } - return sum -} - -// L1NormInc is -// for i := 0; i < n*incX; i += incX { -// sum += math.Abs(x[i]) -// } -// return sum -func L1NormInc(x []float64, n, incX int) (sum float64) { - for i := 0; i < n*incX; i += incX { - sum += math.Abs(x[i]) - } - return sum -} - -// Add is -// for i, v := range s { -// dst[i] += v -// } -func Add(dst, s []float64) { - for i, v := range s { - dst[i] += v - } -} - -// AddConst is -// for i := range x { -// x[i] += alpha -// } -func AddConst(alpha float64, x []float64) { - for i := range x { - x[i] += alpha - } -} - -// CumSum is -// if len(s) == 0 { -// return dst -// } -// dst[0] = s[0] -// for i, v := range s[1:] { -// dst[i+1] = dst[i] + v -// } -// return dst -func CumSum(dst, s []float64) []float64 { - if len(s) == 0 { - return dst - } - dst[0] = s[0] - for i, v := range s[1:] { - dst[i+1] = dst[i] + v - } - return dst -} - -// CumProd is -// if len(s) == 0 { -// return dst -// } -// dst[0] = s[0] -// for i, v := range s[1:] { -// dst[i+1] = dst[i] * v -// } -// return dst -func CumProd(dst, s []float64) []float64 { - if len(s) == 0 { - return dst - } - dst[0] = s[0] - for i, v := range s[1:] { - dst[i+1] = dst[i] * v - } - return dst -} - -// Div is -// for i, v := range s { -// dst[i] /= v -// } -func Div(dst, s []float64) { - for i, v := range s { - dst[i] /= v - } -} - -// DivTo is -// for i, v := range s { -// dst[i] = v / t[i] -// } -// return dst -func DivTo(dst, s, t []float64) []float64 { - for i, v := range s { - dst[i] = v / t[i] - } - return dst -} - -// L1Dist is -// var norm float64 -// for i, v := range s { -// norm += math.Abs(t[i] - v) -// } -// return norm -func L1Dist(s, t []float64) float64 { - var norm float64 - for i, v := range s { - norm += math.Abs(t[i] - v) - } - return norm -} - -// LinfDist is -// var norm float64 -// if len(s) == 0 { -// return 0 -// } -// norm = math.Abs(t[0] - s[0]) -// for i, v := range s[1:] { -// absDiff := math.Abs(t[i+1] - v) -// if absDiff > norm || math.IsNaN(norm) { -// norm = absDiff -// } -// } -// return norm -func LinfDist(s, t []float64) float64 { - var norm float64 - if len(s) == 0 { - return 0 - } - norm = math.Abs(t[0] - s[0]) - for i, v := range s[1:] { - absDiff := math.Abs(t[i+1] - v) - if absDiff > norm || math.IsNaN(norm) { - norm = absDiff - } - } - return norm -} - -// Sum is -// var sum float64 -// for i := range x { -// sum += x[i] -// } -func Sum(x []float64) float64 { - var sum float64 - for _, v := range x { - sum += v - } - return sum -} diff --git a/vendor/gonum.org/v1/gonum/internal/asm/f64/sum_amd64.s b/vendor/gonum.org/v1/gonum/internal/asm/f64/sum_amd64.s deleted file mode 100644 index 22eede6e11..0000000000 --- a/vendor/gonum.org/v1/gonum/internal/asm/f64/sum_amd64.s +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright ©2018 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build !noasm,!appengine,!safe - -#include "textflag.h" - -#define X_PTR SI -#define IDX AX -#define LEN CX -#define TAIL BX -#define SUM X0 -#define SUM_1 X1 -#define SUM_2 X2 -#define SUM_3 X3 - -// func Sum(x []float64) float64 -TEXT ·Sum(SB), NOSPLIT, $0 - MOVQ x_base+0(FP), X_PTR // X_PTR = &x - MOVQ x_len+8(FP), LEN // LEN = len(x) - XORQ IDX, IDX // i = 0 - PXOR SUM, SUM // p_sum_i = 0 - CMPQ LEN, $0 // if LEN == 0 { return 0 } - JE sum_end - - PXOR SUM_1, SUM_1 - PXOR SUM_2, SUM_2 - PXOR SUM_3, SUM_3 - - MOVQ X_PTR, TAIL // Check memory alignment - ANDQ $15, TAIL // TAIL = &y % 16 - JZ no_trim // if TAIL == 0 { goto no_trim } - - // Align on 16-byte boundary - ADDSD (X_PTR), X0 // X0 += x[0] - INCQ IDX // i++ - DECQ LEN // LEN-- - DECQ TAIL // TAIL-- - JZ sum_end // if TAIL == 0 { return } - -no_trim: - MOVQ LEN, TAIL - SHRQ $4, LEN // LEN = floor( n / 16 ) - JZ sum_tail8 // if LEN == 0 { goto sum_tail8 } - -sum_loop: // sum 16x wide do { - ADDPD (SI)(AX*8), SUM // sum_i += x[i:i+2] - ADDPD 16(SI)(AX*8), SUM_1 - ADDPD 32(SI)(AX*8), SUM_2 - ADDPD 48(SI)(AX*8), SUM_3 - ADDPD 64(SI)(AX*8), SUM - ADDPD 80(SI)(AX*8), SUM_1 - ADDPD 96(SI)(AX*8), SUM_2 - ADDPD 112(SI)(AX*8), SUM_3 - ADDQ $16, IDX // i += 16 - DECQ LEN - JNZ sum_loop // } while --CX > 0 - -sum_tail8: - TESTQ $8, TAIL - JZ sum_tail4 - - ADDPD (SI)(AX*8), SUM // sum_i += x[i:i+2] - ADDPD 16(SI)(AX*8), SUM_1 - ADDPD 32(SI)(AX*8), SUM_2 - ADDPD 48(SI)(AX*8), SUM_3 - ADDQ $8, IDX - -sum_tail4: - ADDPD SUM_3, SUM - ADDPD SUM_2, SUM_1 - - TESTQ $4, TAIL - JZ sum_tail2 - - ADDPD (SI)(AX*8), SUM // sum_i += x[i:i+2] - ADDPD 16(SI)(AX*8), SUM_1 - ADDQ $4, IDX - -sum_tail2: - ADDPD SUM_1, SUM - - TESTQ $2, TAIL - JZ sum_tail1 - - ADDPD (SI)(AX*8), SUM // sum_i += x[i:i+2] - ADDQ $2, IDX - -sum_tail1: - HADDPD SUM, SUM // sum_i[0] += sum_i[1] - - TESTQ $1, TAIL - JZ sum_end - - ADDSD (SI)(IDX*8), SUM - -sum_end: // return sum - MOVSD SUM, sum+24(FP) - RET diff --git a/vendor/gonum.org/v1/gonum/internal/cmplx64/abs.go b/vendor/gonum.org/v1/gonum/internal/cmplx64/abs.go deleted file mode 100644 index ac6eb81c0e..0000000000 --- a/vendor/gonum.org/v1/gonum/internal/cmplx64/abs.go +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright 2010 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Copyright ©2017 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package cmplx64 - -import math "gonum.org/v1/gonum/internal/math32" - -// Abs returns the absolute value (also called the modulus) of x. -func Abs(x complex64) float32 { return math.Hypot(real(x), imag(x)) } diff --git a/vendor/gonum.org/v1/gonum/internal/cmplx64/conj.go b/vendor/gonum.org/v1/gonum/internal/cmplx64/conj.go deleted file mode 100644 index 705262f2f9..0000000000 --- a/vendor/gonum.org/v1/gonum/internal/cmplx64/conj.go +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright 2010 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Copyright ©2017 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package cmplx64 - -// Conj returns the complex conjugate of x. -func Conj(x complex64) complex64 { return complex(real(x), -imag(x)) } diff --git a/vendor/gonum.org/v1/gonum/internal/cmplx64/doc.go b/vendor/gonum.org/v1/gonum/internal/cmplx64/doc.go deleted file mode 100644 index 5424ea099c..0000000000 --- a/vendor/gonum.org/v1/gonum/internal/cmplx64/doc.go +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright ©2017 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package cmplx64 provides complex64 versions of standard library math/cmplx -// package routines used by gonum/blas. -package cmplx64 // import "gonum.org/v1/gonum/internal/cmplx64" diff --git a/vendor/gonum.org/v1/gonum/internal/cmplx64/isinf.go b/vendor/gonum.org/v1/gonum/internal/cmplx64/isinf.go deleted file mode 100644 index 21d3d180e1..0000000000 --- a/vendor/gonum.org/v1/gonum/internal/cmplx64/isinf.go +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright 2010 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Copyright ©2017 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package cmplx64 - -import math "gonum.org/v1/gonum/internal/math32" - -// IsInf returns true if either real(x) or imag(x) is an infinity. -func IsInf(x complex64) bool { - if math.IsInf(real(x), 0) || math.IsInf(imag(x), 0) { - return true - } - return false -} - -// Inf returns a complex infinity, complex(+Inf, +Inf). -func Inf() complex64 { - inf := math.Inf(1) - return complex(inf, inf) -} diff --git a/vendor/gonum.org/v1/gonum/internal/cmplx64/isnan.go b/vendor/gonum.org/v1/gonum/internal/cmplx64/isnan.go deleted file mode 100644 index 7e0bf788f1..0000000000 --- a/vendor/gonum.org/v1/gonum/internal/cmplx64/isnan.go +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright 2010 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Copyright ©2017 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package cmplx64 - -import math "gonum.org/v1/gonum/internal/math32" - -// IsNaN returns true if either real(x) or imag(x) is NaN -// and neither is an infinity. -func IsNaN(x complex64) bool { - switch { - case math.IsInf(real(x), 0) || math.IsInf(imag(x), 0): - return false - case math.IsNaN(real(x)) || math.IsNaN(imag(x)): - return true - } - return false -} - -// NaN returns a complex ``not-a-number'' value. -func NaN() complex64 { - nan := math.NaN() - return complex(nan, nan) -} diff --git a/vendor/gonum.org/v1/gonum/internal/cmplx64/sqrt.go b/vendor/gonum.org/v1/gonum/internal/cmplx64/sqrt.go deleted file mode 100644 index 439987b4ba..0000000000 --- a/vendor/gonum.org/v1/gonum/internal/cmplx64/sqrt.go +++ /dev/null @@ -1,108 +0,0 @@ -// Copyright 2010 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Copyright ©2017 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package cmplx64 - -import math "gonum.org/v1/gonum/internal/math32" - -// The original C code, the long comment, and the constants -// below are from http://netlib.sandia.gov/cephes/c9x-complex/clog.c. -// The go code is a simplified version of the original C. -// -// Cephes Math Library Release 2.8: June, 2000 -// Copyright 1984, 1987, 1989, 1992, 2000 by Stephen L. Moshier -// -// The readme file at http://netlib.sandia.gov/cephes/ says: -// Some software in this archive may be from the book _Methods and -// Programs for Mathematical Functions_ (Prentice-Hall or Simon & Schuster -// International, 1989) or from the Cephes Mathematical Library, a -// commercial product. In either event, it is copyrighted by the author. -// What you see here may be used freely but it comes with no support or -// guarantee. -// -// The two known misprints in the book are repaired here in the -// source listings for the gamma function and the incomplete beta -// integral. -// -// Stephen L. Moshier -// moshier@na-net.ornl.gov - -// Complex square root -// -// DESCRIPTION: -// -// If z = x + iy, r = |z|, then -// -// 1/2 -// Re w = [ (r + x)/2 ] , -// -// 1/2 -// Im w = [ (r - x)/2 ] . -// -// Cancelation error in r-x or r+x is avoided by using the -// identity 2 Re w Im w = y. -// -// Note that -w is also a square root of z. The root chosen -// is always in the right half plane and Im w has the same sign as y. -// -// ACCURACY: -// -// Relative error: -// arithmetic domain # trials peak rms -// DEC -10,+10 25000 3.2e-17 9.6e-18 -// IEEE -10,+10 1,000,000 2.9e-16 6.1e-17 - -// Sqrt returns the square root of x. -// The result r is chosen so that real(r) ≥ 0 and imag(r) has the same sign as imag(x). -func Sqrt(x complex64) complex64 { - if imag(x) == 0 { - if real(x) == 0 { - return complex(0, 0) - } - if real(x) < 0 { - return complex(0, math.Sqrt(-real(x))) - } - return complex(math.Sqrt(real(x)), 0) - } - if real(x) == 0 { - if imag(x) < 0 { - r := math.Sqrt(-0.5 * imag(x)) - return complex(r, -r) - } - r := math.Sqrt(0.5 * imag(x)) - return complex(r, r) - } - a := real(x) - b := imag(x) - var scale float32 - // Rescale to avoid internal overflow or underflow. - if math.Abs(a) > 4 || math.Abs(b) > 4 { - a *= 0.25 - b *= 0.25 - scale = 2 - } else { - a *= 1.8014398509481984e16 // 2**54 - b *= 1.8014398509481984e16 - scale = 7.450580596923828125e-9 // 2**-27 - } - r := math.Hypot(a, b) - var t float32 - if a > 0 { - t = math.Sqrt(0.5*r + 0.5*a) - r = scale * math.Abs((0.5*b)/t) - t *= scale - } else { - r = math.Sqrt(0.5*r - 0.5*a) - t = scale * math.Abs((0.5*b)/r) - r *= scale - } - if b < 0 { - return complex(t, -r) - } - return complex(t, r) -} diff --git a/vendor/gonum.org/v1/gonum/internal/math32/doc.go b/vendor/gonum.org/v1/gonum/internal/math32/doc.go deleted file mode 100644 index 68917c64e6..0000000000 --- a/vendor/gonum.org/v1/gonum/internal/math32/doc.go +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright ©2017 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package math32 provides float32 versions of standard library math package -// routines used by gonum/blas/native. -package math32 // import "gonum.org/v1/gonum/internal/math32" diff --git a/vendor/gonum.org/v1/gonum/internal/math32/math.go b/vendor/gonum.org/v1/gonum/internal/math32/math.go deleted file mode 100644 index 56c90be027..0000000000 --- a/vendor/gonum.org/v1/gonum/internal/math32/math.go +++ /dev/null @@ -1,111 +0,0 @@ -// Copyright 2009 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Copyright ©2015 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package math32 - -import ( - "math" -) - -const ( - unan = 0x7fc00000 - uinf = 0x7f800000 - uneginf = 0xff800000 - mask = 0x7f8 >> 3 - shift = 32 - 8 - 1 - bias = 127 -) - -// Abs returns the absolute value of x. -// -// Special cases are: -// Abs(±Inf) = +Inf -// Abs(NaN) = NaN -func Abs(x float32) float32 { - switch { - case x < 0: - return -x - case x == 0: - return 0 // return correctly abs(-0) - } - return x -} - -// Copysign returns a value with the magnitude -// of x and the sign of y. -func Copysign(x, y float32) float32 { - const sign = 1 << 31 - return math.Float32frombits(math.Float32bits(x)&^sign | math.Float32bits(y)&sign) -} - -// Hypot returns Sqrt(p*p + q*q), taking care to avoid -// unnecessary overflow and underflow. -// -// Special cases are: -// Hypot(±Inf, q) = +Inf -// Hypot(p, ±Inf) = +Inf -// Hypot(NaN, q) = NaN -// Hypot(p, NaN) = NaN -func Hypot(p, q float32) float32 { - // special cases - switch { - case IsInf(p, 0) || IsInf(q, 0): - return Inf(1) - case IsNaN(p) || IsNaN(q): - return NaN() - } - if p < 0 { - p = -p - } - if q < 0 { - q = -q - } - if p < q { - p, q = q, p - } - if p == 0 { - return 0 - } - q = q / p - return p * Sqrt(1+q*q) -} - -// Inf returns positive infinity if sign >= 0, negative infinity if sign < 0. -func Inf(sign int) float32 { - var v uint32 - if sign >= 0 { - v = uinf - } else { - v = uneginf - } - return math.Float32frombits(v) -} - -// IsInf reports whether f is an infinity, according to sign. -// If sign > 0, IsInf reports whether f is positive infinity. -// If sign < 0, IsInf reports whether f is negative infinity. -// If sign == 0, IsInf reports whether f is either infinity. -func IsInf(f float32, sign int) bool { - // Test for infinity by comparing against maximum float. - // To avoid the floating-point hardware, could use: - // x := math.Float32bits(f); - // return sign >= 0 && x == uinf || sign <= 0 && x == uneginf; - return sign >= 0 && f > math.MaxFloat32 || sign <= 0 && f < -math.MaxFloat32 -} - -// IsNaN reports whether f is an IEEE 754 ``not-a-number'' value. -func IsNaN(f float32) (is bool) { - // IEEE 754 says that only NaNs satisfy f != f. - // To avoid the floating-point hardware, could use: - // x := math.Float32bits(f); - // return uint32(x>>shift)&mask == mask && x != uinf && x != uneginf - return f != f -} - -// NaN returns an IEEE 754 ``not-a-number'' value. -func NaN() float32 { return math.Float32frombits(unan) } diff --git a/vendor/gonum.org/v1/gonum/internal/math32/signbit.go b/vendor/gonum.org/v1/gonum/internal/math32/signbit.go deleted file mode 100644 index 3e9f0bb41d..0000000000 --- a/vendor/gonum.org/v1/gonum/internal/math32/signbit.go +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright 2010 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Copyright ©2017 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package math32 - -import "math" - -// Signbit returns true if x is negative or negative zero. -func Signbit(x float32) bool { - return math.Float32bits(x)&(1<<31) != 0 -} diff --git a/vendor/gonum.org/v1/gonum/internal/math32/sqrt.go b/vendor/gonum.org/v1/gonum/internal/math32/sqrt.go deleted file mode 100644 index bf630de99c..0000000000 --- a/vendor/gonum.org/v1/gonum/internal/math32/sqrt.go +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright ©2015 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build !amd64 noasm appengine safe - -package math32 - -import ( - "math" -) - -// Sqrt returns the square root of x. -// -// Special cases are: -// Sqrt(+Inf) = +Inf -// Sqrt(±0) = ±0 -// Sqrt(x < 0) = NaN -// Sqrt(NaN) = NaN -func Sqrt(x float32) float32 { - // FIXME(kortschak): Direct translation of the math package - // asm code for 386 fails to build. No test hardware is available - // for arm, so using conversion instead. - return float32(math.Sqrt(float64(x))) -} diff --git a/vendor/gonum.org/v1/gonum/internal/math32/sqrt_amd64.go b/vendor/gonum.org/v1/gonum/internal/math32/sqrt_amd64.go deleted file mode 100644 index 905ae5c686..0000000000 --- a/vendor/gonum.org/v1/gonum/internal/math32/sqrt_amd64.go +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright 2009 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Copyright ©2015 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build !noasm,!appengine,!safe - -package math32 - -// Sqrt returns the square root of x. -// -// Special cases are: -// Sqrt(+Inf) = +Inf -// Sqrt(±0) = ±0 -// Sqrt(x < 0) = NaN -// Sqrt(NaN) = NaN -func Sqrt(x float32) float32 diff --git a/vendor/gonum.org/v1/gonum/internal/math32/sqrt_amd64.s b/vendor/gonum.org/v1/gonum/internal/math32/sqrt_amd64.s deleted file mode 100644 index fa2b8696ea..0000000000 --- a/vendor/gonum.org/v1/gonum/internal/math32/sqrt_amd64.s +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright 2009 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Copyright ©2015 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//+build !noasm,!appengine,!safe - -// TODO(kortschak): use textflag.h after we drop Go 1.3 support -//#include "textflag.h" -// Don't insert stack check preamble. -#define NOSPLIT 4 - -// func Sqrt(x float32) float32 -TEXT ·Sqrt(SB),NOSPLIT,$0 - SQRTSS x+0(FP), X0 - MOVSS X0, ret+8(FP) - RET diff --git a/vendor/gonum.org/v1/gonum/lapack/.gitignore b/vendor/gonum.org/v1/gonum/lapack/.gitignore deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/vendor/gonum.org/v1/gonum/lapack/README.md b/vendor/gonum.org/v1/gonum/lapack/README.md deleted file mode 100644 index c355017c8b..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/README.md +++ /dev/null @@ -1,28 +0,0 @@ -Gonum LAPACK [![GoDoc](https://godoc.org/gonum.org/v1/gonum/lapack?status.svg)](https://godoc.org/gonum.org/v1/gonum/lapack) -====== - -A collection of packages to provide LAPACK functionality for the Go programming -language (http://golang.org). This provides a partial implementation in native go -and a wrapper using cgo to a c-based implementation. - -## Installation - -``` - go get gonum.org/v1/gonum/lapack/... -``` - -## Packages - -### lapack - -Defines the LAPACK API based on http://www.netlib.org/lapack/lapacke.html - -### lapack/gonum - -Go implementation of the LAPACK API (incomplete, implements the `float64` API). - -### lapack/lapack64 - -Wrappers for an implementation of the double (i.e., `float64`) precision real parts of -the LAPACK API. - diff --git a/vendor/gonum.org/v1/gonum/lapack/doc.go b/vendor/gonum.org/v1/gonum/lapack/doc.go deleted file mode 100644 index 2475cb4aa0..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/doc.go +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright ©2018 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package lapack provides interfaces for the LAPACK linear algebra standard. -package lapack // import "gonum.org/v1/gonum/lapack" diff --git a/vendor/gonum.org/v1/gonum/lapack/gonum/dbdsqr.go b/vendor/gonum.org/v1/gonum/lapack/gonum/dbdsqr.go deleted file mode 100644 index 5f3833fd97..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/gonum/dbdsqr.go +++ /dev/null @@ -1,505 +0,0 @@ -// Copyright ©2015 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import ( - "math" - - "gonum.org/v1/gonum/blas" - "gonum.org/v1/gonum/blas/blas64" - "gonum.org/v1/gonum/lapack" -) - -// Dbdsqr performs a singular value decomposition of a real n×n bidiagonal matrix. -// -// The SVD of the bidiagonal matrix B is -// B = Q * S * P^T -// where S is a diagonal matrix of singular values, Q is an orthogonal matrix of -// left singular vectors, and P is an orthogonal matrix of right singular vectors. -// -// Q and P are only computed if requested. If left singular vectors are requested, -// this routine returns U * Q instead of Q, and if right singular vectors are -// requested P^T * VT is returned instead of P^T. -// -// Frequently Dbdsqr is used in conjunction with Dgebrd which reduces a general -// matrix A into bidiagonal form. In this case, the SVD of A is -// A = (U * Q) * S * (P^T * VT) -// -// This routine may also compute Q^T * C. -// -// d and e contain the elements of the bidiagonal matrix b. d must have length at -// least n, and e must have length at least n-1. Dbdsqr will panic if there is -// insufficient length. On exit, D contains the singular values of B in decreasing -// order. -// -// VT is a matrix of size n×ncvt whose elements are stored in vt. The elements -// of vt are modified to contain P^T * VT on exit. VT is not used if ncvt == 0. -// -// U is a matrix of size nru×n whose elements are stored in u. The elements -// of u are modified to contain U * Q on exit. U is not used if nru == 0. -// -// C is a matrix of size n×ncc whose elements are stored in c. The elements -// of c are modified to contain Q^T * C on exit. C is not used if ncc == 0. -// -// work contains temporary storage and must have length at least 4*(n-1). Dbdsqr -// will panic if there is insufficient working memory. -// -// Dbdsqr returns whether the decomposition was successful. -// -// Dbdsqr is an internal routine. It is exported for testing purposes. -func (impl Implementation) Dbdsqr(uplo blas.Uplo, n, ncvt, nru, ncc int, d, e, vt []float64, ldvt int, u []float64, ldu int, c []float64, ldc int, work []float64) (ok bool) { - switch { - case uplo != blas.Upper && uplo != blas.Lower: - panic(badUplo) - case n < 0: - panic(nLT0) - case ncvt < 0: - panic(ncvtLT0) - case nru < 0: - panic(nruLT0) - case ncc < 0: - panic(nccLT0) - case ldvt < max(1, ncvt): - panic(badLdVT) - case (ldu < max(1, n) && nru > 0) || (ldu < 1 && nru == 0): - panic(badLdU) - case ldc < max(1, ncc): - panic(badLdC) - } - - // Quick return if possible. - if n == 0 { - return true - } - - if len(vt) < (n-1)*ldvt+ncvt && ncvt != 0 { - panic(shortVT) - } - if len(u) < (nru-1)*ldu+n && nru != 0 { - panic(shortU) - } - if len(c) < (n-1)*ldc+ncc && ncc != 0 { - panic(shortC) - } - if len(d) < n { - panic(shortD) - } - if len(e) < n-1 { - panic(shortE) - } - if len(work) < 4*(n-1) { - panic(shortWork) - } - - var info int - bi := blas64.Implementation() - const maxIter = 6 - - if n != 1 { - // If the singular vectors do not need to be computed, use qd algorithm. - if !(ncvt > 0 || nru > 0 || ncc > 0) { - info = impl.Dlasq1(n, d, e, work) - // If info is 2 dqds didn't finish, and so try to. - if info != 2 { - return info == 0 - } - } - nm1 := n - 1 - nm12 := nm1 + nm1 - nm13 := nm12 + nm1 - idir := 0 - - eps := dlamchE - unfl := dlamchS - lower := uplo == blas.Lower - var cs, sn, r float64 - if lower { - for i := 0; i < n-1; i++ { - cs, sn, r = impl.Dlartg(d[i], e[i]) - d[i] = r - e[i] = sn * d[i+1] - d[i+1] *= cs - work[i] = cs - work[nm1+i] = sn - } - if nru > 0 { - impl.Dlasr(blas.Right, lapack.Variable, lapack.Forward, nru, n, work, work[n-1:], u, ldu) - } - if ncc > 0 { - impl.Dlasr(blas.Left, lapack.Variable, lapack.Forward, n, ncc, work, work[n-1:], c, ldc) - } - } - // Compute singular values to a relative accuracy of tol. If tol is negative - // the values will be computed to an absolute accuracy of math.Abs(tol) * norm(b) - tolmul := math.Max(10, math.Min(100, math.Pow(eps, -1.0/8))) - tol := tolmul * eps - var smax float64 - for i := 0; i < n; i++ { - smax = math.Max(smax, math.Abs(d[i])) - } - for i := 0; i < n-1; i++ { - smax = math.Max(smax, math.Abs(e[i])) - } - - var sminl float64 - var thresh float64 - if tol >= 0 { - sminoa := math.Abs(d[0]) - if sminoa != 0 { - mu := sminoa - for i := 1; i < n; i++ { - mu = math.Abs(d[i]) * (mu / (mu + math.Abs(e[i-1]))) - sminoa = math.Min(sminoa, mu) - if sminoa == 0 { - break - } - } - } - sminoa = sminoa / math.Sqrt(float64(n)) - thresh = math.Max(tol*sminoa, float64(maxIter*n*n)*unfl) - } else { - thresh = math.Max(math.Abs(tol)*smax, float64(maxIter*n*n)*unfl) - } - // Prepare for the main iteration loop for the singular values. - maxIt := maxIter * n * n - iter := 0 - oldl2 := -1 - oldm := -1 - // m points to the last element of unconverged part of matrix. - m := n - - Outer: - for m > 1 { - if iter > maxIt { - info = 0 - for i := 0; i < n-1; i++ { - if e[i] != 0 { - info++ - } - } - return info == 0 - } - // Find diagonal block of matrix to work on. - if tol < 0 && math.Abs(d[m-1]) <= thresh { - d[m-1] = 0 - } - smax = math.Abs(d[m-1]) - smin := smax - var l2 int - var broke bool - for l3 := 0; l3 < m-1; l3++ { - l2 = m - l3 - 2 - abss := math.Abs(d[l2]) - abse := math.Abs(e[l2]) - if tol < 0 && abss <= thresh { - d[l2] = 0 - } - if abse <= thresh { - broke = true - break - } - smin = math.Min(smin, abss) - smax = math.Max(math.Max(smax, abss), abse) - } - if broke { - e[l2] = 0 - if l2 == m-2 { - // Convergence of bottom singular value, return to top. - m-- - continue - } - l2++ - } else { - l2 = 0 - } - // e[ll] through e[m-2] are nonzero, e[ll-1] is zero - if l2 == m-2 { - // Handle 2×2 block separately. - var sinr, cosr, sinl, cosl float64 - d[m-1], d[m-2], sinr, cosr, sinl, cosl = impl.Dlasv2(d[m-2], e[m-2], d[m-1]) - e[m-2] = 0 - if ncvt > 0 { - bi.Drot(ncvt, vt[(m-2)*ldvt:], 1, vt[(m-1)*ldvt:], 1, cosr, sinr) - } - if nru > 0 { - bi.Drot(nru, u[m-2:], ldu, u[m-1:], ldu, cosl, sinl) - } - if ncc > 0 { - bi.Drot(ncc, c[(m-2)*ldc:], 1, c[(m-1)*ldc:], 1, cosl, sinl) - } - m -= 2 - continue - } - // If working on a new submatrix, choose shift direction from larger end - // diagonal element toward smaller. - if l2 > oldm-1 || m-1 < oldl2 { - if math.Abs(d[l2]) >= math.Abs(d[m-1]) { - idir = 1 - } else { - idir = 2 - } - } - // Apply convergence tests. - // TODO(btracey): There is a lot of similar looking code here. See - // if there is a better way to de-duplicate. - if idir == 1 { - // Run convergence test in forward direction. - // First apply standard test to bottom of matrix. - if math.Abs(e[m-2]) <= math.Abs(tol)*math.Abs(d[m-1]) || (tol < 0 && math.Abs(e[m-2]) <= thresh) { - e[m-2] = 0 - continue - } - if tol >= 0 { - // If relative accuracy desired, apply convergence criterion forward. - mu := math.Abs(d[l2]) - sminl = mu - for l3 := l2; l3 < m-1; l3++ { - if math.Abs(e[l3]) <= tol*mu { - e[l3] = 0 - continue Outer - } - mu = math.Abs(d[l3+1]) * (mu / (mu + math.Abs(e[l3]))) - sminl = math.Min(sminl, mu) - } - } - } else { - // Run convergence test in backward direction. - // First apply standard test to top of matrix. - if math.Abs(e[l2]) <= math.Abs(tol)*math.Abs(d[l2]) || (tol < 0 && math.Abs(e[l2]) <= thresh) { - e[l2] = 0 - continue - } - if tol >= 0 { - // If relative accuracy desired, apply convergence criterion backward. - mu := math.Abs(d[m-1]) - sminl = mu - for l3 := m - 2; l3 >= l2; l3-- { - if math.Abs(e[l3]) <= tol*mu { - e[l3] = 0 - continue Outer - } - mu = math.Abs(d[l3]) * (mu / (mu + math.Abs(e[l3]))) - sminl = math.Min(sminl, mu) - } - } - } - oldl2 = l2 - oldm = m - // Compute shift. First, test if shifting would ruin relative accuracy, - // and if so set the shift to zero. - var shift float64 - if tol >= 0 && float64(n)*tol*(sminl/smax) <= math.Max(eps, (1.0/100)*tol) { - shift = 0 - } else { - var sl2 float64 - if idir == 1 { - sl2 = math.Abs(d[l2]) - shift, _ = impl.Dlas2(d[m-2], e[m-2], d[m-1]) - } else { - sl2 = math.Abs(d[m-1]) - shift, _ = impl.Dlas2(d[l2], e[l2], d[l2+1]) - } - // Test if shift is negligible - if sl2 > 0 { - if (shift/sl2)*(shift/sl2) < eps { - shift = 0 - } - } - } - iter += m - l2 + 1 - // If no shift, do simplified QR iteration. - if shift == 0 { - if idir == 1 { - cs := 1.0 - oldcs := 1.0 - var sn, r, oldsn float64 - for i := l2; i < m-1; i++ { - cs, sn, r = impl.Dlartg(d[i]*cs, e[i]) - if i > l2 { - e[i-1] = oldsn * r - } - oldcs, oldsn, d[i] = impl.Dlartg(oldcs*r, d[i+1]*sn) - work[i-l2] = cs - work[i-l2+nm1] = sn - work[i-l2+nm12] = oldcs - work[i-l2+nm13] = oldsn - } - h := d[m-1] * cs - d[m-1] = h * oldcs - e[m-2] = h * oldsn - if ncvt > 0 { - impl.Dlasr(blas.Left, lapack.Variable, lapack.Forward, m-l2, ncvt, work, work[n-1:], vt[l2*ldvt:], ldvt) - } - if nru > 0 { - impl.Dlasr(blas.Right, lapack.Variable, lapack.Forward, nru, m-l2, work[nm12:], work[nm13:], u[l2:], ldu) - } - if ncc > 0 { - impl.Dlasr(blas.Left, lapack.Variable, lapack.Forward, m-l2, ncc, work[nm12:], work[nm13:], c[l2*ldc:], ldc) - } - if math.Abs(e[m-2]) < thresh { - e[m-2] = 0 - } - } else { - cs := 1.0 - oldcs := 1.0 - var sn, r, oldsn float64 - for i := m - 1; i >= l2+1; i-- { - cs, sn, r = impl.Dlartg(d[i]*cs, e[i-1]) - if i < m-1 { - e[i] = oldsn * r - } - oldcs, oldsn, d[i] = impl.Dlartg(oldcs*r, d[i-1]*sn) - work[i-l2-1] = cs - work[i-l2+nm1-1] = -sn - work[i-l2+nm12-1] = oldcs - work[i-l2+nm13-1] = -oldsn - } - h := d[l2] * cs - d[l2] = h * oldcs - e[l2] = h * oldsn - if ncvt > 0 { - impl.Dlasr(blas.Left, lapack.Variable, lapack.Backward, m-l2, ncvt, work[nm12:], work[nm13:], vt[l2*ldvt:], ldvt) - } - if nru > 0 { - impl.Dlasr(blas.Right, lapack.Variable, lapack.Backward, nru, m-l2, work, work[n-1:], u[l2:], ldu) - } - if ncc > 0 { - impl.Dlasr(blas.Left, lapack.Variable, lapack.Backward, m-l2, ncc, work, work[n-1:], c[l2*ldc:], ldc) - } - if math.Abs(e[l2]) <= thresh { - e[l2] = 0 - } - } - } else { - // Use nonzero shift. - if idir == 1 { - // Chase bulge from top to bottom. Save cosines and sines for - // later singular vector updates. - f := (math.Abs(d[l2]) - shift) * (math.Copysign(1, d[l2]) + shift/d[l2]) - g := e[l2] - var cosl, sinl float64 - for i := l2; i < m-1; i++ { - cosr, sinr, r := impl.Dlartg(f, g) - if i > l2 { - e[i-1] = r - } - f = cosr*d[i] + sinr*e[i] - e[i] = cosr*e[i] - sinr*d[i] - g = sinr * d[i+1] - d[i+1] *= cosr - cosl, sinl, r = impl.Dlartg(f, g) - d[i] = r - f = cosl*e[i] + sinl*d[i+1] - d[i+1] = cosl*d[i+1] - sinl*e[i] - if i < m-2 { - g = sinl * e[i+1] - e[i+1] = cosl * e[i+1] - } - work[i-l2] = cosr - work[i-l2+nm1] = sinr - work[i-l2+nm12] = cosl - work[i-l2+nm13] = sinl - } - e[m-2] = f - if ncvt > 0 { - impl.Dlasr(blas.Left, lapack.Variable, lapack.Forward, m-l2, ncvt, work, work[n-1:], vt[l2*ldvt:], ldvt) - } - if nru > 0 { - impl.Dlasr(blas.Right, lapack.Variable, lapack.Forward, nru, m-l2, work[nm12:], work[nm13:], u[l2:], ldu) - } - if ncc > 0 { - impl.Dlasr(blas.Left, lapack.Variable, lapack.Forward, m-l2, ncc, work[nm12:], work[nm13:], c[l2*ldc:], ldc) - } - if math.Abs(e[m-2]) <= thresh { - e[m-2] = 0 - } - } else { - // Chase bulge from top to bottom. Save cosines and sines for - // later singular vector updates. - f := (math.Abs(d[m-1]) - shift) * (math.Copysign(1, d[m-1]) + shift/d[m-1]) - g := e[m-2] - for i := m - 1; i > l2; i-- { - cosr, sinr, r := impl.Dlartg(f, g) - if i < m-1 { - e[i] = r - } - f = cosr*d[i] + sinr*e[i-1] - e[i-1] = cosr*e[i-1] - sinr*d[i] - g = sinr * d[i-1] - d[i-1] *= cosr - cosl, sinl, r := impl.Dlartg(f, g) - d[i] = r - f = cosl*e[i-1] + sinl*d[i-1] - d[i-1] = cosl*d[i-1] - sinl*e[i-1] - if i > l2+1 { - g = sinl * e[i-2] - e[i-2] *= cosl - } - work[i-l2-1] = cosr - work[i-l2+nm1-1] = -sinr - work[i-l2+nm12-1] = cosl - work[i-l2+nm13-1] = -sinl - } - e[l2] = f - if math.Abs(e[l2]) <= thresh { - e[l2] = 0 - } - if ncvt > 0 { - impl.Dlasr(blas.Left, lapack.Variable, lapack.Backward, m-l2, ncvt, work[nm12:], work[nm13:], vt[l2*ldvt:], ldvt) - } - if nru > 0 { - impl.Dlasr(blas.Right, lapack.Variable, lapack.Backward, nru, m-l2, work, work[n-1:], u[l2:], ldu) - } - if ncc > 0 { - impl.Dlasr(blas.Left, lapack.Variable, lapack.Backward, m-l2, ncc, work, work[n-1:], c[l2*ldc:], ldc) - } - } - } - } - } - - // All singular values converged, make them positive. - for i := 0; i < n; i++ { - if d[i] < 0 { - d[i] *= -1 - if ncvt > 0 { - bi.Dscal(ncvt, -1, vt[i*ldvt:], 1) - } - } - } - - // Sort the singular values in decreasing order. - for i := 0; i < n-1; i++ { - isub := 0 - smin := d[0] - for j := 1; j < n-i; j++ { - if d[j] <= smin { - isub = j - smin = d[j] - } - } - if isub != n-i { - // Swap singular values and vectors. - d[isub] = d[n-i-1] - d[n-i-1] = smin - if ncvt > 0 { - bi.Dswap(ncvt, vt[isub*ldvt:], 1, vt[(n-i-1)*ldvt:], 1) - } - if nru > 0 { - bi.Dswap(nru, u[isub:], ldu, u[n-i-1:], ldu) - } - if ncc > 0 { - bi.Dswap(ncc, c[isub*ldc:], 1, c[(n-i-1)*ldc:], 1) - } - } - } - info = 0 - for i := 0; i < n-1; i++ { - if e[i] != 0 { - info++ - } - } - return info == 0 -} diff --git a/vendor/gonum.org/v1/gonum/lapack/gonum/dgebak.go b/vendor/gonum.org/v1/gonum/lapack/gonum/dgebak.go deleted file mode 100644 index 7caa0b1739..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/gonum/dgebak.go +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright ©2016 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import ( - "gonum.org/v1/gonum/blas/blas64" - "gonum.org/v1/gonum/lapack" -) - -// Dgebak updates an n×m matrix V as -// V = P D V, if side == lapack.EVRight, -// V = P D^{-1} V, if side == lapack.EVLeft, -// where P and D are n×n permutation and scaling matrices, respectively, -// implicitly represented by job, scale, ilo and ihi as returned by Dgebal. -// -// Typically, columns of the matrix V contain the right or left (determined by -// side) eigenvectors of the balanced matrix output by Dgebal, and Dgebak forms -// the eigenvectors of the original matrix. -// -// Dgebak is an internal routine. It is exported for testing purposes. -func (impl Implementation) Dgebak(job lapack.BalanceJob, side lapack.EVSide, n, ilo, ihi int, scale []float64, m int, v []float64, ldv int) { - switch { - case job != lapack.BalanceNone && job != lapack.Permute && job != lapack.Scale && job != lapack.PermuteScale: - panic(badBalanceJob) - case side != lapack.EVLeft && side != lapack.EVRight: - panic(badEVSide) - case n < 0: - panic(nLT0) - case ilo < 0 || max(0, n-1) < ilo: - panic(badIlo) - case ihi < min(ilo, n-1) || n <= ihi: - panic(badIhi) - case m < 0: - panic(mLT0) - case ldv < max(1, m): - panic(badLdV) - } - - // Quick return if possible. - if n == 0 || m == 0 { - return - } - - if len(scale) < n { - panic(shortScale) - } - if len(v) < (n-1)*ldv+m { - panic(shortV) - } - - // Quick return if possible. - if job == lapack.BalanceNone { - return - } - - bi := blas64.Implementation() - if ilo != ihi && job != lapack.Permute { - // Backward balance. - if side == lapack.EVRight { - for i := ilo; i <= ihi; i++ { - bi.Dscal(m, scale[i], v[i*ldv:], 1) - } - } else { - for i := ilo; i <= ihi; i++ { - bi.Dscal(m, 1/scale[i], v[i*ldv:], 1) - } - } - } - if job == lapack.Scale { - return - } - // Backward permutation. - for i := ilo - 1; i >= 0; i-- { - k := int(scale[i]) - if k == i { - continue - } - bi.Dswap(m, v[i*ldv:], 1, v[k*ldv:], 1) - } - for i := ihi + 1; i < n; i++ { - k := int(scale[i]) - if k == i { - continue - } - bi.Dswap(m, v[i*ldv:], 1, v[k*ldv:], 1) - } -} diff --git a/vendor/gonum.org/v1/gonum/lapack/gonum/dgebal.go b/vendor/gonum.org/v1/gonum/lapack/gonum/dgebal.go deleted file mode 100644 index 6fb5170cd2..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/gonum/dgebal.go +++ /dev/null @@ -1,239 +0,0 @@ -// Copyright ©2016 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import ( - "math" - - "gonum.org/v1/gonum/blas/blas64" - "gonum.org/v1/gonum/lapack" -) - -// Dgebal balances an n×n matrix A. Balancing consists of two stages, permuting -// and scaling. Both steps are optional and depend on the value of job. -// -// Permuting consists of applying a permutation matrix P such that the matrix -// that results from P^T*A*P takes the upper block triangular form -// [ T1 X Y ] -// P^T A P = [ 0 B Z ], -// [ 0 0 T2 ] -// where T1 and T2 are upper triangular matrices and B contains at least one -// nonzero off-diagonal element in each row and column. The indices ilo and ihi -// mark the starting and ending columns of the submatrix B. The eigenvalues of A -// isolated in the first 0 to ilo-1 and last ihi+1 to n-1 elements on the -// diagonal can be read off without any roundoff error. -// -// Scaling consists of applying a diagonal similarity transformation D such that -// D^{-1}*B*D has the 1-norm of each row and its corresponding column nearly -// equal. The output matrix is -// [ T1 X*D Y ] -// [ 0 inv(D)*B*D inv(D)*Z ]. -// [ 0 0 T2 ] -// Scaling may reduce the 1-norm of the matrix, and improve the accuracy of -// the computed eigenvalues and/or eigenvectors. -// -// job specifies the operations that will be performed on A. -// If job is lapack.BalanceNone, Dgebal sets scale[i] = 1 for all i and returns ilo=0, ihi=n-1. -// If job is lapack.Permute, only permuting will be done. -// If job is lapack.Scale, only scaling will be done. -// If job is lapack.PermuteScale, both permuting and scaling will be done. -// -// On return, if job is lapack.Permute or lapack.PermuteScale, it will hold that -// A[i,j] == 0, for i > j and j ∈ {0, ..., ilo-1, ihi+1, ..., n-1}. -// If job is lapack.BalanceNone or lapack.Scale, or if n == 0, it will hold that -// ilo == 0 and ihi == n-1. -// -// On return, scale will contain information about the permutations and scaling -// factors applied to A. If π(j) denotes the index of the column interchanged -// with column j, and D[j,j] denotes the scaling factor applied to column j, -// then -// scale[j] == π(j), for j ∈ {0, ..., ilo-1, ihi+1, ..., n-1}, -// == D[j,j], for j ∈ {ilo, ..., ihi}. -// scale must have length equal to n, otherwise Dgebal will panic. -// -// Dgebal is an internal routine. It is exported for testing purposes. -func (impl Implementation) Dgebal(job lapack.BalanceJob, n int, a []float64, lda int, scale []float64) (ilo, ihi int) { - switch { - case job != lapack.BalanceNone && job != lapack.Permute && job != lapack.Scale && job != lapack.PermuteScale: - panic(badBalanceJob) - case n < 0: - panic(nLT0) - case lda < max(1, n): - panic(badLdA) - } - - ilo = 0 - ihi = n - 1 - - if n == 0 { - return ilo, ihi - } - - if len(scale) != n { - panic(shortScale) - } - - if job == lapack.BalanceNone { - for i := range scale { - scale[i] = 1 - } - return ilo, ihi - } - - if len(a) < (n-1)*lda+n { - panic(shortA) - } - - bi := blas64.Implementation() - swapped := true - - if job == lapack.Scale { - goto scaling - } - - // Permutation to isolate eigenvalues if possible. - // - // Search for rows isolating an eigenvalue and push them down. - for swapped { - swapped = false - rows: - for i := ihi; i >= 0; i-- { - for j := 0; j <= ihi; j++ { - if i == j { - continue - } - if a[i*lda+j] != 0 { - continue rows - } - } - // Row i has only zero off-diagonal elements in the - // block A[ilo:ihi+1,ilo:ihi+1]. - scale[ihi] = float64(i) - if i != ihi { - bi.Dswap(ihi+1, a[i:], lda, a[ihi:], lda) - bi.Dswap(n, a[i*lda:], 1, a[ihi*lda:], 1) - } - if ihi == 0 { - scale[0] = 1 - return ilo, ihi - } - ihi-- - swapped = true - break - } - } - // Search for columns isolating an eigenvalue and push them left. - swapped = true - for swapped { - swapped = false - columns: - for j := ilo; j <= ihi; j++ { - for i := ilo; i <= ihi; i++ { - if i == j { - continue - } - if a[i*lda+j] != 0 { - continue columns - } - } - // Column j has only zero off-diagonal elements in the - // block A[ilo:ihi+1,ilo:ihi+1]. - scale[ilo] = float64(j) - if j != ilo { - bi.Dswap(ihi+1, a[j:], lda, a[ilo:], lda) - bi.Dswap(n-ilo, a[j*lda+ilo:], 1, a[ilo*lda+ilo:], 1) - } - swapped = true - ilo++ - break - } - } - -scaling: - for i := ilo; i <= ihi; i++ { - scale[i] = 1 - } - - if job == lapack.Permute { - return ilo, ihi - } - - // Balance the submatrix in rows ilo to ihi. - - const ( - // sclfac should be a power of 2 to avoid roundoff errors. - // Elements of scale are restricted to powers of sclfac, - // therefore the matrix will be only nearly balanced. - sclfac = 2 - // factor determines the minimum reduction of the row and column - // norms that is considered non-negligible. It must be less than 1. - factor = 0.95 - ) - sfmin1 := dlamchS / dlamchP - sfmax1 := 1 / sfmin1 - sfmin2 := sfmin1 * sclfac - sfmax2 := 1 / sfmin2 - - // Iterative loop for norm reduction. - var conv bool - for !conv { - conv = true - for i := ilo; i <= ihi; i++ { - c := bi.Dnrm2(ihi-ilo+1, a[ilo*lda+i:], lda) - r := bi.Dnrm2(ihi-ilo+1, a[i*lda+ilo:], 1) - ica := bi.Idamax(ihi+1, a[i:], lda) - ca := math.Abs(a[ica*lda+i]) - ira := bi.Idamax(n-ilo, a[i*lda+ilo:], 1) - ra := math.Abs(a[i*lda+ilo+ira]) - - // Guard against zero c or r due to underflow. - if c == 0 || r == 0 { - continue - } - g := r / sclfac - f := 1.0 - s := c + r - for c < g && math.Max(f, math.Max(c, ca)) < sfmax2 && math.Min(r, math.Min(g, ra)) > sfmin2 { - if math.IsNaN(c + f + ca + r + g + ra) { - // Panic if NaN to avoid infinite loop. - panic("lapack: NaN") - } - f *= sclfac - c *= sclfac - ca *= sclfac - g /= sclfac - r /= sclfac - ra /= sclfac - } - g = c / sclfac - for r <= g && math.Max(r, ra) < sfmax2 && math.Min(math.Min(f, c), math.Min(g, ca)) > sfmin2 { - f /= sclfac - c /= sclfac - ca /= sclfac - g /= sclfac - r *= sclfac - ra *= sclfac - } - - if c+r >= factor*s { - // Reduction would be negligible. - continue - } - if f < 1 && scale[i] < 1 && f*scale[i] <= sfmin1 { - continue - } - if f > 1 && scale[i] > 1 && scale[i] >= sfmax1/f { - continue - } - - // Now balance. - scale[i] *= f - bi.Dscal(n-ilo, 1/f, a[i*lda+ilo:], 1) - bi.Dscal(ihi+1, f, a[i:], lda) - conv = false - } - } - return ilo, ihi -} diff --git a/vendor/gonum.org/v1/gonum/lapack/gonum/dgebd2.go b/vendor/gonum.org/v1/gonum/lapack/gonum/dgebd2.go deleted file mode 100644 index cf951a1202..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/gonum/dgebd2.go +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright ©2015 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import "gonum.org/v1/gonum/blas" - -// Dgebd2 reduces an m×n matrix A to upper or lower bidiagonal form by an orthogonal -// transformation. -// Q^T * A * P = B -// if m >= n, B is upper diagonal, otherwise B is lower bidiagonal. -// d is the diagonal, len = min(m,n) -// e is the off-diagonal len = min(m,n)-1 -// -// Dgebd2 is an internal routine. It is exported for testing purposes. -func (impl Implementation) Dgebd2(m, n int, a []float64, lda int, d, e, tauQ, tauP, work []float64) { - switch { - case m < 0: - panic(mLT0) - case n < 0: - panic(nLT0) - case lda < max(1, n): - panic(badLdA) - } - - // Quick return if possible. - minmn := min(m, n) - if minmn == 0 { - return - } - - switch { - case len(d) < minmn: - panic(shortD) - case len(e) < minmn-1: - panic(shortE) - case len(tauQ) < minmn: - panic(shortTauQ) - case len(tauP) < minmn: - panic(shortTauP) - case len(work) < max(m, n): - panic(shortWork) - } - - if m >= n { - for i := 0; i < n; i++ { - a[i*lda+i], tauQ[i] = impl.Dlarfg(m-i, a[i*lda+i], a[min(i+1, m-1)*lda+i:], lda) - d[i] = a[i*lda+i] - a[i*lda+i] = 1 - // Apply H_i to A[i:m, i+1:n] from the left. - if i < n-1 { - impl.Dlarf(blas.Left, m-i, n-i-1, a[i*lda+i:], lda, tauQ[i], a[i*lda+i+1:], lda, work) - } - a[i*lda+i] = d[i] - if i < n-1 { - a[i*lda+i+1], tauP[i] = impl.Dlarfg(n-i-1, a[i*lda+i+1], a[i*lda+min(i+2, n-1):], 1) - e[i] = a[i*lda+i+1] - a[i*lda+i+1] = 1 - impl.Dlarf(blas.Right, m-i-1, n-i-1, a[i*lda+i+1:], 1, tauP[i], a[(i+1)*lda+i+1:], lda, work) - a[i*lda+i+1] = e[i] - } else { - tauP[i] = 0 - } - } - return - } - for i := 0; i < m; i++ { - a[i*lda+i], tauP[i] = impl.Dlarfg(n-i, a[i*lda+i], a[i*lda+min(i+1, n-1):], 1) - d[i] = a[i*lda+i] - a[i*lda+i] = 1 - if i < m-1 { - impl.Dlarf(blas.Right, m-i-1, n-i, a[i*lda+i:], 1, tauP[i], a[(i+1)*lda+i:], lda, work) - } - a[i*lda+i] = d[i] - if i < m-1 { - a[(i+1)*lda+i], tauQ[i] = impl.Dlarfg(m-i-1, a[(i+1)*lda+i], a[min(i+2, m-1)*lda+i:], lda) - e[i] = a[(i+1)*lda+i] - a[(i+1)*lda+i] = 1 - impl.Dlarf(blas.Left, m-i-1, n-i-1, a[(i+1)*lda+i:], lda, tauQ[i], a[(i+1)*lda+i+1:], lda, work) - a[(i+1)*lda+i] = e[i] - } else { - tauQ[i] = 0 - } - } -} diff --git a/vendor/gonum.org/v1/gonum/lapack/gonum/dgebrd.go b/vendor/gonum.org/v1/gonum/lapack/gonum/dgebrd.go deleted file mode 100644 index f03bf8d939..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/gonum/dgebrd.go +++ /dev/null @@ -1,161 +0,0 @@ -// Copyright ©2015 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import ( - "gonum.org/v1/gonum/blas" - "gonum.org/v1/gonum/blas/blas64" -) - -// Dgebrd reduces a general m×n matrix A to upper or lower bidiagonal form B by -// an orthogonal transformation: -// Q^T * A * P = B. -// The diagonal elements of B are stored in d and the off-diagonal elements are stored -// in e. These are additionally stored along the diagonal of A and the off-diagonal -// of A. If m >= n B is an upper-bidiagonal matrix, and if m < n B is a -// lower-bidiagonal matrix. -// -// The remaining elements of A store the data needed to construct Q and P. -// The matrices Q and P are products of elementary reflectors -// if m >= n, Q = H_0 * H_1 * ... * H_{n-1}, -// P = G_0 * G_1 * ... * G_{n-2}, -// if m < n, Q = H_0 * H_1 * ... * H_{m-2}, -// P = G_0 * G_1 * ... * G_{m-1}, -// where -// H_i = I - tauQ[i] * v_i * v_i^T, -// G_i = I - tauP[i] * u_i * u_i^T. -// -// As an example, on exit the entries of A when m = 6, and n = 5 -// [ d e u1 u1 u1] -// [v1 d e u2 u2] -// [v1 v2 d e u3] -// [v1 v2 v3 d e] -// [v1 v2 v3 v4 d] -// [v1 v2 v3 v4 v5] -// and when m = 5, n = 6 -// [ d u1 u1 u1 u1 u1] -// [ e d u2 u2 u2 u2] -// [v1 e d u3 u3 u3] -// [v1 v2 e d u4 u4] -// [v1 v2 v3 e d u5] -// -// d, tauQ, and tauP must all have length at least min(m,n), and e must have -// length min(m,n) - 1, unless lwork is -1 when there is no check except for -// work which must have a length of at least one. -// -// work is temporary storage, and lwork specifies the usable memory length. -// At minimum, lwork >= max(1,m,n) or be -1 and this function will panic otherwise. -// Dgebrd is blocked decomposition, but the block size is limited -// by the temporary space available. If lwork == -1, instead of performing Dgebrd, -// the optimal work length will be stored into work[0]. -// -// Dgebrd is an internal routine. It is exported for testing purposes. -func (impl Implementation) Dgebrd(m, n int, a []float64, lda int, d, e, tauQ, tauP, work []float64, lwork int) { - switch { - case m < 0: - panic(mLT0) - case n < 0: - panic(nLT0) - case lda < max(1, n): - panic(badLdA) - case lwork < max(1, max(m, n)) && lwork != -1: - panic(badLWork) - case len(work) < max(1, lwork): - panic(shortWork) - } - - // Quick return if possible. - minmn := min(m, n) - if minmn == 0 { - work[0] = 1 - return - } - - nb := impl.Ilaenv(1, "DGEBRD", " ", m, n, -1, -1) - lwkopt := (m + n) * nb - if lwork == -1 { - work[0] = float64(lwkopt) - return - } - - switch { - case len(a) < (m-1)*lda+n: - panic(shortA) - case len(d) < minmn: - panic(shortD) - case len(e) < minmn-1: - panic(shortE) - case len(tauQ) < minmn: - panic(shortTauQ) - case len(tauP) < minmn: - panic(shortTauP) - } - - nx := minmn - ws := max(m, n) - if 1 < nb && nb < minmn { - // At least one blocked operation can be done. - // Get the crossover point nx. - nx = max(nb, impl.Ilaenv(3, "DGEBRD", " ", m, n, -1, -1)) - // Determine when to switch from blocked to unblocked code. - if nx < minmn { - // At least one blocked operation will be done. - ws = (m + n) * nb - if lwork < ws { - // Not enough work space for the optimal nb, - // consider using a smaller block size. - nbmin := impl.Ilaenv(2, "DGEBRD", " ", m, n, -1, -1) - if lwork >= (m+n)*nbmin { - // Enough work space for minimum block size. - nb = lwork / (m + n) - } else { - nb = minmn - nx = minmn - } - } - } - } - bi := blas64.Implementation() - ldworkx := nb - ldworky := nb - var i int - for i = 0; i < minmn-nx; i += nb { - // Reduce rows and columns i:i+nb to bidiagonal form and return - // the matrices X and Y which are needed to update the unreduced - // part of the matrix. - // X is stored in the first m rows of work, y in the next rows. - x := work[:m*ldworkx] - y := work[m*ldworkx:] - impl.Dlabrd(m-i, n-i, nb, a[i*lda+i:], lda, - d[i:], e[i:], tauQ[i:], tauP[i:], - x, ldworkx, y, ldworky) - - // Update the trailing submatrix A[i+nb:m,i+nb:n], using an update - // of the form A := A - V*Y**T - X*U**T - bi.Dgemm(blas.NoTrans, blas.Trans, m-i-nb, n-i-nb, nb, - -1, a[(i+nb)*lda+i:], lda, y[nb*ldworky:], ldworky, - 1, a[(i+nb)*lda+i+nb:], lda) - - bi.Dgemm(blas.NoTrans, blas.NoTrans, m-i-nb, n-i-nb, nb, - -1, x[nb*ldworkx:], ldworkx, a[i*lda+i+nb:], lda, - 1, a[(i+nb)*lda+i+nb:], lda) - - // Copy diagonal and off-diagonal elements of B back into A. - if m >= n { - for j := i; j < i+nb; j++ { - a[j*lda+j] = d[j] - a[j*lda+j+1] = e[j] - } - } else { - for j := i; j < i+nb; j++ { - a[j*lda+j] = d[j] - a[(j+1)*lda+j] = e[j] - } - } - } - // Use unblocked code to reduce the remainder of the matrix. - impl.Dgebd2(m-i, n-i, a[i*lda+i:], lda, d[i:], e[i:], tauQ[i:], tauP[i:], work) - work[0] = float64(ws) -} diff --git a/vendor/gonum.org/v1/gonum/lapack/gonum/dgecon.go b/vendor/gonum.org/v1/gonum/lapack/gonum/dgecon.go deleted file mode 100644 index 1d1ca586bb..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/gonum/dgecon.go +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright ©2015 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import ( - "math" - - "gonum.org/v1/gonum/blas" - "gonum.org/v1/gonum/blas/blas64" - "gonum.org/v1/gonum/lapack" -) - -// Dgecon estimates the reciprocal of the condition number of the n×n matrix A -// given the LU decomposition of the matrix. The condition number computed may -// be based on the 1-norm or the ∞-norm. -// -// The slice a contains the result of the LU decomposition of A as computed by Dgetrf. -// -// anorm is the corresponding 1-norm or ∞-norm of the original matrix A. -// -// work is a temporary data slice of length at least 4*n and Dgecon will panic otherwise. -// -// iwork is a temporary data slice of length at least n and Dgecon will panic otherwise. -func (impl Implementation) Dgecon(norm lapack.MatrixNorm, n int, a []float64, lda int, anorm float64, work []float64, iwork []int) float64 { - switch { - case norm != lapack.MaxColumnSum && norm != lapack.MaxRowSum: - panic(badNorm) - case n < 0: - panic(nLT0) - case lda < max(1, n): - panic(badLdA) - } - - // Quick return if possible. - if n == 0 { - return 1 - } - - switch { - case len(a) < (n-1)*lda+n: - panic(shortA) - case len(work) < 4*n: - panic(shortWork) - case len(iwork) < n: - panic(shortIWork) - } - - // Quick return if possible. - if anorm == 0 { - return 0 - } - - bi := blas64.Implementation() - var rcond, ainvnm float64 - var kase int - var normin bool - isave := new([3]int) - onenrm := norm == lapack.MaxColumnSum - smlnum := dlamchS - kase1 := 2 - if onenrm { - kase1 = 1 - } - for { - ainvnm, kase = impl.Dlacn2(n, work[n:], work, iwork, ainvnm, kase, isave) - if kase == 0 { - if ainvnm != 0 { - rcond = (1 / ainvnm) / anorm - } - return rcond - } - var sl, su float64 - if kase == kase1 { - sl = impl.Dlatrs(blas.Lower, blas.NoTrans, blas.Unit, normin, n, a, lda, work, work[2*n:]) - su = impl.Dlatrs(blas.Upper, blas.NoTrans, blas.NonUnit, normin, n, a, lda, work, work[3*n:]) - } else { - su = impl.Dlatrs(blas.Upper, blas.Trans, blas.NonUnit, normin, n, a, lda, work, work[3*n:]) - sl = impl.Dlatrs(blas.Lower, blas.Trans, blas.Unit, normin, n, a, lda, work, work[2*n:]) - } - scale := sl * su - normin = true - if scale != 1 { - ix := bi.Idamax(n, work, 1) - if scale == 0 || scale < math.Abs(work[ix])*smlnum { - return rcond - } - impl.Drscl(n, scale, work, 1) - } - } -} diff --git a/vendor/gonum.org/v1/gonum/lapack/gonum/dgeev.go b/vendor/gonum.org/v1/gonum/lapack/gonum/dgeev.go deleted file mode 100644 index 0da4e609c5..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/gonum/dgeev.go +++ /dev/null @@ -1,279 +0,0 @@ -// Copyright ©2016 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import ( - "math" - - "gonum.org/v1/gonum/blas" - "gonum.org/v1/gonum/blas/blas64" - "gonum.org/v1/gonum/lapack" -) - -// Dgeev computes the eigenvalues and, optionally, the left and/or right -// eigenvectors for an n×n real nonsymmetric matrix A. -// -// The right eigenvector v_j of A corresponding to an eigenvalue λ_j -// is defined by -// A v_j = λ_j v_j, -// and the left eigenvector u_j corresponding to an eigenvalue λ_j is defined by -// u_j^H A = λ_j u_j^H, -// where u_j^H is the conjugate transpose of u_j. -// -// On return, A will be overwritten and the left and right eigenvectors will be -// stored, respectively, in the columns of the n×n matrices VL and VR in the -// same order as their eigenvalues. If the j-th eigenvalue is real, then -// u_j = VL[:,j], -// v_j = VR[:,j], -// and if it is not real, then j and j+1 form a complex conjugate pair and the -// eigenvectors can be recovered as -// u_j = VL[:,j] + i*VL[:,j+1], -// u_{j+1} = VL[:,j] - i*VL[:,j+1], -// v_j = VR[:,j] + i*VR[:,j+1], -// v_{j+1} = VR[:,j] - i*VR[:,j+1], -// where i is the imaginary unit. The computed eigenvectors are normalized to -// have Euclidean norm equal to 1 and largest component real. -// -// Left eigenvectors will be computed only if jobvl == lapack.LeftEVCompute, -// otherwise jobvl must be lapack.LeftEVNone. -// Right eigenvectors will be computed only if jobvr == lapack.RightEVCompute, -// otherwise jobvr must be lapack.RightEVNone. -// For other values of jobvl and jobvr Dgeev will panic. -// -// wr and wi contain the real and imaginary parts, respectively, of the computed -// eigenvalues. Complex conjugate pairs of eigenvalues appear consecutively with -// the eigenvalue having the positive imaginary part first. -// wr and wi must have length n, and Dgeev will panic otherwise. -// -// work must have length at least lwork and lwork must be at least max(1,4*n) if -// the left or right eigenvectors are computed, and at least max(1,3*n) if no -// eigenvectors are computed. For good performance, lwork must generally be -// larger. On return, optimal value of lwork will be stored in work[0]. -// -// If lwork == -1, instead of performing Dgeev, the function only calculates the -// optimal vaule of lwork and stores it into work[0]. -// -// On return, first is the index of the first valid eigenvalue. If first == 0, -// all eigenvalues and eigenvectors have been computed. If first is positive, -// Dgeev failed to compute all the eigenvalues, no eigenvectors have been -// computed and wr[first:] and wi[first:] contain those eigenvalues which have -// converged. -func (impl Implementation) Dgeev(jobvl lapack.LeftEVJob, jobvr lapack.RightEVJob, n int, a []float64, lda int, wr, wi []float64, vl []float64, ldvl int, vr []float64, ldvr int, work []float64, lwork int) (first int) { - wantvl := jobvl == lapack.LeftEVCompute - wantvr := jobvr == lapack.RightEVCompute - var minwrk int - if wantvl || wantvr { - minwrk = max(1, 4*n) - } else { - minwrk = max(1, 3*n) - } - switch { - case jobvl != lapack.LeftEVCompute && jobvl != lapack.LeftEVNone: - panic(badLeftEVJob) - case jobvr != lapack.RightEVCompute && jobvr != lapack.RightEVNone: - panic(badRightEVJob) - case n < 0: - panic(nLT0) - case lda < max(1, n): - panic(badLdA) - case ldvl < 1 || (ldvl < n && wantvl): - panic(badLdVL) - case ldvr < 1 || (ldvr < n && wantvr): - panic(badLdVR) - case lwork < minwrk && lwork != -1: - panic(badLWork) - case len(work) < lwork: - panic(shortWork) - } - - // Quick return if possible. - if n == 0 { - work[0] = 1 - return 0 - } - - maxwrk := 2*n + n*impl.Ilaenv(1, "DGEHRD", " ", n, 1, n, 0) - if wantvl || wantvr { - maxwrk = max(maxwrk, 2*n+(n-1)*impl.Ilaenv(1, "DORGHR", " ", n, 1, n, -1)) - impl.Dhseqr(lapack.EigenvaluesAndSchur, lapack.SchurOrig, n, 0, n-1, - a, lda, wr, wi, nil, n, work, -1) - maxwrk = max(maxwrk, max(n+1, n+int(work[0]))) - side := lapack.EVLeft - if wantvr { - side = lapack.EVRight - } - impl.Dtrevc3(side, lapack.EVAllMulQ, nil, n, a, lda, vl, ldvl, vr, ldvr, - n, work, -1) - maxwrk = max(maxwrk, n+int(work[0])) - maxwrk = max(maxwrk, 4*n) - } else { - impl.Dhseqr(lapack.EigenvaluesOnly, lapack.SchurNone, n, 0, n-1, - a, lda, wr, wi, vr, ldvr, work, -1) - maxwrk = max(maxwrk, max(n+1, n+int(work[0]))) - } - maxwrk = max(maxwrk, minwrk) - - if lwork == -1 { - work[0] = float64(maxwrk) - return 0 - } - - switch { - case len(a) < (n-1)*lda+n: - panic(shortA) - case len(wr) != n: - panic(badLenWr) - case len(wi) != n: - panic(badLenWi) - case len(vl) < (n-1)*ldvl+n && wantvl: - panic(shortVL) - case len(vr) < (n-1)*ldvr+n && wantvr: - panic(shortVR) - } - - // Get machine constants. - smlnum := math.Sqrt(dlamchS) / dlamchP - bignum := 1 / smlnum - - // Scale A if max element outside range [smlnum,bignum]. - anrm := impl.Dlange(lapack.MaxAbs, n, n, a, lda, nil) - var scalea bool - var cscale float64 - if 0 < anrm && anrm < smlnum { - scalea = true - cscale = smlnum - } else if anrm > bignum { - scalea = true - cscale = bignum - } - if scalea { - impl.Dlascl(lapack.General, 0, 0, anrm, cscale, n, n, a, lda) - } - - // Balance the matrix. - workbal := work[:n] - ilo, ihi := impl.Dgebal(lapack.PermuteScale, n, a, lda, workbal) - - // Reduce to upper Hessenberg form. - iwrk := 2 * n - tau := work[n : iwrk-1] - impl.Dgehrd(n, ilo, ihi, a, lda, tau, work[iwrk:], lwork-iwrk) - - var side lapack.EVSide - if wantvl { - side = lapack.EVLeft - // Copy Householder vectors to VL. - impl.Dlacpy(blas.Lower, n, n, a, lda, vl, ldvl) - // Generate orthogonal matrix in VL. - impl.Dorghr(n, ilo, ihi, vl, ldvl, tau, work[iwrk:], lwork-iwrk) - // Perform QR iteration, accumulating Schur vectors in VL. - iwrk = n - first = impl.Dhseqr(lapack.EigenvaluesAndSchur, lapack.SchurOrig, n, ilo, ihi, - a, lda, wr, wi, vl, ldvl, work[iwrk:], lwork-iwrk) - if wantvr { - // Want left and right eigenvectors. - // Copy Schur vectors to VR. - side = lapack.EVBoth - impl.Dlacpy(blas.All, n, n, vl, ldvl, vr, ldvr) - } - } else if wantvr { - side = lapack.EVRight - // Copy Householder vectors to VR. - impl.Dlacpy(blas.Lower, n, n, a, lda, vr, ldvr) - // Generate orthogonal matrix in VR. - impl.Dorghr(n, ilo, ihi, vr, ldvr, tau, work[iwrk:], lwork-iwrk) - // Perform QR iteration, accumulating Schur vectors in VR. - iwrk = n - first = impl.Dhseqr(lapack.EigenvaluesAndSchur, lapack.SchurOrig, n, ilo, ihi, - a, lda, wr, wi, vr, ldvr, work[iwrk:], lwork-iwrk) - } else { - // Compute eigenvalues only. - iwrk = n - first = impl.Dhseqr(lapack.EigenvaluesOnly, lapack.SchurNone, n, ilo, ihi, - a, lda, wr, wi, nil, 1, work[iwrk:], lwork-iwrk) - } - - if first > 0 { - if scalea { - // Undo scaling. - impl.Dlascl(lapack.General, 0, 0, cscale, anrm, n-first, 1, wr[first:], 1) - impl.Dlascl(lapack.General, 0, 0, cscale, anrm, n-first, 1, wi[first:], 1) - impl.Dlascl(lapack.General, 0, 0, cscale, anrm, ilo, 1, wr, 1) - impl.Dlascl(lapack.General, 0, 0, cscale, anrm, ilo, 1, wi, 1) - } - work[0] = float64(maxwrk) - return first - } - - if wantvl || wantvr { - // Compute left and/or right eigenvectors. - impl.Dtrevc3(side, lapack.EVAllMulQ, nil, n, - a, lda, vl, ldvl, vr, ldvr, n, work[iwrk:], lwork-iwrk) - } - bi := blas64.Implementation() - if wantvl { - // Undo balancing of left eigenvectors. - impl.Dgebak(lapack.PermuteScale, lapack.EVLeft, n, ilo, ihi, workbal, n, vl, ldvl) - // Normalize left eigenvectors and make largest component real. - for i, wii := range wi { - if wii < 0 { - continue - } - if wii == 0 { - scl := 1 / bi.Dnrm2(n, vl[i:], ldvl) - bi.Dscal(n, scl, vl[i:], ldvl) - continue - } - scl := 1 / impl.Dlapy2(bi.Dnrm2(n, vl[i:], ldvl), bi.Dnrm2(n, vl[i+1:], ldvl)) - bi.Dscal(n, scl, vl[i:], ldvl) - bi.Dscal(n, scl, vl[i+1:], ldvl) - for k := 0; k < n; k++ { - vi := vl[k*ldvl+i] - vi1 := vl[k*ldvl+i+1] - work[iwrk+k] = vi*vi + vi1*vi1 - } - k := bi.Idamax(n, work[iwrk:iwrk+n], 1) - cs, sn, _ := impl.Dlartg(vl[k*ldvl+i], vl[k*ldvl+i+1]) - bi.Drot(n, vl[i:], ldvl, vl[i+1:], ldvl, cs, sn) - vl[k*ldvl+i+1] = 0 - } - } - if wantvr { - // Undo balancing of right eigenvectors. - impl.Dgebak(lapack.PermuteScale, lapack.EVRight, n, ilo, ihi, workbal, n, vr, ldvr) - // Normalize right eigenvectors and make largest component real. - for i, wii := range wi { - if wii < 0 { - continue - } - if wii == 0 { - scl := 1 / bi.Dnrm2(n, vr[i:], ldvr) - bi.Dscal(n, scl, vr[i:], ldvr) - continue - } - scl := 1 / impl.Dlapy2(bi.Dnrm2(n, vr[i:], ldvr), bi.Dnrm2(n, vr[i+1:], ldvr)) - bi.Dscal(n, scl, vr[i:], ldvr) - bi.Dscal(n, scl, vr[i+1:], ldvr) - for k := 0; k < n; k++ { - vi := vr[k*ldvr+i] - vi1 := vr[k*ldvr+i+1] - work[iwrk+k] = vi*vi + vi1*vi1 - } - k := bi.Idamax(n, work[iwrk:iwrk+n], 1) - cs, sn, _ := impl.Dlartg(vr[k*ldvr+i], vr[k*ldvr+i+1]) - bi.Drot(n, vr[i:], ldvr, vr[i+1:], ldvr, cs, sn) - vr[k*ldvr+i+1] = 0 - } - } - - if scalea { - // Undo scaling. - impl.Dlascl(lapack.General, 0, 0, cscale, anrm, n-first, 1, wr[first:], 1) - impl.Dlascl(lapack.General, 0, 0, cscale, anrm, n-first, 1, wi[first:], 1) - } - - work[0] = float64(maxwrk) - return first -} diff --git a/vendor/gonum.org/v1/gonum/lapack/gonum/dgehd2.go b/vendor/gonum.org/v1/gonum/lapack/gonum/dgehd2.go deleted file mode 100644 index 261f21b983..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/gonum/dgehd2.go +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright ©2016 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import "gonum.org/v1/gonum/blas" - -// Dgehd2 reduces a block of a general n×n matrix A to upper Hessenberg form H -// by an orthogonal similarity transformation Q^T * A * Q = H. -// -// The matrix Q is represented as a product of (ihi-ilo) elementary -// reflectors -// Q = H_{ilo} H_{ilo+1} ... H_{ihi-1}. -// Each H_i has the form -// H_i = I - tau[i] * v * v^T -// where v is a real vector with v[0:i+1] = 0, v[i+1] = 1 and v[ihi+1:n] = 0. -// v[i+2:ihi+1] is stored on exit in A[i+2:ihi+1,i]. -// -// On entry, a contains the n×n general matrix to be reduced. On return, the -// upper triangle and the first subdiagonal of A are overwritten with the upper -// Hessenberg matrix H, and the elements below the first subdiagonal, with the -// slice tau, represent the orthogonal matrix Q as a product of elementary -// reflectors. -// -// The contents of A are illustrated by the following example, with n = 7, ilo = -// 1 and ihi = 5. -// On entry, -// [ a a a a a a a ] -// [ a a a a a a ] -// [ a a a a a a ] -// [ a a a a a a ] -// [ a a a a a a ] -// [ a a a a a a ] -// [ a ] -// on return, -// [ a a h h h h a ] -// [ a h h h h a ] -// [ h h h h h h ] -// [ v1 h h h h h ] -// [ v1 v2 h h h h ] -// [ v1 v2 v3 h h h ] -// [ a ] -// where a denotes an element of the original matrix A, h denotes a -// modified element of the upper Hessenberg matrix H, and vi denotes an -// element of the vector defining H_i. -// -// ilo and ihi determine the block of A that will be reduced to upper Hessenberg -// form. It must hold that 0 <= ilo <= ihi <= max(0, n-1), otherwise Dgehd2 will -// panic. -// -// On return, tau will contain the scalar factors of the elementary reflectors. -// It must have length equal to n-1, otherwise Dgehd2 will panic. -// -// work must have length at least n, otherwise Dgehd2 will panic. -// -// Dgehd2 is an internal routine. It is exported for testing purposes. -func (impl Implementation) Dgehd2(n, ilo, ihi int, a []float64, lda int, tau, work []float64) { - switch { - case n < 0: - panic(nLT0) - case ilo < 0 || max(0, n-1) < ilo: - panic(badIlo) - case ihi < min(ilo, n-1) || n <= ihi: - panic(badIhi) - case lda < max(1, n): - panic(badLdA) - } - - // Quick return if possible. - if n == 0 { - return - } - - switch { - case len(a) < (n-1)*lda+n: - panic(shortA) - case len(tau) != n-1: - panic(badLenTau) - case len(work) < n: - panic(shortWork) - } - - for i := ilo; i < ihi; i++ { - // Compute elementary reflector H_i to annihilate A[i+2:ihi+1,i]. - var aii float64 - aii, tau[i] = impl.Dlarfg(ihi-i, a[(i+1)*lda+i], a[min(i+2, n-1)*lda+i:], lda) - a[(i+1)*lda+i] = 1 - - // Apply H_i to A[0:ihi+1,i+1:ihi+1] from the right. - impl.Dlarf(blas.Right, ihi+1, ihi-i, a[(i+1)*lda+i:], lda, tau[i], a[i+1:], lda, work) - - // Apply H_i to A[i+1:ihi+1,i+1:n] from the left. - impl.Dlarf(blas.Left, ihi-i, n-i-1, a[(i+1)*lda+i:], lda, tau[i], a[(i+1)*lda+i+1:], lda, work) - a[(i+1)*lda+i] = aii - } -} diff --git a/vendor/gonum.org/v1/gonum/lapack/gonum/dgehrd.go b/vendor/gonum.org/v1/gonum/lapack/gonum/dgehrd.go deleted file mode 100644 index 89b73cef99..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/gonum/dgehrd.go +++ /dev/null @@ -1,194 +0,0 @@ -// Copyright ©2016 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import ( - "gonum.org/v1/gonum/blas" - "gonum.org/v1/gonum/blas/blas64" - "gonum.org/v1/gonum/lapack" -) - -// Dgehrd reduces a block of a real n×n general matrix A to upper Hessenberg -// form H by an orthogonal similarity transformation Q^T * A * Q = H. -// -// The matrix Q is represented as a product of (ihi-ilo) elementary -// reflectors -// Q = H_{ilo} H_{ilo+1} ... H_{ihi-1}. -// Each H_i has the form -// H_i = I - tau[i] * v * v^T -// where v is a real vector with v[0:i+1] = 0, v[i+1] = 1 and v[ihi+1:n] = 0. -// v[i+2:ihi+1] is stored on exit in A[i+2:ihi+1,i]. -// -// On entry, a contains the n×n general matrix to be reduced. On return, the -// upper triangle and the first subdiagonal of A will be overwritten with the -// upper Hessenberg matrix H, and the elements below the first subdiagonal, with -// the slice tau, represent the orthogonal matrix Q as a product of elementary -// reflectors. -// -// The contents of a are illustrated by the following example, with n = 7, ilo = -// 1 and ihi = 5. -// On entry, -// [ a a a a a a a ] -// [ a a a a a a ] -// [ a a a a a a ] -// [ a a a a a a ] -// [ a a a a a a ] -// [ a a a a a a ] -// [ a ] -// on return, -// [ a a h h h h a ] -// [ a h h h h a ] -// [ h h h h h h ] -// [ v1 h h h h h ] -// [ v1 v2 h h h h ] -// [ v1 v2 v3 h h h ] -// [ a ] -// where a denotes an element of the original matrix A, h denotes a -// modified element of the upper Hessenberg matrix H, and vi denotes an -// element of the vector defining H_i. -// -// ilo and ihi determine the block of A that will be reduced to upper Hessenberg -// form. It must hold that 0 <= ilo <= ihi < n if n > 0, and ilo == 0 and ihi == -// -1 if n == 0, otherwise Dgehrd will panic. -// -// On return, tau will contain the scalar factors of the elementary reflectors. -// Elements tau[:ilo] and tau[ihi:] will be set to zero. tau must have length -// equal to n-1 if n > 0, otherwise Dgehrd will panic. -// -// work must have length at least lwork and lwork must be at least max(1,n), -// otherwise Dgehrd will panic. On return, work[0] contains the optimal value of -// lwork. -// -// If lwork == -1, instead of performing Dgehrd, only the optimal value of lwork -// will be stored in work[0]. -// -// Dgehrd is an internal routine. It is exported for testing purposes. -func (impl Implementation) Dgehrd(n, ilo, ihi int, a []float64, lda int, tau, work []float64, lwork int) { - switch { - case n < 0: - panic(nLT0) - case ilo < 0 || max(0, n-1) < ilo: - panic(badIlo) - case ihi < min(ilo, n-1) || n <= ihi: - panic(badIhi) - case lda < max(1, n): - panic(badLdA) - case lwork < max(1, n) && lwork != -1: - panic(badLWork) - case len(work) < lwork: - panic(shortWork) - } - - // Quick return if possible. - if n == 0 { - work[0] = 1 - return - } - - const ( - nbmax = 64 - ldt = nbmax + 1 - tsize = ldt * nbmax - ) - // Compute the workspace requirements. - nb := min(nbmax, impl.Ilaenv(1, "DGEHRD", " ", n, ilo, ihi, -1)) - lwkopt := n*nb + tsize - if lwork == -1 { - work[0] = float64(lwkopt) - return - } - - if len(a) < (n-1)*lda+n { - panic(shortA) - } - if len(tau) != n-1 { - panic(badLenTau) - } - - // Set tau[:ilo] and tau[ihi:] to zero. - for i := 0; i < ilo; i++ { - tau[i] = 0 - } - for i := ihi; i < n-1; i++ { - tau[i] = 0 - } - - // Quick return if possible. - nh := ihi - ilo + 1 - if nh <= 1 { - work[0] = 1 - return - } - - // Determine the block size. - nbmin := 2 - var nx int - if 1 < nb && nb < nh { - // Determine when to cross over from blocked to unblocked code - // (last block is always handled by unblocked code). - nx = max(nb, impl.Ilaenv(3, "DGEHRD", " ", n, ilo, ihi, -1)) - if nx < nh { - // Determine if workspace is large enough for blocked code. - if lwork < n*nb+tsize { - // Not enough workspace to use optimal nb: - // determine the minimum value of nb, and reduce - // nb or force use of unblocked code. - nbmin = max(2, impl.Ilaenv(2, "DGEHRD", " ", n, ilo, ihi, -1)) - if lwork >= n*nbmin+tsize { - nb = (lwork - tsize) / n - } else { - nb = 1 - } - } - } - } - ldwork := nb // work is used as an n×nb matrix. - - var i int - if nb < nbmin || nh <= nb { - // Use unblocked code below. - i = ilo - } else { - // Use blocked code. - bi := blas64.Implementation() - iwt := n * nb // Size of the matrix Y and index where the matrix T starts in work. - for i = ilo; i < ihi-nx; i += nb { - ib := min(nb, ihi-i) - - // Reduce columns [i:i+ib] to Hessenberg form, returning the - // matrices V and T of the block reflector H = I - V*T*V^T - // which performs the reduction, and also the matrix Y = A*V*T. - impl.Dlahr2(ihi+1, i+1, ib, a[i:], lda, tau[i:], work[iwt:], ldt, work, ldwork) - - // Apply the block reflector H to A[:ihi+1,i+ib:ihi+1] from the - // right, computing A := A - Y * V^T. V[i+ib,i+ib-1] must be set - // to 1. - ei := a[(i+ib)*lda+i+ib-1] - a[(i+ib)*lda+i+ib-1] = 1 - bi.Dgemm(blas.NoTrans, blas.Trans, ihi+1, ihi-i-ib+1, ib, - -1, work, ldwork, - a[(i+ib)*lda+i:], lda, - 1, a[i+ib:], lda) - a[(i+ib)*lda+i+ib-1] = ei - - // Apply the block reflector H to A[0:i+1,i+1:i+ib-1] from the - // right. - bi.Dtrmm(blas.Right, blas.Lower, blas.Trans, blas.Unit, i+1, ib-1, - 1, a[(i+1)*lda+i:], lda, work, ldwork) - for j := 0; j <= ib-2; j++ { - bi.Daxpy(i+1, -1, work[j:], ldwork, a[i+j+1:], lda) - } - - // Apply the block reflector H to A[i+1:ihi+1,i+ib:n] from the - // left. - impl.Dlarfb(blas.Left, blas.Trans, lapack.Forward, lapack.ColumnWise, - ihi-i, n-i-ib, ib, - a[(i+1)*lda+i:], lda, work[iwt:], ldt, a[(i+1)*lda+i+ib:], lda, work, ldwork) - } - } - // Use unblocked code to reduce the rest of the matrix. - impl.Dgehd2(n, i, ihi, a, lda, tau, work) - work[0] = float64(lwkopt) -} diff --git a/vendor/gonum.org/v1/gonum/lapack/gonum/dgelq2.go b/vendor/gonum.org/v1/gonum/lapack/gonum/dgelq2.go deleted file mode 100644 index abc96f7d2a..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/gonum/dgelq2.go +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright ©2015 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import "gonum.org/v1/gonum/blas" - -// Dgelq2 computes the LQ factorization of the m×n matrix A. -// -// In an LQ factorization, L is a lower triangular m×n matrix, and Q is an n×n -// orthonormal matrix. -// -// a is modified to contain the information to construct L and Q. -// The lower triangle of a contains the matrix L. The upper triangular elements -// (not including the diagonal) contain the elementary reflectors. tau is modified -// to contain the reflector scales. tau must have length of at least k = min(m,n) -// and this function will panic otherwise. -// -// See Dgeqr2 for a description of the elementary reflectors and orthonormal -// matrix Q. Q is constructed as a product of these elementary reflectors, -// Q = H_{k-1} * ... * H_1 * H_0. -// -// work is temporary storage of length at least m and this function will panic otherwise. -// -// Dgelq2 is an internal routine. It is exported for testing purposes. -func (impl Implementation) Dgelq2(m, n int, a []float64, lda int, tau, work []float64) { - switch { - case m < 0: - panic(mLT0) - case n < 0: - panic(nLT0) - case lda < max(1, n): - panic(badLdA) - } - - // Quick return if possible. - k := min(m, n) - if k == 0 { - return - } - - switch { - case len(a) < (m-1)*lda+n: - panic(shortA) - case len(tau) < k: - panic(shortTau) - case len(work) < m: - panic(shortWork) - } - - for i := 0; i < k; i++ { - a[i*lda+i], tau[i] = impl.Dlarfg(n-i, a[i*lda+i], a[i*lda+min(i+1, n-1):], 1) - if i < m-1 { - aii := a[i*lda+i] - a[i*lda+i] = 1 - impl.Dlarf(blas.Right, m-i-1, n-i, - a[i*lda+i:], 1, - tau[i], - a[(i+1)*lda+i:], lda, - work) - a[i*lda+i] = aii - } - } -} diff --git a/vendor/gonum.org/v1/gonum/lapack/gonum/dgelqf.go b/vendor/gonum.org/v1/gonum/lapack/gonum/dgelqf.go deleted file mode 100644 index f1fd13a019..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/gonum/dgelqf.go +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright ©2015 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import ( - "gonum.org/v1/gonum/blas" - "gonum.org/v1/gonum/lapack" -) - -// Dgelqf computes the LQ factorization of the m×n matrix A using a blocked -// algorithm. See the documentation for Dgelq2 for a description of the -// parameters at entry and exit. -// -// work is temporary storage, and lwork specifies the usable memory length. -// At minimum, lwork >= m, and this function will panic otherwise. -// Dgelqf is a blocked LQ factorization, but the block size is limited -// by the temporary space available. If lwork == -1, instead of performing Dgelqf, -// the optimal work length will be stored into work[0]. -// -// tau must have length at least min(m,n), and this function will panic otherwise. -func (impl Implementation) Dgelqf(m, n int, a []float64, lda int, tau, work []float64, lwork int) { - switch { - case m < 0: - panic(mLT0) - case n < 0: - panic(nLT0) - case lda < max(1, n): - panic(badLdA) - case lwork < max(1, m) && lwork != -1: - panic(badLWork) - case len(work) < max(1, lwork): - panic(shortWork) - } - - k := min(m, n) - if k == 0 { - work[0] = 1 - return - } - - nb := impl.Ilaenv(1, "DGELQF", " ", m, n, -1, -1) - if lwork == -1 { - work[0] = float64(m * nb) - return - } - - if len(a) < (m-1)*lda+n { - panic(shortA) - } - if len(tau) < k { - panic(shortTau) - } - - // Find the optimal blocking size based on the size of available memory - // and optimal machine parameters. - nbmin := 2 - var nx int - iws := m - if 1 < nb && nb < k { - nx = max(0, impl.Ilaenv(3, "DGELQF", " ", m, n, -1, -1)) - if nx < k { - iws = m * nb - if lwork < iws { - nb = lwork / m - nbmin = max(2, impl.Ilaenv(2, "DGELQF", " ", m, n, -1, -1)) - } - } - } - ldwork := nb - // Computed blocked LQ factorization. - var i int - if nbmin <= nb && nb < k && nx < k { - for i = 0; i < k-nx; i += nb { - ib := min(k-i, nb) - impl.Dgelq2(ib, n-i, a[i*lda+i:], lda, tau[i:], work) - if i+ib < m { - impl.Dlarft(lapack.Forward, lapack.RowWise, n-i, ib, - a[i*lda+i:], lda, - tau[i:], - work, ldwork) - impl.Dlarfb(blas.Right, blas.NoTrans, lapack.Forward, lapack.RowWise, - m-i-ib, n-i, ib, - a[i*lda+i:], lda, - work, ldwork, - a[(i+ib)*lda+i:], lda, - work[ib*ldwork:], ldwork) - } - } - } - // Perform unblocked LQ factorization on the remainder. - if i < k { - impl.Dgelq2(m-i, n-i, a[i*lda+i:], lda, tau[i:], work) - } - work[0] = float64(iws) -} diff --git a/vendor/gonum.org/v1/gonum/lapack/gonum/dgels.go b/vendor/gonum.org/v1/gonum/lapack/gonum/dgels.go deleted file mode 100644 index a3894b6a0b..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/gonum/dgels.go +++ /dev/null @@ -1,219 +0,0 @@ -// Copyright ©2015 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import ( - "gonum.org/v1/gonum/blas" - "gonum.org/v1/gonum/lapack" -) - -// Dgels finds a minimum-norm solution based on the matrices A and B using the -// QR or LQ factorization. Dgels returns false if the matrix -// A is singular, and true if this solution was successfully found. -// -// The minimization problem solved depends on the input parameters. -// -// 1. If m >= n and trans == blas.NoTrans, Dgels finds X such that || A*X - B||_2 -// is minimized. -// 2. If m < n and trans == blas.NoTrans, Dgels finds the minimum norm solution of -// A * X = B. -// 3. If m >= n and trans == blas.Trans, Dgels finds the minimum norm solution of -// A^T * X = B. -// 4. If m < n and trans == blas.Trans, Dgels finds X such that || A*X - B||_2 -// is minimized. -// Note that the least-squares solutions (cases 1 and 3) perform the minimization -// per column of B. This is not the same as finding the minimum-norm matrix. -// -// The matrix A is a general matrix of size m×n and is modified during this call. -// The input matrix B is of size max(m,n)×nrhs, and serves two purposes. On entry, -// the elements of b specify the input matrix B. B has size m×nrhs if -// trans == blas.NoTrans, and n×nrhs if trans == blas.Trans. On exit, the -// leading submatrix of b contains the solution vectors X. If trans == blas.NoTrans, -// this submatrix is of size n×nrhs, and of size m×nrhs otherwise. -// -// work is temporary storage, and lwork specifies the usable memory length. -// At minimum, lwork >= max(m,n) + max(m,n,nrhs), and this function will panic -// otherwise. A longer work will enable blocked algorithms to be called. -// In the special case that lwork == -1, work[0] will be set to the optimal working -// length. -func (impl Implementation) Dgels(trans blas.Transpose, m, n, nrhs int, a []float64, lda int, b []float64, ldb int, work []float64, lwork int) bool { - mn := min(m, n) - minwrk := mn + max(mn, nrhs) - switch { - case trans != blas.NoTrans && trans != blas.Trans && trans != blas.ConjTrans: - panic(badTrans) - case m < 0: - panic(mLT0) - case n < 0: - panic(nLT0) - case nrhs < 0: - panic(nrhsLT0) - case lda < max(1, n): - panic(badLdA) - case ldb < max(1, nrhs): - panic(badLdB) - case lwork < max(1, minwrk) && lwork != -1: - panic(badLWork) - case len(work) < max(1, lwork): - panic(shortWork) - } - - // Quick return if possible. - if mn == 0 || nrhs == 0 { - impl.Dlaset(blas.All, max(m, n), nrhs, 0, 0, b, ldb) - work[0] = 1 - return true - } - - // Find optimal block size. - var nb int - if m >= n { - nb = impl.Ilaenv(1, "DGEQRF", " ", m, n, -1, -1) - if trans != blas.NoTrans { - nb = max(nb, impl.Ilaenv(1, "DORMQR", "LN", m, nrhs, n, -1)) - } else { - nb = max(nb, impl.Ilaenv(1, "DORMQR", "LT", m, nrhs, n, -1)) - } - } else { - nb = impl.Ilaenv(1, "DGELQF", " ", m, n, -1, -1) - if trans != blas.NoTrans { - nb = max(nb, impl.Ilaenv(1, "DORMLQ", "LT", n, nrhs, m, -1)) - } else { - nb = max(nb, impl.Ilaenv(1, "DORMLQ", "LN", n, nrhs, m, -1)) - } - } - wsize := max(1, mn+max(mn, nrhs)*nb) - work[0] = float64(wsize) - - if lwork == -1 { - return true - } - - switch { - case len(a) < (m-1)*lda+n: - panic(shortA) - case len(b) < (max(m, n)-1)*ldb+nrhs: - panic(shortB) - } - - // Scale the input matrices if they contain extreme values. - smlnum := dlamchS / dlamchP - bignum := 1 / smlnum - anrm := impl.Dlange(lapack.MaxAbs, m, n, a, lda, nil) - var iascl int - if anrm > 0 && anrm < smlnum { - impl.Dlascl(lapack.General, 0, 0, anrm, smlnum, m, n, a, lda) - iascl = 1 - } else if anrm > bignum { - impl.Dlascl(lapack.General, 0, 0, anrm, bignum, m, n, a, lda) - } else if anrm == 0 { - // Matrix is all zeros. - impl.Dlaset(blas.All, max(m, n), nrhs, 0, 0, b, ldb) - return true - } - brow := m - if trans != blas.NoTrans { - brow = n - } - bnrm := impl.Dlange(lapack.MaxAbs, brow, nrhs, b, ldb, nil) - ibscl := 0 - if bnrm > 0 && bnrm < smlnum { - impl.Dlascl(lapack.General, 0, 0, bnrm, smlnum, brow, nrhs, b, ldb) - ibscl = 1 - } else if bnrm > bignum { - impl.Dlascl(lapack.General, 0, 0, bnrm, bignum, brow, nrhs, b, ldb) - ibscl = 2 - } - - // Solve the minimization problem using a QR or an LQ decomposition. - var scllen int - if m >= n { - impl.Dgeqrf(m, n, a, lda, work, work[mn:], lwork-mn) - if trans == blas.NoTrans { - impl.Dormqr(blas.Left, blas.Trans, m, nrhs, n, - a, lda, - work[:n], - b, ldb, - work[mn:], lwork-mn) - ok := impl.Dtrtrs(blas.Upper, blas.NoTrans, blas.NonUnit, n, nrhs, - a, lda, - b, ldb) - if !ok { - return false - } - scllen = n - } else { - ok := impl.Dtrtrs(blas.Upper, blas.Trans, blas.NonUnit, n, nrhs, - a, lda, - b, ldb) - if !ok { - return false - } - for i := n; i < m; i++ { - for j := 0; j < nrhs; j++ { - b[i*ldb+j] = 0 - } - } - impl.Dormqr(blas.Left, blas.NoTrans, m, nrhs, n, - a, lda, - work[:n], - b, ldb, - work[mn:], lwork-mn) - scllen = m - } - } else { - impl.Dgelqf(m, n, a, lda, work, work[mn:], lwork-mn) - if trans == blas.NoTrans { - ok := impl.Dtrtrs(blas.Lower, blas.NoTrans, blas.NonUnit, - m, nrhs, - a, lda, - b, ldb) - if !ok { - return false - } - for i := m; i < n; i++ { - for j := 0; j < nrhs; j++ { - b[i*ldb+j] = 0 - } - } - impl.Dormlq(blas.Left, blas.Trans, n, nrhs, m, - a, lda, - work, - b, ldb, - work[mn:], lwork-mn) - scllen = n - } else { - impl.Dormlq(blas.Left, blas.NoTrans, n, nrhs, m, - a, lda, - work, - b, ldb, - work[mn:], lwork-mn) - ok := impl.Dtrtrs(blas.Lower, blas.Trans, blas.NonUnit, - m, nrhs, - a, lda, - b, ldb) - if !ok { - return false - } - } - } - - // Adjust answer vector based on scaling. - if iascl == 1 { - impl.Dlascl(lapack.General, 0, 0, anrm, smlnum, scllen, nrhs, b, ldb) - } - if iascl == 2 { - impl.Dlascl(lapack.General, 0, 0, anrm, bignum, scllen, nrhs, b, ldb) - } - if ibscl == 1 { - impl.Dlascl(lapack.General, 0, 0, smlnum, bnrm, scllen, nrhs, b, ldb) - } - if ibscl == 2 { - impl.Dlascl(lapack.General, 0, 0, bignum, bnrm, scllen, nrhs, b, ldb) - } - - work[0] = float64(wsize) - return true -} diff --git a/vendor/gonum.org/v1/gonum/lapack/gonum/dgeql2.go b/vendor/gonum.org/v1/gonum/lapack/gonum/dgeql2.go deleted file mode 100644 index 3f3ddb163f..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/gonum/dgeql2.go +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright ©2016 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import "gonum.org/v1/gonum/blas" - -// Dgeql2 computes the QL factorization of the m×n matrix A. That is, Dgeql2 -// computes Q and L such that -// A = Q * L -// where Q is an m×m orthonormal matrix and L is a lower trapezoidal matrix. -// -// Q is represented as a product of elementary reflectors, -// Q = H_{k-1} * ... * H_1 * H_0 -// where k = min(m,n) and each H_i has the form -// H_i = I - tau[i] * v_i * v_i^T -// Vector v_i has v[m-k+i+1:m] = 0, v[m-k+i] = 1, and v[:m-k+i+1] is stored on -// exit in A[0:m-k+i-1, n-k+i]. -// -// tau must have length at least min(m,n), and Dgeql2 will panic otherwise. -// -// work is temporary memory storage and must have length at least n. -// -// Dgeql2 is an internal routine. It is exported for testing purposes. -func (impl Implementation) Dgeql2(m, n int, a []float64, lda int, tau, work []float64) { - switch { - case m < 0: - panic(mLT0) - case n < 0: - panic(nLT0) - case lda < max(1, n): - panic(badLdA) - } - - // Quick return if possible. - k := min(m, n) - if k == 0 { - return - } - - switch { - case len(a) < (m-1)*lda+n: - panic(shortA) - case len(tau) < k: - panic(shortTau) - case len(work) < n: - panic(shortWork) - } - - var aii float64 - for i := k - 1; i >= 0; i-- { - // Generate elementary reflector H_i to annihilate A[0:m-k+i-1, n-k+i]. - aii, tau[i] = impl.Dlarfg(m-k+i+1, a[(m-k+i)*lda+n-k+i], a[n-k+i:], lda) - - // Apply H_i to A[0:m-k+i, 0:n-k+i-1] from the left. - a[(m-k+i)*lda+n-k+i] = 1 - impl.Dlarf(blas.Left, m-k+i+1, n-k+i, a[n-k+i:], lda, tau[i], a, lda, work) - a[(m-k+i)*lda+n-k+i] = aii - } -} diff --git a/vendor/gonum.org/v1/gonum/lapack/gonum/dgeqp3.go b/vendor/gonum.org/v1/gonum/lapack/gonum/dgeqp3.go deleted file mode 100644 index 6949da967a..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/gonum/dgeqp3.go +++ /dev/null @@ -1,186 +0,0 @@ -// Copyright ©2017 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import ( - "gonum.org/v1/gonum/blas" - "gonum.org/v1/gonum/blas/blas64" -) - -// Dgeqp3 computes a QR factorization with column pivoting of the -// m×n matrix A: A*P = Q*R using Level 3 BLAS. -// -// The matrix Q is represented as a product of elementary reflectors -// Q = H_0 H_1 . . . H_{k-1}, where k = min(m,n). -// Each H_i has the form -// H_i = I - tau * v * v^T -// where tau and v are real vectors with v[0:i-1] = 0 and v[i] = 1; -// v[i:m] is stored on exit in A[i:m, i], and tau in tau[i]. -// -// jpvt specifies a column pivot to be applied to A. If -// jpvt[j] is at least zero, the jth column of A is permuted -// to the front of A*P (a leading column), if jpvt[j] is -1 -// the jth column of A is a free column. If jpvt[j] < -1, Dgeqp3 -// will panic. On return, jpvt holds the permutation that was -// applied; the jth column of A*P was the jpvt[j] column of A. -// jpvt must have length n or Dgeqp3 will panic. -// -// tau holds the scalar factors of the elementary reflectors. -// It must have length min(m, n), otherwise Dgeqp3 will panic. -// -// work must have length at least max(1,lwork), and lwork must be at least -// 3*n+1, otherwise Dgeqp3 will panic. For optimal performance lwork must -// be at least 2*n+(n+1)*nb, where nb is the optimal blocksize. On return, -// work[0] will contain the optimal value of lwork. -// -// If lwork == -1, instead of performing Dgeqp3, only the optimal value of lwork -// will be stored in work[0]. -// -// Dgeqp3 is an internal routine. It is exported for testing purposes. -func (impl Implementation) Dgeqp3(m, n int, a []float64, lda int, jpvt []int, tau, work []float64, lwork int) { - const ( - inb = 1 - inbmin = 2 - ixover = 3 - ) - - minmn := min(m, n) - iws := 3*n + 1 - if minmn == 0 { - iws = 1 - } - switch { - case m < 0: - panic(mLT0) - case n < 0: - panic(nLT0) - case lda < max(1, n): - panic(badLdA) - case lwork < iws && lwork != -1: - panic(badLWork) - case len(work) < max(1, lwork): - panic(shortWork) - } - - // Quick return if possible. - if minmn == 0 { - work[0] = 1 - return - } - - nb := impl.Ilaenv(inb, "DGEQRF", " ", m, n, -1, -1) - if lwork == -1 { - work[0] = float64(2*n + (n+1)*nb) - return - } - - switch { - case len(a) < (m-1)*lda+n: - panic(shortA) - case len(jpvt) != n: - panic(badLenJpvt) - case len(tau) < minmn: - panic(shortTau) - } - - for _, v := range jpvt { - if v < -1 || n <= v { - panic(badJpvt) - } - } - - bi := blas64.Implementation() - - // Move initial columns up front. - var nfxd int - for j := 0; j < n; j++ { - if jpvt[j] == -1 { - jpvt[j] = j - continue - } - if j != nfxd { - bi.Dswap(m, a[j:], lda, a[nfxd:], lda) - jpvt[j], jpvt[nfxd] = jpvt[nfxd], j - } else { - jpvt[j] = j - } - nfxd++ - } - - // Factorize nfxd columns. - // - // Compute the QR factorization of nfxd columns and update remaining columns. - if nfxd > 0 { - na := min(m, nfxd) - impl.Dgeqrf(m, na, a, lda, tau, work, lwork) - iws = max(iws, int(work[0])) - if na < n { - impl.Dormqr(blas.Left, blas.Trans, m, n-na, na, a, lda, tau[:na], a[na:], lda, - work, lwork) - iws = max(iws, int(work[0])) - } - } - - if nfxd >= minmn { - work[0] = float64(iws) - return - } - - // Factorize free columns. - sm := m - nfxd - sn := n - nfxd - sminmn := minmn - nfxd - - // Determine the block size. - nb = impl.Ilaenv(inb, "DGEQRF", " ", sm, sn, -1, -1) - nbmin := 2 - nx := 0 - - if 1 < nb && nb < sminmn { - // Determine when to cross over from blocked to unblocked code. - nx = max(0, impl.Ilaenv(ixover, "DGEQRF", " ", sm, sn, -1, -1)) - - if nx < sminmn { - // Determine if workspace is large enough for blocked code. - minws := 2*sn + (sn+1)*nb - iws = max(iws, minws) - if lwork < minws { - // Not enough workspace to use optimal nb. Reduce - // nb and determine the minimum value of nb. - nb = (lwork - 2*sn) / (sn + 1) - nbmin = max(2, impl.Ilaenv(inbmin, "DGEQRF", " ", sm, sn, -1, -1)) - } - } - } - - // Initialize partial column norms. - // The first n elements of work store the exact column norms. - for j := nfxd; j < n; j++ { - work[j] = bi.Dnrm2(sm, a[nfxd*lda+j:], lda) - work[n+j] = work[j] - } - j := nfxd - if nbmin <= nb && nb < sminmn && nx < sminmn { - // Use blocked code initially. - - // Compute factorization. - var fjb int - for topbmn := minmn - nx; j < topbmn; j += fjb { - jb := min(nb, topbmn-j) - - // Factorize jb columns among columns j:n. - fjb = impl.Dlaqps(m, n-j, j, jb, a[j:], lda, jpvt[j:], tau[j:], - work[j:n], work[j+n:2*n], work[2*n:2*n+jb], work[2*n+jb:], jb) - } - } - - // Use unblocked code to factor the last or only block. - if j < minmn { - impl.Dlaqp2(m, n-j, j, a[j:], lda, jpvt[j:], tau[j:], - work[j:n], work[j+n:2*n], work[2*n:]) - } - - work[0] = float64(iws) -} diff --git a/vendor/gonum.org/v1/gonum/lapack/gonum/dgeqr2.go b/vendor/gonum.org/v1/gonum/lapack/gonum/dgeqr2.go deleted file mode 100644 index 3e35d7e2f4..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/gonum/dgeqr2.go +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright ©2015 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import "gonum.org/v1/gonum/blas" - -// Dgeqr2 computes a QR factorization of the m×n matrix A. -// -// In a QR factorization, Q is an m×m orthonormal matrix, and R is an -// upper triangular m×n matrix. -// -// A is modified to contain the information to construct Q and R. -// The upper triangle of a contains the matrix R. The lower triangular elements -// (not including the diagonal) contain the elementary reflectors. tau is modified -// to contain the reflector scales. tau must have length at least min(m,n), and -// this function will panic otherwise. -// -// The ith elementary reflector can be explicitly constructed by first extracting -// the -// v[j] = 0 j < i -// v[j] = 1 j == i -// v[j] = a[j*lda+i] j > i -// and computing H_i = I - tau[i] * v * v^T. -// -// The orthonormal matrix Q can be constructed from a product of these elementary -// reflectors, Q = H_0 * H_1 * ... * H_{k-1}, where k = min(m,n). -// -// work is temporary storage of length at least n and this function will panic otherwise. -// -// Dgeqr2 is an internal routine. It is exported for testing purposes. -func (impl Implementation) Dgeqr2(m, n int, a []float64, lda int, tau, work []float64) { - // TODO(btracey): This is oriented such that columns of a are eliminated. - // This likely could be re-arranged to take better advantage of row-major - // storage. - - switch { - case m < 0: - panic(mLT0) - case n < 0: - panic(nLT0) - case lda < max(1, n): - panic(badLdA) - case len(work) < n: - panic(shortWork) - } - - // Quick return if possible. - k := min(m, n) - if k == 0 { - return - } - - switch { - case len(a) < (m-1)*lda+n: - panic(shortA) - case len(tau) < k: - panic(shortTau) - } - - for i := 0; i < k; i++ { - // Generate elementary reflector H_i. - a[i*lda+i], tau[i] = impl.Dlarfg(m-i, a[i*lda+i], a[min((i+1), m-1)*lda+i:], lda) - if i < n-1 { - aii := a[i*lda+i] - a[i*lda+i] = 1 - impl.Dlarf(blas.Left, m-i, n-i-1, - a[i*lda+i:], lda, - tau[i], - a[i*lda+i+1:], lda, - work) - a[i*lda+i] = aii - } - } -} diff --git a/vendor/gonum.org/v1/gonum/lapack/gonum/dgeqrf.go b/vendor/gonum.org/v1/gonum/lapack/gonum/dgeqrf.go deleted file mode 100644 index 300f8eea4e..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/gonum/dgeqrf.go +++ /dev/null @@ -1,108 +0,0 @@ -// Copyright ©2015 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import ( - "gonum.org/v1/gonum/blas" - "gonum.org/v1/gonum/lapack" -) - -// Dgeqrf computes the QR factorization of the m×n matrix A using a blocked -// algorithm. See the documentation for Dgeqr2 for a description of the -// parameters at entry and exit. -// -// work is temporary storage, and lwork specifies the usable memory length. -// The length of work must be at least max(1, lwork) and lwork must be -1 -// or at least n, otherwise this function will panic. -// Dgeqrf is a blocked QR factorization, but the block size is limited -// by the temporary space available. If lwork == -1, instead of performing Dgeqrf, -// the optimal work length will be stored into work[0]. -// -// tau must have length at least min(m,n), and this function will panic otherwise. -func (impl Implementation) Dgeqrf(m, n int, a []float64, lda int, tau, work []float64, lwork int) { - switch { - case m < 0: - panic(mLT0) - case n < 0: - panic(nLT0) - case lda < max(1, n): - panic(badLdA) - case lwork < max(1, n) && lwork != -1: - panic(badLWork) - case len(work) < max(1, lwork): - panic(shortWork) - } - - // Quick return if possible. - k := min(m, n) - if k == 0 { - work[0] = 1 - return - } - - // nb is the optimal blocksize, i.e. the number of columns transformed at a time. - nb := impl.Ilaenv(1, "DGEQRF", " ", m, n, -1, -1) - if lwork == -1 { - work[0] = float64(n * nb) - return - } - - if len(a) < (m-1)*lda+n { - panic(shortA) - } - if len(tau) < k { - panic(shortTau) - } - - nbmin := 2 // Minimal block size. - var nx int // Use unblocked (unless changed in the next for loop) - iws := n - // Only consider blocked if the suggested block size is > 1 and the - // number of rows or columns is sufficiently large. - if 1 < nb && nb < k { - // nx is the block size at which the code switches from blocked - // to unblocked. - nx = max(0, impl.Ilaenv(3, "DGEQRF", " ", m, n, -1, -1)) - if k > nx { - iws = n * nb - if lwork < iws { - // Not enough workspace to use the optimal block - // size. Get the minimum block size instead. - nb = lwork / n - nbmin = max(2, impl.Ilaenv(2, "DGEQRF", " ", m, n, -1, -1)) - } - } - } - - // Compute QR using a blocked algorithm. - var i int - if nbmin <= nb && nb < k && nx < k { - ldwork := nb - for i = 0; i < k-nx; i += nb { - ib := min(k-i, nb) - // Compute the QR factorization of the current block. - impl.Dgeqr2(m-i, ib, a[i*lda+i:], lda, tau[i:], work) - if i+ib < n { - // Form the triangular factor of the block reflector and apply H^T - // In Dlarft, work becomes the T matrix. - impl.Dlarft(lapack.Forward, lapack.ColumnWise, m-i, ib, - a[i*lda+i:], lda, - tau[i:], - work, ldwork) - impl.Dlarfb(blas.Left, blas.Trans, lapack.Forward, lapack.ColumnWise, - m-i, n-i-ib, ib, - a[i*lda+i:], lda, - work, ldwork, - a[i*lda+i+ib:], lda, - work[ib*ldwork:], ldwork) - } - } - } - // Call unblocked code on the remaining columns. - if i < k { - impl.Dgeqr2(m-i, n-i, a[i*lda+i:], lda, tau[i:], work) - } - work[0] = float64(iws) -} diff --git a/vendor/gonum.org/v1/gonum/lapack/gonum/dgerq2.go b/vendor/gonum.org/v1/gonum/lapack/gonum/dgerq2.go deleted file mode 100644 index 60dac973a1..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/gonum/dgerq2.go +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright ©2017 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import "gonum.org/v1/gonum/blas" - -// Dgerq2 computes an RQ factorization of the m×n matrix A, -// A = R * Q. -// On exit, if m <= n, the upper triangle of the subarray -// A[0:m, n-m:n] contains the m×m upper triangular matrix R. -// If m >= n, the elements on and above the (m-n)-th subdiagonal -// contain the m×n upper trapezoidal matrix R. -// The remaining elements, with tau, represent the -// orthogonal matrix Q as a product of min(m,n) elementary -// reflectors. -// -// The matrix Q is represented as a product of elementary reflectors -// Q = H_0 H_1 . . . H_{min(m,n)-1}. -// Each H(i) has the form -// H_i = I - tau_i * v * v^T -// where v is a vector with v[0:n-k+i-1] stored in A[m-k+i, 0:n-k+i-1], -// v[n-k+i:n] = 0 and v[n-k+i] = 1. -// -// tau must have length min(m,n) and work must have length m, otherwise -// Dgerq2 will panic. -// -// Dgerq2 is an internal routine. It is exported for testing purposes. -func (impl Implementation) Dgerq2(m, n int, a []float64, lda int, tau, work []float64) { - switch { - case m < 0: - panic(mLT0) - case n < 0: - panic(nLT0) - case lda < max(1, n): - panic(badLdA) - case len(work) < m: - panic(shortWork) - } - - // Quick return if possible. - k := min(m, n) - if k == 0 { - return - } - - switch { - case len(a) < (m-1)*lda+n: - panic(shortA) - case len(tau) < k: - panic(shortTau) - } - - for i := k - 1; i >= 0; i-- { - // Generate elementary reflector H[i] to annihilate - // A[m-k+i, 0:n-k+i-1]. - mki := m - k + i - nki := n - k + i - var aii float64 - aii, tau[i] = impl.Dlarfg(nki+1, a[mki*lda+nki], a[mki*lda:], 1) - - // Apply H[i] to A[0:m-k+i-1, 0:n-k+i] from the right. - a[mki*lda+nki] = 1 - impl.Dlarf(blas.Right, mki, nki+1, a[mki*lda:], 1, tau[i], a, lda, work) - a[mki*lda+nki] = aii - } -} diff --git a/vendor/gonum.org/v1/gonum/lapack/gonum/dgerqf.go b/vendor/gonum.org/v1/gonum/lapack/gonum/dgerqf.go deleted file mode 100644 index 9b4aa050ef..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/gonum/dgerqf.go +++ /dev/null @@ -1,129 +0,0 @@ -// Copyright ©2017 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import ( - "gonum.org/v1/gonum/blas" - "gonum.org/v1/gonum/lapack" -) - -// Dgerqf computes an RQ factorization of the m×n matrix A, -// A = R * Q. -// On exit, if m <= n, the upper triangle of the subarray -// A[0:m, n-m:n] contains the m×m upper triangular matrix R. -// If m >= n, the elements on and above the (m-n)-th subdiagonal -// contain the m×n upper trapezoidal matrix R. -// The remaining elements, with tau, represent the -// orthogonal matrix Q as a product of min(m,n) elementary -// reflectors. -// -// The matrix Q is represented as a product of elementary reflectors -// Q = H_0 H_1 . . . H_{min(m,n)-1}. -// Each H(i) has the form -// H_i = I - tau_i * v * v^T -// where v is a vector with v[0:n-k+i-1] stored in A[m-k+i, 0:n-k+i-1], -// v[n-k+i:n] = 0 and v[n-k+i] = 1. -// -// tau must have length min(m,n), work must have length max(1, lwork), -// and lwork must be -1 or at least max(1, m), otherwise Dgerqf will panic. -// On exit, work[0] will contain the optimal length for work. -// -// Dgerqf is an internal routine. It is exported for testing purposes. -func (impl Implementation) Dgerqf(m, n int, a []float64, lda int, tau, work []float64, lwork int) { - switch { - case m < 0: - panic(mLT0) - case n < 0: - panic(nLT0) - case lda < max(1, n): - panic(badLdA) - case lwork < max(1, m) && lwork != -1: - panic(badLWork) - case len(work) < max(1, lwork): - panic(shortWork) - } - - // Quick return if possible. - k := min(m, n) - if k == 0 { - work[0] = 1 - return - } - - nb := impl.Ilaenv(1, "DGERQF", " ", m, n, -1, -1) - if lwork == -1 { - work[0] = float64(m * nb) - return - } - - if len(a) < (m-1)*lda+n { - panic(shortA) - } - if len(tau) != k { - panic(badLenTau) - } - - nbmin := 2 - nx := 1 - iws := m - var ldwork int - if 1 < nb && nb < k { - // Determine when to cross over from blocked to unblocked code. - nx = max(0, impl.Ilaenv(3, "DGERQF", " ", m, n, -1, -1)) - if nx < k { - // Determine whether workspace is large enough for blocked code. - iws = m * nb - if lwork < iws { - // Not enough workspace to use optimal nb. Reduce - // nb and determine the minimum value of nb. - nb = lwork / m - nbmin = max(2, impl.Ilaenv(2, "DGERQF", " ", m, n, -1, -1)) - } - ldwork = nb - } - } - - var mu, nu int - if nbmin <= nb && nb < k && nx < k { - // Use blocked code initially. - // The last kk rows are handled by the block method. - ki := ((k - nx - 1) / nb) * nb - kk := min(k, ki+nb) - - var i int - for i = k - kk + ki; i >= k-kk; i -= nb { - ib := min(k-i, nb) - - // Compute the RQ factorization of the current block - // A[m-k+i:m-k+i+ib-1, 0:n-k+i+ib-1]. - impl.Dgerq2(ib, n-k+i+ib, a[(m-k+i)*lda:], lda, tau[i:], work) - if m-k+i > 0 { - // Form the triangular factor of the block reflector - // H = H_{i+ib-1} . . . H_{i+1} H_i. - impl.Dlarft(lapack.Backward, lapack.RowWise, - n-k+i+ib, ib, a[(m-k+i)*lda:], lda, tau[i:], - work, ldwork) - - // Apply H to A[0:m-k+i-1, 0:n-k+i+ib-1] from the right. - impl.Dlarfb(blas.Right, blas.NoTrans, lapack.Backward, lapack.RowWise, - m-k+i, n-k+i+ib, ib, a[(m-k+i)*lda:], lda, - work, ldwork, - a, lda, - work[ib*ldwork:], ldwork) - } - } - mu = m - k + i + nb - nu = n - k + i + nb - } else { - mu = m - nu = n - } - - // Use unblocked code to factor the last or only block. - if mu > 0 && nu > 0 { - impl.Dgerq2(mu, nu, a, lda, tau, work) - } - work[0] = float64(iws) -} diff --git a/vendor/gonum.org/v1/gonum/lapack/gonum/dgesvd.go b/vendor/gonum.org/v1/gonum/lapack/gonum/dgesvd.go deleted file mode 100644 index 136f683e4b..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/gonum/dgesvd.go +++ /dev/null @@ -1,1374 +0,0 @@ -// Copyright ©2015 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import ( - "math" - - "gonum.org/v1/gonum/blas" - "gonum.org/v1/gonum/blas/blas64" - "gonum.org/v1/gonum/lapack" -) - -const noSVDO = "dgesvd: not coded for overwrite" - -// Dgesvd computes the singular value decomposition of the input matrix A. -// -// The singular value decomposition is -// A = U * Sigma * V^T -// where Sigma is an m×n diagonal matrix containing the singular values of A, -// U is an m×m orthogonal matrix and V is an n×n orthogonal matrix. The first -// min(m,n) columns of U and V are the left and right singular vectors of A -// respectively. -// -// jobU and jobVT are options for computing the singular vectors. The behavior -// is as follows -// jobU == lapack.SVDAll All m columns of U are returned in u -// jobU == lapack.SVDStore The first min(m,n) columns are returned in u -// jobU == lapack.SVDOverwrite The first min(m,n) columns of U are written into a -// jobU == lapack.SVDNone The columns of U are not computed. -// The behavior is the same for jobVT and the rows of V^T. At most one of jobU -// and jobVT can equal lapack.SVDOverwrite, and Dgesvd will panic otherwise. -// -// On entry, a contains the data for the m×n matrix A. During the call to Dgesvd -// the data is overwritten. On exit, A contains the appropriate singular vectors -// if either job is lapack.SVDOverwrite. -// -// s is a slice of length at least min(m,n) and on exit contains the singular -// values in decreasing order. -// -// u contains the left singular vectors on exit, stored column-wise. If -// jobU == lapack.SVDAll, u is of size m×m. If jobU == lapack.SVDStore u is -// of size m×min(m,n). If jobU == lapack.SVDOverwrite or lapack.SVDNone, u is -// not used. -// -// vt contains the left singular vectors on exit, stored row-wise. If -// jobV == lapack.SVDAll, vt is of size n×n. If jobVT == lapack.SVDStore vt is -// of size min(m,n)×n. If jobVT == lapack.SVDOverwrite or lapack.SVDNone, vt is -// not used. -// -// work is a slice for storing temporary memory, and lwork is the usable size of -// the slice. lwork must be at least max(5*min(m,n), 3*min(m,n)+max(m,n)). -// If lwork == -1, instead of performing Dgesvd, the optimal work length will be -// stored into work[0]. Dgesvd will panic if the working memory has insufficient -// storage. -// -// Dgesvd returns whether the decomposition successfully completed. -func (impl Implementation) Dgesvd(jobU, jobVT lapack.SVDJob, m, n int, a []float64, lda int, s, u []float64, ldu int, vt []float64, ldvt int, work []float64, lwork int) (ok bool) { - if jobU == lapack.SVDOverwrite || jobVT == lapack.SVDOverwrite { - panic(noSVDO) - } - - wantua := jobU == lapack.SVDAll - wantus := jobU == lapack.SVDStore - wantuas := wantua || wantus - wantuo := jobU == lapack.SVDOverwrite - wantun := jobU == lapack.SVDNone - if !(wantua || wantus || wantuo || wantun) { - panic(badSVDJob) - } - - wantva := jobVT == lapack.SVDAll - wantvs := jobVT == lapack.SVDStore - wantvas := wantva || wantvs - wantvo := jobVT == lapack.SVDOverwrite - wantvn := jobVT == lapack.SVDNone - if !(wantva || wantvs || wantvo || wantvn) { - panic(badSVDJob) - } - - if wantuo && wantvo { - panic(bothSVDOver) - } - - minmn := min(m, n) - minwork := 1 - if minmn > 0 { - minwork = max(3*minmn+max(m, n), 5*minmn) - } - switch { - case m < 0: - panic(mLT0) - case n < 0: - panic(nLT0) - case lda < max(1, n): - panic(badLdA) - case ldu < 1, wantua && ldu < m, wantus && ldu < minmn: - panic(badLdU) - case ldvt < 1 || (wantvas && ldvt < n): - panic(badLdVT) - case lwork < minwork && lwork != -1: - panic(badLWork) - case len(work) < max(1, lwork): - panic(shortWork) - } - - // Quick return if possible. - if minmn == 0 { - work[0] = 1 - return true - } - - // Compute optimal workspace size for subroutines. - opts := string(jobU) + string(jobVT) - mnthr := impl.Ilaenv(6, "DGESVD", opts, m, n, 0, 0) - maxwrk := 1 - var wrkbl, bdspac int - if m >= n { - bdspac = 5 * n - impl.Dgeqrf(m, n, a, lda, nil, work, -1) - lwork_dgeqrf := int(work[0]) - - impl.Dorgqr(m, n, n, a, lda, nil, work, -1) - lwork_dorgqr_n := int(work[0]) - impl.Dorgqr(m, m, n, a, lda, nil, work, -1) - lwork_dorgqr_m := int(work[0]) - - impl.Dgebrd(n, n, a, lda, s, nil, nil, nil, work, -1) - lwork_dgebrd := int(work[0]) - - impl.Dorgbr(lapack.GeneratePT, n, n, n, a, lda, nil, work, -1) - lwork_dorgbr_p := int(work[0]) - - impl.Dorgbr(lapack.GenerateQ, n, n, n, a, lda, nil, work, -1) - lwork_dorgbr_q := int(work[0]) - - if m >= mnthr { - if wantun { - // Path 1 (m much larger than n, jobU == None) - maxwrk = n + lwork_dgeqrf - maxwrk = max(maxwrk, 3*n+lwork_dgebrd) - if wantvo || wantvas { - maxwrk = max(maxwrk, 3*n+lwork_dorgbr_p) - } - maxwrk = max(maxwrk, bdspac) - } else if wantuo && wantvn { - // Path 2 (m much larger than n, jobU == Overwrite, jobVT == None) - wrkbl = n + lwork_dgeqrf - wrkbl = max(wrkbl, n+lwork_dorgqr_n) - wrkbl = max(wrkbl, 3*n+lwork_dgebrd) - wrkbl = max(wrkbl, 3*n+lwork_dorgbr_q) - wrkbl = max(wrkbl, bdspac) - maxwrk = max(n*n+wrkbl, n*n+m*n+n) - } else if wantuo && wantvas { - // Path 3 (m much larger than n, jobU == Overwrite, jobVT == Store or All) - wrkbl = n + lwork_dgeqrf - wrkbl = max(wrkbl, n+lwork_dorgqr_n) - wrkbl = max(wrkbl, 3*n+lwork_dgebrd) - wrkbl = max(wrkbl, 3*n+lwork_dorgbr_q) - wrkbl = max(wrkbl, 3*n+lwork_dorgbr_p) - wrkbl = max(wrkbl, bdspac) - maxwrk = max(n*n+wrkbl, n*n+m*n+n) - } else if wantus && wantvn { - // Path 4 (m much larger than n, jobU == Store, jobVT == None) - wrkbl = n + lwork_dgeqrf - wrkbl = max(wrkbl, n+lwork_dorgqr_n) - wrkbl = max(wrkbl, 3*n+lwork_dgebrd) - wrkbl = max(wrkbl, 3*n+lwork_dorgbr_q) - wrkbl = max(wrkbl, bdspac) - maxwrk = n*n + wrkbl - } else if wantus && wantvo { - // Path 5 (m much larger than n, jobU == Store, jobVT == Overwrite) - wrkbl = n + lwork_dgeqrf - wrkbl = max(wrkbl, n+lwork_dorgqr_n) - wrkbl = max(wrkbl, 3*n+lwork_dgebrd) - wrkbl = max(wrkbl, 3*n+lwork_dorgbr_q) - wrkbl = max(wrkbl, 3*n+lwork_dorgbr_p) - wrkbl = max(wrkbl, bdspac) - maxwrk = 2*n*n + wrkbl - } else if wantus && wantvas { - // Path 6 (m much larger than n, jobU == Store, jobVT == Store or All) - wrkbl = n + lwork_dgeqrf - wrkbl = max(wrkbl, n+lwork_dorgqr_n) - wrkbl = max(wrkbl, 3*n+lwork_dgebrd) - wrkbl = max(wrkbl, 3*n+lwork_dorgbr_q) - wrkbl = max(wrkbl, 3*n+lwork_dorgbr_p) - wrkbl = max(wrkbl, bdspac) - maxwrk = n*n + wrkbl - } else if wantua && wantvn { - // Path 7 (m much larger than n, jobU == All, jobVT == None) - wrkbl = n + lwork_dgeqrf - wrkbl = max(wrkbl, n+lwork_dorgqr_m) - wrkbl = max(wrkbl, 3*n+lwork_dgebrd) - wrkbl = max(wrkbl, 3*n+lwork_dorgbr_q) - wrkbl = max(wrkbl, bdspac) - maxwrk = n*n + wrkbl - } else if wantua && wantvo { - // Path 8 (m much larger than n, jobU == All, jobVT == Overwrite) - wrkbl = n + lwork_dgeqrf - wrkbl = max(wrkbl, n+lwork_dorgqr_m) - wrkbl = max(wrkbl, 3*n+lwork_dgebrd) - wrkbl = max(wrkbl, 3*n+lwork_dorgbr_q) - wrkbl = max(wrkbl, 3*n+lwork_dorgbr_p) - wrkbl = max(wrkbl, bdspac) - maxwrk = 2*n*n + wrkbl - } else if wantua && wantvas { - // Path 9 (m much larger than n, jobU == All, jobVT == Store or All) - wrkbl = n + lwork_dgeqrf - wrkbl = max(wrkbl, n+lwork_dorgqr_m) - wrkbl = max(wrkbl, 3*n+lwork_dgebrd) - wrkbl = max(wrkbl, 3*n+lwork_dorgbr_q) - wrkbl = max(wrkbl, 3*n+lwork_dorgbr_p) - wrkbl = max(wrkbl, bdspac) - maxwrk = n*n + wrkbl - } - } else { - // Path 10 (m at least n, but not much larger) - impl.Dgebrd(m, n, a, lda, s, nil, nil, nil, work, -1) - lwork_dgebrd := int(work[0]) - maxwrk = 3*n + lwork_dgebrd - if wantus || wantuo { - impl.Dorgbr(lapack.GenerateQ, m, n, n, a, lda, nil, work, -1) - lwork_dorgbr_q = int(work[0]) - maxwrk = max(maxwrk, 3*n+lwork_dorgbr_q) - } - if wantua { - impl.Dorgbr(lapack.GenerateQ, m, m, n, a, lda, nil, work, -1) - lwork_dorgbr_q := int(work[0]) - maxwrk = max(maxwrk, 3*n+lwork_dorgbr_q) - } - if !wantvn { - maxwrk = max(maxwrk, 3*n+lwork_dorgbr_p) - } - maxwrk = max(maxwrk, bdspac) - } - } else { - bdspac = 5 * m - - impl.Dgelqf(m, n, a, lda, nil, work, -1) - lwork_dgelqf := int(work[0]) - - impl.Dorglq(n, n, m, nil, n, nil, work, -1) - lwork_dorglq_n := int(work[0]) - impl.Dorglq(m, n, m, a, lda, nil, work, -1) - lwork_dorglq_m := int(work[0]) - - impl.Dgebrd(m, m, a, lda, s, nil, nil, nil, work, -1) - lwork_dgebrd := int(work[0]) - - impl.Dorgbr(lapack.GeneratePT, m, m, m, a, n, nil, work, -1) - lwork_dorgbr_p := int(work[0]) - - impl.Dorgbr(lapack.GenerateQ, m, m, m, a, n, nil, work, -1) - lwork_dorgbr_q := int(work[0]) - - if n >= mnthr { - if wantvn { - // Path 1t (n much larger than m, jobVT == None) - maxwrk = m + lwork_dgelqf - maxwrk = max(maxwrk, 3*m+lwork_dgebrd) - if wantuo || wantuas { - maxwrk = max(maxwrk, 3*m+lwork_dorgbr_q) - } - maxwrk = max(maxwrk, bdspac) - } else if wantvo && wantun { - // Path 2t (n much larger than m, jobU == None, jobVT == Overwrite) - wrkbl = m + lwork_dgelqf - wrkbl = max(wrkbl, m+lwork_dorglq_m) - wrkbl = max(wrkbl, 3*m+lwork_dgebrd) - wrkbl = max(wrkbl, 3*m+lwork_dorgbr_p) - wrkbl = max(wrkbl, bdspac) - maxwrk = max(m*m+wrkbl, m*m+m*n+m) - } else if wantvo && wantuas { - // Path 3t (n much larger than m, jobU == Store or All, jobVT == Overwrite) - wrkbl = m + lwork_dgelqf - wrkbl = max(wrkbl, m+lwork_dorglq_m) - wrkbl = max(wrkbl, 3*m+lwork_dgebrd) - wrkbl = max(wrkbl, 3*m+lwork_dorgbr_p) - wrkbl = max(wrkbl, 3*m+lwork_dorgbr_q) - wrkbl = max(wrkbl, bdspac) - maxwrk = max(m*m+wrkbl, m*m+m*n+m) - } else if wantvs && wantun { - // Path 4t (n much larger than m, jobU == None, jobVT == Store) - wrkbl = m + lwork_dgelqf - wrkbl = max(wrkbl, m+lwork_dorglq_m) - wrkbl = max(wrkbl, 3*m+lwork_dgebrd) - wrkbl = max(wrkbl, 3*m+lwork_dorgbr_p) - wrkbl = max(wrkbl, bdspac) - maxwrk = m*m + wrkbl - } else if wantvs && wantuo { - // Path 5t (n much larger than m, jobU == Overwrite, jobVT == Store) - wrkbl = m + lwork_dgelqf - wrkbl = max(wrkbl, m+lwork_dorglq_m) - wrkbl = max(wrkbl, 3*m+lwork_dgebrd) - wrkbl = max(wrkbl, 3*m+lwork_dorgbr_p) - wrkbl = max(wrkbl, 3*m+lwork_dorgbr_q) - wrkbl = max(wrkbl, bdspac) - maxwrk = 2*m*m + wrkbl - } else if wantvs && wantuas { - // Path 6t (n much larger than m, jobU == Store or All, jobVT == Store) - wrkbl = m + lwork_dgelqf - wrkbl = max(wrkbl, m+lwork_dorglq_m) - wrkbl = max(wrkbl, 3*m+lwork_dgebrd) - wrkbl = max(wrkbl, 3*m+lwork_dorgbr_p) - wrkbl = max(wrkbl, 3*m+lwork_dorgbr_q) - wrkbl = max(wrkbl, bdspac) - maxwrk = m*m + wrkbl - } else if wantva && wantun { - // Path 7t (n much larger than m, jobU== None, jobVT == All) - wrkbl = m + lwork_dgelqf - wrkbl = max(wrkbl, m+lwork_dorglq_n) - wrkbl = max(wrkbl, 3*m+lwork_dgebrd) - wrkbl = max(wrkbl, 3*m+lwork_dorgbr_p) - wrkbl = max(wrkbl, bdspac) - maxwrk = m*m + wrkbl - } else if wantva && wantuo { - // Path 8t (n much larger than m, jobU == Overwrite, jobVT == All) - wrkbl = m + lwork_dgelqf - wrkbl = max(wrkbl, m+lwork_dorglq_n) - wrkbl = max(wrkbl, 3*m+lwork_dgebrd) - wrkbl = max(wrkbl, 3*m+lwork_dorgbr_p) - wrkbl = max(wrkbl, 3*m+lwork_dorgbr_q) - wrkbl = max(wrkbl, bdspac) - maxwrk = 2*m*m + wrkbl - } else if wantva && wantuas { - // Path 9t (n much larger than m, jobU == Store or All, jobVT == All) - wrkbl = m + lwork_dgelqf - wrkbl = max(wrkbl, m+lwork_dorglq_n) - wrkbl = max(wrkbl, 3*m+lwork_dgebrd) - wrkbl = max(wrkbl, 3*m+lwork_dorgbr_p) - wrkbl = max(wrkbl, 3*m+lwork_dorgbr_q) - wrkbl = max(wrkbl, bdspac) - maxwrk = m*m + wrkbl - } - } else { - // Path 10t (n greater than m, but not much larger) - impl.Dgebrd(m, n, a, lda, s, nil, nil, nil, work, -1) - lwork_dgebrd = int(work[0]) - maxwrk = 3*m + lwork_dgebrd - if wantvs || wantvo { - impl.Dorgbr(lapack.GeneratePT, m, n, m, a, n, nil, work, -1) - lwork_dorgbr_p = int(work[0]) - maxwrk = max(maxwrk, 3*m+lwork_dorgbr_p) - } - if wantva { - impl.Dorgbr(lapack.GeneratePT, n, n, m, a, n, nil, work, -1) - lwork_dorgbr_p = int(work[0]) - maxwrk = max(maxwrk, 3*m+lwork_dorgbr_p) - } - if !wantun { - maxwrk = max(maxwrk, 3*m+lwork_dorgbr_q) - } - maxwrk = max(maxwrk, bdspac) - } - } - - maxwrk = max(maxwrk, minwork) - if lwork == -1 { - work[0] = float64(maxwrk) - return true - } - - if len(a) < (m-1)*lda+n { - panic(shortA) - } - if len(s) < minmn { - panic(shortS) - } - if (len(u) < (m-1)*ldu+m && wantua) || (len(u) < (m-1)*ldu+minmn && wantus) { - panic(shortU) - } - if (len(vt) < (n-1)*ldvt+n && wantva) || (len(vt) < (minmn-1)*ldvt+n && wantvs) { - panic(shortVT) - } - - // Perform decomposition. - eps := dlamchE - smlnum := math.Sqrt(dlamchS) / eps - bignum := 1 / smlnum - - // Scale A if max element outside range [smlnum, bignum]. - anrm := impl.Dlange(lapack.MaxAbs, m, n, a, lda, nil) - var iscl bool - if anrm > 0 && anrm < smlnum { - iscl = true - impl.Dlascl(lapack.General, 0, 0, anrm, smlnum, m, n, a, lda) - } else if anrm > bignum { - iscl = true - impl.Dlascl(lapack.General, 0, 0, anrm, bignum, m, n, a, lda) - } - - bi := blas64.Implementation() - var ie int - if m >= n { - // If A has sufficiently more rows than columns, use the QR decomposition. - if m >= mnthr { - // m >> n - if wantun { - // Path 1. - itau := 0 - iwork := itau + n - - // Compute A = Q * R. - impl.Dgeqrf(m, n, a, lda, work[itau:], work[iwork:], lwork-iwork) - - // Zero out below R. - impl.Dlaset(blas.Lower, n-1, n-1, 0, 0, a[lda:], lda) - ie = 0 - itauq := ie + n - itaup := itauq + n - iwork = itaup + n - // Bidiagonalize R in A. - impl.Dgebrd(n, n, a, lda, s, work[ie:], work[itauq:], - work[itaup:], work[iwork:], lwork-iwork) - ncvt := 0 - if wantvo || wantvas { - impl.Dorgbr(lapack.GeneratePT, n, n, n, a, lda, work[itaup:], - work[iwork:], lwork-iwork) - ncvt = n - } - iwork = ie + n - - // Perform bidiagonal QR iteration computing right singular vectors - // of A in A if desired. - ok = impl.Dbdsqr(blas.Upper, n, ncvt, 0, 0, s, work[ie:], - a, lda, work, 1, work, 1, work[iwork:]) - - // If right singular vectors desired in VT, copy them there. - if wantvas { - impl.Dlacpy(blas.All, n, n, a, lda, vt, ldvt) - } - } else if wantuo && wantvn { - // Path 2 - panic(noSVDO) - } else if wantuo && wantvas { - // Path 3 - panic(noSVDO) - } else if wantus { - if wantvn { - // Path 4 - if lwork >= n*n+max(4*n, bdspac) { - // Sufficient workspace for a fast algorithm. - ir := 0 - var ldworkr int - if lwork >= wrkbl+lda*n { - ldworkr = lda - } else { - ldworkr = n - } - itau := ir + ldworkr*n - iwork := itau + n - // Compute A = Q * R. - impl.Dgeqrf(m, n, a, lda, work[itau:], work[iwork:], lwork-iwork) - - // Copy R to work[ir:], zeroing out below it. - impl.Dlacpy(blas.Upper, n, n, a, lda, work[ir:], ldworkr) - impl.Dlaset(blas.Lower, n-1, n-1, 0, 0, work[ir+ldworkr:], ldworkr) - - // Generate Q in A. - impl.Dorgqr(m, n, n, a, lda, work[itau:], work[iwork:], lwork-iwork) - ie := itau - itauq := ie + n - itaup := itauq + n - iwork = itaup + n - - // Bidiagonalize R in work[ir:]. - impl.Dgebrd(n, n, work[ir:], ldworkr, s, work[ie:], - work[itauq:], work[itaup:], work[iwork:], lwork-iwork) - - // Generate left vectors bidiagonalizing R in work[ir:]. - impl.Dorgbr(lapack.GenerateQ, n, n, n, work[ir:], ldworkr, - work[itauq:], work[iwork:], lwork-iwork) - iwork = ie + n - - // Perform bidiagonal QR iteration, compuing left singular - // vectors of R in work[ir:]. - ok = impl.Dbdsqr(blas.Upper, n, 0, n, 0, s, work[ie:], work, 1, - work[ir:], ldworkr, work, 1, work[iwork:]) - - // Multiply Q in A by left singular vectors of R in - // work[ir:], storing result in U. - bi.Dgemm(blas.NoTrans, blas.NoTrans, m, n, n, 1, a, lda, - work[ir:], ldworkr, 0, u, ldu) - } else { - // Insufficient workspace for a fast algorithm. - itau := 0 - iwork := itau + n - - // Compute A = Q*R, copying result to U. - impl.Dgeqrf(m, n, a, lda, work[itau:], work[iwork:], lwork-iwork) - impl.Dlacpy(blas.Lower, m, n, a, lda, u, ldu) - - // Generate Q in U. - impl.Dorgqr(m, n, n, u, ldu, work[itau:], work[iwork:], lwork-iwork) - ie := itau - itauq := ie + n - itaup := itauq + n - iwork = itaup + n - - // Zero out below R in A. - impl.Dlaset(blas.Lower, n-1, n-1, 0, 0, a[lda:], lda) - - // Bidiagonalize R in A. - impl.Dgebrd(n, n, a, lda, s, work[ie:], - work[itauq:], work[itaup:], work[iwork:], lwork-iwork) - - // Multiply Q in U by left vectors bidiagonalizing R. - impl.Dormbr(lapack.ApplyQ, blas.Right, blas.NoTrans, m, n, n, - a, lda, work[itauq:], u, ldu, work[iwork:], lwork-iwork) - iwork = ie + n - - // Perform bidiagonal QR iteration, computing left - // singular vectors of A in U. - ok = impl.Dbdsqr(blas.Upper, n, 0, m, 0, s, work[ie:], work, 1, - u, ldu, work, 1, work[iwork:]) - } - } else if wantvo { - // Path 5 - panic(noSVDO) - } else if wantvas { - // Path 6 - if lwork >= n*n+max(4*n, bdspac) { - // Sufficient workspace for a fast algorithm. - iu := 0 - var ldworku int - if lwork >= wrkbl+lda*n { - ldworku = lda - } else { - ldworku = n - } - itau := iu + ldworku*n - iwork := itau + n - - // Compute A = Q * R. - impl.Dgeqrf(m, n, a, lda, work[itau:], work[iwork:], lwork-iwork) - // Copy R to work[iu:], zeroing out below it. - impl.Dlacpy(blas.Upper, n, n, a, lda, work[iu:], ldworku) - impl.Dlaset(blas.Lower, n-1, n-1, 0, 0, work[iu+ldworku:], ldworku) - - // Generate Q in A. - impl.Dorgqr(m, n, n, a, lda, work[itau:], work[iwork:], lwork-iwork) - - ie := itau - itauq := ie + n - itaup := itauq + n - iwork = itaup + n - - // Bidiagonalize R in work[iu:], copying result to VT. - impl.Dgebrd(n, n, work[iu:], ldworku, s, work[ie:], - work[itauq:], work[itaup:], work[iwork:], lwork-iwork) - impl.Dlacpy(blas.Upper, n, n, work[iu:], ldworku, vt, ldvt) - - // Generate left bidiagonalizing vectors in work[iu:]. - impl.Dorgbr(lapack.GenerateQ, n, n, n, work[iu:], ldworku, - work[itauq:], work[iwork:], lwork-iwork) - - // Generate right bidiagonalizing vectors in VT. - impl.Dorgbr(lapack.GeneratePT, n, n, n, vt, ldvt, - work[itaup:], work[iwork:], lwork-iwork) - iwork = ie + n - - // Perform bidiagonal QR iteration, computing left singular - // vectors of R in work[iu:], and computing right singular - // vectors of R in VT. - ok = impl.Dbdsqr(blas.Upper, n, n, n, 0, s, work[ie:], - vt, ldvt, work[iu:], ldworku, work, 1, work[iwork:]) - - // Multiply Q in A by left singular vectors of R in - // work[iu:], storing result in U. - bi.Dgemm(blas.NoTrans, blas.NoTrans, m, n, n, 1, a, lda, - work[iu:], ldworku, 0, u, ldu) - } else { - // Insufficient workspace for a fast algorithm. - itau := 0 - iwork := itau + n - - // Compute A = Q * R, copying result to U. - impl.Dgeqrf(m, n, a, lda, work[itau:], work[iwork:], lwork-iwork) - impl.Dlacpy(blas.Lower, m, n, a, lda, u, ldu) - - // Generate Q in U. - impl.Dorgqr(m, n, n, u, ldu, work[itau:], work[iwork:], lwork-iwork) - - // Copy R to VT, zeroing out below it. - impl.Dlacpy(blas.Upper, n, n, a, lda, vt, ldvt) - impl.Dlaset(blas.Lower, n-1, n-1, 0, 0, vt[ldvt:], ldvt) - - ie := itau - itauq := ie + n - itaup := itauq + n - iwork = itaup + n - - // Bidiagonalize R in VT. - impl.Dgebrd(n, n, vt, ldvt, s, work[ie:], - work[itauq:], work[itaup:], work[iwork:], lwork-iwork) - - // Multiply Q in U by left bidiagonalizing vectors in VT. - impl.Dormbr(lapack.ApplyQ, blas.Right, blas.NoTrans, m, n, n, - vt, ldvt, work[itauq:], u, ldu, work[iwork:], lwork-iwork) - - // Generate right bidiagonalizing vectors in VT. - impl.Dorgbr(lapack.GeneratePT, n, n, n, vt, ldvt, - work[itaup:], work[iwork:], lwork-iwork) - iwork = ie + n - - // Perform bidiagonal QR iteration, computing left singular - // vectors of A in U and computing right singular vectors - // of A in VT. - ok = impl.Dbdsqr(blas.Upper, n, n, m, 0, s, work[ie:], - vt, ldvt, u, ldu, work, 1, work[iwork:]) - } - } - } else if wantua { - if wantvn { - // Path 7 - if lwork >= n*n+max(max(n+m, 4*n), bdspac) { - // Sufficient workspace for a fast algorithm. - ir := 0 - var ldworkr int - if lwork >= wrkbl+lda*n { - ldworkr = lda - } else { - ldworkr = n - } - itau := ir + ldworkr*n - iwork := itau + n - - // Compute A = Q*R, copying result to U. - impl.Dgeqrf(m, n, a, lda, work[itau:], work[iwork:], lwork-iwork) - impl.Dlacpy(blas.Lower, m, n, a, lda, u, ldu) - - // Copy R to work[ir:], zeroing out below it. - impl.Dlacpy(blas.Upper, n, n, a, lda, work[ir:], ldworkr) - impl.Dlaset(blas.Lower, n-1, n-1, 0, 0, work[ir+ldworkr:], ldworkr) - - // Generate Q in U. - impl.Dorgqr(m, m, n, u, ldu, work[itau:], work[iwork:], lwork-iwork) - ie := itau - itauq := ie + n - itaup := itauq + n - iwork = itaup + n - - // Bidiagonalize R in work[ir:]. - impl.Dgebrd(n, n, work[ir:], ldworkr, s, work[ie:], - work[itauq:], work[itaup:], work[iwork:], lwork-iwork) - - // Generate left bidiagonalizing vectors in work[ir:]. - impl.Dorgbr(lapack.GenerateQ, n, n, n, work[ir:], ldworkr, - work[itauq:], work[iwork:], lwork-iwork) - iwork = ie + n - - // Perform bidiagonal QR iteration, computing left singular - // vectors of R in work[ir:]. - ok = impl.Dbdsqr(blas.Upper, n, 0, n, 0, s, work[ie:], work, 1, - work[ir:], ldworkr, work, 1, work[iwork:]) - - // Multiply Q in U by left singular vectors of R in - // work[ir:], storing result in A. - bi.Dgemm(blas.NoTrans, blas.NoTrans, m, n, n, 1, u, ldu, - work[ir:], ldworkr, 0, a, lda) - - // Copy left singular vectors of A from A to U. - impl.Dlacpy(blas.All, m, n, a, lda, u, ldu) - } else { - // Insufficient workspace for a fast algorithm. - itau := 0 - iwork := itau + n - - // Compute A = Q*R, copying result to U. - impl.Dgeqrf(m, n, a, lda, work[itau:], work[iwork:], lwork-iwork) - impl.Dlacpy(blas.Lower, m, n, a, lda, u, ldu) - - // Generate Q in U. - impl.Dorgqr(m, m, n, u, ldu, work[itau:], work[iwork:], lwork-iwork) - ie := itau - itauq := ie + n - itaup := itauq + n - iwork = itaup + n - - // Zero out below R in A. - impl.Dlaset(blas.Lower, n-1, n-1, 0, 0, a[lda:], lda) - - // Bidiagonalize R in A. - impl.Dgebrd(n, n, a, lda, s, work[ie:], - work[itauq:], work[itaup:], work[iwork:], lwork-iwork) - - // Multiply Q in U by left bidiagonalizing vectors in A. - impl.Dormbr(lapack.ApplyQ, blas.Right, blas.NoTrans, m, n, n, - a, lda, work[itauq:], u, ldu, work[iwork:], lwork-iwork) - iwork = ie + n - - // Perform bidiagonal QR iteration, computing left - // singular vectors of A in U. - ok = impl.Dbdsqr(blas.Upper, n, 0, m, 0, s, work[ie:], - work, 1, u, ldu, work, 1, work[iwork:]) - } - } else if wantvo { - // Path 8. - panic(noSVDO) - } else if wantvas { - // Path 9. - if lwork >= n*n+max(max(n+m, 4*n), bdspac) { - // Sufficient workspace for a fast algorithm. - iu := 0 - var ldworku int - if lwork >= wrkbl+lda*n { - ldworku = lda - } else { - ldworku = n - } - itau := iu + ldworku*n - iwork := itau + n - - // Compute A = Q * R, copying result to U. - impl.Dgeqrf(m, n, a, lda, work[itau:], work[iwork:], lwork-iwork) - impl.Dlacpy(blas.Lower, m, n, a, lda, u, ldu) - - // Generate Q in U. - impl.Dorgqr(m, m, n, u, ldu, work[itau:], work[iwork:], lwork-iwork) - - // Copy R to work[iu:], zeroing out below it. - impl.Dlacpy(blas.Upper, n, n, a, lda, work[iu:], ldworku) - impl.Dlaset(blas.Lower, n-1, n-1, 0, 0, work[iu+ldworku:], ldworku) - - ie = itau - itauq := ie + n - itaup := itauq + n - iwork = itaup + n - - // Bidiagonalize R in work[iu:], copying result to VT. - impl.Dgebrd(n, n, work[iu:], ldworku, s, work[ie:], - work[itauq:], work[itaup:], work[iwork:], lwork-iwork) - impl.Dlacpy(blas.Upper, n, n, work[iu:], ldworku, vt, ldvt) - - // Generate left bidiagonalizing vectors in work[iu:]. - impl.Dorgbr(lapack.GenerateQ, n, n, n, work[iu:], ldworku, - work[itauq:], work[iwork:], lwork-iwork) - - // Generate right bidiagonalizing vectors in VT. - impl.Dorgbr(lapack.GeneratePT, n, n, n, vt, ldvt, - work[itaup:], work[iwork:], lwork-iwork) - iwork = ie + n - - // Perform bidiagonal QR iteration, computing left singular - // vectors of R in work[iu:] and computing right - // singular vectors of R in VT. - ok = impl.Dbdsqr(blas.Upper, n, n, n, 0, s, work[ie:], - vt, ldvt, work[iu:], ldworku, work, 1, work[iwork:]) - - // Multiply Q in U by left singular vectors of R in - // work[iu:], storing result in A. - bi.Dgemm(blas.NoTrans, blas.NoTrans, m, n, n, 1, - u, ldu, work[iu:], ldworku, 0, a, lda) - - // Copy left singular vectors of A from A to U. - impl.Dlacpy(blas.All, m, n, a, lda, u, ldu) - - /* - // Bidiagonalize R in VT. - impl.Dgebrd(n, n, vt, ldvt, s, work[ie:], - work[itauq:], work[itaup:], work[iwork:], lwork-iwork) - - // Multiply Q in U by left bidiagonalizing vectors in VT. - impl.Dormbr(lapack.ApplyQ, blas.Right, blas.NoTrans, - m, n, n, vt, ldvt, work[itauq:], u, ldu, work[iwork:], lwork-iwork) - - // Generate right bidiagonalizing vectors in VT. - impl.Dorgbr(lapack.GeneratePT, n, n, n, vt, ldvt, - work[itaup:], work[iwork:], lwork-iwork) - iwork = ie + n - - // Perform bidiagonal QR iteration, computing left singular - // vectors of A in U and computing right singular vectors - // of A in VT. - ok = impl.Dbdsqr(blas.Upper, n, n, m, 0, s, work[ie:], - vt, ldvt, u, ldu, work, 1, work[iwork:]) - */ - } else { - // Insufficient workspace for a fast algorithm. - itau := 0 - iwork := itau + n - - // Compute A = Q*R, copying result to U. - impl.Dgeqrf(m, n, a, lda, work[itau:], work[iwork:], lwork-iwork) - impl.Dlacpy(blas.Lower, m, n, a, lda, u, ldu) - - // Generate Q in U. - impl.Dorgqr(m, m, n, u, ldu, work[itau:], work[iwork:], lwork-iwork) - - // Copy R from A to VT, zeroing out below it. - impl.Dlacpy(blas.Upper, n, n, a, lda, vt, ldvt) - if n > 1 { - impl.Dlaset(blas.Lower, n-1, n-1, 0, 0, vt[ldvt:], ldvt) - } - - ie := itau - itauq := ie + n - itaup := itauq + n - iwork = itaup + n - - // Bidiagonalize R in VT. - impl.Dgebrd(n, n, vt, ldvt, s, work[ie:], - work[itauq:], work[itaup:], work[iwork:], lwork-iwork) - - // Multiply Q in U by left bidiagonalizing vectors in VT. - impl.Dormbr(lapack.ApplyQ, blas.Right, blas.NoTrans, - m, n, n, vt, ldvt, work[itauq:], u, ldu, work[iwork:], lwork-iwork) - - // Generate right bidiagonizing vectors in VT. - impl.Dorgbr(lapack.GeneratePT, n, n, n, vt, ldvt, - work[itaup:], work[iwork:], lwork-iwork) - iwork = ie + n - - // Perform bidiagonal QR iteration, computing left singular - // vectors of A in U and computing right singular vectors - // of A in VT. - ok = impl.Dbdsqr(blas.Upper, n, n, m, 0, s, work[ie:], - vt, ldvt, u, ldu, work, 1, work[iwork:]) - } - } - } - } else { - // Path 10. - // M at least N, but not much larger. - ie = 0 - itauq := ie + n - itaup := itauq + n - iwork := itaup + n - - // Bidiagonalize A. - impl.Dgebrd(m, n, a, lda, s, work[ie:], work[itauq:], - work[itaup:], work[iwork:], lwork-iwork) - if wantuas { - // Left singular vectors are desired in U. Copy result to U and - // generate left biadiagonalizing vectors in U. - impl.Dlacpy(blas.Lower, m, n, a, lda, u, ldu) - var ncu int - if wantus { - ncu = n - } - if wantua { - ncu = m - } - impl.Dorgbr(lapack.GenerateQ, m, ncu, n, u, ldu, work[itauq:], work[iwork:], lwork-iwork) - } - if wantvas { - // Right singular vectors are desired in VT. Copy result to VT and - // generate left biadiagonalizing vectors in VT. - impl.Dlacpy(blas.Upper, n, n, a, lda, vt, ldvt) - impl.Dorgbr(lapack.GeneratePT, n, n, n, vt, ldvt, work[itaup:], work[iwork:], lwork-iwork) - } - if wantuo { - panic(noSVDO) - } - if wantvo { - panic(noSVDO) - } - iwork = ie + n - var nru, ncvt int - if wantuas || wantuo { - nru = m - } - if wantun { - nru = 0 - } - if wantvas || wantvo { - ncvt = n - } - if wantvn { - ncvt = 0 - } - if !wantuo && !wantvo { - // Perform bidiagonal QR iteration, if desired, computing left - // singular vectors in U and right singular vectors in VT. - ok = impl.Dbdsqr(blas.Upper, n, ncvt, nru, 0, s, work[ie:], - vt, ldvt, u, ldu, work, 1, work[iwork:]) - } else { - // There will be two branches when the implementation is complete. - panic(noSVDO) - } - } - } else { - // A has more columns than rows. If A has sufficiently more columns than - // rows, first reduce using the LQ decomposition. - if n >= mnthr { - // n >> m. - if wantvn { - // Path 1t. - itau := 0 - iwork := itau + m - - // Compute A = L*Q. - impl.Dgelqf(m, n, a, lda, work[itau:], work[iwork:], lwork-iwork) - - // Zero out above L. - impl.Dlaset(blas.Upper, m-1, m-1, 0, 0, a[1:], lda) - ie := 0 - itauq := ie + m - itaup := itauq + m - iwork = itaup + m - - // Bidiagonalize L in A. - impl.Dgebrd(m, m, a, lda, s, work[ie:itauq], - work[itauq:itaup], work[itaup:iwork], work[iwork:], lwork-iwork) - if wantuo || wantuas { - impl.Dorgbr(lapack.GenerateQ, m, m, m, a, lda, - work[itauq:], work[iwork:], lwork-iwork) - } - iwork = ie + m - nru := 0 - if wantuo || wantuas { - nru = m - } - - // Perform bidiagonal QR iteration, computing left singular vectors - // of A in A if desired. - ok = impl.Dbdsqr(blas.Upper, m, 0, nru, 0, s, work[ie:], - work, 1, a, lda, work, 1, work[iwork:]) - - // If left singular vectors desired in U, copy them there. - if wantuas { - impl.Dlacpy(blas.All, m, m, a, lda, u, ldu) - } - } else if wantvo && wantun { - // Path 2t. - panic(noSVDO) - } else if wantvo && wantuas { - // Path 3t. - panic(noSVDO) - } else if wantvs { - if wantun { - // Path 4t. - if lwork >= m*m+max(4*m, bdspac) { - // Sufficient workspace for a fast algorithm. - ir := 0 - var ldworkr int - if lwork >= wrkbl+lda*m { - ldworkr = lda - } else { - ldworkr = m - } - itau := ir + ldworkr*m - iwork := itau + m - - // Compute A = L*Q. - impl.Dgelqf(m, n, a, lda, work[itau:], work[iwork:], lwork-iwork) - - // Copy L to work[ir:], zeroing out above it. - impl.Dlacpy(blas.Lower, m, m, a, lda, work[ir:], ldworkr) - impl.Dlaset(blas.Upper, m-1, m-1, 0, 0, work[ir+1:], ldworkr) - - // Generate Q in A. - impl.Dorglq(m, n, m, a, lda, work[itau:], work[iwork:], lwork-iwork) - ie := itau - itauq := ie + m - itaup := itauq + m - iwork = itaup + m - - // Bidiagonalize L in work[ir:]. - impl.Dgebrd(m, m, work[ir:], ldworkr, s, work[ie:], - work[itauq:], work[itaup:], work[iwork:], lwork-iwork) - - // Generate right vectors bidiagonalizing L in work[ir:]. - impl.Dorgbr(lapack.GeneratePT, m, m, m, work[ir:], ldworkr, - work[itaup:], work[iwork:], lwork-iwork) - iwork = ie + m - - // Perform bidiagonal QR iteration, computing right singular - // vectors of L in work[ir:]. - ok = impl.Dbdsqr(blas.Upper, m, m, 0, 0, s, work[ie:], - work[ir:], ldworkr, work, 1, work, 1, work[iwork:]) - - // Multiply right singular vectors of L in work[ir:] by - // Q in A, storing result in VT. - bi.Dgemm(blas.NoTrans, blas.NoTrans, m, n, m, 1, - work[ir:], ldworkr, a, lda, 0, vt, ldvt) - } else { - // Insufficient workspace for a fast algorithm. - itau := 0 - iwork := itau + m - - // Compute A = L*Q. - impl.Dgelqf(m, n, a, lda, work[itau:], work[iwork:], lwork-iwork) - - // Copy result to VT. - impl.Dlacpy(blas.Upper, m, n, a, lda, vt, ldvt) - - // Generate Q in VT. - impl.Dorglq(m, n, m, vt, ldvt, work[itau:], work[iwork:], lwork-iwork) - ie := itau - itauq := ie + m - itaup := itauq + m - iwork = itaup + m - - // Zero out above L in A. - impl.Dlaset(blas.Upper, m-1, m-1, 0, 0, a[1:], lda) - - // Bidiagonalize L in A. - impl.Dgebrd(m, m, a, lda, s, work[ie:], - work[itauq:], work[itaup:], work[iwork:], lwork-iwork) - - // Multiply right vectors bidiagonalizing L by Q in VT. - impl.Dormbr(lapack.ApplyP, blas.Left, blas.Trans, m, n, m, - a, lda, work[itaup:], vt, ldvt, work[iwork:], lwork-iwork) - iwork = ie + m - - // Perform bidiagonal QR iteration, computing right - // singular vectors of A in VT. - ok = impl.Dbdsqr(blas.Upper, m, n, 0, 0, s, work[ie:], - vt, ldvt, work, 1, work, 1, work[iwork:]) - } - } else if wantuo { - // Path 5t. - panic(noSVDO) - } else if wantuas { - // Path 6t. - if lwork >= m*m+max(4*m, bdspac) { - // Sufficient workspace for a fast algorithm. - iu := 0 - var ldworku int - if lwork >= wrkbl+lda*m { - ldworku = lda - } else { - ldworku = m - } - itau := iu + ldworku*m - iwork := itau + m - - // Compute A = L*Q. - impl.Dgelqf(m, n, a, lda, work[itau:], work[iwork:], lwork-iwork) - - // Copy L to work[iu:], zeroing out above it. - impl.Dlacpy(blas.Lower, m, m, a, lda, work[iu:], ldworku) - impl.Dlaset(blas.Upper, m-1, m-1, 0, 0, work[iu+1:], ldworku) - - // Generate Q in A. - impl.Dorglq(m, n, m, a, lda, work[itau:], work[iwork:], lwork-iwork) - ie := itau - itauq := ie + m - itaup := itauq + m - iwork = itaup + m - - // Bidiagonalize L in work[iu:], copying result to U. - impl.Dgebrd(m, m, work[iu:], ldworku, s, work[ie:], - work[itauq:], work[itaup:], work[iwork:], lwork-iwork) - impl.Dlacpy(blas.Lower, m, m, work[iu:], ldworku, u, ldu) - - // Generate right bidiagionalizing vectors in work[iu:]. - impl.Dorgbr(lapack.GeneratePT, m, m, m, work[iu:], ldworku, - work[itaup:], work[iwork:], lwork-iwork) - - // Generate left bidiagonalizing vectors in U. - impl.Dorgbr(lapack.GenerateQ, m, m, m, u, ldu, work[itauq:], work[iwork:], lwork-iwork) - iwork = ie + m - - // Perform bidiagonal QR iteration, computing left singular - // vectors of L in U and computing right singular vectors of - // L in work[iu:]. - ok = impl.Dbdsqr(blas.Upper, m, m, m, 0, s, work[ie:], - work[iu:], ldworku, u, ldu, work, 1, work[iwork:]) - - // Multiply right singular vectors of L in work[iu:] by - // Q in A, storing result in VT. - bi.Dgemm(blas.NoTrans, blas.NoTrans, m, n, m, 1, - work[iu:], ldworku, a, lda, 0, vt, ldvt) - } else { - // Insufficient workspace for a fast algorithm. - itau := 0 - iwork := itau + m - - // Compute A = L*Q, copying result to VT. - impl.Dgelqf(m, n, a, lda, work[itau:], work[iwork:], lwork-iwork) - impl.Dlacpy(blas.Upper, m, n, a, lda, vt, ldvt) - - // Generate Q in VT. - impl.Dorglq(m, n, m, vt, ldvt, work[itau:], work[iwork:], lwork-iwork) - - // Copy L to U, zeroing out above it. - impl.Dlacpy(blas.Lower, m, m, a, lda, u, ldu) - impl.Dlaset(blas.Upper, m-1, m-1, 0, 0, u[1:], ldu) - - ie := itau - itauq := ie + m - itaup := itauq + m - iwork = itaup + m - - // Bidiagonalize L in U. - impl.Dgebrd(m, m, u, ldu, s, work[ie:], - work[itauq:], work[itaup:], work[iwork:], lwork-iwork) - - // Multiply right bidiagonalizing vectors in U by Q in VT. - impl.Dormbr(lapack.ApplyP, blas.Left, blas.Trans, m, n, m, - u, ldu, work[itaup:], vt, ldvt, work[iwork:], lwork-iwork) - - // Generate left bidiagonalizing vectors in U. - impl.Dorgbr(lapack.GenerateQ, m, m, m, u, ldu, work[itauq:], work[iwork:], lwork-iwork) - iwork = ie + m - - // Perform bidiagonal QR iteration, computing left singular - // vectors of A in U and computing right singular vectors - // of A in VT. - ok = impl.Dbdsqr(blas.Upper, m, n, m, 0, s, work[ie:], vt, ldvt, - u, ldu, work, 1, work[iwork:]) - } - } - } else if wantva { - if wantun { - // Path 7t. - if lwork >= m*m+max(max(n+m, 4*m), bdspac) { - // Sufficient workspace for a fast algorithm. - ir := 0 - var ldworkr int - if lwork >= wrkbl+lda*m { - ldworkr = lda - } else { - ldworkr = m - } - itau := ir + ldworkr*m - iwork := itau + m - - // Compute A = L*Q, copying result to VT. - impl.Dgelqf(m, n, a, lda, work[itau:], work[iwork:], lwork-iwork) - impl.Dlacpy(blas.Upper, m, n, a, lda, vt, ldvt) - - // Copy L to work[ir:], zeroing out above it. - impl.Dlacpy(blas.Lower, m, m, a, lda, work[ir:], ldworkr) - impl.Dlaset(blas.Upper, m-1, m-1, 0, 0, work[ir+1:], ldworkr) - - // Generate Q in VT. - impl.Dorglq(n, n, m, vt, ldvt, work[itau:], work[iwork:], lwork-iwork) - - ie := itau - itauq := ie + m - itaup := itauq + m - iwork = itaup + m - - // Bidiagonalize L in work[ir:]. - impl.Dgebrd(m, m, work[ir:], ldworkr, s, work[ie:], - work[itauq:], work[itaup:], work[iwork:], lwork-iwork) - - // Generate right bidiagonalizing vectors in work[ir:]. - impl.Dorgbr(lapack.GeneratePT, m, m, m, work[ir:], ldworkr, - work[itaup:], work[iwork:], lwork-iwork) - iwork = ie + m - - // Perform bidiagonal QR iteration, computing right - // singular vectors of L in work[ir:]. - ok = impl.Dbdsqr(blas.Upper, m, m, 0, 0, s, work[ie:], - work[ir:], ldworkr, work, 1, work, 1, work[iwork:]) - - // Multiply right singular vectors of L in work[ir:] by - // Q in VT, storing result in A. - bi.Dgemm(blas.NoTrans, blas.NoTrans, m, n, m, 1, - work[ir:], ldworkr, vt, ldvt, 0, a, lda) - - // Copy right singular vectors of A from A to VT. - impl.Dlacpy(blas.All, m, n, a, lda, vt, ldvt) - } else { - // Insufficient workspace for a fast algorithm. - itau := 0 - iwork := itau + m - // Compute A = L * Q, copying result to VT. - impl.Dgelqf(m, n, a, lda, work[itau:], work[iwork:], lwork-iwork) - impl.Dlacpy(blas.Upper, m, n, a, lda, vt, ldvt) - - // Generate Q in VT. - impl.Dorglq(n, n, m, vt, ldvt, work[itau:], work[iwork:], lwork-iwork) - - ie := itau - itauq := ie + m - itaup := itauq + m - iwork = itaup + m - - // Zero out above L in A. - impl.Dlaset(blas.Upper, m-1, m-1, 0, 0, a[1:], lda) - - // Bidiagonalize L in A. - impl.Dgebrd(m, m, a, lda, s, work[ie:], work[itauq:], - work[itaup:], work[iwork:], lwork-iwork) - - // Multiply right bidiagonalizing vectors in A by Q in VT. - impl.Dormbr(lapack.ApplyP, blas.Left, blas.Trans, m, n, m, - a, lda, work[itaup:], vt, ldvt, work[iwork:], lwork-iwork) - iwork = ie + m - - // Perform bidiagonal QR iteration, computing right singular - // vectors of A in VT. - ok = impl.Dbdsqr(blas.Upper, m, n, 0, 0, s, work[ie:], - vt, ldvt, work, 1, work, 1, work[iwork:]) - } - } else if wantuo { - panic(noSVDO) - } else if wantuas { - // Path 9t. - if lwork >= m*m+max(max(m+n, 4*m), bdspac) { - // Sufficient workspace for a fast algorithm. - iu := 0 - - var ldworku int - if lwork >= wrkbl+lda*m { - ldworku = lda - } else { - ldworku = m - } - itau := iu + ldworku*m - iwork := itau + m - - // Generate A = L * Q copying result to VT. - impl.Dgelqf(m, n, a, lda, work[itau:], work[iwork:], lwork-iwork) - impl.Dlacpy(blas.Upper, m, n, a, lda, vt, ldvt) - - // Generate Q in VT. - impl.Dorglq(n, n, m, vt, ldvt, work[itau:], work[iwork:], lwork-iwork) - - // Copy L to work[iu:], zeroing out above it. - impl.Dlacpy(blas.Lower, m, m, a, lda, work[iu:], ldworku) - impl.Dlaset(blas.Upper, m-1, m-1, 0, 0, work[iu+1:], ldworku) - ie = itau - itauq := ie + m - itaup := itauq + m - iwork = itaup + m - - // Bidiagonalize L in work[iu:], copying result to U. - impl.Dgebrd(m, m, work[iu:], ldworku, s, work[ie:], - work[itauq:], work[itaup:], work[iwork:], lwork-iwork) - impl.Dlacpy(blas.Lower, m, m, work[iu:], ldworku, u, ldu) - - // Generate right bidiagonalizing vectors in work[iu:]. - impl.Dorgbr(lapack.GeneratePT, m, m, m, work[iu:], ldworku, - work[itaup:], work[iwork:], lwork-iwork) - - // Generate left bidiagonalizing vectors in U. - impl.Dorgbr(lapack.GenerateQ, m, m, m, u, ldu, work[itauq:], work[iwork:], lwork-iwork) - iwork = ie + m - - // Perform bidiagonal QR iteration, computing left singular - // vectors of L in U and computing right singular vectors - // of L in work[iu:]. - ok = impl.Dbdsqr(blas.Upper, m, m, m, 0, s, work[ie:], - work[iu:], ldworku, u, ldu, work, 1, work[iwork:]) - - // Multiply right singular vectors of L in work[iu:] - // Q in VT, storing result in A. - bi.Dgemm(blas.NoTrans, blas.NoTrans, m, n, m, 1, - work[iu:], ldworku, vt, ldvt, 0, a, lda) - - // Copy right singular vectors of A from A to VT. - impl.Dlacpy(blas.All, m, n, a, lda, vt, ldvt) - } else { - // Insufficient workspace for a fast algorithm. - itau := 0 - iwork := itau + m - - // Compute A = L * Q, copying result to VT. - impl.Dgelqf(m, n, a, lda, work[itau:], work[iwork:], lwork-iwork) - impl.Dlacpy(blas.Upper, m, n, a, lda, vt, ldvt) - - // Generate Q in VT. - impl.Dorglq(n, n, m, vt, ldvt, work[itau:], work[iwork:], lwork-iwork) - - // Copy L to U, zeroing out above it. - impl.Dlacpy(blas.Lower, m, m, a, lda, u, ldu) - impl.Dlaset(blas.Upper, m-1, m-1, 0, 0, u[1:], ldu) - - ie = itau - itauq := ie + m - itaup := itauq + m - iwork = itaup + m - - // Bidiagonalize L in U. - impl.Dgebrd(m, m, u, ldu, s, work[ie:], work[itauq:], - work[itaup:], work[iwork:], lwork-iwork) - - // Multiply right bidiagonalizing vectors in U by Q in VT. - impl.Dormbr(lapack.ApplyP, blas.Left, blas.Trans, m, n, m, - u, ldu, work[itaup:], vt, ldvt, work[iwork:], lwork-iwork) - - // Generate left bidiagonalizing vectors in U. - impl.Dorgbr(lapack.GenerateQ, m, m, m, u, ldu, work[itauq:], work[iwork:], lwork-iwork) - iwork = ie + m - - // Perform bidiagonal QR iteration, computing left singular - // vectors of A in U and computing right singular vectors - // of A in VT. - ok = impl.Dbdsqr(blas.Upper, m, n, m, 0, s, work[ie:], - vt, ldvt, u, ldu, work, 1, work[iwork:]) - } - } - } - } else { - // Path 10t. - // N at least M, but not much larger. - ie = 0 - itauq := ie + m - itaup := itauq + m - iwork := itaup + m - - // Bidiagonalize A. - impl.Dgebrd(m, n, a, lda, s, work[ie:], work[itauq:], work[itaup:], work[iwork:], lwork-iwork) - if wantuas { - // If left singular vectors desired in U, copy result to U and - // generate left bidiagonalizing vectors in U. - impl.Dlacpy(blas.Lower, m, m, a, lda, u, ldu) - impl.Dorgbr(lapack.GenerateQ, m, m, n, u, ldu, work[itauq:], work[iwork:], lwork-iwork) - } - if wantvas { - // If right singular vectors desired in VT, copy result to VT - // and generate right bidiagonalizing vectors in VT. - impl.Dlacpy(blas.Upper, m, n, a, lda, vt, ldvt) - var nrvt int - if wantva { - nrvt = n - } else { - nrvt = m - } - impl.Dorgbr(lapack.GeneratePT, nrvt, n, m, vt, ldvt, work[itaup:], work[iwork:], lwork-iwork) - } - if wantuo { - panic(noSVDO) - } - if wantvo { - panic(noSVDO) - } - iwork = ie + m - var nru, ncvt int - if wantuas || wantuo { - nru = m - } - if wantvas || wantvo { - ncvt = n - } - if !wantuo && !wantvo { - // Perform bidiagonal QR iteration, if desired, computing left - // singular vectors in U and computing right singular vectors in - // VT. - ok = impl.Dbdsqr(blas.Lower, m, ncvt, nru, 0, s, work[ie:], - vt, ldvt, u, ldu, work, 1, work[iwork:]) - } else { - // There will be two branches when the implementation is complete. - panic(noSVDO) - } - } - } - if !ok { - if ie > 1 { - for i := 0; i < minmn-1; i++ { - work[i+1] = work[i+ie] - } - } - if ie < 1 { - for i := minmn - 2; i >= 0; i-- { - work[i+1] = work[i+ie] - } - } - } - // Undo scaling if necessary. - if iscl { - if anrm > bignum { - impl.Dlascl(lapack.General, 0, 0, bignum, anrm, 1, minmn, s, minmn) - } - if !ok && anrm > bignum { - impl.Dlascl(lapack.General, 0, 0, bignum, anrm, 1, minmn-1, work[1:], minmn) - } - if anrm < smlnum { - impl.Dlascl(lapack.General, 0, 0, smlnum, anrm, 1, minmn, s, minmn) - } - if !ok && anrm < smlnum { - impl.Dlascl(lapack.General, 0, 0, smlnum, anrm, 1, minmn-1, work[1:], minmn) - } - } - work[0] = float64(maxwrk) - return ok -} diff --git a/vendor/gonum.org/v1/gonum/lapack/gonum/dgetf2.go b/vendor/gonum.org/v1/gonum/lapack/gonum/dgetf2.go deleted file mode 100644 index 63ad72e99e..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/gonum/dgetf2.go +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright ©2015 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import ( - "math" - - "gonum.org/v1/gonum/blas/blas64" -) - -// Dgetf2 computes the LU decomposition of the m×n matrix A. -// The LU decomposition is a factorization of a into -// A = P * L * U -// where P is a permutation matrix, L is a unit lower triangular matrix, and -// U is a (usually) non-unit upper triangular matrix. On exit, L and U are stored -// in place into a. -// -// ipiv is a permutation vector. It indicates that row i of the matrix was -// changed with ipiv[i]. ipiv must have length at least min(m,n), and will panic -// otherwise. ipiv is zero-indexed. -// -// Dgetf2 returns whether the matrix A is singular. The LU decomposition will -// be computed regardless of the singularity of A, but division by zero -// will occur if the false is returned and the result is used to solve a -// system of equations. -// -// Dgetf2 is an internal routine. It is exported for testing purposes. -func (Implementation) Dgetf2(m, n int, a []float64, lda int, ipiv []int) (ok bool) { - mn := min(m, n) - switch { - case m < 0: - panic(mLT0) - case n < 0: - panic(nLT0) - case lda < max(1, n): - panic(badLdA) - } - - // Quick return if possible. - if mn == 0 { - return true - } - - switch { - case len(a) < (m-1)*lda+n: - panic(shortA) - case len(ipiv) != mn: - panic(badLenIpiv) - } - - bi := blas64.Implementation() - - sfmin := dlamchS - ok = true - for j := 0; j < mn; j++ { - // Find a pivot and test for singularity. - jp := j + bi.Idamax(m-j, a[j*lda+j:], lda) - ipiv[j] = jp - if a[jp*lda+j] == 0 { - ok = false - } else { - // Swap the rows if necessary. - if jp != j { - bi.Dswap(n, a[j*lda:], 1, a[jp*lda:], 1) - } - if j < m-1 { - aj := a[j*lda+j] - if math.Abs(aj) >= sfmin { - bi.Dscal(m-j-1, 1/aj, a[(j+1)*lda+j:], lda) - } else { - for i := 0; i < m-j-1; i++ { - a[(j+1)*lda+j] = a[(j+1)*lda+j] / a[lda*j+j] - } - } - } - } - if j < mn-1 { - bi.Dger(m-j-1, n-j-1, -1, a[(j+1)*lda+j:], lda, a[j*lda+j+1:], 1, a[(j+1)*lda+j+1:], lda) - } - } - return ok -} diff --git a/vendor/gonum.org/v1/gonum/lapack/gonum/dgetrf.go b/vendor/gonum.org/v1/gonum/lapack/gonum/dgetrf.go deleted file mode 100644 index ad01e71e4e..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/gonum/dgetrf.go +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright ©2015 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import ( - "gonum.org/v1/gonum/blas" - "gonum.org/v1/gonum/blas/blas64" -) - -// Dgetrf computes the LU decomposition of the m×n matrix A. -// The LU decomposition is a factorization of A into -// A = P * L * U -// where P is a permutation matrix, L is a unit lower triangular matrix, and -// U is a (usually) non-unit upper triangular matrix. On exit, L and U are stored -// in place into a. -// -// ipiv is a permutation vector. It indicates that row i of the matrix was -// changed with ipiv[i]. ipiv must have length at least min(m,n), and will panic -// otherwise. ipiv is zero-indexed. -// -// Dgetrf is the blocked version of the algorithm. -// -// Dgetrf returns whether the matrix A is singular. The LU decomposition will -// be computed regardless of the singularity of A, but division by zero -// will occur if the false is returned and the result is used to solve a -// system of equations. -func (impl Implementation) Dgetrf(m, n int, a []float64, lda int, ipiv []int) (ok bool) { - mn := min(m, n) - switch { - case m < 0: - panic(mLT0) - case n < 0: - panic(nLT0) - case lda < max(1, n): - panic(badLdA) - } - - // Quick return if possible. - if mn == 0 { - return true - } - - switch { - case len(a) < (m-1)*lda+n: - panic(shortA) - case len(ipiv) != mn: - panic(badLenIpiv) - } - - bi := blas64.Implementation() - - nb := impl.Ilaenv(1, "DGETRF", " ", m, n, -1, -1) - if nb <= 1 || mn <= nb { - // Use the unblocked algorithm. - return impl.Dgetf2(m, n, a, lda, ipiv) - } - ok = true - for j := 0; j < mn; j += nb { - jb := min(mn-j, nb) - blockOk := impl.Dgetf2(m-j, jb, a[j*lda+j:], lda, ipiv[j:j+jb]) - if !blockOk { - ok = false - } - for i := j; i <= min(m-1, j+jb-1); i++ { - ipiv[i] = j + ipiv[i] - } - impl.Dlaswp(j, a, lda, j, j+jb-1, ipiv[:j+jb], 1) - if j+jb < n { - impl.Dlaswp(n-j-jb, a[j+jb:], lda, j, j+jb-1, ipiv[:j+jb], 1) - bi.Dtrsm(blas.Left, blas.Lower, blas.NoTrans, blas.Unit, - jb, n-j-jb, 1, - a[j*lda+j:], lda, - a[j*lda+j+jb:], lda) - if j+jb < m { - bi.Dgemm(blas.NoTrans, blas.NoTrans, m-j-jb, n-j-jb, jb, -1, - a[(j+jb)*lda+j:], lda, - a[j*lda+j+jb:], lda, - 1, a[(j+jb)*lda+j+jb:], lda) - } - } - } - return ok -} diff --git a/vendor/gonum.org/v1/gonum/lapack/gonum/dgetri.go b/vendor/gonum.org/v1/gonum/lapack/gonum/dgetri.go deleted file mode 100644 index b2f2ae46b9..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/gonum/dgetri.go +++ /dev/null @@ -1,116 +0,0 @@ -// Copyright ©2015 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import ( - "gonum.org/v1/gonum/blas" - "gonum.org/v1/gonum/blas/blas64" -) - -// Dgetri computes the inverse of the matrix A using the LU factorization computed -// by Dgetrf. On entry, a contains the PLU decomposition of A as computed by -// Dgetrf and on exit contains the reciprocal of the original matrix. -// -// Dgetri will not perform the inversion if the matrix is singular, and returns -// a boolean indicating whether the inversion was successful. -// -// work is temporary storage, and lwork specifies the usable memory length. -// At minimum, lwork >= n and this function will panic otherwise. -// Dgetri is a blocked inversion, but the block size is limited -// by the temporary space available. If lwork == -1, instead of performing Dgetri, -// the optimal work length will be stored into work[0]. -func (impl Implementation) Dgetri(n int, a []float64, lda int, ipiv []int, work []float64, lwork int) (ok bool) { - iws := max(1, n) - switch { - case n < 0: - panic(nLT0) - case lda < max(1, n): - panic(badLdA) - case lwork < iws && lwork != -1: - panic(badLWork) - case len(work) < max(1, lwork): - panic(shortWork) - } - - if n == 0 { - work[0] = 1 - return true - } - - nb := impl.Ilaenv(1, "DGETRI", " ", n, -1, -1, -1) - if lwork == -1 { - work[0] = float64(n * nb) - return true - } - - switch { - case len(a) < (n-1)*lda+n: - panic(shortA) - case len(ipiv) != n: - panic(badLenIpiv) - } - - // Form inv(U). - ok = impl.Dtrtri(blas.Upper, blas.NonUnit, n, a, lda) - if !ok { - return false - } - - nbmin := 2 - if 1 < nb && nb < n { - iws = max(n*nb, 1) - if lwork < iws { - nb = lwork / n - nbmin = max(2, impl.Ilaenv(2, "DGETRI", " ", n, -1, -1, -1)) - } - } - ldwork := nb - - bi := blas64.Implementation() - // Solve the equation inv(A)*L = inv(U) for inv(A). - // TODO(btracey): Replace this with a more row-major oriented algorithm. - if nb < nbmin || n <= nb { - // Unblocked code. - for j := n - 1; j >= 0; j-- { - for i := j + 1; i < n; i++ { - // Copy current column of L to work and replace with zeros. - work[i] = a[i*lda+j] - a[i*lda+j] = 0 - } - // Compute current column of inv(A). - if j < n-1 { - bi.Dgemv(blas.NoTrans, n, n-j-1, -1, a[(j+1):], lda, work[(j+1):], 1, 1, a[j:], lda) - } - } - } else { - // Blocked code. - nn := ((n - 1) / nb) * nb - for j := nn; j >= 0; j -= nb { - jb := min(nb, n-j) - // Copy current block column of L to work and replace - // with zeros. - for jj := j; jj < j+jb; jj++ { - for i := jj + 1; i < n; i++ { - work[i*ldwork+(jj-j)] = a[i*lda+jj] - a[i*lda+jj] = 0 - } - } - // Compute current block column of inv(A). - if j+jb < n { - bi.Dgemm(blas.NoTrans, blas.NoTrans, n, jb, n-j-jb, -1, a[(j+jb):], lda, work[(j+jb)*ldwork:], ldwork, 1, a[j:], lda) - } - bi.Dtrsm(blas.Right, blas.Lower, blas.NoTrans, blas.Unit, n, jb, 1, work[j*ldwork:], ldwork, a[j:], lda) - } - } - // Apply column interchanges. - for j := n - 2; j >= 0; j-- { - jp := ipiv[j] - if jp != j { - bi.Dswap(n, a[j:], lda, a[jp:], lda) - } - } - work[0] = float64(iws) - return true -} diff --git a/vendor/gonum.org/v1/gonum/lapack/gonum/dgetrs.go b/vendor/gonum.org/v1/gonum/lapack/gonum/dgetrs.go deleted file mode 100644 index ecc20d7c96..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/gonum/dgetrs.go +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright ©2015 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import ( - "gonum.org/v1/gonum/blas" - "gonum.org/v1/gonum/blas/blas64" -) - -// Dgetrs solves a system of equations using an LU factorization. -// The system of equations solved is -// A * X = B if trans == blas.Trans -// A^T * X = B if trans == blas.NoTrans -// A is a general n×n matrix with stride lda. B is a general matrix of size n×nrhs. -// -// On entry b contains the elements of the matrix B. On exit, b contains the -// elements of X, the solution to the system of equations. -// -// a and ipiv contain the LU factorization of A and the permutation indices as -// computed by Dgetrf. ipiv is zero-indexed. -func (impl Implementation) Dgetrs(trans blas.Transpose, n, nrhs int, a []float64, lda int, ipiv []int, b []float64, ldb int) { - switch { - case trans != blas.NoTrans && trans != blas.Trans && trans != blas.ConjTrans: - panic(badTrans) - case n < 0: - panic(nLT0) - case nrhs < 0: - panic(nrhsLT0) - case lda < max(1, n): - panic(badLdA) - case ldb < max(1, nrhs): - panic(badLdB) - } - - // Quick return if possible. - if n == 0 || nrhs == 0 { - return - } - - switch { - case len(a) < (n-1)*lda+n: - panic(shortA) - case len(b) < (n-1)*ldb+nrhs: - panic(shortB) - case len(ipiv) != n: - panic(badLenIpiv) - } - - bi := blas64.Implementation() - - if trans == blas.NoTrans { - // Solve A * X = B. - impl.Dlaswp(nrhs, b, ldb, 0, n-1, ipiv, 1) - // Solve L * X = B, updating b. - bi.Dtrsm(blas.Left, blas.Lower, blas.NoTrans, blas.Unit, - n, nrhs, 1, a, lda, b, ldb) - // Solve U * X = B, updating b. - bi.Dtrsm(blas.Left, blas.Upper, blas.NoTrans, blas.NonUnit, - n, nrhs, 1, a, lda, b, ldb) - return - } - // Solve A^T * X = B. - // Solve U^T * X = B, updating b. - bi.Dtrsm(blas.Left, blas.Upper, blas.Trans, blas.NonUnit, - n, nrhs, 1, a, lda, b, ldb) - // Solve L^T * X = B, updating b. - bi.Dtrsm(blas.Left, blas.Lower, blas.Trans, blas.Unit, - n, nrhs, 1, a, lda, b, ldb) - impl.Dlaswp(nrhs, b, ldb, 0, n-1, ipiv, -1) -} diff --git a/vendor/gonum.org/v1/gonum/lapack/gonum/dggsvd3.go b/vendor/gonum.org/v1/gonum/lapack/gonum/dggsvd3.go deleted file mode 100644 index ac234dce33..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/gonum/dggsvd3.go +++ /dev/null @@ -1,242 +0,0 @@ -// Copyright ©2017 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import ( - "math" - - "gonum.org/v1/gonum/blas/blas64" - "gonum.org/v1/gonum/lapack" -) - -// Dggsvd3 computes the generalized singular value decomposition (GSVD) -// of an m×n matrix A and p×n matrix B: -// U^T*A*Q = D1*[ 0 R ] -// -// V^T*B*Q = D2*[ 0 R ] -// where U, V and Q are orthogonal matrices. -// -// Dggsvd3 returns k and l, the dimensions of the sub-blocks. k+l -// is the effective numerical rank of the (m+p)×n matrix [ A^T B^T ]^T. -// R is a (k+l)×(k+l) nonsingular upper triangular matrix, D1 and -// D2 are m×(k+l) and p×(k+l) diagonal matrices and of the following -// structures, respectively: -// -// If m-k-l >= 0, -// -// k l -// D1 = k [ I 0 ] -// l [ 0 C ] -// m-k-l [ 0 0 ] -// -// k l -// D2 = l [ 0 S ] -// p-l [ 0 0 ] -// -// n-k-l k l -// [ 0 R ] = k [ 0 R11 R12 ] k -// l [ 0 0 R22 ] l -// -// where -// -// C = diag( alpha_k, ... , alpha_{k+l} ), -// S = diag( beta_k, ... , beta_{k+l} ), -// C^2 + S^2 = I. -// -// R is stored in -// A[0:k+l, n-k-l:n] -// on exit. -// -// If m-k-l < 0, -// -// k m-k k+l-m -// D1 = k [ I 0 0 ] -// m-k [ 0 C 0 ] -// -// k m-k k+l-m -// D2 = m-k [ 0 S 0 ] -// k+l-m [ 0 0 I ] -// p-l [ 0 0 0 ] -// -// n-k-l k m-k k+l-m -// [ 0 R ] = k [ 0 R11 R12 R13 ] -// m-k [ 0 0 R22 R23 ] -// k+l-m [ 0 0 0 R33 ] -// -// where -// C = diag( alpha_k, ... , alpha_m ), -// S = diag( beta_k, ... , beta_m ), -// C^2 + S^2 = I. -// -// R = [ R11 R12 R13 ] is stored in A[1:m, n-k-l+1:n] -// [ 0 R22 R23 ] -// and R33 is stored in -// B[m-k:l, n+m-k-l:n] on exit. -// -// Dggsvd3 computes C, S, R, and optionally the orthogonal transformation -// matrices U, V and Q. -// -// jobU, jobV and jobQ are options for computing the orthogonal matrices. The behavior -// is as follows -// jobU == lapack.GSVDU Compute orthogonal matrix U -// jobU == lapack.GSVDNone Do not compute orthogonal matrix. -// The behavior is the same for jobV and jobQ with the exception that instead of -// lapack.GSVDU these accept lapack.GSVDV and lapack.GSVDQ respectively. -// The matrices U, V and Q must be m×m, p×p and n×n respectively unless the -// relevant job parameter is lapack.GSVDNone. -// -// alpha and beta must have length n or Dggsvd3 will panic. On exit, alpha and -// beta contain the generalized singular value pairs of A and B -// alpha[0:k] = 1, -// beta[0:k] = 0, -// if m-k-l >= 0, -// alpha[k:k+l] = diag(C), -// beta[k:k+l] = diag(S), -// if m-k-l < 0, -// alpha[k:m]= C, alpha[m:k+l]= 0 -// beta[k:m] = S, beta[m:k+l] = 1. -// if k+l < n, -// alpha[k+l:n] = 0 and -// beta[k+l:n] = 0. -// -// On exit, iwork contains the permutation required to sort alpha descending. -// -// iwork must have length n, work must have length at least max(1, lwork), and -// lwork must be -1 or greater than n, otherwise Dggsvd3 will panic. If -// lwork is -1, work[0] holds the optimal lwork on return, but Dggsvd3 does -// not perform the GSVD. -func (impl Implementation) Dggsvd3(jobU, jobV, jobQ lapack.GSVDJob, m, n, p int, a []float64, lda int, b []float64, ldb int, alpha, beta, u []float64, ldu int, v []float64, ldv int, q []float64, ldq int, work []float64, lwork int, iwork []int) (k, l int, ok bool) { - wantu := jobU == lapack.GSVDU - wantv := jobV == lapack.GSVDV - wantq := jobQ == lapack.GSVDQ - switch { - case !wantu && jobU != lapack.GSVDNone: - panic(badGSVDJob + "U") - case !wantv && jobV != lapack.GSVDNone: - panic(badGSVDJob + "V") - case !wantq && jobQ != lapack.GSVDNone: - panic(badGSVDJob + "Q") - case m < 0: - panic(mLT0) - case n < 0: - panic(nLT0) - case p < 0: - panic(pLT0) - case lda < max(1, n): - panic(badLdA) - case ldb < max(1, n): - panic(badLdB) - case ldu < 1, wantu && ldu < m: - panic(badLdU) - case ldv < 1, wantv && ldv < p: - panic(badLdV) - case ldq < 1, wantq && ldq < n: - panic(badLdQ) - case len(iwork) < n: - panic(shortWork) - case lwork < 1 && lwork != -1: - panic(badLWork) - case len(work) < max(1, lwork): - panic(shortWork) - } - - // Determine optimal work length. - impl.Dggsvp3(jobU, jobV, jobQ, - m, p, n, - a, lda, - b, ldb, - 0, 0, - u, ldu, - v, ldv, - q, ldq, - iwork, - work, work, -1) - lwkopt := n + int(work[0]) - lwkopt = max(lwkopt, 2*n) - lwkopt = max(lwkopt, 1) - work[0] = float64(lwkopt) - if lwork == -1 { - return 0, 0, true - } - - switch { - case len(a) < (m-1)*lda+n: - panic(shortA) - case len(b) < (p-1)*ldb+n: - panic(shortB) - case wantu && len(u) < (m-1)*ldu+m: - panic(shortU) - case wantv && len(v) < (p-1)*ldv+p: - panic(shortV) - case wantq && len(q) < (n-1)*ldq+n: - panic(shortQ) - case len(alpha) != n: - panic(badLenAlpha) - case len(beta) != n: - panic(badLenBeta) - } - - // Compute the Frobenius norm of matrices A and B. - anorm := impl.Dlange(lapack.Frobenius, m, n, a, lda, nil) - bnorm := impl.Dlange(lapack.Frobenius, p, n, b, ldb, nil) - - // Get machine precision and set up threshold for determining - // the effective numerical rank of the matrices A and B. - tola := float64(max(m, n)) * math.Max(anorm, dlamchS) * dlamchP - tolb := float64(max(p, n)) * math.Max(bnorm, dlamchS) * dlamchP - - // Preprocessing. - k, l = impl.Dggsvp3(jobU, jobV, jobQ, - m, p, n, - a, lda, - b, ldb, - tola, tolb, - u, ldu, - v, ldv, - q, ldq, - iwork, - work[:n], work[n:], lwork-n) - - // Compute the GSVD of two upper "triangular" matrices. - _, ok = impl.Dtgsja(jobU, jobV, jobQ, - m, p, n, - k, l, - a, lda, - b, ldb, - tola, tolb, - alpha, beta, - u, ldu, - v, ldv, - q, ldq, - work) - - // Sort the singular values and store the pivot indices in iwork - // Copy alpha to work, then sort alpha in work. - bi := blas64.Implementation() - bi.Dcopy(n, alpha, 1, work[:n], 1) - ibnd := min(l, m-k) - for i := 0; i < ibnd; i++ { - // Scan for largest alpha_{k+i}. - isub := i - smax := work[k+i] - for j := i + 1; j < ibnd; j++ { - if v := work[k+j]; v > smax { - isub = j - smax = v - } - } - if isub != i { - work[k+isub] = work[k+i] - work[k+i] = smax - iwork[k+i] = k + isub - } else { - iwork[k+i] = k + i - } - } - - work[0] = float64(lwkopt) - - return k, l, ok -} diff --git a/vendor/gonum.org/v1/gonum/lapack/gonum/dggsvp3.go b/vendor/gonum.org/v1/gonum/lapack/gonum/dggsvp3.go deleted file mode 100644 index 7a9ad9fbf9..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/gonum/dggsvp3.go +++ /dev/null @@ -1,281 +0,0 @@ -// Copyright ©2017 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import ( - "math" - - "gonum.org/v1/gonum/blas" - "gonum.org/v1/gonum/lapack" -) - -// Dggsvp3 computes orthogonal matrices U, V and Q such that -// -// n-k-l k l -// U^T*A*Q = k [ 0 A12 A13 ] if m-k-l >= 0; -// l [ 0 0 A23 ] -// m-k-l [ 0 0 0 ] -// -// n-k-l k l -// U^T*A*Q = k [ 0 A12 A13 ] if m-k-l < 0; -// m-k [ 0 0 A23 ] -// -// n-k-l k l -// V^T*B*Q = l [ 0 0 B13 ] -// p-l [ 0 0 0 ] -// -// where the k×k matrix A12 and l×l matrix B13 are non-singular -// upper triangular. A23 is l×l upper triangular if m-k-l >= 0, -// otherwise A23 is (m-k)×l upper trapezoidal. -// -// Dggsvp3 returns k and l, the dimensions of the sub-blocks. k+l -// is the effective numerical rank of the (m+p)×n matrix [ A^T B^T ]^T. -// -// jobU, jobV and jobQ are options for computing the orthogonal matrices. The behavior -// is as follows -// jobU == lapack.GSVDU Compute orthogonal matrix U -// jobU == lapack.GSVDNone Do not compute orthogonal matrix. -// The behavior is the same for jobV and jobQ with the exception that instead of -// lapack.GSVDU these accept lapack.GSVDV and lapack.GSVDQ respectively. -// The matrices U, V and Q must be m×m, p×p and n×n respectively unless the -// relevant job parameter is lapack.GSVDNone. -// -// tola and tolb are the convergence criteria for the Jacobi-Kogbetliantz -// iteration procedure. Generally, they are the same as used in the preprocessing -// step, for example, -// tola = max(m, n)*norm(A)*eps, -// tolb = max(p, n)*norm(B)*eps. -// Where eps is the machine epsilon. -// -// iwork must have length n, work must have length at least max(1, lwork), and -// lwork must be -1 or greater than zero, otherwise Dggsvp3 will panic. -// -// Dggsvp3 is an internal routine. It is exported for testing purposes. -func (impl Implementation) Dggsvp3(jobU, jobV, jobQ lapack.GSVDJob, m, p, n int, a []float64, lda int, b []float64, ldb int, tola, tolb float64, u []float64, ldu int, v []float64, ldv int, q []float64, ldq int, iwork []int, tau, work []float64, lwork int) (k, l int) { - wantu := jobU == lapack.GSVDU - wantv := jobV == lapack.GSVDV - wantq := jobQ == lapack.GSVDQ - switch { - case !wantu && jobU != lapack.GSVDNone: - panic(badGSVDJob + "U") - case !wantv && jobV != lapack.GSVDNone: - panic(badGSVDJob + "V") - case !wantq && jobQ != lapack.GSVDNone: - panic(badGSVDJob + "Q") - case m < 0: - panic(mLT0) - case p < 0: - panic(pLT0) - case n < 0: - panic(nLT0) - case lda < max(1, n): - panic(badLdA) - case ldb < max(1, n): - panic(badLdB) - case ldu < 1, wantu && ldu < m: - panic(badLdU) - case ldv < 1, wantv && ldv < p: - panic(badLdV) - case ldq < 1, wantq && ldq < n: - panic(badLdQ) - case len(iwork) != n: - panic(shortWork) - case lwork < 1 && lwork != -1: - panic(badLWork) - case len(work) < max(1, lwork): - panic(shortWork) - } - - var lwkopt int - impl.Dgeqp3(p, n, b, ldb, iwork, tau, work, -1) - lwkopt = int(work[0]) - if wantv { - lwkopt = max(lwkopt, p) - } - lwkopt = max(lwkopt, min(n, p)) - lwkopt = max(lwkopt, m) - if wantq { - lwkopt = max(lwkopt, n) - } - impl.Dgeqp3(m, n, a, lda, iwork, tau, work, -1) - lwkopt = max(lwkopt, int(work[0])) - lwkopt = max(1, lwkopt) - if lwork == -1 { - work[0] = float64(lwkopt) - return 0, 0 - } - - switch { - case len(a) < (m-1)*lda+n: - panic(shortA) - case len(b) < (p-1)*ldb+n: - panic(shortB) - case wantu && len(u) < (m-1)*ldu+m: - panic(shortU) - case wantv && len(v) < (p-1)*ldv+p: - panic(shortV) - case wantq && len(q) < (n-1)*ldq+n: - panic(shortQ) - case len(tau) < n: - // tau check must come after lwkopt query since - // the Dggsvd3 call for lwkopt query may have - // lwork == -1, and tau is provided by work. - panic(shortTau) - } - - const forward = true - - // QR with column pivoting of B: B*P = V*[ S11 S12 ]. - // [ 0 0 ] - for i := range iwork[:n] { - iwork[i] = 0 - } - impl.Dgeqp3(p, n, b, ldb, iwork, tau, work, lwork) - - // Update A := A*P. - impl.Dlapmt(forward, m, n, a, lda, iwork) - - // Determine the effective rank of matrix B. - for i := 0; i < min(p, n); i++ { - if math.Abs(b[i*ldb+i]) > tolb { - l++ - } - } - - if wantv { - // Copy the details of V, and form V. - impl.Dlaset(blas.All, p, p, 0, 0, v, ldv) - if p > 1 { - impl.Dlacpy(blas.Lower, p-1, min(p, n), b[ldb:], ldb, v[ldv:], ldv) - } - impl.Dorg2r(p, p, min(p, n), v, ldv, tau, work) - } - - // Clean up B. - for i := 1; i < l; i++ { - r := b[i*ldb : i*ldb+i] - for j := range r { - r[j] = 0 - } - } - if p > l { - impl.Dlaset(blas.All, p-l, n, 0, 0, b[l*ldb:], ldb) - } - - if wantq { - // Set Q = I and update Q := Q*P. - impl.Dlaset(blas.All, n, n, 0, 1, q, ldq) - impl.Dlapmt(forward, n, n, q, ldq, iwork) - } - - if p >= l && n != l { - // RQ factorization of [ S11 S12 ]: [ S11 S12 ] = [ 0 S12 ]*Z. - impl.Dgerq2(l, n, b, ldb, tau, work) - - // Update A := A*Z^T. - impl.Dormr2(blas.Right, blas.Trans, m, n, l, b, ldb, tau, a, lda, work) - - if wantq { - // Update Q := Q*Z^T. - impl.Dormr2(blas.Right, blas.Trans, n, n, l, b, ldb, tau, q, ldq, work) - } - - // Clean up B. - impl.Dlaset(blas.All, l, n-l, 0, 0, b, ldb) - for i := 1; i < l; i++ { - r := b[i*ldb+n-l : i*ldb+i+n-l] - for j := range r { - r[j] = 0 - } - } - } - - // Let N-L L - // A = [ A11 A12 ] M, - // - // then the following does the complete QR decomposition of A11: - // - // A11 = U*[ 0 T12 ]*P1^T. - // [ 0 0 ] - for i := range iwork[:n-l] { - iwork[i] = 0 - } - impl.Dgeqp3(m, n-l, a, lda, iwork[:n-l], tau, work, lwork) - - // Determine the effective rank of A11. - for i := 0; i < min(m, n-l); i++ { - if math.Abs(a[i*lda+i]) > tola { - k++ - } - } - - // Update A12 := U^T*A12, where A12 = A[0:m, n-l:n]. - impl.Dorm2r(blas.Left, blas.Trans, m, l, min(m, n-l), a, lda, tau, a[n-l:], lda, work) - - if wantu { - // Copy the details of U, and form U. - impl.Dlaset(blas.All, m, m, 0, 0, u, ldu) - if m > 1 { - impl.Dlacpy(blas.Lower, m-1, min(m, n-l), a[lda:], lda, u[ldu:], ldu) - } - impl.Dorg2r(m, m, min(m, n-l), u, ldu, tau, work) - } - - if wantq { - // Update Q[0:n, 0:n-l] := Q[0:n, 0:n-l]*P1. - impl.Dlapmt(forward, n, n-l, q, ldq, iwork[:n-l]) - } - - // Clean up A: set the strictly lower triangular part of - // A[0:k, 0:k] = 0, and A[k:m, 0:n-l] = 0. - for i := 1; i < k; i++ { - r := a[i*lda : i*lda+i] - for j := range r { - r[j] = 0 - } - } - if m > k { - impl.Dlaset(blas.All, m-k, n-l, 0, 0, a[k*lda:], lda) - } - - if n-l > k { - // RQ factorization of [ T11 T12 ] = [ 0 T12 ]*Z1. - impl.Dgerq2(k, n-l, a, lda, tau, work) - - if wantq { - // Update Q[0:n, 0:n-l] := Q[0:n, 0:n-l]*Z1^T. - impl.Dorm2r(blas.Right, blas.Trans, n, n-l, k, a, lda, tau, q, ldq, work) - } - - // Clean up A. - impl.Dlaset(blas.All, k, n-l-k, 0, 0, a, lda) - for i := 1; i < k; i++ { - r := a[i*lda+n-k-l : i*lda+i+n-k-l] - for j := range r { - a[j] = 0 - } - } - } - - if m > k { - // QR factorization of A[k:m, n-l:n]. - impl.Dgeqr2(m-k, l, a[k*lda+n-l:], lda, tau, work) - if wantu { - // Update U[:, k:m) := U[:, k:m]*U1. - impl.Dorm2r(blas.Right, blas.NoTrans, m, m-k, min(m-k, l), a[k*lda+n-l:], lda, tau, u[k:], ldu, work) - } - - // Clean up A. - for i := k + 1; i < m; i++ { - r := a[i*lda+n-l : i*lda+min(n-l+i-k, n)] - for j := range r { - r[j] = 0 - } - } - } - - work[0] = float64(lwkopt) - return k, l -} diff --git a/vendor/gonum.org/v1/gonum/lapack/gonum/dhseqr.go b/vendor/gonum.org/v1/gonum/lapack/gonum/dhseqr.go deleted file mode 100644 index ed3fbca851..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/gonum/dhseqr.go +++ /dev/null @@ -1,252 +0,0 @@ -// Copyright ©2016 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import ( - "math" - - "gonum.org/v1/gonum/blas" - "gonum.org/v1/gonum/lapack" -) - -// Dhseqr computes the eigenvalues of an n×n Hessenberg matrix H and, -// optionally, the matrices T and Z from the Schur decomposition -// H = Z T Z^T, -// where T is an n×n upper quasi-triangular matrix (the Schur form), and Z is -// the n×n orthogonal matrix of Schur vectors. -// -// Optionally Z may be postmultiplied into an input orthogonal matrix Q so that -// this routine can give the Schur factorization of a matrix A which has been -// reduced to the Hessenberg form H by the orthogonal matrix Q: -// A = Q H Q^T = (QZ) T (QZ)^T. -// -// If job == lapack.EigenvaluesOnly, only the eigenvalues will be computed. -// If job == lapack.EigenvaluesAndSchur, the eigenvalues and the Schur form T will -// be computed. -// For other values of job Dhseqr will panic. -// -// If compz == lapack.SchurNone, no Schur vectors will be computed and Z will not be -// referenced. -// If compz == lapack.SchurHess, on return Z will contain the matrix of Schur -// vectors of H. -// If compz == lapack.SchurOrig, on entry z is assumed to contain the orthogonal -// matrix Q that is the identity except for the submatrix -// Q[ilo:ihi+1,ilo:ihi+1]. On return z will be updated to the product Q*Z. -// -// ilo and ihi determine the block of H on which Dhseqr operates. It is assumed -// that H is already upper triangular in rows and columns [0:ilo] and [ihi+1:n], -// although it will be only checked that the block is isolated, that is, -// ilo == 0 or H[ilo,ilo-1] == 0, -// ihi == n-1 or H[ihi+1,ihi] == 0, -// and Dhseqr will panic otherwise. ilo and ihi are typically set by a previous -// call to Dgebal, otherwise they should be set to 0 and n-1, respectively. It -// must hold that -// 0 <= ilo <= ihi < n, if n > 0, -// ilo == 0 and ihi == -1, if n == 0. -// -// wr and wi must have length n. -// -// work must have length at least lwork and lwork must be at least max(1,n) -// otherwise Dhseqr will panic. The minimum lwork delivers very good and -// sometimes optimal performance, although lwork as large as 11*n may be -// required. On return, work[0] will contain the optimal value of lwork. -// -// If lwork is -1, instead of performing Dhseqr, the function only estimates the -// optimal workspace size and stores it into work[0]. Neither h nor z are -// accessed. -// -// unconverged indicates whether Dhseqr computed all the eigenvalues. -// -// If unconverged == 0, all the eigenvalues have been computed and their real -// and imaginary parts will be stored on return in wr and wi, respectively. If -// two eigenvalues are computed as a complex conjugate pair, they are stored in -// consecutive elements of wr and wi, say the i-th and (i+1)th, with wi[i] > 0 -// and wi[i+1] < 0. -// -// If unconverged == 0 and job == lapack.EigenvaluesAndSchur, on return H will -// contain the upper quasi-triangular matrix T from the Schur decomposition (the -// Schur form). 2×2 diagonal blocks (corresponding to complex conjugate pairs of -// eigenvalues) will be returned in standard form, with -// H[i,i] == H[i+1,i+1], -// and -// H[i+1,i]*H[i,i+1] < 0. -// The eigenvalues will be stored in wr and wi in the same order as on the -// diagonal of the Schur form returned in H, with -// wr[i] = H[i,i], -// and, if H[i:i+2,i:i+2] is a 2×2 diagonal block, -// wi[i] = sqrt(-H[i+1,i]*H[i,i+1]), -// wi[i+1] = -wi[i]. -// -// If unconverged == 0 and job == lapack.EigenvaluesOnly, the contents of h -// on return is unspecified. -// -// If unconverged > 0, some eigenvalues have not converged, and the blocks -// [0:ilo] and [unconverged:n] of wr and wi will contain those eigenvalues which -// have been successfully computed. Failures are rare. -// -// If unconverged > 0 and job == lapack.EigenvaluesOnly, on return the -// remaining unconverged eigenvalues are the eigenvalues of the upper Hessenberg -// matrix H[ilo:unconverged,ilo:unconverged]. -// -// If unconverged > 0 and job == lapack.EigenvaluesAndSchur, then on -// return -// (initial H) U = U (final H), (*) -// where U is an orthogonal matrix. The final H is upper Hessenberg and -// H[unconverged:ihi+1,unconverged:ihi+1] is upper quasi-triangular. -// -// If unconverged > 0 and compz == lapack.SchurOrig, then on return -// (final Z) = (initial Z) U, -// where U is the orthogonal matrix in (*) regardless of the value of job. -// -// If unconverged > 0 and compz == lapack.SchurHess, then on return -// (final Z) = U, -// where U is the orthogonal matrix in (*) regardless of the value of job. -// -// References: -// [1] R. Byers. LAPACK 3.1 xHSEQR: Tuning and Implementation Notes on the -// Small Bulge Multi-Shift QR Algorithm with Aggressive Early Deflation. -// LAPACK Working Note 187 (2007) -// URL: http://www.netlib.org/lapack/lawnspdf/lawn187.pdf -// [2] K. Braman, R. Byers, R. Mathias. The Multishift QR Algorithm. Part I: -// Maintaining Well-Focused Shifts and Level 3 Performance. SIAM J. Matrix -// Anal. Appl. 23(4) (2002), pp. 929—947 -// URL: http://dx.doi.org/10.1137/S0895479801384573 -// [3] K. Braman, R. Byers, R. Mathias. The Multishift QR Algorithm. Part II: -// Aggressive Early Deflation. SIAM J. Matrix Anal. Appl. 23(4) (2002), pp. 948—973 -// URL: http://dx.doi.org/10.1137/S0895479801384585 -// -// Dhseqr is an internal routine. It is exported for testing purposes. -func (impl Implementation) Dhseqr(job lapack.SchurJob, compz lapack.SchurComp, n, ilo, ihi int, h []float64, ldh int, wr, wi []float64, z []float64, ldz int, work []float64, lwork int) (unconverged int) { - wantt := job == lapack.EigenvaluesAndSchur - wantz := compz == lapack.SchurHess || compz == lapack.SchurOrig - - switch { - case job != lapack.EigenvaluesOnly && job != lapack.EigenvaluesAndSchur: - panic(badSchurJob) - case compz != lapack.SchurNone && compz != lapack.SchurHess && compz != lapack.SchurOrig: - panic(badSchurComp) - case n < 0: - panic(nLT0) - case ilo < 0 || max(0, n-1) < ilo: - panic(badIlo) - case ihi < min(ilo, n-1) || n <= ihi: - panic(badIhi) - case ldh < max(1, n): - panic(badLdH) - case ldz < 1, wantz && ldz < n: - panic(badLdZ) - case lwork < max(1, n) && lwork != -1: - panic(badLWork) - case len(work) < max(1, lwork): - panic(shortWork) - } - - // Quick return if possible. - if n == 0 { - work[0] = 1 - return 0 - } - - // Quick return in case of a workspace query. - if lwork == -1 { - impl.Dlaqr04(wantt, wantz, n, ilo, ihi, h, ldh, wr, wi, ilo, ihi, z, ldz, work, -1, 1) - work[0] = math.Max(float64(n), work[0]) - return 0 - } - - switch { - case len(h) < (n-1)*ldh+n: - panic(shortH) - case wantz && len(z) < (n-1)*ldz+n: - panic(shortZ) - case len(wr) < n: - panic(shortWr) - case len(wi) < n: - panic(shortWi) - } - - const ( - // Matrices of order ntiny or smaller must be processed by - // Dlahqr because of insufficient subdiagonal scratch space. - // This is a hard limit. - ntiny = 11 - - // nl is the size of a local workspace to help small matrices - // through a rare Dlahqr failure. nl > ntiny is required and - // nl <= nmin = Ilaenv(ispec=12,...) is recommended (the default - // value of nmin is 75). Using nl = 49 allows up to six - // simultaneous shifts and a 16×16 deflation window. - nl = 49 - ) - - // Copy eigenvalues isolated by Dgebal. - for i := 0; i < ilo; i++ { - wr[i] = h[i*ldh+i] - wi[i] = 0 - } - for i := ihi + 1; i < n; i++ { - wr[i] = h[i*ldh+i] - wi[i] = 0 - } - - // Initialize Z to identity matrix if requested. - if compz == lapack.SchurHess { - impl.Dlaset(blas.All, n, n, 0, 1, z, ldz) - } - - // Quick return if possible. - if ilo == ihi { - wr[ilo] = h[ilo*ldh+ilo] - wi[ilo] = 0 - return 0 - } - - // Dlahqr/Dlaqr04 crossover point. - nmin := impl.Ilaenv(12, "DHSEQR", string(job)+string(compz), n, ilo, ihi, lwork) - nmin = max(ntiny, nmin) - - if n > nmin { - // Dlaqr0 for big matrices. - unconverged = impl.Dlaqr04(wantt, wantz, n, ilo, ihi, h, ldh, wr[:ihi+1], wi[:ihi+1], - ilo, ihi, z, ldz, work, lwork, 1) - } else { - // Dlahqr for small matrices. - unconverged = impl.Dlahqr(wantt, wantz, n, ilo, ihi, h, ldh, wr[:ihi+1], wi[:ihi+1], - ilo, ihi, z, ldz) - if unconverged > 0 { - // A rare Dlahqr failure! Dlaqr04 sometimes succeeds - // when Dlahqr fails. - kbot := unconverged - if n >= nl { - // Larger matrices have enough subdiagonal - // scratch space to call Dlaqr04 directly. - unconverged = impl.Dlaqr04(wantt, wantz, n, ilo, kbot, h, ldh, - wr[:ihi+1], wi[:ihi+1], ilo, ihi, z, ldz, work, lwork, 1) - } else { - // Tiny matrices don't have enough subdiagonal - // scratch space to benefit from Dlaqr04. Hence, - // tiny matrices must be copied into a larger - // array before calling Dlaqr04. - var hl [nl * nl]float64 - impl.Dlacpy(blas.All, n, n, h, ldh, hl[:], nl) - impl.Dlaset(blas.All, nl, nl-n, 0, 0, hl[n:], nl) - var workl [nl]float64 - unconverged = impl.Dlaqr04(wantt, wantz, nl, ilo, kbot, hl[:], nl, - wr[:ihi+1], wi[:ihi+1], ilo, ihi, z, ldz, workl[:], nl, 1) - work[0] = workl[0] - if wantt || unconverged > 0 { - impl.Dlacpy(blas.All, n, n, hl[:], nl, h, ldh) - } - } - } - } - // Zero out under the first subdiagonal, if necessary. - if (wantt || unconverged > 0) && n > 2 { - impl.Dlaset(blas.Lower, n-2, n-2, 0, 0, h[2*ldh:], ldh) - } - - work[0] = math.Max(float64(n), work[0]) - return unconverged -} diff --git a/vendor/gonum.org/v1/gonum/lapack/gonum/dlabrd.go b/vendor/gonum.org/v1/gonum/lapack/gonum/dlabrd.go deleted file mode 100644 index babc0b7c0d..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/gonum/dlabrd.go +++ /dev/null @@ -1,173 +0,0 @@ -// Copyright ©2015 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import ( - "gonum.org/v1/gonum/blas" - "gonum.org/v1/gonum/blas/blas64" -) - -// Dlabrd reduces the first NB rows and columns of a real general m×n matrix -// A to upper or lower bidiagonal form by an orthogonal transformation -// Q**T * A * P -// If m >= n, A is reduced to upper bidiagonal form and upon exit the elements -// on and below the diagonal in the first nb columns represent the elementary -// reflectors, and the elements above the diagonal in the first nb rows represent -// the matrix P. If m < n, A is reduced to lower bidiagonal form and the elements -// P is instead stored above the diagonal. -// -// The reduction to bidiagonal form is stored in d and e, where d are the diagonal -// elements, and e are the off-diagonal elements. -// -// The matrices Q and P are products of elementary reflectors -// Q = H_0 * H_1 * ... * H_{nb-1} -// P = G_0 * G_1 * ... * G_{nb-1} -// where -// H_i = I - tauQ[i] * v_i * v_i^T -// G_i = I - tauP[i] * u_i * u_i^T -// -// As an example, on exit the entries of A when m = 6, n = 5, and nb = 2 -// [ 1 1 u1 u1 u1] -// [v1 1 1 u2 u2] -// [v1 v2 a a a] -// [v1 v2 a a a] -// [v1 v2 a a a] -// [v1 v2 a a a] -// and when m = 5, n = 6, and nb = 2 -// [ 1 u1 u1 u1 u1 u1] -// [ 1 1 u2 u2 u2 u2] -// [v1 1 a a a a] -// [v1 v2 a a a a] -// [v1 v2 a a a a] -// -// Dlabrd also returns the matrices X and Y which are used with U and V to -// apply the transformation to the unreduced part of the matrix -// A := A - V*Y^T - X*U^T -// and returns the matrices X and Y which are needed to apply the -// transformation to the unreduced part of A. -// -// X is an m×nb matrix, Y is an n×nb matrix. d, e, taup, and tauq must all have -// length at least nb. Dlabrd will panic if these size constraints are violated. -// -// Dlabrd is an internal routine. It is exported for testing purposes. -func (impl Implementation) Dlabrd(m, n, nb int, a []float64, lda int, d, e, tauQ, tauP, x []float64, ldx int, y []float64, ldy int) { - switch { - case m < 0: - panic(mLT0) - case n < 0: - panic(nLT0) - case nb < 0: - panic(nbLT0) - case nb > n: - panic(nbGTN) - case nb > m: - panic(nbGTM) - case lda < max(1, n): - panic(badLdA) - case ldx < max(1, nb): - panic(badLdX) - case ldy < max(1, nb): - panic(badLdY) - } - - if m == 0 || n == 0 || nb == 0 { - return - } - - switch { - case len(a) < (m-1)*lda+n: - panic(shortA) - case len(d) < nb: - panic(shortD) - case len(e) < nb: - panic(shortE) - case len(tauQ) < nb: - panic(shortTauQ) - case len(tauP) < nb: - panic(shortTauP) - case len(x) < (m-1)*ldx+nb: - panic(shortX) - case len(y) < (n-1)*ldy+nb: - panic(shortY) - } - - bi := blas64.Implementation() - - if m >= n { - // Reduce to upper bidiagonal form. - for i := 0; i < nb; i++ { - bi.Dgemv(blas.NoTrans, m-i, i, -1, a[i*lda:], lda, y[i*ldy:], 1, 1, a[i*lda+i:], lda) - bi.Dgemv(blas.NoTrans, m-i, i, -1, x[i*ldx:], ldx, a[i:], lda, 1, a[i*lda+i:], lda) - - a[i*lda+i], tauQ[i] = impl.Dlarfg(m-i, a[i*lda+i], a[min(i+1, m-1)*lda+i:], lda) - d[i] = a[i*lda+i] - if i < n-1 { - // Compute Y[i+1:n, i]. - a[i*lda+i] = 1 - bi.Dgemv(blas.Trans, m-i, n-i-1, 1, a[i*lda+i+1:], lda, a[i*lda+i:], lda, 0, y[(i+1)*ldy+i:], ldy) - bi.Dgemv(blas.Trans, m-i, i, 1, a[i*lda:], lda, a[i*lda+i:], lda, 0, y[i:], ldy) - bi.Dgemv(blas.NoTrans, n-i-1, i, -1, y[(i+1)*ldy:], ldy, y[i:], ldy, 1, y[(i+1)*ldy+i:], ldy) - bi.Dgemv(blas.Trans, m-i, i, 1, x[i*ldx:], ldx, a[i*lda+i:], lda, 0, y[i:], ldy) - bi.Dgemv(blas.Trans, i, n-i-1, -1, a[i+1:], lda, y[i:], ldy, 1, y[(i+1)*ldy+i:], ldy) - bi.Dscal(n-i-1, tauQ[i], y[(i+1)*ldy+i:], ldy) - - // Update A[i, i+1:n]. - bi.Dgemv(blas.NoTrans, n-i-1, i+1, -1, y[(i+1)*ldy:], ldy, a[i*lda:], 1, 1, a[i*lda+i+1:], 1) - bi.Dgemv(blas.Trans, i, n-i-1, -1, a[i+1:], lda, x[i*ldx:], 1, 1, a[i*lda+i+1:], 1) - - // Generate reflection P[i] to annihilate A[i, i+2:n]. - a[i*lda+i+1], tauP[i] = impl.Dlarfg(n-i-1, a[i*lda+i+1], a[i*lda+min(i+2, n-1):], 1) - e[i] = a[i*lda+i+1] - a[i*lda+i+1] = 1 - - // Compute X[i+1:m, i]. - bi.Dgemv(blas.NoTrans, m-i-1, n-i-1, 1, a[(i+1)*lda+i+1:], lda, a[i*lda+i+1:], 1, 0, x[(i+1)*ldx+i:], ldx) - bi.Dgemv(blas.Trans, n-i-1, i+1, 1, y[(i+1)*ldy:], ldy, a[i*lda+i+1:], 1, 0, x[i:], ldx) - bi.Dgemv(blas.NoTrans, m-i-1, i+1, -1, a[(i+1)*lda:], lda, x[i:], ldx, 1, x[(i+1)*ldx+i:], ldx) - bi.Dgemv(blas.NoTrans, i, n-i-1, 1, a[i+1:], lda, a[i*lda+i+1:], 1, 0, x[i:], ldx) - bi.Dgemv(blas.NoTrans, m-i-1, i, -1, x[(i+1)*ldx:], ldx, x[i:], ldx, 1, x[(i+1)*ldx+i:], ldx) - bi.Dscal(m-i-1, tauP[i], x[(i+1)*ldx+i:], ldx) - } - } - return - } - // Reduce to lower bidiagonal form. - for i := 0; i < nb; i++ { - // Update A[i,i:n] - bi.Dgemv(blas.NoTrans, n-i, i, -1, y[i*ldy:], ldy, a[i*lda:], 1, 1, a[i*lda+i:], 1) - bi.Dgemv(blas.Trans, i, n-i, -1, a[i:], lda, x[i*ldx:], 1, 1, a[i*lda+i:], 1) - - // Generate reflection P[i] to annihilate A[i, i+1:n] - a[i*lda+i], tauP[i] = impl.Dlarfg(n-i, a[i*lda+i], a[i*lda+min(i+1, n-1):], 1) - d[i] = a[i*lda+i] - if i < m-1 { - a[i*lda+i] = 1 - // Compute X[i+1:m, i]. - bi.Dgemv(blas.NoTrans, m-i-1, n-i, 1, a[(i+1)*lda+i:], lda, a[i*lda+i:], 1, 0, x[(i+1)*ldx+i:], ldx) - bi.Dgemv(blas.Trans, n-i, i, 1, y[i*ldy:], ldy, a[i*lda+i:], 1, 0, x[i:], ldx) - bi.Dgemv(blas.NoTrans, m-i-1, i, -1, a[(i+1)*lda:], lda, x[i:], ldx, 1, x[(i+1)*ldx+i:], ldx) - bi.Dgemv(blas.NoTrans, i, n-i, 1, a[i:], lda, a[i*lda+i:], 1, 0, x[i:], ldx) - bi.Dgemv(blas.NoTrans, m-i-1, i, -1, x[(i+1)*ldx:], ldx, x[i:], ldx, 1, x[(i+1)*ldx+i:], ldx) - bi.Dscal(m-i-1, tauP[i], x[(i+1)*ldx+i:], ldx) - - // Update A[i+1:m, i]. - bi.Dgemv(blas.NoTrans, m-i-1, i, -1, a[(i+1)*lda:], lda, y[i*ldy:], 1, 1, a[(i+1)*lda+i:], lda) - bi.Dgemv(blas.NoTrans, m-i-1, i+1, -1, x[(i+1)*ldx:], ldx, a[i:], lda, 1, a[(i+1)*lda+i:], lda) - - // Generate reflection Q[i] to annihilate A[i+2:m, i]. - a[(i+1)*lda+i], tauQ[i] = impl.Dlarfg(m-i-1, a[(i+1)*lda+i], a[min(i+2, m-1)*lda+i:], lda) - e[i] = a[(i+1)*lda+i] - a[(i+1)*lda+i] = 1 - - // Compute Y[i+1:n, i]. - bi.Dgemv(blas.Trans, m-i-1, n-i-1, 1, a[(i+1)*lda+i+1:], lda, a[(i+1)*lda+i:], lda, 0, y[(i+1)*ldy+i:], ldy) - bi.Dgemv(blas.Trans, m-i-1, i, 1, a[(i+1)*lda:], lda, a[(i+1)*lda+i:], lda, 0, y[i:], ldy) - bi.Dgemv(blas.NoTrans, n-i-1, i, -1, y[(i+1)*ldy:], ldy, y[i:], ldy, 1, y[(i+1)*ldy+i:], ldy) - bi.Dgemv(blas.Trans, m-i-1, i+1, 1, x[(i+1)*ldx:], ldx, a[(i+1)*lda+i:], lda, 0, y[i:], ldy) - bi.Dgemv(blas.Trans, i+1, n-i-1, -1, a[i+1:], lda, y[i:], ldy, 1, y[(i+1)*ldy+i:], ldy) - bi.Dscal(n-i-1, tauQ[i], y[(i+1)*ldy+i:], ldy) - } - } -} diff --git a/vendor/gonum.org/v1/gonum/lapack/gonum/dlacn2.go b/vendor/gonum.org/v1/gonum/lapack/gonum/dlacn2.go deleted file mode 100644 index e8ac1e439c..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/gonum/dlacn2.go +++ /dev/null @@ -1,134 +0,0 @@ -// Copyright ©2015 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import ( - "math" - - "gonum.org/v1/gonum/blas/blas64" -) - -// Dlacn2 estimates the 1-norm of an n×n matrix A using sequential updates with -// matrix-vector products provided externally. -// -// Dlacn2 is called sequentially and it returns the value of est and kase to be -// used on the next call. -// On the initial call, kase must be 0. -// In between calls, x must be overwritten by -// A * X if kase was returned as 1, -// A^T * X if kase was returned as 2, -// and all other parameters must not be changed. -// On the final return, kase is returned as 0, v contains A*W where W is a -// vector, and est = norm(V)/norm(W) is a lower bound for 1-norm of A. -// -// v, x, and isgn must all have length n and n must be at least 1, otherwise -// Dlacn2 will panic. isave is used for temporary storage. -// -// Dlacn2 is an internal routine. It is exported for testing purposes. -func (impl Implementation) Dlacn2(n int, v, x []float64, isgn []int, est float64, kase int, isave *[3]int) (float64, int) { - switch { - case n < 1: - panic(nLT1) - case len(v) < n: - panic(shortV) - case len(x) < n: - panic(shortX) - case len(isgn) < n: - panic(shortIsgn) - case isave[0] < 0 || 5 < isave[0]: - panic(badIsave) - case isave[0] == 0 && kase != 0: - panic(badIsave) - } - - const itmax = 5 - bi := blas64.Implementation() - - if kase == 0 { - for i := 0; i < n; i++ { - x[i] = 1 / float64(n) - } - kase = 1 - isave[0] = 1 - return est, kase - } - switch isave[0] { - case 1: - if n == 1 { - v[0] = x[0] - est = math.Abs(v[0]) - kase = 0 - return est, kase - } - est = bi.Dasum(n, x, 1) - for i := 0; i < n; i++ { - x[i] = math.Copysign(1, x[i]) - isgn[i] = int(x[i]) - } - kase = 2 - isave[0] = 2 - return est, kase - case 2: - isave[1] = bi.Idamax(n, x, 1) - isave[2] = 2 - for i := 0; i < n; i++ { - x[i] = 0 - } - x[isave[1]] = 1 - kase = 1 - isave[0] = 3 - return est, kase - case 3: - bi.Dcopy(n, x, 1, v, 1) - estold := est - est = bi.Dasum(n, v, 1) - sameSigns := true - for i := 0; i < n; i++ { - if int(math.Copysign(1, x[i])) != isgn[i] { - sameSigns = false - break - } - } - if !sameSigns && est > estold { - for i := 0; i < n; i++ { - x[i] = math.Copysign(1, x[i]) - isgn[i] = int(x[i]) - } - kase = 2 - isave[0] = 4 - return est, kase - } - case 4: - jlast := isave[1] - isave[1] = bi.Idamax(n, x, 1) - if x[jlast] != math.Abs(x[isave[1]]) && isave[2] < itmax { - isave[2] += 1 - for i := 0; i < n; i++ { - x[i] = 0 - } - x[isave[1]] = 1 - kase = 1 - isave[0] = 3 - return est, kase - } - case 5: - tmp := 2 * (bi.Dasum(n, x, 1)) / float64(3*n) - if tmp > est { - bi.Dcopy(n, x, 1, v, 1) - est = tmp - } - kase = 0 - return est, kase - } - // Iteration complete. Final stage - altsgn := 1.0 - for i := 0; i < n; i++ { - x[i] = altsgn * (1 + float64(i)/float64(n-1)) - altsgn *= -1 - } - kase = 1 - isave[0] = 5 - return est, kase -} diff --git a/vendor/gonum.org/v1/gonum/lapack/gonum/dlacpy.go b/vendor/gonum.org/v1/gonum/lapack/gonum/dlacpy.go deleted file mode 100644 index a37f3b0dbd..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/gonum/dlacpy.go +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright ©2015 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import "gonum.org/v1/gonum/blas" - -// Dlacpy copies the elements of A specified by uplo into B. Uplo can specify -// a triangular portion with blas.Upper or blas.Lower, or can specify all of the -// elemest with blas.All. -// -// Dlacpy is an internal routine. It is exported for testing purposes. -func (impl Implementation) Dlacpy(uplo blas.Uplo, m, n int, a []float64, lda int, b []float64, ldb int) { - switch { - case uplo != blas.Upper && uplo != blas.Lower && uplo != blas.All: - panic(badUplo) - case m < 0: - panic(mLT0) - case n < 0: - panic(nLT0) - case lda < max(1, n): - panic(badLdA) - case ldb < max(1, n): - panic(badLdB) - } - - if m == 0 || n == 0 { - return - } - - switch { - case len(a) < (m-1)*lda+n: - panic(shortA) - case len(b) < (m-1)*ldb+n: - panic(shortB) - } - - switch uplo { - case blas.Upper: - for i := 0; i < m; i++ { - for j := i; j < n; j++ { - b[i*ldb+j] = a[i*lda+j] - } - } - case blas.Lower: - for i := 0; i < m; i++ { - for j := 0; j < min(i+1, n); j++ { - b[i*ldb+j] = a[i*lda+j] - } - } - case blas.All: - for i := 0; i < m; i++ { - for j := 0; j < n; j++ { - b[i*ldb+j] = a[i*lda+j] - } - } - } -} diff --git a/vendor/gonum.org/v1/gonum/lapack/gonum/dlae2.go b/vendor/gonum.org/v1/gonum/lapack/gonum/dlae2.go deleted file mode 100644 index c071fec7de..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/gonum/dlae2.go +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright ©2016 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import "math" - -// Dlae2 computes the eigenvalues of a 2×2 symmetric matrix -// [a b] -// [b c] -// and returns the eigenvalue with the larger absolute value as rt1 and the -// smaller as rt2. -// -// Dlae2 is an internal routine. It is exported for testing purposes. -func (impl Implementation) Dlae2(a, b, c float64) (rt1, rt2 float64) { - sm := a + c - df := a - c - adf := math.Abs(df) - tb := b + b - ab := math.Abs(tb) - acmx := c - acmn := a - if math.Abs(a) > math.Abs(c) { - acmx = a - acmn = c - } - var rt float64 - if adf > ab { - rt = adf * math.Sqrt(1+(ab/adf)*(ab/adf)) - } else if adf < ab { - rt = ab * math.Sqrt(1+(adf/ab)*(adf/ab)) - } else { - rt = ab * math.Sqrt2 - } - if sm < 0 { - rt1 = 0.5 * (sm - rt) - rt2 = (acmx/rt1)*acmn - (b/rt1)*b - return rt1, rt2 - } - if sm > 0 { - rt1 = 0.5 * (sm + rt) - rt2 = (acmx/rt1)*acmn - (b/rt1)*b - return rt1, rt2 - } - rt1 = 0.5 * rt - rt2 = -0.5 * rt - return rt1, rt2 -} diff --git a/vendor/gonum.org/v1/gonum/lapack/gonum/dlaev2.go b/vendor/gonum.org/v1/gonum/lapack/gonum/dlaev2.go deleted file mode 100644 index 74d75b9137..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/gonum/dlaev2.go +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright ©2015 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import "math" - -// Dlaev2 computes the Eigen decomposition of a symmetric 2×2 matrix. -// The matrix is given by -// [a b] -// [b c] -// Dlaev2 returns rt1 and rt2, the eigenvalues of the matrix where |RT1| > |RT2|, -// and [cs1, sn1] which is the unit right eigenvalue for RT1. -// [ cs1 sn1] [a b] [cs1 -sn1] = [rt1 0] -// [-sn1 cs1] [b c] [sn1 cs1] [ 0 rt2] -// -// Dlaev2 is an internal routine. It is exported for testing purposes. -func (impl Implementation) Dlaev2(a, b, c float64) (rt1, rt2, cs1, sn1 float64) { - sm := a + c - df := a - c - adf := math.Abs(df) - tb := b + b - ab := math.Abs(tb) - acmx := c - acmn := a - if math.Abs(a) > math.Abs(c) { - acmx = a - acmn = c - } - var rt float64 - if adf > ab { - rt = adf * math.Sqrt(1+(ab/adf)*(ab/adf)) - } else if adf < ab { - rt = ab * math.Sqrt(1+(adf/ab)*(adf/ab)) - } else { - rt = ab * math.Sqrt(2) - } - var sgn1 float64 - if sm < 0 { - rt1 = 0.5 * (sm - rt) - sgn1 = -1 - rt2 = (acmx/rt1)*acmn - (b/rt1)*b - } else if sm > 0 { - rt1 = 0.5 * (sm + rt) - sgn1 = 1 - rt2 = (acmx/rt1)*acmn - (b/rt1)*b - } else { - rt1 = 0.5 * rt - rt2 = -0.5 * rt - sgn1 = 1 - } - var cs, sgn2 float64 - if df >= 0 { - cs = df + rt - sgn2 = 1 - } else { - cs = df - rt - sgn2 = -1 - } - acs := math.Abs(cs) - if acs > ab { - ct := -tb / cs - sn1 = 1 / math.Sqrt(1+ct*ct) - cs1 = ct * sn1 - } else { - if ab == 0 { - cs1 = 1 - sn1 = 0 - } else { - tn := -cs / tb - cs1 = 1 / math.Sqrt(1+tn*tn) - sn1 = tn * cs1 - } - } - if sgn1 == sgn2 { - tn := cs1 - cs1 = -sn1 - sn1 = tn - } - return rt1, rt2, cs1, sn1 -} diff --git a/vendor/gonum.org/v1/gonum/lapack/gonum/dlaexc.go b/vendor/gonum.org/v1/gonum/lapack/gonum/dlaexc.go deleted file mode 100644 index 2b79bd8ae7..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/gonum/dlaexc.go +++ /dev/null @@ -1,269 +0,0 @@ -// Copyright ©2016 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import ( - "math" - - "gonum.org/v1/gonum/blas" - "gonum.org/v1/gonum/blas/blas64" - "gonum.org/v1/gonum/lapack" -) - -// Dlaexc swaps two adjacent diagonal blocks of order 1 or 2 in an n×n upper -// quasi-triangular matrix T by an orthogonal similarity transformation. -// -// T must be in Schur canonical form, that is, block upper triangular with 1×1 -// and 2×2 diagonal blocks; each 2×2 diagonal block has its diagonal elements -// equal and its off-diagonal elements of opposite sign. On return, T will -// contain the updated matrix again in Schur canonical form. -// -// If wantq is true, the transformation is accumulated in the n×n matrix Q, -// otherwise Q is not referenced. -// -// j1 is the index of the first row of the first block. n1 and n2 are the order -// of the first and second block, respectively. -// -// work must have length at least n, otherwise Dlaexc will panic. -// -// If ok is false, the transformed matrix T would be too far from Schur form. -// The blocks are not swapped, and T and Q are not modified. -// -// If n1 and n2 are both equal to 1, Dlaexc will always return true. -// -// Dlaexc is an internal routine. It is exported for testing purposes. -func (impl Implementation) Dlaexc(wantq bool, n int, t []float64, ldt int, q []float64, ldq int, j1, n1, n2 int, work []float64) (ok bool) { - switch { - case n < 0: - panic(nLT0) - case ldt < max(1, n): - panic(badLdT) - case wantq && ldt < max(1, n): - panic(badLdQ) - case j1 < 0 || n <= j1: - panic(badJ1) - case len(work) < n: - panic(shortWork) - case n1 < 0 || 2 < n1: - panic(badN1) - case n2 < 0 || 2 < n2: - panic(badN2) - } - - if n == 0 || n1 == 0 || n2 == 0 { - return true - } - - switch { - case len(t) < (n-1)*ldt+n: - panic(shortT) - case wantq && len(q) < (n-1)*ldq+n: - panic(shortQ) - } - - if j1+n1 >= n { - // TODO(vladimir-ch): Reference LAPACK does this check whether - // the start of the second block is in the matrix T. It returns - // true if it is not and moreover it does not check whether the - // whole second block fits into T. This does not feel - // satisfactory. The only caller of Dlaexc is Dtrexc, so if the - // caller makes sure that this does not happen, we could be - // stricter here. - return true - } - - j2 := j1 + 1 - j3 := j1 + 2 - - bi := blas64.Implementation() - - if n1 == 1 && n2 == 1 { - // Swap two 1×1 blocks. - t11 := t[j1*ldt+j1] - t22 := t[j2*ldt+j2] - - // Determine the transformation to perform the interchange. - cs, sn, _ := impl.Dlartg(t[j1*ldt+j2], t22-t11) - - // Apply transformation to the matrix T. - if n-j3 > 0 { - bi.Drot(n-j3, t[j1*ldt+j3:], 1, t[j2*ldt+j3:], 1, cs, sn) - } - if j1 > 0 { - bi.Drot(j1, t[j1:], ldt, t[j2:], ldt, cs, sn) - } - - t[j1*ldt+j1] = t22 - t[j2*ldt+j2] = t11 - - if wantq { - // Accumulate transformation in the matrix Q. - bi.Drot(n, q[j1:], ldq, q[j2:], ldq, cs, sn) - } - - return true - } - - // Swapping involves at least one 2×2 block. - // - // Copy the diagonal block of order n1+n2 to the local array d and - // compute its norm. - nd := n1 + n2 - var d [16]float64 - const ldd = 4 - impl.Dlacpy(blas.All, nd, nd, t[j1*ldt+j1:], ldt, d[:], ldd) - dnorm := impl.Dlange(lapack.MaxAbs, nd, nd, d[:], ldd, work) - - // Compute machine-dependent threshold for test for accepting swap. - eps := dlamchP - thresh := math.Max(10*eps*dnorm, dlamchS/eps) - - // Solve T11*X - X*T22 = scale*T12 for X. - var x [4]float64 - const ldx = 2 - scale, _, _ := impl.Dlasy2(false, false, -1, n1, n2, d[:], ldd, d[n1*ldd+n1:], ldd, d[n1:], ldd, x[:], ldx) - - // Swap the adjacent diagonal blocks. - switch { - case n1 == 1 && n2 == 2: - // Generate elementary reflector H so that - // ( scale, X11, X12 ) H = ( 0, 0, * ) - u := [3]float64{scale, x[0], 1} - _, tau := impl.Dlarfg(3, x[1], u[:2], 1) - t11 := t[j1*ldt+j1] - - // Perform swap provisionally on diagonal block in d. - impl.Dlarfx(blas.Left, 3, 3, u[:], tau, d[:], ldd, work) - impl.Dlarfx(blas.Right, 3, 3, u[:], tau, d[:], ldd, work) - - // Test whether to reject swap. - if math.Max(math.Abs(d[2*ldd]), math.Max(math.Abs(d[2*ldd+1]), math.Abs(d[2*ldd+2]-t11))) > thresh { - return false - } - - // Accept swap: apply transformation to the entire matrix T. - impl.Dlarfx(blas.Left, 3, n-j1, u[:], tau, t[j1*ldt+j1:], ldt, work) - impl.Dlarfx(blas.Right, j2+1, 3, u[:], tau, t[j1:], ldt, work) - - t[j3*ldt+j1] = 0 - t[j3*ldt+j2] = 0 - t[j3*ldt+j3] = t11 - - if wantq { - // Accumulate transformation in the matrix Q. - impl.Dlarfx(blas.Right, n, 3, u[:], tau, q[j1:], ldq, work) - } - - case n1 == 2 && n2 == 1: - // Generate elementary reflector H so that: - // H ( -X11 ) = ( * ) - // ( -X21 ) = ( 0 ) - // ( scale ) = ( 0 ) - u := [3]float64{1, -x[ldx], scale} - _, tau := impl.Dlarfg(3, -x[0], u[1:], 1) - t33 := t[j3*ldt+j3] - - // Perform swap provisionally on diagonal block in D. - impl.Dlarfx(blas.Left, 3, 3, u[:], tau, d[:], ldd, work) - impl.Dlarfx(blas.Right, 3, 3, u[:], tau, d[:], ldd, work) - - // Test whether to reject swap. - if math.Max(math.Abs(d[ldd]), math.Max(math.Abs(d[2*ldd]), math.Abs(d[0]-t33))) > thresh { - return false - } - - // Accept swap: apply transformation to the entire matrix T. - impl.Dlarfx(blas.Right, j3+1, 3, u[:], tau, t[j1:], ldt, work) - impl.Dlarfx(blas.Left, 3, n-j1-1, u[:], tau, t[j1*ldt+j2:], ldt, work) - - t[j1*ldt+j1] = t33 - t[j2*ldt+j1] = 0 - t[j3*ldt+j1] = 0 - - if wantq { - // Accumulate transformation in the matrix Q. - impl.Dlarfx(blas.Right, n, 3, u[:], tau, q[j1:], ldq, work) - } - - default: // n1 == 2 && n2 == 2 - // Generate elementary reflectors H_1 and H_2 so that: - // H_2 H_1 ( -X11 -X12 ) = ( * * ) - // ( -X21 -X22 ) ( 0 * ) - // ( scale 0 ) ( 0 0 ) - // ( 0 scale ) ( 0 0 ) - u1 := [3]float64{1, -x[ldx], scale} - _, tau1 := impl.Dlarfg(3, -x[0], u1[1:], 1) - - temp := -tau1 * (x[1] + u1[1]*x[ldx+1]) - u2 := [3]float64{1, -temp * u1[2], scale} - _, tau2 := impl.Dlarfg(3, -temp*u1[1]-x[ldx+1], u2[1:], 1) - - // Perform swap provisionally on diagonal block in D. - impl.Dlarfx(blas.Left, 3, 4, u1[:], tau1, d[:], ldd, work) - impl.Dlarfx(blas.Right, 4, 3, u1[:], tau1, d[:], ldd, work) - impl.Dlarfx(blas.Left, 3, 4, u2[:], tau2, d[ldd:], ldd, work) - impl.Dlarfx(blas.Right, 4, 3, u2[:], tau2, d[1:], ldd, work) - - // Test whether to reject swap. - m1 := math.Max(math.Abs(d[2*ldd]), math.Abs(d[2*ldd+1])) - m2 := math.Max(math.Abs(d[3*ldd]), math.Abs(d[3*ldd+1])) - if math.Max(m1, m2) > thresh { - return false - } - - // Accept swap: apply transformation to the entire matrix T. - j4 := j1 + 3 - impl.Dlarfx(blas.Left, 3, n-j1, u1[:], tau1, t[j1*ldt+j1:], ldt, work) - impl.Dlarfx(blas.Right, j4+1, 3, u1[:], tau1, t[j1:], ldt, work) - impl.Dlarfx(blas.Left, 3, n-j1, u2[:], tau2, t[j2*ldt+j1:], ldt, work) - impl.Dlarfx(blas.Right, j4+1, 3, u2[:], tau2, t[j2:], ldt, work) - - t[j3*ldt+j1] = 0 - t[j3*ldt+j2] = 0 - t[j4*ldt+j1] = 0 - t[j4*ldt+j2] = 0 - - if wantq { - // Accumulate transformation in the matrix Q. - impl.Dlarfx(blas.Right, n, 3, u1[:], tau1, q[j1:], ldq, work) - impl.Dlarfx(blas.Right, n, 3, u2[:], tau2, q[j2:], ldq, work) - } - } - - if n2 == 2 { - // Standardize new 2×2 block T11. - a, b := t[j1*ldt+j1], t[j1*ldt+j2] - c, d := t[j2*ldt+j1], t[j2*ldt+j2] - var cs, sn float64 - t[j1*ldt+j1], t[j1*ldt+j2], t[j2*ldt+j1], t[j2*ldt+j2], _, _, _, _, cs, sn = impl.Dlanv2(a, b, c, d) - if n-j1-2 > 0 { - bi.Drot(n-j1-2, t[j1*ldt+j1+2:], 1, t[j2*ldt+j1+2:], 1, cs, sn) - } - if j1 > 0 { - bi.Drot(j1, t[j1:], ldt, t[j2:], ldt, cs, sn) - } - if wantq { - bi.Drot(n, q[j1:], ldq, q[j2:], ldq, cs, sn) - } - } - if n1 == 2 { - // Standardize new 2×2 block T22. - j3 := j1 + n2 - j4 := j3 + 1 - a, b := t[j3*ldt+j3], t[j3*ldt+j4] - c, d := t[j4*ldt+j3], t[j4*ldt+j4] - var cs, sn float64 - t[j3*ldt+j3], t[j3*ldt+j4], t[j4*ldt+j3], t[j4*ldt+j4], _, _, _, _, cs, sn = impl.Dlanv2(a, b, c, d) - if n-j3-2 > 0 { - bi.Drot(n-j3-2, t[j3*ldt+j3+2:], 1, t[j4*ldt+j3+2:], 1, cs, sn) - } - bi.Drot(j3, t[j3:], ldt, t[j4:], ldt, cs, sn) - if wantq { - bi.Drot(n, q[j3:], ldq, q[j4:], ldq, cs, sn) - } - } - - return true -} diff --git a/vendor/gonum.org/v1/gonum/lapack/gonum/dlags2.go b/vendor/gonum.org/v1/gonum/lapack/gonum/dlags2.go deleted file mode 100644 index 6954deb424..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/gonum/dlags2.go +++ /dev/null @@ -1,182 +0,0 @@ -// Copyright ©2017 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import "math" - -// Dlags2 computes 2-by-2 orthogonal matrices U, V and Q with the -// triangles of A and B specified by upper. -// -// If upper is true -// -// U^T*A*Q = U^T*[ a1 a2 ]*Q = [ x 0 ] -// [ 0 a3 ] [ x x ] -// and -// V^T*B*Q = V^T*[ b1 b2 ]*Q = [ x 0 ] -// [ 0 b3 ] [ x x ] -// -// otherwise -// -// U^T*A*Q = U^T*[ a1 0 ]*Q = [ x x ] -// [ a2 a3 ] [ 0 x ] -// and -// V^T*B*Q = V^T*[ b1 0 ]*Q = [ x x ] -// [ b2 b3 ] [ 0 x ]. -// -// The rows of the transformed A and B are parallel, where -// -// U = [ csu snu ], V = [ csv snv ], Q = [ csq snq ] -// [ -snu csu ] [ -snv csv ] [ -snq csq ] -// -// Dlags2 is an internal routine. It is exported for testing purposes. -func (impl Implementation) Dlags2(upper bool, a1, a2, a3, b1, b2, b3 float64) (csu, snu, csv, snv, csq, snq float64) { - if upper { - // Input matrices A and B are upper triangular matrices. - // - // Form matrix C = A*adj(B) = [ a b ] - // [ 0 d ] - a := a1 * b3 - d := a3 * b1 - b := a2*b1 - a1*b2 - - // The SVD of real 2-by-2 triangular C. - // - // [ csl -snl ]*[ a b ]*[ csr snr ] = [ r 0 ] - // [ snl csl ] [ 0 d ] [ -snr csr ] [ 0 t ] - _, _, snr, csr, snl, csl := impl.Dlasv2(a, b, d) - - if math.Abs(csl) >= math.Abs(snl) || math.Abs(csr) >= math.Abs(snr) { - // Compute the [0, 0] and [0, 1] elements of U^T*A and V^T*B, - // and [0, 1] element of |U|^T*|A| and |V|^T*|B|. - - ua11r := csl * a1 - ua12 := csl*a2 + snl*a3 - - vb11r := csr * b1 - vb12 := csr*b2 + snr*b3 - - aua12 := math.Abs(csl)*math.Abs(a2) + math.Abs(snl)*math.Abs(a3) - avb12 := math.Abs(csr)*math.Abs(b2) + math.Abs(snr)*math.Abs(b3) - - // Zero [0, 1] elements of U^T*A and V^T*B. - if math.Abs(ua11r)+math.Abs(ua12) != 0 { - if aua12/(math.Abs(ua11r)+math.Abs(ua12)) <= avb12/(math.Abs(vb11r)+math.Abs(vb12)) { - csq, snq, _ = impl.Dlartg(-ua11r, ua12) - } else { - csq, snq, _ = impl.Dlartg(-vb11r, vb12) - } - } else { - csq, snq, _ = impl.Dlartg(-vb11r, vb12) - } - - csu = csl - snu = -snl - csv = csr - snv = -snr - } else { - // Compute the [1, 0] and [1, 1] elements of U^T*A and V^T*B, - // and [1, 1] element of |U|^T*|A| and |V|^T*|B|. - - ua21 := -snl * a1 - ua22 := -snl*a2 + csl*a3 - - vb21 := -snr * b1 - vb22 := -snr*b2 + csr*b3 - - aua22 := math.Abs(snl)*math.Abs(a2) + math.Abs(csl)*math.Abs(a3) - avb22 := math.Abs(snr)*math.Abs(b2) + math.Abs(csr)*math.Abs(b3) - - // Zero [1, 1] elements of U^T*A and V^T*B, and then swap. - if math.Abs(ua21)+math.Abs(ua22) != 0 { - if aua22/(math.Abs(ua21)+math.Abs(ua22)) <= avb22/(math.Abs(vb21)+math.Abs(vb22)) { - csq, snq, _ = impl.Dlartg(-ua21, ua22) - } else { - csq, snq, _ = impl.Dlartg(-vb21, vb22) - } - } else { - csq, snq, _ = impl.Dlartg(-vb21, vb22) - } - - csu = snl - snu = csl - csv = snr - snv = csr - } - } else { - // Input matrices A and B are lower triangular matrices - // - // Form matrix C = A*adj(B) = [ a 0 ] - // [ c d ] - a := a1 * b3 - d := a3 * b1 - c := a2*b3 - a3*b2 - - // The SVD of real 2-by-2 triangular C - // - // [ csl -snl ]*[ a 0 ]*[ csr snr ] = [ r 0 ] - // [ snl csl ] [ c d ] [ -snr csr ] [ 0 t ] - _, _, snr, csr, snl, csl := impl.Dlasv2(a, c, d) - - if math.Abs(csr) >= math.Abs(snr) || math.Abs(csl) >= math.Abs(snl) { - // Compute the [1, 0] and [1, 1] elements of U^T*A and V^T*B, - // and [1, 0] element of |U|^T*|A| and |V|^T*|B|. - - ua21 := -snr*a1 + csr*a2 - ua22r := csr * a3 - - vb21 := -snl*b1 + csl*b2 - vb22r := csl * b3 - - aua21 := math.Abs(snr)*math.Abs(a1) + math.Abs(csr)*math.Abs(a2) - avb21 := math.Abs(snl)*math.Abs(b1) + math.Abs(csl)*math.Abs(b2) - - // Zero [1, 0] elements of U^T*A and V^T*B. - if (math.Abs(ua21) + math.Abs(ua22r)) != 0 { - if aua21/(math.Abs(ua21)+math.Abs(ua22r)) <= avb21/(math.Abs(vb21)+math.Abs(vb22r)) { - csq, snq, _ = impl.Dlartg(ua22r, ua21) - } else { - csq, snq, _ = impl.Dlartg(vb22r, vb21) - } - } else { - csq, snq, _ = impl.Dlartg(vb22r, vb21) - } - - csu = csr - snu = -snr - csv = csl - snv = -snl - } else { - // Compute the [0, 0] and [0, 1] elements of U^T *A and V^T *B, - // and [0, 0] element of |U|^T*|A| and |V|^T*|B|. - - ua11 := csr*a1 + snr*a2 - ua12 := snr * a3 - - vb11 := csl*b1 + snl*b2 - vb12 := snl * b3 - - aua11 := math.Abs(csr)*math.Abs(a1) + math.Abs(snr)*math.Abs(a2) - avb11 := math.Abs(csl)*math.Abs(b1) + math.Abs(snl)*math.Abs(b2) - - // Zero [0, 0] elements of U^T*A and V^T*B, and then swap. - if (math.Abs(ua11) + math.Abs(ua12)) != 0 { - if aua11/(math.Abs(ua11)+math.Abs(ua12)) <= avb11/(math.Abs(vb11)+math.Abs(vb12)) { - csq, snq, _ = impl.Dlartg(ua12, ua11) - } else { - csq, snq, _ = impl.Dlartg(vb12, vb11) - } - } else { - csq, snq, _ = impl.Dlartg(vb12, vb11) - } - - csu = snr - snu = csr - csv = snl - snv = csl - } - } - - return csu, snu, csv, snv, csq, snq -} diff --git a/vendor/gonum.org/v1/gonum/lapack/gonum/dlahqr.go b/vendor/gonum.org/v1/gonum/lapack/gonum/dlahqr.go deleted file mode 100644 index 00a869bce8..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/gonum/dlahqr.go +++ /dev/null @@ -1,431 +0,0 @@ -// Copyright ©2016 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import ( - "math" - - "gonum.org/v1/gonum/blas/blas64" -) - -// Dlahqr computes the eigenvalues and Schur factorization of a block of an n×n -// upper Hessenberg matrix H, using the double-shift/single-shift QR algorithm. -// -// h and ldh represent the matrix H. Dlahqr works primarily with the Hessenberg -// submatrix H[ilo:ihi+1,ilo:ihi+1], but applies transformations to all of H if -// wantt is true. It is assumed that H[ihi+1:n,ihi+1:n] is already upper -// quasi-triangular, although this is not checked. -// -// It must hold that -// 0 <= ilo <= max(0,ihi), and ihi < n, -// and that -// H[ilo,ilo-1] == 0, if ilo > 0, -// otherwise Dlahqr will panic. -// -// If unconverged is zero on return, wr[ilo:ihi+1] and wi[ilo:ihi+1] will contain -// respectively the real and imaginary parts of the computed eigenvalues ilo -// to ihi. If two eigenvalues are computed as a complex conjugate pair, they are -// stored in consecutive elements of wr and wi, say the i-th and (i+1)th, with -// wi[i] > 0 and wi[i+1] < 0. If wantt is true, the eigenvalues are stored in -// the same order as on the diagonal of the Schur form returned in H, with -// wr[i] = H[i,i], and, if H[i:i+2,i:i+2] is a 2×2 diagonal block, -// wi[i] = sqrt(abs(H[i+1,i]*H[i,i+1])) and wi[i+1] = -wi[i]. -// -// wr and wi must have length ihi+1. -// -// z and ldz represent an n×n matrix Z. If wantz is true, the transformations -// will be applied to the submatrix Z[iloz:ihiz+1,ilo:ihi+1] and it must hold that -// 0 <= iloz <= ilo, and ihi <= ihiz < n. -// If wantz is false, z is not referenced. -// -// unconverged indicates whether Dlahqr computed all the eigenvalues ilo to ihi -// in a total of 30 iterations per eigenvalue. -// -// If unconverged is zero, all the eigenvalues ilo to ihi have been computed and -// will be stored on return in wr[ilo:ihi+1] and wi[ilo:ihi+1]. -// -// If unconverged is zero and wantt is true, H[ilo:ihi+1,ilo:ihi+1] will be -// overwritten on return by upper quasi-triangular full Schur form with any -// 2×2 diagonal blocks in standard form. -// -// If unconverged is zero and if wantt is false, the contents of h on return is -// unspecified. -// -// If unconverged is positive, some eigenvalues have not converged, and -// wr[unconverged:ihi+1] and wi[unconverged:ihi+1] contain those eigenvalues -// which have been successfully computed. -// -// If unconverged is positive and wantt is true, then on return -// (initial H)*U = U*(final H), (*) -// where U is an orthogonal matrix. The final H is upper Hessenberg and -// H[unconverged:ihi+1,unconverged:ihi+1] is upper quasi-triangular. -// -// If unconverged is positive and wantt is false, on return the remaining -// unconverged eigenvalues are the eigenvalues of the upper Hessenberg matrix -// H[ilo:unconverged,ilo:unconverged]. -// -// If unconverged is positive and wantz is true, then on return -// (final Z) = (initial Z)*U, -// where U is the orthogonal matrix in (*) regardless of the value of wantt. -// -// Dlahqr is an internal routine. It is exported for testing purposes. -func (impl Implementation) Dlahqr(wantt, wantz bool, n, ilo, ihi int, h []float64, ldh int, wr, wi []float64, iloz, ihiz int, z []float64, ldz int) (unconverged int) { - switch { - case n < 0: - panic(nLT0) - case ilo < 0, max(0, ihi) < ilo: - panic(badIlo) - case ihi >= n: - panic(badIhi) - case ldh < max(1, n): - panic(badLdH) - case wantz && (iloz < 0 || ilo < iloz): - panic(badIloz) - case wantz && (ihiz < ihi || n <= ihiz): - panic(badIhiz) - case ldz < 1, wantz && ldz < n: - panic(badLdZ) - } - - // Quick return if possible. - if n == 0 { - return 0 - } - - switch { - case len(h) < (n-1)*ldh+n: - panic(shortH) - case len(wr) != ihi+1: - panic(shortWr) - case len(wi) != ihi+1: - panic(shortWi) - case wantz && len(z) < (n-1)*ldz+n: - panic(shortZ) - case ilo > 0 && h[ilo*ldh+ilo-1] != 0: - panic(notIsolated) - } - - if ilo == ihi { - wr[ilo] = h[ilo*ldh+ilo] - wi[ilo] = 0 - return 0 - } - - // Clear out the trash. - for j := ilo; j < ihi-2; j++ { - h[(j+2)*ldh+j] = 0 - h[(j+3)*ldh+j] = 0 - } - if ilo <= ihi-2 { - h[ihi*ldh+ihi-2] = 0 - } - - nh := ihi - ilo + 1 - nz := ihiz - iloz + 1 - - // Set machine-dependent constants for the stopping criterion. - ulp := dlamchP - smlnum := float64(nh) / ulp * dlamchS - - // i1 and i2 are the indices of the first row and last column of H to - // which transformations must be applied. If eigenvalues only are being - // computed, i1 and i2 are set inside the main loop. - var i1, i2 int - if wantt { - i1 = 0 - i2 = n - 1 - } - - itmax := 30 * max(10, nh) // Total number of QR iterations allowed. - - // The main loop begins here. i is the loop index and decreases from ihi - // to ilo in steps of 1 or 2. Each iteration of the loop works with the - // active submatrix in rows and columns l to i. Eigenvalues i+1 to ihi - // have already converged. Either l = ilo or H[l,l-1] is negligible so - // that the matrix splits. - bi := blas64.Implementation() - i := ihi - for i >= ilo { - l := ilo - - // Perform QR iterations on rows and columns ilo to i until a - // submatrix of order 1 or 2 splits off at the bottom because a - // subdiagonal element has become negligible. - converged := false - for its := 0; its <= itmax; its++ { - // Look for a single small subdiagonal element. - var k int - for k = i; k > l; k-- { - if math.Abs(h[k*ldh+k-1]) <= smlnum { - break - } - tst := math.Abs(h[(k-1)*ldh+k-1]) + math.Abs(h[k*ldh+k]) - if tst == 0 { - if k-2 >= ilo { - tst += math.Abs(h[(k-1)*ldh+k-2]) - } - if k+1 <= ihi { - tst += math.Abs(h[(k+1)*ldh+k]) - } - } - // The following is a conservative small - // subdiagonal deflation criterion due to Ahues - // & Tisseur (LAWN 122, 1997). It has better - // mathematical foundation and improves accuracy - // in some cases. - if math.Abs(h[k*ldh+k-1]) <= ulp*tst { - ab := math.Max(math.Abs(h[k*ldh+k-1]), math.Abs(h[(k-1)*ldh+k])) - ba := math.Min(math.Abs(h[k*ldh+k-1]), math.Abs(h[(k-1)*ldh+k])) - aa := math.Max(math.Abs(h[k*ldh+k]), math.Abs(h[(k-1)*ldh+k-1]-h[k*ldh+k])) - bb := math.Min(math.Abs(h[k*ldh+k]), math.Abs(h[(k-1)*ldh+k-1]-h[k*ldh+k])) - s := aa + ab - if ab/s*ba <= math.Max(smlnum, aa/s*bb*ulp) { - break - } - } - } - l = k - if l > ilo { - // H[l,l-1] is negligible. - h[l*ldh+l-1] = 0 - } - if l >= i-1 { - // Break the loop because a submatrix of order 1 - // or 2 has split off. - converged = true - break - } - - // Now the active submatrix is in rows and columns l to - // i. If eigenvalues only are being computed, only the - // active submatrix need be transformed. - if !wantt { - i1 = l - i2 = i - } - - const ( - dat1 = 3.0 - dat2 = -0.4375 - ) - var h11, h21, h12, h22 float64 - switch its { - case 10: // Exceptional shift. - s := math.Abs(h[(l+1)*ldh+l]) + math.Abs(h[(l+2)*ldh+l+1]) - h11 = dat1*s + h[l*ldh+l] - h12 = dat2 * s - h21 = s - h22 = h11 - case 20: // Exceptional shift. - s := math.Abs(h[i*ldh+i-1]) + math.Abs(h[(i-1)*ldh+i-2]) - h11 = dat1*s + h[i*ldh+i] - h12 = dat2 * s - h21 = s - h22 = h11 - default: // Prepare to use Francis' double shift (i.e., - // 2nd degree generalized Rayleigh quotient). - h11 = h[(i-1)*ldh+i-1] - h21 = h[i*ldh+i-1] - h12 = h[(i-1)*ldh+i] - h22 = h[i*ldh+i] - } - s := math.Abs(h11) + math.Abs(h12) + math.Abs(h21) + math.Abs(h22) - var ( - rt1r, rt1i float64 - rt2r, rt2i float64 - ) - if s != 0 { - h11 /= s - h21 /= s - h12 /= s - h22 /= s - tr := (h11 + h22) / 2 - det := (h11-tr)*(h22-tr) - h12*h21 - rtdisc := math.Sqrt(math.Abs(det)) - if det >= 0 { - // Complex conjugate shifts. - rt1r = tr * s - rt2r = rt1r - rt1i = rtdisc * s - rt2i = -rt1i - } else { - // Real shifts (use only one of them). - rt1r = tr + rtdisc - rt2r = tr - rtdisc - if math.Abs(rt1r-h22) <= math.Abs(rt2r-h22) { - rt1r *= s - rt2r = rt1r - } else { - rt2r *= s - rt1r = rt2r - } - rt1i = 0 - rt2i = 0 - } - } - - // Look for two consecutive small subdiagonal elements. - var m int - var v [3]float64 - for m = i - 2; m >= l; m-- { - // Determine the effect of starting the - // double-shift QR iteration at row m, and see - // if this would make H[m,m-1] negligible. The - // following uses scaling to avoid overflows and - // most underflows. - h21s := h[(m+1)*ldh+m] - s := math.Abs(h[m*ldh+m]-rt2r) + math.Abs(rt2i) + math.Abs(h21s) - h21s /= s - v[0] = h21s*h[m*ldh+m+1] + (h[m*ldh+m]-rt1r)*((h[m*ldh+m]-rt2r)/s) - rt2i/s*rt1i - v[1] = h21s * (h[m*ldh+m] + h[(m+1)*ldh+m+1] - rt1r - rt2r) - v[2] = h21s * h[(m+2)*ldh+m+1] - s = math.Abs(v[0]) + math.Abs(v[1]) + math.Abs(v[2]) - v[0] /= s - v[1] /= s - v[2] /= s - if m == l { - break - } - dsum := math.Abs(h[(m-1)*ldh+m-1]) + math.Abs(h[m*ldh+m]) + math.Abs(h[(m+1)*ldh+m+1]) - if math.Abs(h[m*ldh+m-1])*(math.Abs(v[1])+math.Abs(v[2])) <= ulp*math.Abs(v[0])*dsum { - break - } - } - - // Double-shift QR step. - for k := m; k < i; k++ { - // The first iteration of this loop determines a - // reflection G from the vector V and applies it - // from left and right to H, thus creating a - // non-zero bulge below the subdiagonal. - // - // Each subsequent iteration determines a - // reflection G to restore the Hessenberg form - // in the (k-1)th column, and thus chases the - // bulge one step toward the bottom of the - // active submatrix. nr is the order of G. - - nr := min(3, i-k+1) - if k > m { - bi.Dcopy(nr, h[k*ldh+k-1:], ldh, v[:], 1) - } - var t0 float64 - v[0], t0 = impl.Dlarfg(nr, v[0], v[1:], 1) - if k > m { - h[k*ldh+k-1] = v[0] - h[(k+1)*ldh+k-1] = 0 - if k < i-1 { - h[(k+2)*ldh+k-1] = 0 - } - } else if m > l { - // Use the following instead of H[k,k-1] = -H[k,k-1] - // to avoid a bug when v[1] and v[2] underflow. - h[k*ldh+k-1] *= 1 - t0 - } - t1 := t0 * v[1] - if nr == 3 { - t2 := t0 * v[2] - - // Apply G from the left to transform - // the rows of the matrix in columns k - // to i2. - for j := k; j <= i2; j++ { - sum := h[k*ldh+j] + v[1]*h[(k+1)*ldh+j] + v[2]*h[(k+2)*ldh+j] - h[k*ldh+j] -= sum * t0 - h[(k+1)*ldh+j] -= sum * t1 - h[(k+2)*ldh+j] -= sum * t2 - } - - // Apply G from the right to transform - // the columns of the matrix in rows i1 - // to min(k+3,i). - for j := i1; j <= min(k+3, i); j++ { - sum := h[j*ldh+k] + v[1]*h[j*ldh+k+1] + v[2]*h[j*ldh+k+2] - h[j*ldh+k] -= sum * t0 - h[j*ldh+k+1] -= sum * t1 - h[j*ldh+k+2] -= sum * t2 - } - - if wantz { - // Accumulate transformations in the matrix Z. - for j := iloz; j <= ihiz; j++ { - sum := z[j*ldz+k] + v[1]*z[j*ldz+k+1] + v[2]*z[j*ldz+k+2] - z[j*ldz+k] -= sum * t0 - z[j*ldz+k+1] -= sum * t1 - z[j*ldz+k+2] -= sum * t2 - } - } - } else if nr == 2 { - // Apply G from the left to transform - // the rows of the matrix in columns k - // to i2. - for j := k; j <= i2; j++ { - sum := h[k*ldh+j] + v[1]*h[(k+1)*ldh+j] - h[k*ldh+j] -= sum * t0 - h[(k+1)*ldh+j] -= sum * t1 - } - - // Apply G from the right to transform - // the columns of the matrix in rows i1 - // to min(k+3,i). - for j := i1; j <= i; j++ { - sum := h[j*ldh+k] + v[1]*h[j*ldh+k+1] - h[j*ldh+k] -= sum * t0 - h[j*ldh+k+1] -= sum * t1 - } - - if wantz { - // Accumulate transformations in the matrix Z. - for j := iloz; j <= ihiz; j++ { - sum := z[j*ldz+k] + v[1]*z[j*ldz+k+1] - z[j*ldz+k] -= sum * t0 - z[j*ldz+k+1] -= sum * t1 - } - } - } - } - } - - if !converged { - // The QR iteration finished without splitting off a - // submatrix of order 1 or 2. - return i + 1 - } - - if l == i { - // H[i,i-1] is negligible: one eigenvalue has converged. - wr[i] = h[i*ldh+i] - wi[i] = 0 - } else if l == i-1 { - // H[i-1,i-2] is negligible: a pair of eigenvalues have converged. - - // Transform the 2×2 submatrix to standard Schur form, - // and compute and store the eigenvalues. - var cs, sn float64 - a, b := h[(i-1)*ldh+i-1], h[(i-1)*ldh+i] - c, d := h[i*ldh+i-1], h[i*ldh+i] - a, b, c, d, wr[i-1], wi[i-1], wr[i], wi[i], cs, sn = impl.Dlanv2(a, b, c, d) - h[(i-1)*ldh+i-1], h[(i-1)*ldh+i] = a, b - h[i*ldh+i-1], h[i*ldh+i] = c, d - - if wantt { - // Apply the transformation to the rest of H. - if i2 > i { - bi.Drot(i2-i, h[(i-1)*ldh+i+1:], 1, h[i*ldh+i+1:], 1, cs, sn) - } - bi.Drot(i-i1-1, h[i1*ldh+i-1:], ldh, h[i1*ldh+i:], ldh, cs, sn) - } - - if wantz { - // Apply the transformation to Z. - bi.Drot(nz, z[iloz*ldz+i-1:], ldz, z[iloz*ldz+i:], ldz, cs, sn) - } - } - - // Return to start of the main loop with new value of i. - i = l - 1 - } - return 0 -} diff --git a/vendor/gonum.org/v1/gonum/lapack/gonum/dlahr2.go b/vendor/gonum.org/v1/gonum/lapack/gonum/dlahr2.go deleted file mode 100644 index a47dc8fed1..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/gonum/dlahr2.go +++ /dev/null @@ -1,195 +0,0 @@ -// Copyright ©2016 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import ( - "gonum.org/v1/gonum/blas" - "gonum.org/v1/gonum/blas/blas64" -) - -// Dlahr2 reduces the first nb columns of a real general n×(n-k+1) matrix A so -// that elements below the k-th subdiagonal are zero. The reduction is performed -// by an orthogonal similarity transformation Q^T * A * Q. Dlahr2 returns the -// matrices V and T which determine Q as a block reflector I - V*T*V^T, and -// also the matrix Y = A * V * T. -// -// The matrix Q is represented as a product of nb elementary reflectors -// Q = H_0 * H_1 * ... * H_{nb-1}. -// Each H_i has the form -// H_i = I - tau[i] * v * v^T, -// where v is a real vector with v[0:i+k-1] = 0 and v[i+k-1] = 1. v[i+k:n] is -// stored on exit in A[i+k+1:n,i]. -// -// The elements of the vectors v together form the (n-k+1)×nb matrix -// V which is needed, with T and Y, to apply the transformation to the -// unreduced part of the matrix, using an update of the form -// A = (I - V*T*V^T) * (A - Y*V^T). -// -// On entry, a contains the n×(n-k+1) general matrix A. On return, the elements -// on and above the k-th subdiagonal in the first nb columns are overwritten -// with the corresponding elements of the reduced matrix; the elements below the -// k-th subdiagonal, with the slice tau, represent the matrix Q as a product of -// elementary reflectors. The other columns of A are unchanged. -// -// The contents of A on exit are illustrated by the following example -// with n = 7, k = 3 and nb = 2: -// [ a a a a a ] -// [ a a a a a ] -// [ a a a a a ] -// [ h h a a a ] -// [ v0 h a a a ] -// [ v0 v1 a a a ] -// [ v0 v1 a a a ] -// where a denotes an element of the original matrix A, h denotes a -// modified element of the upper Hessenberg matrix H, and vi denotes an -// element of the vector defining H_i. -// -// k is the offset for the reduction. Elements below the k-th subdiagonal in the -// first nb columns are reduced to zero. -// -// nb is the number of columns to be reduced. -// -// On entry, a represents the n×(n-k+1) matrix A. On return, the elements on and -// above the k-th subdiagonal in the first nb columns are overwritten with the -// corresponding elements of the reduced matrix. The elements below the k-th -// subdiagonal, with the slice tau, represent the matrix Q as a product of -// elementary reflectors. The other columns of A are unchanged. -// -// tau will contain the scalar factors of the elementary reflectors. It must -// have length at least nb. -// -// t and ldt represent the nb×nb upper triangular matrix T, and y and ldy -// represent the n×nb matrix Y. -// -// Dlahr2 is an internal routine. It is exported for testing purposes. -func (impl Implementation) Dlahr2(n, k, nb int, a []float64, lda int, tau, t []float64, ldt int, y []float64, ldy int) { - switch { - case n < 0: - panic(nLT0) - case k < 0: - panic(kLT0) - case nb < 0: - panic(nbLT0) - case nb > n: - panic(nbGTN) - case lda < max(1, n-k+1): - panic(badLdA) - case ldt < max(1, nb): - panic(badLdT) - case ldy < max(1, nb): - panic(badLdY) - } - - // Quick return if possible. - if n < 0 { - return - } - - switch { - case len(a) < (n-1)*lda+n-k+1: - panic(shortA) - case len(tau) < nb: - panic(shortTau) - case len(t) < (nb-1)*ldt+nb: - panic(shortT) - case len(y) < (n-1)*ldy+nb: - panic(shortY) - } - - // Quick return if possible. - if n == 1 { - return - } - - bi := blas64.Implementation() - var ei float64 - for i := 0; i < nb; i++ { - if i > 0 { - // Update A[k:n,i]. - - // Update i-th column of A - Y * V^T. - bi.Dgemv(blas.NoTrans, n-k, i, - -1, y[k*ldy:], ldy, - a[(k+i-1)*lda:], 1, - 1, a[k*lda+i:], lda) - - // Apply I - V * T^T * V^T to this column (call it b) - // from the left, using the last column of T as - // workspace. - // Let V = [ V1 ] and b = [ b1 ] (first i rows) - // [ V2 ] [ b2 ] - // where V1 is unit lower triangular. - // - // w := V1^T * b1. - bi.Dcopy(i, a[k*lda+i:], lda, t[nb-1:], ldt) - bi.Dtrmv(blas.Lower, blas.Trans, blas.Unit, i, - a[k*lda:], lda, t[nb-1:], ldt) - - // w := w + V2^T * b2. - bi.Dgemv(blas.Trans, n-k-i, i, - 1, a[(k+i)*lda:], lda, - a[(k+i)*lda+i:], lda, - 1, t[nb-1:], ldt) - - // w := T^T * w. - bi.Dtrmv(blas.Upper, blas.Trans, blas.NonUnit, i, - t, ldt, t[nb-1:], ldt) - - // b2 := b2 - V2*w. - bi.Dgemv(blas.NoTrans, n-k-i, i, - -1, a[(k+i)*lda:], lda, - t[nb-1:], ldt, - 1, a[(k+i)*lda+i:], lda) - - // b1 := b1 - V1*w. - bi.Dtrmv(blas.Lower, blas.NoTrans, blas.Unit, i, - a[k*lda:], lda, t[nb-1:], ldt) - bi.Daxpy(i, -1, t[nb-1:], ldt, a[k*lda+i:], lda) - - a[(k+i-1)*lda+i-1] = ei - } - - // Generate the elementary reflector H_i to annihilate - // A[k+i+1:n,i]. - ei, tau[i] = impl.Dlarfg(n-k-i, a[(k+i)*lda+i], a[min(k+i+1, n-1)*lda+i:], lda) - a[(k+i)*lda+i] = 1 - - // Compute Y[k:n,i]. - bi.Dgemv(blas.NoTrans, n-k, n-k-i, - 1, a[k*lda+i+1:], lda, - a[(k+i)*lda+i:], lda, - 0, y[k*ldy+i:], ldy) - bi.Dgemv(blas.Trans, n-k-i, i, - 1, a[(k+i)*lda:], lda, - a[(k+i)*lda+i:], lda, - 0, t[i:], ldt) - bi.Dgemv(blas.NoTrans, n-k, i, - -1, y[k*ldy:], ldy, - t[i:], ldt, - 1, y[k*ldy+i:], ldy) - bi.Dscal(n-k, tau[i], y[k*ldy+i:], ldy) - - // Compute T[0:i,i]. - bi.Dscal(i, -tau[i], t[i:], ldt) - bi.Dtrmv(blas.Upper, blas.NoTrans, blas.NonUnit, i, - t, ldt, t[i:], ldt) - - t[i*ldt+i] = tau[i] - } - a[(k+nb-1)*lda+nb-1] = ei - - // Compute Y[0:k,0:nb]. - impl.Dlacpy(blas.All, k, nb, a[1:], lda, y, ldy) - bi.Dtrmm(blas.Right, blas.Lower, blas.NoTrans, blas.Unit, k, nb, - 1, a[k*lda:], lda, y, ldy) - if n > k+nb { - bi.Dgemm(blas.NoTrans, blas.NoTrans, k, nb, n-k-nb, - 1, a[1+nb:], lda, - a[(k+nb)*lda:], lda, - 1, y, ldy) - } - bi.Dtrmm(blas.Right, blas.Upper, blas.NoTrans, blas.NonUnit, k, nb, - 1, t, ldt, y, ldy) -} diff --git a/vendor/gonum.org/v1/gonum/lapack/gonum/dlaln2.go b/vendor/gonum.org/v1/gonum/lapack/gonum/dlaln2.go deleted file mode 100644 index ca0b2f78c8..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/gonum/dlaln2.go +++ /dev/null @@ -1,405 +0,0 @@ -// Copyright ©2016 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import "math" - -// Dlaln2 solves a linear equation or a system of 2 linear equations of the form -// (ca A - w D) X = scale B, if trans == false, -// (ca A^T - w D) X = scale B, if trans == true, -// where A is a na×na real matrix, ca is a real scalar, D is a na×na diagonal -// real matrix, w is a scalar, real if nw == 1, complex if nw == 2, and X and B -// are na×1 matrices, real if w is real, complex if w is complex. -// -// If w is complex, X and B are represented as na×2 matrices, the first column -// of each being the real part and the second being the imaginary part. -// -// na and nw must be 1 or 2, otherwise Dlaln2 will panic. -// -// d1 and d2 are the diagonal elements of D. d2 is not used if na == 1. -// -// wr and wi represent the real and imaginary part, respectively, of the scalar -// w. wi is not used if nw == 1. -// -// smin is the desired lower bound on the singular values of A. This should be -// a safe distance away from underflow or overflow, say, between -// (underflow/machine precision) and (overflow*machine precision). -// -// If both singular values of (ca A - w D) are less than smin, smin*identity -// will be used instead of (ca A - w D). If only one singular value is less than -// smin, one element of (ca A - w D) will be perturbed enough to make the -// smallest singular value roughly smin. If both singular values are at least -// smin, (ca A - w D) will not be perturbed. In any case, the perturbation will -// be at most some small multiple of max(smin, ulp*norm(ca A - w D)). The -// singular values are computed by infinity-norm approximations, and thus will -// only be correct to a factor of 2 or so. -// -// All input quantities are assumed to be smaller than overflow by a reasonable -// factor. -// -// scale is a scaling factor less than or equal to 1 which is chosen so that X -// can be computed without overflow. X is further scaled if necessary to assure -// that norm(ca A - w D)*norm(X) is less than overflow. -// -// xnorm contains the infinity-norm of X when X is regarded as a na×nw real -// matrix. -// -// ok will be false if (ca A - w D) had to be perturbed to make its smallest -// singular value greater than smin, otherwise ok will be true. -// -// Dlaln2 is an internal routine. It is exported for testing purposes. -func (impl Implementation) Dlaln2(trans bool, na, nw int, smin, ca float64, a []float64, lda int, d1, d2 float64, b []float64, ldb int, wr, wi float64, x []float64, ldx int) (scale, xnorm float64, ok bool) { - // TODO(vladimir-ch): Consider splitting this function into two, one - // handling the real case (nw == 1) and the other handling the complex - // case (nw == 2). Given that Go has complex types, their signatures - // would be simpler and more natural, and the implementation not as - // convoluted. - - switch { - case na != 1 && na != 2: - panic(badNa) - case nw != 1 && nw != 2: - panic(badNw) - case lda < na: - panic(badLdA) - case len(a) < (na-1)*lda+na: - panic(shortA) - case ldb < nw: - panic(badLdB) - case len(b) < (na-1)*ldb+nw: - panic(shortB) - case ldx < nw: - panic(badLdX) - case len(x) < (na-1)*ldx+nw: - panic(shortX) - } - - smlnum := 2 * dlamchS - bignum := 1 / smlnum - smini := math.Max(smin, smlnum) - - ok = true - scale = 1 - - if na == 1 { - // 1×1 (i.e., scalar) system C X = B. - - if nw == 1 { - // Real 1×1 system. - - // C = ca A - w D. - csr := ca*a[0] - wr*d1 - cnorm := math.Abs(csr) - - // If |C| < smini, use C = smini. - if cnorm < smini { - csr = smini - cnorm = smini - ok = false - } - - // Check scaling for X = B / C. - bnorm := math.Abs(b[0]) - if cnorm < 1 && bnorm > math.Max(1, bignum*cnorm) { - scale = 1 / bnorm - } - - // Compute X. - x[0] = b[0] * scale / csr - xnorm = math.Abs(x[0]) - - return scale, xnorm, ok - } - - // Complex 1×1 system (w is complex). - - // C = ca A - w D. - csr := ca*a[0] - wr*d1 - csi := -wi * d1 - cnorm := math.Abs(csr) + math.Abs(csi) - - // If |C| < smini, use C = smini. - if cnorm < smini { - csr = smini - csi = 0 - cnorm = smini - ok = false - } - - // Check scaling for X = B / C. - bnorm := math.Abs(b[0]) + math.Abs(b[1]) - if cnorm < 1 && bnorm > math.Max(1, bignum*cnorm) { - scale = 1 / bnorm - } - - // Compute X. - cx := complex(scale*b[0], scale*b[1]) / complex(csr, csi) - x[0], x[1] = real(cx), imag(cx) - xnorm = math.Abs(x[0]) + math.Abs(x[1]) - - return scale, xnorm, ok - } - - // 2×2 system. - - // Compute the real part of - // C = ca A - w D - // or - // C = ca A^T - w D. - crv := [4]float64{ - ca*a[0] - wr*d1, - ca * a[1], - ca * a[lda], - ca*a[lda+1] - wr*d2, - } - if trans { - crv[1] = ca * a[lda] - crv[2] = ca * a[1] - } - - pivot := [4][4]int{ - {0, 1, 2, 3}, - {1, 0, 3, 2}, - {2, 3, 0, 1}, - {3, 2, 1, 0}, - } - - if nw == 1 { - // Real 2×2 system (w is real). - - // Find the largest element in C. - var cmax float64 - var icmax int - for j, v := range crv { - v = math.Abs(v) - if v > cmax { - cmax = v - icmax = j - } - } - - // If norm(C) < smini, use smini*identity. - if cmax < smini { - bnorm := math.Max(math.Abs(b[0]), math.Abs(b[ldb])) - if smini < 1 && bnorm > math.Max(1, bignum*smini) { - scale = 1 / bnorm - } - temp := scale / smini - x[0] = temp * b[0] - x[ldx] = temp * b[ldb] - xnorm = temp * bnorm - ok = false - - return scale, xnorm, ok - } - - // Gaussian elimination with complete pivoting. - // Form upper triangular matrix - // [ur11 ur12] - // [ 0 ur22] - ur11 := crv[icmax] - ur12 := crv[pivot[icmax][1]] - cr21 := crv[pivot[icmax][2]] - cr22 := crv[pivot[icmax][3]] - ur11r := 1 / ur11 - lr21 := ur11r * cr21 - ur22 := cr22 - ur12*lr21 - - // If smaller pivot < smini, use smini. - if math.Abs(ur22) < smini { - ur22 = smini - ok = false - } - - var br1, br2 float64 - if icmax > 1 { - // If the pivot lies in the second row, swap the rows. - br1 = b[ldb] - br2 = b[0] - } else { - br1 = b[0] - br2 = b[ldb] - } - br2 -= lr21 * br1 // Apply the Gaussian elimination step to the right-hand side. - - bbnd := math.Max(math.Abs(ur22*ur11r*br1), math.Abs(br2)) - if bbnd > 1 && math.Abs(ur22) < 1 && bbnd >= bignum*math.Abs(ur22) { - scale = 1 / bbnd - } - - // Solve the linear system ur*xr=br. - xr2 := br2 * scale / ur22 - xr1 := scale*br1*ur11r - ur11r*ur12*xr2 - if icmax&0x1 != 0 { - // If the pivot lies in the second column, swap the components of the solution. - x[0] = xr2 - x[ldx] = xr1 - } else { - x[0] = xr1 - x[ldx] = xr2 - } - xnorm = math.Max(math.Abs(xr1), math.Abs(xr2)) - - // Further scaling if norm(A)*norm(X) > overflow. - if xnorm > 1 && cmax > 1 && xnorm > bignum/cmax { - temp := cmax / bignum - x[0] *= temp - x[ldx] *= temp - xnorm *= temp - scale *= temp - } - - return scale, xnorm, ok - } - - // Complex 2×2 system (w is complex). - - // Find the largest element in C. - civ := [4]float64{ - -wi * d1, - 0, - 0, - -wi * d2, - } - var cmax float64 - var icmax int - for j, v := range crv { - v := math.Abs(v) - if v+math.Abs(civ[j]) > cmax { - cmax = v + math.Abs(civ[j]) - icmax = j - } - } - - // If norm(C) < smini, use smini*identity. - if cmax < smini { - br1 := math.Abs(b[0]) + math.Abs(b[1]) - br2 := math.Abs(b[ldb]) + math.Abs(b[ldb+1]) - bnorm := math.Max(br1, br2) - if smini < 1 && bnorm > 1 && bnorm > bignum*smini { - scale = 1 / bnorm - } - temp := scale / smini - x[0] = temp * b[0] - x[1] = temp * b[1] - x[ldb] = temp * b[ldb] - x[ldb+1] = temp * b[ldb+1] - xnorm = temp * bnorm - ok = false - - return scale, xnorm, ok - } - - // Gaussian elimination with complete pivoting. - ur11 := crv[icmax] - ui11 := civ[icmax] - ur12 := crv[pivot[icmax][1]] - ui12 := civ[pivot[icmax][1]] - cr21 := crv[pivot[icmax][2]] - ci21 := civ[pivot[icmax][2]] - cr22 := crv[pivot[icmax][3]] - ci22 := civ[pivot[icmax][3]] - var ( - ur11r, ui11r float64 - lr21, li21 float64 - ur12s, ui12s float64 - ur22, ui22 float64 - ) - if icmax == 0 || icmax == 3 { - // Off-diagonals of pivoted C are real. - if math.Abs(ur11) > math.Abs(ui11) { - temp := ui11 / ur11 - ur11r = 1 / (ur11 * (1 + temp*temp)) - ui11r = -temp * ur11r - } else { - temp := ur11 / ui11 - ui11r = -1 / (ui11 * (1 + temp*temp)) - ur11r = -temp * ui11r - } - lr21 = cr21 * ur11r - li21 = cr21 * ui11r - ur12s = ur12 * ur11r - ui12s = ur12 * ui11r - ur22 = cr22 - ur12*lr21 - ui22 = ci22 - ur12*li21 - } else { - // Diagonals of pivoted C are real. - ur11r = 1 / ur11 - // ui11r is already 0. - lr21 = cr21 * ur11r - li21 = ci21 * ur11r - ur12s = ur12 * ur11r - ui12s = ui12 * ur11r - ur22 = cr22 - ur12*lr21 + ui12*li21 - ui22 = -ur12*li21 - ui12*lr21 - } - u22abs := math.Abs(ur22) + math.Abs(ui22) - - // If smaller pivot < smini, use smini. - if u22abs < smini { - ur22 = smini - ui22 = 0 - ok = false - } - - var br1, bi1 float64 - var br2, bi2 float64 - if icmax > 1 { - // If the pivot lies in the second row, swap the rows. - br1 = b[ldb] - bi1 = b[ldb+1] - br2 = b[0] - bi2 = b[1] - } else { - br1 = b[0] - bi1 = b[1] - br2 = b[ldb] - bi2 = b[ldb+1] - } - br2 += -lr21*br1 + li21*bi1 - bi2 += -li21*br1 - lr21*bi1 - - bbnd1 := u22abs * (math.Abs(ur11r) + math.Abs(ui11r)) * (math.Abs(br1) + math.Abs(bi1)) - bbnd2 := math.Abs(br2) + math.Abs(bi2) - bbnd := math.Max(bbnd1, bbnd2) - if bbnd > 1 && u22abs < 1 && bbnd >= bignum*u22abs { - scale = 1 / bbnd - br1 *= scale - bi1 *= scale - br2 *= scale - bi2 *= scale - } - - cx2 := complex(br2, bi2) / complex(ur22, ui22) - xr2, xi2 := real(cx2), imag(cx2) - xr1 := ur11r*br1 - ui11r*bi1 - ur12s*xr2 + ui12s*xi2 - xi1 := ui11r*br1 + ur11r*bi1 - ui12s*xr2 - ur12s*xi2 - if icmax&0x1 != 0 { - // If the pivot lies in the second column, swap the components of the solution. - x[0] = xr2 - x[1] = xi2 - x[ldx] = xr1 - x[ldx+1] = xi1 - } else { - x[0] = xr1 - x[1] = xi1 - x[ldx] = xr2 - x[ldx+1] = xi2 - } - xnorm = math.Max(math.Abs(xr1)+math.Abs(xi1), math.Abs(xr2)+math.Abs(xi2)) - - // Further scaling if norm(A)*norm(X) > overflow. - if xnorm > 1 && cmax > 1 && xnorm > bignum/cmax { - temp := cmax / bignum - x[0] *= temp - x[1] *= temp - x[ldx] *= temp - x[ldx+1] *= temp - xnorm *= temp - scale *= temp - } - - return scale, xnorm, ok -} diff --git a/vendor/gonum.org/v1/gonum/lapack/gonum/dlange.go b/vendor/gonum.org/v1/gonum/lapack/gonum/dlange.go deleted file mode 100644 index 9edfa83c43..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/gonum/dlange.go +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright ©2015 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import ( - "math" - - "gonum.org/v1/gonum/lapack" -) - -// Dlange computes the matrix norm of the general m×n matrix a. The input norm -// specifies the norm computed. -// lapack.MaxAbs: the maximum absolute value of an element. -// lapack.MaxColumnSum: the maximum column sum of the absolute values of the entries. -// lapack.MaxRowSum: the maximum row sum of the absolute values of the entries. -// lapack.Frobenius: the square root of the sum of the squares of the entries. -// If norm == lapack.MaxColumnSum, work must be of length n, and this function will panic otherwise. -// There are no restrictions on work for the other matrix norms. -func (impl Implementation) Dlange(norm lapack.MatrixNorm, m, n int, a []float64, lda int, work []float64) float64 { - // TODO(btracey): These should probably be refactored to use BLAS calls. - switch { - case norm != lapack.MaxRowSum && norm != lapack.MaxColumnSum && norm != lapack.Frobenius && norm != lapack.MaxAbs: - panic(badNorm) - case lda < max(1, n): - panic(badLdA) - } - - // Quick return if possible. - if m == 0 || n == 0 { - return 0 - } - - switch { - case len(a) < (m-1)*lda+n: - panic(badLdA) - case norm == lapack.MaxColumnSum && len(work) < n: - panic(shortWork) - } - - if norm == lapack.MaxAbs { - var value float64 - for i := 0; i < m; i++ { - for j := 0; j < n; j++ { - value = math.Max(value, math.Abs(a[i*lda+j])) - } - } - return value - } - if norm == lapack.MaxColumnSum { - if len(work) < n { - panic(shortWork) - } - for i := 0; i < n; i++ { - work[i] = 0 - } - for i := 0; i < m; i++ { - for j := 0; j < n; j++ { - work[j] += math.Abs(a[i*lda+j]) - } - } - var value float64 - for i := 0; i < n; i++ { - value = math.Max(value, work[i]) - } - return value - } - if norm == lapack.MaxRowSum { - var value float64 - for i := 0; i < m; i++ { - var sum float64 - for j := 0; j < n; j++ { - sum += math.Abs(a[i*lda+j]) - } - value = math.Max(value, sum) - } - return value - } - // norm == lapack.Frobenius - var value float64 - scale := 0.0 - sum := 1.0 - for i := 0; i < m; i++ { - scale, sum = impl.Dlassq(n, a[i*lda:], 1, scale, sum) - } - value = scale * math.Sqrt(sum) - return value -} diff --git a/vendor/gonum.org/v1/gonum/lapack/gonum/dlanst.go b/vendor/gonum.org/v1/gonum/lapack/gonum/dlanst.go deleted file mode 100644 index 9ca1897e34..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/gonum/dlanst.go +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright ©2016 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import ( - "math" - - "gonum.org/v1/gonum/lapack" -) - -// Dlanst computes the specified norm of a symmetric tridiagonal matrix A. -// The diagonal elements of A are stored in d and the off-diagonal elements -// are stored in e. -func (impl Implementation) Dlanst(norm lapack.MatrixNorm, n int, d, e []float64) float64 { - switch { - case norm != lapack.MaxRowSum && norm != lapack.MaxColumnSum && norm != lapack.Frobenius && norm != lapack.MaxAbs: - panic(badNorm) - case n < 0: - panic(nLT0) - } - if n == 0 { - return 0 - } - switch { - case len(d) < n: - panic(shortD) - case len(e) < n-1: - panic(shortE) - } - - switch norm { - default: - panic(badNorm) - case lapack.MaxAbs: - anorm := math.Abs(d[n-1]) - for i := 0; i < n-1; i++ { - sum := math.Abs(d[i]) - if anorm < sum || math.IsNaN(sum) { - anorm = sum - } - sum = math.Abs(e[i]) - if anorm < sum || math.IsNaN(sum) { - anorm = sum - } - } - return anorm - case lapack.MaxColumnSum, lapack.MaxRowSum: - if n == 1 { - return math.Abs(d[0]) - } - anorm := math.Abs(d[0]) + math.Abs(e[0]) - sum := math.Abs(e[n-2]) + math.Abs(d[n-1]) - if anorm < sum || math.IsNaN(sum) { - anorm = sum - } - for i := 1; i < n-1; i++ { - sum := math.Abs(d[i]) + math.Abs(e[i]) + math.Abs(e[i-1]) - if anorm < sum || math.IsNaN(sum) { - anorm = sum - } - } - return anorm - case lapack.Frobenius: - var scale float64 - sum := 1.0 - if n > 1 { - scale, sum = impl.Dlassq(n-1, e, 1, scale, sum) - sum = 2 * sum - } - scale, sum = impl.Dlassq(n, d, 1, scale, sum) - return scale * math.Sqrt(sum) - } -} diff --git a/vendor/gonum.org/v1/gonum/lapack/gonum/dlansy.go b/vendor/gonum.org/v1/gonum/lapack/gonum/dlansy.go deleted file mode 100644 index 97ba5b2438..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/gonum/dlansy.go +++ /dev/null @@ -1,132 +0,0 @@ -// Copyright ©2015 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import ( - "math" - - "gonum.org/v1/gonum/blas" - "gonum.org/v1/gonum/lapack" -) - -// Dlansy computes the specified norm of an n×n symmetric matrix. If -// norm == lapack.MaxColumnSum or norm == lapackMaxRowSum work must have length -// at least n, otherwise work is unused. -func (impl Implementation) Dlansy(norm lapack.MatrixNorm, uplo blas.Uplo, n int, a []float64, lda int, work []float64) float64 { - switch { - case norm != lapack.MaxRowSum && norm != lapack.MaxColumnSum && norm != lapack.Frobenius && norm != lapack.MaxAbs: - panic(badNorm) - case uplo != blas.Upper && uplo != blas.Lower: - panic(badUplo) - case n < 0: - panic(nLT0) - case lda < max(1, n): - panic(badLdA) - } - - // Quick return if possible. - if n == 0 { - return 0 - } - - switch { - case len(a) < (n-1)*lda+n: - panic(shortA) - case (norm == lapack.MaxColumnSum || norm == lapack.MaxRowSum) && len(work) < n: - panic(shortWork) - } - - switch norm { - default: - panic(badNorm) - case lapack.MaxAbs: - if uplo == blas.Upper { - var max float64 - for i := 0; i < n; i++ { - for j := i; j < n; j++ { - v := math.Abs(a[i*lda+j]) - if math.IsNaN(v) { - return math.NaN() - } - if v > max { - max = v - } - } - } - return max - } - var max float64 - for i := 0; i < n; i++ { - for j := 0; j <= i; j++ { - v := math.Abs(a[i*lda+j]) - if math.IsNaN(v) { - return math.NaN() - } - if v > max { - max = v - } - } - } - return max - case lapack.MaxRowSum, lapack.MaxColumnSum: - // A symmetric matrix has the same 1-norm and ∞-norm. - for i := 0; i < n; i++ { - work[i] = 0 - } - if uplo == blas.Upper { - for i := 0; i < n; i++ { - work[i] += math.Abs(a[i*lda+i]) - for j := i + 1; j < n; j++ { - v := math.Abs(a[i*lda+j]) - work[i] += v - work[j] += v - } - } - } else { - for i := 0; i < n; i++ { - for j := 0; j < i; j++ { - v := math.Abs(a[i*lda+j]) - work[i] += v - work[j] += v - } - work[i] += math.Abs(a[i*lda+i]) - } - } - var max float64 - for i := 0; i < n; i++ { - v := work[i] - if math.IsNaN(v) { - return math.NaN() - } - if v > max { - max = v - } - } - return max - case lapack.Frobenius: - if uplo == blas.Upper { - var sum float64 - for i := 0; i < n; i++ { - v := a[i*lda+i] - sum += v * v - for j := i + 1; j < n; j++ { - v := a[i*lda+j] - sum += 2 * v * v - } - } - return math.Sqrt(sum) - } - var sum float64 - for i := 0; i < n; i++ { - for j := 0; j < i; j++ { - v := a[i*lda+j] - sum += 2 * v * v - } - v := a[i*lda+i] - sum += v * v - } - return math.Sqrt(sum) - } -} diff --git a/vendor/gonum.org/v1/gonum/lapack/gonum/dlantr.go b/vendor/gonum.org/v1/gonum/lapack/gonum/dlantr.go deleted file mode 100644 index cc96391d94..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/gonum/dlantr.go +++ /dev/null @@ -1,260 +0,0 @@ -// Copyright ©2015 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import ( - "math" - - "gonum.org/v1/gonum/blas" - "gonum.org/v1/gonum/lapack" -) - -// Dlantr computes the specified norm of an m×n trapezoidal matrix A. If -// norm == lapack.MaxColumnSum work must have length at least n, otherwise work -// is unused. -func (impl Implementation) Dlantr(norm lapack.MatrixNorm, uplo blas.Uplo, diag blas.Diag, m, n int, a []float64, lda int, work []float64) float64 { - switch { - case norm != lapack.MaxRowSum && norm != lapack.MaxColumnSum && norm != lapack.Frobenius && norm != lapack.MaxAbs: - panic(badNorm) - case uplo != blas.Upper && uplo != blas.Lower: - panic(badUplo) - case diag != blas.Unit && diag != blas.NonUnit: - panic(badDiag) - case n < 0: - panic(nLT0) - case lda < max(1, n): - panic(badLdA) - } - - // Quick return if possible. - minmn := min(m, n) - if minmn == 0 { - return 0 - } - - switch { - case len(a) < (m-1)*lda+n: - panic(shortA) - case norm == lapack.MaxColumnSum && len(work) < n: - panic(shortWork) - } - - switch norm { - default: - panic(badNorm) - case lapack.MaxAbs: - if diag == blas.Unit { - value := 1.0 - if uplo == blas.Upper { - for i := 0; i < m; i++ { - for j := i + 1; j < n; j++ { - tmp := math.Abs(a[i*lda+j]) - if math.IsNaN(tmp) { - return tmp - } - if tmp > value { - value = tmp - } - } - } - return value - } - for i := 1; i < m; i++ { - for j := 0; j < min(i, n); j++ { - tmp := math.Abs(a[i*lda+j]) - if math.IsNaN(tmp) { - return tmp - } - if tmp > value { - value = tmp - } - } - } - return value - } - var value float64 - if uplo == blas.Upper { - for i := 0; i < m; i++ { - for j := i; j < n; j++ { - tmp := math.Abs(a[i*lda+j]) - if math.IsNaN(tmp) { - return tmp - } - if tmp > value { - value = tmp - } - } - } - return value - } - for i := 0; i < m; i++ { - for j := 0; j <= min(i, n-1); j++ { - tmp := math.Abs(a[i*lda+j]) - if math.IsNaN(tmp) { - return tmp - } - if tmp > value { - value = tmp - } - } - } - return value - case lapack.MaxColumnSum: - if diag == blas.Unit { - for i := 0; i < minmn; i++ { - work[i] = 1 - } - for i := minmn; i < n; i++ { - work[i] = 0 - } - if uplo == blas.Upper { - for i := 0; i < m; i++ { - for j := i + 1; j < n; j++ { - work[j] += math.Abs(a[i*lda+j]) - } - } - } else { - for i := 1; i < m; i++ { - for j := 0; j < min(i, n); j++ { - work[j] += math.Abs(a[i*lda+j]) - } - } - } - } else { - for i := 0; i < n; i++ { - work[i] = 0 - } - if uplo == blas.Upper { - for i := 0; i < m; i++ { - for j := i; j < n; j++ { - work[j] += math.Abs(a[i*lda+j]) - } - } - } else { - for i := 0; i < m; i++ { - for j := 0; j <= min(i, n-1); j++ { - work[j] += math.Abs(a[i*lda+j]) - } - } - } - } - var max float64 - for _, v := range work[:n] { - if math.IsNaN(v) { - return math.NaN() - } - if v > max { - max = v - } - } - return max - case lapack.MaxRowSum: - var maxsum float64 - if diag == blas.Unit { - if uplo == blas.Upper { - for i := 0; i < m; i++ { - var sum float64 - if i < minmn { - sum = 1 - } - for j := i + 1; j < n; j++ { - sum += math.Abs(a[i*lda+j]) - } - if math.IsNaN(sum) { - return math.NaN() - } - if sum > maxsum { - maxsum = sum - } - } - return maxsum - } else { - for i := 1; i < m; i++ { - var sum float64 - if i < minmn { - sum = 1 - } - for j := 0; j < min(i, n); j++ { - sum += math.Abs(a[i*lda+j]) - } - if math.IsNaN(sum) { - return math.NaN() - } - if sum > maxsum { - maxsum = sum - } - } - return maxsum - } - } else { - if uplo == blas.Upper { - for i := 0; i < m; i++ { - var sum float64 - for j := i; j < n; j++ { - sum += math.Abs(a[i*lda+j]) - } - if math.IsNaN(sum) { - return sum - } - if sum > maxsum { - maxsum = sum - } - } - return maxsum - } else { - for i := 0; i < m; i++ { - var sum float64 - for j := 0; j <= min(i, n-1); j++ { - sum += math.Abs(a[i*lda+j]) - } - if math.IsNaN(sum) { - return sum - } - if sum > maxsum { - maxsum = sum - } - } - return maxsum - } - } - case lapack.Frobenius: - var nrm float64 - if diag == blas.Unit { - if uplo == blas.Upper { - for i := 0; i < m; i++ { - for j := i + 1; j < n; j++ { - tmp := a[i*lda+j] - nrm += tmp * tmp - } - } - } else { - for i := 1; i < m; i++ { - for j := 0; j < min(i, n); j++ { - tmp := a[i*lda+j] - nrm += tmp * tmp - } - } - } - nrm += float64(minmn) - } else { - if uplo == blas.Upper { - for i := 0; i < m; i++ { - for j := i; j < n; j++ { - tmp := math.Abs(a[i*lda+j]) - nrm += tmp * tmp - } - } - } else { - for i := 0; i < m; i++ { - for j := 0; j <= min(i, n-1); j++ { - tmp := math.Abs(a[i*lda+j]) - nrm += tmp * tmp - } - } - } - } - return math.Sqrt(nrm) - } -} diff --git a/vendor/gonum.org/v1/gonum/lapack/gonum/dlanv2.go b/vendor/gonum.org/v1/gonum/lapack/gonum/dlanv2.go deleted file mode 100644 index e5dcfb7522..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/gonum/dlanv2.go +++ /dev/null @@ -1,132 +0,0 @@ -// Copyright ©2016 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import "math" - -// Dlanv2 computes the Schur factorization of a real 2×2 matrix: -// [ a b ] = [ cs -sn ] * [ aa bb ] * [ cs sn ] -// [ c d ] [ sn cs ] [ cc dd ] * [-sn cs ] -// If cc is zero, aa and dd are real eigenvalues of the matrix. Otherwise it -// holds that aa = dd and bb*cc < 0, and aa ± sqrt(bb*cc) are complex conjugate -// eigenvalues. The real and imaginary parts of the eigenvalues are returned in -// (rt1r,rt1i) and (rt2r,rt2i). -func (impl Implementation) Dlanv2(a, b, c, d float64) (aa, bb, cc, dd float64, rt1r, rt1i, rt2r, rt2i float64, cs, sn float64) { - switch { - case c == 0: // Matrix is already upper triangular. - aa = a - bb = b - cc = 0 - dd = d - cs = 1 - sn = 0 - case b == 0: // Matrix is lower triangular, swap rows and columns. - aa = d - bb = -c - cc = 0 - dd = a - cs = 0 - sn = 1 - case a == d && math.Signbit(b) != math.Signbit(c): // Matrix is already in the standard Schur form. - aa = a - bb = b - cc = c - dd = d - cs = 1 - sn = 0 - default: - temp := a - d - p := temp / 2 - bcmax := math.Max(math.Abs(b), math.Abs(c)) - bcmis := math.Min(math.Abs(b), math.Abs(c)) - if b*c < 0 { - bcmis *= -1 - } - scale := math.Max(math.Abs(p), bcmax) - z := p/scale*p + bcmax/scale*bcmis - eps := dlamchP - - if z >= 4*eps { - // Real eigenvalues. Compute aa and dd. - if p > 0 { - z = p + math.Sqrt(scale)*math.Sqrt(z) - } else { - z = p - math.Sqrt(scale)*math.Sqrt(z) - } - aa = d + z - dd = d - bcmax/z*bcmis - // Compute bb and the rotation matrix. - tau := impl.Dlapy2(c, z) - cs = z / tau - sn = c / tau - bb = b - c - cc = 0 - } else { - // Complex eigenvalues, or real (almost) equal eigenvalues. - // Make diagonal elements equal. - sigma := b + c - tau := impl.Dlapy2(sigma, temp) - cs = math.Sqrt((1 + math.Abs(sigma)/tau) / 2) - sn = -p / (tau * cs) - if sigma < 0 { - sn *= -1 - } - // Compute [ aa bb ] = [ a b ] [ cs -sn ] - // [ cc dd ] [ c d ] [ sn cs ] - aa = a*cs + b*sn - bb = -a*sn + b*cs - cc = c*cs + d*sn - dd = -c*sn + d*cs - // Compute [ a b ] = [ cs sn ] [ aa bb ] - // [ c d ] [-sn cs ] [ cc dd ] - a = aa*cs + cc*sn - b = bb*cs + dd*sn - c = -aa*sn + cc*cs - d = -bb*sn + dd*cs - - temp = (a + d) / 2 - aa = temp - bb = b - cc = c - dd = temp - - if cc != 0 { - if bb != 0 { - if math.Signbit(bb) == math.Signbit(cc) { - // Real eigenvalues, reduce to - // upper triangular form. - sab := math.Sqrt(math.Abs(bb)) - sac := math.Sqrt(math.Abs(cc)) - p = sab * sac - if cc < 0 { - p *= -1 - } - tau = 1 / math.Sqrt(math.Abs(bb+cc)) - aa = temp + p - bb = bb - cc - cc = 0 - dd = temp - p - cs1 := sab * tau - sn1 := sac * tau - cs, sn = cs*cs1-sn*sn1, cs*sn1+sn+cs1 - } - } else { - bb = -cc - cc = 0 - cs, sn = -sn, cs - } - } - } - } - - // Store eigenvalues in (rt1r,rt1i) and (rt2r,rt2i). - rt1r = aa - rt2r = dd - if cc != 0 { - rt1i = math.Sqrt(math.Abs(bb)) * math.Sqrt(math.Abs(cc)) - rt2i = -rt1i - } - return -} diff --git a/vendor/gonum.org/v1/gonum/lapack/gonum/dlapll.go b/vendor/gonum.org/v1/gonum/lapack/gonum/dlapll.go deleted file mode 100644 index bf98c338eb..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/gonum/dlapll.go +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright ©2017 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import "gonum.org/v1/gonum/blas/blas64" - -// Dlapll returns the smallest singular value of the n×2 matrix A = [ x y ]. -// The function first computes the QR factorization of A = Q*R, and then computes -// the SVD of the 2-by-2 upper triangular matrix r. -// -// The contents of x and y are overwritten during the call. -// -// Dlapll is an internal routine. It is exported for testing purposes. -func (impl Implementation) Dlapll(n int, x []float64, incX int, y []float64, incY int) float64 { - switch { - case n < 0: - panic(nLT0) - case incX <= 0: - panic(badIncX) - case incY <= 0: - panic(badIncY) - } - - // Quick return if possible. - if n == 0 { - return 0 - } - - switch { - case len(x) < 1+(n-1)*incX: - panic(shortX) - case len(y) < 1+(n-1)*incY: - panic(shortY) - } - - // Quick return if possible. - if n == 1 { - return 0 - } - - // Compute the QR factorization of the N-by-2 matrix [ X Y ]. - a00, tau := impl.Dlarfg(n, x[0], x[incX:], incX) - x[0] = 1 - - bi := blas64.Implementation() - c := -tau * bi.Ddot(n, x, incX, y, incY) - bi.Daxpy(n, c, x, incX, y, incY) - a11, _ := impl.Dlarfg(n-1, y[incY], y[2*incY:], incY) - - // Compute the SVD of 2-by-2 upper triangular matrix. - ssmin, _ := impl.Dlas2(a00, y[0], a11) - return ssmin -} diff --git a/vendor/gonum.org/v1/gonum/lapack/gonum/dlapmt.go b/vendor/gonum.org/v1/gonum/lapack/gonum/dlapmt.go deleted file mode 100644 index 55f1567f3a..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/gonum/dlapmt.go +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright ©2017 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import "gonum.org/v1/gonum/blas/blas64" - -// Dlapmt rearranges the columns of the m×n matrix X as specified by the -// permutation k_0, k_1, ..., k_n-1 of the integers 0, ..., n-1. -// -// If forward is true a forward permutation is performed: -// -// X[0:m, k[j]] is moved to X[0:m, j] for j = 0, 1, ..., n-1. -// -// otherwise a backward permutation is performed: -// -// X[0:m, j] is moved to X[0:m, k[j]] for j = 0, 1, ..., n-1. -// -// k must have length n, otherwise Dlapmt will panic. k is zero-indexed. -func (impl Implementation) Dlapmt(forward bool, m, n int, x []float64, ldx int, k []int) { - switch { - case m < 0: - panic(mLT0) - case n < 0: - panic(nLT0) - case ldx < max(1, n): - panic(badLdX) - } - - // Quick return if possible. - if m == 0 || n == 0 { - return - } - - switch { - case len(x) < (m-1)*ldx+n: - panic(shortX) - case len(k) != n: - panic(badLenK) - } - - // Quick return if possible. - if n == 1 { - return - } - - for i, v := range k { - v++ - k[i] = -v - } - - bi := blas64.Implementation() - - if forward { - for j, v := range k { - if v >= 0 { - continue - } - k[j] = -v - i := -v - 1 - for k[i] < 0 { - bi.Dswap(m, x[j:], ldx, x[i:], ldx) - - k[i] = -k[i] - j = i - i = k[i] - 1 - } - } - } else { - for i, v := range k { - if v >= 0 { - continue - } - k[i] = -v - j := -v - 1 - for j != i { - bi.Dswap(m, x[j:], ldx, x[i:], ldx) - - k[j] = -k[j] - j = k[j] - 1 - } - } - } - - for i := range k { - k[i]-- - } -} diff --git a/vendor/gonum.org/v1/gonum/lapack/gonum/dlapy2.go b/vendor/gonum.org/v1/gonum/lapack/gonum/dlapy2.go deleted file mode 100644 index 19f73ffabd..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/gonum/dlapy2.go +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright ©2015 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import "math" - -// Dlapy2 is the LAPACK version of math.Hypot. -// -// Dlapy2 is an internal routine. It is exported for testing purposes. -func (Implementation) Dlapy2(x, y float64) float64 { - return math.Hypot(x, y) -} diff --git a/vendor/gonum.org/v1/gonum/lapack/gonum/dlaqp2.go b/vendor/gonum.org/v1/gonum/lapack/gonum/dlaqp2.go deleted file mode 100644 index d3a0def639..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/gonum/dlaqp2.go +++ /dev/null @@ -1,127 +0,0 @@ -// Copyright ©2017 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import ( - "math" - - "gonum.org/v1/gonum/blas" - "gonum.org/v1/gonum/blas/blas64" -) - -// Dlaqp2 computes a QR factorization with column pivoting of the block A[offset:m, 0:n] -// of the m×n matrix A. The block A[0:offset, 0:n] is accordingly pivoted, but not factorized. -// -// On exit, the upper triangle of block A[offset:m, 0:n] is the triangular factor obtained. -// The elements in block A[offset:m, 0:n] below the diagonal, together with tau, represent -// the orthogonal matrix Q as a product of elementary reflectors. -// -// offset is number of rows of the matrix A that must be pivoted but not factorized. -// offset must not be negative otherwise Dlaqp2 will panic. -// -// On exit, jpvt holds the permutation that was applied; the jth column of A*P was the -// jpvt[j] column of A. jpvt must have length n, otherwise Dlaqp2 will panic. -// -// On exit tau holds the scalar factors of the elementary reflectors. It must have length -// at least min(m-offset, n) otherwise Dlaqp2 will panic. -// -// vn1 and vn2 hold the partial and complete column norms respectively. They must have length n, -// otherwise Dlaqp2 will panic. -// -// work must have length n, otherwise Dlaqp2 will panic. -// -// Dlaqp2 is an internal routine. It is exported for testing purposes. -func (impl Implementation) Dlaqp2(m, n, offset int, a []float64, lda int, jpvt []int, tau, vn1, vn2, work []float64) { - switch { - case m < 0: - panic(mLT0) - case n < 0: - panic(nLT0) - case offset < 0: - panic(offsetLT0) - case offset > m: - panic(offsetGTM) - case lda < max(1, n): - panic(badLdA) - } - - // Quick return if possible. - if m == 0 || n == 0 { - return - } - - mn := min(m-offset, n) - switch { - case len(a) < (m-1)*lda+n: - panic(shortA) - case len(jpvt) != n: - panic(badLenJpvt) - case len(tau) < mn: - panic(shortTau) - case len(vn1) < n: - panic(shortVn1) - case len(vn2) < n: - panic(shortVn2) - case len(work) < n: - panic(shortWork) - } - - tol3z := math.Sqrt(dlamchE) - - bi := blas64.Implementation() - - // Compute factorization. - for i := 0; i < mn; i++ { - offpi := offset + i - - // Determine ith pivot column and swap if necessary. - p := i + bi.Idamax(n-i, vn1[i:], 1) - if p != i { - bi.Dswap(m, a[p:], lda, a[i:], lda) - jpvt[p], jpvt[i] = jpvt[i], jpvt[p] - vn1[p] = vn1[i] - vn2[p] = vn2[i] - } - - // Generate elementary reflector H_i. - if offpi < m-1 { - a[offpi*lda+i], tau[i] = impl.Dlarfg(m-offpi, a[offpi*lda+i], a[(offpi+1)*lda+i:], lda) - } else { - tau[i] = 0 - } - - if i < n-1 { - // Apply H_i^T to A[offset+i:m, i:n] from the left. - aii := a[offpi*lda+i] - a[offpi*lda+i] = 1 - impl.Dlarf(blas.Left, m-offpi, n-i-1, a[offpi*lda+i:], lda, tau[i], a[offpi*lda+i+1:], lda, work) - a[offpi*lda+i] = aii - } - - // Update partial column norms. - for j := i + 1; j < n; j++ { - if vn1[j] == 0 { - continue - } - - // The following marked lines follow from the - // analysis in Lapack Working Note 176. - r := math.Abs(a[offpi*lda+j]) / vn1[j] // * - temp := math.Max(0, 1-r*r) // * - r = vn1[j] / vn2[j] // * - temp2 := temp * r * r // * - if temp2 < tol3z { - var v float64 - if offpi < m-1 { - v = bi.Dnrm2(m-offpi-1, a[(offpi+1)*lda+j:], lda) - } - vn1[j] = v - vn2[j] = v - } else { - vn1[j] *= math.Sqrt(temp) // * - } - } - } -} diff --git a/vendor/gonum.org/v1/gonum/lapack/gonum/dlaqps.go b/vendor/gonum.org/v1/gonum/lapack/gonum/dlaqps.go deleted file mode 100644 index dd683b62ae..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/gonum/dlaqps.go +++ /dev/null @@ -1,244 +0,0 @@ -// Copyright ©2017 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import ( - "math" - - "gonum.org/v1/gonum/blas" - "gonum.org/v1/gonum/blas/blas64" -) - -// Dlaqps computes a step of QR factorization with column pivoting -// of an m×n matrix A by using Blas-3. It tries to factorize nb -// columns from A starting from the row offset, and updates all -// of the matrix with Dgemm. -// -// In some cases, due to catastrophic cancellations, it cannot -// factorize nb columns. Hence, the actual number of factorized -// columns is returned in kb. -// -// Dlaqps computes a QR factorization with column pivoting of the -// block A[offset:m, 0:nb] of the m×n matrix A. The block -// A[0:offset, 0:n] is accordingly pivoted, but not factorized. -// -// On exit, the upper triangle of block A[offset:m, 0:kb] is the -// triangular factor obtained. The elements in block A[offset:m, 0:n] -// below the diagonal, together with tau, represent the orthogonal -// matrix Q as a product of elementary reflectors. -// -// offset is number of rows of the matrix A that must be pivoted but -// not factorized. offset must not be negative otherwise Dlaqps will panic. -// -// On exit, jpvt holds the permutation that was applied; the jth column -// of A*P was the jpvt[j] column of A. jpvt must have length n, -// otherwise Dlapqs will panic. -// -// On exit tau holds the scalar factors of the elementary reflectors. -// It must have length nb, otherwise Dlapqs will panic. -// -// vn1 and vn2 hold the partial and complete column norms respectively. -// They must have length n, otherwise Dlapqs will panic. -// -// auxv must have length nb, otherwise Dlaqps will panic. -// -// f and ldf represent an n×nb matrix F that is overwritten during the -// call. -// -// Dlaqps is an internal routine. It is exported for testing purposes. -func (impl Implementation) Dlaqps(m, n, offset, nb int, a []float64, lda int, jpvt []int, tau, vn1, vn2, auxv, f []float64, ldf int) (kb int) { - switch { - case m < 0: - panic(mLT0) - case n < 0: - panic(nLT0) - case offset < 0: - panic(offsetLT0) - case offset > m: - panic(offsetGTM) - case nb < 0: - panic(nbLT0) - case nb > n: - panic(nbGTN) - case lda < max(1, n): - panic(badLdA) - case ldf < max(1, nb): - panic(badLdF) - } - - if m == 0 || n == 0 { - return 0 - } - - switch { - case len(a) < (m-1)*lda+n: - panic(shortA) - case len(jpvt) != n: - panic(badLenJpvt) - case len(vn1) < n: - panic(shortVn1) - case len(vn2) < n: - panic(shortVn2) - } - - if nb == 0 { - return 0 - } - - switch { - case len(tau) < nb: - panic(shortTau) - case len(auxv) < nb: - panic(shortAuxv) - case len(f) < (n-1)*ldf+nb: - panic(shortF) - } - - if offset == m { - return 0 - } - - lastrk := min(m, n+offset) - lsticc := -1 - tol3z := math.Sqrt(dlamchE) - - bi := blas64.Implementation() - - var k, rk int - for ; k < nb && lsticc == -1; k++ { - rk = offset + k - - // Determine kth pivot column and swap if necessary. - p := k + bi.Idamax(n-k, vn1[k:], 1) - if p != k { - bi.Dswap(m, a[p:], lda, a[k:], lda) - bi.Dswap(k, f[p*ldf:], 1, f[k*ldf:], 1) - jpvt[p], jpvt[k] = jpvt[k], jpvt[p] - vn1[p] = vn1[k] - vn2[p] = vn2[k] - } - - // Apply previous Householder reflectors to column K: - // - // A[rk:m, k] = A[rk:m, k] - A[rk:m, 0:k-1]*F[k, 0:k-1]^T. - if k > 0 { - bi.Dgemv(blas.NoTrans, m-rk, k, -1, - a[rk*lda:], lda, - f[k*ldf:], 1, - 1, - a[rk*lda+k:], lda) - } - - // Generate elementary reflector H_k. - if rk < m-1 { - a[rk*lda+k], tau[k] = impl.Dlarfg(m-rk, a[rk*lda+k], a[(rk+1)*lda+k:], lda) - } else { - tau[k] = 0 - } - - akk := a[rk*lda+k] - a[rk*lda+k] = 1 - - // Compute kth column of F: - // - // Compute F[k+1:n, k] = tau[k]*A[rk:m, k+1:n]^T*A[rk:m, k]. - if k < n-1 { - bi.Dgemv(blas.Trans, m-rk, n-k-1, tau[k], - a[rk*lda+k+1:], lda, - a[rk*lda+k:], lda, - 0, - f[(k+1)*ldf+k:], ldf) - } - - // Padding F[0:k, k] with zeros. - for j := 0; j < k; j++ { - f[j*ldf+k] = 0 - } - - // Incremental updating of F: - // - // F[0:n, k] := F[0:n, k] - tau[k]*F[0:n, 0:k-1]*A[rk:m, 0:k-1]^T*A[rk:m,k]. - if k > 0 { - bi.Dgemv(blas.Trans, m-rk, k, -tau[k], - a[rk*lda:], lda, - a[rk*lda+k:], lda, - 0, - auxv, 1) - bi.Dgemv(blas.NoTrans, n, k, 1, - f, ldf, - auxv, 1, - 1, - f[k:], ldf) - } - - // Update the current row of A: - // - // A[rk, k+1:n] = A[rk, k+1:n] - A[rk, 0:k]*F[k+1:n, 0:k]^T. - if k < n-1 { - bi.Dgemv(blas.NoTrans, n-k-1, k+1, -1, - f[(k+1)*ldf:], ldf, - a[rk*lda:], 1, - 1, - a[rk*lda+k+1:], 1) - } - - // Update partial column norms. - if rk < lastrk-1 { - for j := k + 1; j < n; j++ { - if vn1[j] == 0 { - continue - } - - // The following marked lines follow from the - // analysis in Lapack Working Note 176. - r := math.Abs(a[rk*lda+j]) / vn1[j] // * - temp := math.Max(0, 1-r*r) // * - r = vn1[j] / vn2[j] // * - temp2 := temp * r * r // * - if temp2 < tol3z { - // vn2 is used here as a collection of - // indices into vn2 and also a collection - // of column norms. - vn2[j] = float64(lsticc) - lsticc = j - } else { - vn1[j] *= math.Sqrt(temp) // * - } - } - } - - a[rk*lda+k] = akk - } - kb = k - rk = offset + kb - - // Apply the block reflector to the rest of the matrix: - // - // A[offset+kb+1:m, kb+1:n] := A[offset+kb+1:m, kb+1:n] - A[offset+kb+1:m, 1:kb]*F[kb+1:n, 1:kb]^T. - if kb < min(n, m-offset) { - bi.Dgemm(blas.NoTrans, blas.Trans, - m-rk, n-kb, kb, -1, - a[rk*lda:], lda, - f[kb*ldf:], ldf, - 1, - a[rk*lda+kb:], lda) - } - - // Recomputation of difficult columns. - for lsticc >= 0 { - itemp := int(vn2[lsticc]) - - // NOTE: The computation of vn1[lsticc] relies on the fact that - // Dnrm2 does not fail on vectors with norm below the value of - // sqrt(dlamchS) - v := bi.Dnrm2(m-rk, a[rk*lda+lsticc:], lda) - vn1[lsticc] = v - vn2[lsticc] = v - - lsticc = itemp - } - - return kb -} diff --git a/vendor/gonum.org/v1/gonum/lapack/gonum/dlaqr04.go b/vendor/gonum.org/v1/gonum/lapack/gonum/dlaqr04.go deleted file mode 100644 index e9fbb6007e..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/gonum/dlaqr04.go +++ /dev/null @@ -1,478 +0,0 @@ -// Copyright ©2016 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import ( - "math" - - "gonum.org/v1/gonum/blas" -) - -// Dlaqr04 computes the eigenvalues of a block of an n×n upper Hessenberg matrix -// H, and optionally the matrices T and Z from the Schur decomposition -// H = Z T Z^T -// where T is an upper quasi-triangular matrix (the Schur form), and Z is the -// orthogonal matrix of Schur vectors. -// -// wantt indicates whether the full Schur form T is required. If wantt is false, -// then only enough of H will be updated to preserve the eigenvalues. -// -// wantz indicates whether the n×n matrix of Schur vectors Z is required. If it -// is true, the orthogonal similarity transformation will be accumulated into -// Z[iloz:ihiz+1,ilo:ihi+1], otherwise Z will not be referenced. -// -// ilo and ihi determine the block of H on which Dlaqr04 operates. It must hold that -// 0 <= ilo <= ihi < n, if n > 0, -// ilo == 0 and ihi == -1, if n == 0, -// and the block must be isolated, that is, -// ilo == 0 or H[ilo,ilo-1] == 0, -// ihi == n-1 or H[ihi+1,ihi] == 0, -// otherwise Dlaqr04 will panic. -// -// wr and wi must have length ihi+1. -// -// iloz and ihiz specify the rows of Z to which transformations will be applied -// if wantz is true. It must hold that -// 0 <= iloz <= ilo, and ihi <= ihiz < n, -// otherwise Dlaqr04 will panic. -// -// work must have length at least lwork and lwork must be -// lwork >= 1, if n <= 11, -// lwork >= n, if n > 11, -// otherwise Dlaqr04 will panic. lwork as large as 6*n may be required for -// optimal performance. On return, work[0] will contain the optimal value of -// lwork. -// -// If lwork is -1, instead of performing Dlaqr04, the function only estimates the -// optimal workspace size and stores it into work[0]. Neither h nor z are -// accessed. -// -// recur is the non-negative recursion depth. For recur > 0, Dlaqr04 behaves -// as DLAQR0, for recur == 0 it behaves as DLAQR4. -// -// unconverged indicates whether Dlaqr04 computed all the eigenvalues of H[ilo:ihi+1,ilo:ihi+1]. -// -// If unconverged is zero and wantt is true, H will contain on return the upper -// quasi-triangular matrix T from the Schur decomposition. 2×2 diagonal blocks -// (corresponding to complex conjugate pairs of eigenvalues) will be returned in -// standard form, with H[i,i] == H[i+1,i+1] and H[i+1,i]*H[i,i+1] < 0. -// -// If unconverged is zero and if wantt is false, the contents of h on return is -// unspecified. -// -// If unconverged is zero, all the eigenvalues have been computed and their real -// and imaginary parts will be stored on return in wr[ilo:ihi+1] and -// wi[ilo:ihi+1], respectively. If two eigenvalues are computed as a complex -// conjugate pair, they are stored in consecutive elements of wr and wi, say the -// i-th and (i+1)th, with wi[i] > 0 and wi[i+1] < 0. If wantt is true, then the -// eigenvalues are stored in the same order as on the diagonal of the Schur form -// returned in H, with wr[i] = H[i,i] and, if H[i:i+2,i:i+2] is a 2×2 diagonal -// block, wi[i] = sqrt(-H[i+1,i]*H[i,i+1]) and wi[i+1] = -wi[i]. -// -// If unconverged is positive, some eigenvalues have not converged, and -// wr[unconverged:ihi+1] and wi[unconverged:ihi+1] will contain those -// eigenvalues which have been successfully computed. Failures are rare. -// -// If unconverged is positive and wantt is true, then on return -// (initial H)*U = U*(final H), (*) -// where U is an orthogonal matrix. The final H is upper Hessenberg and -// H[unconverged:ihi+1,unconverged:ihi+1] is upper quasi-triangular. -// -// If unconverged is positive and wantt is false, on return the remaining -// unconverged eigenvalues are the eigenvalues of the upper Hessenberg matrix -// H[ilo:unconverged,ilo:unconverged]. -// -// If unconverged is positive and wantz is true, then on return -// (final Z) = (initial Z)*U, -// where U is the orthogonal matrix in (*) regardless of the value of wantt. -// -// References: -// [1] K. Braman, R. Byers, R. Mathias. The Multishift QR Algorithm. Part I: -// Maintaining Well-Focused Shifts and Level 3 Performance. SIAM J. Matrix -// Anal. Appl. 23(4) (2002), pp. 929—947 -// URL: http://dx.doi.org/10.1137/S0895479801384573 -// [2] K. Braman, R. Byers, R. Mathias. The Multishift QR Algorithm. Part II: -// Aggressive Early Deflation. SIAM J. Matrix Anal. Appl. 23(4) (2002), pp. 948—973 -// URL: http://dx.doi.org/10.1137/S0895479801384585 -// -// Dlaqr04 is an internal routine. It is exported for testing purposes. -func (impl Implementation) Dlaqr04(wantt, wantz bool, n, ilo, ihi int, h []float64, ldh int, wr, wi []float64, iloz, ihiz int, z []float64, ldz int, work []float64, lwork int, recur int) (unconverged int) { - const ( - // Matrices of order ntiny or smaller must be processed by - // Dlahqr because of insufficient subdiagonal scratch space. - // This is a hard limit. - ntiny = 11 - // Exceptional deflation windows: try to cure rare slow - // convergence by varying the size of the deflation window after - // kexnw iterations. - kexnw = 5 - // Exceptional shifts: try to cure rare slow convergence with - // ad-hoc exceptional shifts every kexsh iterations. - kexsh = 6 - - // See https://github.com/gonum/lapack/pull/151#discussion_r68162802 - // and the surrounding discussion for an explanation where these - // constants come from. - // TODO(vladimir-ch): Similar constants for exceptional shifts - // are used also in dlahqr.go. The first constant is different - // there, it is equal to 3. Why? And does it matter? - wilk1 = 0.75 - wilk2 = -0.4375 - ) - - switch { - case n < 0: - panic(nLT0) - case ilo < 0 || max(0, n-1) < ilo: - panic(badIlo) - case ihi < min(ilo, n-1) || n <= ihi: - panic(badIhi) - case ldh < max(1, n): - panic(badLdH) - case wantz && (iloz < 0 || ilo < iloz): - panic(badIloz) - case wantz && (ihiz < ihi || n <= ihiz): - panic(badIhiz) - case ldz < 1, wantz && ldz < n: - panic(badLdZ) - case lwork < 1 && lwork != -1: - panic(badLWork) - // TODO(vladimir-ch): Enable if and when we figure out what the minimum - // necessary lwork value is. Dlaqr04 says that the minimum is n which - // clashes with Dlaqr23's opinion about optimal work when nw <= 2 - // (independent of n). - // case lwork < n && n > ntiny && lwork != -1: - // panic(badLWork) - case len(work) < max(1, lwork): - panic(shortWork) - case recur < 0: - panic(recurLT0) - } - - // Quick return. - if n == 0 { - work[0] = 1 - return 0 - } - - if lwork != -1 { - switch { - case len(h) < (n-1)*ldh+n: - panic(shortH) - case len(wr) != ihi+1: - panic(badLenWr) - case len(wi) != ihi+1: - panic(badLenWi) - case wantz && len(z) < (n-1)*ldz+n: - panic(shortZ) - case ilo > 0 && h[ilo*ldh+ilo-1] != 0: - panic(notIsolated) - case ihi+1 < n && h[(ihi+1)*ldh+ihi] != 0: - panic(notIsolated) - } - } - - if n <= ntiny { - // Tiny matrices must use Dlahqr. - if lwork == -1 { - work[0] = 1 - return 0 - } - return impl.Dlahqr(wantt, wantz, n, ilo, ihi, h, ldh, wr, wi, iloz, ihiz, z, ldz) - } - - // Use small bulge multi-shift QR with aggressive early deflation on - // larger-than-tiny matrices. - var jbcmpz string - if wantt { - jbcmpz = "S" - } else { - jbcmpz = "E" - } - if wantz { - jbcmpz += "V" - } else { - jbcmpz += "N" - } - - var fname string - if recur > 0 { - fname = "DLAQR0" - } else { - fname = "DLAQR4" - } - // nwr is the recommended deflation window size. n is greater than 11, - // so there is enough subdiagonal workspace for nwr >= 2 as required. - // (In fact, there is enough subdiagonal space for nwr >= 3.) - // TODO(vladimir-ch): If there is enough space for nwr >= 3, should we - // use it? - nwr := impl.Ilaenv(13, fname, jbcmpz, n, ilo, ihi, lwork) - nwr = max(2, nwr) - nwr = min(ihi-ilo+1, min((n-1)/3, nwr)) - - // nsr is the recommended number of simultaneous shifts. n is greater - // than 11, so there is enough subdiagonal workspace for nsr to be even - // and greater than or equal to two as required. - nsr := impl.Ilaenv(15, fname, jbcmpz, n, ilo, ihi, lwork) - nsr = min(nsr, min((n+6)/9, ihi-ilo)) - nsr = max(2, nsr&^1) - - // Workspace query call to Dlaqr23. - impl.Dlaqr23(wantt, wantz, n, ilo, ihi, nwr+1, h, ldh, iloz, ihiz, z, ldz, - wr, wi, h, ldh, n, h, ldh, n, h, ldh, work, -1, recur) - // Optimal workspace is max(Dlaqr5, Dlaqr23). - lwkopt := max(3*nsr/2, int(work[0])) - // Quick return in case of workspace query. - if lwork == -1 { - work[0] = float64(lwkopt) - return 0 - } - - // Dlahqr/Dlaqr04 crossover point. - nmin := impl.Ilaenv(12, fname, jbcmpz, n, ilo, ihi, lwork) - nmin = max(ntiny, nmin) - - // Nibble determines when to skip a multi-shift QR sweep (Dlaqr5). - nibble := impl.Ilaenv(14, fname, jbcmpz, n, ilo, ihi, lwork) - nibble = max(0, nibble) - - // Computation mode of far-from-diagonal orthogonal updates in Dlaqr5. - kacc22 := impl.Ilaenv(16, fname, jbcmpz, n, ilo, ihi, lwork) - kacc22 = max(0, min(kacc22, 2)) - - // nwmax is the largest possible deflation window for which there is - // sufficient workspace. - nwmax := min((n-1)/3, lwork/2) - nw := nwmax // Start with maximum deflation window size. - - // nsmax is the largest number of simultaneous shifts for which there is - // sufficient workspace. - nsmax := min((n+6)/9, 2*lwork/3) &^ 1 - - ndfl := 1 // Number of iterations since last deflation. - ndec := 0 // Deflation window size decrement. - - // Main loop. - var ( - itmax = max(30, 2*kexsh) * max(10, (ihi-ilo+1)) - it = 0 - ) - for kbot := ihi; kbot >= ilo; { - if it == itmax { - unconverged = kbot + 1 - break - } - it++ - - // Locate active block. - ktop := ilo - for k := kbot; k >= ilo+1; k-- { - if h[k*ldh+k-1] == 0 { - ktop = k - break - } - } - - // Select deflation window size nw. - // - // Typical Case: - // If possible and advisable, nibble the entire active block. - // If not, use size min(nwr,nwmax) or min(nwr+1,nwmax) - // depending upon which has the smaller corresponding - // subdiagonal entry (a heuristic). - // - // Exceptional Case: - // If there have been no deflations in kexnw or more - // iterations, then vary the deflation window size. At first, - // because larger windows are, in general, more powerful than - // smaller ones, rapidly increase the window to the maximum - // possible. Then, gradually reduce the window size. - nh := kbot - ktop + 1 - nwupbd := min(nh, nwmax) - if ndfl < kexnw { - nw = min(nwupbd, nwr) - } else { - nw = min(nwupbd, 2*nw) - } - if nw < nwmax { - if nw >= nh-1 { - nw = nh - } else { - kwtop := kbot - nw + 1 - if math.Abs(h[kwtop*ldh+kwtop-1]) > math.Abs(h[(kwtop-1)*ldh+kwtop-2]) { - nw++ - } - } - } - if ndfl < kexnw { - ndec = -1 - } else if ndec >= 0 || nw >= nwupbd { - ndec++ - if nw-ndec < 2 { - ndec = 0 - } - nw -= ndec - } - - // Split workspace under the subdiagonal of H into: - // - an nw×nw work array V in the lower left-hand corner, - // - an nw×nhv horizontal work array along the bottom edge (nhv - // must be at least nw but more is better), - // - an nve×nw vertical work array along the left-hand-edge - // (nhv can be any positive integer but more is better). - kv := n - nw - kt := nw - kwv := nw + 1 - nhv := n - kwv - kt - // Aggressive early deflation. - ls, ld := impl.Dlaqr23(wantt, wantz, n, ktop, kbot, nw, - h, ldh, iloz, ihiz, z, ldz, wr[:kbot+1], wi[:kbot+1], - h[kv*ldh:], ldh, nhv, h[kv*ldh+kt:], ldh, nhv, h[kwv*ldh:], ldh, work, lwork, recur) - - // Adjust kbot accounting for new deflations. - kbot -= ld - // ks points to the shifts. - ks := kbot - ls + 1 - - // Skip an expensive QR sweep if there is a (partly heuristic) - // reason to expect that many eigenvalues will deflate without - // it. Here, the QR sweep is skipped if many eigenvalues have - // just been deflated or if the remaining active block is small. - if ld > 0 && (100*ld > nw*nibble || kbot-ktop+1 <= min(nmin, nwmax)) { - // ld is positive, note progress. - ndfl = 1 - continue - } - - // ns is the nominal number of simultaneous shifts. This may be - // lowered (slightly) if Dlaqr23 did not provide that many - // shifts. - ns := min(min(nsmax, nsr), max(2, kbot-ktop)) &^ 1 - - // If there have been no deflations in a multiple of kexsh - // iterations, then try exceptional shifts. Otherwise use shifts - // provided by Dlaqr23 above or from the eigenvalues of a - // trailing principal submatrix. - if ndfl%kexsh == 0 { - ks = kbot - ns + 1 - for i := kbot; i > max(ks, ktop+1); i -= 2 { - ss := math.Abs(h[i*ldh+i-1]) + math.Abs(h[(i-1)*ldh+i-2]) - aa := wilk1*ss + h[i*ldh+i] - _, _, _, _, wr[i-1], wi[i-1], wr[i], wi[i], _, _ = - impl.Dlanv2(aa, ss, wilk2*ss, aa) - } - if ks == ktop { - wr[ks+1] = h[(ks+1)*ldh+ks+1] - wi[ks+1] = 0 - wr[ks] = wr[ks+1] - wi[ks] = wi[ks+1] - } - } else { - // If we got ns/2 or fewer shifts, use Dlahqr or recur - // into Dlaqr04 on a trailing principal submatrix to get - // more. Since ns <= nsmax <=(n+6)/9, there is enough - // space below the subdiagonal to fit an ns×ns scratch - // array. - if kbot-ks+1 <= ns/2 { - ks = kbot - ns + 1 - kt = n - ns - impl.Dlacpy(blas.All, ns, ns, h[ks*ldh+ks:], ldh, h[kt*ldh:], ldh) - if ns > nmin && recur > 0 { - ks += impl.Dlaqr04(false, false, ns, 1, ns-1, h[kt*ldh:], ldh, - wr[ks:ks+ns], wi[ks:ks+ns], 0, 0, nil, 0, work, lwork, recur-1) - } else { - ks += impl.Dlahqr(false, false, ns, 0, ns-1, h[kt*ldh:], ldh, - wr[ks:ks+ns], wi[ks:ks+ns], 0, 0, nil, 1) - } - // In case of a rare QR failure use eigenvalues - // of the trailing 2×2 principal submatrix. - if ks >= kbot { - aa := h[(kbot-1)*ldh+kbot-1] - bb := h[(kbot-1)*ldh+kbot] - cc := h[kbot*ldh+kbot-1] - dd := h[kbot*ldh+kbot] - _, _, _, _, wr[kbot-1], wi[kbot-1], wr[kbot], wi[kbot], _, _ = - impl.Dlanv2(aa, bb, cc, dd) - ks = kbot - 1 - } - } - - if kbot-ks+1 > ns { - // Sorting the shifts helps a little. Bubble - // sort keeps complex conjugate pairs together. - sorted := false - for k := kbot; k > ks; k-- { - if sorted { - break - } - sorted = true - for i := ks; i < k; i++ { - if math.Abs(wr[i])+math.Abs(wi[i]) >= math.Abs(wr[i+1])+math.Abs(wi[i+1]) { - continue - } - sorted = false - wr[i], wr[i+1] = wr[i+1], wr[i] - wi[i], wi[i+1] = wi[i+1], wi[i] - } - } - } - - // Shuffle shifts into pairs of real shifts and pairs of - // complex conjugate shifts using the fact that complex - // conjugate shifts are already adjacent to one another. - // TODO(vladimir-ch): The shuffling here could probably - // be removed but I'm not sure right now and it's safer - // to leave it. - for i := kbot; i > ks+1; i -= 2 { - if wi[i] == -wi[i-1] { - continue - } - wr[i], wr[i-1], wr[i-2] = wr[i-1], wr[i-2], wr[i] - wi[i], wi[i-1], wi[i-2] = wi[i-1], wi[i-2], wi[i] - } - } - - // If there are only two shifts and both are real, then use only one. - if kbot-ks+1 == 2 && wi[kbot] == 0 { - if math.Abs(wr[kbot]-h[kbot*ldh+kbot]) < math.Abs(wr[kbot-1]-h[kbot*ldh+kbot]) { - wr[kbot-1] = wr[kbot] - } else { - wr[kbot] = wr[kbot-1] - } - } - - // Use up to ns of the smallest magnitude shifts. If there - // aren't ns shifts available, then use them all, possibly - // dropping one to make the number of shifts even. - ns = min(ns, kbot-ks+1) &^ 1 - ks = kbot - ns + 1 - - // Split workspace under the subdiagonal into: - // - a kdu×kdu work array U in the lower left-hand-corner, - // - a kdu×nhv horizontal work array WH along the bottom edge - // (nhv must be at least kdu but more is better), - // - an nhv×kdu vertical work array WV along the left-hand-edge - // (nhv must be at least kdu but more is better). - kdu := 3*ns - 3 - ku := n - kdu - kwh := kdu - kwv = kdu + 3 - nhv = n - kwv - kdu - // Small-bulge multi-shift QR sweep. - impl.Dlaqr5(wantt, wantz, kacc22, n, ktop, kbot, ns, - wr[ks:ks+ns], wi[ks:ks+ns], h, ldh, iloz, ihiz, z, ldz, - work, 3, h[ku*ldh:], ldh, nhv, h[kwv*ldh:], ldh, nhv, h[ku*ldh+kwh:], ldh) - - // Note progress (or the lack of it). - if ld > 0 { - ndfl = 1 - } else { - ndfl++ - } - } - - work[0] = float64(lwkopt) - return unconverged -} diff --git a/vendor/gonum.org/v1/gonum/lapack/gonum/dlaqr1.go b/vendor/gonum.org/v1/gonum/lapack/gonum/dlaqr1.go deleted file mode 100644 index e21373bd10..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/gonum/dlaqr1.go +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright ©2016 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import "math" - -// Dlaqr1 sets v to a scalar multiple of the first column of the product -// (H - (sr1 + i*si1)*I)*(H - (sr2 + i*si2)*I) -// where H is a 2×2 or 3×3 matrix, I is the identity matrix of the same size, -// and i is the imaginary unit. Scaling is done to avoid overflows and most -// underflows. -// -// n is the order of H and must be either 2 or 3. It must hold that either sr1 = -// sr2 and si1 = -si2, or si1 = si2 = 0. The length of v must be equal to n. If -// any of these conditions is not met, Dlaqr1 will panic. -// -// Dlaqr1 is an internal routine. It is exported for testing purposes. -func (impl Implementation) Dlaqr1(n int, h []float64, ldh int, sr1, si1, sr2, si2 float64, v []float64) { - switch { - case n != 2 && n != 3: - panic("lapack: n must be 2 or 3") - case ldh < n: - panic(badLdH) - case len(h) < (n-1)*ldh+n: - panic(shortH) - case !((sr1 == sr2 && si1 == -si2) || (si1 == 0 && si2 == 0)): - panic(badShifts) - case len(v) != n: - panic(shortV) - } - - if n == 2 { - s := math.Abs(h[0]-sr2) + math.Abs(si2) + math.Abs(h[ldh]) - if s == 0 { - v[0] = 0 - v[1] = 0 - } else { - h21s := h[ldh] / s - v[0] = h21s*h[1] + (h[0]-sr1)*((h[0]-sr2)/s) - si1*(si2/s) - v[1] = h21s * (h[0] + h[ldh+1] - sr1 - sr2) - } - return - } - - s := math.Abs(h[0]-sr2) + math.Abs(si2) + math.Abs(h[ldh]) + math.Abs(h[2*ldh]) - if s == 0 { - v[0] = 0 - v[1] = 0 - v[2] = 0 - } else { - h21s := h[ldh] / s - h31s := h[2*ldh] / s - v[0] = (h[0]-sr1)*((h[0]-sr2)/s) - si1*(si2/s) + h[1]*h21s + h[2]*h31s - v[1] = h21s*(h[0]+h[ldh+1]-sr1-sr2) + h[ldh+2]*h31s - v[2] = h31s*(h[0]+h[2*ldh+2]-sr1-sr2) + h21s*h[2*ldh+1] - } -} diff --git a/vendor/gonum.org/v1/gonum/lapack/gonum/dlaqr23.go b/vendor/gonum.org/v1/gonum/lapack/gonum/dlaqr23.go deleted file mode 100644 index ff299a73aa..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/gonum/dlaqr23.go +++ /dev/null @@ -1,415 +0,0 @@ -// Copyright ©2016 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import ( - "math" - - "gonum.org/v1/gonum/blas" - "gonum.org/v1/gonum/blas/blas64" - "gonum.org/v1/gonum/lapack" -) - -// Dlaqr23 performs the orthogonal similarity transformation of an n×n upper -// Hessenberg matrix to detect and deflate fully converged eigenvalues from a -// trailing principal submatrix using aggressive early deflation [1]. -// -// On return, H will be overwritten by a new Hessenberg matrix that is a -// perturbation of an orthogonal similarity transformation of H. It is hoped -// that on output H will have many zero subdiagonal entries. -// -// If wantt is true, the matrix H will be fully updated so that the -// quasi-triangular Schur factor can be computed. If wantt is false, then only -// enough of H will be updated to preserve the eigenvalues. -// -// If wantz is true, the orthogonal similarity transformation will be -// accumulated into Z[iloz:ihiz+1,ktop:kbot+1], otherwise Z is not referenced. -// -// ktop and kbot determine a block [ktop:kbot+1,ktop:kbot+1] along the diagonal -// of H. It must hold that -// 0 <= ilo <= ihi < n, if n > 0, -// ilo == 0 and ihi == -1, if n == 0, -// and the block must be isolated, that is, it must hold that -// ktop == 0 or H[ktop,ktop-1] == 0, -// kbot == n-1 or H[kbot+1,kbot] == 0, -// otherwise Dlaqr23 will panic. -// -// nw is the deflation window size. It must hold that -// 0 <= nw <= kbot-ktop+1, -// otherwise Dlaqr23 will panic. -// -// iloz and ihiz specify the rows of the n×n matrix Z to which transformations -// will be applied if wantz is true. It must hold that -// 0 <= iloz <= ktop, and kbot <= ihiz < n, -// otherwise Dlaqr23 will panic. -// -// sr and si must have length kbot+1, otherwise Dlaqr23 will panic. -// -// v and ldv represent an nw×nw work matrix. -// t and ldt represent an nw×nh work matrix, and nh must be at least nw. -// wv and ldwv represent an nv×nw work matrix. -// -// work must have length at least lwork and lwork must be at least max(1,2*nw), -// otherwise Dlaqr23 will panic. Larger values of lwork may result in greater -// efficiency. On return, work[0] will contain the optimal value of lwork. -// -// If lwork is -1, instead of performing Dlaqr23, the function only estimates the -// optimal workspace size and stores it into work[0]. Neither h nor z are -// accessed. -// -// recur is the non-negative recursion depth. For recur > 0, Dlaqr23 behaves -// as DLAQR3, for recur == 0 it behaves as DLAQR2. -// -// On return, ns and nd will contain respectively the number of unconverged -// (i.e., approximate) eigenvalues and converged eigenvalues that are stored in -// sr and si. -// -// On return, the real and imaginary parts of approximate eigenvalues that may -// be used for shifts will be stored respectively in sr[kbot-nd-ns+1:kbot-nd+1] -// and si[kbot-nd-ns+1:kbot-nd+1]. -// -// On return, the real and imaginary parts of converged eigenvalues will be -// stored respectively in sr[kbot-nd+1:kbot+1] and si[kbot-nd+1:kbot+1]. -// -// References: -// [1] K. Braman, R. Byers, R. Mathias. The Multishift QR Algorithm. Part II: -// Aggressive Early Deflation. SIAM J. Matrix Anal. Appl 23(4) (2002), pp. 948—973 -// URL: http://dx.doi.org/10.1137/S0895479801384585 -// -func (impl Implementation) Dlaqr23(wantt, wantz bool, n, ktop, kbot, nw int, h []float64, ldh int, iloz, ihiz int, z []float64, ldz int, sr, si []float64, v []float64, ldv int, nh int, t []float64, ldt int, nv int, wv []float64, ldwv int, work []float64, lwork int, recur int) (ns, nd int) { - switch { - case n < 0: - panic(nLT0) - case ktop < 0 || max(0, n-1) < ktop: - panic(badKtop) - case kbot < min(ktop, n-1) || n <= kbot: - panic(badKbot) - case nw < 0 || kbot-ktop+1+1 < nw: - panic(badNw) - case ldh < max(1, n): - panic(badLdH) - case wantz && (iloz < 0 || ktop < iloz): - panic(badIloz) - case wantz && (ihiz < kbot || n <= ihiz): - panic(badIhiz) - case ldz < 1, wantz && ldz < n: - panic(badLdZ) - case ldv < max(1, nw): - panic(badLdV) - case nh < nw: - panic(badNh) - case ldt < max(1, nh): - panic(badLdT) - case nv < 0: - panic(nvLT0) - case ldwv < max(1, nw): - panic(badLdWV) - case lwork < max(1, 2*nw) && lwork != -1: - panic(badLWork) - case len(work) < max(1, lwork): - panic(shortWork) - case recur < 0: - panic(recurLT0) - } - - // Quick return for zero window size. - if nw == 0 { - work[0] = 1 - return 0, 0 - } - - // LAPACK code does not enforce the documented behavior - // nw <= kbot-ktop+1 - // but we do (we panic above). - jw := nw - lwkopt := max(1, 2*nw) - if jw > 2 { - // Workspace query call to Dgehrd. - impl.Dgehrd(jw, 0, jw-2, t, ldt, work, work, -1) - lwk1 := int(work[0]) - // Workspace query call to Dormhr. - impl.Dormhr(blas.Right, blas.NoTrans, jw, jw, 0, jw-2, t, ldt, work, v, ldv, work, -1) - lwk2 := int(work[0]) - if recur > 0 { - // Workspace query call to Dlaqr04. - impl.Dlaqr04(true, true, jw, 0, jw-1, t, ldt, sr, si, 0, jw-1, v, ldv, work, -1, recur-1) - lwk3 := int(work[0]) - // Optimal workspace. - lwkopt = max(jw+max(lwk1, lwk2), lwk3) - } else { - // Optimal workspace. - lwkopt = jw + max(lwk1, lwk2) - } - } - // Quick return in case of workspace query. - if lwork == -1 { - work[0] = float64(lwkopt) - return 0, 0 - } - - // Check input slices only if not doing workspace query. - switch { - case len(h) < (n-1)*ldh+n: - panic(shortH) - case len(v) < (nw-1)*ldv+nw: - panic(shortV) - case len(t) < (nw-1)*ldt+nh: - panic(shortT) - case len(wv) < (nv-1)*ldwv+nw: - panic(shortWV) - case wantz && len(z) < (n-1)*ldz+n: - panic(shortZ) - case len(sr) != kbot+1: - panic(badLenSr) - case len(si) != kbot+1: - panic(badLenSi) - case ktop > 0 && h[ktop*ldh+ktop-1] != 0: - panic(notIsolated) - case kbot+1 < n && h[(kbot+1)*ldh+kbot] != 0: - panic(notIsolated) - } - - // Machine constants. - ulp := dlamchP - smlnum := float64(n) / ulp * dlamchS - - // Setup deflation window. - var s float64 - kwtop := kbot - jw + 1 - if kwtop != ktop { - s = h[kwtop*ldh+kwtop-1] - } - if kwtop == kbot { - // 1×1 deflation window. - sr[kwtop] = h[kwtop*ldh+kwtop] - si[kwtop] = 0 - ns = 1 - nd = 0 - if math.Abs(s) <= math.Max(smlnum, ulp*math.Abs(h[kwtop*ldh+kwtop])) { - ns = 0 - nd = 1 - if kwtop > ktop { - h[kwtop*ldh+kwtop-1] = 0 - } - } - work[0] = 1 - return ns, nd - } - - // Convert to spike-triangular form. In case of a rare QR failure, this - // routine continues to do aggressive early deflation using that part of - // the deflation window that converged using infqr here and there to - // keep track. - impl.Dlacpy(blas.Upper, jw, jw, h[kwtop*ldh+kwtop:], ldh, t, ldt) - bi := blas64.Implementation() - bi.Dcopy(jw-1, h[(kwtop+1)*ldh+kwtop:], ldh+1, t[ldt:], ldt+1) - impl.Dlaset(blas.All, jw, jw, 0, 1, v, ldv) - nmin := impl.Ilaenv(12, "DLAQR3", "SV", jw, 0, jw-1, lwork) - var infqr int - if recur > 0 && jw > nmin { - infqr = impl.Dlaqr04(true, true, jw, 0, jw-1, t, ldt, sr[kwtop:], si[kwtop:], 0, jw-1, v, ldv, work, lwork, recur-1) - } else { - infqr = impl.Dlahqr(true, true, jw, 0, jw-1, t, ldt, sr[kwtop:], si[kwtop:], 0, jw-1, v, ldv) - } - // Note that ilo == 0 which conveniently coincides with the success - // value of infqr, that is, infqr as an index always points to the first - // converged eigenvalue. - - // Dtrexc needs a clean margin near the diagonal. - for j := 0; j < jw-3; j++ { - t[(j+2)*ldt+j] = 0 - t[(j+3)*ldt+j] = 0 - } - if jw >= 3 { - t[(jw-1)*ldt+jw-3] = 0 - } - - ns = jw - ilst := infqr - // Deflation detection loop. - for ilst < ns { - bulge := false - if ns >= 2 { - bulge = t[(ns-1)*ldt+ns-2] != 0 - } - if !bulge { - // Real eigenvalue. - abst := math.Abs(t[(ns-1)*ldt+ns-1]) - if abst == 0 { - abst = math.Abs(s) - } - if math.Abs(s*v[ns-1]) <= math.Max(smlnum, ulp*abst) { - // Deflatable. - ns-- - } else { - // Undeflatable, move it up out of the way. - // Dtrexc can not fail in this case. - _, ilst, _ = impl.Dtrexc(lapack.UpdateSchur, jw, t, ldt, v, ldv, ns-1, ilst, work) - ilst++ - } - continue - } - // Complex conjugate pair. - abst := math.Abs(t[(ns-1)*ldt+ns-1]) + math.Sqrt(math.Abs(t[(ns-1)*ldt+ns-2]))*math.Sqrt(math.Abs(t[(ns-2)*ldt+ns-1])) - if abst == 0 { - abst = math.Abs(s) - } - if math.Max(math.Abs(s*v[ns-1]), math.Abs(s*v[ns-2])) <= math.Max(smlnum, ulp*abst) { - // Deflatable. - ns -= 2 - } else { - // Undeflatable, move them up out of the way. - // Dtrexc does the right thing with ilst in case of a - // rare exchange failure. - _, ilst, _ = impl.Dtrexc(lapack.UpdateSchur, jw, t, ldt, v, ldv, ns-1, ilst, work) - ilst += 2 - } - } - - // Return to Hessenberg form. - if ns == 0 { - s = 0 - } - if ns < jw { - // Sorting diagonal blocks of T improves accuracy for graded - // matrices. Bubble sort deals well with exchange failures. - sorted := false - i := ns - for !sorted { - sorted = true - kend := i - 1 - i = infqr - var k int - if i == ns-1 || t[(i+1)*ldt+i] == 0 { - k = i + 1 - } else { - k = i + 2 - } - for k <= kend { - var evi float64 - if k == i+1 { - evi = math.Abs(t[i*ldt+i]) - } else { - evi = math.Abs(t[i*ldt+i]) + math.Sqrt(math.Abs(t[(i+1)*ldt+i]))*math.Sqrt(math.Abs(t[i*ldt+i+1])) - } - - var evk float64 - if k == kend || t[(k+1)*ldt+k] == 0 { - evk = math.Abs(t[k*ldt+k]) - } else { - evk = math.Abs(t[k*ldt+k]) + math.Sqrt(math.Abs(t[(k+1)*ldt+k]))*math.Sqrt(math.Abs(t[k*ldt+k+1])) - } - - if evi >= evk { - i = k - } else { - sorted = false - _, ilst, ok := impl.Dtrexc(lapack.UpdateSchur, jw, t, ldt, v, ldv, i, k, work) - if ok { - i = ilst - } else { - i = k - } - } - if i == kend || t[(i+1)*ldt+i] == 0 { - k = i + 1 - } else { - k = i + 2 - } - } - } - } - - // Restore shift/eigenvalue array from T. - for i := jw - 1; i >= infqr; { - if i == infqr || t[i*ldt+i-1] == 0 { - sr[kwtop+i] = t[i*ldt+i] - si[kwtop+i] = 0 - i-- - continue - } - aa := t[(i-1)*ldt+i-1] - bb := t[(i-1)*ldt+i] - cc := t[i*ldt+i-1] - dd := t[i*ldt+i] - _, _, _, _, sr[kwtop+i-1], si[kwtop+i-1], sr[kwtop+i], si[kwtop+i], _, _ = impl.Dlanv2(aa, bb, cc, dd) - i -= 2 - } - - if ns < jw || s == 0 { - if ns > 1 && s != 0 { - // Reflect spike back into lower triangle. - bi.Dcopy(ns, v[:ns], 1, work[:ns], 1) - _, tau := impl.Dlarfg(ns, work[0], work[1:ns], 1) - work[0] = 1 - impl.Dlaset(blas.Lower, jw-2, jw-2, 0, 0, t[2*ldt:], ldt) - impl.Dlarf(blas.Left, ns, jw, work[:ns], 1, tau, t, ldt, work[jw:]) - impl.Dlarf(blas.Right, ns, ns, work[:ns], 1, tau, t, ldt, work[jw:]) - impl.Dlarf(blas.Right, jw, ns, work[:ns], 1, tau, v, ldv, work[jw:]) - impl.Dgehrd(jw, 0, ns-1, t, ldt, work[:jw-1], work[jw:], lwork-jw) - } - - // Copy updated reduced window into place. - if kwtop > 0 { - h[kwtop*ldh+kwtop-1] = s * v[0] - } - impl.Dlacpy(blas.Upper, jw, jw, t, ldt, h[kwtop*ldh+kwtop:], ldh) - bi.Dcopy(jw-1, t[ldt:], ldt+1, h[(kwtop+1)*ldh+kwtop:], ldh+1) - - // Accumulate orthogonal matrix in order to update H and Z, if - // requested. - if ns > 1 && s != 0 { - // work[:ns-1] contains the elementary reflectors stored - // by a call to Dgehrd above. - impl.Dormhr(blas.Right, blas.NoTrans, jw, ns, 0, ns-1, - t, ldt, work[:ns-1], v, ldv, work[jw:], lwork-jw) - } - - // Update vertical slab in H. - var ltop int - if !wantt { - ltop = ktop - } - for krow := ltop; krow < kwtop; krow += nv { - kln := min(nv, kwtop-krow) - bi.Dgemm(blas.NoTrans, blas.NoTrans, kln, jw, jw, - 1, h[krow*ldh+kwtop:], ldh, v, ldv, - 0, wv, ldwv) - impl.Dlacpy(blas.All, kln, jw, wv, ldwv, h[krow*ldh+kwtop:], ldh) - } - - // Update horizontal slab in H. - if wantt { - for kcol := kbot + 1; kcol < n; kcol += nh { - kln := min(nh, n-kcol) - bi.Dgemm(blas.Trans, blas.NoTrans, jw, kln, jw, - 1, v, ldv, h[kwtop*ldh+kcol:], ldh, - 0, t, ldt) - impl.Dlacpy(blas.All, jw, kln, t, ldt, h[kwtop*ldh+kcol:], ldh) - } - } - - // Update vertical slab in Z. - if wantz { - for krow := iloz; krow <= ihiz; krow += nv { - kln := min(nv, ihiz-krow+1) - bi.Dgemm(blas.NoTrans, blas.NoTrans, kln, jw, jw, - 1, z[krow*ldz+kwtop:], ldz, v, ldv, - 0, wv, ldwv) - impl.Dlacpy(blas.All, kln, jw, wv, ldwv, z[krow*ldz+kwtop:], ldz) - } - } - } - - // The number of deflations. - nd = jw - ns - // Shifts are converged eigenvalues that could not be deflated. - // Subtracting infqr from the spike length takes care of the case of a - // rare QR failure while calculating eigenvalues of the deflation - // window. - ns -= infqr - work[0] = float64(lwkopt) - return ns, nd -} diff --git a/vendor/gonum.org/v1/gonum/lapack/gonum/dlaqr5.go b/vendor/gonum.org/v1/gonum/lapack/gonum/dlaqr5.go deleted file mode 100644 index c198f229a2..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/gonum/dlaqr5.go +++ /dev/null @@ -1,644 +0,0 @@ -// Copyright ©2016 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import ( - "math" - - "gonum.org/v1/gonum/blas" - "gonum.org/v1/gonum/blas/blas64" -) - -// Dlaqr5 performs a single small-bulge multi-shift QR sweep on an isolated -// block of a Hessenberg matrix. -// -// wantt and wantz determine whether the quasi-triangular Schur factor and the -// orthogonal Schur factor, respectively, will be computed. -// -// kacc22 specifies the computation mode of far-from-diagonal orthogonal -// updates. Permitted values are: -// 0: Dlaqr5 will not accumulate reflections and will not use matrix-matrix -// multiply to update far-from-diagonal matrix entries. -// 1: Dlaqr5 will accumulate reflections and use matrix-matrix multiply to -// update far-from-diagonal matrix entries. -// 2: Dlaqr5 will accumulate reflections, use matrix-matrix multiply to update -// far-from-diagonal matrix entries, and take advantage of 2×2 block -// structure during matrix multiplies. -// For other values of kacc2 Dlaqr5 will panic. -// -// n is the order of the Hessenberg matrix H. -// -// ktop and kbot are indices of the first and last row and column of an isolated -// diagonal block upon which the QR sweep will be applied. It must hold that -// ktop == 0, or 0 < ktop <= n-1 and H[ktop, ktop-1] == 0, and -// kbot == n-1, or 0 <= kbot < n-1 and H[kbot+1, kbot] == 0, -// otherwise Dlaqr5 will panic. -// -// nshfts is the number of simultaneous shifts. It must be positive and even, -// otherwise Dlaqr5 will panic. -// -// sr and si contain the real and imaginary parts, respectively, of the shifts -// of origin that define the multi-shift QR sweep. On return both slices may be -// reordered by Dlaqr5. Their length must be equal to nshfts, otherwise Dlaqr5 -// will panic. -// -// h and ldh represent the Hessenberg matrix H of size n×n. On return -// multi-shift QR sweep with shifts sr+i*si has been applied to the isolated -// diagonal block in rows and columns ktop through kbot, inclusive. -// -// iloz and ihiz specify the rows of Z to which transformations will be applied -// if wantz is true. It must hold that 0 <= iloz <= ihiz < n, otherwise Dlaqr5 -// will panic. -// -// z and ldz represent the matrix Z of size n×n. If wantz is true, the QR sweep -// orthogonal similarity transformation is accumulated into -// z[iloz:ihiz,iloz:ihiz] from the right, otherwise z not referenced. -// -// v and ldv represent an auxiliary matrix V of size (nshfts/2)×3. Note that V -// is transposed with respect to the reference netlib implementation. -// -// u and ldu represent an auxiliary matrix of size (3*nshfts-3)×(3*nshfts-3). -// -// wh and ldwh represent an auxiliary matrix of size (3*nshfts-3)×nh. -// -// wv and ldwv represent an auxiliary matrix of size nv×(3*nshfts-3). -// -// Dlaqr5 is an internal routine. It is exported for testing purposes. -func (impl Implementation) Dlaqr5(wantt, wantz bool, kacc22 int, n, ktop, kbot, nshfts int, sr, si []float64, h []float64, ldh int, iloz, ihiz int, z []float64, ldz int, v []float64, ldv int, u []float64, ldu int, nv int, wv []float64, ldwv int, nh int, wh []float64, ldwh int) { - switch { - case kacc22 != 0 && kacc22 != 1 && kacc22 != 2: - panic(badKacc22) - case n < 0: - panic(nLT0) - case ktop < 0 || n <= ktop: - panic(badKtop) - case kbot < 0 || n <= kbot: - panic(badKbot) - - case nshfts < 0: - panic(nshftsLT0) - case nshfts&0x1 != 0: - panic(nshftsOdd) - case len(sr) != nshfts: - panic(badLenSr) - case len(si) != nshfts: - panic(badLenSi) - - case ldh < max(1, n): - panic(badLdH) - case len(h) < (n-1)*ldh+n: - panic(shortH) - - case wantz && ihiz >= n: - panic(badIhiz) - case wantz && iloz < 0 || ihiz < iloz: - panic(badIloz) - case ldz < 1, wantz && ldz < n: - panic(badLdZ) - case wantz && len(z) < (n-1)*ldz+n: - panic(shortZ) - - case ldv < 3: - // V is transposed w.r.t. reference lapack. - panic(badLdV) - case len(v) < (nshfts/2-1)*ldv+3: - panic(shortV) - - case ldu < max(1, 3*nshfts-3): - panic(badLdU) - case len(u) < (3*nshfts-3-1)*ldu+3*nshfts-3: - panic(shortU) - - case nv < 0: - panic(nvLT0) - case ldwv < max(1, 3*nshfts-3): - panic(badLdWV) - case len(wv) < (nv-1)*ldwv+3*nshfts-3: - panic(shortWV) - - case nh < 0: - panic(nhLT0) - case ldwh < max(1, nh): - panic(badLdWH) - case len(wh) < (3*nshfts-3-1)*ldwh+nh: - panic(shortWH) - - case ktop > 0 && h[ktop*ldh+ktop-1] != 0: - panic(notIsolated) - case kbot < n-1 && h[(kbot+1)*ldh+kbot] != 0: - panic(notIsolated) - } - - // If there are no shifts, then there is nothing to do. - if nshfts < 2 { - return - } - // If the active block is empty or 1×1, then there is nothing to do. - if ktop >= kbot { - return - } - - // Shuffle shifts into pairs of real shifts and pairs of complex - // conjugate shifts assuming complex conjugate shifts are already - // adjacent to one another. - for i := 0; i < nshfts-2; i += 2 { - if si[i] == -si[i+1] { - continue - } - sr[i], sr[i+1], sr[i+2] = sr[i+1], sr[i+2], sr[i] - si[i], si[i+1], si[i+2] = si[i+1], si[i+2], si[i] - } - - // Note: lapack says that nshfts must be even but allows it to be odd - // anyway. We panic above if nshfts is not even, so reducing it by one - // is unnecessary. The only caller Dlaqr04 uses only even nshfts. - // - // The original comment and code from lapack-3.6.0/SRC/dlaqr5.f:341: - // * ==== NSHFTS is supposed to be even, but if it is odd, - // * . then simply reduce it by one. The shuffle above - // * . ensures that the dropped shift is real and that - // * . the remaining shifts are paired. ==== - // * - // NS = NSHFTS - MOD( NSHFTS, 2 ) - ns := nshfts - - safmin := dlamchS - ulp := dlamchP - smlnum := safmin * float64(n) / ulp - - // Use accumulated reflections to update far-from-diagonal entries? - accum := kacc22 == 1 || kacc22 == 2 - // If so, exploit the 2×2 block structure? - blk22 := ns > 2 && kacc22 == 2 - - // Clear trash. - if ktop+2 <= kbot { - h[(ktop+2)*ldh+ktop] = 0 - } - - // nbmps = number of 2-shift bulges in the chain. - nbmps := ns / 2 - - // kdu = width of slab. - kdu := 6*nbmps - 3 - - // Create and chase chains of nbmps bulges. - for incol := 3*(1-nbmps) + ktop - 1; incol <= kbot-2; incol += 3*nbmps - 2 { - ndcol := incol + kdu - if accum { - impl.Dlaset(blas.All, kdu, kdu, 0, 1, u, ldu) - } - - // Near-the-diagonal bulge chase. The following loop performs - // the near-the-diagonal part of a small bulge multi-shift QR - // sweep. Each 6*nbmps-2 column diagonal chunk extends from - // column incol to column ndcol (including both column incol and - // column ndcol). The following loop chases a 3*nbmps column - // long chain of nbmps bulges 3*nbmps-2 columns to the right. - // (incol may be less than ktop and ndcol may be greater than - // kbot indicating phantom columns from which to chase bulges - // before they are actually introduced or to which to chase - // bulges beyond column kbot.) - for krcol := incol; krcol <= min(incol+3*nbmps-3, kbot-2); krcol++ { - // Bulges number mtop to mbot are active double implicit - // shift bulges. There may or may not also be small 2×2 - // bulge, if there is room. The inactive bulges (if any) - // must wait until the active bulges have moved down the - // diagonal to make room. The phantom matrix paradigm - // described above helps keep track. - - mtop := max(0, ((ktop-1)-krcol+2)/3) - mbot := min(nbmps, (kbot-krcol)/3) - 1 - m22 := mbot + 1 - bmp22 := (mbot < nbmps-1) && (krcol+3*m22 == kbot-2) - - // Generate reflections to chase the chain right one - // column. (The minimum value of k is ktop-1.) - for m := mtop; m <= mbot; m++ { - k := krcol + 3*m - if k == ktop-1 { - impl.Dlaqr1(3, h[ktop*ldh+ktop:], ldh, - sr[2*m], si[2*m], sr[2*m+1], si[2*m+1], - v[m*ldv:m*ldv+3]) - alpha := v[m*ldv] - _, v[m*ldv] = impl.Dlarfg(3, alpha, v[m*ldv+1:m*ldv+3], 1) - continue - } - beta := h[(k+1)*ldh+k] - v[m*ldv+1] = h[(k+2)*ldh+k] - v[m*ldv+2] = h[(k+3)*ldh+k] - beta, v[m*ldv] = impl.Dlarfg(3, beta, v[m*ldv+1:m*ldv+3], 1) - - // A bulge may collapse because of vigilant deflation or - // destructive underflow. In the underflow case, try the - // two-small-subdiagonals trick to try to reinflate the - // bulge. - if h[(k+3)*ldh+k] != 0 || h[(k+3)*ldh+k+1] != 0 || h[(k+3)*ldh+k+2] == 0 { - // Typical case: not collapsed (yet). - h[(k+1)*ldh+k] = beta - h[(k+2)*ldh+k] = 0 - h[(k+3)*ldh+k] = 0 - continue - } - - // Atypical case: collapsed. Attempt to reintroduce - // ignoring H[k+1,k] and H[k+2,k]. If the fill - // resulting from the new reflector is too large, - // then abandon it. Otherwise, use the new one. - var vt [3]float64 - impl.Dlaqr1(3, h[(k+1)*ldh+k+1:], ldh, sr[2*m], - si[2*m], sr[2*m+1], si[2*m+1], vt[:]) - alpha := vt[0] - _, vt[0] = impl.Dlarfg(3, alpha, vt[1:3], 1) - refsum := vt[0] * (h[(k+1)*ldh+k] + vt[1]*h[(k+2)*ldh+k]) - - dsum := math.Abs(h[k*ldh+k]) + math.Abs(h[(k+1)*ldh+k+1]) + math.Abs(h[(k+2)*ldh+k+2]) - if math.Abs(h[(k+2)*ldh+k]-refsum*vt[1])+math.Abs(refsum*vt[2]) > ulp*dsum { - // Starting a new bulge here would create - // non-negligible fill. Use the old one with - // trepidation. - h[(k+1)*ldh+k] = beta - h[(k+2)*ldh+k] = 0 - h[(k+3)*ldh+k] = 0 - continue - } else { - // Starting a new bulge here would create - // only negligible fill. Replace the old - // reflector with the new one. - h[(k+1)*ldh+k] -= refsum - h[(k+2)*ldh+k] = 0 - h[(k+3)*ldh+k] = 0 - v[m*ldv] = vt[0] - v[m*ldv+1] = vt[1] - v[m*ldv+2] = vt[2] - } - } - - // Generate a 2×2 reflection, if needed. - if bmp22 { - k := krcol + 3*m22 - if k == ktop-1 { - impl.Dlaqr1(2, h[(k+1)*ldh+k+1:], ldh, - sr[2*m22], si[2*m22], sr[2*m22+1], si[2*m22+1], - v[m22*ldv:m22*ldv+2]) - beta := v[m22*ldv] - _, v[m22*ldv] = impl.Dlarfg(2, beta, v[m22*ldv+1:m22*ldv+2], 1) - } else { - beta := h[(k+1)*ldh+k] - v[m22*ldv+1] = h[(k+2)*ldh+k] - beta, v[m22*ldv] = impl.Dlarfg(2, beta, v[m22*ldv+1:m22*ldv+2], 1) - h[(k+1)*ldh+k] = beta - h[(k+2)*ldh+k] = 0 - } - } - - // Multiply H by reflections from the left. - var jbot int - switch { - case accum: - jbot = min(ndcol, kbot) - case wantt: - jbot = n - 1 - default: - jbot = kbot - } - for j := max(ktop, krcol); j <= jbot; j++ { - mend := min(mbot+1, (j-krcol+2)/3) - 1 - for m := mtop; m <= mend; m++ { - k := krcol + 3*m - refsum := v[m*ldv] * (h[(k+1)*ldh+j] + - v[m*ldv+1]*h[(k+2)*ldh+j] + v[m*ldv+2]*h[(k+3)*ldh+j]) - h[(k+1)*ldh+j] -= refsum - h[(k+2)*ldh+j] -= refsum * v[m*ldv+1] - h[(k+3)*ldh+j] -= refsum * v[m*ldv+2] - } - } - if bmp22 { - k := krcol + 3*m22 - for j := max(k+1, ktop); j <= jbot; j++ { - refsum := v[m22*ldv] * (h[(k+1)*ldh+j] + v[m22*ldv+1]*h[(k+2)*ldh+j]) - h[(k+1)*ldh+j] -= refsum - h[(k+2)*ldh+j] -= refsum * v[m22*ldv+1] - } - } - - // Multiply H by reflections from the right. Delay filling in the last row - // until the vigilant deflation check is complete. - var jtop int - switch { - case accum: - jtop = max(ktop, incol) - case wantt: - jtop = 0 - default: - jtop = ktop - } - for m := mtop; m <= mbot; m++ { - if v[m*ldv] == 0 { - continue - } - k := krcol + 3*m - for j := jtop; j <= min(kbot, k+3); j++ { - refsum := v[m*ldv] * (h[j*ldh+k+1] + - v[m*ldv+1]*h[j*ldh+k+2] + v[m*ldv+2]*h[j*ldh+k+3]) - h[j*ldh+k+1] -= refsum - h[j*ldh+k+2] -= refsum * v[m*ldv+1] - h[j*ldh+k+3] -= refsum * v[m*ldv+2] - } - if accum { - // Accumulate U. (If necessary, update Z later with an - // efficient matrix-matrix multiply.) - kms := k - incol - for j := max(0, ktop-incol-1); j < kdu; j++ { - refsum := v[m*ldv] * (u[j*ldu+kms] + - v[m*ldv+1]*u[j*ldu+kms+1] + v[m*ldv+2]*u[j*ldu+kms+2]) - u[j*ldu+kms] -= refsum - u[j*ldu+kms+1] -= refsum * v[m*ldv+1] - u[j*ldu+kms+2] -= refsum * v[m*ldv+2] - } - } else if wantz { - // U is not accumulated, so update Z now by multiplying by - // reflections from the right. - for j := iloz; j <= ihiz; j++ { - refsum := v[m*ldv] * (z[j*ldz+k+1] + - v[m*ldv+1]*z[j*ldz+k+2] + v[m*ldv+2]*z[j*ldz+k+3]) - z[j*ldz+k+1] -= refsum - z[j*ldz+k+2] -= refsum * v[m*ldv+1] - z[j*ldz+k+3] -= refsum * v[m*ldv+2] - } - } - } - - // Special case: 2×2 reflection (if needed). - if bmp22 && v[m22*ldv] != 0 { - k := krcol + 3*m22 - for j := jtop; j <= min(kbot, k+3); j++ { - refsum := v[m22*ldv] * (h[j*ldh+k+1] + v[m22*ldv+1]*h[j*ldh+k+2]) - h[j*ldh+k+1] -= refsum - h[j*ldh+k+2] -= refsum * v[m22*ldv+1] - } - if accum { - kms := k - incol - for j := max(0, ktop-incol-1); j < kdu; j++ { - refsum := v[m22*ldv] * (u[j*ldu+kms] + v[m22*ldv+1]*u[j*ldu+kms+1]) - u[j*ldu+kms] -= refsum - u[j*ldu+kms+1] -= refsum * v[m22*ldv+1] - } - } else if wantz { - for j := iloz; j <= ihiz; j++ { - refsum := v[m22*ldv] * (z[j*ldz+k+1] + v[m22*ldv+1]*z[j*ldz+k+2]) - z[j*ldz+k+1] -= refsum - z[j*ldz+k+2] -= refsum * v[m22*ldv+1] - } - } - } - - // Vigilant deflation check. - mstart := mtop - if krcol+3*mstart < ktop { - mstart++ - } - mend := mbot - if bmp22 { - mend++ - } - if krcol == kbot-2 { - mend++ - } - for m := mstart; m <= mend; m++ { - k := min(kbot-1, krcol+3*m) - - // The following convergence test requires that the tradition - // small-compared-to-nearby-diagonals criterion and the Ahues & - // Tisseur (LAWN 122, 1997) criteria both be satisfied. The latter - // improves accuracy in some examples. Falling back on an alternate - // convergence criterion when tst1 or tst2 is zero (as done here) is - // traditional but probably unnecessary. - - if h[(k+1)*ldh+k] == 0 { - continue - } - tst1 := math.Abs(h[k*ldh+k]) + math.Abs(h[(k+1)*ldh+k+1]) - if tst1 == 0 { - if k >= ktop+1 { - tst1 += math.Abs(h[k*ldh+k-1]) - } - if k >= ktop+2 { - tst1 += math.Abs(h[k*ldh+k-2]) - } - if k >= ktop+3 { - tst1 += math.Abs(h[k*ldh+k-3]) - } - if k <= kbot-2 { - tst1 += math.Abs(h[(k+2)*ldh+k+1]) - } - if k <= kbot-3 { - tst1 += math.Abs(h[(k+3)*ldh+k+1]) - } - if k <= kbot-4 { - tst1 += math.Abs(h[(k+4)*ldh+k+1]) - } - } - if math.Abs(h[(k+1)*ldh+k]) <= math.Max(smlnum, ulp*tst1) { - h12 := math.Max(math.Abs(h[(k+1)*ldh+k]), math.Abs(h[k*ldh+k+1])) - h21 := math.Min(math.Abs(h[(k+1)*ldh+k]), math.Abs(h[k*ldh+k+1])) - h11 := math.Max(math.Abs(h[(k+1)*ldh+k+1]), math.Abs(h[k*ldh+k]-h[(k+1)*ldh+k+1])) - h22 := math.Min(math.Abs(h[(k+1)*ldh+k+1]), math.Abs(h[k*ldh+k]-h[(k+1)*ldh+k+1])) - scl := h11 + h12 - tst2 := h22 * (h11 / scl) - if tst2 == 0 || h21*(h12/scl) <= math.Max(smlnum, ulp*tst2) { - h[(k+1)*ldh+k] = 0 - } - } - } - - // Fill in the last row of each bulge. - mend = min(nbmps, (kbot-krcol-1)/3) - 1 - for m := mtop; m <= mend; m++ { - k := krcol + 3*m - refsum := v[m*ldv] * v[m*ldv+2] * h[(k+4)*ldh+k+3] - h[(k+4)*ldh+k+1] = -refsum - h[(k+4)*ldh+k+2] = -refsum * v[m*ldv+1] - h[(k+4)*ldh+k+3] -= refsum * v[m*ldv+2] - } - } - - // Use U (if accumulated) to update far-from-diagonal entries in H. - // If required, use U to update Z as well. - if !accum { - continue - } - var jtop, jbot int - if wantt { - jtop = 0 - jbot = n - 1 - } else { - jtop = ktop - jbot = kbot - } - bi := blas64.Implementation() - if !blk22 || incol < ktop || kbot < ndcol || ns <= 2 { - // Updates not exploiting the 2×2 block structure of U. k0 and nu keep track - // of the location and size of U in the special cases of introducing bulges - // and chasing bulges off the bottom. In these special cases and in case the - // number of shifts is ns = 2, there is no 2×2 block structure to exploit. - - k0 := max(0, ktop-incol-1) - nu := kdu - max(0, ndcol-kbot) - k0 - - // Horizontal multiply. - for jcol := min(ndcol, kbot) + 1; jcol <= jbot; jcol += nh { - jlen := min(nh, jbot-jcol+1) - bi.Dgemm(blas.Trans, blas.NoTrans, nu, jlen, nu, - 1, u[k0*ldu+k0:], ldu, - h[(incol+k0+1)*ldh+jcol:], ldh, - 0, wh, ldwh) - impl.Dlacpy(blas.All, nu, jlen, wh, ldwh, h[(incol+k0+1)*ldh+jcol:], ldh) - } - - // Vertical multiply. - for jrow := jtop; jrow <= max(ktop, incol)-1; jrow += nv { - jlen := min(nv, max(ktop, incol)-jrow) - bi.Dgemm(blas.NoTrans, blas.NoTrans, jlen, nu, nu, - 1, h[jrow*ldh+incol+k0+1:], ldh, - u[k0*ldu+k0:], ldu, - 0, wv, ldwv) - impl.Dlacpy(blas.All, jlen, nu, wv, ldwv, h[jrow*ldh+incol+k0+1:], ldh) - } - - // Z multiply (also vertical). - if wantz { - for jrow := iloz; jrow <= ihiz; jrow += nv { - jlen := min(nv, ihiz-jrow+1) - bi.Dgemm(blas.NoTrans, blas.NoTrans, jlen, nu, nu, - 1, z[jrow*ldz+incol+k0+1:], ldz, - u[k0*ldu+k0:], ldu, - 0, wv, ldwv) - impl.Dlacpy(blas.All, jlen, nu, wv, ldwv, z[jrow*ldz+incol+k0+1:], ldz) - } - } - - continue - } - - // Updates exploiting U's 2×2 block structure. - - // i2, i4, j2, j4 are the last rows and columns of the blocks. - i2 := (kdu + 1) / 2 - i4 := kdu - j2 := i4 - i2 - j4 := kdu - - // kzs and knz deal with the band of zeros along the diagonal of one of the - // triangular blocks. - kzs := (j4 - j2) - (ns + 1) - knz := ns + 1 - - // Horizontal multiply. - for jcol := min(ndcol, kbot) + 1; jcol <= jbot; jcol += nh { - jlen := min(nh, jbot-jcol+1) - - // Copy bottom of H to top+kzs of scratch (the first kzs - // rows get multiplied by zero). - impl.Dlacpy(blas.All, knz, jlen, h[(incol+1+j2)*ldh+jcol:], ldh, wh[kzs*ldwh:], ldwh) - - // Multiply by U21^T. - impl.Dlaset(blas.All, kzs, jlen, 0, 0, wh, ldwh) - bi.Dtrmm(blas.Left, blas.Upper, blas.Trans, blas.NonUnit, knz, jlen, - 1, u[j2*ldu+kzs:], ldu, wh[kzs*ldwh:], ldwh) - - // Multiply top of H by U11^T. - bi.Dgemm(blas.Trans, blas.NoTrans, i2, jlen, j2, - 1, u, ldu, h[(incol+1)*ldh+jcol:], ldh, - 1, wh, ldwh) - - // Copy top of H to bottom of WH. - impl.Dlacpy(blas.All, j2, jlen, h[(incol+1)*ldh+jcol:], ldh, wh[i2*ldwh:], ldwh) - - // Multiply by U21^T. - bi.Dtrmm(blas.Left, blas.Lower, blas.Trans, blas.NonUnit, j2, jlen, - 1, u[i2:], ldu, wh[i2*ldwh:], ldwh) - - // Multiply by U22. - bi.Dgemm(blas.Trans, blas.NoTrans, i4-i2, jlen, j4-j2, - 1, u[j2*ldu+i2:], ldu, h[(incol+1+j2)*ldh+jcol:], ldh, - 1, wh[i2*ldwh:], ldwh) - - // Copy it back. - impl.Dlacpy(blas.All, kdu, jlen, wh, ldwh, h[(incol+1)*ldh+jcol:], ldh) - } - - // Vertical multiply. - for jrow := jtop; jrow <= max(incol, ktop)-1; jrow += nv { - jlen := min(nv, max(incol, ktop)-jrow) - - // Copy right of H to scratch (the first kzs columns get multiplied - // by zero). - impl.Dlacpy(blas.All, jlen, knz, h[jrow*ldh+incol+1+j2:], ldh, wv[kzs:], ldwv) - - // Multiply by U21. - impl.Dlaset(blas.All, jlen, kzs, 0, 0, wv, ldwv) - bi.Dtrmm(blas.Right, blas.Upper, blas.NoTrans, blas.NonUnit, jlen, knz, - 1, u[j2*ldu+kzs:], ldu, wv[kzs:], ldwv) - - // Multiply by U11. - bi.Dgemm(blas.NoTrans, blas.NoTrans, jlen, i2, j2, - 1, h[jrow*ldh+incol+1:], ldh, u, ldu, - 1, wv, ldwv) - - // Copy left of H to right of scratch. - impl.Dlacpy(blas.All, jlen, j2, h[jrow*ldh+incol+1:], ldh, wv[i2:], ldwv) - - // Multiply by U21. - bi.Dtrmm(blas.Right, blas.Lower, blas.NoTrans, blas.NonUnit, jlen, i4-i2, - 1, u[i2:], ldu, wv[i2:], ldwv) - - // Multiply by U22. - bi.Dgemm(blas.NoTrans, blas.NoTrans, jlen, i4-i2, j4-j2, - 1, h[jrow*ldh+incol+1+j2:], ldh, u[j2*ldu+i2:], ldu, - 1, wv[i2:], ldwv) - - // Copy it back. - impl.Dlacpy(blas.All, jlen, kdu, wv, ldwv, h[jrow*ldh+incol+1:], ldh) - } - - if !wantz { - continue - } - // Multiply Z (also vertical). - for jrow := iloz; jrow <= ihiz; jrow += nv { - jlen := min(nv, ihiz-jrow+1) - - // Copy right of Z to left of scratch (first kzs columns get - // multiplied by zero). - impl.Dlacpy(blas.All, jlen, knz, z[jrow*ldz+incol+1+j2:], ldz, wv[kzs:], ldwv) - - // Multiply by U12. - impl.Dlaset(blas.All, jlen, kzs, 0, 0, wv, ldwv) - bi.Dtrmm(blas.Right, blas.Upper, blas.NoTrans, blas.NonUnit, jlen, knz, - 1, u[j2*ldu+kzs:], ldu, wv[kzs:], ldwv) - - // Multiply by U11. - bi.Dgemm(blas.NoTrans, blas.NoTrans, jlen, i2, j2, - 1, z[jrow*ldz+incol+1:], ldz, u, ldu, - 1, wv, ldwv) - - // Copy left of Z to right of scratch. - impl.Dlacpy(blas.All, jlen, j2, z[jrow*ldz+incol+1:], ldz, wv[i2:], ldwv) - - // Multiply by U21. - bi.Dtrmm(blas.Right, blas.Lower, blas.NoTrans, blas.NonUnit, jlen, i4-i2, - 1, u[i2:], ldu, wv[i2:], ldwv) - - // Multiply by U22. - bi.Dgemm(blas.NoTrans, blas.NoTrans, jlen, i4-i2, j4-j2, - 1, z[jrow*ldz+incol+1+j2:], ldz, u[j2*ldu+i2:], ldu, - 1, wv[i2:], ldwv) - - // Copy the result back to Z. - impl.Dlacpy(blas.All, jlen, kdu, wv, ldwv, z[jrow*ldz+incol+1:], ldz) - } - } -} diff --git a/vendor/gonum.org/v1/gonum/lapack/gonum/dlarf.go b/vendor/gonum.org/v1/gonum/lapack/gonum/dlarf.go deleted file mode 100644 index 9fc97a3285..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/gonum/dlarf.go +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright ©2015 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import ( - "gonum.org/v1/gonum/blas" - "gonum.org/v1/gonum/blas/blas64" -) - -// Dlarf applies an elementary reflector to a general rectangular matrix c. -// This computes -// c = h * c if side == Left -// c = c * h if side == right -// where -// h = 1 - tau * v * v^T -// and c is an m * n matrix. -// -// work is temporary storage of length at least m if side == Left and at least -// n if side == Right. This function will panic if this length requirement is not met. -// -// Dlarf is an internal routine. It is exported for testing purposes. -func (impl Implementation) Dlarf(side blas.Side, m, n int, v []float64, incv int, tau float64, c []float64, ldc int, work []float64) { - switch { - case side != blas.Left && side != blas.Right: - panic(badSide) - case m < 0: - panic(mLT0) - case n < 0: - panic(nLT0) - case incv == 0: - panic(zeroIncV) - case ldc < max(1, n): - panic(badLdC) - } - - if m == 0 || n == 0 { - return - } - - applyleft := side == blas.Left - lenV := n - if applyleft { - lenV = m - } - - switch { - case len(v) < 1+(lenV-1)*abs(incv): - panic(shortV) - case len(c) < (m-1)*ldc+n: - panic(shortC) - case (applyleft && len(work) < n) || (!applyleft && len(work) < m): - panic(shortWork) - } - - lastv := 0 // last non-zero element of v - lastc := 0 // last non-zero row/column of c - if tau != 0 { - var i int - if applyleft { - lastv = m - 1 - } else { - lastv = n - 1 - } - if incv > 0 { - i = lastv * incv - } - - // Look for the last non-zero row in v. - for lastv >= 0 && v[i] == 0 { - lastv-- - i -= incv - } - if applyleft { - // Scan for the last non-zero column in C[0:lastv, :] - lastc = impl.Iladlc(lastv+1, n, c, ldc) - } else { - // Scan for the last non-zero row in C[:, 0:lastv] - lastc = impl.Iladlr(m, lastv+1, c, ldc) - } - } - if lastv == -1 || lastc == -1 { - return - } - // Sometimes 1-indexing is nicer ... - bi := blas64.Implementation() - if applyleft { - // Form H * C - // w[0:lastc+1] = c[1:lastv+1, 1:lastc+1]^T * v[1:lastv+1,1] - bi.Dgemv(blas.Trans, lastv+1, lastc+1, 1, c, ldc, v, incv, 0, work, 1) - // c[0: lastv, 0: lastc] = c[...] - w[0:lastv, 1] * v[1:lastc, 1]^T - bi.Dger(lastv+1, lastc+1, -tau, v, incv, work, 1, c, ldc) - return - } - // Form C*H - // w[0:lastc+1,1] := c[0:lastc+1,0:lastv+1] * v[0:lastv+1,1] - bi.Dgemv(blas.NoTrans, lastc+1, lastv+1, 1, c, ldc, v, incv, 0, work, 1) - // c[0:lastc+1,0:lastv+1] = c[...] - w[0:lastc+1,0] * v[0:lastv+1,0]^T - bi.Dger(lastc+1, lastv+1, -tau, work, 1, v, incv, c, ldc) -} diff --git a/vendor/gonum.org/v1/gonum/lapack/gonum/dlarfb.go b/vendor/gonum.org/v1/gonum/lapack/gonum/dlarfb.go deleted file mode 100644 index 4dd8e063ac..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/gonum/dlarfb.go +++ /dev/null @@ -1,449 +0,0 @@ -// Copyright ©2015 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import ( - "gonum.org/v1/gonum/blas" - "gonum.org/v1/gonum/blas/blas64" - "gonum.org/v1/gonum/lapack" -) - -// Dlarfb applies a block reflector to a matrix. -// -// In the call to Dlarfb, the mxn c is multiplied by the implicitly defined matrix h as follows: -// c = h * c if side == Left and trans == NoTrans -// c = c * h if side == Right and trans == NoTrans -// c = h^T * c if side == Left and trans == Trans -// c = c * h^T if side == Right and trans == Trans -// h is a product of elementary reflectors. direct sets the direction of multiplication -// h = h_1 * h_2 * ... * h_k if direct == Forward -// h = h_k * h_k-1 * ... * h_1 if direct == Backward -// The combination of direct and store defines the orientation of the elementary -// reflectors. In all cases the ones on the diagonal are implicitly represented. -// -// If direct == lapack.Forward and store == lapack.ColumnWise -// V = [ 1 ] -// [v1 1 ] -// [v1 v2 1] -// [v1 v2 v3] -// [v1 v2 v3] -// If direct == lapack.Forward and store == lapack.RowWise -// V = [ 1 v1 v1 v1 v1] -// [ 1 v2 v2 v2] -// [ 1 v3 v3] -// If direct == lapack.Backward and store == lapack.ColumnWise -// V = [v1 v2 v3] -// [v1 v2 v3] -// [ 1 v2 v3] -// [ 1 v3] -// [ 1] -// If direct == lapack.Backward and store == lapack.RowWise -// V = [v1 v1 1 ] -// [v2 v2 v2 1 ] -// [v3 v3 v3 v3 1] -// An elementary reflector can be explicitly constructed by extracting the -// corresponding elements of v, placing a 1 where the diagonal would be, and -// placing zeros in the remaining elements. -// -// t is a k×k matrix containing the block reflector, and this function will panic -// if t is not of sufficient size. See Dlarft for more information. -// -// work is a temporary storage matrix with stride ldwork. -// work must be of size at least n×k side == Left and m×k if side == Right, and -// this function will panic if this size is not met. -// -// Dlarfb is an internal routine. It is exported for testing purposes. -func (Implementation) Dlarfb(side blas.Side, trans blas.Transpose, direct lapack.Direct, store lapack.StoreV, m, n, k int, v []float64, ldv int, t []float64, ldt int, c []float64, ldc int, work []float64, ldwork int) { - nv := m - if side == blas.Right { - nv = n - } - switch { - case side != blas.Left && side != blas.Right: - panic(badSide) - case trans != blas.Trans && trans != blas.NoTrans: - panic(badTrans) - case direct != lapack.Forward && direct != lapack.Backward: - panic(badDirect) - case store != lapack.ColumnWise && store != lapack.RowWise: - panic(badStoreV) - case m < 0: - panic(mLT0) - case n < 0: - panic(nLT0) - case k < 0: - panic(kLT0) - case store == lapack.ColumnWise && ldv < max(1, k): - panic(badLdV) - case store == lapack.RowWise && ldv < max(1, nv): - panic(badLdV) - case ldt < max(1, k): - panic(badLdT) - case ldc < max(1, n): - panic(badLdC) - case ldwork < max(1, k): - panic(badLdWork) - } - - if m == 0 || n == 0 { - return - } - - nw := n - if side == blas.Right { - nw = m - } - switch { - case store == lapack.ColumnWise && len(v) < (nv-1)*ldv+k: - panic(shortV) - case store == lapack.RowWise && len(v) < (k-1)*ldv+nv: - panic(shortV) - case len(t) < (k-1)*ldt+k: - panic(shortT) - case len(c) < (m-1)*ldc+n: - panic(shortC) - case len(work) < (nw-1)*ldwork+k: - panic(shortWork) - } - - bi := blas64.Implementation() - - transt := blas.Trans - if trans == blas.Trans { - transt = blas.NoTrans - } - // TODO(btracey): This follows the original Lapack code where the - // elements are copied into the columns of the working array. The - // loops should go in the other direction so the data is written - // into the rows of work so the copy is not strided. A bigger change - // would be to replace work with work^T, but benchmarks would be - // needed to see if the change is merited. - if store == lapack.ColumnWise { - if direct == lapack.Forward { - // V1 is the first k rows of C. V2 is the remaining rows. - if side == blas.Left { - // W = C^T V = C1^T V1 + C2^T V2 (stored in work). - - // W = C1. - for j := 0; j < k; j++ { - bi.Dcopy(n, c[j*ldc:], 1, work[j:], ldwork) - } - // W = W * V1. - bi.Dtrmm(blas.Right, blas.Lower, blas.NoTrans, blas.Unit, - n, k, 1, - v, ldv, - work, ldwork) - if m > k { - // W = W + C2^T V2. - bi.Dgemm(blas.Trans, blas.NoTrans, n, k, m-k, - 1, c[k*ldc:], ldc, v[k*ldv:], ldv, - 1, work, ldwork) - } - // W = W * T^T or W * T. - bi.Dtrmm(blas.Right, blas.Upper, transt, blas.NonUnit, n, k, - 1, t, ldt, - work, ldwork) - // C -= V * W^T. - if m > k { - // C2 -= V2 * W^T. - bi.Dgemm(blas.NoTrans, blas.Trans, m-k, n, k, - -1, v[k*ldv:], ldv, work, ldwork, - 1, c[k*ldc:], ldc) - } - // W *= V1^T. - bi.Dtrmm(blas.Right, blas.Lower, blas.Trans, blas.Unit, n, k, - 1, v, ldv, - work, ldwork) - // C1 -= W^T. - // TODO(btracey): This should use blas.Axpy. - for i := 0; i < n; i++ { - for j := 0; j < k; j++ { - c[j*ldc+i] -= work[i*ldwork+j] - } - } - return - } - // Form C = C * H or C * H^T, where C = (C1 C2). - - // W = C1. - for i := 0; i < k; i++ { - bi.Dcopy(m, c[i:], ldc, work[i:], ldwork) - } - // W *= V1. - bi.Dtrmm(blas.Right, blas.Lower, blas.NoTrans, blas.Unit, m, k, - 1, v, ldv, - work, ldwork) - if n > k { - bi.Dgemm(blas.NoTrans, blas.NoTrans, m, k, n-k, - 1, c[k:], ldc, v[k*ldv:], ldv, - 1, work, ldwork) - } - // W *= T or T^T. - bi.Dtrmm(blas.Right, blas.Upper, trans, blas.NonUnit, m, k, - 1, t, ldt, - work, ldwork) - if n > k { - bi.Dgemm(blas.NoTrans, blas.Trans, m, n-k, k, - -1, work, ldwork, v[k*ldv:], ldv, - 1, c[k:], ldc) - } - // C -= W * V^T. - bi.Dtrmm(blas.Right, blas.Lower, blas.Trans, blas.Unit, m, k, - 1, v, ldv, - work, ldwork) - // C -= W. - // TODO(btracey): This should use blas.Axpy. - for i := 0; i < m; i++ { - for j := 0; j < k; j++ { - c[i*ldc+j] -= work[i*ldwork+j] - } - } - return - } - // V = (V1) - // = (V2) (last k rows) - // Where V2 is unit upper triangular. - if side == blas.Left { - // Form H * C or - // W = C^T V. - - // W = C2^T. - for j := 0; j < k; j++ { - bi.Dcopy(n, c[(m-k+j)*ldc:], 1, work[j:], ldwork) - } - // W *= V2. - bi.Dtrmm(blas.Right, blas.Upper, blas.NoTrans, blas.Unit, n, k, - 1, v[(m-k)*ldv:], ldv, - work, ldwork) - if m > k { - // W += C1^T * V1. - bi.Dgemm(blas.Trans, blas.NoTrans, n, k, m-k, - 1, c, ldc, v, ldv, - 1, work, ldwork) - } - // W *= T or T^T. - bi.Dtrmm(blas.Right, blas.Lower, transt, blas.NonUnit, n, k, - 1, t, ldt, - work, ldwork) - // C -= V * W^T. - if m > k { - bi.Dgemm(blas.NoTrans, blas.Trans, m-k, n, k, - -1, v, ldv, work, ldwork, - 1, c, ldc) - } - // W *= V2^T. - bi.Dtrmm(blas.Right, blas.Upper, blas.Trans, blas.Unit, n, k, - 1, v[(m-k)*ldv:], ldv, - work, ldwork) - // C2 -= W^T. - // TODO(btracey): This should use blas.Axpy. - for i := 0; i < n; i++ { - for j := 0; j < k; j++ { - c[(m-k+j)*ldc+i] -= work[i*ldwork+j] - } - } - return - } - // Form C * H or C * H^T where C = (C1 C2). - // W = C * V. - - // W = C2. - for j := 0; j < k; j++ { - bi.Dcopy(m, c[n-k+j:], ldc, work[j:], ldwork) - } - - // W = W * V2. - bi.Dtrmm(blas.Right, blas.Upper, blas.NoTrans, blas.Unit, m, k, - 1, v[(n-k)*ldv:], ldv, - work, ldwork) - if n > k { - bi.Dgemm(blas.NoTrans, blas.NoTrans, m, k, n-k, - 1, c, ldc, v, ldv, - 1, work, ldwork) - } - // W *= T or T^T. - bi.Dtrmm(blas.Right, blas.Lower, trans, blas.NonUnit, m, k, - 1, t, ldt, - work, ldwork) - // C -= W * V^T. - if n > k { - // C1 -= W * V1^T. - bi.Dgemm(blas.NoTrans, blas.Trans, m, n-k, k, - -1, work, ldwork, v, ldv, - 1, c, ldc) - } - // W *= V2^T. - bi.Dtrmm(blas.Right, blas.Upper, blas.Trans, blas.Unit, m, k, - 1, v[(n-k)*ldv:], ldv, - work, ldwork) - // C2 -= W. - // TODO(btracey): This should use blas.Axpy. - for i := 0; i < m; i++ { - for j := 0; j < k; j++ { - c[i*ldc+n-k+j] -= work[i*ldwork+j] - } - } - return - } - // Store = Rowwise. - if direct == lapack.Forward { - // V = (V1 V2) where v1 is unit upper triangular. - if side == blas.Left { - // Form H * C or H^T * C where C = (C1; C2). - // W = C^T * V^T. - - // W = C1^T. - for j := 0; j < k; j++ { - bi.Dcopy(n, c[j*ldc:], 1, work[j:], ldwork) - } - // W *= V1^T. - bi.Dtrmm(blas.Right, blas.Upper, blas.Trans, blas.Unit, n, k, - 1, v, ldv, - work, ldwork) - if m > k { - bi.Dgemm(blas.Trans, blas.Trans, n, k, m-k, - 1, c[k*ldc:], ldc, v[k:], ldv, - 1, work, ldwork) - } - // W *= T or T^T. - bi.Dtrmm(blas.Right, blas.Upper, transt, blas.NonUnit, n, k, - 1, t, ldt, - work, ldwork) - // C -= V^T * W^T. - if m > k { - bi.Dgemm(blas.Trans, blas.Trans, m-k, n, k, - -1, v[k:], ldv, work, ldwork, - 1, c[k*ldc:], ldc) - } - // W *= V1. - bi.Dtrmm(blas.Right, blas.Upper, blas.NoTrans, blas.Unit, n, k, - 1, v, ldv, - work, ldwork) - // C1 -= W^T. - // TODO(btracey): This should use blas.Axpy. - for i := 0; i < n; i++ { - for j := 0; j < k; j++ { - c[j*ldc+i] -= work[i*ldwork+j] - } - } - return - } - // Form C * H or C * H^T where C = (C1 C2). - // W = C * V^T. - - // W = C1. - for j := 0; j < k; j++ { - bi.Dcopy(m, c[j:], ldc, work[j:], ldwork) - } - // W *= V1^T. - bi.Dtrmm(blas.Right, blas.Upper, blas.Trans, blas.Unit, m, k, - 1, v, ldv, - work, ldwork) - if n > k { - bi.Dgemm(blas.NoTrans, blas.Trans, m, k, n-k, - 1, c[k:], ldc, v[k:], ldv, - 1, work, ldwork) - } - // W *= T or T^T. - bi.Dtrmm(blas.Right, blas.Upper, trans, blas.NonUnit, m, k, - 1, t, ldt, - work, ldwork) - // C -= W * V. - if n > k { - bi.Dgemm(blas.NoTrans, blas.NoTrans, m, n-k, k, - -1, work, ldwork, v[k:], ldv, - 1, c[k:], ldc) - } - // W *= V1. - bi.Dtrmm(blas.Right, blas.Upper, blas.NoTrans, blas.Unit, m, k, - 1, v, ldv, - work, ldwork) - // C1 -= W. - // TODO(btracey): This should use blas.Axpy. - for i := 0; i < m; i++ { - for j := 0; j < k; j++ { - c[i*ldc+j] -= work[i*ldwork+j] - } - } - return - } - // V = (V1 V2) where V2 is the last k columns and is lower unit triangular. - if side == blas.Left { - // Form H * C or H^T C where C = (C1 ; C2). - // W = C^T * V^T. - - // W = C2^T. - for j := 0; j < k; j++ { - bi.Dcopy(n, c[(m-k+j)*ldc:], 1, work[j:], ldwork) - } - // W *= V2^T. - bi.Dtrmm(blas.Right, blas.Lower, blas.Trans, blas.Unit, n, k, - 1, v[m-k:], ldv, - work, ldwork) - if m > k { - bi.Dgemm(blas.Trans, blas.Trans, n, k, m-k, - 1, c, ldc, v, ldv, - 1, work, ldwork) - } - // W *= T or T^T. - bi.Dtrmm(blas.Right, blas.Lower, transt, blas.NonUnit, n, k, - 1, t, ldt, - work, ldwork) - // C -= V^T * W^T. - if m > k { - bi.Dgemm(blas.Trans, blas.Trans, m-k, n, k, - -1, v, ldv, work, ldwork, - 1, c, ldc) - } - // W *= V2. - bi.Dtrmm(blas.Right, blas.Lower, blas.NoTrans, blas.Unit, n, k, - 1, v[m-k:], ldv, - work, ldwork) - // C2 -= W^T. - // TODO(btracey): This should use blas.Axpy. - for i := 0; i < n; i++ { - for j := 0; j < k; j++ { - c[(m-k+j)*ldc+i] -= work[i*ldwork+j] - } - } - return - } - // Form C * H or C * H^T where C = (C1 C2). - // W = C * V^T. - // W = C2. - for j := 0; j < k; j++ { - bi.Dcopy(m, c[n-k+j:], ldc, work[j:], ldwork) - } - // W *= V2^T. - bi.Dtrmm(blas.Right, blas.Lower, blas.Trans, blas.Unit, m, k, - 1, v[n-k:], ldv, - work, ldwork) - if n > k { - bi.Dgemm(blas.NoTrans, blas.Trans, m, k, n-k, - 1, c, ldc, v, ldv, - 1, work, ldwork) - } - // W *= T or T^T. - bi.Dtrmm(blas.Right, blas.Lower, trans, blas.NonUnit, m, k, - 1, t, ldt, - work, ldwork) - // C -= W * V. - if n > k { - bi.Dgemm(blas.NoTrans, blas.NoTrans, m, n-k, k, - -1, work, ldwork, v, ldv, - 1, c, ldc) - } - // W *= V2. - bi.Dtrmm(blas.Right, blas.Lower, blas.NoTrans, blas.Unit, m, k, - 1, v[n-k:], ldv, - work, ldwork) - // C1 -= W. - // TODO(btracey): This should use blas.Axpy. - for i := 0; i < m; i++ { - for j := 0; j < k; j++ { - c[i*ldc+n-k+j] -= work[i*ldwork+j] - } - } -} diff --git a/vendor/gonum.org/v1/gonum/lapack/gonum/dlarfg.go b/vendor/gonum.org/v1/gonum/lapack/gonum/dlarfg.go deleted file mode 100644 index e037fdd6bd..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/gonum/dlarfg.go +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright ©2015 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import ( - "math" - - "gonum.org/v1/gonum/blas/blas64" -) - -// Dlarfg generates an elementary reflector for a Householder matrix. It creates -// a real elementary reflector of order n such that -// H * (alpha) = (beta) -// ( x) ( 0) -// H^T * H = I -// H is represented in the form -// H = 1 - tau * (1; v) * (1 v^T) -// where tau is a real scalar. -// -// On entry, x contains the vector x, on exit it contains v. -// -// Dlarfg is an internal routine. It is exported for testing purposes. -func (impl Implementation) Dlarfg(n int, alpha float64, x []float64, incX int) (beta, tau float64) { - switch { - case n < 0: - panic(nLT0) - case incX <= 0: - panic(badIncX) - } - - if n <= 1 { - return alpha, 0 - } - - if len(x) < 1+(n-2)*abs(incX) { - panic(shortX) - } - - bi := blas64.Implementation() - - xnorm := bi.Dnrm2(n-1, x, incX) - if xnorm == 0 { - return alpha, 0 - } - beta = -math.Copysign(impl.Dlapy2(alpha, xnorm), alpha) - safmin := dlamchS / dlamchE - knt := 0 - if math.Abs(beta) < safmin { - // xnorm and beta may be inaccurate, scale x and recompute. - rsafmn := 1 / safmin - for { - knt++ - bi.Dscal(n-1, rsafmn, x, incX) - beta *= rsafmn - alpha *= rsafmn - if math.Abs(beta) >= safmin { - break - } - } - xnorm = bi.Dnrm2(n-1, x, incX) - beta = -math.Copysign(impl.Dlapy2(alpha, xnorm), alpha) - } - tau = (beta - alpha) / beta - bi.Dscal(n-1, 1/(alpha-beta), x, incX) - for j := 0; j < knt; j++ { - beta *= safmin - } - return beta, tau -} diff --git a/vendor/gonum.org/v1/gonum/lapack/gonum/dlarft.go b/vendor/gonum.org/v1/gonum/lapack/gonum/dlarft.go deleted file mode 100644 index 8f03eb8b3b..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/gonum/dlarft.go +++ /dev/null @@ -1,166 +0,0 @@ -// Copyright ©2015 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import ( - "gonum.org/v1/gonum/blas" - "gonum.org/v1/gonum/blas/blas64" - "gonum.org/v1/gonum/lapack" -) - -// Dlarft forms the triangular factor T of a block reflector H, storing the answer -// in t. -// H = I - V * T * V^T if store == lapack.ColumnWise -// H = I - V^T * T * V if store == lapack.RowWise -// H is defined by a product of the elementary reflectors where -// H = H_0 * H_1 * ... * H_{k-1} if direct == lapack.Forward -// H = H_{k-1} * ... * H_1 * H_0 if direct == lapack.Backward -// -// t is a k×k triangular matrix. t is upper triangular if direct = lapack.Forward -// and lower triangular otherwise. This function will panic if t is not of -// sufficient size. -// -// store describes the storage of the elementary reflectors in v. See -// Dlarfb for a description of layout. -// -// tau contains the scalar factors of the elementary reflectors H_i. -// -// Dlarft is an internal routine. It is exported for testing purposes. -func (Implementation) Dlarft(direct lapack.Direct, store lapack.StoreV, n, k int, v []float64, ldv int, tau []float64, t []float64, ldt int) { - mv, nv := n, k - if store == lapack.RowWise { - mv, nv = k, n - } - switch { - case direct != lapack.Forward && direct != lapack.Backward: - panic(badDirect) - case store != lapack.RowWise && store != lapack.ColumnWise: - panic(badStoreV) - case n < 0: - panic(nLT0) - case k < 1: - panic(kLT1) - case ldv < max(1, nv): - panic(badLdV) - case len(tau) < k: - panic(shortTau) - case ldt < max(1, k): - panic(shortT) - } - - if n == 0 { - return - } - - switch { - case len(v) < (mv-1)*ldv+nv: - panic(shortV) - case len(t) < (k-1)*ldt+k: - panic(shortT) - } - - bi := blas64.Implementation() - - // TODO(btracey): There are a number of minor obvious loop optimizations here. - // TODO(btracey): It may be possible to rearrange some of the code so that - // index of 1 is more common in the Dgemv. - if direct == lapack.Forward { - prevlastv := n - 1 - for i := 0; i < k; i++ { - prevlastv = max(i, prevlastv) - if tau[i] == 0 { - for j := 0; j <= i; j++ { - t[j*ldt+i] = 0 - } - continue - } - var lastv int - if store == lapack.ColumnWise { - // skip trailing zeros - for lastv = n - 1; lastv >= i+1; lastv-- { - if v[lastv*ldv+i] != 0 { - break - } - } - for j := 0; j < i; j++ { - t[j*ldt+i] = -tau[i] * v[i*ldv+j] - } - j := min(lastv, prevlastv) - bi.Dgemv(blas.Trans, j-i, i, - -tau[i], v[(i+1)*ldv:], ldv, v[(i+1)*ldv+i:], ldv, - 1, t[i:], ldt) - } else { - for lastv = n - 1; lastv >= i+1; lastv-- { - if v[i*ldv+lastv] != 0 { - break - } - } - for j := 0; j < i; j++ { - t[j*ldt+i] = -tau[i] * v[j*ldv+i] - } - j := min(lastv, prevlastv) - bi.Dgemv(blas.NoTrans, i, j-i, - -tau[i], v[i+1:], ldv, v[i*ldv+i+1:], 1, - 1, t[i:], ldt) - } - bi.Dtrmv(blas.Upper, blas.NoTrans, blas.NonUnit, i, t, ldt, t[i:], ldt) - t[i*ldt+i] = tau[i] - if i > 1 { - prevlastv = max(prevlastv, lastv) - } else { - prevlastv = lastv - } - } - return - } - prevlastv := 0 - for i := k - 1; i >= 0; i-- { - if tau[i] == 0 { - for j := i; j < k; j++ { - t[j*ldt+i] = 0 - } - continue - } - var lastv int - if i < k-1 { - if store == lapack.ColumnWise { - for lastv = 0; lastv < i; lastv++ { - if v[lastv*ldv+i] != 0 { - break - } - } - for j := i + 1; j < k; j++ { - t[j*ldt+i] = -tau[i] * v[(n-k+i)*ldv+j] - } - j := max(lastv, prevlastv) - bi.Dgemv(blas.Trans, n-k+i-j, k-i-1, - -tau[i], v[j*ldv+i+1:], ldv, v[j*ldv+i:], ldv, - 1, t[(i+1)*ldt+i:], ldt) - } else { - for lastv = 0; lastv < i; lastv++ { - if v[i*ldv+lastv] != 0 { - break - } - } - for j := i + 1; j < k; j++ { - t[j*ldt+i] = -tau[i] * v[j*ldv+n-k+i] - } - j := max(lastv, prevlastv) - bi.Dgemv(blas.NoTrans, k-i-1, n-k+i-j, - -tau[i], v[(i+1)*ldv+j:], ldv, v[i*ldv+j:], 1, - 1, t[(i+1)*ldt+i:], ldt) - } - bi.Dtrmv(blas.Lower, blas.NoTrans, blas.NonUnit, k-i-1, - t[(i+1)*ldt+i+1:], ldt, - t[(i+1)*ldt+i:], ldt) - if i > 0 { - prevlastv = min(prevlastv, lastv) - } else { - prevlastv = lastv - } - } - t[i*ldt+i] = tau[i] - } -} diff --git a/vendor/gonum.org/v1/gonum/lapack/gonum/dlarfx.go b/vendor/gonum.org/v1/gonum/lapack/gonum/dlarfx.go deleted file mode 100644 index d7928c8cf4..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/gonum/dlarfx.go +++ /dev/null @@ -1,550 +0,0 @@ -// Copyright ©2016 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import "gonum.org/v1/gonum/blas" - -// Dlarfx applies an elementary reflector H to a real m×n matrix C, from either -// the left or the right, with loop unrolling when the reflector has order less -// than 11. -// -// H is represented in the form -// H = I - tau * v * v^T, -// where tau is a real scalar and v is a real vector. If tau = 0, then H is -// taken to be the identity matrix. -// -// v must have length equal to m if side == blas.Left, and equal to n if side == -// blas.Right, otherwise Dlarfx will panic. -// -// c and ldc represent the m×n matrix C. On return, C is overwritten by the -// matrix H * C if side == blas.Left, or C * H if side == blas.Right. -// -// work must have length at least n if side == blas.Left, and at least m if side -// == blas.Right, otherwise Dlarfx will panic. work is not referenced if H has -// order < 11. -// -// Dlarfx is an internal routine. It is exported for testing purposes. -func (impl Implementation) Dlarfx(side blas.Side, m, n int, v []float64, tau float64, c []float64, ldc int, work []float64) { - switch { - case side != blas.Left && side != blas.Right: - panic(badSide) - case m < 0: - panic(mLT0) - case n < 0: - panic(nLT0) - case ldc < max(1, n): - panic(badLdC) - } - - // Quick return if possible. - if m == 0 || n == 0 { - return - } - - nh := m - lwork := n - if side == blas.Right { - nh = n - lwork = m - } - switch { - case len(v) < nh: - panic(shortV) - case len(c) < (m-1)*ldc+n: - panic(shortC) - case nh > 10 && len(work) < lwork: - panic(shortWork) - } - - if tau == 0 { - return - } - - if side == blas.Left { - // Form H * C, where H has order m. - switch m { - default: // Code for general m. - impl.Dlarf(side, m, n, v, 1, tau, c, ldc, work) - return - - case 0: // No-op for zero size matrix. - return - - case 1: // Special code for 1×1 Householder matrix. - t0 := 1 - tau*v[0]*v[0] - for j := 0; j < n; j++ { - c[j] *= t0 - } - return - - case 2: // Special code for 2×2 Householder matrix. - v0 := v[0] - t0 := tau * v0 - v1 := v[1] - t1 := tau * v1 - for j := 0; j < n; j++ { - sum := v0*c[j] + v1*c[ldc+j] - c[j] -= sum * t0 - c[ldc+j] -= sum * t1 - } - return - - case 3: // Special code for 3×3 Householder matrix. - v0 := v[0] - t0 := tau * v0 - v1 := v[1] - t1 := tau * v1 - v2 := v[2] - t2 := tau * v2 - for j := 0; j < n; j++ { - sum := v0*c[j] + v1*c[ldc+j] + v2*c[2*ldc+j] - c[j] -= sum * t0 - c[ldc+j] -= sum * t1 - c[2*ldc+j] -= sum * t2 - } - return - - case 4: // Special code for 4×4 Householder matrix. - v0 := v[0] - t0 := tau * v0 - v1 := v[1] - t1 := tau * v1 - v2 := v[2] - t2 := tau * v2 - v3 := v[3] - t3 := tau * v3 - for j := 0; j < n; j++ { - sum := v0*c[j] + v1*c[ldc+j] + v2*c[2*ldc+j] + v3*c[3*ldc+j] - c[j] -= sum * t0 - c[ldc+j] -= sum * t1 - c[2*ldc+j] -= sum * t2 - c[3*ldc+j] -= sum * t3 - } - return - - case 5: // Special code for 5×5 Householder matrix. - v0 := v[0] - t0 := tau * v0 - v1 := v[1] - t1 := tau * v1 - v2 := v[2] - t2 := tau * v2 - v3 := v[3] - t3 := tau * v3 - v4 := v[4] - t4 := tau * v4 - for j := 0; j < n; j++ { - sum := v0*c[j] + v1*c[ldc+j] + v2*c[2*ldc+j] + v3*c[3*ldc+j] + v4*c[4*ldc+j] - c[j] -= sum * t0 - c[ldc+j] -= sum * t1 - c[2*ldc+j] -= sum * t2 - c[3*ldc+j] -= sum * t3 - c[4*ldc+j] -= sum * t4 - } - return - - case 6: // Special code for 6×6 Householder matrix. - v0 := v[0] - t0 := tau * v0 - v1 := v[1] - t1 := tau * v1 - v2 := v[2] - t2 := tau * v2 - v3 := v[3] - t3 := tau * v3 - v4 := v[4] - t4 := tau * v4 - v5 := v[5] - t5 := tau * v5 - for j := 0; j < n; j++ { - sum := v0*c[j] + v1*c[ldc+j] + v2*c[2*ldc+j] + v3*c[3*ldc+j] + v4*c[4*ldc+j] + - v5*c[5*ldc+j] - c[j] -= sum * t0 - c[ldc+j] -= sum * t1 - c[2*ldc+j] -= sum * t2 - c[3*ldc+j] -= sum * t3 - c[4*ldc+j] -= sum * t4 - c[5*ldc+j] -= sum * t5 - } - return - - case 7: // Special code for 7×7 Householder matrix. - v0 := v[0] - t0 := tau * v0 - v1 := v[1] - t1 := tau * v1 - v2 := v[2] - t2 := tau * v2 - v3 := v[3] - t3 := tau * v3 - v4 := v[4] - t4 := tau * v4 - v5 := v[5] - t5 := tau * v5 - v6 := v[6] - t6 := tau * v6 - for j := 0; j < n; j++ { - sum := v0*c[j] + v1*c[ldc+j] + v2*c[2*ldc+j] + v3*c[3*ldc+j] + v4*c[4*ldc+j] + - v5*c[5*ldc+j] + v6*c[6*ldc+j] - c[j] -= sum * t0 - c[ldc+j] -= sum * t1 - c[2*ldc+j] -= sum * t2 - c[3*ldc+j] -= sum * t3 - c[4*ldc+j] -= sum * t4 - c[5*ldc+j] -= sum * t5 - c[6*ldc+j] -= sum * t6 - } - return - - case 8: // Special code for 8×8 Householder matrix. - v0 := v[0] - t0 := tau * v0 - v1 := v[1] - t1 := tau * v1 - v2 := v[2] - t2 := tau * v2 - v3 := v[3] - t3 := tau * v3 - v4 := v[4] - t4 := tau * v4 - v5 := v[5] - t5 := tau * v5 - v6 := v[6] - t6 := tau * v6 - v7 := v[7] - t7 := tau * v7 - for j := 0; j < n; j++ { - sum := v0*c[j] + v1*c[ldc+j] + v2*c[2*ldc+j] + v3*c[3*ldc+j] + v4*c[4*ldc+j] + - v5*c[5*ldc+j] + v6*c[6*ldc+j] + v7*c[7*ldc+j] - c[j] -= sum * t0 - c[ldc+j] -= sum * t1 - c[2*ldc+j] -= sum * t2 - c[3*ldc+j] -= sum * t3 - c[4*ldc+j] -= sum * t4 - c[5*ldc+j] -= sum * t5 - c[6*ldc+j] -= sum * t6 - c[7*ldc+j] -= sum * t7 - } - return - - case 9: // Special code for 9×9 Householder matrix. - v0 := v[0] - t0 := tau * v0 - v1 := v[1] - t1 := tau * v1 - v2 := v[2] - t2 := tau * v2 - v3 := v[3] - t3 := tau * v3 - v4 := v[4] - t4 := tau * v4 - v5 := v[5] - t5 := tau * v5 - v6 := v[6] - t6 := tau * v6 - v7 := v[7] - t7 := tau * v7 - v8 := v[8] - t8 := tau * v8 - for j := 0; j < n; j++ { - sum := v0*c[j] + v1*c[ldc+j] + v2*c[2*ldc+j] + v3*c[3*ldc+j] + v4*c[4*ldc+j] + - v5*c[5*ldc+j] + v6*c[6*ldc+j] + v7*c[7*ldc+j] + v8*c[8*ldc+j] - c[j] -= sum * t0 - c[ldc+j] -= sum * t1 - c[2*ldc+j] -= sum * t2 - c[3*ldc+j] -= sum * t3 - c[4*ldc+j] -= sum * t4 - c[5*ldc+j] -= sum * t5 - c[6*ldc+j] -= sum * t6 - c[7*ldc+j] -= sum * t7 - c[8*ldc+j] -= sum * t8 - } - return - - case 10: // Special code for 10×10 Householder matrix. - v0 := v[0] - t0 := tau * v0 - v1 := v[1] - t1 := tau * v1 - v2 := v[2] - t2 := tau * v2 - v3 := v[3] - t3 := tau * v3 - v4 := v[4] - t4 := tau * v4 - v5 := v[5] - t5 := tau * v5 - v6 := v[6] - t6 := tau * v6 - v7 := v[7] - t7 := tau * v7 - v8 := v[8] - t8 := tau * v8 - v9 := v[9] - t9 := tau * v9 - for j := 0; j < n; j++ { - sum := v0*c[j] + v1*c[ldc+j] + v2*c[2*ldc+j] + v3*c[3*ldc+j] + v4*c[4*ldc+j] + - v5*c[5*ldc+j] + v6*c[6*ldc+j] + v7*c[7*ldc+j] + v8*c[8*ldc+j] + v9*c[9*ldc+j] - c[j] -= sum * t0 - c[ldc+j] -= sum * t1 - c[2*ldc+j] -= sum * t2 - c[3*ldc+j] -= sum * t3 - c[4*ldc+j] -= sum * t4 - c[5*ldc+j] -= sum * t5 - c[6*ldc+j] -= sum * t6 - c[7*ldc+j] -= sum * t7 - c[8*ldc+j] -= sum * t8 - c[9*ldc+j] -= sum * t9 - } - return - } - } - - // Form C * H, where H has order n. - switch n { - default: // Code for general n. - impl.Dlarf(side, m, n, v, 1, tau, c, ldc, work) - return - - case 0: // No-op for zero size matrix. - return - - case 1: // Special code for 1×1 Householder matrix. - t0 := 1 - tau*v[0]*v[0] - for j := 0; j < m; j++ { - c[j*ldc] *= t0 - } - return - - case 2: // Special code for 2×2 Householder matrix. - v0 := v[0] - t0 := tau * v0 - v1 := v[1] - t1 := tau * v1 - for j := 0; j < m; j++ { - cs := c[j*ldc:] - sum := v0*cs[0] + v1*cs[1] - cs[0] -= sum * t0 - cs[1] -= sum * t1 - } - return - - case 3: // Special code for 3×3 Householder matrix. - v0 := v[0] - t0 := tau * v0 - v1 := v[1] - t1 := tau * v1 - v2 := v[2] - t2 := tau * v2 - for j := 0; j < m; j++ { - cs := c[j*ldc:] - sum := v0*cs[0] + v1*cs[1] + v2*cs[2] - cs[0] -= sum * t0 - cs[1] -= sum * t1 - cs[2] -= sum * t2 - } - return - - case 4: // Special code for 4×4 Householder matrix. - v0 := v[0] - t0 := tau * v0 - v1 := v[1] - t1 := tau * v1 - v2 := v[2] - t2 := tau * v2 - v3 := v[3] - t3 := tau * v3 - for j := 0; j < m; j++ { - cs := c[j*ldc:] - sum := v0*cs[0] + v1*cs[1] + v2*cs[2] + v3*cs[3] - cs[0] -= sum * t0 - cs[1] -= sum * t1 - cs[2] -= sum * t2 - cs[3] -= sum * t3 - } - return - - case 5: // Special code for 5×5 Householder matrix. - v0 := v[0] - t0 := tau * v0 - v1 := v[1] - t1 := tau * v1 - v2 := v[2] - t2 := tau * v2 - v3 := v[3] - t3 := tau * v3 - v4 := v[4] - t4 := tau * v4 - for j := 0; j < m; j++ { - cs := c[j*ldc:] - sum := v0*cs[0] + v1*cs[1] + v2*cs[2] + v3*cs[3] + v4*cs[4] - cs[0] -= sum * t0 - cs[1] -= sum * t1 - cs[2] -= sum * t2 - cs[3] -= sum * t3 - cs[4] -= sum * t4 - } - return - - case 6: // Special code for 6×6 Householder matrix. - v0 := v[0] - t0 := tau * v0 - v1 := v[1] - t1 := tau * v1 - v2 := v[2] - t2 := tau * v2 - v3 := v[3] - t3 := tau * v3 - v4 := v[4] - t4 := tau * v4 - v5 := v[5] - t5 := tau * v5 - for j := 0; j < m; j++ { - cs := c[j*ldc:] - sum := v0*cs[0] + v1*cs[1] + v2*cs[2] + v3*cs[3] + v4*cs[4] + v5*cs[5] - cs[0] -= sum * t0 - cs[1] -= sum * t1 - cs[2] -= sum * t2 - cs[3] -= sum * t3 - cs[4] -= sum * t4 - cs[5] -= sum * t5 - } - return - - case 7: // Special code for 7×7 Householder matrix. - v0 := v[0] - t0 := tau * v0 - v1 := v[1] - t1 := tau * v1 - v2 := v[2] - t2 := tau * v2 - v3 := v[3] - t3 := tau * v3 - v4 := v[4] - t4 := tau * v4 - v5 := v[5] - t5 := tau * v5 - v6 := v[6] - t6 := tau * v6 - for j := 0; j < m; j++ { - cs := c[j*ldc:] - sum := v0*cs[0] + v1*cs[1] + v2*cs[2] + v3*cs[3] + v4*cs[4] + - v5*cs[5] + v6*cs[6] - cs[0] -= sum * t0 - cs[1] -= sum * t1 - cs[2] -= sum * t2 - cs[3] -= sum * t3 - cs[4] -= sum * t4 - cs[5] -= sum * t5 - cs[6] -= sum * t6 - } - return - - case 8: // Special code for 8×8 Householder matrix. - v0 := v[0] - t0 := tau * v0 - v1 := v[1] - t1 := tau * v1 - v2 := v[2] - t2 := tau * v2 - v3 := v[3] - t3 := tau * v3 - v4 := v[4] - t4 := tau * v4 - v5 := v[5] - t5 := tau * v5 - v6 := v[6] - t6 := tau * v6 - v7 := v[7] - t7 := tau * v7 - for j := 0; j < m; j++ { - cs := c[j*ldc:] - sum := v0*cs[0] + v1*cs[1] + v2*cs[2] + v3*cs[3] + v4*cs[4] + - v5*cs[5] + v6*cs[6] + v7*cs[7] - cs[0] -= sum * t0 - cs[1] -= sum * t1 - cs[2] -= sum * t2 - cs[3] -= sum * t3 - cs[4] -= sum * t4 - cs[5] -= sum * t5 - cs[6] -= sum * t6 - cs[7] -= sum * t7 - } - return - - case 9: // Special code for 9×9 Householder matrix. - v0 := v[0] - t0 := tau * v0 - v1 := v[1] - t1 := tau * v1 - v2 := v[2] - t2 := tau * v2 - v3 := v[3] - t3 := tau * v3 - v4 := v[4] - t4 := tau * v4 - v5 := v[5] - t5 := tau * v5 - v6 := v[6] - t6 := tau * v6 - v7 := v[7] - t7 := tau * v7 - v8 := v[8] - t8 := tau * v8 - for j := 0; j < m; j++ { - cs := c[j*ldc:] - sum := v0*cs[0] + v1*cs[1] + v2*cs[2] + v3*cs[3] + v4*cs[4] + - v5*cs[5] + v6*cs[6] + v7*cs[7] + v8*cs[8] - cs[0] -= sum * t0 - cs[1] -= sum * t1 - cs[2] -= sum * t2 - cs[3] -= sum * t3 - cs[4] -= sum * t4 - cs[5] -= sum * t5 - cs[6] -= sum * t6 - cs[7] -= sum * t7 - cs[8] -= sum * t8 - } - return - - case 10: // Special code for 10×10 Householder matrix. - v0 := v[0] - t0 := tau * v0 - v1 := v[1] - t1 := tau * v1 - v2 := v[2] - t2 := tau * v2 - v3 := v[3] - t3 := tau * v3 - v4 := v[4] - t4 := tau * v4 - v5 := v[5] - t5 := tau * v5 - v6 := v[6] - t6 := tau * v6 - v7 := v[7] - t7 := tau * v7 - v8 := v[8] - t8 := tau * v8 - v9 := v[9] - t9 := tau * v9 - for j := 0; j < m; j++ { - cs := c[j*ldc:] - sum := v0*cs[0] + v1*cs[1] + v2*cs[2] + v3*cs[3] + v4*cs[4] + - v5*cs[5] + v6*cs[6] + v7*cs[7] + v8*cs[8] + v9*cs[9] - cs[0] -= sum * t0 - cs[1] -= sum * t1 - cs[2] -= sum * t2 - cs[3] -= sum * t3 - cs[4] -= sum * t4 - cs[5] -= sum * t5 - cs[6] -= sum * t6 - cs[7] -= sum * t7 - cs[8] -= sum * t8 - cs[9] -= sum * t9 - } - return - } -} diff --git a/vendor/gonum.org/v1/gonum/lapack/gonum/dlartg.go b/vendor/gonum.org/v1/gonum/lapack/gonum/dlartg.go deleted file mode 100644 index ad64546137..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/gonum/dlartg.go +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright ©2015 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import "math" - -// Dlartg generates a plane rotation so that -// [ cs sn] * [f] = [r] -// [-sn cs] [g] = [0] -// This is a more accurate version of BLAS drotg, with the other differences that -// if g = 0, then cs = 1 and sn = 0, and if f = 0 and g != 0, then cs = 0 and sn = 1. -// If abs(f) > abs(g), cs will be positive. -// -// Dlartg is an internal routine. It is exported for testing purposes. -func (impl Implementation) Dlartg(f, g float64) (cs, sn, r float64) { - safmn2 := math.Pow(dlamchB, math.Trunc(math.Log(dlamchS/dlamchE)/math.Log(dlamchB)/2)) - safmx2 := 1 / safmn2 - if g == 0 { - cs = 1 - sn = 0 - r = f - return cs, sn, r - } - if f == 0 { - cs = 0 - sn = 1 - r = g - return cs, sn, r - } - f1 := f - g1 := g - scale := math.Max(math.Abs(f1), math.Abs(g1)) - if scale >= safmx2 { - var count int - for { - count++ - f1 *= safmn2 - g1 *= safmn2 - scale = math.Max(math.Abs(f1), math.Abs(g1)) - if scale < safmx2 { - break - } - } - r = math.Sqrt(f1*f1 + g1*g1) - cs = f1 / r - sn = g1 / r - for i := 0; i < count; i++ { - r *= safmx2 - } - } else if scale <= safmn2 { - var count int - for { - count++ - f1 *= safmx2 - g1 *= safmx2 - scale = math.Max(math.Abs(f1), math.Abs(g1)) - if scale >= safmn2 { - break - } - } - r = math.Sqrt(f1*f1 + g1*g1) - cs = f1 / r - sn = g1 / r - for i := 0; i < count; i++ { - r *= safmn2 - } - } else { - r = math.Sqrt(f1*f1 + g1*g1) - cs = f1 / r - sn = g1 / r - } - if math.Abs(f) > math.Abs(g) && cs < 0 { - cs *= -1 - sn *= -1 - r *= -1 - } - return cs, sn, r -} diff --git a/vendor/gonum.org/v1/gonum/lapack/gonum/dlas2.go b/vendor/gonum.org/v1/gonum/lapack/gonum/dlas2.go deleted file mode 100644 index 9922b4aa77..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/gonum/dlas2.go +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright ©2015 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import "math" - -// Dlas2 computes the singular values of the 2×2 matrix defined by -// [F G] -// [0 H] -// The smaller and larger singular values are returned in that order. -// -// Dlas2 is an internal routine. It is exported for testing purposes. -func (impl Implementation) Dlas2(f, g, h float64) (ssmin, ssmax float64) { - fa := math.Abs(f) - ga := math.Abs(g) - ha := math.Abs(h) - fhmin := math.Min(fa, ha) - fhmax := math.Max(fa, ha) - if fhmin == 0 { - if fhmax == 0 { - return 0, ga - } - v := math.Min(fhmax, ga) / math.Max(fhmax, ga) - return 0, math.Max(fhmax, ga) * math.Sqrt(1+v*v) - } - if ga < fhmax { - as := 1 + fhmin/fhmax - at := (fhmax - fhmin) / fhmax - au := (ga / fhmax) * (ga / fhmax) - c := 2 / (math.Sqrt(as*as+au) + math.Sqrt(at*at+au)) - return fhmin * c, fhmax / c - } - au := fhmax / ga - if au == 0 { - return fhmin * fhmax / ga, ga - } - as := 1 + fhmin/fhmax - at := (fhmax - fhmin) / fhmax - c := 1 / (math.Sqrt(1+(as*au)*(as*au)) + math.Sqrt(1+(at*au)*(at*au))) - return 2 * (fhmin * c) * au, ga / (c + c) -} diff --git a/vendor/gonum.org/v1/gonum/lapack/gonum/dlascl.go b/vendor/gonum.org/v1/gonum/lapack/gonum/dlascl.go deleted file mode 100644 index 61c4eb79cb..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/gonum/dlascl.go +++ /dev/null @@ -1,111 +0,0 @@ -// Copyright ©2015 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import ( - "math" - - "gonum.org/v1/gonum/lapack" -) - -// Dlascl multiplies an m×n matrix by the scalar cto/cfrom. -// -// cfrom must not be zero, and cto and cfrom must not be NaN, otherwise Dlascl -// will panic. -// -// Dlascl is an internal routine. It is exported for testing purposes. -func (impl Implementation) Dlascl(kind lapack.MatrixType, kl, ku int, cfrom, cto float64, m, n int, a []float64, lda int) { - switch kind { - default: - panic(badMatrixType) - case 'H', 'B', 'Q', 'Z': // See dlascl.f. - panic("not implemented") - case lapack.General, lapack.UpperTri, lapack.LowerTri: - if lda < max(1, n) { - panic(badLdA) - } - } - switch { - case cfrom == 0: - panic(zeroCFrom) - case math.IsNaN(cfrom): - panic(nanCFrom) - case math.IsNaN(cto): - panic(nanCTo) - case m < 0: - panic(mLT0) - case n < 0: - panic(nLT0) - } - - if n == 0 || m == 0 { - return - } - - switch kind { - case lapack.General, lapack.UpperTri, lapack.LowerTri: - if len(a) < (m-1)*lda+n { - panic(shortA) - } - } - - smlnum := dlamchS - bignum := 1 / smlnum - cfromc := cfrom - ctoc := cto - cfrom1 := cfromc * smlnum - for { - var done bool - var mul, ctol float64 - if cfrom1 == cfromc { - // cfromc is inf. - mul = ctoc / cfromc - done = true - ctol = ctoc - } else { - ctol = ctoc / bignum - if ctol == ctoc { - // ctoc is either 0 or inf. - mul = ctoc - done = true - cfromc = 1 - } else if math.Abs(cfrom1) > math.Abs(ctoc) && ctoc != 0 { - mul = smlnum - done = false - cfromc = cfrom1 - } else if math.Abs(ctol) > math.Abs(cfromc) { - mul = bignum - done = false - ctoc = ctol - } else { - mul = ctoc / cfromc - done = true - } - } - switch kind { - case lapack.General: - for i := 0; i < m; i++ { - for j := 0; j < n; j++ { - a[i*lda+j] = a[i*lda+j] * mul - } - } - case lapack.UpperTri: - for i := 0; i < m; i++ { - for j := i; j < n; j++ { - a[i*lda+j] = a[i*lda+j] * mul - } - } - case lapack.LowerTri: - for i := 0; i < m; i++ { - for j := 0; j <= min(i, n-1); j++ { - a[i*lda+j] = a[i*lda+j] * mul - } - } - } - if done { - break - } - } -} diff --git a/vendor/gonum.org/v1/gonum/lapack/gonum/dlaset.go b/vendor/gonum.org/v1/gonum/lapack/gonum/dlaset.go deleted file mode 100644 index b4e63916fb..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/gonum/dlaset.go +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright ©2015 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import "gonum.org/v1/gonum/blas" - -// Dlaset sets the off-diagonal elements of A to alpha, and the diagonal -// elements to beta. If uplo == blas.Upper, only the elements in the upper -// triangular part are set. If uplo == blas.Lower, only the elements in the -// lower triangular part are set. If uplo is otherwise, all of the elements of A -// are set. -// -// Dlaset is an internal routine. It is exported for testing purposes. -func (impl Implementation) Dlaset(uplo blas.Uplo, m, n int, alpha, beta float64, a []float64, lda int) { - switch { - case m < 0: - panic(mLT0) - case n < 0: - panic(nLT0) - case lda < max(1, n): - panic(badLdA) - } - - minmn := min(m, n) - if minmn == 0 { - return - } - - if len(a) < (m-1)*lda+n { - panic(shortA) - } - - if uplo == blas.Upper { - for i := 0; i < m; i++ { - for j := i + 1; j < n; j++ { - a[i*lda+j] = alpha - } - } - } else if uplo == blas.Lower { - for i := 0; i < m; i++ { - for j := 0; j < min(i+1, n); j++ { - a[i*lda+j] = alpha - } - } - } else { - for i := 0; i < m; i++ { - for j := 0; j < n; j++ { - a[i*lda+j] = alpha - } - } - } - for i := 0; i < minmn; i++ { - a[i*lda+i] = beta - } -} diff --git a/vendor/gonum.org/v1/gonum/lapack/gonum/dlasq1.go b/vendor/gonum.org/v1/gonum/lapack/gonum/dlasq1.go deleted file mode 100644 index 1f1d1dc42e..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/gonum/dlasq1.go +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright ©2015 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import ( - "math" - - "gonum.org/v1/gonum/blas/blas64" - "gonum.org/v1/gonum/lapack" -) - -// Dlasq1 computes the singular values of an n×n bidiagonal matrix with diagonal -// d and off-diagonal e. On exit, d contains the singular values in decreasing -// order, and e is overwritten. d must have length at least n, e must have -// length at least n-1, and the input work must have length at least 4*n. Dlasq1 -// will panic if these conditions are not met. -// -// Dlasq1 is an internal routine. It is exported for testing purposes. -func (impl Implementation) Dlasq1(n int, d, e, work []float64) (info int) { - if n < 0 { - panic(nLT0) - } - - if n == 0 { - return info - } - - switch { - case len(d) < n: - panic(shortD) - case len(e) < n-1: - panic(shortE) - case len(work) < 4*n: - panic(shortWork) - } - - if n == 1 { - d[0] = math.Abs(d[0]) - return info - } - - if n == 2 { - d[1], d[0] = impl.Dlas2(d[0], e[0], d[1]) - return info - } - - // Estimate the largest singular value. - var sigmx float64 - for i := 0; i < n-1; i++ { - d[i] = math.Abs(d[i]) - sigmx = math.Max(sigmx, math.Abs(e[i])) - } - d[n-1] = math.Abs(d[n-1]) - // Early return if sigmx is zero (matrix is already diagonal). - if sigmx == 0 { - impl.Dlasrt(lapack.SortDecreasing, n, d) - return info - } - - for i := 0; i < n; i++ { - sigmx = math.Max(sigmx, d[i]) - } - - // Copy D and E into WORK (in the Z format) and scale (squaring the - // input data makes scaling by a power of the radix pointless). - - eps := dlamchP - safmin := dlamchS - scale := math.Sqrt(eps / safmin) - bi := blas64.Implementation() - bi.Dcopy(n, d, 1, work, 2) - bi.Dcopy(n-1, e, 1, work[1:], 2) - impl.Dlascl(lapack.General, 0, 0, sigmx, scale, 2*n-1, 1, work, 1) - - // Compute the q's and e's. - for i := 0; i < 2*n-1; i++ { - work[i] *= work[i] - } - work[2*n-1] = 0 - - info = impl.Dlasq2(n, work) - if info == 0 { - for i := 0; i < n; i++ { - d[i] = math.Sqrt(work[i]) - } - impl.Dlascl(lapack.General, 0, 0, scale, sigmx, n, 1, d, 1) - } else if info == 2 { - // Maximum number of iterations exceeded. Move data from work - // into D and E so the calling subroutine can try to finish. - for i := 0; i < n; i++ { - d[i] = math.Sqrt(work[2*i]) - e[i] = math.Sqrt(work[2*i+1]) - } - impl.Dlascl(lapack.General, 0, 0, scale, sigmx, n, 1, d, 1) - impl.Dlascl(lapack.General, 0, 0, scale, sigmx, n, 1, e, 1) - } - return info -} diff --git a/vendor/gonum.org/v1/gonum/lapack/gonum/dlasq2.go b/vendor/gonum.org/v1/gonum/lapack/gonum/dlasq2.go deleted file mode 100644 index fd24a5509a..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/gonum/dlasq2.go +++ /dev/null @@ -1,369 +0,0 @@ -// Copyright ©2015 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import ( - "math" - - "gonum.org/v1/gonum/lapack" -) - -// Dlasq2 computes all the eigenvalues of the symmetric positive -// definite tridiagonal matrix associated with the qd array Z. Eigevalues -// are computed to high relative accuracy avoiding denormalization, underflow -// and overflow. -// -// To see the relation of Z to the tridiagonal matrix, let L be a -// unit lower bidiagonal matrix with sub-diagonals Z(2,4,6,,..) and -// let U be an upper bidiagonal matrix with 1's above and diagonal -// Z(1,3,5,,..). The tridiagonal is L*U or, if you prefer, the -// symmetric tridiagonal to which it is similar. -// -// info returns a status error. The return codes mean as follows: -// 0: The algorithm completed successfully. -// 1: A split was marked by a positive value in e. -// 2: Current block of Z not diagonalized after 100*n iterations (in inner -// while loop). On exit Z holds a qd array with the same eigenvalues as -// the given Z. -// 3: Termination criterion of outer while loop not met (program created more -// than N unreduced blocks). -// -// z must have length at least 4*n, and must not contain any negative elements. -// Dlasq2 will panic otherwise. -// -// Dlasq2 is an internal routine. It is exported for testing purposes. -func (impl Implementation) Dlasq2(n int, z []float64) (info int) { - if n < 0 { - panic(nLT0) - } - - if n == 0 { - return info - } - - if len(z) < 4*n { - panic(shortZ) - } - - if n == 1 { - if z[0] < 0 { - panic(negZ) - } - return info - } - - const cbias = 1.5 - - eps := dlamchP - safmin := dlamchS - tol := eps * 100 - tol2 := tol * tol - if n == 2 { - if z[1] < 0 || z[2] < 0 { - panic(negZ) - } else if z[2] > z[0] { - z[0], z[2] = z[2], z[0] - } - z[4] = z[0] + z[1] + z[2] - if z[1] > z[2]*tol2 { - t := 0.5 * (z[0] - z[2] + z[1]) - s := z[2] * (z[1] / t) - if s <= t { - s = z[2] * (z[1] / (t * (1 + math.Sqrt(1+s/t)))) - } else { - s = z[2] * (z[1] / (t + math.Sqrt(t)*math.Sqrt(t+s))) - } - t = z[0] + s + z[1] - z[2] *= z[0] / t - z[0] = t - } - z[1] = z[2] - z[5] = z[1] + z[0] - return info - } - // Check for negative data and compute sums of q's and e's. - z[2*n-1] = 0 - emin := z[1] - var d, e, qmax float64 - var i1, n1 int - for k := 0; k < 2*(n-1); k += 2 { - if z[k] < 0 || z[k+1] < 0 { - panic(negZ) - } - d += z[k] - e += z[k+1] - qmax = math.Max(qmax, z[k]) - emin = math.Min(emin, z[k+1]) - } - if z[2*(n-1)] < 0 { - panic(negZ) - } - d += z[2*(n-1)] - // Check for diagonality. - if e == 0 { - for k := 1; k < n; k++ { - z[k] = z[2*k] - } - impl.Dlasrt(lapack.SortDecreasing, n, z) - z[2*(n-1)] = d - return info - } - trace := d + e - // Check for zero data. - if trace == 0 { - z[2*(n-1)] = 0 - return info - } - // Rearrange data for locality: Z=(q1,qq1,e1,ee1,q2,qq2,e2,ee2,...). - for k := 2 * n; k >= 2; k -= 2 { - z[2*k-1] = 0 - z[2*k-2] = z[k-1] - z[2*k-3] = 0 - z[2*k-4] = z[k-2] - } - i0 := 0 - n0 := n - 1 - - // Reverse the qd-array, if warranted. - // z[4*i0-3] --> z[4*(i0+1)-3-1] --> z[4*i0] - if cbias*z[4*i0] < z[4*n0] { - ipn4Out := 4 * (i0 + n0 + 2) - for i4loop := 4 * (i0 + 1); i4loop <= 2*(i0+n0+1); i4loop += 4 { - i4 := i4loop - 1 - ipn4 := ipn4Out - 1 - z[i4-3], z[ipn4-i4-4] = z[ipn4-i4-4], z[i4-3] - z[i4-1], z[ipn4-i4-6] = z[ipn4-i4-6], z[i4-1] - } - } - - // Initial split checking via dqd and Li's test. - pp := 0 - for k := 0; k < 2; k++ { - d = z[4*n0+pp] - for i4loop := 4*n0 + pp; i4loop >= 4*(i0+1)+pp; i4loop -= 4 { - i4 := i4loop - 1 - if z[i4-1] <= tol2*d { - z[i4-1] = math.Copysign(0, -1) - d = z[i4-3] - } else { - d = z[i4-3] * (d / (d + z[i4-1])) - } - } - // dqd maps Z to ZZ plus Li's test. - emin = z[4*(i0+1)+pp] - d = z[4*i0+pp] - for i4loop := 4*(i0+1) + pp; i4loop <= 4*n0+pp; i4loop += 4 { - i4 := i4loop - 1 - z[i4-2*pp-2] = d + z[i4-1] - if z[i4-1] <= tol2*d { - z[i4-1] = math.Copysign(0, -1) - z[i4-2*pp-2] = d - z[i4-2*pp] = 0 - d = z[i4+1] - } else if safmin*z[i4+1] < z[i4-2*pp-2] && safmin*z[i4-2*pp-2] < z[i4+1] { - tmp := z[i4+1] / z[i4-2*pp-2] - z[i4-2*pp] = z[i4-1] * tmp - d *= tmp - } else { - z[i4-2*pp] = z[i4+1] * (z[i4-1] / z[i4-2*pp-2]) - d = z[i4+1] * (d / z[i4-2*pp-2]) - } - emin = math.Min(emin, z[i4-2*pp]) - } - z[4*(n0+1)-pp-3] = d - - // Now find qmax. - qmax = z[4*(i0+1)-pp-3] - for i4loop := 4*(i0+1) - pp + 2; i4loop <= 4*(n0+1)+pp-2; i4loop += 4 { - i4 := i4loop - 1 - qmax = math.Max(qmax, z[i4]) - } - // Prepare for the next iteration on K. - pp = 1 - pp - } - - // Initialise variables to pass to DLASQ3. - var ttype int - var dmin1, dmin2, dn, dn1, dn2, g, tau float64 - var tempq float64 - iter := 2 - var nFail int - nDiv := 2 * (n0 - i0) - var i4 int -outer: - for iwhila := 1; iwhila <= n+1; iwhila++ { - // Test for completion. - if n0 < 0 { - // Move q's to the front. - for k := 1; k < n; k++ { - z[k] = z[4*k] - } - // Sort and compute sum of eigenvalues. - impl.Dlasrt(lapack.SortDecreasing, n, z) - e = 0 - for k := n - 1; k >= 0; k-- { - e += z[k] - } - // Store trace, sum(eigenvalues) and information on performance. - z[2*n] = trace - z[2*n+1] = e - z[2*n+2] = float64(iter) - z[2*n+3] = float64(nDiv) / float64(n*n) - z[2*n+4] = 100 * float64(nFail) / float64(iter) - return info - } - - // While array unfinished do - // e[n0] holds the value of sigma when submatrix in i0:n0 - // splits from the rest of the array, but is negated. - var desig float64 - var sigma float64 - if n0 != n-1 { - sigma = -z[4*(n0+1)-2] - } - if sigma < 0 { - info = 1 - return info - } - // Find last unreduced submatrix's top index i0, find qmax and - // emin. Find Gershgorin-type bound if Q's much greater than E's. - var emax float64 - if n0 > i0 { - emin = math.Abs(z[4*(n0+1)-6]) - } else { - emin = 0 - } - qmin := z[4*(n0+1)-4] - qmax = qmin - zSmall := false - for i4loop := 4 * (n0 + 1); i4loop >= 8; i4loop -= 4 { - i4 = i4loop - 1 - if z[i4-5] <= 0 { - zSmall = true - break - } - if qmin >= 4*emax { - qmin = math.Min(qmin, z[i4-3]) - emax = math.Max(emax, z[i4-5]) - } - qmax = math.Max(qmax, z[i4-7]+z[i4-5]) - emin = math.Min(emin, z[i4-5]) - } - if !zSmall { - i4 = 3 - } - i0 = (i4+1)/4 - 1 - pp = 0 - if n0-i0 > 1 { - dee := z[4*i0] - deemin := dee - kmin := i0 - for i4loop := 4*(i0+1) + 1; i4loop <= 4*(n0+1)-3; i4loop += 4 { - i4 := i4loop - 1 - dee = z[i4] * (dee / (dee + z[i4-2])) - if dee <= deemin { - deemin = dee - kmin = (i4+4)/4 - 1 - } - } - if (kmin-i0)*2 < n0-kmin && deemin <= 0.5*z[4*n0] { - ipn4Out := 4 * (i0 + n0 + 2) - pp = 2 - for i4loop := 4 * (i0 + 1); i4loop <= 2*(i0+n0+1); i4loop += 4 { - i4 := i4loop - 1 - ipn4 := ipn4Out - 1 - z[i4-3], z[ipn4-i4-4] = z[ipn4-i4-4], z[i4-3] - z[i4-2], z[ipn4-i4-3] = z[ipn4-i4-3], z[i4-2] - z[i4-1], z[ipn4-i4-6] = z[ipn4-i4-6], z[i4-1] - z[i4], z[ipn4-i4-5] = z[ipn4-i4-5], z[i4] - } - } - } - // Put -(initial shift) into DMIN. - dmin := -math.Max(0, qmin-2*math.Sqrt(qmin)*math.Sqrt(emax)) - - // Now i0:n0 is unreduced. - // PP = 0 for ping, PP = 1 for pong. - // PP = 2 indicates that flipping was applied to the Z array and - // and that the tests for deflation upon entry in Dlasq3 - // should not be performed. - nbig := 100 * (n0 - i0 + 1) - for iwhilb := 0; iwhilb < nbig; iwhilb++ { - if i0 > n0 { - continue outer - } - - // While submatrix unfinished take a good dqds step. - i0, n0, pp, dmin, sigma, desig, qmax, nFail, iter, nDiv, ttype, dmin1, dmin2, dn, dn1, dn2, g, tau = - impl.Dlasq3(i0, n0, z, pp, dmin, sigma, desig, qmax, nFail, iter, nDiv, ttype, dmin1, dmin2, dn, dn1, dn2, g, tau) - - pp = 1 - pp - // When emin is very small check for splits. - if pp == 0 && n0-i0 >= 3 { - if z[4*(n0+1)-1] <= tol2*qmax || z[4*(n0+1)-2] <= tol2*sigma { - splt := i0 - 1 - qmax = z[4*i0] - emin = z[4*(i0+1)-2] - oldemn := z[4*(i0+1)-1] - for i4loop := 4 * (i0 + 1); i4loop <= 4*(n0-2); i4loop += 4 { - i4 := i4loop - 1 - if z[i4] <= tol2*z[i4-3] || z[i4-1] <= tol2*sigma { - z[i4-1] = -sigma - splt = i4 / 4 - qmax = 0 - emin = z[i4+3] - oldemn = z[i4+4] - } else { - qmax = math.Max(qmax, z[i4+1]) - emin = math.Min(emin, z[i4-1]) - oldemn = math.Min(oldemn, z[i4]) - } - } - z[4*(n0+1)-2] = emin - z[4*(n0+1)-1] = oldemn - i0 = splt + 1 - } - } - } - // Maximum number of iterations exceeded, restore the shift - // sigma and place the new d's and e's in a qd array. - // This might need to be done for several blocks. - info = 2 - i1 = i0 - for { - tempq = z[4*i0] - z[4*i0] += sigma - for k := i0 + 1; k <= n0; k++ { - tempe := z[4*(k+1)-6] - z[4*(k+1)-6] *= tempq / z[4*(k+1)-8] - tempq = z[4*k] - z[4*k] += sigma + tempe - z[4*(k+1)-6] - } - // Prepare to do this on the previous block if there is one. - if i1 <= 0 { - break - } - n1 = i1 - 1 - for i1 >= 1 && z[4*(i1+1)-6] >= 0 { - i1 -= 1 - } - sigma = -z[4*(n1+1)-2] - } - for k := 0; k < n; k++ { - z[2*k] = z[4*k] - // Only the block 1..N0 is unfinished. The rest of the e's - // must be essentially zero, although sometimes other data - // has been stored in them. - if k < n0 { - z[2*(k+1)-1] = z[4*(k+1)-1] - } else { - z[2*(k+1)] = 0 - } - } - return info - } - info = 3 - return info -} diff --git a/vendor/gonum.org/v1/gonum/lapack/gonum/dlasq3.go b/vendor/gonum.org/v1/gonum/lapack/gonum/dlasq3.go deleted file mode 100644 index a05e94ef17..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/gonum/dlasq3.go +++ /dev/null @@ -1,172 +0,0 @@ -// Copyright ©2015 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import "math" - -// Dlasq3 checks for deflation, computes a shift (tau) and calls dqds. -// In case of failure it changes shifts, and tries again until output -// is positive. -// -// Dlasq3 is an internal routine. It is exported for testing purposes. -func (impl Implementation) Dlasq3(i0, n0 int, z []float64, pp int, dmin, sigma, desig, qmax float64, nFail, iter, nDiv int, ttype int, dmin1, dmin2, dn, dn1, dn2, g, tau float64) ( - i0Out, n0Out, ppOut int, dminOut, sigmaOut, desigOut, qmaxOut float64, nFailOut, iterOut, nDivOut, ttypeOut int, dmin1Out, dmin2Out, dnOut, dn1Out, dn2Out, gOut, tauOut float64) { - switch { - case i0 < 0: - panic(i0LT0) - case n0 < 0: - panic(n0LT0) - case len(z) < 4*n0: - panic(shortZ) - case pp != 0 && pp != 1 && pp != 2: - panic(badPp) - } - - const cbias = 1.5 - - n0in := n0 - eps := dlamchP - tol := eps * 100 - tol2 := tol * tol - var nn int - var t float64 - for { - if n0 < i0 { - return i0, n0, pp, dmin, sigma, desig, qmax, nFail, iter, nDiv, ttype, dmin1, dmin2, dn, dn1, dn2, g, tau - } - if n0 == i0 { - z[4*(n0+1)-4] = z[4*(n0+1)+pp-4] + sigma - n0-- - continue - } - nn = 4*(n0+1) + pp - 1 - if n0 != i0+1 { - // Check whether e[n0-1] is negligible, 1 eigenvalue. - if z[nn-5] > tol2*(sigma+z[nn-3]) && z[nn-2*pp-4] > tol2*z[nn-7] { - // Check whether e[n0-2] is negligible, 2 eigenvalues. - if z[nn-9] > tol2*sigma && z[nn-2*pp-8] > tol2*z[nn-11] { - break - } - } else { - z[4*(n0+1)-4] = z[4*(n0+1)+pp-4] + sigma - n0-- - continue - } - } - if z[nn-3] > z[nn-7] { - z[nn-3], z[nn-7] = z[nn-7], z[nn-3] - } - t = 0.5 * (z[nn-7] - z[nn-3] + z[nn-5]) - if z[nn-5] > z[nn-3]*tol2 && t != 0 { - s := z[nn-3] * (z[nn-5] / t) - if s <= t { - s = z[nn-3] * (z[nn-5] / (t * (1 + math.Sqrt(1+s/t)))) - } else { - s = z[nn-3] * (z[nn-5] / (t + math.Sqrt(t)*math.Sqrt(t+s))) - } - t = z[nn-7] + (s + z[nn-5]) - z[nn-3] *= z[nn-7] / t - z[nn-7] = t - } - z[4*(n0+1)-8] = z[nn-7] + sigma - z[4*(n0+1)-4] = z[nn-3] + sigma - n0 -= 2 - } - if pp == 2 { - pp = 0 - } - - // Reverse the qd-array, if warranted. - if dmin <= 0 || n0 < n0in { - if cbias*z[4*(i0+1)+pp-4] < z[4*(n0+1)+pp-4] { - ipn4Out := 4 * (i0 + n0 + 2) - for j4loop := 4 * (i0 + 1); j4loop <= 2*((i0+1)+(n0+1)-1); j4loop += 4 { - ipn4 := ipn4Out - 1 - j4 := j4loop - 1 - - z[j4-3], z[ipn4-j4-4] = z[ipn4-j4-4], z[j4-3] - z[j4-2], z[ipn4-j4-3] = z[ipn4-j4-3], z[j4-2] - z[j4-1], z[ipn4-j4-6] = z[ipn4-j4-6], z[j4-1] - z[j4], z[ipn4-j4-5] = z[ipn4-j4-5], z[j4] - } - if n0-i0 <= 4 { - z[4*(n0+1)+pp-2] = z[4*(i0+1)+pp-2] - z[4*(n0+1)-pp-1] = z[4*(i0+1)-pp-1] - } - dmin2 = math.Min(dmin2, z[4*(i0+1)-pp-2]) - z[4*(n0+1)+pp-2] = math.Min(math.Min(z[4*(n0+1)+pp-2], z[4*(i0+1)+pp-2]), z[4*(i0+1)+pp+2]) - z[4*(n0+1)-pp-1] = math.Min(math.Min(z[4*(n0+1)-pp-1], z[4*(i0+1)-pp-1]), z[4*(i0+1)-pp+3]) - qmax = math.Max(math.Max(qmax, z[4*(i0+1)+pp-4]), z[4*(i0+1)+pp]) - dmin = math.Copysign(0, -1) // Fortran code has -zero, but -0 in go is 0 - } - } - - // Choose a shift. - tau, ttype, g = impl.Dlasq4(i0, n0, z, pp, n0in, dmin, dmin1, dmin2, dn, dn1, dn2, tau, ttype, g) - - // Call dqds until dmin > 0. -loop: - for { - i0, n0, pp, tau, sigma, dmin, dmin1, dmin2, dn, dn1, dn2 = impl.Dlasq5(i0, n0, z, pp, tau, sigma) - - nDiv += n0 - i0 + 2 - iter++ - switch { - case dmin >= 0 && dmin1 >= 0: - // Success. - goto done - - case dmin < 0 && dmin1 > 0 && z[4*n0-pp-1] < tol*(sigma+dn1) && math.Abs(dn) < tol*sigma: - // Convergence hidden by negative dn. - z[4*n0-pp+1] = 0 - dmin = 0 - goto done - - case dmin < 0: - // Tau too big. Select new Tau and try again. - nFail++ - if ttype < -22 { - // Failed twice. Play it safe. - tau = 0 - } else if dmin1 > 0 { - // Late failure. Gives excellent shift. - tau = (tau + dmin) * (1 - 2*eps) - ttype -= 11 - } else { - // Early failure. Divide by 4. - tau = tau / 4 - ttype -= 12 - } - - case math.IsNaN(dmin): - if tau == 0 { - break loop - } - tau = 0 - - default: - // Possible underflow. Play it safe. - break loop - } - } - - // Risk of underflow. - dmin, dmin1, dmin2, dn, dn1, dn2 = impl.Dlasq6(i0, n0, z, pp) - nDiv += n0 - i0 + 2 - iter++ - tau = 0 - -done: - if tau < sigma { - desig += tau - t = sigma + desig - desig -= t - sigma - } else { - t = sigma + tau - desig += sigma - (t - tau) - } - sigma = t - return i0, n0, pp, dmin, sigma, desig, qmax, nFail, iter, nDiv, ttype, dmin1, dmin2, dn, dn1, dn2, g, tau -} diff --git a/vendor/gonum.org/v1/gonum/lapack/gonum/dlasq4.go b/vendor/gonum.org/v1/gonum/lapack/gonum/dlasq4.go deleted file mode 100644 index f6dbb31b98..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/gonum/dlasq4.go +++ /dev/null @@ -1,249 +0,0 @@ -// Copyright ©2015 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import "math" - -// Dlasq4 computes an approximation to the smallest eigenvalue using values of d -// from the previous transform. -// i0, n0, and n0in are zero-indexed. -// -// Dlasq4 is an internal routine. It is exported for testing purposes. -func (impl Implementation) Dlasq4(i0, n0 int, z []float64, pp int, n0in int, dmin, dmin1, dmin2, dn, dn1, dn2, tau float64, ttype int, g float64) (tauOut float64, ttypeOut int, gOut float64) { - switch { - case i0 < 0: - panic(i0LT0) - case n0 < 0: - panic(n0LT0) - case len(z) < 4*n0: - panic(shortZ) - case pp != 0 && pp != 1: - panic(badPp) - } - - const ( - cnst1 = 0.563 - cnst2 = 1.01 - cnst3 = 1.05 - - cnstthird = 0.333 // TODO(btracey): Fix? - ) - // A negative dmin forces the shift to take that absolute value - // ttype records the type of shift. - if dmin <= 0 { - tau = -dmin - ttype = -1 - return tau, ttype, g - } - nn := 4*(n0+1) + pp - 1 // -1 for zero indexing - s := math.NaN() // Poison s so that failure to take a path below is obvious - if n0in == n0 { - // No eigenvalues deflated. - if dmin == dn || dmin == dn1 { - b1 := math.Sqrt(z[nn-3]) * math.Sqrt(z[nn-5]) - b2 := math.Sqrt(z[nn-7]) * math.Sqrt(z[nn-9]) - a2 := z[nn-7] + z[nn-5] - if dmin == dn && dmin1 == dn1 { - gap2 := dmin2 - a2 - dmin2/4 - var gap1 float64 - if gap2 > 0 && gap2 > b2 { - gap1 = a2 - dn - (b2/gap2)*b2 - } else { - gap1 = a2 - dn - (b1 + b2) - } - if gap1 > 0 && gap1 > b1 { - s = math.Max(dn-(b1/gap1)*b1, 0.5*dmin) - ttype = -2 - } else { - s = 0 - if dn > b1 { - s = dn - b1 - } - if a2 > b1+b2 { - s = math.Min(s, a2-(b1+b2)) - } - s = math.Max(s, cnstthird*dmin) - ttype = -3 - } - } else { - ttype = -4 - s = dmin / 4 - var gam float64 - var np int - if dmin == dn { - gam = dn - a2 = 0 - if z[nn-5] > z[nn-7] { - return tau, ttype, g - } - b2 = z[nn-5] / z[nn-7] - np = nn - 9 - } else { - np = nn - 2*pp - gam = dn1 - if z[np-4] > z[np-2] { - return tau, ttype, g - } - a2 = z[np-4] / z[np-2] - if z[nn-9] > z[nn-11] { - return tau, ttype, g - } - b2 = z[nn-9] / z[nn-11] - np = nn - 13 - } - // Approximate contribution to norm squared from i < nn-1. - a2 += b2 - for i4loop := np + 1; i4loop >= 4*(i0+1)-1+pp; i4loop -= 4 { - i4 := i4loop - 1 - if b2 == 0 { - break - } - b1 = b2 - if z[i4] > z[i4-2] { - return tau, ttype, g - } - b2 *= z[i4] / z[i4-2] - a2 += b2 - if 100*math.Max(b2, b1) < a2 || cnst1 < a2 { - break - } - } - a2 *= cnst3 - // Rayleigh quotient residual bound. - if a2 < cnst1 { - s = gam * (1 - math.Sqrt(a2)) / (1 + a2) - } - } - } else if dmin == dn2 { - ttype = -5 - s = dmin / 4 - // Compute contribution to norm squared from i > nn-2. - np := nn - 2*pp - b1 := z[np-2] - b2 := z[np-6] - gam := dn2 - if z[np-8] > b2 || z[np-4] > b1 { - return tau, ttype, g - } - a2 := (z[np-8] / b2) * (1 + z[np-4]/b1) - // Approximate contribution to norm squared from i < nn-2. - if n0-i0 > 2 { - b2 = z[nn-13] / z[nn-15] - a2 += b2 - for i4loop := (nn + 1) - 17; i4loop >= 4*(i0+1)-1+pp; i4loop -= 4 { - i4 := i4loop - 1 - if b2 == 0 { - break - } - b1 = b2 - if z[i4] > z[i4-2] { - return tau, ttype, g - } - b2 *= z[i4] / z[i4-2] - a2 += b2 - if 100*math.Max(b2, b1) < a2 || cnst1 < a2 { - break - } - } - a2 *= cnst3 - } - if a2 < cnst1 { - s = gam * (1 - math.Sqrt(a2)) / (1 + a2) - } - } else { - // Case 6, no information to guide us. - if ttype == -6 { - g += cnstthird * (1 - g) - } else if ttype == -18 { - g = cnstthird / 4 - } else { - g = 1.0 / 4 - } - s = g * dmin - ttype = -6 - } - } else if n0in == (n0 + 1) { - // One eigenvalue just deflated. Use DMIN1, DN1 for DMIN and DN. - if dmin1 == dn1 && dmin2 == dn2 { - ttype = -7 - s = cnstthird * dmin1 - if z[nn-5] > z[nn-7] { - return tau, ttype, g - } - b1 := z[nn-5] / z[nn-7] - b2 := b1 - if b2 != 0 { - for i4loop := 4*(n0+1) - 9 + pp; i4loop >= 4*(i0+1)-1+pp; i4loop -= 4 { - i4 := i4loop - 1 - a2 := b1 - if z[i4] > z[i4-2] { - return tau, ttype, g - } - b1 *= z[i4] / z[i4-2] - b2 += b1 - if 100*math.Max(b1, a2) < b2 { - break - } - } - } - b2 = math.Sqrt(cnst3 * b2) - a2 := dmin1 / (1 + b2*b2) - gap2 := 0.5*dmin2 - a2 - if gap2 > 0 && gap2 > b2*a2 { - s = math.Max(s, a2*(1-cnst2*a2*(b2/gap2)*b2)) - } else { - s = math.Max(s, a2*(1-cnst2*b2)) - ttype = -8 - } - } else { - s = dmin1 / 4 - if dmin1 == dn1 { - s = 0.5 * dmin1 - } - ttype = -9 - } - } else if n0in == (n0 + 2) { - // Two eigenvalues deflated. Use DMIN2, DN2 for DMIN and DN. - if dmin2 == dn2 && 2*z[nn-5] < z[nn-7] { - ttype = -10 - s = cnstthird * dmin2 - if z[nn-5] > z[nn-7] { - return tau, ttype, g - } - b1 := z[nn-5] / z[nn-7] - b2 := b1 - if b2 != 0 { - for i4loop := 4*(n0+1) - 9 + pp; i4loop >= 4*(i0+1)-1+pp; i4loop -= 4 { - i4 := i4loop - 1 - if z[i4] > z[i4-2] { - return tau, ttype, g - } - b1 *= z[i4] / z[i4-2] - b2 += b1 - if 100*b1 < b2 { - break - } - } - } - b2 = math.Sqrt(cnst3 * b2) - a2 := dmin2 / (1 + b2*b2) - gap2 := z[nn-7] + z[nn-9] - math.Sqrt(z[nn-11])*math.Sqrt(z[nn-9]) - a2 - if gap2 > 0 && gap2 > b2*a2 { - s = math.Max(s, a2*(1-cnst2*a2*(b2/gap2)*b2)) - } else { - s = math.Max(s, a2*(1-cnst2*b2)) - } - } else { - s = dmin2 / 4 - ttype = -11 - } - } else if n0in > n0+2 { - // Case 12, more than two eigenvalues deflated. No information. - s = 0 - ttype = -12 - } - tau = s - return tau, ttype, g -} diff --git a/vendor/gonum.org/v1/gonum/lapack/gonum/dlasq5.go b/vendor/gonum.org/v1/gonum/lapack/gonum/dlasq5.go deleted file mode 100644 index d3826d9186..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/gonum/dlasq5.go +++ /dev/null @@ -1,140 +0,0 @@ -// Copyright ©2015 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import "math" - -// Dlasq5 computes one dqds transform in ping-pong form. -// i0 and n0 are zero-indexed. -// -// Dlasq5 is an internal routine. It is exported for testing purposes. -func (impl Implementation) Dlasq5(i0, n0 int, z []float64, pp int, tau, sigma float64) (i0Out, n0Out, ppOut int, tauOut, sigmaOut, dmin, dmin1, dmin2, dn, dnm1, dnm2 float64) { - // The lapack function has inputs for ieee and eps, but Go requires ieee so - // these are unnecessary. - - switch { - case i0 < 0: - panic(i0LT0) - case n0 < 0: - panic(n0LT0) - case len(z) < 4*n0: - panic(shortZ) - case pp != 0 && pp != 1: - panic(badPp) - } - - if n0-i0-1 <= 0 { - return i0, n0, pp, tau, sigma, dmin, dmin1, dmin2, dn, dnm1, dnm2 - } - - eps := dlamchP - dthresh := eps * (sigma + tau) - if tau < dthresh*0.5 { - tau = 0 - } - var j4 int - var emin float64 - if tau != 0 { - j4 = 4*i0 + pp - emin = z[j4+4] - d := z[j4] - tau - dmin = d - // In the reference there are code paths that actually return this value. - // dmin1 = -z[j4] - if pp == 0 { - for j4loop := 4 * (i0 + 1); j4loop <= 4*((n0+1)-3); j4loop += 4 { - j4 := j4loop - 1 - z[j4-2] = d + z[j4-1] - tmp := z[j4+1] / z[j4-2] - d = d*tmp - tau - dmin = math.Min(dmin, d) - z[j4] = z[j4-1] * tmp - emin = math.Min(z[j4], emin) - } - } else { - for j4loop := 4 * (i0 + 1); j4loop <= 4*((n0+1)-3); j4loop += 4 { - j4 := j4loop - 1 - z[j4-3] = d + z[j4] - tmp := z[j4+2] / z[j4-3] - d = d*tmp - tau - dmin = math.Min(dmin, d) - z[j4-1] = z[j4] * tmp - emin = math.Min(z[j4-1], emin) - } - } - // Unroll the last two steps. - dnm2 = d - dmin2 = dmin - j4 = 4*((n0+1)-2) - pp - 1 - j4p2 := j4 + 2*pp - 1 - z[j4-2] = dnm2 + z[j4p2] - z[j4] = z[j4p2+2] * (z[j4p2] / z[j4-2]) - dnm1 = z[j4p2+2]*(dnm2/z[j4-2]) - tau - dmin = math.Min(dmin, dnm1) - - dmin1 = dmin - j4 += 4 - j4p2 = j4 + 2*pp - 1 - z[j4-2] = dnm1 + z[j4p2] - z[j4] = z[j4p2+2] * (z[j4p2] / z[j4-2]) - dn = z[j4p2+2]*(dnm1/z[j4-2]) - tau - dmin = math.Min(dmin, dn) - } else { - // This is the version that sets d's to zero if they are small enough. - j4 = 4*(i0+1) + pp - 4 - emin = z[j4+4] - d := z[j4] - tau - dmin = d - // In the reference there are code paths that actually return this value. - // dmin1 = -z[j4] - if pp == 0 { - for j4loop := 4 * (i0 + 1); j4loop <= 4*((n0+1)-3); j4loop += 4 { - j4 := j4loop - 1 - z[j4-2] = d + z[j4-1] - tmp := z[j4+1] / z[j4-2] - d = d*tmp - tau - if d < dthresh { - d = 0 - } - dmin = math.Min(dmin, d) - z[j4] = z[j4-1] * tmp - emin = math.Min(z[j4], emin) - } - } else { - for j4loop := 4 * (i0 + 1); j4loop <= 4*((n0+1)-3); j4loop += 4 { - j4 := j4loop - 1 - z[j4-3] = d + z[j4] - tmp := z[j4+2] / z[j4-3] - d = d*tmp - tau - if d < dthresh { - d = 0 - } - dmin = math.Min(dmin, d) - z[j4-1] = z[j4] * tmp - emin = math.Min(z[j4-1], emin) - } - } - // Unroll the last two steps. - dnm2 = d - dmin2 = dmin - j4 = 4*((n0+1)-2) - pp - 1 - j4p2 := j4 + 2*pp - 1 - z[j4-2] = dnm2 + z[j4p2] - z[j4] = z[j4p2+2] * (z[j4p2] / z[j4-2]) - dnm1 = z[j4p2+2]*(dnm2/z[j4-2]) - tau - dmin = math.Min(dmin, dnm1) - - dmin1 = dmin - j4 += 4 - j4p2 = j4 + 2*pp - 1 - z[j4-2] = dnm1 + z[j4p2] - z[j4] = z[j4p2+2] * (z[j4p2] / z[j4-2]) - dn = z[j4p2+2]*(dnm1/z[j4-2]) - tau - dmin = math.Min(dmin, dn) - } - z[j4+2] = dn - z[4*(n0+1)-pp-1] = emin - return i0, n0, pp, tau, sigma, dmin, dmin1, dmin2, dn, dnm1, dnm2 -} diff --git a/vendor/gonum.org/v1/gonum/lapack/gonum/dlasq6.go b/vendor/gonum.org/v1/gonum/lapack/gonum/dlasq6.go deleted file mode 100644 index 54bf587562..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/gonum/dlasq6.go +++ /dev/null @@ -1,118 +0,0 @@ -// Copyright ©2015 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import "math" - -// Dlasq6 computes one dqd transform in ping-pong form with protection against -// overflow and underflow. z has length at least 4*(n0+1) and holds the qd array. -// i0 is the zero-based first index. -// n0 is the zero-based last index. -// -// Dlasq6 is an internal routine. It is exported for testing purposes. -func (impl Implementation) Dlasq6(i0, n0 int, z []float64, pp int) (dmin, dmin1, dmin2, dn, dnm1, dnm2 float64) { - switch { - case i0 < 0: - panic(i0LT0) - case n0 < 0: - panic(n0LT0) - case len(z) < 4*n0: - panic(shortZ) - case pp != 0 && pp != 1: - panic(badPp) - } - - if n0-i0-1 <= 0 { - return dmin, dmin1, dmin2, dn, dnm1, dnm2 - } - - safmin := dlamchS - j4 := 4*(i0+1) + pp - 4 // -4 rather than -3 for zero indexing - emin := z[j4+4] - d := z[j4] - dmin = d - if pp == 0 { - for j4loop := 4 * (i0 + 1); j4loop <= 4*((n0+1)-3); j4loop += 4 { - j4 := j4loop - 1 // Translate back to zero-indexed. - z[j4-2] = d + z[j4-1] - if z[j4-2] == 0 { - z[j4] = 0 - d = z[j4+1] - dmin = d - emin = 0 - } else if safmin*z[j4+1] < z[j4-2] && safmin*z[j4-2] < z[j4+1] { - tmp := z[j4+1] / z[j4-2] - z[j4] = z[j4-1] * tmp - d *= tmp - } else { - z[j4] = z[j4+1] * (z[j4-1] / z[j4-2]) - d = z[j4+1] * (d / z[j4-2]) - } - dmin = math.Min(dmin, d) - emin = math.Min(emin, z[j4]) - } - } else { - for j4loop := 4 * (i0 + 1); j4loop <= 4*((n0+1)-3); j4loop += 4 { - j4 := j4loop - 1 - z[j4-3] = d + z[j4] - if z[j4-3] == 0 { - z[j4-1] = 0 - d = z[j4+2] - dmin = d - emin = 0 - } else if safmin*z[j4+2] < z[j4-3] && safmin*z[j4-3] < z[j4+2] { - tmp := z[j4+2] / z[j4-3] - z[j4-1] = z[j4] * tmp - d *= tmp - } else { - z[j4-1] = z[j4+2] * (z[j4] / z[j4-3]) - d = z[j4+2] * (d / z[j4-3]) - } - dmin = math.Min(dmin, d) - emin = math.Min(emin, z[j4-1]) - } - } - // Unroll last two steps. - dnm2 = d - dmin2 = dmin - j4 = 4*(n0-1) - pp - 1 - j4p2 := j4 + 2*pp - 1 - z[j4-2] = dnm2 + z[j4p2] - if z[j4-2] == 0 { - z[j4] = 0 - dnm1 = z[j4p2+2] - dmin = dnm1 - emin = 0 - } else if safmin*z[j4p2+2] < z[j4-2] && safmin*z[j4-2] < z[j4p2+2] { - tmp := z[j4p2+2] / z[j4-2] - z[j4] = z[j4p2] * tmp - dnm1 = dnm2 * tmp - } else { - z[j4] = z[j4p2+2] * (z[j4p2] / z[j4-2]) - dnm1 = z[j4p2+2] * (dnm2 / z[j4-2]) - } - dmin = math.Min(dmin, dnm1) - dmin1 = dmin - j4 += 4 - j4p2 = j4 + 2*pp - 1 - z[j4-2] = dnm1 + z[j4p2] - if z[j4-2] == 0 { - z[j4] = 0 - dn = z[j4p2+2] - dmin = dn - emin = 0 - } else if safmin*z[j4p2+2] < z[j4-2] && safmin*z[j4-2] < z[j4p2+2] { - tmp := z[j4p2+2] / z[j4-2] - z[j4] = z[j4p2] * tmp - dn = dnm1 * tmp - } else { - z[j4] = z[j4p2+2] * (z[j4p2] / z[j4-2]) - dn = z[j4p2+2] * (dnm1 / z[j4-2]) - } - dmin = math.Min(dmin, dn) - z[j4+2] = dn - z[4*(n0+1)-pp-1] = emin - return dmin, dmin1, dmin2, dn, dnm1, dnm2 -} diff --git a/vendor/gonum.org/v1/gonum/lapack/gonum/dlasr.go b/vendor/gonum.org/v1/gonum/lapack/gonum/dlasr.go deleted file mode 100644 index a7dbe002d5..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/gonum/dlasr.go +++ /dev/null @@ -1,279 +0,0 @@ -// Copyright ©2015 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import ( - "gonum.org/v1/gonum/blas" - "gonum.org/v1/gonum/lapack" -) - -// Dlasr applies a sequence of plane rotations to the m×n matrix A. This series -// of plane rotations is implicitly represented by a matrix P. P is multiplied -// by a depending on the value of side -- A = P * A if side == lapack.Left, -// A = A * P^T if side == lapack.Right. -// -// The exact value of P depends on the value of pivot, but in all cases P is -// implicitly represented by a series of 2×2 rotation matrices. The entries of -// rotation matrix k are defined by s[k] and c[k] -// R(k) = [ c[k] s[k]] -// [-s[k] s[k]] -// If direct == lapack.Forward, the rotation matrices are applied as -// P = P(z-1) * ... * P(2) * P(1), while if direct == lapack.Backward they are -// applied as P = P(1) * P(2) * ... * P(n). -// -// pivot defines the mapping of the elements in R(k) to P(k). -// If pivot == lapack.Variable, the rotation is performed for the (k, k+1) plane. -// P(k) = [1 ] -// [ ... ] -// [ 1 ] -// [ c[k] s[k] ] -// [ -s[k] c[k] ] -// [ 1 ] -// [ ... ] -// [ 1] -// if pivot == lapack.Top, the rotation is performed for the (1, k+1) plane, -// P(k) = [c[k] s[k] ] -// [ 1 ] -// [ ... ] -// [ 1 ] -// [-s[k] c[k] ] -// [ 1 ] -// [ ... ] -// [ 1] -// and if pivot == lapack.Bottom, the rotation is performed for the (k, z) plane. -// P(k) = [1 ] -// [ ... ] -// [ 1 ] -// [ c[k] s[k]] -// [ 1 ] -// [ ... ] -// [ 1 ] -// [ -s[k] c[k]] -// s and c have length m - 1 if side == blas.Left, and n - 1 if side == blas.Right. -// -// Dlasr is an internal routine. It is exported for testing purposes. -func (impl Implementation) Dlasr(side blas.Side, pivot lapack.Pivot, direct lapack.Direct, m, n int, c, s, a []float64, lda int) { - switch { - case side != blas.Left && side != blas.Right: - panic(badSide) - case pivot != lapack.Variable && pivot != lapack.Top && pivot != lapack.Bottom: - panic(badPivot) - case direct != lapack.Forward && direct != lapack.Backward: - panic(badDirect) - case m < 0: - panic(mLT0) - case n < 0: - panic(nLT0) - case lda < max(1, n): - panic(badLdA) - } - - // Quick return if possible. - if m == 0 || n == 0 { - return - } - - if side == blas.Left { - if len(c) < m-1 { - panic(shortC) - } - if len(s) < m-1 { - panic(shortS) - } - } else { - if len(c) < n-1 { - panic(shortC) - } - if len(s) < n-1 { - panic(shortS) - } - } - if len(a) < (m-1)*lda+n { - panic(shortA) - } - - if side == blas.Left { - if pivot == lapack.Variable { - if direct == lapack.Forward { - for j := 0; j < m-1; j++ { - ctmp := c[j] - stmp := s[j] - if ctmp != 1 || stmp != 0 { - for i := 0; i < n; i++ { - tmp2 := a[j*lda+i] - tmp := a[(j+1)*lda+i] - a[(j+1)*lda+i] = ctmp*tmp - stmp*tmp2 - a[j*lda+i] = stmp*tmp + ctmp*tmp2 - } - } - } - return - } - for j := m - 2; j >= 0; j-- { - ctmp := c[j] - stmp := s[j] - if ctmp != 1 || stmp != 0 { - for i := 0; i < n; i++ { - tmp2 := a[j*lda+i] - tmp := a[(j+1)*lda+i] - a[(j+1)*lda+i] = ctmp*tmp - stmp*tmp2 - a[j*lda+i] = stmp*tmp + ctmp*tmp2 - } - } - } - return - } else if pivot == lapack.Top { - if direct == lapack.Forward { - for j := 1; j < m; j++ { - ctmp := c[j-1] - stmp := s[j-1] - if ctmp != 1 || stmp != 0 { - for i := 0; i < n; i++ { - tmp := a[j*lda+i] - tmp2 := a[i] - a[j*lda+i] = ctmp*tmp - stmp*tmp2 - a[i] = stmp*tmp + ctmp*tmp2 - } - } - } - return - } - for j := m - 1; j >= 1; j-- { - ctmp := c[j-1] - stmp := s[j-1] - if ctmp != 1 || stmp != 0 { - for i := 0; i < n; i++ { - ctmp := c[j-1] - stmp := s[j-1] - if ctmp != 1 || stmp != 0 { - for i := 0; i < n; i++ { - tmp := a[j*lda+i] - tmp2 := a[i] - a[j*lda+i] = ctmp*tmp - stmp*tmp2 - a[i] = stmp*tmp + ctmp*tmp2 - } - } - } - } - } - return - } - if direct == lapack.Forward { - for j := 0; j < m-1; j++ { - ctmp := c[j] - stmp := s[j] - if ctmp != 1 || stmp != 0 { - for i := 0; i < n; i++ { - tmp := a[j*lda+i] - tmp2 := a[(m-1)*lda+i] - a[j*lda+i] = stmp*tmp2 + ctmp*tmp - a[(m-1)*lda+i] = ctmp*tmp2 - stmp*tmp - } - } - } - return - } - for j := m - 2; j >= 0; j-- { - ctmp := c[j] - stmp := s[j] - if ctmp != 1 || stmp != 0 { - for i := 0; i < n; i++ { - tmp := a[j*lda+i] - tmp2 := a[(m-1)*lda+i] - a[j*lda+i] = stmp*tmp2 + ctmp*tmp - a[(m-1)*lda+i] = ctmp*tmp2 - stmp*tmp - } - } - } - return - } - if pivot == lapack.Variable { - if direct == lapack.Forward { - for j := 0; j < n-1; j++ { - ctmp := c[j] - stmp := s[j] - if ctmp != 1 || stmp != 0 { - for i := 0; i < m; i++ { - tmp := a[i*lda+j+1] - tmp2 := a[i*lda+j] - a[i*lda+j+1] = ctmp*tmp - stmp*tmp2 - a[i*lda+j] = stmp*tmp + ctmp*tmp2 - } - } - } - return - } - for j := n - 2; j >= 0; j-- { - ctmp := c[j] - stmp := s[j] - if ctmp != 1 || stmp != 0 { - for i := 0; i < m; i++ { - tmp := a[i*lda+j+1] - tmp2 := a[i*lda+j] - a[i*lda+j+1] = ctmp*tmp - stmp*tmp2 - a[i*lda+j] = stmp*tmp + ctmp*tmp2 - } - } - } - return - } else if pivot == lapack.Top { - if direct == lapack.Forward { - for j := 1; j < n; j++ { - ctmp := c[j-1] - stmp := s[j-1] - if ctmp != 1 || stmp != 0 { - for i := 0; i < m; i++ { - tmp := a[i*lda+j] - tmp2 := a[i*lda] - a[i*lda+j] = ctmp*tmp - stmp*tmp2 - a[i*lda] = stmp*tmp + ctmp*tmp2 - } - } - } - return - } - for j := n - 1; j >= 1; j-- { - ctmp := c[j-1] - stmp := s[j-1] - if ctmp != 1 || stmp != 0 { - for i := 0; i < m; i++ { - tmp := a[i*lda+j] - tmp2 := a[i*lda] - a[i*lda+j] = ctmp*tmp - stmp*tmp2 - a[i*lda] = stmp*tmp + ctmp*tmp2 - } - } - } - return - } - if direct == lapack.Forward { - for j := 0; j < n-1; j++ { - ctmp := c[j] - stmp := s[j] - if ctmp != 1 || stmp != 0 { - for i := 0; i < m; i++ { - tmp := a[i*lda+j] - tmp2 := a[i*lda+n-1] - a[i*lda+j] = stmp*tmp2 + ctmp*tmp - a[i*lda+n-1] = ctmp*tmp2 - stmp*tmp - } - - } - } - return - } - for j := n - 2; j >= 0; j-- { - ctmp := c[j] - stmp := s[j] - if ctmp != 1 || stmp != 0 { - for i := 0; i < m; i++ { - tmp := a[i*lda+j] - tmp2 := a[i*lda+n-1] - a[i*lda+j] = stmp*tmp2 + ctmp*tmp - a[i*lda+n-1] = ctmp*tmp2 - stmp*tmp - } - } - } -} diff --git a/vendor/gonum.org/v1/gonum/lapack/gonum/dlasrt.go b/vendor/gonum.org/v1/gonum/lapack/gonum/dlasrt.go deleted file mode 100644 index be472805bf..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/gonum/dlasrt.go +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright ©2015 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import ( - "sort" - - "gonum.org/v1/gonum/lapack" -) - -// Dlasrt sorts the numbers in the input slice d. If s == lapack.SortIncreasing, -// the elements are sorted in increasing order. If s == lapack.SortDecreasing, -// the elements are sorted in decreasing order. For other values of s Dlasrt -// will panic. -// -// Dlasrt is an internal routine. It is exported for testing purposes. -func (impl Implementation) Dlasrt(s lapack.Sort, n int, d []float64) { - switch { - case n < 0: - panic(nLT0) - case len(d) < n: - panic(shortD) - } - - d = d[:n] - switch s { - default: - panic(badSort) - case lapack.SortIncreasing: - sort.Float64s(d) - case lapack.SortDecreasing: - sort.Sort(sort.Reverse(sort.Float64Slice(d))) - } -} diff --git a/vendor/gonum.org/v1/gonum/lapack/gonum/dlassq.go b/vendor/gonum.org/v1/gonum/lapack/gonum/dlassq.go deleted file mode 100644 index 9c2dc7729f..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/gonum/dlassq.go +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright ©2015 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import "math" - -// Dlassq updates a sum of squares in scaled form. The input parameters scale and -// sumsq represent the current scale and total sum of squares. These values are -// updated with the information in the first n elements of the vector specified -// by x and incX. -// -// Dlassq is an internal routine. It is exported for testing purposes. -func (impl Implementation) Dlassq(n int, x []float64, incx int, scale float64, sumsq float64) (scl, smsq float64) { - switch { - case n < 0: - panic(nLT0) - case incx <= 0: - panic(badIncX) - case len(x) < 1+(n-1)*incx: - panic(shortX) - } - - if n == 0 { - return scale, sumsq - } - - for ix := 0; ix <= (n-1)*incx; ix += incx { - absxi := math.Abs(x[ix]) - if absxi > 0 || math.IsNaN(absxi) { - if scale < absxi { - sumsq = 1 + sumsq*(scale/absxi)*(scale/absxi) - scale = absxi - } else { - sumsq += (absxi / scale) * (absxi / scale) - } - } - } - return scale, sumsq -} diff --git a/vendor/gonum.org/v1/gonum/lapack/gonum/dlasv2.go b/vendor/gonum.org/v1/gonum/lapack/gonum/dlasv2.go deleted file mode 100644 index 204af19316..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/gonum/dlasv2.go +++ /dev/null @@ -1,115 +0,0 @@ -// Copyright ©2015 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import "math" - -// Dlasv2 computes the singular value decomposition of a 2×2 matrix. -// [ csl snl] [f g] [csr -snr] = [ssmax 0] -// [-snl csl] [0 h] [snr csr] = [ 0 ssmin] -// ssmax is the larger absolute singular value, and ssmin is the smaller absolute -// singular value. [cls, snl] and [csr, snr] are the left and right singular vectors. -// -// Dlasv2 is an internal routine. It is exported for testing purposes. -func (impl Implementation) Dlasv2(f, g, h float64) (ssmin, ssmax, snr, csr, snl, csl float64) { - ft := f - fa := math.Abs(ft) - ht := h - ha := math.Abs(h) - // pmax points to the largest element of the matrix in terms of absolute value. - // 1 if F, 2 if G, 3 if H. - pmax := 1 - swap := ha > fa - if swap { - pmax = 3 - ft, ht = ht, ft - fa, ha = ha, fa - } - gt := g - ga := math.Abs(gt) - var clt, crt, slt, srt float64 - if ga == 0 { - ssmin = ha - ssmax = fa - clt = 1 - crt = 1 - slt = 0 - srt = 0 - } else { - gasmall := true - if ga > fa { - pmax = 2 - if (fa / ga) < dlamchE { - gasmall = false - ssmax = ga - if ha > 1 { - ssmin = fa / (ga / ha) - } else { - ssmin = (fa / ga) * ha - } - clt = 1 - slt = ht / gt - srt = 1 - crt = ft / gt - } - } - if gasmall { - d := fa - ha - l := d / fa - if d == fa { // deal with inf - l = 1 - } - m := gt / ft - t := 2 - l - s := math.Hypot(t, m) - var r float64 - if l == 0 { - r = math.Abs(m) - } else { - r = math.Hypot(l, m) - } - a := 0.5 * (s + r) - ssmin = ha / a - ssmax = fa * a - if m == 0 { - if l == 0 { - t = math.Copysign(2, ft) * math.Copysign(1, gt) - } else { - t = gt/math.Copysign(d, ft) + m/t - } - } else { - t = (m/(s+t) + m/(r+l)) * (1 + a) - } - l = math.Hypot(t, 2) - crt = 2 / l - srt = t / l - clt = (crt + srt*m) / a - slt = (ht / ft) * srt / a - } - } - if swap { - csl = srt - snl = crt - csr = slt - snr = clt - } else { - csl = clt - snl = slt - csr = crt - snr = srt - } - var tsign float64 - switch pmax { - case 1: - tsign = math.Copysign(1, csr) * math.Copysign(1, csl) * math.Copysign(1, f) - case 2: - tsign = math.Copysign(1, snr) * math.Copysign(1, csl) * math.Copysign(1, g) - case 3: - tsign = math.Copysign(1, snr) * math.Copysign(1, snl) * math.Copysign(1, h) - } - ssmax = math.Copysign(ssmax, tsign) - ssmin = math.Copysign(ssmin, tsign*math.Copysign(1, f)*math.Copysign(1, h)) - return ssmin, ssmax, snr, csr, snl, csl -} diff --git a/vendor/gonum.org/v1/gonum/lapack/gonum/dlaswp.go b/vendor/gonum.org/v1/gonum/lapack/gonum/dlaswp.go deleted file mode 100644 index b207d1218c..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/gonum/dlaswp.go +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright ©2015 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import "gonum.org/v1/gonum/blas/blas64" - -// Dlaswp swaps the rows k1 to k2 of a rectangular matrix A according to the -// indices in ipiv so that row k is swapped with ipiv[k]. -// -// n is the number of columns of A and incX is the increment for ipiv. If incX -// is 1, the swaps are applied from k1 to k2. If incX is -1, the swaps are -// applied in reverse order from k2 to k1. For other values of incX Dlaswp will -// panic. ipiv must have length k2+1, otherwise Dlaswp will panic. -// -// The indices k1, k2, and the elements of ipiv are zero-based. -// -// Dlaswp is an internal routine. It is exported for testing purposes. -func (impl Implementation) Dlaswp(n int, a []float64, lda int, k1, k2 int, ipiv []int, incX int) { - switch { - case n < 0: - panic(nLT0) - case k2 < 0: - panic(badK2) - case k1 < 0 || k2 < k1: - panic(badK1) - case lda < max(1, n): - panic(badLdA) - case len(a) < (k2-1)*lda+n: - panic(shortA) - case len(ipiv) != k2+1: - panic(badLenIpiv) - case incX != 1 && incX != -1: - panic(absIncNotOne) - } - - if n == 0 { - return - } - - bi := blas64.Implementation() - if incX == 1 { - for k := k1; k <= k2; k++ { - bi.Dswap(n, a[k*lda:], 1, a[ipiv[k]*lda:], 1) - } - return - } - for k := k2; k >= k1; k-- { - bi.Dswap(n, a[k*lda:], 1, a[ipiv[k]*lda:], 1) - } -} diff --git a/vendor/gonum.org/v1/gonum/lapack/gonum/dlasy2.go b/vendor/gonum.org/v1/gonum/lapack/gonum/dlasy2.go deleted file mode 100644 index abfe60e58e..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/gonum/dlasy2.go +++ /dev/null @@ -1,290 +0,0 @@ -// Copyright ©2016 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import ( - "math" - - "gonum.org/v1/gonum/blas/blas64" -) - -// Dlasy2 solves the Sylvester matrix equation where the matrices are of order 1 -// or 2. It computes the unknown n1×n2 matrix X so that -// TL*X + sgn*X*TR = scale*B, if tranl == false and tranr == false, -// TL^T*X + sgn*X*TR = scale*B, if tranl == true and tranr == false, -// TL*X + sgn*X*TR^T = scale*B, if tranl == false and tranr == true, -// TL^T*X + sgn*X*TR^T = scale*B, if tranl == true and tranr == true, -// where TL is n1×n1, TR is n2×n2, B is n1×n2, and 1 <= n1,n2 <= 2. -// -// isgn must be 1 or -1, and n1 and n2 must be 0, 1, or 2, but these conditions -// are not checked. -// -// Dlasy2 returns three values, a scale factor that is chosen less than or equal -// to 1 to prevent the solution overflowing, the infinity norm of the solution, -// and an indicator of success. If ok is false, TL and TR have eigenvalues that -// are too close, so TL or TR is perturbed to get a non-singular equation. -// -// Dlasy2 is an internal routine. It is exported for testing purposes. -func (impl Implementation) Dlasy2(tranl, tranr bool, isgn, n1, n2 int, tl []float64, ldtl int, tr []float64, ldtr int, b []float64, ldb int, x []float64, ldx int) (scale, xnorm float64, ok bool) { - // TODO(vladimir-ch): Add input validation checks conditionally skipped - // using the build tag mechanism. - - ok = true - // Quick return if possible. - if n1 == 0 || n2 == 0 { - return scale, xnorm, ok - } - - // Set constants to control overflow. - eps := dlamchP - smlnum := dlamchS / eps - sgn := float64(isgn) - - if n1 == 1 && n2 == 1 { - // 1×1 case: TL11*X + sgn*X*TR11 = B11. - tau1 := tl[0] + sgn*tr[0] - bet := math.Abs(tau1) - if bet <= smlnum { - tau1 = smlnum - bet = smlnum - ok = false - } - scale = 1 - gam := math.Abs(b[0]) - if smlnum*gam > bet { - scale = 1 / gam - } - x[0] = b[0] * scale / tau1 - xnorm = math.Abs(x[0]) - return scale, xnorm, ok - } - - if n1+n2 == 3 { - // 1×2 or 2×1 case. - var ( - smin float64 - tmp [4]float64 // tmp is used as a 2×2 row-major matrix. - btmp [2]float64 - ) - if n1 == 1 && n2 == 2 { - // 1×2 case: TL11*[X11 X12] + sgn*[X11 X12]*op[TR11 TR12] = [B11 B12]. - // [TR21 TR22] - smin = math.Abs(tl[0]) - smin = math.Max(smin, math.Max(math.Abs(tr[0]), math.Abs(tr[1]))) - smin = math.Max(smin, math.Max(math.Abs(tr[ldtr]), math.Abs(tr[ldtr+1]))) - smin = math.Max(eps*smin, smlnum) - tmp[0] = tl[0] + sgn*tr[0] - tmp[3] = tl[0] + sgn*tr[ldtr+1] - if tranr { - tmp[1] = sgn * tr[1] - tmp[2] = sgn * tr[ldtr] - } else { - tmp[1] = sgn * tr[ldtr] - tmp[2] = sgn * tr[1] - } - btmp[0] = b[0] - btmp[1] = b[1] - } else { - // 2×1 case: op[TL11 TL12]*[X11] + sgn*[X11]*TR11 = [B11]. - // [TL21 TL22]*[X21] [X21] [B21] - smin = math.Abs(tr[0]) - smin = math.Max(smin, math.Max(math.Abs(tl[0]), math.Abs(tl[1]))) - smin = math.Max(smin, math.Max(math.Abs(tl[ldtl]), math.Abs(tl[ldtl+1]))) - smin = math.Max(eps*smin, smlnum) - tmp[0] = tl[0] + sgn*tr[0] - tmp[3] = tl[ldtl+1] + sgn*tr[0] - if tranl { - tmp[1] = tl[ldtl] - tmp[2] = tl[1] - } else { - tmp[1] = tl[1] - tmp[2] = tl[ldtl] - } - btmp[0] = b[0] - btmp[1] = b[ldb] - } - - // Solve 2×2 system using complete pivoting. - // Set pivots less than smin to smin. - - bi := blas64.Implementation() - ipiv := bi.Idamax(len(tmp), tmp[:], 1) - // Compute the upper triangular matrix [u11 u12]. - // [ 0 u22] - u11 := tmp[ipiv] - if math.Abs(u11) <= smin { - ok = false - u11 = smin - } - locu12 := [4]int{1, 0, 3, 2} // Index in tmp of the element on the same row as the pivot. - u12 := tmp[locu12[ipiv]] - locl21 := [4]int{2, 3, 0, 1} // Index in tmp of the element on the same column as the pivot. - l21 := tmp[locl21[ipiv]] / u11 - locu22 := [4]int{3, 2, 1, 0} // Index in tmp of the remaining element. - u22 := tmp[locu22[ipiv]] - l21*u12 - if math.Abs(u22) <= smin { - ok = false - u22 = smin - } - if ipiv&0x2 != 0 { // true for ipiv equal to 2 and 3. - // The pivot was in the second row, swap the elements of - // the right-hand side. - btmp[0], btmp[1] = btmp[1], btmp[0]-l21*btmp[1] - } else { - btmp[1] -= l21 * btmp[0] - } - scale = 1 - if 2*smlnum*math.Abs(btmp[1]) > math.Abs(u22) || 2*smlnum*math.Abs(btmp[0]) > math.Abs(u11) { - scale = 0.5 / math.Max(math.Abs(btmp[0]), math.Abs(btmp[1])) - btmp[0] *= scale - btmp[1] *= scale - } - // Solve the system [u11 u12] [x21] = [ btmp[0] ]. - // [ 0 u22] [x22] [ btmp[1] ] - x22 := btmp[1] / u22 - x21 := btmp[0]/u11 - (u12/u11)*x22 - if ipiv&0x1 != 0 { // true for ipiv equal to 1 and 3. - // The pivot was in the second column, swap the elements - // of the solution. - x21, x22 = x22, x21 - } - x[0] = x21 - if n1 == 1 { - x[1] = x22 - xnorm = math.Abs(x[0]) + math.Abs(x[1]) - } else { - x[ldx] = x22 - xnorm = math.Max(math.Abs(x[0]), math.Abs(x[ldx])) - } - return scale, xnorm, ok - } - - // 2×2 case: op[TL11 TL12]*[X11 X12] + SGN*[X11 X12]*op[TR11 TR12] = [B11 B12]. - // [TL21 TL22] [X21 X22] [X21 X22] [TR21 TR22] [B21 B22] - // - // Solve equivalent 4×4 system using complete pivoting. - // Set pivots less than smin to smin. - - smin := math.Max(math.Abs(tr[0]), math.Abs(tr[1])) - smin = math.Max(smin, math.Max(math.Abs(tr[ldtr]), math.Abs(tr[ldtr+1]))) - smin = math.Max(smin, math.Max(math.Abs(tl[0]), math.Abs(tl[1]))) - smin = math.Max(smin, math.Max(math.Abs(tl[ldtl]), math.Abs(tl[ldtl+1]))) - smin = math.Max(eps*smin, smlnum) - - var t [4][4]float64 - t[0][0] = tl[0] + sgn*tr[0] - t[1][1] = tl[0] + sgn*tr[ldtr+1] - t[2][2] = tl[ldtl+1] + sgn*tr[0] - t[3][3] = tl[ldtl+1] + sgn*tr[ldtr+1] - if tranl { - t[0][2] = tl[ldtl] - t[1][3] = tl[ldtl] - t[2][0] = tl[1] - t[3][1] = tl[1] - } else { - t[0][2] = tl[1] - t[1][3] = tl[1] - t[2][0] = tl[ldtl] - t[3][1] = tl[ldtl] - } - if tranr { - t[0][1] = sgn * tr[1] - t[1][0] = sgn * tr[ldtr] - t[2][3] = sgn * tr[1] - t[3][2] = sgn * tr[ldtr] - } else { - t[0][1] = sgn * tr[ldtr] - t[1][0] = sgn * tr[1] - t[2][3] = sgn * tr[ldtr] - t[3][2] = sgn * tr[1] - } - - var btmp [4]float64 - btmp[0] = b[0] - btmp[1] = b[1] - btmp[2] = b[ldb] - btmp[3] = b[ldb+1] - - // Perform elimination. - var jpiv [4]int // jpiv records any column swaps for pivoting. - for i := 0; i < 3; i++ { - var ( - xmax float64 - ipsv, jpsv int - ) - for ip := i; ip < 4; ip++ { - for jp := i; jp < 4; jp++ { - if math.Abs(t[ip][jp]) >= xmax { - xmax = math.Abs(t[ip][jp]) - ipsv = ip - jpsv = jp - } - } - } - if ipsv != i { - // The pivot is not in the top row of the unprocessed - // block, swap rows ipsv and i of t and btmp. - t[ipsv], t[i] = t[i], t[ipsv] - btmp[ipsv], btmp[i] = btmp[i], btmp[ipsv] - } - if jpsv != i { - // The pivot is not in the left column of the - // unprocessed block, swap columns jpsv and i of t. - for k := 0; k < 4; k++ { - t[k][jpsv], t[k][i] = t[k][i], t[k][jpsv] - } - } - jpiv[i] = jpsv - if math.Abs(t[i][i]) < smin { - ok = false - t[i][i] = smin - } - for k := i + 1; k < 4; k++ { - t[k][i] /= t[i][i] - btmp[k] -= t[k][i] * btmp[i] - for j := i + 1; j < 4; j++ { - t[k][j] -= t[k][i] * t[i][j] - } - } - } - if math.Abs(t[3][3]) < smin { - ok = false - t[3][3] = smin - } - scale = 1 - if 8*smlnum*math.Abs(btmp[0]) > math.Abs(t[0][0]) || - 8*smlnum*math.Abs(btmp[1]) > math.Abs(t[1][1]) || - 8*smlnum*math.Abs(btmp[2]) > math.Abs(t[2][2]) || - 8*smlnum*math.Abs(btmp[3]) > math.Abs(t[3][3]) { - - maxbtmp := math.Max(math.Abs(btmp[0]), math.Abs(btmp[1])) - maxbtmp = math.Max(maxbtmp, math.Max(math.Abs(btmp[2]), math.Abs(btmp[3]))) - scale = 1 / 8 / maxbtmp - btmp[0] *= scale - btmp[1] *= scale - btmp[2] *= scale - btmp[3] *= scale - } - // Compute the solution of the upper triangular system t * tmp = btmp. - var tmp [4]float64 - for i := 3; i >= 0; i-- { - temp := 1 / t[i][i] - tmp[i] = btmp[i] * temp - for j := i + 1; j < 4; j++ { - tmp[i] -= temp * t[i][j] * tmp[j] - } - } - for i := 2; i >= 0; i-- { - if jpiv[i] != i { - tmp[i], tmp[jpiv[i]] = tmp[jpiv[i]], tmp[i] - } - } - x[0] = tmp[0] - x[1] = tmp[1] - x[ldx] = tmp[2] - x[ldx+1] = tmp[3] - xnorm = math.Max(math.Abs(tmp[0])+math.Abs(tmp[1]), math.Abs(tmp[2])+math.Abs(tmp[3])) - return scale, xnorm, ok -} diff --git a/vendor/gonum.org/v1/gonum/lapack/gonum/dlatrd.go b/vendor/gonum.org/v1/gonum/lapack/gonum/dlatrd.go deleted file mode 100644 index 018efc98cc..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/gonum/dlatrd.go +++ /dev/null @@ -1,165 +0,0 @@ -// Copyright ©2016 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import ( - "gonum.org/v1/gonum/blas" - "gonum.org/v1/gonum/blas/blas64" -) - -// Dlatrd reduces nb rows and columns of a real n×n symmetric matrix A to symmetric -// tridiagonal form. It computes the orthonormal similarity transformation -// Q^T * A * Q -// and returns the matrices V and W to apply to the unreduced part of A. If -// uplo == blas.Upper, the upper triangle is supplied and the last nb rows are -// reduced. If uplo == blas.Lower, the lower triangle is supplied and the first -// nb rows are reduced. -// -// a contains the symmetric matrix on entry with active triangular half specified -// by uplo. On exit, the nb columns have been reduced to tridiagonal form. The -// diagonal contains the diagonal of the reduced matrix, the off-diagonal is -// set to 1, and the remaining elements contain the data to construct Q. -// -// If uplo == blas.Upper, with n = 5 and nb = 2 on exit a is -// [ a a a v4 v5] -// [ a a v4 v5] -// [ a 1 v5] -// [ d 1] -// [ d] -// -// If uplo == blas.Lower, with n = 5 and nb = 2, on exit a is -// [ d ] -// [ 1 d ] -// [v1 1 a ] -// [v1 v2 a a ] -// [v1 v2 a a a] -// -// e contains the superdiagonal elements of the reduced matrix. If uplo == blas.Upper, -// e[n-nb:n-1] contains the last nb columns of the reduced matrix, while if -// uplo == blas.Lower, e[:nb] contains the first nb columns of the reduced matrix. -// e must have length at least n-1, and Dlatrd will panic otherwise. -// -// tau contains the scalar factors of the elementary reflectors needed to construct Q. -// The reflectors are stored in tau[n-nb:n-1] if uplo == blas.Upper, and in -// tau[:nb] if uplo == blas.Lower. tau must have length n-1, and Dlatrd will panic -// otherwise. -// -// w is an n×nb matrix. On exit it contains the data to update the unreduced part -// of A. -// -// The matrix Q is represented as a product of elementary reflectors. Each reflector -// H has the form -// I - tau * v * v^T -// If uplo == blas.Upper, -// Q = H_{n-1} * H_{n-2} * ... * H_{n-nb} -// where v[:i-1] is stored in A[:i-1,i], v[i-1] = 1, and v[i:n] = 0. -// -// If uplo == blas.Lower, -// Q = H_0 * H_1 * ... * H_{nb-1} -// where v[:i+1] = 0, v[i+1] = 1, and v[i+2:n] is stored in A[i+2:n,i]. -// -// The vectors v form the n×nb matrix V which is used with W to apply a -// symmetric rank-2 update to the unreduced part of A -// A = A - V * W^T - W * V^T -// -// Dlatrd is an internal routine. It is exported for testing purposes. -func (impl Implementation) Dlatrd(uplo blas.Uplo, n, nb int, a []float64, lda int, e, tau, w []float64, ldw int) { - switch { - case uplo != blas.Upper && uplo != blas.Lower: - panic(badUplo) - case n < 0: - panic(nLT0) - case nb < 0: - panic(nbLT0) - case nb > n: - panic(nbGTN) - case lda < max(1, n): - panic(badLdA) - case ldw < max(1, nb): - panic(badLdW) - } - - if n == 0 { - return - } - - switch { - case len(a) < (n-1)*lda+n: - panic(shortA) - case len(w) < (n-1)*ldw+nb: - panic(shortW) - case len(e) < n-1: - panic(shortE) - case len(tau) < n-1: - panic(shortTau) - } - - bi := blas64.Implementation() - - if uplo == blas.Upper { - for i := n - 1; i >= n-nb; i-- { - iw := i - n + nb - if i < n-1 { - // Update A(0:i, i). - bi.Dgemv(blas.NoTrans, i+1, n-i-1, -1, a[i+1:], lda, - w[i*ldw+iw+1:], 1, 1, a[i:], lda) - bi.Dgemv(blas.NoTrans, i+1, n-i-1, -1, w[iw+1:], ldw, - a[i*lda+i+1:], 1, 1, a[i:], lda) - } - if i > 0 { - // Generate elementary reflector H_i to annihilate A(0:i-2,i). - e[i-1], tau[i-1] = impl.Dlarfg(i, a[(i-1)*lda+i], a[i:], lda) - a[(i-1)*lda+i] = 1 - - // Compute W(0:i-1, i). - bi.Dsymv(blas.Upper, i, 1, a, lda, a[i:], lda, 0, w[iw:], ldw) - if i < n-1 { - bi.Dgemv(blas.Trans, i, n-i-1, 1, w[iw+1:], ldw, - a[i:], lda, 0, w[(i+1)*ldw+iw:], ldw) - bi.Dgemv(blas.NoTrans, i, n-i-1, -1, a[i+1:], lda, - w[(i+1)*ldw+iw:], ldw, 1, w[iw:], ldw) - bi.Dgemv(blas.Trans, i, n-i-1, 1, a[i+1:], lda, - a[i:], lda, 0, w[(i+1)*ldw+iw:], ldw) - bi.Dgemv(blas.NoTrans, i, n-i-1, -1, w[iw+1:], ldw, - w[(i+1)*ldw+iw:], ldw, 1, w[iw:], ldw) - } - bi.Dscal(i, tau[i-1], w[iw:], ldw) - alpha := -0.5 * tau[i-1] * bi.Ddot(i, w[iw:], ldw, a[i:], lda) - bi.Daxpy(i, alpha, a[i:], lda, w[iw:], ldw) - } - } - } else { - // Reduce first nb columns of lower triangle. - for i := 0; i < nb; i++ { - // Update A(i:n, i) - bi.Dgemv(blas.NoTrans, n-i, i, -1, a[i*lda:], lda, - w[i*ldw:], 1, 1, a[i*lda+i:], lda) - bi.Dgemv(blas.NoTrans, n-i, i, -1, w[i*ldw:], ldw, - a[i*lda:], 1, 1, a[i*lda+i:], lda) - if i < n-1 { - // Generate elementary reflector H_i to annihilate A(i+2:n,i). - e[i], tau[i] = impl.Dlarfg(n-i-1, a[(i+1)*lda+i], a[min(i+2, n-1)*lda+i:], lda) - a[(i+1)*lda+i] = 1 - - // Compute W(i+1:n,i). - bi.Dsymv(blas.Lower, n-i-1, 1, a[(i+1)*lda+i+1:], lda, - a[(i+1)*lda+i:], lda, 0, w[(i+1)*ldw+i:], ldw) - bi.Dgemv(blas.Trans, n-i-1, i, 1, w[(i+1)*ldw:], ldw, - a[(i+1)*lda+i:], lda, 0, w[i:], ldw) - bi.Dgemv(blas.NoTrans, n-i-1, i, -1, a[(i+1)*lda:], lda, - w[i:], ldw, 1, w[(i+1)*ldw+i:], ldw) - bi.Dgemv(blas.Trans, n-i-1, i, 1, a[(i+1)*lda:], lda, - a[(i+1)*lda+i:], lda, 0, w[i:], ldw) - bi.Dgemv(blas.NoTrans, n-i-1, i, -1, w[(i+1)*ldw:], ldw, - w[i:], ldw, 1, w[(i+1)*ldw+i:], ldw) - bi.Dscal(n-i-1, tau[i], w[(i+1)*ldw+i:], ldw) - alpha := -0.5 * tau[i] * bi.Ddot(n-i-1, w[(i+1)*ldw+i:], ldw, - a[(i+1)*lda+i:], lda) - bi.Daxpy(n-i-1, alpha, a[(i+1)*lda+i:], lda, - w[(i+1)*ldw+i:], ldw) - } - } - } -} diff --git a/vendor/gonum.org/v1/gonum/lapack/gonum/dlatrs.go b/vendor/gonum.org/v1/gonum/lapack/gonum/dlatrs.go deleted file mode 100644 index dc445c6fe1..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/gonum/dlatrs.go +++ /dev/null @@ -1,359 +0,0 @@ -// Copyright ©2015 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import ( - "math" - - "gonum.org/v1/gonum/blas" - "gonum.org/v1/gonum/blas/blas64" -) - -// Dlatrs solves a triangular system of equations scaled to prevent overflow. It -// solves -// A * x = scale * b if trans == blas.NoTrans -// A^T * x = scale * b if trans == blas.Trans -// where the scale s is set for numeric stability. -// -// A is an n×n triangular matrix. On entry, the slice x contains the values of -// b, and on exit it contains the solution vector x. -// -// If normin == true, cnorm is an input and cnorm[j] contains the norm of the off-diagonal -// part of the j^th column of A. If trans == blas.NoTrans, cnorm[j] must be greater -// than or equal to the infinity norm, and greater than or equal to the one-norm -// otherwise. If normin == false, then cnorm is treated as an output, and is set -// to contain the 1-norm of the off-diagonal part of the j^th column of A. -// -// Dlatrs is an internal routine. It is exported for testing purposes. -func (impl Implementation) Dlatrs(uplo blas.Uplo, trans blas.Transpose, diag blas.Diag, normin bool, n int, a []float64, lda int, x []float64, cnorm []float64) (scale float64) { - switch { - case uplo != blas.Upper && uplo != blas.Lower: - panic(badUplo) - case trans != blas.NoTrans && trans != blas.Trans && trans != blas.ConjTrans: - panic(badTrans) - case diag != blas.Unit && diag != blas.NonUnit: - panic(badDiag) - case n < 0: - panic(nLT0) - case lda < max(1, n): - panic(badLdA) - } - - // Quick return if possible. - if n == 0 { - return 0 - } - - switch { - case len(a) < (n-1)*lda+n: - panic(shortA) - case len(x) < n: - panic(shortX) - case len(cnorm) < n: - panic(shortCNorm) - } - - upper := uplo == blas.Upper - nonUnit := diag == blas.NonUnit - - smlnum := dlamchS / dlamchP - bignum := 1 / smlnum - scale = 1 - - bi := blas64.Implementation() - - if !normin { - if upper { - cnorm[0] = 0 - for j := 1; j < n; j++ { - cnorm[j] = bi.Dasum(j, a[j:], lda) - } - } else { - for j := 0; j < n-1; j++ { - cnorm[j] = bi.Dasum(n-j-1, a[(j+1)*lda+j:], lda) - } - cnorm[n-1] = 0 - } - } - // Scale the column norms by tscal if the maximum element in cnorm is greater than bignum. - imax := bi.Idamax(n, cnorm, 1) - tmax := cnorm[imax] - var tscal float64 - if tmax <= bignum { - tscal = 1 - } else { - tscal = 1 / (smlnum * tmax) - bi.Dscal(n, tscal, cnorm, 1) - } - - // Compute a bound on the computed solution vector to see if bi.Dtrsv can be used. - j := bi.Idamax(n, x, 1) - xmax := math.Abs(x[j]) - xbnd := xmax - var grow float64 - var jfirst, jlast, jinc int - if trans == blas.NoTrans { - if upper { - jfirst = n - 1 - jlast = -1 - jinc = -1 - } else { - jfirst = 0 - jlast = n - jinc = 1 - } - // Compute the growth in A * x = b. - if tscal != 1 { - grow = 0 - goto Solve - } - if nonUnit { - grow = 1 / math.Max(xbnd, smlnum) - xbnd = grow - for j := jfirst; j != jlast; j += jinc { - if grow <= smlnum { - goto Solve - } - tjj := math.Abs(a[j*lda+j]) - xbnd = math.Min(xbnd, math.Min(1, tjj)*grow) - if tjj+cnorm[j] >= smlnum { - grow *= tjj / (tjj + cnorm[j]) - } else { - grow = 0 - } - } - grow = xbnd - } else { - grow = math.Min(1, 1/math.Max(xbnd, smlnum)) - for j := jfirst; j != jlast; j += jinc { - if grow <= smlnum { - goto Solve - } - grow *= 1 / (1 + cnorm[j]) - } - } - } else { - if upper { - jfirst = 0 - jlast = n - jinc = 1 - } else { - jfirst = n - 1 - jlast = -1 - jinc = -1 - } - if tscal != 1 { - grow = 0 - goto Solve - } - if nonUnit { - grow = 1 / (math.Max(xbnd, smlnum)) - xbnd = grow - for j := jfirst; j != jlast; j += jinc { - if grow <= smlnum { - goto Solve - } - xj := 1 + cnorm[j] - grow = math.Min(grow, xbnd/xj) - tjj := math.Abs(a[j*lda+j]) - if xj > tjj { - xbnd *= tjj / xj - } - } - grow = math.Min(grow, xbnd) - } else { - grow = math.Min(1, 1/math.Max(xbnd, smlnum)) - for j := jfirst; j != jlast; j += jinc { - if grow <= smlnum { - goto Solve - } - xj := 1 + cnorm[j] - grow /= xj - } - } - } - -Solve: - if grow*tscal > smlnum { - // Use the Level 2 BLAS solve if the reciprocal of the bound on - // elements of X is not too small. - bi.Dtrsv(uplo, trans, diag, n, a, lda, x, 1) - if tscal != 1 { - bi.Dscal(n, 1/tscal, cnorm, 1) - } - return scale - } - - // Use a Level 1 BLAS solve, scaling intermediate results. - if xmax > bignum { - scale = bignum / xmax - bi.Dscal(n, scale, x, 1) - xmax = bignum - } - if trans == blas.NoTrans { - for j := jfirst; j != jlast; j += jinc { - xj := math.Abs(x[j]) - var tjj, tjjs float64 - if nonUnit { - tjjs = a[j*lda+j] * tscal - } else { - tjjs = tscal - if tscal == 1 { - goto Skip1 - } - } - tjj = math.Abs(tjjs) - if tjj > smlnum { - if tjj < 1 { - if xj > tjj*bignum { - rec := 1 / xj - bi.Dscal(n, rec, x, 1) - scale *= rec - xmax *= rec - } - } - x[j] /= tjjs - xj = math.Abs(x[j]) - } else if tjj > 0 { - if xj > tjj*bignum { - rec := (tjj * bignum) / xj - if cnorm[j] > 1 { - rec /= cnorm[j] - } - bi.Dscal(n, rec, x, 1) - scale *= rec - xmax *= rec - } - x[j] /= tjjs - xj = math.Abs(x[j]) - } else { - for i := 0; i < n; i++ { - x[i] = 0 - } - x[j] = 1 - xj = 1 - scale = 0 - xmax = 0 - } - Skip1: - if xj > 1 { - rec := 1 / xj - if cnorm[j] > (bignum-xmax)*rec { - rec *= 0.5 - bi.Dscal(n, rec, x, 1) - scale *= rec - } - } else if xj*cnorm[j] > bignum-xmax { - bi.Dscal(n, 0.5, x, 1) - scale *= 0.5 - } - if upper { - if j > 0 { - bi.Daxpy(j, -x[j]*tscal, a[j:], lda, x, 1) - i := bi.Idamax(j, x, 1) - xmax = math.Abs(x[i]) - } - } else { - if j < n-1 { - bi.Daxpy(n-j-1, -x[j]*tscal, a[(j+1)*lda+j:], lda, x[j+1:], 1) - i := j + bi.Idamax(n-j-1, x[j+1:], 1) - xmax = math.Abs(x[i]) - } - } - } - } else { - for j := jfirst; j != jlast; j += jinc { - xj := math.Abs(x[j]) - uscal := tscal - rec := 1 / math.Max(xmax, 1) - var tjjs float64 - if cnorm[j] > (bignum-xj)*rec { - rec *= 0.5 - if nonUnit { - tjjs = a[j*lda+j] * tscal - } else { - tjjs = tscal - } - tjj := math.Abs(tjjs) - if tjj > 1 { - rec = math.Min(1, rec*tjj) - uscal /= tjjs - } - if rec < 1 { - bi.Dscal(n, rec, x, 1) - scale *= rec - xmax *= rec - } - } - var sumj float64 - if uscal == 1 { - if upper { - sumj = bi.Ddot(j, a[j:], lda, x, 1) - } else if j < n-1 { - sumj = bi.Ddot(n-j-1, a[(j+1)*lda+j:], lda, x[j+1:], 1) - } - } else { - if upper { - for i := 0; i < j; i++ { - sumj += (a[i*lda+j] * uscal) * x[i] - } - } else if j < n { - for i := j + 1; i < n; i++ { - sumj += (a[i*lda+j] * uscal) * x[i] - } - } - } - if uscal == tscal { - x[j] -= sumj - xj := math.Abs(x[j]) - var tjjs float64 - if nonUnit { - tjjs = a[j*lda+j] * tscal - } else { - tjjs = tscal - if tscal == 1 { - goto Skip2 - } - } - tjj := math.Abs(tjjs) - if tjj > smlnum { - if tjj < 1 { - if xj > tjj*bignum { - rec = 1 / xj - bi.Dscal(n, rec, x, 1) - scale *= rec - xmax *= rec - } - } - x[j] /= tjjs - } else if tjj > 0 { - if xj > tjj*bignum { - rec = (tjj * bignum) / xj - bi.Dscal(n, rec, x, 1) - scale *= rec - xmax *= rec - } - x[j] /= tjjs - } else { - for i := 0; i < n; i++ { - x[i] = 0 - } - x[j] = 1 - scale = 0 - xmax = 0 - } - } else { - x[j] = x[j]/tjjs - sumj - } - Skip2: - xmax = math.Max(xmax, math.Abs(x[j])) - } - } - scale /= tscal - if tscal != 1 { - bi.Dscal(n, 1/tscal, cnorm, 1) - } - return scale -} diff --git a/vendor/gonum.org/v1/gonum/lapack/gonum/dlauu2.go b/vendor/gonum.org/v1/gonum/lapack/gonum/dlauu2.go deleted file mode 100644 index ecce22cc64..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/gonum/dlauu2.go +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright ©2018 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import ( - "gonum.org/v1/gonum/blas" - "gonum.org/v1/gonum/blas/blas64" -) - -// Dlauu2 computes the product -// U * U^T if uplo is blas.Upper -// L^T * L if uplo is blas.Lower -// where U or L is stored in the upper or lower triangular part of A. -// Only the upper or lower triangle of the result is stored, overwriting -// the corresponding factor in A. -func (impl Implementation) Dlauu2(uplo blas.Uplo, n int, a []float64, lda int) { - switch { - case uplo != blas.Upper && uplo != blas.Lower: - panic(badUplo) - case n < 0: - panic(nLT0) - case lda < max(1, n): - panic(badLdA) - } - - // Quick return if possible. - if n == 0 { - return - } - - if len(a) < (n-1)*lda+n { - panic(shortA) - } - - bi := blas64.Implementation() - - if uplo == blas.Upper { - // Compute the product U*U^T. - for i := 0; i < n; i++ { - aii := a[i*lda+i] - if i < n-1 { - a[i*lda+i] = bi.Ddot(n-i, a[i*lda+i:], 1, a[i*lda+i:], 1) - bi.Dgemv(blas.NoTrans, i, n-i-1, 1, a[i+1:], lda, a[i*lda+i+1:], 1, - aii, a[i:], lda) - } else { - bi.Dscal(i+1, aii, a[i:], lda) - } - } - } else { - // Compute the product L^T*L. - for i := 0; i < n; i++ { - aii := a[i*lda+i] - if i < n-1 { - a[i*lda+i] = bi.Ddot(n-i, a[i*lda+i:], lda, a[i*lda+i:], lda) - bi.Dgemv(blas.Trans, n-i-1, i, 1, a[(i+1)*lda:], lda, a[(i+1)*lda+i:], lda, - aii, a[i*lda:], 1) - } else { - bi.Dscal(i+1, aii, a[i*lda:], 1) - } - } - } -} diff --git a/vendor/gonum.org/v1/gonum/lapack/gonum/dlauum.go b/vendor/gonum.org/v1/gonum/lapack/gonum/dlauum.go deleted file mode 100644 index 67ecaddf4c..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/gonum/dlauum.go +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright ©2018 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import ( - "gonum.org/v1/gonum/blas" - "gonum.org/v1/gonum/blas/blas64" -) - -// Dlauum computes the product -// U * U^T if uplo is blas.Upper -// L^T * L if uplo is blas.Lower -// where U or L is stored in the upper or lower triangular part of A. -// Only the upper or lower triangle of the result is stored, overwriting -// the corresponding factor in A. -func (impl Implementation) Dlauum(uplo blas.Uplo, n int, a []float64, lda int) { - switch { - case uplo != blas.Upper && uplo != blas.Lower: - panic(badUplo) - case n < 0: - panic(nLT0) - case lda < max(1, n): - panic(badLdA) - } - - // Quick return if possible. - if n == 0 { - return - } - - if len(a) < (n-1)*lda+n { - panic(shortA) - } - - // Determine the block size. - opts := "U" - if uplo == blas.Lower { - opts = "L" - } - nb := impl.Ilaenv(1, "DLAUUM", opts, n, -1, -1, -1) - - if nb <= 1 || n <= nb { - // Use unblocked code. - impl.Dlauu2(uplo, n, a, lda) - return - } - - // Use blocked code. - bi := blas64.Implementation() - if uplo == blas.Upper { - // Compute the product U*U^T. - for i := 0; i < n; i += nb { - ib := min(nb, n-i) - bi.Dtrmm(blas.Right, blas.Upper, blas.Trans, blas.NonUnit, - i, ib, 1, a[i*lda+i:], lda, a[i:], lda) - impl.Dlauu2(blas.Upper, ib, a[i*lda+i:], lda) - if n-i-ib > 0 { - bi.Dgemm(blas.NoTrans, blas.Trans, i, ib, n-i-ib, - 1, a[i+ib:], lda, a[i*lda+i+ib:], lda, 1, a[i:], lda) - bi.Dsyrk(blas.Upper, blas.NoTrans, ib, n-i-ib, - 1, a[i*lda+i+ib:], lda, 1, a[i*lda+i:], lda) - } - } - } else { - // Compute the product L^T*L. - for i := 0; i < n; i += nb { - ib := min(nb, n-i) - bi.Dtrmm(blas.Left, blas.Lower, blas.Trans, blas.NonUnit, - ib, i, 1, a[i*lda+i:], lda, a[i*lda:], lda) - impl.Dlauu2(blas.Lower, ib, a[i*lda+i:], lda) - if n-i-ib > 0 { - bi.Dgemm(blas.Trans, blas.NoTrans, ib, i, n-i-ib, - 1, a[(i+ib)*lda+i:], lda, a[(i+ib)*lda:], lda, 1, a[i*lda:], lda) - bi.Dsyrk(blas.Lower, blas.Trans, ib, n-i-ib, - 1, a[(i+ib)*lda+i:], lda, 1, a[i*lda+i:], lda) - } - } - } -} diff --git a/vendor/gonum.org/v1/gonum/lapack/gonum/doc.go b/vendor/gonum.org/v1/gonum/lapack/gonum/doc.go deleted file mode 100644 index 5794289272..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/gonum/doc.go +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright ©2015 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package gonum is a pure-go implementation of the LAPACK API. The LAPACK API defines -// a set of algorithms for advanced matrix operations. -// -// The function definitions and implementations follow that of the netlib reference -// implementation. See http://www.netlib.org/lapack/explore-html/ for more -// information, and http://www.netlib.org/lapack/explore-html/d4/de1/_l_i_c_e_n_s_e_source.html -// for more license information. -// -// Slice function arguments frequently represent vectors and matrices. The data -// layout is identical to that found in https://godoc.org/gonum.org/v1/gonum/blas/gonum. -// -// Most LAPACK functions are built on top the routines defined in the BLAS API, -// and as such the computation time for many LAPACK functions is -// dominated by BLAS calls. Here, BLAS is accessed through the -// blas64 package (https://godoc.org/golang.org/v1/gonum/blas/blas64). In particular, -// this implies that an external BLAS library will be used if it is -// registered in blas64. -// -// The full LAPACK capability has not been implemented at present. The full -// API is very large, containing approximately 200 functions for double precision -// alone. Future additions will be focused on supporting the gonum matrix -// package (https://godoc.org/github.com/gonum/matrix/mat64), though pull requests -// with implementations and tests for LAPACK function are encouraged. -package gonum // import "gonum.org/v1/gonum/lapack/gonum" diff --git a/vendor/gonum.org/v1/gonum/lapack/gonum/dorg2l.go b/vendor/gonum.org/v1/gonum/lapack/gonum/dorg2l.go deleted file mode 100644 index a20765a9e9..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/gonum/dorg2l.go +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright ©2016 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import ( - "gonum.org/v1/gonum/blas" - "gonum.org/v1/gonum/blas/blas64" -) - -// Dorg2l generates an m×n matrix Q with orthonormal columns which is defined -// as the last n columns of a product of k elementary reflectors of order m. -// Q = H_{k-1} * ... * H_1 * H_0 -// See Dgelqf for more information. It must be that m >= n >= k. -// -// tau contains the scalar reflectors computed by Dgeqlf. tau must have length -// at least k, and Dorg2l will panic otherwise. -// -// work contains temporary memory, and must have length at least n. Dorg2l will -// panic otherwise. -// -// Dorg2l is an internal routine. It is exported for testing purposes. -func (impl Implementation) Dorg2l(m, n, k int, a []float64, lda int, tau, work []float64) { - switch { - case m < 0: - panic(mLT0) - case n < 0: - panic(nLT0) - case n > m: - panic(nGTM) - case k < 0: - panic(kLT0) - case k > n: - panic(kGTN) - case lda < max(1, n): - panic(badLdA) - } - - if n == 0 { - return - } - - switch { - case len(a) < (m-1)*lda+n: - panic(shortA) - case len(tau) < k: - panic(shortTau) - case len(work) < n: - panic(shortWork) - } - - // Initialize columns 0:n-k to columns of the unit matrix. - for j := 0; j < n-k; j++ { - for l := 0; l < m; l++ { - a[l*lda+j] = 0 - } - a[(m-n+j)*lda+j] = 1 - } - - bi := blas64.Implementation() - for i := 0; i < k; i++ { - ii := n - k + i - - // Apply H_i to A[0:m-k+i, 0:n-k+i] from the left. - a[(m-n+ii)*lda+ii] = 1 - impl.Dlarf(blas.Left, m-n+ii+1, ii, a[ii:], lda, tau[i], a, lda, work) - bi.Dscal(m-n+ii, -tau[i], a[ii:], lda) - a[(m-n+ii)*lda+ii] = 1 - tau[i] - - // Set A[m-k+i:m, n-k+i+1] to zero. - for l := m - n + ii + 1; l < m; l++ { - a[l*lda+ii] = 0 - } - } -} diff --git a/vendor/gonum.org/v1/gonum/lapack/gonum/dorg2r.go b/vendor/gonum.org/v1/gonum/lapack/gonum/dorg2r.go deleted file mode 100644 index de44775712..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/gonum/dorg2r.go +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright ©2015 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import ( - "gonum.org/v1/gonum/blas" - "gonum.org/v1/gonum/blas/blas64" -) - -// Dorg2r generates an m×n matrix Q with orthonormal columns defined by the -// product of elementary reflectors as computed by Dgeqrf. -// Q = H_0 * H_1 * ... * H_{k-1} -// len(tau) >= k, 0 <= k <= n, 0 <= n <= m, len(work) >= n. -// Dorg2r will panic if these conditions are not met. -// -// Dorg2r is an internal routine. It is exported for testing purposes. -func (impl Implementation) Dorg2r(m, n, k int, a []float64, lda int, tau []float64, work []float64) { - switch { - case m < 0: - panic(mLT0) - case n < 0: - panic(nLT0) - case n > m: - panic(nGTM) - case k < 0: - panic(kLT0) - case k > n: - panic(kGTN) - case lda < max(1, n): - panic(badLdA) - } - - if n == 0 { - return - } - - switch { - case len(a) < (m-1)*lda+n: - panic(shortA) - case len(tau) < k: - panic(shortTau) - case len(work) < n: - panic(shortWork) - } - - bi := blas64.Implementation() - - // Initialize columns k+1:n to columns of the unit matrix. - for l := 0; l < m; l++ { - for j := k; j < n; j++ { - a[l*lda+j] = 0 - } - } - for j := k; j < n; j++ { - a[j*lda+j] = 1 - } - for i := k - 1; i >= 0; i-- { - for i := range work { - work[i] = 0 - } - if i < n-1 { - a[i*lda+i] = 1 - impl.Dlarf(blas.Left, m-i, n-i-1, a[i*lda+i:], lda, tau[i], a[i*lda+i+1:], lda, work) - } - if i < m-1 { - bi.Dscal(m-i-1, -tau[i], a[(i+1)*lda+i:], lda) - } - a[i*lda+i] = 1 - tau[i] - for l := 0; l < i; l++ { - a[l*lda+i] = 0 - } - } -} diff --git a/vendor/gonum.org/v1/gonum/lapack/gonum/dorgbr.go b/vendor/gonum.org/v1/gonum/lapack/gonum/dorgbr.go deleted file mode 100644 index 626cad5ffe..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/gonum/dorgbr.go +++ /dev/null @@ -1,138 +0,0 @@ -// Copyright ©2015 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import "gonum.org/v1/gonum/lapack" - -// Dorgbr generates one of the matrices Q or P^T computed by Dgebrd -// computed from the decomposition Dgebrd. See Dgebd2 for the description of -// Q and P^T. -// -// If vect == lapack.GenerateQ, then a is assumed to have been an m×k matrix and -// Q is of order m. If m >= k, then Dorgbr returns the first n columns of Q -// where m >= n >= k. If m < k, then Dorgbr returns Q as an m×m matrix. -// -// If vect == lapack.GeneratePT, then A is assumed to have been a k×n matrix, and -// P^T is of order n. If k < n, then Dorgbr returns the first m rows of P^T, -// where n >= m >= k. If k >= n, then Dorgbr returns P^T as an n×n matrix. -// -// Dorgbr is an internal routine. It is exported for testing purposes. -func (impl Implementation) Dorgbr(vect lapack.GenOrtho, m, n, k int, a []float64, lda int, tau, work []float64, lwork int) { - wantq := vect == lapack.GenerateQ - mn := min(m, n) - switch { - case vect != lapack.GenerateQ && vect != lapack.GeneratePT: - panic(badGenOrtho) - case m < 0: - panic(mLT0) - case n < 0: - panic(nLT0) - case k < 0: - panic(kLT0) - case wantq && n > m: - panic(nGTM) - case wantq && n < min(m, k): - panic("lapack: n < min(m,k)") - case !wantq && m > n: - panic(mGTN) - case !wantq && m < min(n, k): - panic("lapack: m < min(n,k)") - case lda < max(1, n) && lwork != -1: - // Normally, we follow the reference and require the leading - // dimension to be always valid, even in case of workspace - // queries. However, if a caller provided a placeholder value - // for lda (and a) when doing a workspace query that didn't - // fulfill the condition here, it would cause a panic. This is - // exactly what Dgesvd does. - panic(badLdA) - case lwork < max(1, mn) && lwork != -1: - panic(badLWork) - case len(work) < max(1, lwork): - panic(shortWork) - } - - // Quick return if possible. - work[0] = 1 - if m == 0 || n == 0 { - return - } - - if wantq { - if m >= k { - impl.Dorgqr(m, n, k, a, lda, tau, work, -1) - } else if m > 1 { - impl.Dorgqr(m-1, m-1, m-1, a[lda+1:], lda, tau, work, -1) - } - } else { - if k < n { - impl.Dorglq(m, n, k, a, lda, tau, work, -1) - } else if n > 1 { - impl.Dorglq(n-1, n-1, n-1, a[lda+1:], lda, tau, work, -1) - } - } - lworkopt := int(work[0]) - lworkopt = max(lworkopt, mn) - if lwork == -1 { - work[0] = float64(lworkopt) - return - } - - switch { - case len(a) < (m-1)*lda+n: - panic(shortA) - case wantq && len(tau) < min(m, k): - panic(shortTau) - case !wantq && len(tau) < min(n, k): - panic(shortTau) - } - - if wantq { - // Form Q, determined by a call to Dgebrd to reduce an m×k matrix. - if m >= k { - impl.Dorgqr(m, n, k, a, lda, tau, work, lwork) - } else { - // Shift the vectors which define the elementary reflectors one - // column to the right, and set the first row and column of Q to - // those of the unit matrix. - for j := m - 1; j >= 1; j-- { - a[j] = 0 - for i := j + 1; i < m; i++ { - a[i*lda+j] = a[i*lda+j-1] - } - } - a[0] = 1 - for i := 1; i < m; i++ { - a[i*lda] = 0 - } - if m > 1 { - // Form Q[1:m-1, 1:m-1] - impl.Dorgqr(m-1, m-1, m-1, a[lda+1:], lda, tau, work, lwork) - } - } - } else { - // Form P^T, determined by a call to Dgebrd to reduce a k×n matrix. - if k < n { - impl.Dorglq(m, n, k, a, lda, tau, work, lwork) - } else { - // Shift the vectors which define the elementary reflectors one - // row downward, and set the first row and column of P^T to - // those of the unit matrix. - a[0] = 1 - for i := 1; i < n; i++ { - a[i*lda] = 0 - } - for j := 1; j < n; j++ { - for i := j - 1; i >= 1; i-- { - a[i*lda+j] = a[(i-1)*lda+j] - } - a[j] = 0 - } - if n > 1 { - impl.Dorglq(n-1, n-1, n-1, a[lda+1:], lda, tau, work, lwork) - } - } - } - work[0] = float64(lworkopt) -} diff --git a/vendor/gonum.org/v1/gonum/lapack/gonum/dorghr.go b/vendor/gonum.org/v1/gonum/lapack/gonum/dorghr.go deleted file mode 100644 index 6e799d10d5..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/gonum/dorghr.go +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright ©2016 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -// Dorghr generates an n×n orthogonal matrix Q which is defined as the product -// of ihi-ilo elementary reflectors: -// Q = H_{ilo} H_{ilo+1} ... H_{ihi-1}. -// -// a and lda represent an n×n matrix that contains the elementary reflectors, as -// returned by Dgehrd. On return, a is overwritten by the n×n orthogonal matrix -// Q. Q will be equal to the identity matrix except in the submatrix -// Q[ilo+1:ihi+1,ilo+1:ihi+1]. -// -// ilo and ihi must have the same values as in the previous call of Dgehrd. It -// must hold that -// 0 <= ilo <= ihi < n, if n > 0, -// ilo = 0, ihi = -1, if n == 0. -// -// tau contains the scalar factors of the elementary reflectors, as returned by -// Dgehrd. tau must have length n-1. -// -// work must have length at least max(1,lwork) and lwork must be at least -// ihi-ilo. For optimum performance lwork must be at least (ihi-ilo)*nb where nb -// is the optimal blocksize. On return, work[0] will contain the optimal value -// of lwork. -// -// If lwork == -1, instead of performing Dorghr, only the optimal value of lwork -// will be stored into work[0]. -// -// If any requirement on input sizes is not met, Dorghr will panic. -// -// Dorghr is an internal routine. It is exported for testing purposes. -func (impl Implementation) Dorghr(n, ilo, ihi int, a []float64, lda int, tau, work []float64, lwork int) { - nh := ihi - ilo - switch { - case ilo < 0 || max(1, n) <= ilo: - panic(badIlo) - case ihi < min(ilo, n-1) || n <= ihi: - panic(badIhi) - case lda < max(1, n): - panic(badLdA) - case lwork < max(1, nh) && lwork != -1: - panic(badLWork) - case len(work) < max(1, lwork): - panic(shortWork) - } - - // Quick return if possible. - if n == 0 { - work[0] = 1 - return - } - - lwkopt := max(1, nh) * impl.Ilaenv(1, "DORGQR", " ", nh, nh, nh, -1) - if lwork == -1 { - work[0] = float64(lwkopt) - return - } - - switch { - case len(a) < (n-1)*lda+n: - panic(shortA) - case len(tau) < n-1: - panic(shortTau) - } - - // Shift the vectors which define the elementary reflectors one column - // to the right. - for i := ilo + 2; i < ihi+1; i++ { - copy(a[i*lda+ilo+1:i*lda+i], a[i*lda+ilo:i*lda+i-1]) - } - // Set the first ilo+1 and the last n-ihi-1 rows and columns to those of - // the identity matrix. - for i := 0; i < ilo+1; i++ { - for j := 0; j < n; j++ { - a[i*lda+j] = 0 - } - a[i*lda+i] = 1 - } - for i := ilo + 1; i < ihi+1; i++ { - for j := 0; j <= ilo; j++ { - a[i*lda+j] = 0 - } - for j := i; j < n; j++ { - a[i*lda+j] = 0 - } - } - for i := ihi + 1; i < n; i++ { - for j := 0; j < n; j++ { - a[i*lda+j] = 0 - } - a[i*lda+i] = 1 - } - if nh > 0 { - // Generate Q[ilo+1:ihi+1,ilo+1:ihi+1]. - impl.Dorgqr(nh, nh, nh, a[(ilo+1)*lda+ilo+1:], lda, tau[ilo:ihi], work, lwork) - } - work[0] = float64(lwkopt) -} diff --git a/vendor/gonum.org/v1/gonum/lapack/gonum/dorgl2.go b/vendor/gonum.org/v1/gonum/lapack/gonum/dorgl2.go deleted file mode 100644 index b5566b9de1..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/gonum/dorgl2.go +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright ©2015 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import ( - "gonum.org/v1/gonum/blas" - "gonum.org/v1/gonum/blas/blas64" -) - -// Dorgl2 generates an m×n matrix Q with orthonormal rows defined by the -// first m rows product of elementary reflectors as computed by Dgelqf. -// Q = H_0 * H_1 * ... * H_{k-1} -// len(tau) >= k, 0 <= k <= m, 0 <= m <= n, len(work) >= m. -// Dorgl2 will panic if these conditions are not met. -// -// Dorgl2 is an internal routine. It is exported for testing purposes. -func (impl Implementation) Dorgl2(m, n, k int, a []float64, lda int, tau, work []float64) { - switch { - case m < 0: - panic(mLT0) - case n < m: - panic(nLTM) - case k < 0: - panic(kLT0) - case k > m: - panic(kGTM) - case lda < max(1, m): - panic(badLdA) - } - - if m == 0 { - return - } - - switch { - case len(a) < (m-1)*lda+n: - panic(shortA) - case len(tau) < k: - panic(shortTau) - case len(work) < m: - panic(shortWork) - } - - bi := blas64.Implementation() - - if k < m { - for i := k; i < m; i++ { - for j := 0; j < n; j++ { - a[i*lda+j] = 0 - } - } - for j := k; j < m; j++ { - a[j*lda+j] = 1 - } - } - for i := k - 1; i >= 0; i-- { - if i < n-1 { - if i < m-1 { - a[i*lda+i] = 1 - impl.Dlarf(blas.Right, m-i-1, n-i, a[i*lda+i:], 1, tau[i], a[(i+1)*lda+i:], lda, work) - } - bi.Dscal(n-i-1, -tau[i], a[i*lda+i+1:], 1) - } - a[i*lda+i] = 1 - tau[i] - for l := 0; l < i; l++ { - a[i*lda+l] = 0 - } - } -} diff --git a/vendor/gonum.org/v1/gonum/lapack/gonum/dorglq.go b/vendor/gonum.org/v1/gonum/lapack/gonum/dorglq.go deleted file mode 100644 index a6dd980ceb..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/gonum/dorglq.go +++ /dev/null @@ -1,123 +0,0 @@ -// Copyright ©2015 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import ( - "gonum.org/v1/gonum/blas" - "gonum.org/v1/gonum/lapack" -) - -// Dorglq generates an m×n matrix Q with orthonormal columns defined by the -// product of elementary reflectors as computed by Dgelqf. -// Q = H_0 * H_1 * ... * H_{k-1} -// Dorglq is the blocked version of Dorgl2 that makes greater use of level-3 BLAS -// routines. -// -// len(tau) >= k, 0 <= k <= m, and 0 <= m <= n. -// -// work is temporary storage, and lwork specifies the usable memory length. At minimum, -// lwork >= m, and the amount of blocking is limited by the usable length. -// If lwork == -1, instead of computing Dorglq the optimal work length is stored -// into work[0]. -// -// Dorglq will panic if the conditions on input values are not met. -// -// Dorglq is an internal routine. It is exported for testing purposes. -func (impl Implementation) Dorglq(m, n, k int, a []float64, lda int, tau, work []float64, lwork int) { - switch { - case m < 0: - panic(mLT0) - case n < m: - panic(nLTM) - case k < 0: - panic(kLT0) - case k > m: - panic(kGTM) - case lda < max(1, n): - panic(badLdA) - case lwork < max(1, m) && lwork != -1: - panic(badLWork) - case len(work) < max(1, lwork): - panic(shortWork) - } - - if m == 0 { - work[0] = 1 - return - } - - nb := impl.Ilaenv(1, "DORGLQ", " ", m, n, k, -1) - if lwork == -1 { - work[0] = float64(m * nb) - return - } - - switch { - case len(a) < (m-1)*lda+n: - panic(shortA) - case len(tau) < k: - panic(shortTau) - } - - nbmin := 2 // Minimum block size - var nx int // Crossover size from blocked to unbloked code - iws := m // Length of work needed - var ldwork int - if 1 < nb && nb < k { - nx = max(0, impl.Ilaenv(3, "DORGLQ", " ", m, n, k, -1)) - if nx < k { - ldwork = nb - iws = m * ldwork - if lwork < iws { - nb = lwork / m - ldwork = nb - nbmin = max(2, impl.Ilaenv(2, "DORGLQ", " ", m, n, k, -1)) - } - } - } - - var ki, kk int - if nbmin <= nb && nb < k && nx < k { - // The first kk rows are handled by the blocked method. - ki = ((k - nx - 1) / nb) * nb - kk = min(k, ki+nb) - for i := kk; i < m; i++ { - for j := 0; j < kk; j++ { - a[i*lda+j] = 0 - } - } - } - if kk < m { - // Perform the operation on colums kk to the end. - impl.Dorgl2(m-kk, n-kk, k-kk, a[kk*lda+kk:], lda, tau[kk:], work) - } - if kk > 0 { - // Perform the operation on column-blocks - for i := ki; i >= 0; i -= nb { - ib := min(nb, k-i) - if i+ib < m { - impl.Dlarft(lapack.Forward, lapack.RowWise, - n-i, ib, - a[i*lda+i:], lda, - tau[i:], - work, ldwork) - - impl.Dlarfb(blas.Right, blas.Trans, lapack.Forward, lapack.RowWise, - m-i-ib, n-i, ib, - a[i*lda+i:], lda, - work, ldwork, - a[(i+ib)*lda+i:], lda, - work[ib*ldwork:], ldwork) - } - impl.Dorgl2(ib, n-i, ib, a[i*lda+i:], lda, tau[i:], work) - for l := i; l < i+ib; l++ { - for j := 0; j < i; j++ { - a[l*lda+j] = 0 - } - } - } - } - work[0] = float64(iws) -} diff --git a/vendor/gonum.org/v1/gonum/lapack/gonum/dorgql.go b/vendor/gonum.org/v1/gonum/lapack/gonum/dorgql.go deleted file mode 100644 index 6927ba4ca3..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/gonum/dorgql.go +++ /dev/null @@ -1,136 +0,0 @@ -// Copyright ©2016 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import ( - "gonum.org/v1/gonum/blas" - "gonum.org/v1/gonum/lapack" -) - -// Dorgql generates the m×n matrix Q with orthonormal columns defined as the -// last n columns of a product of k elementary reflectors of order m -// Q = H_{k-1} * ... * H_1 * H_0. -// -// It must hold that -// 0 <= k <= n <= m, -// and Dorgql will panic otherwise. -// -// On entry, the (n-k+i)-th column of A must contain the vector which defines -// the elementary reflector H_i, for i=0,...,k-1, and tau[i] must contain its -// scalar factor. On return, a contains the m×n matrix Q. -// -// tau must have length at least k, and Dorgql will panic otherwise. -// -// work must have length at least max(1,lwork), and lwork must be at least -// max(1,n), otherwise Dorgql will panic. For optimum performance lwork must -// be a sufficiently large multiple of n. -// -// If lwork == -1, instead of computing Dorgql the optimal work length is stored -// into work[0]. -// -// Dorgql is an internal routine. It is exported for testing purposes. -func (impl Implementation) Dorgql(m, n, k int, a []float64, lda int, tau, work []float64, lwork int) { - switch { - case m < 0: - panic(mLT0) - case n < 0: - panic(nLT0) - case n > m: - panic(nGTM) - case k < 0: - panic(kLT0) - case k > n: - panic(kGTN) - case lda < max(1, n): - panic(badLdA) - case lwork < max(1, n) && lwork != -1: - panic(badLWork) - case len(work) < max(1, lwork): - panic(shortWork) - } - - // Quick return if possible. - if n == 0 { - work[0] = 1 - return - } - - nb := impl.Ilaenv(1, "DORGQL", " ", m, n, k, -1) - if lwork == -1 { - work[0] = float64(n * nb) - return - } - - switch { - case len(a) < (m-1)*lda+n: - panic(shortA) - case len(tau) < k: - panic(shortTau) - } - - nbmin := 2 - var nx, ldwork int - iws := n - if 1 < nb && nb < k { - // Determine when to cross over from blocked to unblocked code. - nx = max(0, impl.Ilaenv(3, "DORGQL", " ", m, n, k, -1)) - if nx < k { - // Determine if workspace is large enough for blocked code. - iws = n * nb - if lwork < iws { - // Not enough workspace to use optimal nb: reduce nb and determine - // the minimum value of nb. - nb = lwork / n - nbmin = max(2, impl.Ilaenv(2, "DORGQL", " ", m, n, k, -1)) - } - ldwork = nb - } - } - - var kk int - if nbmin <= nb && nb < k && nx < k { - // Use blocked code after the first block. The last kk columns are handled - // by the block method. - kk = min(k, ((k-nx+nb-1)/nb)*nb) - - // Set A(m-kk:m, 0:n-kk) to zero. - for i := m - kk; i < m; i++ { - for j := 0; j < n-kk; j++ { - a[i*lda+j] = 0 - } - } - } - - // Use unblocked code for the first or only block. - impl.Dorg2l(m-kk, n-kk, k-kk, a, lda, tau, work) - if kk > 0 { - // Use blocked code. - for i := k - kk; i < k; i += nb { - ib := min(nb, k-i) - if n-k+i > 0 { - // Form the triangular factor of the block reflector - // H = H_{i+ib-1} * ... * H_{i+1} * H_i. - impl.Dlarft(lapack.Backward, lapack.ColumnWise, m-k+i+ib, ib, - a[n-k+i:], lda, tau[i:], work, ldwork) - - // Apply H to A[0:m-k+i+ib, 0:n-k+i] from the left. - impl.Dlarfb(blas.Left, blas.NoTrans, lapack.Backward, lapack.ColumnWise, - m-k+i+ib, n-k+i, ib, a[n-k+i:], lda, work, ldwork, - a, lda, work[ib*ldwork:], ldwork) - } - - // Apply H to rows 0:m-k+i+ib of current block. - impl.Dorg2l(m-k+i+ib, ib, ib, a[n-k+i:], lda, tau[i:], work) - - // Set rows m-k+i+ib:m of current block to zero. - for j := n - k + i; j < n-k+i+ib; j++ { - for l := m - k + i + ib; l < m; l++ { - a[l*lda+j] = 0 - } - } - } - } - work[0] = float64(iws) -} diff --git a/vendor/gonum.org/v1/gonum/lapack/gonum/dorgqr.go b/vendor/gonum.org/v1/gonum/lapack/gonum/dorgqr.go deleted file mode 100644 index f07fdaf46a..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/gonum/dorgqr.go +++ /dev/null @@ -1,134 +0,0 @@ -// Copyright ©2015 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import ( - "gonum.org/v1/gonum/blas" - "gonum.org/v1/gonum/lapack" -) - -// Dorgqr generates an m×n matrix Q with orthonormal columns defined by the -// product of elementary reflectors -// Q = H_0 * H_1 * ... * H_{k-1} -// as computed by Dgeqrf. -// Dorgqr is the blocked version of Dorg2r that makes greater use of level-3 BLAS -// routines. -// -// The length of tau must be at least k, and the length of work must be at least n. -// It also must be that 0 <= k <= n and 0 <= n <= m. -// -// work is temporary storage, and lwork specifies the usable memory length. At -// minimum, lwork >= n, and the amount of blocking is limited by the usable -// length. If lwork == -1, instead of computing Dorgqr the optimal work length -// is stored into work[0]. -// -// Dorgqr will panic if the conditions on input values are not met. -// -// Dorgqr is an internal routine. It is exported for testing purposes. -func (impl Implementation) Dorgqr(m, n, k int, a []float64, lda int, tau, work []float64, lwork int) { - switch { - case m < 0: - panic(mLT0) - case n < 0: - panic(nLT0) - case n > m: - panic(nGTM) - case k < 0: - panic(kLT0) - case k > n: - panic(kGTN) - case lda < max(1, n) && lwork != -1: - // Normally, we follow the reference and require the leading - // dimension to be always valid, even in case of workspace - // queries. However, if a caller provided a placeholder value - // for lda (and a) when doing a workspace query that didn't - // fulfill the condition here, it would cause a panic. This is - // exactly what Dgesvd does. - panic(badLdA) - case lwork < max(1, n) && lwork != -1: - panic(badLWork) - case len(work) < max(1, lwork): - panic(shortWork) - } - - if n == 0 { - work[0] = 1 - return - } - - nb := impl.Ilaenv(1, "DORGQR", " ", m, n, k, -1) - // work is treated as an n×nb matrix - if lwork == -1 { - work[0] = float64(n * nb) - return - } - - switch { - case len(a) < (m-1)*lda+n: - panic(shortA) - case len(tau) < k: - panic(shortTau) - } - - nbmin := 2 // Minimum block size - var nx int // Crossover size from blocked to unbloked code - iws := n // Length of work needed - var ldwork int - if 1 < nb && nb < k { - nx = max(0, impl.Ilaenv(3, "DORGQR", " ", m, n, k, -1)) - if nx < k { - ldwork = nb - iws = n * ldwork - if lwork < iws { - nb = lwork / n - ldwork = nb - nbmin = max(2, impl.Ilaenv(2, "DORGQR", " ", m, n, k, -1)) - } - } - } - var ki, kk int - if nbmin <= nb && nb < k && nx < k { - // The first kk columns are handled by the blocked method. - ki = ((k - nx - 1) / nb) * nb - kk = min(k, ki+nb) - for i := 0; i < kk; i++ { - for j := kk; j < n; j++ { - a[i*lda+j] = 0 - } - } - } - if kk < n { - // Perform the operation on colums kk to the end. - impl.Dorg2r(m-kk, n-kk, k-kk, a[kk*lda+kk:], lda, tau[kk:], work) - } - if kk > 0 { - // Perform the operation on column-blocks. - for i := ki; i >= 0; i -= nb { - ib := min(nb, k-i) - if i+ib < n { - impl.Dlarft(lapack.Forward, lapack.ColumnWise, - m-i, ib, - a[i*lda+i:], lda, - tau[i:], - work, ldwork) - - impl.Dlarfb(blas.Left, blas.NoTrans, lapack.Forward, lapack.ColumnWise, - m-i, n-i-ib, ib, - a[i*lda+i:], lda, - work, ldwork, - a[i*lda+i+ib:], lda, - work[ib*ldwork:], ldwork) - } - impl.Dorg2r(m-i, ib, ib, a[i*lda+i:], lda, tau[i:], work) - // Set rows 0:i-1 of current block to zero. - for j := i; j < i+ib; j++ { - for l := 0; l < i; l++ { - a[l*lda+j] = 0 - } - } - } - } - work[0] = float64(iws) -} diff --git a/vendor/gonum.org/v1/gonum/lapack/gonum/dorgtr.go b/vendor/gonum.org/v1/gonum/lapack/gonum/dorgtr.go deleted file mode 100644 index 483fbcae9d..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/gonum/dorgtr.go +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright ©2016 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import "gonum.org/v1/gonum/blas" - -// Dorgtr generates a real orthogonal matrix Q which is defined as the product -// of n-1 elementary reflectors of order n as returned by Dsytrd. -// -// The construction of Q depends on the value of uplo: -// Q = H_{n-1} * ... * H_1 * H_0 if uplo == blas.Upper -// Q = H_0 * H_1 * ... * H_{n-1} if uplo == blas.Lower -// where H_i is constructed from the elementary reflectors as computed by Dsytrd. -// See the documentation for Dsytrd for more information. -// -// tau must have length at least n-1, and Dorgtr will panic otherwise. -// -// work is temporary storage, and lwork specifies the usable memory length. At -// minimum, lwork >= max(1,n-1), and Dorgtr will panic otherwise. The amount of blocking -// is limited by the usable length. -// If lwork == -1, instead of computing Dorgtr the optimal work length is stored -// into work[0]. -// -// Dorgtr is an internal routine. It is exported for testing purposes. -func (impl Implementation) Dorgtr(uplo blas.Uplo, n int, a []float64, lda int, tau, work []float64, lwork int) { - switch { - case uplo != blas.Upper && uplo != blas.Lower: - panic(badUplo) - case n < 0: - panic(nLT0) - case lda < max(1, n): - panic(badLdA) - case lwork < max(1, n-1) && lwork != -1: - panic(badLWork) - case len(work) < max(1, lwork): - panic(shortWork) - } - - if n == 0 { - work[0] = 1 - return - } - - var nb int - if uplo == blas.Upper { - nb = impl.Ilaenv(1, "DORGQL", " ", n-1, n-1, n-1, -1) - } else { - nb = impl.Ilaenv(1, "DORGQR", " ", n-1, n-1, n-1, -1) - } - lworkopt := max(1, n-1) * nb - if lwork == -1 { - work[0] = float64(lworkopt) - return - } - - switch { - case len(a) < (n-1)*lda+n: - panic(shortA) - case len(tau) < n-1: - panic(shortTau) - } - - if uplo == blas.Upper { - // Q was determined by a call to Dsytrd with uplo == blas.Upper. - // Shift the vectors which define the elementary reflectors one column - // to the left, and set the last row and column of Q to those of the unit - // matrix. - for j := 0; j < n-1; j++ { - for i := 0; i < j; i++ { - a[i*lda+j] = a[i*lda+j+1] - } - a[(n-1)*lda+j] = 0 - } - for i := 0; i < n-1; i++ { - a[i*lda+n-1] = 0 - } - a[(n-1)*lda+n-1] = 1 - - // Generate Q[0:n-1, 0:n-1]. - impl.Dorgql(n-1, n-1, n-1, a, lda, tau, work, lwork) - } else { - // Q was determined by a call to Dsytrd with uplo == blas.Upper. - // Shift the vectors which define the elementary reflectors one column - // to the right, and set the first row and column of Q to those of the unit - // matrix. - for j := n - 1; j > 0; j-- { - a[j] = 0 - for i := j + 1; i < n; i++ { - a[i*lda+j] = a[i*lda+j-1] - } - } - a[0] = 1 - for i := 1; i < n; i++ { - a[i*lda] = 0 - } - if n > 1 { - // Generate Q[1:n, 1:n]. - impl.Dorgqr(n-1, n-1, n-1, a[lda+1:], lda, tau, work, lwork) - } - } - work[0] = float64(lworkopt) -} diff --git a/vendor/gonum.org/v1/gonum/lapack/gonum/dorm2r.go b/vendor/gonum.org/v1/gonum/lapack/gonum/dorm2r.go deleted file mode 100644 index 4b0bd83cc3..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/gonum/dorm2r.go +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright ©2015 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import "gonum.org/v1/gonum/blas" - -// Dorm2r multiplies a general matrix C by an orthogonal matrix from a QR factorization -// determined by Dgeqrf. -// C = Q * C if side == blas.Left and trans == blas.NoTrans -// C = Q^T * C if side == blas.Left and trans == blas.Trans -// C = C * Q if side == blas.Right and trans == blas.NoTrans -// C = C * Q^T if side == blas.Right and trans == blas.Trans -// If side == blas.Left, a is a matrix of size m×k, and if side == blas.Right -// a is of size n×k. -// -// tau contains the Householder factors and is of length at least k and this function -// will panic otherwise. -// -// work is temporary storage of length at least n if side == blas.Left -// and at least m if side == blas.Right and this function will panic otherwise. -// -// Dorm2r is an internal routine. It is exported for testing purposes. -func (impl Implementation) Dorm2r(side blas.Side, trans blas.Transpose, m, n, k int, a []float64, lda int, tau, c []float64, ldc int, work []float64) { - left := side == blas.Left - switch { - case !left && side != blas.Right: - panic(badSide) - case trans != blas.Trans && trans != blas.NoTrans: - panic(badTrans) - case m < 0: - panic(mLT0) - case n < 0: - panic(nLT0) - case k < 0: - panic(kLT0) - case left && k > m: - panic(kGTM) - case !left && k > n: - panic(kGTN) - case lda < max(1, k): - panic(badLdA) - case ldc < max(1, n): - panic(badLdC) - } - - // Quick return if possible. - if m == 0 || n == 0 || k == 0 { - return - } - - switch { - case left && len(a) < (m-1)*lda+k: - panic(shortA) - case !left && len(a) < (n-1)*lda+k: - panic(shortA) - case len(c) < (m-1)*ldc+n: - panic(shortC) - case len(tau) < k: - panic(shortTau) - case left && len(work) < n: - panic(shortWork) - case !left && len(work) < m: - panic(shortWork) - } - - if left { - if trans == blas.NoTrans { - for i := k - 1; i >= 0; i-- { - aii := a[i*lda+i] - a[i*lda+i] = 1 - impl.Dlarf(side, m-i, n, a[i*lda+i:], lda, tau[i], c[i*ldc:], ldc, work) - a[i*lda+i] = aii - } - return - } - for i := 0; i < k; i++ { - aii := a[i*lda+i] - a[i*lda+i] = 1 - impl.Dlarf(side, m-i, n, a[i*lda+i:], lda, tau[i], c[i*ldc:], ldc, work) - a[i*lda+i] = aii - } - return - } - if trans == blas.NoTrans { - for i := 0; i < k; i++ { - aii := a[i*lda+i] - a[i*lda+i] = 1 - impl.Dlarf(side, m, n-i, a[i*lda+i:], lda, tau[i], c[i:], ldc, work) - a[i*lda+i] = aii - } - return - } - for i := k - 1; i >= 0; i-- { - aii := a[i*lda+i] - a[i*lda+i] = 1 - impl.Dlarf(side, m, n-i, a[i*lda+i:], lda, tau[i], c[i:], ldc, work) - a[i*lda+i] = aii - } -} diff --git a/vendor/gonum.org/v1/gonum/lapack/gonum/dormbr.go b/vendor/gonum.org/v1/gonum/lapack/gonum/dormbr.go deleted file mode 100644 index 026dc04127..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/gonum/dormbr.go +++ /dev/null @@ -1,178 +0,0 @@ -// Copyright ©2015 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import ( - "gonum.org/v1/gonum/blas" - "gonum.org/v1/gonum/lapack" -) - -// Dormbr applies a multiplicative update to the matrix C based on a -// decomposition computed by Dgebrd. -// -// Dormbr overwrites the m×n matrix C with -// Q * C if vect == lapack.ApplyQ, side == blas.Left, and trans == blas.NoTrans -// C * Q if vect == lapack.ApplyQ, side == blas.Right, and trans == blas.NoTrans -// Q^T * C if vect == lapack.ApplyQ, side == blas.Left, and trans == blas.Trans -// C * Q^T if vect == lapack.ApplyQ, side == blas.Right, and trans == blas.Trans -// -// P * C if vect == lapack.ApplyP, side == blas.Left, and trans == blas.NoTrans -// C * P if vect == lapack.ApplyP, side == blas.Right, and trans == blas.NoTrans -// P^T * C if vect == lapack.ApplyP, side == blas.Left, and trans == blas.Trans -// C * P^T if vect == lapack.ApplyP, side == blas.Right, and trans == blas.Trans -// where P and Q are the orthogonal matrices determined by Dgebrd when reducing -// a matrix A to bidiagonal form: A = Q * B * P^T. See Dgebrd for the -// definitions of Q and P. -// -// If vect == lapack.ApplyQ, A is assumed to have been an nq×k matrix, while if -// vect == lapack.ApplyP, A is assumed to have been a k×nq matrix. nq = m if -// side == blas.Left, while nq = n if side == blas.Right. -// -// tau must have length min(nq,k), and Dormbr will panic otherwise. tau contains -// the elementary reflectors to construct Q or P depending on the value of -// vect. -// -// work must have length at least max(1,lwork), and lwork must be either -1 or -// at least max(1,n) if side == blas.Left, and at least max(1,m) if side == -// blas.Right. For optimum performance lwork should be at least n*nb if side == -// blas.Left, and at least m*nb if side == blas.Right, where nb is the optimal -// block size. On return, work[0] will contain the optimal value of lwork. -// -// If lwork == -1, the function only calculates the optimal value of lwork and -// returns it in work[0]. -// -// Dormbr is an internal routine. It is exported for testing purposes. -func (impl Implementation) Dormbr(vect lapack.ApplyOrtho, side blas.Side, trans blas.Transpose, m, n, k int, a []float64, lda int, tau, c []float64, ldc int, work []float64, lwork int) { - nq := n - nw := m - if side == blas.Left { - nq = m - nw = n - } - applyQ := vect == lapack.ApplyQ - switch { - case !applyQ && vect != lapack.ApplyP: - panic(badApplyOrtho) - case side != blas.Left && side != blas.Right: - panic(badSide) - case trans != blas.NoTrans && trans != blas.Trans: - panic(badTrans) - case m < 0: - panic(mLT0) - case n < 0: - panic(nLT0) - case k < 0: - panic(kLT0) - case applyQ && lda < max(1, min(nq, k)): - panic(badLdA) - case !applyQ && lda < max(1, nq): - panic(badLdA) - case ldc < max(1, n): - panic(badLdC) - case lwork < max(1, nw) && lwork != -1: - panic(badLWork) - case len(work) < max(1, lwork): - panic(shortWork) - } - - // Quick return if possible. - if m == 0 || n == 0 { - work[0] = 1 - return - } - - // The current implementation does not use opts, but a future change may - // use these options so construct them. - var opts string - if side == blas.Left { - opts = "L" - } else { - opts = "R" - } - if trans == blas.Trans { - opts += "T" - } else { - opts += "N" - } - var nb int - if applyQ { - if side == blas.Left { - nb = impl.Ilaenv(1, "DORMQR", opts, m-1, n, m-1, -1) - } else { - nb = impl.Ilaenv(1, "DORMQR", opts, m, n-1, n-1, -1) - } - } else { - if side == blas.Left { - nb = impl.Ilaenv(1, "DORMLQ", opts, m-1, n, m-1, -1) - } else { - nb = impl.Ilaenv(1, "DORMLQ", opts, m, n-1, n-1, -1) - } - } - lworkopt := max(1, nw) * nb - if lwork == -1 { - work[0] = float64(lworkopt) - return - } - - minnqk := min(nq, k) - switch { - case applyQ && len(a) < (nq-1)*lda+minnqk: - panic(shortA) - case !applyQ && len(a) < (minnqk-1)*lda+nq: - panic(shortA) - case len(tau) < minnqk: - panic(shortTau) - case len(c) < (m-1)*ldc+n: - panic(shortC) - } - - if applyQ { - // Change the operation to get Q depending on the size of the initial - // matrix to Dgebrd. The size matters due to the storage location of - // the off-diagonal elements. - if nq >= k { - impl.Dormqr(side, trans, m, n, k, a, lda, tau[:k], c, ldc, work, lwork) - } else if nq > 1 { - mi := m - ni := n - 1 - i1 := 0 - i2 := 1 - if side == blas.Left { - mi = m - 1 - ni = n - i1 = 1 - i2 = 0 - } - impl.Dormqr(side, trans, mi, ni, nq-1, a[1*lda:], lda, tau[:nq-1], c[i1*ldc+i2:], ldc, work, lwork) - } - work[0] = float64(lworkopt) - return - } - - transt := blas.Trans - if trans == blas.Trans { - transt = blas.NoTrans - } - - // Change the operation to get P depending on the size of the initial - // matrix to Dgebrd. The size matters due to the storage location of - // the off-diagonal elements. - if nq > k { - impl.Dormlq(side, transt, m, n, k, a, lda, tau, c, ldc, work, lwork) - } else if nq > 1 { - mi := m - ni := n - 1 - i1 := 0 - i2 := 1 - if side == blas.Left { - mi = m - 1 - ni = n - i1 = 1 - i2 = 0 - } - impl.Dormlq(side, transt, mi, ni, nq-1, a[1:], lda, tau, c[i1*ldc+i2:], ldc, work, lwork) - } - work[0] = float64(lworkopt) -} diff --git a/vendor/gonum.org/v1/gonum/lapack/gonum/dormhr.go b/vendor/gonum.org/v1/gonum/lapack/gonum/dormhr.go deleted file mode 100644 index c00f440590..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/gonum/dormhr.go +++ /dev/null @@ -1,129 +0,0 @@ -// Copyright ©2016 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import "gonum.org/v1/gonum/blas" - -// Dormhr multiplies an m×n general matrix C with an nq×nq orthogonal matrix Q -// Q * C, if side == blas.Left and trans == blas.NoTrans, -// Q^T * C, if side == blas.Left and trans == blas.Trans, -// C * Q, if side == blas.Right and trans == blas.NoTrans, -// C * Q^T, if side == blas.Right and trans == blas.Trans, -// where nq == m if side == blas.Left and nq == n if side == blas.Right. -// -// Q is defined implicitly as the product of ihi-ilo elementary reflectors, as -// returned by Dgehrd: -// Q = H_{ilo} H_{ilo+1} ... H_{ihi-1}. -// Q is equal to the identity matrix except in the submatrix -// Q[ilo+1:ihi+1,ilo+1:ihi+1]. -// -// ilo and ihi must have the same values as in the previous call of Dgehrd. It -// must hold that -// 0 <= ilo <= ihi < m, if m > 0 and side == blas.Left, -// ilo = 0 and ihi = -1, if m = 0 and side == blas.Left, -// 0 <= ilo <= ihi < n, if n > 0 and side == blas.Right, -// ilo = 0 and ihi = -1, if n = 0 and side == blas.Right. -// -// a and lda represent an m×m matrix if side == blas.Left and an n×n matrix if -// side == blas.Right. The matrix contains vectors which define the elementary -// reflectors, as returned by Dgehrd. -// -// tau contains the scalar factors of the elementary reflectors, as returned by -// Dgehrd. tau must have length m-1 if side == blas.Left and n-1 if side == -// blas.Right. -// -// c and ldc represent the m×n matrix C. On return, c is overwritten by the -// product with Q. -// -// work must have length at least max(1,lwork), and lwork must be at least -// max(1,n), if side == blas.Left, and max(1,m), if side == blas.Right. For -// optimum performance lwork should be at least n*nb if side == blas.Left and -// m*nb if side == blas.Right, where nb is the optimal block size. On return, -// work[0] will contain the optimal value of lwork. -// -// If lwork == -1, instead of performing Dormhr, only the optimal value of lwork -// will be stored in work[0]. -// -// If any requirement on input sizes is not met, Dormhr will panic. -// -// Dormhr is an internal routine. It is exported for testing purposes. -func (impl Implementation) Dormhr(side blas.Side, trans blas.Transpose, m, n, ilo, ihi int, a []float64, lda int, tau, c []float64, ldc int, work []float64, lwork int) { - nq := n // The order of Q. - nw := m // The minimum length of work. - if side == blas.Left { - nq = m - nw = n - } - switch { - case side != blas.Left && side != blas.Right: - panic(badSide) - case trans != blas.NoTrans && trans != blas.Trans: - panic(badTrans) - case m < 0: - panic(mLT0) - case n < 0: - panic(nLT0) - case ilo < 0 || max(1, nq) <= ilo: - panic(badIlo) - case ihi < min(ilo, nq-1) || nq <= ihi: - panic(badIhi) - case lda < max(1, nq): - panic(badLdA) - case lwork < max(1, nw) && lwork != -1: - panic(badLWork) - case len(work) < max(1, lwork): - panic(shortWork) - } - - // Quick return if possible. - if m == 0 || n == 0 { - work[0] = 1 - return - } - - nh := ihi - ilo - var nb int - if side == blas.Left { - opts := "LN" - if trans == blas.Trans { - opts = "LT" - } - nb = impl.Ilaenv(1, "DORMQR", opts, nh, n, nh, -1) - } else { - opts := "RN" - if trans == blas.Trans { - opts = "RT" - } - nb = impl.Ilaenv(1, "DORMQR", opts, m, nh, nh, -1) - } - lwkopt := max(1, nw) * nb - if lwork == -1 { - work[0] = float64(lwkopt) - return - } - - if nh == 0 { - work[0] = 1 - return - } - - switch { - case len(a) < (nq-1)*lda+nq: - panic(shortA) - case len(c) < (m-1)*ldc+n: - panic(shortC) - case len(tau) != nq-1: - panic(badLenTau) - } - - if side == blas.Left { - impl.Dormqr(side, trans, nh, n, nh, a[(ilo+1)*lda+ilo:], lda, - tau[ilo:ihi], c[(ilo+1)*ldc:], ldc, work, lwork) - } else { - impl.Dormqr(side, trans, m, nh, nh, a[(ilo+1)*lda+ilo:], lda, - tau[ilo:ihi], c[ilo+1:], ldc, work, lwork) - } - work[0] = float64(lwkopt) -} diff --git a/vendor/gonum.org/v1/gonum/lapack/gonum/dorml2.go b/vendor/gonum.org/v1/gonum/lapack/gonum/dorml2.go deleted file mode 100644 index 25aa83ac10..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/gonum/dorml2.go +++ /dev/null @@ -1,102 +0,0 @@ -// Copyright ©2015 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import "gonum.org/v1/gonum/blas" - -// Dorml2 multiplies a general matrix C by an orthogonal matrix from an LQ factorization -// determined by Dgelqf. -// C = Q * C if side == blas.Left and trans == blas.NoTrans -// C = Q^T * C if side == blas.Left and trans == blas.Trans -// C = C * Q if side == blas.Right and trans == blas.NoTrans -// C = C * Q^T if side == blas.Right and trans == blas.Trans -// If side == blas.Left, a is a matrix of side k×m, and if side == blas.Right -// a is of size k×n. -// -// tau contains the Householder factors and is of length at least k and this function will -// panic otherwise. -// -// work is temporary storage of length at least n if side == blas.Left -// and at least m if side == blas.Right and this function will panic otherwise. -// -// Dorml2 is an internal routine. It is exported for testing purposes. -func (impl Implementation) Dorml2(side blas.Side, trans blas.Transpose, m, n, k int, a []float64, lda int, tau, c []float64, ldc int, work []float64) { - left := side == blas.Left - switch { - case !left && side != blas.Right: - panic(badSide) - case trans != blas.Trans && trans != blas.NoTrans: - panic(badTrans) - case m < 0: - panic(mLT0) - case n < 0: - panic(nLT0) - case k < 0: - panic(kLT0) - case left && k > m: - panic(kGTM) - case !left && k > n: - panic(kGTN) - case left && lda < max(1, m): - panic(badLdA) - case !left && lda < max(1, n): - panic(badLdA) - } - - // Quick return if possible. - if m == 0 || n == 0 || k == 0 { - return - } - - switch { - case left && len(a) < (k-1)*lda+m: - panic(shortA) - case !left && len(a) < (k-1)*lda+n: - panic(shortA) - case len(tau) < k: - panic(shortTau) - case len(c) < (m-1)*ldc+n: - panic(shortC) - case left && len(work) < n: - panic(shortWork) - case !left && len(work) < m: - panic(shortWork) - } - - notrans := trans == blas.NoTrans - switch { - case left && notrans: - for i := 0; i < k; i++ { - aii := a[i*lda+i] - a[i*lda+i] = 1 - impl.Dlarf(side, m-i, n, a[i*lda+i:], 1, tau[i], c[i*ldc:], ldc, work) - a[i*lda+i] = aii - } - - case left && !notrans: - for i := k - 1; i >= 0; i-- { - aii := a[i*lda+i] - a[i*lda+i] = 1 - impl.Dlarf(side, m-i, n, a[i*lda+i:], 1, tau[i], c[i*ldc:], ldc, work) - a[i*lda+i] = aii - } - - case !left && notrans: - for i := k - 1; i >= 0; i-- { - aii := a[i*lda+i] - a[i*lda+i] = 1 - impl.Dlarf(side, m, n-i, a[i*lda+i:], 1, tau[i], c[i:], ldc, work) - a[i*lda+i] = aii - } - - case !left && !notrans: - for i := 0; i < k; i++ { - aii := a[i*lda+i] - a[i*lda+i] = 1 - impl.Dlarf(side, m, n-i, a[i*lda+i:], 1, tau[i], c[i:], ldc, work) - a[i*lda+i] = aii - } - } -} diff --git a/vendor/gonum.org/v1/gonum/lapack/gonum/dormlq.go b/vendor/gonum.org/v1/gonum/lapack/gonum/dormlq.go deleted file mode 100644 index 6fcfc2fb19..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/gonum/dormlq.go +++ /dev/null @@ -1,174 +0,0 @@ -// Copyright ©2015 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import ( - "gonum.org/v1/gonum/blas" - "gonum.org/v1/gonum/lapack" -) - -// Dormlq multiplies the matrix C by the orthogonal matrix Q defined by the -// slices a and tau. A and tau are as returned from Dgelqf. -// C = Q * C if side == blas.Left and trans == blas.NoTrans -// C = Q^T * C if side == blas.Left and trans == blas.Trans -// C = C * Q if side == blas.Right and trans == blas.NoTrans -// C = C * Q^T if side == blas.Right and trans == blas.Trans -// If side == blas.Left, A is a matrix of side k×m, and if side == blas.Right -// A is of size k×n. This uses a blocked algorithm. -// -// work is temporary storage, and lwork specifies the usable memory length. -// At minimum, lwork >= m if side == blas.Left and lwork >= n if side == blas.Right, -// and this function will panic otherwise. -// Dormlq uses a block algorithm, but the block size is limited -// by the temporary space available. If lwork == -1, instead of performing Dormlq, -// the optimal work length will be stored into work[0]. -// -// tau contains the Householder scales and must have length at least k, and -// this function will panic otherwise. -func (impl Implementation) Dormlq(side blas.Side, trans blas.Transpose, m, n, k int, a []float64, lda int, tau, c []float64, ldc int, work []float64, lwork int) { - left := side == blas.Left - nw := m - if left { - nw = n - } - switch { - case !left && side != blas.Right: - panic(badSide) - case trans != blas.Trans && trans != blas.NoTrans: - panic(badTrans) - case m < 0: - panic(mLT0) - case n < 0: - panic(nLT0) - case k < 0: - panic(kLT0) - case left && k > m: - panic(kGTM) - case !left && k > n: - panic(kGTN) - case left && lda < max(1, m): - panic(badLdA) - case !left && lda < max(1, n): - panic(badLdA) - case lwork < max(1, nw) && lwork != -1: - panic(badLWork) - case len(work) < max(1, lwork): - panic(shortWork) - } - - // Quick return if possible. - if m == 0 || n == 0 || k == 0 { - work[0] = 1 - return - } - - const ( - nbmax = 64 - ldt = nbmax - tsize = nbmax * ldt - ) - opts := string(side) + string(trans) - nb := min(nbmax, impl.Ilaenv(1, "DORMLQ", opts, m, n, k, -1)) - lworkopt := max(1, nw)*nb + tsize - if lwork == -1 { - work[0] = float64(lworkopt) - return - } - - switch { - case left && len(a) < (k-1)*lda+m: - panic(shortA) - case !left && len(a) < (k-1)*lda+n: - panic(shortA) - case len(tau) < k: - panic(shortTau) - case len(c) < (m-1)*ldc+n: - panic(shortC) - } - - nbmin := 2 - if 1 < nb && nb < k { - iws := nw*nb + tsize - if lwork < iws { - nb = (lwork - tsize) / nw - nbmin = max(2, impl.Ilaenv(2, "DORMLQ", opts, m, n, k, -1)) - } - } - if nb < nbmin || k <= nb { - // Call unblocked code. - impl.Dorml2(side, trans, m, n, k, a, lda, tau, c, ldc, work) - work[0] = float64(lworkopt) - return - } - - t := work[:tsize] - wrk := work[tsize:] - ldwrk := nb - - notrans := trans == blas.NoTrans - transt := blas.NoTrans - if notrans { - transt = blas.Trans - } - - switch { - case left && notrans: - for i := 0; i < k; i += nb { - ib := min(nb, k-i) - impl.Dlarft(lapack.Forward, lapack.RowWise, m-i, ib, - a[i*lda+i:], lda, - tau[i:], - t, ldt) - impl.Dlarfb(side, transt, lapack.Forward, lapack.RowWise, m-i, n, ib, - a[i*lda+i:], lda, - t, ldt, - c[i*ldc:], ldc, - wrk, ldwrk) - } - - case left && !notrans: - for i := ((k - 1) / nb) * nb; i >= 0; i -= nb { - ib := min(nb, k-i) - impl.Dlarft(lapack.Forward, lapack.RowWise, m-i, ib, - a[i*lda+i:], lda, - tau[i:], - t, ldt) - impl.Dlarfb(side, transt, lapack.Forward, lapack.RowWise, m-i, n, ib, - a[i*lda+i:], lda, - t, ldt, - c[i*ldc:], ldc, - wrk, ldwrk) - } - - case !left && notrans: - for i := ((k - 1) / nb) * nb; i >= 0; i -= nb { - ib := min(nb, k-i) - impl.Dlarft(lapack.Forward, lapack.RowWise, n-i, ib, - a[i*lda+i:], lda, - tau[i:], - t, ldt) - impl.Dlarfb(side, transt, lapack.Forward, lapack.RowWise, m, n-i, ib, - a[i*lda+i:], lda, - t, ldt, - c[i:], ldc, - wrk, ldwrk) - } - - case !left && !notrans: - for i := 0; i < k; i += nb { - ib := min(nb, k-i) - impl.Dlarft(lapack.Forward, lapack.RowWise, n-i, ib, - a[i*lda+i:], lda, - tau[i:], - t, ldt) - impl.Dlarfb(side, transt, lapack.Forward, lapack.RowWise, m, n-i, ib, - a[i*lda+i:], lda, - t, ldt, - c[i:], ldc, - wrk, ldwrk) - } - } - work[0] = float64(lworkopt) -} diff --git a/vendor/gonum.org/v1/gonum/lapack/gonum/dormqr.go b/vendor/gonum.org/v1/gonum/lapack/gonum/dormqr.go deleted file mode 100644 index 8ae4508654..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/gonum/dormqr.go +++ /dev/null @@ -1,177 +0,0 @@ -// Copyright ©2015 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import ( - "gonum.org/v1/gonum/blas" - "gonum.org/v1/gonum/lapack" -) - -// Dormqr multiplies an m×n matrix C by an orthogonal matrix Q as -// C = Q * C, if side == blas.Left and trans == blas.NoTrans, -// C = Q^T * C, if side == blas.Left and trans == blas.Trans, -// C = C * Q, if side == blas.Right and trans == blas.NoTrans, -// C = C * Q^T, if side == blas.Right and trans == blas.Trans, -// where Q is defined as the product of k elementary reflectors -// Q = H_0 * H_1 * ... * H_{k-1}. -// -// If side == blas.Left, A is an m×k matrix and 0 <= k <= m. -// If side == blas.Right, A is an n×k matrix and 0 <= k <= n. -// The ith column of A contains the vector which defines the elementary -// reflector H_i and tau[i] contains its scalar factor. tau must have length k -// and Dormqr will panic otherwise. Dgeqrf returns A and tau in the required -// form. -// -// work must have length at least max(1,lwork), and lwork must be at least n if -// side == blas.Left and at least m if side == blas.Right, otherwise Dormqr will -// panic. -// -// work is temporary storage, and lwork specifies the usable memory length. At -// minimum, lwork >= m if side == blas.Left and lwork >= n if side == -// blas.Right, and this function will panic otherwise. Larger values of lwork -// will generally give better performance. On return, work[0] will contain the -// optimal value of lwork. -// -// If lwork is -1, instead of performing Dormqr, the optimal workspace size will -// be stored into work[0]. -func (impl Implementation) Dormqr(side blas.Side, trans blas.Transpose, m, n, k int, a []float64, lda int, tau, c []float64, ldc int, work []float64, lwork int) { - left := side == blas.Left - nq := n - nw := m - if left { - nq = m - nw = n - } - switch { - case !left && side != blas.Right: - panic(badSide) - case trans != blas.NoTrans && trans != blas.Trans: - panic(badTrans) - case m < 0: - panic(mLT0) - case n < 0: - panic(nLT0) - case k < 0: - panic(kLT0) - case left && k > m: - panic(kGTM) - case !left && k > n: - panic(kGTN) - case lda < max(1, k): - panic(badLdA) - case ldc < max(1, n): - panic(badLdC) - case lwork < max(1, nw) && lwork != -1: - panic(badLWork) - case len(work) < max(1, lwork): - panic(shortWork) - } - - // Quick return if possible. - if m == 0 || n == 0 || k == 0 { - work[0] = 1 - return - } - - const ( - nbmax = 64 - ldt = nbmax - tsize = nbmax * ldt - ) - opts := string(side) + string(trans) - nb := min(nbmax, impl.Ilaenv(1, "DORMQR", opts, m, n, k, -1)) - lworkopt := max(1, nw)*nb + tsize - if lwork == -1 { - work[0] = float64(lworkopt) - return - } - - switch { - case len(a) < (nq-1)*lda+k: - panic(shortA) - case len(tau) != k: - panic(badLenTau) - case len(c) < (m-1)*ldc+n: - panic(shortC) - } - - nbmin := 2 - if 1 < nb && nb < k { - if lwork < nw*nb+tsize { - nb = (lwork - tsize) / nw - nbmin = max(2, impl.Ilaenv(2, "DORMQR", opts, m, n, k, -1)) - } - } - - if nb < nbmin || k <= nb { - // Call unblocked code. - impl.Dorm2r(side, trans, m, n, k, a, lda, tau, c, ldc, work) - work[0] = float64(lworkopt) - return - } - - var ( - ldwork = nb - notrans = trans == blas.NoTrans - ) - switch { - case left && notrans: - for i := ((k - 1) / nb) * nb; i >= 0; i -= nb { - ib := min(nb, k-i) - impl.Dlarft(lapack.Forward, lapack.ColumnWise, m-i, ib, - a[i*lda+i:], lda, - tau[i:], - work[:tsize], ldt) - impl.Dlarfb(side, trans, lapack.Forward, lapack.ColumnWise, m-i, n, ib, - a[i*lda+i:], lda, - work[:tsize], ldt, - c[i*ldc:], ldc, - work[tsize:], ldwork) - } - - case left && !notrans: - for i := 0; i < k; i += nb { - ib := min(nb, k-i) - impl.Dlarft(lapack.Forward, lapack.ColumnWise, m-i, ib, - a[i*lda+i:], lda, - tau[i:], - work[:tsize], ldt) - impl.Dlarfb(side, trans, lapack.Forward, lapack.ColumnWise, m-i, n, ib, - a[i*lda+i:], lda, - work[:tsize], ldt, - c[i*ldc:], ldc, - work[tsize:], ldwork) - } - - case !left && notrans: - for i := 0; i < k; i += nb { - ib := min(nb, k-i) - impl.Dlarft(lapack.Forward, lapack.ColumnWise, n-i, ib, - a[i*lda+i:], lda, - tau[i:], - work[:tsize], ldt) - impl.Dlarfb(side, trans, lapack.Forward, lapack.ColumnWise, m, n-i, ib, - a[i*lda+i:], lda, - work[:tsize], ldt, - c[i:], ldc, - work[tsize:], ldwork) - } - - case !left && !notrans: - for i := ((k - 1) / nb) * nb; i >= 0; i -= nb { - ib := min(nb, k-i) - impl.Dlarft(lapack.Forward, lapack.ColumnWise, n-i, ib, - a[i*lda+i:], lda, - tau[i:], - work[:tsize], ldt) - impl.Dlarfb(side, trans, lapack.Forward, lapack.ColumnWise, m, n-i, ib, - a[i*lda+i:], lda, - work[:tsize], ldt, - c[i:], ldc, - work[tsize:], ldwork) - } - } - work[0] = float64(lworkopt) -} diff --git a/vendor/gonum.org/v1/gonum/lapack/gonum/dormr2.go b/vendor/gonum.org/v1/gonum/lapack/gonum/dormr2.go deleted file mode 100644 index bb03f32c76..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/gonum/dormr2.go +++ /dev/null @@ -1,103 +0,0 @@ -// Copyright ©2015 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import "gonum.org/v1/gonum/blas" - -// Dormr2 multiplies a general matrix C by an orthogonal matrix from a RQ factorization -// determined by Dgerqf. -// C = Q * C if side == blas.Left and trans == blas.NoTrans -// C = Q^T * C if side == blas.Left and trans == blas.Trans -// C = C * Q if side == blas.Right and trans == blas.NoTrans -// C = C * Q^T if side == blas.Right and trans == blas.Trans -// If side == blas.Left, a is a matrix of size k×m, and if side == blas.Right -// a is of size k×n. -// -// tau contains the Householder factors and is of length at least k and this function -// will panic otherwise. -// -// work is temporary storage of length at least n if side == blas.Left -// and at least m if side == blas.Right and this function will panic otherwise. -// -// Dormr2 is an internal routine. It is exported for testing purposes. -func (impl Implementation) Dormr2(side blas.Side, trans blas.Transpose, m, n, k int, a []float64, lda int, tau, c []float64, ldc int, work []float64) { - left := side == blas.Left - nq := n - nw := m - if left { - nq = m - nw = n - } - switch { - case !left && side != blas.Right: - panic(badSide) - case trans != blas.NoTrans && trans != blas.Trans: - panic(badTrans) - case m < 0: - panic(mLT0) - case n < 0: - panic(nLT0) - case k < 0: - panic(kLT0) - case left && k > m: - panic(kGTM) - case !left && k > n: - panic(kGTN) - case lda < max(1, nq): - panic(badLdA) - case ldc < max(1, n): - panic(badLdC) - } - - // Quick return if possible. - if m == 0 || n == 0 || k == 0 { - return - } - - switch { - case len(a) < (k-1)*lda+nq: - panic(shortA) - case len(tau) < k: - panic(shortTau) - case len(c) < (m-1)*ldc+n: - panic(shortC) - case len(work) < nw: - panic(shortWork) - } - - if left { - if trans == blas.NoTrans { - for i := k - 1; i >= 0; i-- { - aii := a[i*lda+(m-k+i)] - a[i*lda+(m-k+i)] = 1 - impl.Dlarf(side, m-k+i+1, n, a[i*lda:], 1, tau[i], c, ldc, work) - a[i*lda+(m-k+i)] = aii - } - return - } - for i := 0; i < k; i++ { - aii := a[i*lda+(m-k+i)] - a[i*lda+(m-k+i)] = 1 - impl.Dlarf(side, m-k+i+1, n, a[i*lda:], 1, tau[i], c, ldc, work) - a[i*lda+(m-k+i)] = aii - } - return - } - if trans == blas.NoTrans { - for i := 0; i < k; i++ { - aii := a[i*lda+(n-k+i)] - a[i*lda+(n-k+i)] = 1 - impl.Dlarf(side, m, n-k+i+1, a[i*lda:], 1, tau[i], c, ldc, work) - a[i*lda+(n-k+i)] = aii - } - return - } - for i := k - 1; i >= 0; i-- { - aii := a[i*lda+(n-k+i)] - a[i*lda+(n-k+i)] = 1 - impl.Dlarf(side, m, n-k+i+1, a[i*lda:], 1, tau[i], c, ldc, work) - a[i*lda+(n-k+i)] = aii - } -} diff --git a/vendor/gonum.org/v1/gonum/lapack/gonum/dpbtf2.go b/vendor/gonum.org/v1/gonum/lapack/gonum/dpbtf2.go deleted file mode 100644 index a5beb80bca..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/gonum/dpbtf2.go +++ /dev/null @@ -1,110 +0,0 @@ -// Copyright ©2017 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import ( - "math" - - "gonum.org/v1/gonum/blas" - "gonum.org/v1/gonum/blas/blas64" -) - -// Dpbtf2 computes the Cholesky factorization of a symmetric positive banded -// matrix ab. The matrix ab is n×n with kd diagonal bands. The Cholesky -// factorization computed is -// A = U^T * U if ul == blas.Upper -// A = L * L^T if ul == blas.Lower -// ul also specifies the storage of ab. If ul == blas.Upper, then -// ab is stored as an upper-triangular banded matrix with kd super-diagonals, -// and if ul == blas.Lower, ab is stored as a lower-triangular banded matrix -// with kd sub-diagonals. On exit, the banded matrix U or L is stored in-place -// into ab depending on the value of ul. Dpbtf2 returns whether the factorization -// was successfully completed. -// -// The band storage scheme is illustrated below when n = 6, and kd = 2. -// The resulting Cholesky decomposition is stored in the same elements as the -// input band matrix (a11 becomes u11 or l11, etc.). -// -// ul = blas.Upper -// a11 a12 a13 -// a22 a23 a24 -// a33 a34 a35 -// a44 a45 a46 -// a55 a56 * -// a66 * * -// -// ul = blas.Lower -// * * a11 -// * a21 a22 -// a31 a32 a33 -// a42 a43 a44 -// a53 a54 a55 -// a64 a65 a66 -// -// Dpbtf2 is the unblocked version of the algorithm, see Dpbtrf for the blocked -// version. -// -// Dpbtf2 is an internal routine, exported for testing purposes. -func (Implementation) Dpbtf2(ul blas.Uplo, n, kd int, ab []float64, ldab int) (ok bool) { - switch { - case ul != blas.Upper && ul != blas.Lower: - panic(badUplo) - case n < 0: - panic(nLT0) - case kd < 0: - panic(kdLT0) - case ldab < kd+1: - panic(badLdA) - } - - if n == 0 { - return - } - - if len(ab) < (n-1)*ldab+kd { - panic(shortAB) - } - - bi := blas64.Implementation() - - kld := max(1, ldab-1) - if ul == blas.Upper { - for j := 0; j < n; j++ { - // Compute U(J,J) and test for non positive-definiteness. - ajj := ab[j*ldab] - if ajj <= 0 { - return false - } - ajj = math.Sqrt(ajj) - ab[j*ldab] = ajj - // Compute elements j+1:j+kn of row J and update the trailing submatrix - // within the band. - kn := min(kd, n-j-1) - if kn > 0 { - bi.Dscal(kn, 1/ajj, ab[j*ldab+1:], 1) - bi.Dsyr(blas.Upper, kn, -1, ab[j*ldab+1:], 1, ab[(j+1)*ldab:], kld) - } - } - return true - } - for j := 0; j < n; j++ { - // Compute L(J,J) and test for non positive-definiteness. - ajj := ab[j*ldab+kd] - if ajj <= 0 { - return false - } - ajj = math.Sqrt(ajj) - ab[j*ldab+kd] = ajj - - // Compute elements J+1:J+KN of column J and update the trailing submatrix - // within the band. - kn := min(kd, n-j-1) - if kn > 0 { - bi.Dscal(kn, 1/ajj, ab[(j+1)*ldab+kd-1:], kld) - bi.Dsyr(blas.Lower, kn, -1, ab[(j+1)*ldab+kd-1:], kld, ab[(j+1)*ldab+kd:], kld) - } - } - return true -} diff --git a/vendor/gonum.org/v1/gonum/lapack/gonum/dpocon.go b/vendor/gonum.org/v1/gonum/lapack/gonum/dpocon.go deleted file mode 100644 index 7af4c18728..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/gonum/dpocon.go +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright ©2015 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import ( - "math" - - "gonum.org/v1/gonum/blas" - "gonum.org/v1/gonum/blas/blas64" -) - -// Dpocon estimates the reciprocal of the condition number of a positive-definite -// matrix A given the Cholesky decomposition of A. The condition number computed -// is based on the 1-norm and the ∞-norm. -// -// anorm is the 1-norm and the ∞-norm of the original matrix A. -// -// work is a temporary data slice of length at least 3*n and Dpocon will panic otherwise. -// -// iwork is a temporary data slice of length at least n and Dpocon will panic otherwise. -func (impl Implementation) Dpocon(uplo blas.Uplo, n int, a []float64, lda int, anorm float64, work []float64, iwork []int) float64 { - switch { - case uplo != blas.Upper && uplo != blas.Lower: - panic(badUplo) - case n < 0: - panic(nLT0) - case lda < max(1, n): - panic(badLdA) - case anorm < 0: - panic(negANorm) - } - - // Quick return if possible. - if n == 0 { - return 1 - } - - switch { - case len(a) < (n-1)*lda+n: - panic(shortA) - case len(work) < 3*n: - panic(shortWork) - case len(iwork) < n: - panic(shortIWork) - } - - if anorm == 0 { - return 0 - } - - bi := blas64.Implementation() - - var ( - smlnum = dlamchS - rcond float64 - sl, su float64 - normin bool - ainvnm float64 - kase int - isave [3]int - ) - for { - ainvnm, kase = impl.Dlacn2(n, work[n:], work, iwork, ainvnm, kase, &isave) - if kase == 0 { - if ainvnm != 0 { - rcond = (1 / ainvnm) / anorm - } - return rcond - } - if uplo == blas.Upper { - sl = impl.Dlatrs(blas.Upper, blas.Trans, blas.NonUnit, normin, n, a, lda, work, work[2*n:]) - normin = true - su = impl.Dlatrs(blas.Upper, blas.NoTrans, blas.NonUnit, normin, n, a, lda, work, work[2*n:]) - } else { - sl = impl.Dlatrs(blas.Lower, blas.NoTrans, blas.NonUnit, normin, n, a, lda, work, work[2*n:]) - normin = true - su = impl.Dlatrs(blas.Lower, blas.Trans, blas.NonUnit, normin, n, a, lda, work, work[2*n:]) - } - scale := sl * su - if scale != 1 { - ix := bi.Idamax(n, work, 1) - if scale == 0 || scale < math.Abs(work[ix])*smlnum { - return rcond - } - impl.Drscl(n, scale, work, 1) - } - } -} diff --git a/vendor/gonum.org/v1/gonum/lapack/gonum/dpotf2.go b/vendor/gonum.org/v1/gonum/lapack/gonum/dpotf2.go deleted file mode 100644 index 5d3327c2d5..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/gonum/dpotf2.go +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright ©2015 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import ( - "math" - - "gonum.org/v1/gonum/blas" - "gonum.org/v1/gonum/blas/blas64" -) - -// Dpotf2 computes the Cholesky decomposition of the symmetric positive definite -// matrix a. If ul == blas.Upper, then a is stored as an upper-triangular matrix, -// and a = U^T U is stored in place into a. If ul == blas.Lower, then a = L L^T -// is computed and stored in-place into a. If a is not positive definite, false -// is returned. This is the unblocked version of the algorithm. -// -// Dpotf2 is an internal routine. It is exported for testing purposes. -func (Implementation) Dpotf2(ul blas.Uplo, n int, a []float64, lda int) (ok bool) { - switch { - case ul != blas.Upper && ul != blas.Lower: - panic(badUplo) - case n < 0: - panic(nLT0) - case lda < max(1, n): - panic(badLdA) - } - - // Quick return if possible. - if n == 0 { - return true - } - - if len(a) < (n-1)*lda+n { - panic(shortA) - } - - bi := blas64.Implementation() - - if ul == blas.Upper { - for j := 0; j < n; j++ { - ajj := a[j*lda+j] - if j != 0 { - ajj -= bi.Ddot(j, a[j:], lda, a[j:], lda) - } - if ajj <= 0 || math.IsNaN(ajj) { - a[j*lda+j] = ajj - return false - } - ajj = math.Sqrt(ajj) - a[j*lda+j] = ajj - if j < n-1 { - bi.Dgemv(blas.Trans, j, n-j-1, - -1, a[j+1:], lda, a[j:], lda, - 1, a[j*lda+j+1:], 1) - bi.Dscal(n-j-1, 1/ajj, a[j*lda+j+1:], 1) - } - } - return true - } - for j := 0; j < n; j++ { - ajj := a[j*lda+j] - if j != 0 { - ajj -= bi.Ddot(j, a[j*lda:], 1, a[j*lda:], 1) - } - if ajj <= 0 || math.IsNaN(ajj) { - a[j*lda+j] = ajj - return false - } - ajj = math.Sqrt(ajj) - a[j*lda+j] = ajj - if j < n-1 { - bi.Dgemv(blas.NoTrans, n-j-1, j, - -1, a[(j+1)*lda:], lda, a[j*lda:], 1, - 1, a[(j+1)*lda+j:], lda) - bi.Dscal(n-j-1, 1/ajj, a[(j+1)*lda+j:], lda) - } - } - return true -} diff --git a/vendor/gonum.org/v1/gonum/lapack/gonum/dpotrf.go b/vendor/gonum.org/v1/gonum/lapack/gonum/dpotrf.go deleted file mode 100644 index 21241687f8..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/gonum/dpotrf.go +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright ©2015 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import ( - "gonum.org/v1/gonum/blas" - "gonum.org/v1/gonum/blas/blas64" -) - -// Dpotrf computes the Cholesky decomposition of the symmetric positive definite -// matrix a. If ul == blas.Upper, then a is stored as an upper-triangular matrix, -// and a = U^T U is stored in place into a. If ul == blas.Lower, then a = L L^T -// is computed and stored in-place into a. If a is not positive definite, false -// is returned. This is the blocked version of the algorithm. -func (impl Implementation) Dpotrf(ul blas.Uplo, n int, a []float64, lda int) (ok bool) { - switch { - case ul != blas.Upper && ul != blas.Lower: - panic(badUplo) - case n < 0: - panic(nLT0) - case lda < max(1, n): - panic(badLdA) - } - - // Quick return if possible. - if n == 0 { - return true - } - - if len(a) < (n-1)*lda+n { - panic(shortA) - } - - nb := impl.Ilaenv(1, "DPOTRF", string(ul), n, -1, -1, -1) - if nb <= 1 || n <= nb { - return impl.Dpotf2(ul, n, a, lda) - } - bi := blas64.Implementation() - if ul == blas.Upper { - for j := 0; j < n; j += nb { - jb := min(nb, n-j) - bi.Dsyrk(blas.Upper, blas.Trans, jb, j, - -1, a[j:], lda, - 1, a[j*lda+j:], lda) - ok = impl.Dpotf2(blas.Upper, jb, a[j*lda+j:], lda) - if !ok { - return ok - } - if j+jb < n { - bi.Dgemm(blas.Trans, blas.NoTrans, jb, n-j-jb, j, - -1, a[j:], lda, a[j+jb:], lda, - 1, a[j*lda+j+jb:], lda) - bi.Dtrsm(blas.Left, blas.Upper, blas.Trans, blas.NonUnit, jb, n-j-jb, - 1, a[j*lda+j:], lda, - a[j*lda+j+jb:], lda) - } - } - return true - } - for j := 0; j < n; j += nb { - jb := min(nb, n-j) - bi.Dsyrk(blas.Lower, blas.NoTrans, jb, j, - -1, a[j*lda:], lda, - 1, a[j*lda+j:], lda) - ok := impl.Dpotf2(blas.Lower, jb, a[j*lda+j:], lda) - if !ok { - return ok - } - if j+jb < n { - bi.Dgemm(blas.NoTrans, blas.Trans, n-j-jb, jb, j, - -1, a[(j+jb)*lda:], lda, a[j*lda:], lda, - 1, a[(j+jb)*lda+j:], lda) - bi.Dtrsm(blas.Right, blas.Lower, blas.Trans, blas.NonUnit, n-j-jb, jb, - 1, a[j*lda+j:], lda, - a[(j+jb)*lda+j:], lda) - } - } - return true -} diff --git a/vendor/gonum.org/v1/gonum/lapack/gonum/dpotri.go b/vendor/gonum.org/v1/gonum/lapack/gonum/dpotri.go deleted file mode 100644 index 2394775c31..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/gonum/dpotri.go +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright ©2019 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import "gonum.org/v1/gonum/blas" - -// Dpotri computes the inverse of a real symmetric positive definite matrix A -// using its Cholesky factorization. -// -// On entry, a contains the triangular factor U or L from the Cholesky -// factorization A = U^T*U or A = L*L^T, as computed by Dpotrf. -// On return, a contains the upper or lower triangle of the (symmetric) -// inverse of A, overwriting the input factor U or L. -func (impl Implementation) Dpotri(uplo blas.Uplo, n int, a []float64, lda int) (ok bool) { - switch { - case uplo != blas.Upper && uplo != blas.Lower: - panic(badUplo) - case n < 0: - panic(nLT0) - case lda < max(1, n): - panic(badLdA) - } - - // Quick return if possible. - if n == 0 { - return true - } - - if len(a) < (n-1)*lda+n { - panic(shortA) - } - - // Invert the triangular Cholesky factor U or L. - ok = impl.Dtrtri(uplo, blas.NonUnit, n, a, lda) - if !ok { - return false - } - - // Form inv(U)*inv(U)^T or inv(L)^T*inv(L). - impl.Dlauum(uplo, n, a, lda) - return true -} diff --git a/vendor/gonum.org/v1/gonum/lapack/gonum/dpotrs.go b/vendor/gonum.org/v1/gonum/lapack/gonum/dpotrs.go deleted file mode 100644 index 689e0439c2..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/gonum/dpotrs.go +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright ©2018 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import ( - "gonum.org/v1/gonum/blas" - "gonum.org/v1/gonum/blas/blas64" -) - -// Dpotrs solves a system of n linear equations A*X = B where A is an n×n -// symmetric positive definite matrix and B is an n×nrhs matrix. The matrix A is -// represented by its Cholesky factorization -// A = U^T*U if uplo == blas.Upper -// A = L*L^T if uplo == blas.Lower -// as computed by Dpotrf. On entry, B contains the right-hand side matrix B, on -// return it contains the solution matrix X. -func (Implementation) Dpotrs(uplo blas.Uplo, n, nrhs int, a []float64, lda int, b []float64, ldb int) { - switch { - case uplo != blas.Upper && uplo != blas.Lower: - panic(badUplo) - case n < 0: - panic(nLT0) - case nrhs < 0: - panic(nrhsLT0) - case lda < max(1, n): - panic(badLdA) - case ldb < max(1, nrhs): - panic(badLdB) - } - - // Quick return if possible. - if n == 0 || nrhs == 0 { - return - } - - switch { - case len(a) < (n-1)*lda+n: - panic(shortA) - case len(b) < (n-1)*ldb+nrhs: - panic(shortB) - } - - bi := blas64.Implementation() - - if uplo == blas.Upper { - // Solve U^T * U * X = B where U is stored in the upper triangle of A. - - // Solve U^T * X = B, overwriting B with X. - bi.Dtrsm(blas.Left, blas.Upper, blas.Trans, blas.NonUnit, n, nrhs, 1, a, lda, b, ldb) - // Solve U * X = B, overwriting B with X. - bi.Dtrsm(blas.Left, blas.Upper, blas.NoTrans, blas.NonUnit, n, nrhs, 1, a, lda, b, ldb) - } else { - // Solve L * L^T * X = B where L is stored in the lower triangle of A. - - // Solve L * X = B, overwriting B with X. - bi.Dtrsm(blas.Left, blas.Lower, blas.NoTrans, blas.NonUnit, n, nrhs, 1, a, lda, b, ldb) - // Solve L^T * X = B, overwriting B with X. - bi.Dtrsm(blas.Left, blas.Lower, blas.Trans, blas.NonUnit, n, nrhs, 1, a, lda, b, ldb) - } -} diff --git a/vendor/gonum.org/v1/gonum/lapack/gonum/drscl.go b/vendor/gonum.org/v1/gonum/lapack/gonum/drscl.go deleted file mode 100644 index b2772dbc22..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/gonum/drscl.go +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright ©2015 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import ( - "math" - - "gonum.org/v1/gonum/blas/blas64" -) - -// Drscl multiplies the vector x by 1/a being careful to avoid overflow or -// underflow where possible. -// -// Drscl is an internal routine. It is exported for testing purposes. -func (impl Implementation) Drscl(n int, a float64, x []float64, incX int) { - switch { - case n < 0: - panic(nLT0) - case incX <= 0: - panic(badIncX) - } - - // Quick return if possible. - if n == 0 { - return - } - - if len(x) < 1+(n-1)*incX { - panic(shortX) - } - - bi := blas64.Implementation() - - cden := a - cnum := 1.0 - smlnum := dlamchS - bignum := 1 / smlnum - for { - cden1 := cden * smlnum - cnum1 := cnum / bignum - var mul float64 - var done bool - switch { - case cnum != 0 && math.Abs(cden1) > math.Abs(cnum): - mul = smlnum - done = false - cden = cden1 - case math.Abs(cnum1) > math.Abs(cden): - mul = bignum - done = false - cnum = cnum1 - default: - mul = cnum / cden - done = true - } - bi.Dscal(n, mul, x, incX) - if done { - break - } - } -} diff --git a/vendor/gonum.org/v1/gonum/lapack/gonum/dsteqr.go b/vendor/gonum.org/v1/gonum/lapack/gonum/dsteqr.go deleted file mode 100644 index d6c7861ab5..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/gonum/dsteqr.go +++ /dev/null @@ -1,376 +0,0 @@ -// Copyright ©2016 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import ( - "math" - - "gonum.org/v1/gonum/blas" - "gonum.org/v1/gonum/blas/blas64" - "gonum.org/v1/gonum/lapack" -) - -// Dsteqr computes the eigenvalues and optionally the eigenvectors of a symmetric -// tridiagonal matrix using the implicit QL or QR method. The eigenvectors of a -// full or band symmetric matrix can also be found if Dsytrd, Dsptrd, or Dsbtrd -// have been used to reduce this matrix to tridiagonal form. -// -// d, on entry, contains the diagonal elements of the tridiagonal matrix. On exit, -// d contains the eigenvalues in ascending order. d must have length n and -// Dsteqr will panic otherwise. -// -// e, on entry, contains the off-diagonal elements of the tridiagonal matrix on -// entry, and is overwritten during the call to Dsteqr. e must have length n-1 and -// Dsteqr will panic otherwise. -// -// z, on entry, contains the n×n orthogonal matrix used in the reduction to -// tridiagonal form if compz == lapack.EVOrig. On exit, if -// compz == lapack.EVOrig, z contains the orthonormal eigenvectors of the -// original symmetric matrix, and if compz == lapack.EVTridiag, z contains the -// orthonormal eigenvectors of the symmetric tridiagonal matrix. z is not used -// if compz == lapack.EVCompNone. -// -// work must have length at least max(1, 2*n-2) if the eigenvectors are computed, -// and Dsteqr will panic otherwise. -// -// Dsteqr is an internal routine. It is exported for testing purposes. -func (impl Implementation) Dsteqr(compz lapack.EVComp, n int, d, e, z []float64, ldz int, work []float64) (ok bool) { - switch { - case compz != lapack.EVCompNone && compz != lapack.EVTridiag && compz != lapack.EVOrig: - panic(badEVComp) - case n < 0: - panic(nLT0) - case ldz < 1, compz != lapack.EVCompNone && ldz < n: - panic(badLdZ) - } - - // Quick return if possible. - if n == 0 { - return true - } - - switch { - case len(d) < n: - panic(shortD) - case len(e) < n-1: - panic(shortE) - case compz != lapack.EVCompNone && len(z) < (n-1)*ldz+n: - panic(shortZ) - case compz != lapack.EVCompNone && len(work) < max(1, 2*n-2): - panic(shortWork) - } - - var icompz int - if compz == lapack.EVOrig { - icompz = 1 - } else if compz == lapack.EVTridiag { - icompz = 2 - } - - if n == 1 { - if icompz == 2 { - z[0] = 1 - } - return true - } - - bi := blas64.Implementation() - - eps := dlamchE - eps2 := eps * eps - safmin := dlamchS - safmax := 1 / safmin - ssfmax := math.Sqrt(safmax) / 3 - ssfmin := math.Sqrt(safmin) / eps2 - - // Compute the eigenvalues and eigenvectors of the tridiagonal matrix. - if icompz == 2 { - impl.Dlaset(blas.All, n, n, 0, 1, z, ldz) - } - const maxit = 30 - nmaxit := n * maxit - - jtot := 0 - - // Determine where the matrix splits and choose QL or QR iteration for each - // block, according to whether top or bottom diagonal element is smaller. - l1 := 0 - nm1 := n - 1 - - type scaletype int - const ( - down scaletype = iota + 1 - up - ) - var iscale scaletype - - for { - if l1 > n-1 { - // Order eigenvalues and eigenvectors. - if icompz == 0 { - impl.Dlasrt(lapack.SortIncreasing, n, d) - } else { - // TODO(btracey): Consider replacing this sort with a call to sort.Sort. - for ii := 1; ii < n; ii++ { - i := ii - 1 - k := i - p := d[i] - for j := ii; j < n; j++ { - if d[j] < p { - k = j - p = d[j] - } - } - if k != i { - d[k] = d[i] - d[i] = p - bi.Dswap(n, z[i:], ldz, z[k:], ldz) - } - } - } - return true - } - if l1 > 0 { - e[l1-1] = 0 - } - var m int - if l1 <= nm1 { - for m = l1; m < nm1; m++ { - test := math.Abs(e[m]) - if test == 0 { - break - } - if test <= (math.Sqrt(math.Abs(d[m]))*math.Sqrt(math.Abs(d[m+1])))*eps { - e[m] = 0 - break - } - } - } - l := l1 - lsv := l - lend := m - lendsv := lend - l1 = m + 1 - if lend == l { - continue - } - - // Scale submatrix in rows and columns L to Lend - anorm := impl.Dlanst(lapack.MaxAbs, lend-l+1, d[l:], e[l:]) - switch { - case anorm == 0: - continue - case anorm > ssfmax: - iscale = down - // Pretend that d and e are matrices with 1 column. - impl.Dlascl(lapack.General, 0, 0, anorm, ssfmax, lend-l+1, 1, d[l:], 1) - impl.Dlascl(lapack.General, 0, 0, anorm, ssfmax, lend-l, 1, e[l:], 1) - case anorm < ssfmin: - iscale = up - impl.Dlascl(lapack.General, 0, 0, anorm, ssfmin, lend-l+1, 1, d[l:], 1) - impl.Dlascl(lapack.General, 0, 0, anorm, ssfmin, lend-l, 1, e[l:], 1) - } - - // Choose between QL and QR. - if math.Abs(d[lend]) < math.Abs(d[l]) { - lend = lsv - l = lendsv - } - if lend > l { - // QL Iteration. Look for small subdiagonal element. - for { - if l != lend { - for m = l; m < lend; m++ { - v := math.Abs(e[m]) - if v*v <= (eps2*math.Abs(d[m]))*math.Abs(d[m+1])+safmin { - break - } - } - } else { - m = lend - } - if m < lend { - e[m] = 0 - } - p := d[l] - if m == l { - // Eigenvalue found. - l++ - if l > lend { - break - } - continue - } - - // If remaining matrix is 2×2, use Dlae2 to compute its eigensystem. - if m == l+1 { - if icompz > 0 { - d[l], d[l+1], work[l], work[n-1+l] = impl.Dlaev2(d[l], e[l], d[l+1]) - impl.Dlasr(blas.Right, lapack.Variable, lapack.Backward, - n, 2, work[l:], work[n-1+l:], z[l:], ldz) - } else { - d[l], d[l+1] = impl.Dlae2(d[l], e[l], d[l+1]) - } - e[l] = 0 - l += 2 - if l > lend { - break - } - continue - } - - if jtot == nmaxit { - break - } - jtot++ - - // Form shift - g := (d[l+1] - p) / (2 * e[l]) - r := impl.Dlapy2(g, 1) - g = d[m] - p + e[l]/(g+math.Copysign(r, g)) - s := 1.0 - c := 1.0 - p = 0.0 - - // Inner loop - for i := m - 1; i >= l; i-- { - f := s * e[i] - b := c * e[i] - c, s, r = impl.Dlartg(g, f) - if i != m-1 { - e[i+1] = r - } - g = d[i+1] - p - r = (d[i]-g)*s + 2*c*b - p = s * r - d[i+1] = g + p - g = c*r - b - - // If eigenvectors are desired, then save rotations. - if icompz > 0 { - work[i] = c - work[n-1+i] = -s - } - } - // If eigenvectors are desired, then apply saved rotations. - if icompz > 0 { - mm := m - l + 1 - impl.Dlasr(blas.Right, lapack.Variable, lapack.Backward, - n, mm, work[l:], work[n-1+l:], z[l:], ldz) - } - d[l] -= p - e[l] = g - } - } else { - // QR Iteration. - // Look for small superdiagonal element. - for { - if l != lend { - for m = l; m > lend; m-- { - v := math.Abs(e[m-1]) - if v*v <= (eps2*math.Abs(d[m])*math.Abs(d[m-1]) + safmin) { - break - } - } - } else { - m = lend - } - if m > lend { - e[m-1] = 0 - } - p := d[l] - if m == l { - // Eigenvalue found - l-- - if l < lend { - break - } - continue - } - - // If remaining matrix is 2×2, use Dlae2 to compute its eigenvalues. - if m == l-1 { - if icompz > 0 { - d[l-1], d[l], work[m], work[n-1+m] = impl.Dlaev2(d[l-1], e[l-1], d[l]) - impl.Dlasr(blas.Right, lapack.Variable, lapack.Forward, - n, 2, work[m:], work[n-1+m:], z[l-1:], ldz) - } else { - d[l-1], d[l] = impl.Dlae2(d[l-1], e[l-1], d[l]) - } - e[l-1] = 0 - l -= 2 - if l < lend { - break - } - continue - } - if jtot == nmaxit { - break - } - jtot++ - - // Form shift. - g := (d[l-1] - p) / (2 * e[l-1]) - r := impl.Dlapy2(g, 1) - g = d[m] - p + (e[l-1])/(g+math.Copysign(r, g)) - s := 1.0 - c := 1.0 - p = 0.0 - - // Inner loop. - for i := m; i < l; i++ { - f := s * e[i] - b := c * e[i] - c, s, r = impl.Dlartg(g, f) - if i != m { - e[i-1] = r - } - g = d[i] - p - r = (d[i+1]-g)*s + 2*c*b - p = s * r - d[i] = g + p - g = c*r - b - - // If eigenvectors are desired, then save rotations. - if icompz > 0 { - work[i] = c - work[n-1+i] = s - } - } - - // If eigenvectors are desired, then apply saved rotations. - if icompz > 0 { - mm := l - m + 1 - impl.Dlasr(blas.Right, lapack.Variable, lapack.Forward, - n, mm, work[m:], work[n-1+m:], z[m:], ldz) - } - d[l] -= p - e[l-1] = g - } - } - - // Undo scaling if necessary. - switch iscale { - case down: - // Pretend that d and e are matrices with 1 column. - impl.Dlascl(lapack.General, 0, 0, ssfmax, anorm, lendsv-lsv+1, 1, d[lsv:], 1) - impl.Dlascl(lapack.General, 0, 0, ssfmax, anorm, lendsv-lsv, 1, e[lsv:], 1) - case up: - impl.Dlascl(lapack.General, 0, 0, ssfmin, anorm, lendsv-lsv+1, 1, d[lsv:], 1) - impl.Dlascl(lapack.General, 0, 0, ssfmin, anorm, lendsv-lsv, 1, e[lsv:], 1) - } - - // Check for no convergence to an eigenvalue after a total of n*maxit iterations. - if jtot >= nmaxit { - break - } - } - for i := 0; i < n-1; i++ { - if e[i] != 0 { - return false - } - } - return true -} diff --git a/vendor/gonum.org/v1/gonum/lapack/gonum/dsterf.go b/vendor/gonum.org/v1/gonum/lapack/gonum/dsterf.go deleted file mode 100644 index dc1e178dfa..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/gonum/dsterf.go +++ /dev/null @@ -1,285 +0,0 @@ -// Copyright ©2016 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import ( - "math" - - "gonum.org/v1/gonum/lapack" -) - -// Dsterf computes all eigenvalues of a symmetric tridiagonal matrix using the -// Pal-Walker-Kahan variant of the QL or QR algorithm. -// -// d contains the diagonal elements of the tridiagonal matrix on entry, and -// contains the eigenvalues in ascending order on exit. d must have length at -// least n, or Dsterf will panic. -// -// e contains the off-diagonal elements of the tridiagonal matrix on entry, and is -// overwritten during the call to Dsterf. e must have length of at least n-1 or -// Dsterf will panic. -// -// Dsterf is an internal routine. It is exported for testing purposes. -func (impl Implementation) Dsterf(n int, d, e []float64) (ok bool) { - if n < 0 { - panic(nLT0) - } - - // Quick return if possible. - if n == 0 { - return true - } - - switch { - case len(d) < n: - panic(shortD) - case len(e) < n-1: - panic(shortE) - } - - if n == 1 { - return true - } - - const ( - none = 0 // The values are not scaled. - down = 1 // The values are scaled below ssfmax threshold. - up = 2 // The values are scaled below ssfmin threshold. - ) - - // Determine the unit roundoff for this environment. - eps := dlamchE - eps2 := eps * eps - safmin := dlamchS - safmax := 1 / safmin - ssfmax := math.Sqrt(safmax) / 3 - ssfmin := math.Sqrt(safmin) / eps2 - - // Compute the eigenvalues of the tridiagonal matrix. - maxit := 30 - nmaxit := n * maxit - jtot := 0 - - l1 := 0 - - for { - if l1 > n-1 { - impl.Dlasrt(lapack.SortIncreasing, n, d) - return true - } - if l1 > 0 { - e[l1-1] = 0 - } - var m int - for m = l1; m < n-1; m++ { - if math.Abs(e[m]) <= math.Sqrt(math.Abs(d[m]))*math.Sqrt(math.Abs(d[m+1]))*eps { - e[m] = 0 - break - } - } - - l := l1 - lsv := l - lend := m - lendsv := lend - l1 = m + 1 - if lend == 0 { - continue - } - - // Scale submatrix in rows and columns l to lend. - anorm := impl.Dlanst(lapack.MaxAbs, lend-l+1, d[l:], e[l:]) - iscale := none - if anorm == 0 { - continue - } - if anorm > ssfmax { - iscale = down - impl.Dlascl(lapack.General, 0, 0, anorm, ssfmax, lend-l+1, 1, d[l:], n) - impl.Dlascl(lapack.General, 0, 0, anorm, ssfmax, lend-l, 1, e[l:], n) - } else if anorm < ssfmin { - iscale = up - impl.Dlascl(lapack.General, 0, 0, anorm, ssfmin, lend-l+1, 1, d[l:], n) - impl.Dlascl(lapack.General, 0, 0, anorm, ssfmin, lend-l, 1, e[l:], n) - } - - el := e[l:lend] - for i, v := range el { - el[i] *= v - } - - // Choose between QL and QR iteration. - if math.Abs(d[lend]) < math.Abs(d[l]) { - lend = lsv - l = lendsv - } - if lend >= l { - // QL Iteration. - // Look for small sub-diagonal element. - for { - if l != lend { - for m = l; m < lend; m++ { - if math.Abs(e[m]) <= eps2*(math.Abs(d[m]*d[m+1])) { - break - } - } - } else { - m = lend - } - if m < lend { - e[m] = 0 - } - p := d[l] - if m == l { - // Eigenvalue found. - l++ - if l > lend { - break - } - continue - } - // If remaining matrix is 2 by 2, use Dlae2 to compute its eigenvalues. - if m == l+1 { - d[l], d[l+1] = impl.Dlae2(d[l], math.Sqrt(e[l]), d[l+1]) - e[l] = 0 - l += 2 - if l > lend { - break - } - continue - } - if jtot == nmaxit { - break - } - jtot++ - - // Form shift. - rte := math.Sqrt(e[l]) - sigma := (d[l+1] - p) / (2 * rte) - r := impl.Dlapy2(sigma, 1) - sigma = p - (rte / (sigma + math.Copysign(r, sigma))) - - c := 1.0 - s := 0.0 - gamma := d[m] - sigma - p = gamma * gamma - - // Inner loop. - for i := m - 1; i >= l; i-- { - bb := e[i] - r := p + bb - if i != m-1 { - e[i+1] = s * r - } - oldc := c - c = p / r - s = bb / r - oldgam := gamma - alpha := d[i] - gamma = c*(alpha-sigma) - s*oldgam - d[i+1] = oldgam + (alpha - gamma) - if c != 0 { - p = (gamma * gamma) / c - } else { - p = oldc * bb - } - } - e[l] = s * p - d[l] = sigma + gamma - } - } else { - for { - // QR Iteration. - // Look for small super-diagonal element. - for m = l; m > lend; m-- { - if math.Abs(e[m-1]) <= eps2*math.Abs(d[m]*d[m-1]) { - break - } - } - if m > lend { - e[m-1] = 0 - } - p := d[l] - if m == l { - // Eigenvalue found. - l-- - if l < lend { - break - } - continue - } - - // If remaining matrix is 2 by 2, use Dlae2 to compute its eigenvalues. - if m == l-1 { - d[l], d[l-1] = impl.Dlae2(d[l], math.Sqrt(e[l-1]), d[l-1]) - e[l-1] = 0 - l -= 2 - if l < lend { - break - } - continue - } - if jtot == nmaxit { - break - } - jtot++ - - // Form shift. - rte := math.Sqrt(e[l-1]) - sigma := (d[l-1] - p) / (2 * rte) - r := impl.Dlapy2(sigma, 1) - sigma = p - (rte / (sigma + math.Copysign(r, sigma))) - - c := 1.0 - s := 0.0 - gamma := d[m] - sigma - p = gamma * gamma - - // Inner loop. - for i := m; i < l; i++ { - bb := e[i] - r := p + bb - if i != m { - e[i-1] = s * r - } - oldc := c - c = p / r - s = bb / r - oldgam := gamma - alpha := d[i+1] - gamma = c*(alpha-sigma) - s*oldgam - d[i] = oldgam + alpha - gamma - if c != 0 { - p = (gamma * gamma) / c - } else { - p = oldc * bb - } - } - e[l-1] = s * p - d[l] = sigma + gamma - } - } - - // Undo scaling if necessary - switch iscale { - case down: - impl.Dlascl(lapack.General, 0, 0, ssfmax, anorm, lendsv-lsv+1, 1, d[lsv:], n) - case up: - impl.Dlascl(lapack.General, 0, 0, ssfmin, anorm, lendsv-lsv+1, 1, d[lsv:], n) - } - - // Check for no convergence to an eigenvalue after a total of n*maxit iterations. - if jtot >= nmaxit { - break - } - } - for _, v := range e[:n-1] { - if v != 0 { - return false - } - } - impl.Dlasrt(lapack.SortIncreasing, n, d) - return true -} diff --git a/vendor/gonum.org/v1/gonum/lapack/gonum/dsyev.go b/vendor/gonum.org/v1/gonum/lapack/gonum/dsyev.go deleted file mode 100644 index 5f57f3a5c9..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/gonum/dsyev.go +++ /dev/null @@ -1,130 +0,0 @@ -// Copyright ©2016 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import ( - "math" - - "gonum.org/v1/gonum/blas" - "gonum.org/v1/gonum/blas/blas64" - "gonum.org/v1/gonum/lapack" -) - -// Dsyev computes all eigenvalues and, optionally, the eigenvectors of a real -// symmetric matrix A. -// -// w contains the eigenvalues in ascending order upon return. w must have length -// at least n, and Dsyev will panic otherwise. -// -// On entry, a contains the elements of the symmetric matrix A in the triangular -// portion specified by uplo. If jobz == lapack.EVCompute, a contains the -// orthonormal eigenvectors of A on exit, otherwise jobz must be lapack.EVNone -// and on exit the specified triangular region is overwritten. -// -// work is temporary storage, and lwork specifies the usable memory length. At minimum, -// lwork >= 3*n-1, and Dsyev will panic otherwise. The amount of blocking is -// limited by the usable length. If lwork == -1, instead of computing Dsyev the -// optimal work length is stored into work[0]. -func (impl Implementation) Dsyev(jobz lapack.EVJob, uplo blas.Uplo, n int, a []float64, lda int, w, work []float64, lwork int) (ok bool) { - switch { - case jobz != lapack.EVNone && jobz != lapack.EVCompute: - panic(badEVJob) - case uplo != blas.Upper && uplo != blas.Lower: - panic(badUplo) - case n < 0: - panic(nLT0) - case lda < max(1, n): - panic(badLdA) - case lwork < max(1, 3*n-1) && lwork != -1: - panic(badLWork) - case len(work) < max(1, lwork): - panic(shortWork) - } - - // Quick return if possible. - if n == 0 { - return true - } - - var opts string - if uplo == blas.Upper { - opts = "U" - } else { - opts = "L" - } - nb := impl.Ilaenv(1, "DSYTRD", opts, n, -1, -1, -1) - lworkopt := max(1, (nb+2)*n) - if lwork == -1 { - work[0] = float64(lworkopt) - return - } - - switch { - case len(a) < (n-1)*lda+n: - panic(shortA) - case len(w) < n: - panic(shortW) - } - - if n == 1 { - w[0] = a[0] - work[0] = 2 - if jobz == lapack.EVCompute { - a[0] = 1 - } - return true - } - - safmin := dlamchS - eps := dlamchP - smlnum := safmin / eps - bignum := 1 / smlnum - rmin := math.Sqrt(smlnum) - rmax := math.Sqrt(bignum) - - // Scale matrix to allowable range, if necessary. - anrm := impl.Dlansy(lapack.MaxAbs, uplo, n, a, lda, work) - scaled := false - var sigma float64 - if anrm > 0 && anrm < rmin { - scaled = true - sigma = rmin / anrm - } else if anrm > rmax { - scaled = true - sigma = rmax / anrm - } - if scaled { - kind := lapack.LowerTri - if uplo == blas.Upper { - kind = lapack.UpperTri - } - impl.Dlascl(kind, 0, 0, 1, sigma, n, n, a, lda) - } - var inde int - indtau := inde + n - indwork := indtau + n - llwork := lwork - indwork - impl.Dsytrd(uplo, n, a, lda, w, work[inde:], work[indtau:], work[indwork:], llwork) - - // For eigenvalues only, call Dsterf. For eigenvectors, first call Dorgtr - // to generate the orthogonal matrix, then call Dsteqr. - if jobz == lapack.EVNone { - ok = impl.Dsterf(n, w, work[inde:]) - } else { - impl.Dorgtr(uplo, n, a, lda, work[indtau:], work[indwork:], llwork) - ok = impl.Dsteqr(lapack.EVComp(jobz), n, w, work[inde:], a, lda, work[indtau:]) - } - if !ok { - return false - } - - // If the matrix was scaled, then rescale eigenvalues appropriately. - if scaled { - bi := blas64.Implementation() - bi.Dscal(n, 1/sigma, w, 1) - } - work[0] = float64(lworkopt) - return true -} diff --git a/vendor/gonum.org/v1/gonum/lapack/gonum/dsytd2.go b/vendor/gonum.org/v1/gonum/lapack/gonum/dsytd2.go deleted file mode 100644 index 23cfd05773..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/gonum/dsytd2.go +++ /dev/null @@ -1,136 +0,0 @@ -// Copyright ©2016 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import ( - "gonum.org/v1/gonum/blas" - "gonum.org/v1/gonum/blas/blas64" -) - -// Dsytd2 reduces a symmetric n×n matrix A to symmetric tridiagonal form T by -// an orthogonal similarity transformation -// Q^T * A * Q = T -// On entry, the matrix is contained in the specified triangle of a. On exit, -// if uplo == blas.Upper, the diagonal and first super-diagonal of a are -// overwritten with the elements of T. The elements above the first super-diagonal -// are overwritten with the elementary reflectors that are used with -// the elements written to tau in order to construct Q. If uplo == blas.Lower, -// the elements are written in the lower triangular region. -// -// d must have length at least n. e and tau must have length at least n-1. Dsytd2 -// will panic if these sizes are not met. -// -// Q is represented as a product of elementary reflectors. -// If uplo == blas.Upper -// Q = H_{n-2} * ... * H_1 * H_0 -// and if uplo == blas.Lower -// Q = H_0 * H_1 * ... * H_{n-2} -// where -// H_i = I - tau * v * v^T -// where tau is stored in tau[i], and v is stored in a. -// -// If uplo == blas.Upper, v[0:i-1] is stored in A[0:i-1,i+1], v[i] = 1, and -// v[i+1:] = 0. The elements of a are -// [ d e v2 v3 v4] -// [ d e v3 v4] -// [ d e v4] -// [ d e] -// [ d] -// If uplo == blas.Lower, v[0:i+1] = 0, v[i+1] = 1, and v[i+2:] is stored in -// A[i+2:n,i]. -// The elements of a are -// [ d ] -// [ e d ] -// [v1 e d ] -// [v1 v2 e d ] -// [v1 v2 v3 e d] -// -// Dsytd2 is an internal routine. It is exported for testing purposes. -func (impl Implementation) Dsytd2(uplo blas.Uplo, n int, a []float64, lda int, d, e, tau []float64) { - switch { - case uplo != blas.Upper && uplo != blas.Lower: - panic(badUplo) - case n < 0: - panic(nLT0) - case lda < max(1, n): - panic(badLdA) - } - - // Quick return if possible. - if n == 0 { - return - } - - switch { - case len(a) < (n-1)*lda+n: - panic(shortA) - case len(d) < n: - panic(shortD) - case len(e) < n-1: - panic(shortE) - case len(tau) < n-1: - panic(shortTau) - } - - bi := blas64.Implementation() - - if uplo == blas.Upper { - // Reduce the upper triangle of A. - for i := n - 2; i >= 0; i-- { - // Generate elementary reflector H_i = I - tau * v * v^T to - // annihilate A[i:i-1, i+1]. - var taui float64 - a[i*lda+i+1], taui = impl.Dlarfg(i+1, a[i*lda+i+1], a[i+1:], lda) - e[i] = a[i*lda+i+1] - if taui != 0 { - // Apply H_i from both sides to A[0:i,0:i]. - a[i*lda+i+1] = 1 - - // Compute x := tau * A * v storing x in tau[0:i]. - bi.Dsymv(uplo, i+1, taui, a, lda, a[i+1:], lda, 0, tau, 1) - - // Compute w := x - 1/2 * tau * (x^T * v) * v. - alpha := -0.5 * taui * bi.Ddot(i+1, tau, 1, a[i+1:], lda) - bi.Daxpy(i+1, alpha, a[i+1:], lda, tau, 1) - - // Apply the transformation as a rank-2 update - // A = A - v * w^T - w * v^T. - bi.Dsyr2(uplo, i+1, -1, a[i+1:], lda, tau, 1, a, lda) - a[i*lda+i+1] = e[i] - } - d[i+1] = a[(i+1)*lda+i+1] - tau[i] = taui - } - d[0] = a[0] - return - } - // Reduce the lower triangle of A. - for i := 0; i < n-1; i++ { - // Generate elementary reflector H_i = I - tau * v * v^T to - // annihilate A[i+2:n, i]. - var taui float64 - a[(i+1)*lda+i], taui = impl.Dlarfg(n-i-1, a[(i+1)*lda+i], a[min(i+2, n-1)*lda+i:], lda) - e[i] = a[(i+1)*lda+i] - if taui != 0 { - // Apply H_i from both sides to A[i+1:n, i+1:n]. - a[(i+1)*lda+i] = 1 - - // Compute x := tau * A * v, storing y in tau[i:n-1]. - bi.Dsymv(uplo, n-i-1, taui, a[(i+1)*lda+i+1:], lda, a[(i+1)*lda+i:], lda, 0, tau[i:], 1) - - // Compute w := x - 1/2 * tau * (x^T * v) * v. - alpha := -0.5 * taui * bi.Ddot(n-i-1, tau[i:], 1, a[(i+1)*lda+i:], lda) - bi.Daxpy(n-i-1, alpha, a[(i+1)*lda+i:], lda, tau[i:], 1) - - // Apply the transformation as a rank-2 update - // A = A - v * w^T - w * v^T. - bi.Dsyr2(uplo, n-i-1, -1, a[(i+1)*lda+i:], lda, tau[i:], 1, a[(i+1)*lda+i+1:], lda) - a[(i+1)*lda+i] = e[i] - } - d[i] = a[i*lda+i] - tau[i] = taui - } - d[n-1] = a[(n-1)*lda+n-1] -} diff --git a/vendor/gonum.org/v1/gonum/lapack/gonum/dsytrd.go b/vendor/gonum.org/v1/gonum/lapack/gonum/dsytrd.go deleted file mode 100644 index df47568e92..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/gonum/dsytrd.go +++ /dev/null @@ -1,172 +0,0 @@ -// Copyright ©2016 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import ( - "gonum.org/v1/gonum/blas" - "gonum.org/v1/gonum/blas/blas64" -) - -// Dsytrd reduces a symmetric n×n matrix A to symmetric tridiagonal form by an -// orthogonal similarity transformation -// Q^T * A * Q = T -// where Q is an orthonormal matrix and T is symmetric and tridiagonal. -// -// On entry, a contains the elements of the input matrix in the triangle specified -// by uplo. On exit, the diagonal and sub/super-diagonal are overwritten by the -// corresponding elements of the tridiagonal matrix T. The remaining elements in -// the triangle, along with the array tau, contain the data to construct Q as -// the product of elementary reflectors. -// -// If uplo == blas.Upper, Q is constructed with -// Q = H_{n-2} * ... * H_1 * H_0 -// where -// H_i = I - tau_i * v * v^T -// v is constructed as v[i+1:n] = 0, v[i] = 1, v[0:i-1] is stored in A[0:i-1, i+1]. -// The elements of A are -// [ d e v1 v2 v3] -// [ d e v2 v3] -// [ d e v3] -// [ d e] -// [ e] -// -// If uplo == blas.Lower, Q is constructed with -// Q = H_0 * H_1 * ... * H_{n-2} -// where -// H_i = I - tau_i * v * v^T -// v is constructed as v[0:i+1] = 0, v[i+1] = 1, v[i+2:n] is stored in A[i+2:n, i]. -// The elements of A are -// [ d ] -// [ e d ] -// [v0 e d ] -// [v0 v1 e d ] -// [v0 v1 v2 e d] -// -// d must have length n, and e and tau must have length n-1. Dsytrd will panic if -// these conditions are not met. -// -// work is temporary storage, and lwork specifies the usable memory length. At minimum, -// lwork >= 1, and Dsytrd will panic otherwise. The amount of blocking is -// limited by the usable length. -// If lwork == -1, instead of computing Dsytrd the optimal work length is stored -// into work[0]. -// -// Dsytrd is an internal routine. It is exported for testing purposes. -func (impl Implementation) Dsytrd(uplo blas.Uplo, n int, a []float64, lda int, d, e, tau, work []float64, lwork int) { - switch { - case uplo != blas.Upper && uplo != blas.Lower: - panic(badUplo) - case n < 0: - panic(nLT0) - case lda < max(1, n): - panic(badLdA) - case lwork < 1 && lwork != -1: - panic(badLWork) - case len(work) < max(1, lwork): - panic(shortWork) - } - - // Quick return if possible. - if n == 0 { - work[0] = 1 - return - } - - nb := impl.Ilaenv(1, "DSYTRD", string(uplo), n, -1, -1, -1) - lworkopt := n * nb - if lwork == -1 { - work[0] = float64(lworkopt) - return - } - - switch { - case len(a) < (n-1)*lda+n: - panic(shortA) - case len(d) < n: - panic(shortD) - case len(e) < n-1: - panic(shortE) - case len(tau) < n-1: - panic(shortTau) - } - - bi := blas64.Implementation() - - nx := n - iws := 1 - var ldwork int - if 1 < nb && nb < n { - // Determine when to cross over from blocked to unblocked code. The last - // block is always handled by unblocked code. - nx = max(nb, impl.Ilaenv(3, "DSYTRD", string(uplo), n, -1, -1, -1)) - if nx < n { - // Determine if workspace is large enough for blocked code. - ldwork = nb - iws = n * ldwork - if lwork < iws { - // Not enough workspace to use optimal nb: determine the minimum - // value of nb and reduce nb or force use of unblocked code by - // setting nx = n. - nb = max(lwork/n, 1) - nbmin := impl.Ilaenv(2, "DSYTRD", string(uplo), n, -1, -1, -1) - if nb < nbmin { - nx = n - } - } - } else { - nx = n - } - } else { - nb = 1 - } - ldwork = nb - - if uplo == blas.Upper { - // Reduce the upper triangle of A. Columns 0:kk are handled by the - // unblocked method. - var i int - kk := n - ((n-nx+nb-1)/nb)*nb - for i = n - nb; i >= kk; i -= nb { - // Reduce columns i:i+nb to tridiagonal form and form the matrix W - // which is needed to update the unreduced part of the matrix. - impl.Dlatrd(uplo, i+nb, nb, a, lda, e, tau, work, ldwork) - - // Update the unreduced submatrix A[0:i-1,0:i-1], using an update - // of the form A = A - V*W^T - W*V^T. - bi.Dsyr2k(uplo, blas.NoTrans, i, nb, -1, a[i:], lda, work, ldwork, 1, a, lda) - - // Copy superdiagonal elements back into A, and diagonal elements into D. - for j := i; j < i+nb; j++ { - a[(j-1)*lda+j] = e[j-1] - d[j] = a[j*lda+j] - } - } - // Use unblocked code to reduce the last or only block - // check that i == kk. - impl.Dsytd2(uplo, kk, a, lda, d, e, tau) - } else { - var i int - // Reduce the lower triangle of A. - for i = 0; i < n-nx; i += nb { - // Reduce columns 0:i+nb to tridiagonal form and form the matrix W - // which is needed to update the unreduced part of the matrix. - impl.Dlatrd(uplo, n-i, nb, a[i*lda+i:], lda, e[i:], tau[i:], work, ldwork) - - // Update the unreduced submatrix A[i+ib:n, i+ib:n], using an update - // of the form A = A + V*W^T - W*V^T. - bi.Dsyr2k(uplo, blas.NoTrans, n-i-nb, nb, -1, a[(i+nb)*lda+i:], lda, - work[nb*ldwork:], ldwork, 1, a[(i+nb)*lda+i+nb:], lda) - - // Copy subdiagonal elements back into A, and diagonal elements into D. - for j := i; j < i+nb; j++ { - a[(j+1)*lda+j] = e[j] - d[j] = a[j*lda+j] - } - } - // Use unblocked code to reduce the last or only block. - impl.Dsytd2(uplo, n-i, a[i*lda+i:], lda, d[i:], e[i:], tau[i:]) - } - work[0] = float64(iws) -} diff --git a/vendor/gonum.org/v1/gonum/lapack/gonum/dtgsja.go b/vendor/gonum.org/v1/gonum/lapack/gonum/dtgsja.go deleted file mode 100644 index d70d196234..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/gonum/dtgsja.go +++ /dev/null @@ -1,373 +0,0 @@ -// Copyright ©2017 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import ( - "math" - - "gonum.org/v1/gonum/blas" - "gonum.org/v1/gonum/blas/blas64" - "gonum.org/v1/gonum/lapack" -) - -// Dtgsja computes the generalized singular value decomposition (GSVD) -// of two real upper triangular or trapezoidal matrices A and B. -// -// A and B have the following forms, which may be obtained by the -// preprocessing subroutine Dggsvp from a general m×n matrix A and p×n -// matrix B: -// -// n-k-l k l -// A = k [ 0 A12 A13 ] if m-k-l >= 0; -// l [ 0 0 A23 ] -// m-k-l [ 0 0 0 ] -// -// n-k-l k l -// A = k [ 0 A12 A13 ] if m-k-l < 0; -// m-k [ 0 0 A23 ] -// -// n-k-l k l -// B = l [ 0 0 B13 ] -// p-l [ 0 0 0 ] -// -// where the k×k matrix A12 and l×l matrix B13 are non-singular -// upper triangular. A23 is l×l upper triangular if m-k-l >= 0, -// otherwise A23 is (m-k)×l upper trapezoidal. -// -// On exit, -// -// U^T*A*Q = D1*[ 0 R ], V^T*B*Q = D2*[ 0 R ], -// -// where U, V and Q are orthogonal matrices. -// R is a non-singular upper triangular matrix, and D1 and D2 are -// diagonal matrices, which are of the following structures: -// -// If m-k-l >= 0, -// -// k l -// D1 = k [ I 0 ] -// l [ 0 C ] -// m-k-l [ 0 0 ] -// -// k l -// D2 = l [ 0 S ] -// p-l [ 0 0 ] -// -// n-k-l k l -// [ 0 R ] = k [ 0 R11 R12 ] k -// l [ 0 0 R22 ] l -// -// where -// -// C = diag( alpha_k, ... , alpha_{k+l} ), -// S = diag( beta_k, ... , beta_{k+l} ), -// C^2 + S^2 = I. -// -// R is stored in -// A[0:k+l, n-k-l:n] -// on exit. -// -// If m-k-l < 0, -// -// k m-k k+l-m -// D1 = k [ I 0 0 ] -// m-k [ 0 C 0 ] -// -// k m-k k+l-m -// D2 = m-k [ 0 S 0 ] -// k+l-m [ 0 0 I ] -// p-l [ 0 0 0 ] -// -// n-k-l k m-k k+l-m -// [ 0 R ] = k [ 0 R11 R12 R13 ] -// m-k [ 0 0 R22 R23 ] -// k+l-m [ 0 0 0 R33 ] -// -// where -// C = diag( alpha_k, ... , alpha_m ), -// S = diag( beta_k, ... , beta_m ), -// C^2 + S^2 = I. -// -// R = [ R11 R12 R13 ] is stored in A[0:m, n-k-l:n] -// [ 0 R22 R23 ] -// and R33 is stored in -// B[m-k:l, n+m-k-l:n] on exit. -// -// The computation of the orthogonal transformation matrices U, V or Q -// is optional. These matrices may either be formed explicitly, or they -// may be post-multiplied into input matrices U1, V1, or Q1. -// -// Dtgsja essentially uses a variant of Kogbetliantz algorithm to reduce -// min(l,m-k)×l triangular or trapezoidal matrix A23 and l×l -// matrix B13 to the form: -// -// U1^T*A13*Q1 = C1*R1; V1^T*B13*Q1 = S1*R1, -// -// where U1, V1 and Q1 are orthogonal matrices. C1 and S1 are diagonal -// matrices satisfying -// -// C1^2 + S1^2 = I, -// -// and R1 is an l×l non-singular upper triangular matrix. -// -// jobU, jobV and jobQ are options for computing the orthogonal matrices. The behavior -// is as follows -// jobU == lapack.GSVDU Compute orthogonal matrix U -// jobU == lapack.GSVDUnit Use unit-initialized matrix -// jobU == lapack.GSVDNone Do not compute orthogonal matrix. -// The behavior is the same for jobV and jobQ with the exception that instead of -// lapack.GSVDU these accept lapack.GSVDV and lapack.GSVDQ respectively. -// The matrices U, V and Q must be m×m, p×p and n×n respectively unless the -// relevant job parameter is lapack.GSVDNone. -// -// k and l specify the sub-blocks in the input matrices A and B: -// A23 = A[k:min(k+l,m), n-l:n) and B13 = B[0:l, n-l:n] -// of A and B, whose GSVD is going to be computed by Dtgsja. -// -// tola and tolb are the convergence criteria for the Jacobi-Kogbetliantz -// iteration procedure. Generally, they are the same as used in the preprocessing -// step, for example, -// tola = max(m, n)*norm(A)*eps, -// tolb = max(p, n)*norm(B)*eps, -// where eps is the machine epsilon. -// -// work must have length at least 2*n, otherwise Dtgsja will panic. -// -// alpha and beta must have length n or Dtgsja will panic. On exit, alpha and -// beta contain the generalized singular value pairs of A and B -// alpha[0:k] = 1, -// beta[0:k] = 0, -// if m-k-l >= 0, -// alpha[k:k+l] = diag(C), -// beta[k:k+l] = diag(S), -// if m-k-l < 0, -// alpha[k:m]= C, alpha[m:k+l]= 0 -// beta[k:m] = S, beta[m:k+l] = 1. -// if k+l < n, -// alpha[k+l:n] = 0 and -// beta[k+l:n] = 0. -// -// On exit, A[n-k:n, 0:min(k+l,m)] contains the triangular matrix R or part of R -// and if necessary, B[m-k:l, n+m-k-l:n] contains a part of R. -// -// Dtgsja returns whether the routine converged and the number of iteration cycles -// that were run. -// -// Dtgsja is an internal routine. It is exported for testing purposes. -func (impl Implementation) Dtgsja(jobU, jobV, jobQ lapack.GSVDJob, m, p, n, k, l int, a []float64, lda int, b []float64, ldb int, tola, tolb float64, alpha, beta, u []float64, ldu int, v []float64, ldv int, q []float64, ldq int, work []float64) (cycles int, ok bool) { - const maxit = 40 - - initu := jobU == lapack.GSVDUnit - wantu := initu || jobU == lapack.GSVDU - - initv := jobV == lapack.GSVDUnit - wantv := initv || jobV == lapack.GSVDV - - initq := jobQ == lapack.GSVDUnit - wantq := initq || jobQ == lapack.GSVDQ - - switch { - case !initu && !wantu && jobU != lapack.GSVDNone: - panic(badGSVDJob + "U") - case !initv && !wantv && jobV != lapack.GSVDNone: - panic(badGSVDJob + "V") - case !initq && !wantq && jobQ != lapack.GSVDNone: - panic(badGSVDJob + "Q") - case m < 0: - panic(mLT0) - case p < 0: - panic(pLT0) - case n < 0: - panic(nLT0) - - case lda < max(1, n): - panic(badLdA) - case len(a) < (m-1)*lda+n: - panic(shortA) - - case ldb < max(1, n): - panic(badLdB) - case len(b) < (p-1)*ldb+n: - panic(shortB) - - case len(alpha) != n: - panic(badLenAlpha) - case len(beta) != n: - panic(badLenBeta) - - case ldu < 1, wantu && ldu < m: - panic(badLdU) - case wantu && len(u) < (m-1)*ldu+m: - panic(shortU) - - case ldv < 1, wantv && ldv < p: - panic(badLdV) - case wantv && len(v) < (p-1)*ldv+p: - panic(shortV) - - case ldq < 1, wantq && ldq < n: - panic(badLdQ) - case wantq && len(q) < (n-1)*ldq+n: - panic(shortQ) - - case len(work) < 2*n: - panic(shortWork) - } - - // Initialize U, V and Q, if necessary - if initu { - impl.Dlaset(blas.All, m, m, 0, 1, u, ldu) - } - if initv { - impl.Dlaset(blas.All, p, p, 0, 1, v, ldv) - } - if initq { - impl.Dlaset(blas.All, n, n, 0, 1, q, ldq) - } - - bi := blas64.Implementation() - minTol := math.Min(tola, tolb) - - // Loop until convergence. - upper := false - for cycles = 1; cycles <= maxit; cycles++ { - upper = !upper - - for i := 0; i < l-1; i++ { - for j := i + 1; j < l; j++ { - var a1, a2, a3 float64 - if k+i < m { - a1 = a[(k+i)*lda+n-l+i] - } - if k+j < m { - a3 = a[(k+j)*lda+n-l+j] - } - - b1 := b[i*ldb+n-l+i] - b3 := b[j*ldb+n-l+j] - - var b2 float64 - if upper { - if k+i < m { - a2 = a[(k+i)*lda+n-l+j] - } - b2 = b[i*ldb+n-l+j] - } else { - if k+j < m { - a2 = a[(k+j)*lda+n-l+i] - } - b2 = b[j*ldb+n-l+i] - } - - csu, snu, csv, snv, csq, snq := impl.Dlags2(upper, a1, a2, a3, b1, b2, b3) - - // Update (k+i)-th and (k+j)-th rows of matrix A: U^T*A. - if k+j < m { - bi.Drot(l, a[(k+j)*lda+n-l:], 1, a[(k+i)*lda+n-l:], 1, csu, snu) - } - - // Update i-th and j-th rows of matrix B: V^T*B. - bi.Drot(l, b[j*ldb+n-l:], 1, b[i*ldb+n-l:], 1, csv, snv) - - // Update (n-l+i)-th and (n-l+j)-th columns of matrices - // A and B: A*Q and B*Q. - bi.Drot(min(k+l, m), a[n-l+j:], lda, a[n-l+i:], lda, csq, snq) - bi.Drot(l, b[n-l+j:], ldb, b[n-l+i:], ldb, csq, snq) - - if upper { - if k+i < m { - a[(k+i)*lda+n-l+j] = 0 - } - b[i*ldb+n-l+j] = 0 - } else { - if k+j < m { - a[(k+j)*lda+n-l+i] = 0 - } - b[j*ldb+n-l+i] = 0 - } - - // Update orthogonal matrices U, V, Q, if desired. - if wantu && k+j < m { - bi.Drot(m, u[k+j:], ldu, u[k+i:], ldu, csu, snu) - } - if wantv { - bi.Drot(p, v[j:], ldv, v[i:], ldv, csv, snv) - } - if wantq { - bi.Drot(n, q[n-l+j:], ldq, q[n-l+i:], ldq, csq, snq) - } - } - } - - if !upper { - // The matrices A13 and B13 were lower triangular at the start - // of the cycle, and are now upper triangular. - // - // Convergence test: test the parallelism of the corresponding - // rows of A and B. - var error float64 - for i := 0; i < min(l, m-k); i++ { - bi.Dcopy(l-i, a[(k+i)*lda+n-l+i:], 1, work, 1) - bi.Dcopy(l-i, b[i*ldb+n-l+i:], 1, work[l:], 1) - ssmin := impl.Dlapll(l-i, work, 1, work[l:], 1) - error = math.Max(error, ssmin) - } - if math.Abs(error) <= minTol { - // The algorithm has converged. - // Compute the generalized singular value pairs (alpha, beta) - // and set the triangular matrix R to array A. - for i := 0; i < k; i++ { - alpha[i] = 1 - beta[i] = 0 - } - - for i := 0; i < min(l, m-k); i++ { - a1 := a[(k+i)*lda+n-l+i] - b1 := b[i*ldb+n-l+i] - - if a1 != 0 { - gamma := b1 / a1 - - // Change sign if necessary. - if gamma < 0 { - bi.Dscal(l-i, -1, b[i*ldb+n-l+i:], 1) - if wantv { - bi.Dscal(p, -1, v[i:], ldv) - } - } - beta[k+i], alpha[k+i], _ = impl.Dlartg(math.Abs(gamma), 1) - - if alpha[k+i] >= beta[k+i] { - bi.Dscal(l-i, 1/alpha[k+i], a[(k+i)*lda+n-l+i:], 1) - } else { - bi.Dscal(l-i, 1/beta[k+i], b[i*ldb+n-l+i:], 1) - bi.Dcopy(l-i, b[i*ldb+n-l+i:], 1, a[(k+i)*lda+n-l+i:], 1) - } - } else { - alpha[k+i] = 0 - beta[k+i] = 1 - bi.Dcopy(l-i, b[i*ldb+n-l+i:], 1, a[(k+i)*lda+n-l+i:], 1) - } - } - - for i := m; i < k+l; i++ { - alpha[i] = 0 - beta[i] = 1 - } - if k+l < n { - for i := k + l; i < n; i++ { - alpha[i] = 0 - beta[i] = 0 - } - } - - return cycles, true - } - } - } - - // The algorithm has not converged after maxit cycles. - return cycles, false -} diff --git a/vendor/gonum.org/v1/gonum/lapack/gonum/dtrcon.go b/vendor/gonum.org/v1/gonum/lapack/gonum/dtrcon.go deleted file mode 100644 index 899c95dd58..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/gonum/dtrcon.go +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright ©2015 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import ( - "math" - - "gonum.org/v1/gonum/blas" - "gonum.org/v1/gonum/blas/blas64" - "gonum.org/v1/gonum/lapack" -) - -// Dtrcon estimates the reciprocal of the condition number of a triangular matrix A. -// The condition number computed may be based on the 1-norm or the ∞-norm. -// -// work is a temporary data slice of length at least 3*n and Dtrcon will panic otherwise. -// -// iwork is a temporary data slice of length at least n and Dtrcon will panic otherwise. -func (impl Implementation) Dtrcon(norm lapack.MatrixNorm, uplo blas.Uplo, diag blas.Diag, n int, a []float64, lda int, work []float64, iwork []int) float64 { - switch { - case norm != lapack.MaxColumnSum && norm != lapack.MaxRowSum: - panic(badNorm) - case uplo != blas.Upper && uplo != blas.Lower: - panic(badUplo) - case diag != blas.NonUnit && diag != blas.Unit: - panic(badDiag) - case n < 0: - panic(nLT0) - case lda < max(1, n): - panic(badLdA) - } - - if n == 0 { - return 1 - } - - switch { - case len(a) < (n-1)*lda+n: - panic(shortA) - case len(work) < 3*n: - panic(shortWork) - case len(iwork) < n: - panic(shortIWork) - } - - bi := blas64.Implementation() - - var rcond float64 - smlnum := dlamchS * float64(n) - - anorm := impl.Dlantr(norm, uplo, diag, n, n, a, lda, work) - - if anorm <= 0 { - return rcond - } - var ainvnm float64 - var normin bool - kase1 := 2 - if norm == lapack.MaxColumnSum { - kase1 = 1 - } - var kase int - isave := new([3]int) - var scale float64 - for { - ainvnm, kase = impl.Dlacn2(n, work[n:], work, iwork, ainvnm, kase, isave) - if kase == 0 { - if ainvnm != 0 { - rcond = (1 / anorm) / ainvnm - } - return rcond - } - if kase == kase1 { - scale = impl.Dlatrs(uplo, blas.NoTrans, diag, normin, n, a, lda, work, work[2*n:]) - } else { - scale = impl.Dlatrs(uplo, blas.Trans, diag, normin, n, a, lda, work, work[2*n:]) - } - normin = true - if scale != 1 { - ix := bi.Idamax(n, work, 1) - xnorm := math.Abs(work[ix]) - if scale == 0 || scale < xnorm*smlnum { - return rcond - } - impl.Drscl(n, scale, work, 1) - } - } -} diff --git a/vendor/gonum.org/v1/gonum/lapack/gonum/dtrevc3.go b/vendor/gonum.org/v1/gonum/lapack/gonum/dtrevc3.go deleted file mode 100644 index 17121b8dbf..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/gonum/dtrevc3.go +++ /dev/null @@ -1,885 +0,0 @@ -// Copyright ©2016 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import ( - "math" - - "gonum.org/v1/gonum/blas" - "gonum.org/v1/gonum/blas/blas64" - "gonum.org/v1/gonum/lapack" -) - -// Dtrevc3 computes some or all of the right and/or left eigenvectors of an n×n -// upper quasi-triangular matrix T in Schur canonical form. Matrices of this -// type are produced by the Schur factorization of a real general matrix A -// A = Q T Q^T, -// as computed by Dhseqr. -// -// The right eigenvector x of T corresponding to an -// eigenvalue λ is defined by -// T x = λ x, -// and the left eigenvector y is defined by -// y^T T = λ y^T. -// -// The eigenvalues are read directly from the diagonal blocks of T. -// -// This routine returns the matrices X and/or Y of right and left eigenvectors -// of T, or the products Q*X and/or Q*Y, where Q is an input matrix. If Q is the -// orthogonal factor that reduces a matrix A to Schur form T, then Q*X and Q*Y -// are the matrices of right and left eigenvectors of A. -// -// If side == lapack.EVRight, only right eigenvectors will be computed. -// If side == lapack.EVLeft, only left eigenvectors will be computed. -// If side == lapack.EVBoth, both right and left eigenvectors will be computed. -// For other values of side, Dtrevc3 will panic. -// -// If howmny == lapack.EVAll, all right and/or left eigenvectors will be -// computed. -// If howmny == lapack.EVAllMulQ, all right and/or left eigenvectors will be -// computed and multiplied from left by the matrices in VR and/or VL. -// If howmny == lapack.EVSelected, right and/or left eigenvectors will be -// computed as indicated by selected. -// For other values of howmny, Dtrevc3 will panic. -// -// selected specifies which eigenvectors will be computed. It must have length n -// if howmny == lapack.EVSelected, and it is not referenced otherwise. -// If w_j is a real eigenvalue, the corresponding real eigenvector will be -// computed if selected[j] is true. -// If w_j and w_{j+1} are the real and imaginary parts of a complex eigenvalue, -// the corresponding complex eigenvector is computed if either selected[j] or -// selected[j+1] is true, and on return selected[j] will be set to true and -// selected[j+1] will be set to false. -// -// VL and VR are n×mm matrices. If howmny is lapack.EVAll or -// lapack.AllEVMulQ, mm must be at least n. If howmny is -// lapack.EVSelected, mm must be large enough to store the selected -// eigenvectors. Each selected real eigenvector occupies one column and each -// selected complex eigenvector occupies two columns. If mm is not sufficiently -// large, Dtrevc3 will panic. -// -// On entry, if howmny is lapack.EVAllMulQ, it is assumed that VL (if side -// is lapack.EVLeft or lapack.EVBoth) contains an n×n matrix QL, -// and that VR (if side is lapack.EVLeft or lapack.EVBoth) contains -// an n×n matrix QR. QL and QR are typically the orthogonal matrix Q of Schur -// vectors returned by Dhseqr. -// -// On return, if side is lapack.EVLeft or lapack.EVBoth, -// VL will contain: -// if howmny == lapack.EVAll, the matrix Y of left eigenvectors of T, -// if howmny == lapack.EVAllMulQ, the matrix Q*Y, -// if howmny == lapack.EVSelected, the left eigenvectors of T specified by -// selected, stored consecutively in the -// columns of VL, in the same order as their -// eigenvalues. -// VL is not referenced if side == lapack.EVRight. -// -// On return, if side is lapack.EVRight or lapack.EVBoth, -// VR will contain: -// if howmny == lapack.EVAll, the matrix X of right eigenvectors of T, -// if howmny == lapack.EVAllMulQ, the matrix Q*X, -// if howmny == lapack.EVSelected, the left eigenvectors of T specified by -// selected, stored consecutively in the -// columns of VR, in the same order as their -// eigenvalues. -// VR is not referenced if side == lapack.EVLeft. -// -// Complex eigenvectors corresponding to a complex eigenvalue are stored in VL -// and VR in two consecutive columns, the first holding the real part, and the -// second the imaginary part. -// -// Each eigenvector will be normalized so that the element of largest magnitude -// has magnitude 1. Here the magnitude of a complex number (x,y) is taken to be -// |x| + |y|. -// -// work must have length at least lwork and lwork must be at least max(1,3*n), -// otherwise Dtrevc3 will panic. For optimum performance, lwork should be at -// least n+2*n*nb, where nb is the optimal blocksize. -// -// If lwork == -1, instead of performing Dtrevc3, the function only estimates -// the optimal workspace size based on n and stores it into work[0]. -// -// Dtrevc3 returns the number of columns in VL and/or VR actually used to store -// the eigenvectors. -// -// Dtrevc3 is an internal routine. It is exported for testing purposes. -func (impl Implementation) Dtrevc3(side lapack.EVSide, howmny lapack.EVHowMany, selected []bool, n int, t []float64, ldt int, vl []float64, ldvl int, vr []float64, ldvr int, mm int, work []float64, lwork int) (m int) { - bothv := side == lapack.EVBoth - rightv := side == lapack.EVRight || bothv - leftv := side == lapack.EVLeft || bothv - switch { - case !rightv && !leftv: - panic(badEVSide) - case howmny != lapack.EVAll && howmny != lapack.EVAllMulQ && howmny != lapack.EVSelected: - panic(badEVHowMany) - case n < 0: - panic(nLT0) - case ldt < max(1, n): - panic(badLdT) - case mm < 0: - panic(mmLT0) - case ldvl < 1: - // ldvl and ldvr are also checked below after the computation of - // m (number of columns of VL and VR) in case of howmny == EVSelected. - panic(badLdVL) - case ldvr < 1: - panic(badLdVR) - case lwork < max(1, 3*n) && lwork != -1: - panic(badLWork) - case len(work) < max(1, lwork): - panic(shortWork) - } - - // Quick return if possible. - if n == 0 { - work[0] = 1 - return 0 - } - - // Normally we don't check slice lengths until after the workspace - // query. However, even in case of the workspace query we need to - // compute and return the value of m, and since the computation accesses t, - // we put the length check of t here. - if len(t) < (n-1)*ldt+n { - panic(shortT) - } - - if howmny == lapack.EVSelected { - if len(selected) != n { - panic(badLenSelected) - } - // Set m to the number of columns required to store the selected - // eigenvectors, and standardize the slice selected. - // Each selected real eigenvector occupies one column and each - // selected complex eigenvector occupies two columns. - for j := 0; j < n; { - if j == n-1 || t[(j+1)*ldt+j] == 0 { - // Diagonal 1×1 block corresponding to a - // real eigenvalue. - if selected[j] { - m++ - } - j++ - } else { - // Diagonal 2×2 block corresponding to a - // complex eigenvalue. - if selected[j] || selected[j+1] { - selected[j] = true - selected[j+1] = false - m += 2 - } - j += 2 - } - } - } else { - m = n - } - if mm < m { - panic(badMm) - } - - // Quick return in case of a workspace query. - nb := impl.Ilaenv(1, "DTREVC", string(side)+string(howmny), n, -1, -1, -1) - if lwork == -1 { - work[0] = float64(n + 2*n*nb) - return m - } - - // Quick return if no eigenvectors were selected. - if m == 0 { - return 0 - } - - switch { - case leftv && ldvl < mm: - panic(badLdVL) - case leftv && len(vl) < (n-1)*ldvl+mm: - panic(shortVL) - - case rightv && ldvr < mm: - panic(badLdVR) - case rightv && len(vr) < (n-1)*ldvr+mm: - panic(shortVR) - } - - // Use blocked version of back-transformation if sufficient workspace. - // Zero-out the workspace to avoid potential NaN propagation. - const ( - nbmin = 8 - nbmax = 128 - ) - if howmny == lapack.EVAllMulQ && lwork >= n+2*n*nbmin { - nb = min((lwork-n)/(2*n), nbmax) - impl.Dlaset(blas.All, n, 1+2*nb, 0, 0, work[:n+2*nb*n], 1+2*nb) - } else { - nb = 1 - } - - // Set the constants to control overflow. - ulp := dlamchP - smlnum := float64(n) / ulp * dlamchS - bignum := (1 - ulp) / smlnum - - // Split work into a vector of column norms and an n×2*nb matrix b. - norms := work[:n] - ldb := 2 * nb - b := work[n : n+n*ldb] - - // Compute 1-norm of each column of strictly upper triangular part of T - // to control overflow in triangular solver. - norms[0] = 0 - for j := 1; j < n; j++ { - var cn float64 - for i := 0; i < j; i++ { - cn += math.Abs(t[i*ldt+j]) - } - norms[j] = cn - } - - bi := blas64.Implementation() - - var ( - x [4]float64 - - iv int // Index of column in current block. - is int - - // ip is used below to specify the real or complex eigenvalue: - // ip == 0, real eigenvalue, - // 1, first of conjugate complex pair (wr,wi), - // -1, second of conjugate complex pair (wr,wi). - ip int - iscomplex [nbmax]int // Stores ip for each column in current block. - ) - - if side == lapack.EVLeft { - goto leftev - } - - // Compute right eigenvectors. - - // For complex right vector, iv-1 is for real part and iv for complex - // part. Non-blocked version always uses iv=1, blocked version starts - // with iv=nb-1 and goes down to 0 or 1. - iv = max(2, nb) - 1 - ip = 0 - is = m - 1 - for ki := n - 1; ki >= 0; ki-- { - if ip == -1 { - // Previous iteration (ki+1) was second of - // conjugate pair, so this ki is first of - // conjugate pair. - ip = 1 - continue - } - - if ki == 0 || t[ki*ldt+ki-1] == 0 { - // Last column or zero on sub-diagonal, so this - // ki must be real eigenvalue. - ip = 0 - } else { - // Non-zero on sub-diagonal, so this ki is - // second of conjugate pair. - ip = -1 - } - - if howmny == lapack.EVSelected { - if ip == 0 { - if !selected[ki] { - continue - } - } else if !selected[ki-1] { - continue - } - } - - // Compute the ki-th eigenvalue (wr,wi). - wr := t[ki*ldt+ki] - var wi float64 - if ip != 0 { - wi = math.Sqrt(math.Abs(t[ki*ldt+ki-1])) * math.Sqrt(math.Abs(t[(ki-1)*ldt+ki])) - } - smin := math.Max(ulp*(math.Abs(wr)+math.Abs(wi)), smlnum) - - if ip == 0 { - // Real right eigenvector. - - b[ki*ldb+iv] = 1 - // Form right-hand side. - for k := 0; k < ki; k++ { - b[k*ldb+iv] = -t[k*ldt+ki] - } - // Solve upper quasi-triangular system: - // [ T[0:ki,0:ki] - wr ]*X = scale*b. - for j := ki - 1; j >= 0; { - if j == 0 || t[j*ldt+j-1] == 0 { - // 1×1 diagonal block. - scale, xnorm, _ := impl.Dlaln2(false, 1, 1, smin, 1, t[j*ldt+j:], ldt, - 1, 1, b[j*ldb+iv:], ldb, wr, 0, x[:1], 2) - // Scale X[0,0] to avoid overflow when updating the - // right-hand side. - if xnorm > 1 && norms[j] > bignum/xnorm { - x[0] /= xnorm - scale /= xnorm - } - // Scale if necessary. - if scale != 1 { - bi.Dscal(ki+1, scale, b[iv:], ldb) - } - b[j*ldb+iv] = x[0] - // Update right-hand side. - bi.Daxpy(j, -x[0], t[j:], ldt, b[iv:], ldb) - j-- - } else { - // 2×2 diagonal block. - scale, xnorm, _ := impl.Dlaln2(false, 2, 1, smin, 1, t[(j-1)*ldt+j-1:], ldt, - 1, 1, b[(j-1)*ldb+iv:], ldb, wr, 0, x[:3], 2) - // Scale X[0,0] and X[1,0] to avoid overflow - // when updating the right-hand side. - if xnorm > 1 { - beta := math.Max(norms[j-1], norms[j]) - if beta > bignum/xnorm { - x[0] /= xnorm - x[2] /= xnorm - scale /= xnorm - } - } - // Scale if necessary. - if scale != 1 { - bi.Dscal(ki+1, scale, b[iv:], ldb) - } - b[(j-1)*ldb+iv] = x[0] - b[j*ldb+iv] = x[2] - // Update right-hand side. - bi.Daxpy(j-1, -x[0], t[j-1:], ldt, b[iv:], ldb) - bi.Daxpy(j-1, -x[2], t[j:], ldt, b[iv:], ldb) - j -= 2 - } - } - // Copy the vector x or Q*x to VR and normalize. - switch { - case howmny != lapack.EVAllMulQ: - // No back-transform: copy x to VR and normalize. - bi.Dcopy(ki+1, b[iv:], ldb, vr[is:], ldvr) - ii := bi.Idamax(ki+1, vr[is:], ldvr) - remax := 1 / math.Abs(vr[ii*ldvr+is]) - bi.Dscal(ki+1, remax, vr[is:], ldvr) - for k := ki + 1; k < n; k++ { - vr[k*ldvr+is] = 0 - } - case nb == 1: - // Version 1: back-transform each vector with GEMV, Q*x. - if ki > 0 { - bi.Dgemv(blas.NoTrans, n, ki, 1, vr, ldvr, b[iv:], ldb, - b[ki*ldb+iv], vr[ki:], ldvr) - } - ii := bi.Idamax(n, vr[ki:], ldvr) - remax := 1 / math.Abs(vr[ii*ldvr+ki]) - bi.Dscal(n, remax, vr[ki:], ldvr) - default: - // Version 2: back-transform block of vectors with GEMM. - // Zero out below vector. - for k := ki + 1; k < n; k++ { - b[k*ldb+iv] = 0 - } - iscomplex[iv] = ip - // Back-transform and normalization is done below. - } - } else { - // Complex right eigenvector. - - // Initial solve - // [ ( T[ki-1,ki-1] T[ki-1,ki] ) - (wr + i*wi) ]*X = 0. - // [ ( T[ki, ki-1] T[ki, ki] ) ] - if math.Abs(t[(ki-1)*ldt+ki]) >= math.Abs(t[ki*ldt+ki-1]) { - b[(ki-1)*ldb+iv-1] = 1 - b[ki*ldb+iv] = wi / t[(ki-1)*ldt+ki] - } else { - b[(ki-1)*ldb+iv-1] = -wi / t[ki*ldt+ki-1] - b[ki*ldb+iv] = 1 - } - b[ki*ldb+iv-1] = 0 - b[(ki-1)*ldb+iv] = 0 - // Form right-hand side. - for k := 0; k < ki-1; k++ { - b[k*ldb+iv-1] = -b[(ki-1)*ldb+iv-1] * t[k*ldt+ki-1] - b[k*ldb+iv] = -b[ki*ldb+iv] * t[k*ldt+ki] - } - // Solve upper quasi-triangular system: - // [ T[0:ki-1,0:ki-1] - (wr+i*wi) ]*X = scale*(b1+i*b2) - for j := ki - 2; j >= 0; { - if j == 0 || t[j*ldt+j-1] == 0 { - // 1×1 diagonal block. - - scale, xnorm, _ := impl.Dlaln2(false, 1, 2, smin, 1, t[j*ldt+j:], ldt, - 1, 1, b[j*ldb+iv-1:], ldb, wr, wi, x[:2], 2) - // Scale X[0,0] and X[0,1] to avoid - // overflow when updating the right-hand side. - if xnorm > 1 && norms[j] > bignum/xnorm { - x[0] /= xnorm - x[1] /= xnorm - scale /= xnorm - } - // Scale if necessary. - if scale != 1 { - bi.Dscal(ki+1, scale, b[iv-1:], ldb) - bi.Dscal(ki+1, scale, b[iv:], ldb) - } - b[j*ldb+iv-1] = x[0] - b[j*ldb+iv] = x[1] - // Update the right-hand side. - bi.Daxpy(j, -x[0], t[j:], ldt, b[iv-1:], ldb) - bi.Daxpy(j, -x[1], t[j:], ldt, b[iv:], ldb) - j-- - } else { - // 2×2 diagonal block. - - scale, xnorm, _ := impl.Dlaln2(false, 2, 2, smin, 1, t[(j-1)*ldt+j-1:], ldt, - 1, 1, b[(j-1)*ldb+iv-1:], ldb, wr, wi, x[:], 2) - // Scale X to avoid overflow when updating - // the right-hand side. - if xnorm > 1 { - beta := math.Max(norms[j-1], norms[j]) - if beta > bignum/xnorm { - rec := 1 / xnorm - x[0] *= rec - x[1] *= rec - x[2] *= rec - x[3] *= rec - scale *= rec - } - } - // Scale if necessary. - if scale != 1 { - bi.Dscal(ki+1, scale, b[iv-1:], ldb) - bi.Dscal(ki+1, scale, b[iv:], ldb) - } - b[(j-1)*ldb+iv-1] = x[0] - b[(j-1)*ldb+iv] = x[1] - b[j*ldb+iv-1] = x[2] - b[j*ldb+iv] = x[3] - // Update the right-hand side. - bi.Daxpy(j-1, -x[0], t[j-1:], ldt, b[iv-1:], ldb) - bi.Daxpy(j-1, -x[1], t[j-1:], ldt, b[iv:], ldb) - bi.Daxpy(j-1, -x[2], t[j:], ldt, b[iv-1:], ldb) - bi.Daxpy(j-1, -x[3], t[j:], ldt, b[iv:], ldb) - j -= 2 - } - } - - // Copy the vector x or Q*x to VR and normalize. - switch { - case howmny != lapack.EVAllMulQ: - // No back-transform: copy x to VR and normalize. - bi.Dcopy(ki+1, b[iv-1:], ldb, vr[is-1:], ldvr) - bi.Dcopy(ki+1, b[iv:], ldb, vr[is:], ldvr) - emax := 0.0 - for k := 0; k <= ki; k++ { - emax = math.Max(emax, math.Abs(vr[k*ldvr+is-1])+math.Abs(vr[k*ldvr+is])) - } - remax := 1 / emax - bi.Dscal(ki+1, remax, vr[is-1:], ldvr) - bi.Dscal(ki+1, remax, vr[is:], ldvr) - for k := ki + 1; k < n; k++ { - vr[k*ldvr+is-1] = 0 - vr[k*ldvr+is] = 0 - } - case nb == 1: - // Version 1: back-transform each vector with GEMV, Q*x. - if ki-1 > 0 { - bi.Dgemv(blas.NoTrans, n, ki-1, 1, vr, ldvr, b[iv-1:], ldb, - b[(ki-1)*ldb+iv-1], vr[ki-1:], ldvr) - bi.Dgemv(blas.NoTrans, n, ki-1, 1, vr, ldvr, b[iv:], ldb, - b[ki*ldb+iv], vr[ki:], ldvr) - } else { - bi.Dscal(n, b[(ki-1)*ldb+iv-1], vr[ki-1:], ldvr) - bi.Dscal(n, b[ki*ldb+iv], vr[ki:], ldvr) - } - emax := 0.0 - for k := 0; k < n; k++ { - emax = math.Max(emax, math.Abs(vr[k*ldvr+ki-1])+math.Abs(vr[k*ldvr+ki])) - } - remax := 1 / emax - bi.Dscal(n, remax, vr[ki-1:], ldvr) - bi.Dscal(n, remax, vr[ki:], ldvr) - default: - // Version 2: back-transform block of vectors with GEMM. - // Zero out below vector. - for k := ki + 1; k < n; k++ { - b[k*ldb+iv-1] = 0 - b[k*ldb+iv] = 0 - } - iscomplex[iv-1] = -ip - iscomplex[iv] = ip - iv-- - // Back-transform and normalization is done below. - } - } - if nb > 1 { - // Blocked version of back-transform. - - // For complex case, ki2 includes both vectors (ki-1 and ki). - ki2 := ki - if ip != 0 { - ki2-- - } - // Columns iv:nb of b are valid vectors. - // When the number of vectors stored reaches nb-1 or nb, - // or if this was last vector, do the Gemm. - if iv < 2 || ki2 == 0 { - bi.Dgemm(blas.NoTrans, blas.NoTrans, n, nb-iv, ki2+nb-iv, - 1, vr, ldvr, b[iv:], ldb, - 0, b[nb+iv:], ldb) - // Normalize vectors. - var remax float64 - for k := iv; k < nb; k++ { - if iscomplex[k] == 0 { - // Real eigenvector. - ii := bi.Idamax(n, b[nb+k:], ldb) - remax = 1 / math.Abs(b[ii*ldb+nb+k]) - } else if iscomplex[k] == 1 { - // First eigenvector of conjugate pair. - emax := 0.0 - for ii := 0; ii < n; ii++ { - emax = math.Max(emax, math.Abs(b[ii*ldb+nb+k])+math.Abs(b[ii*ldb+nb+k+1])) - } - remax = 1 / emax - // Second eigenvector of conjugate pair - // will reuse this value of remax. - } - bi.Dscal(n, remax, b[nb+k:], ldb) - } - impl.Dlacpy(blas.All, n, nb-iv, b[nb+iv:], ldb, vr[ki2:], ldvr) - iv = nb - 1 - } else { - iv-- - } - } - is-- - if ip != 0 { - is-- - } - } - - if side == lapack.EVRight { - return m - } - -leftev: - // Compute left eigenvectors. - - // For complex left vector, iv is for real part and iv+1 for complex - // part. Non-blocked version always uses iv=0. Blocked version starts - // with iv=0, goes up to nb-2 or nb-1. - iv = 0 - ip = 0 - is = 0 - for ki := 0; ki < n; ki++ { - if ip == 1 { - // Previous iteration ki-1 was first of conjugate pair, - // so this ki is second of conjugate pair. - ip = -1 - continue - } - - if ki == n-1 || t[(ki+1)*ldt+ki] == 0 { - // Last column or zero on sub-diagonal, so this ki must - // be real eigenvalue. - ip = 0 - } else { - // Non-zero on sub-diagonal, so this ki is first of - // conjugate pair. - ip = 1 - } - if howmny == lapack.EVSelected && !selected[ki] { - continue - } - - // Compute the ki-th eigenvalue (wr,wi). - wr := t[ki*ldt+ki] - var wi float64 - if ip != 0 { - wi = math.Sqrt(math.Abs(t[ki*ldt+ki+1])) * math.Sqrt(math.Abs(t[(ki+1)*ldt+ki])) - } - smin := math.Max(ulp*(math.Abs(wr)+math.Abs(wi)), smlnum) - - if ip == 0 { - // Real left eigenvector. - - b[ki*ldb+iv] = 1 - // Form right-hand side. - for k := ki + 1; k < n; k++ { - b[k*ldb+iv] = -t[ki*ldt+k] - } - // Solve transposed quasi-triangular system: - // [ T[ki+1:n,ki+1:n] - wr ]^T * X = scale*b - vmax := 1.0 - vcrit := bignum - for j := ki + 1; j < n; { - if j == n-1 || t[(j+1)*ldt+j] == 0 { - // 1×1 diagonal block. - - // Scale if necessary to avoid overflow - // when forming the right-hand side. - if norms[j] > vcrit { - rec := 1 / vmax - bi.Dscal(n-ki, rec, b[ki*ldb+iv:], ldb) - vmax = 1 - } - b[j*ldb+iv] -= bi.Ddot(j-ki-1, t[(ki+1)*ldt+j:], ldt, b[(ki+1)*ldb+iv:], ldb) - // Solve [ T[j,j] - wr ]^T * X = b. - scale, _, _ := impl.Dlaln2(false, 1, 1, smin, 1, t[j*ldt+j:], ldt, - 1, 1, b[j*ldb+iv:], ldb, wr, 0, x[:1], 2) - // Scale if necessary. - if scale != 1 { - bi.Dscal(n-ki, scale, b[ki*ldb+iv:], ldb) - } - b[j*ldb+iv] = x[0] - vmax = math.Max(math.Abs(b[j*ldb+iv]), vmax) - vcrit = bignum / vmax - j++ - } else { - // 2×2 diagonal block. - - // Scale if necessary to avoid overflow - // when forming the right-hand side. - beta := math.Max(norms[j], norms[j+1]) - if beta > vcrit { - bi.Dscal(n-ki+1, 1/vmax, b[ki*ldb+iv:], 1) - vmax = 1 - } - b[j*ldb+iv] -= bi.Ddot(j-ki-1, t[(ki+1)*ldt+j:], ldt, b[(ki+1)*ldb+iv:], ldb) - b[(j+1)*ldb+iv] -= bi.Ddot(j-ki-1, t[(ki+1)*ldt+j+1:], ldt, b[(ki+1)*ldb+iv:], ldb) - // Solve - // [ T[j,j]-wr T[j,j+1] ]^T * X = scale*[ b1 ] - // [ T[j+1,j] T[j+1,j+1]-wr ] [ b2 ] - scale, _, _ := impl.Dlaln2(true, 2, 1, smin, 1, t[j*ldt+j:], ldt, - 1, 1, b[j*ldb+iv:], ldb, wr, 0, x[:3], 2) - // Scale if necessary. - if scale != 1 { - bi.Dscal(n-ki, scale, b[ki*ldb+iv:], ldb) - } - b[j*ldb+iv] = x[0] - b[(j+1)*ldb+iv] = x[2] - vmax = math.Max(vmax, math.Max(math.Abs(b[j*ldb+iv]), math.Abs(b[(j+1)*ldb+iv]))) - vcrit = bignum / vmax - j += 2 - } - } - // Copy the vector x or Q*x to VL and normalize. - switch { - case howmny != lapack.EVAllMulQ: - // No back-transform: copy x to VL and normalize. - bi.Dcopy(n-ki, b[ki*ldb+iv:], ldb, vl[ki*ldvl+is:], ldvl) - ii := bi.Idamax(n-ki, vl[ki*ldvl+is:], ldvl) + ki - remax := 1 / math.Abs(vl[ii*ldvl+is]) - bi.Dscal(n-ki, remax, vl[ki*ldvl+is:], ldvl) - for k := 0; k < ki; k++ { - vl[k*ldvl+is] = 0 - } - case nb == 1: - // Version 1: back-transform each vector with Gemv, Q*x. - if n-ki-1 > 0 { - bi.Dgemv(blas.NoTrans, n, n-ki-1, - 1, vl[ki+1:], ldvl, b[(ki+1)*ldb+iv:], ldb, - b[ki*ldb+iv], vl[ki:], ldvl) - } - ii := bi.Idamax(n, vl[ki:], ldvl) - remax := 1 / math.Abs(vl[ii*ldvl+ki]) - bi.Dscal(n, remax, vl[ki:], ldvl) - default: - // Version 2: back-transform block of vectors with Gemm - // zero out above vector. - for k := 0; k < ki; k++ { - b[k*ldb+iv] = 0 - } - iscomplex[iv] = ip - // Back-transform and normalization is done below. - } - } else { - // Complex left eigenvector. - - // Initial solve: - // [ [ T[ki,ki] T[ki,ki+1] ]^T - (wr - i* wi) ]*X = 0. - // [ [ T[ki+1,ki] T[ki+1,ki+1] ] ] - if math.Abs(t[ki*ldt+ki+1]) >= math.Abs(t[(ki+1)*ldt+ki]) { - b[ki*ldb+iv] = wi / t[ki*ldt+ki+1] - b[(ki+1)*ldb+iv+1] = 1 - } else { - b[ki*ldb+iv] = 1 - b[(ki+1)*ldb+iv+1] = -wi / t[(ki+1)*ldt+ki] - } - b[(ki+1)*ldb+iv] = 0 - b[ki*ldb+iv+1] = 0 - // Form right-hand side. - for k := ki + 2; k < n; k++ { - b[k*ldb+iv] = -b[ki*ldb+iv] * t[ki*ldt+k] - b[k*ldb+iv+1] = -b[(ki+1)*ldb+iv+1] * t[(ki+1)*ldt+k] - } - // Solve transposed quasi-triangular system: - // [ T[ki+2:n,ki+2:n]^T - (wr-i*wi) ]*X = b1+i*b2 - vmax := 1.0 - vcrit := bignum - for j := ki + 2; j < n; { - if j == n-1 || t[(j+1)*ldt+j] == 0 { - // 1×1 diagonal block. - - // Scale if necessary to avoid overflow - // when forming the right-hand side elements. - if norms[j] > vcrit { - rec := 1 / vmax - bi.Dscal(n-ki, rec, b[ki*ldb+iv:], ldb) - bi.Dscal(n-ki, rec, b[ki*ldb+iv+1:], ldb) - vmax = 1 - } - b[j*ldb+iv] -= bi.Ddot(j-ki-2, t[(ki+2)*ldt+j:], ldt, b[(ki+2)*ldb+iv:], ldb) - b[j*ldb+iv+1] -= bi.Ddot(j-ki-2, t[(ki+2)*ldt+j:], ldt, b[(ki+2)*ldb+iv+1:], ldb) - // Solve [ T[j,j]-(wr-i*wi) ]*(X11+i*X12) = b1+i*b2. - scale, _, _ := impl.Dlaln2(false, 1, 2, smin, 1, t[j*ldt+j:], ldt, - 1, 1, b[j*ldb+iv:], ldb, wr, -wi, x[:2], 2) - // Scale if necessary. - if scale != 1 { - bi.Dscal(n-ki, scale, b[ki*ldb+iv:], ldb) - bi.Dscal(n-ki, scale, b[ki*ldb+iv+1:], ldb) - } - b[j*ldb+iv] = x[0] - b[j*ldb+iv+1] = x[1] - vmax = math.Max(vmax, math.Max(math.Abs(b[j*ldb+iv]), math.Abs(b[j*ldb+iv+1]))) - vcrit = bignum / vmax - j++ - } else { - // 2×2 diagonal block. - - // Scale if necessary to avoid overflow - // when forming the right-hand side elements. - if math.Max(norms[j], norms[j+1]) > vcrit { - rec := 1 / vmax - bi.Dscal(n-ki, rec, b[ki*ldb+iv:], ldb) - bi.Dscal(n-ki, rec, b[ki*ldb+iv+1:], ldb) - vmax = 1 - } - b[j*ldb+iv] -= bi.Ddot(j-ki-2, t[(ki+2)*ldt+j:], ldt, b[(ki+2)*ldb+iv:], ldb) - b[j*ldb+iv+1] -= bi.Ddot(j-ki-2, t[(ki+2)*ldt+j:], ldt, b[(ki+2)*ldb+iv+1:], ldb) - b[(j+1)*ldb+iv] -= bi.Ddot(j-ki-2, t[(ki+2)*ldt+j+1:], ldt, b[(ki+2)*ldb+iv:], ldb) - b[(j+1)*ldb+iv+1] -= bi.Ddot(j-ki-2, t[(ki+2)*ldt+j+1:], ldt, b[(ki+2)*ldb+iv+1:], ldb) - // Solve 2×2 complex linear equation - // [ [T[j,j] T[j,j+1] ]^T - (wr-i*wi)*I ]*X = scale*b - // [ [T[j+1,j] T[j+1,j+1]] ] - scale, _, _ := impl.Dlaln2(true, 2, 2, smin, 1, t[j*ldt+j:], ldt, - 1, 1, b[j*ldb+iv:], ldb, wr, -wi, x[:], 2) - // Scale if necessary. - if scale != 1 { - bi.Dscal(n-ki, scale, b[ki*ldb+iv:], ldb) - bi.Dscal(n-ki, scale, b[ki*ldb+iv+1:], ldb) - } - b[j*ldb+iv] = x[0] - b[j*ldb+iv+1] = x[1] - b[(j+1)*ldb+iv] = x[2] - b[(j+1)*ldb+iv+1] = x[3] - vmax01 := math.Max(math.Abs(x[0]), math.Abs(x[1])) - vmax23 := math.Max(math.Abs(x[2]), math.Abs(x[3])) - vmax = math.Max(vmax, math.Max(vmax01, vmax23)) - vcrit = bignum / vmax - j += 2 - } - } - // Copy the vector x or Q*x to VL and normalize. - switch { - case howmny != lapack.EVAllMulQ: - // No back-transform: copy x to VL and normalize. - bi.Dcopy(n-ki, b[ki*ldb+iv:], ldb, vl[ki*ldvl+is:], ldvl) - bi.Dcopy(n-ki, b[ki*ldb+iv+1:], ldb, vl[ki*ldvl+is+1:], ldvl) - emax := 0.0 - for k := ki; k < n; k++ { - emax = math.Max(emax, math.Abs(vl[k*ldvl+is])+math.Abs(vl[k*ldvl+is+1])) - } - remax := 1 / emax - bi.Dscal(n-ki, remax, vl[ki*ldvl+is:], ldvl) - bi.Dscal(n-ki, remax, vl[ki*ldvl+is+1:], ldvl) - for k := 0; k < ki; k++ { - vl[k*ldvl+is] = 0 - vl[k*ldvl+is+1] = 0 - } - case nb == 1: - // Version 1: back-transform each vector with GEMV, Q*x. - if n-ki-2 > 0 { - bi.Dgemv(blas.NoTrans, n, n-ki-2, - 1, vl[ki+2:], ldvl, b[(ki+2)*ldb+iv:], ldb, - b[ki*ldb+iv], vl[ki:], ldvl) - bi.Dgemv(blas.NoTrans, n, n-ki-2, - 1, vl[ki+2:], ldvl, b[(ki+2)*ldb+iv+1:], ldb, - b[(ki+1)*ldb+iv+1], vl[ki+1:], ldvl) - } else { - bi.Dscal(n, b[ki*ldb+iv], vl[ki:], ldvl) - bi.Dscal(n, b[(ki+1)*ldb+iv+1], vl[ki+1:], ldvl) - } - emax := 0.0 - for k := 0; k < n; k++ { - emax = math.Max(emax, math.Abs(vl[k*ldvl+ki])+math.Abs(vl[k*ldvl+ki+1])) - } - remax := 1 / emax - bi.Dscal(n, remax, vl[ki:], ldvl) - bi.Dscal(n, remax, vl[ki+1:], ldvl) - default: - // Version 2: back-transform block of vectors with GEMM. - // Zero out above vector. - // Could go from ki-nv+1 to ki-1. - for k := 0; k < ki; k++ { - b[k*ldb+iv] = 0 - b[k*ldb+iv+1] = 0 - } - iscomplex[iv] = ip - iscomplex[iv+1] = -ip - iv++ - // Back-transform and normalization is done below. - } - } - if nb > 1 { - // Blocked version of back-transform. - // For complex case, ki2 includes both vectors ki and ki+1. - ki2 := ki - if ip != 0 { - ki2++ - } - // Columns [0:iv] of work are valid vectors. When the - // number of vectors stored reaches nb-1 or nb, or if - // this was last vector, do the Gemm. - if iv >= nb-2 || ki2 == n-1 { - bi.Dgemm(blas.NoTrans, blas.NoTrans, n, iv+1, n-ki2+iv, - 1, vl[ki2-iv:], ldvl, b[(ki2-iv)*ldb:], ldb, - 0, b[nb:], ldb) - // Normalize vectors. - var remax float64 - for k := 0; k <= iv; k++ { - if iscomplex[k] == 0 { - // Real eigenvector. - ii := bi.Idamax(n, b[nb+k:], ldb) - remax = 1 / math.Abs(b[ii*ldb+nb+k]) - } else if iscomplex[k] == 1 { - // First eigenvector of conjugate pair. - emax := 0.0 - for ii := 0; ii < n; ii++ { - emax = math.Max(emax, math.Abs(b[ii*ldb+nb+k])+math.Abs(b[ii*ldb+nb+k+1])) - } - remax = 1 / emax - // Second eigenvector of conjugate pair - // will reuse this value of remax. - } - bi.Dscal(n, remax, b[nb+k:], ldb) - } - impl.Dlacpy(blas.All, n, iv+1, b[nb:], ldb, vl[ki2-iv:], ldvl) - iv = 0 - } else { - iv++ - } - } - is++ - if ip != 0 { - is++ - } - } - - return m -} diff --git a/vendor/gonum.org/v1/gonum/lapack/gonum/dtrexc.go b/vendor/gonum.org/v1/gonum/lapack/gonum/dtrexc.go deleted file mode 100644 index 9f3f90bad8..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/gonum/dtrexc.go +++ /dev/null @@ -1,230 +0,0 @@ -// Copyright ©2016 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import "gonum.org/v1/gonum/lapack" - -// Dtrexc reorders the real Schur factorization of a n×n real matrix -// A = Q*T*Q^T -// so that the diagonal block of T with row index ifst is moved to row ilst. -// -// On entry, T must be in Schur canonical form, that is, block upper triangular -// with 1×1 and 2×2 diagonal blocks; each 2×2 diagonal block has its diagonal -// elements equal and its off-diagonal elements of opposite sign. -// -// On return, T will be reordered by an orthogonal similarity transformation Z -// as Z^T*T*Z, and will be again in Schur canonical form. -// -// If compq is lapack.UpdateSchur, on return the matrix Q of Schur vectors will be -// updated by post-multiplying it with Z. -// If compq is lapack.UpdateSchurNone, the matrix Q is not referenced and will not be -// updated. -// For other values of compq Dtrexc will panic. -// -// ifst and ilst specify the reordering of the diagonal blocks of T. The block -// with row index ifst is moved to row ilst, by a sequence of transpositions -// between adjacent blocks. -// -// If ifst points to the second row of a 2×2 block, ifstOut will point to the -// first row, otherwise it will be equal to ifst. -// -// ilstOut will point to the first row of the block in its final position. If ok -// is true, ilstOut may differ from ilst by +1 or -1. -// -// It must hold that -// 0 <= ifst < n, and 0 <= ilst < n, -// otherwise Dtrexc will panic. -// -// If ok is false, two adjacent blocks were too close to swap because the -// problem is very ill-conditioned. T may have been partially reordered, and -// ilstOut will point to the first row of the block at the position to which it -// has been moved. -// -// work must have length at least n, otherwise Dtrexc will panic. -// -// Dtrexc is an internal routine. It is exported for testing purposes. -func (impl Implementation) Dtrexc(compq lapack.UpdateSchurComp, n int, t []float64, ldt int, q []float64, ldq int, ifst, ilst int, work []float64) (ifstOut, ilstOut int, ok bool) { - switch { - case compq != lapack.UpdateSchur && compq != lapack.UpdateSchurNone: - panic(badUpdateSchurComp) - case n < 0: - panic(nLT0) - case ldt < max(1, n): - panic(badLdT) - case ldq < 1, compq == lapack.UpdateSchur && ldq < n: - panic(badLdQ) - case (ifst < 0 || n <= ifst) && n > 0: - panic(badIfst) - case (ilst < 0 || n <= ilst) && n > 0: - panic(badIlst) - } - - // Quick return if possible. - if n == 0 { - return ifst, ilst, true - } - - switch { - case len(t) < (n-1)*ldt+n: - panic(shortT) - case compq == lapack.UpdateSchur && len(q) < (n-1)*ldq+n: - panic(shortQ) - case len(work) < n: - panic(shortWork) - } - - // Quick return if possible. - if n == 1 { - return ifst, ilst, true - } - - // Determine the first row of specified block - // and find out it is 1×1 or 2×2. - if ifst > 0 && t[ifst*ldt+ifst-1] != 0 { - ifst-- - } - nbf := 1 // Size of the first block. - if ifst+1 < n && t[(ifst+1)*ldt+ifst] != 0 { - nbf = 2 - } - // Determine the first row of the final block - // and find out it is 1×1 or 2×2. - if ilst > 0 && t[ilst*ldt+ilst-1] != 0 { - ilst-- - } - nbl := 1 // Size of the last block. - if ilst+1 < n && t[(ilst+1)*ldt+ilst] != 0 { - nbl = 2 - } - - ok = true - wantq := compq == lapack.UpdateSchur - - switch { - case ifst == ilst: - return ifst, ilst, true - - case ifst < ilst: - // Update ilst. - switch { - case nbf == 2 && nbl == 1: - ilst-- - case nbf == 1 && nbl == 2: - ilst++ - } - here := ifst - for here < ilst { - // Swap block with next one below. - if nbf == 1 || nbf == 2 { - // Current block either 1×1 or 2×2. - nbnext := 1 // Size of the next block. - if here+nbf+1 < n && t[(here+nbf+1)*ldt+here+nbf] != 0 { - nbnext = 2 - } - ok = impl.Dlaexc(wantq, n, t, ldt, q, ldq, here, nbf, nbnext, work) - if !ok { - return ifst, here, false - } - here += nbnext - // Test if 2×2 block breaks into two 1×1 blocks. - if nbf == 2 && t[(here+1)*ldt+here] == 0 { - nbf = 3 - } - continue - } - - // Current block consists of two 1×1 blocks each of - // which must be swapped individually. - nbnext := 1 // Size of the next block. - if here+3 < n && t[(here+3)*ldt+here+2] != 0 { - nbnext = 2 - } - ok = impl.Dlaexc(wantq, n, t, ldt, q, ldq, here+1, 1, nbnext, work) - if !ok { - return ifst, here, false - } - if nbnext == 1 { - // Swap two 1×1 blocks, no problems possible. - impl.Dlaexc(wantq, n, t, ldt, q, ldq, here, 1, nbnext, work) - here++ - continue - } - // Recompute nbnext in case 2×2 split. - if t[(here+2)*ldt+here+1] == 0 { - nbnext = 1 - } - if nbnext == 2 { - // 2×2 block did not split. - ok = impl.Dlaexc(wantq, n, t, ldt, q, ldq, here, 1, nbnext, work) - if !ok { - return ifst, here, false - } - } else { - // 2×2 block did split. - impl.Dlaexc(wantq, n, t, ldt, q, ldq, here, 1, 1, work) - impl.Dlaexc(wantq, n, t, ldt, q, ldq, here+1, 1, 1, work) - } - here += 2 - } - return ifst, here, true - - default: // ifst > ilst - here := ifst - for here > ilst { - // Swap block with next one above. - if nbf == 1 || nbf == 2 { - // Current block either 1×1 or 2×2. - nbnext := 1 - if here-2 >= 0 && t[(here-1)*ldt+here-2] != 0 { - nbnext = 2 - } - ok = impl.Dlaexc(wantq, n, t, ldt, q, ldq, here-nbnext, nbnext, nbf, work) - if !ok { - return ifst, here, false - } - here -= nbnext - // Test if 2×2 block breaks into two 1×1 blocks. - if nbf == 2 && t[(here+1)*ldt+here] == 0 { - nbf = 3 - } - continue - } - - // Current block consists of two 1×1 blocks each of - // which must be swapped individually. - nbnext := 1 - if here-2 >= 0 && t[(here-1)*ldt+here-2] != 0 { - nbnext = 2 - } - ok = impl.Dlaexc(wantq, n, t, ldt, q, ldq, here-nbnext, nbnext, 1, work) - if !ok { - return ifst, here, false - } - if nbnext == 1 { - // Swap two 1×1 blocks, no problems possible. - impl.Dlaexc(wantq, n, t, ldt, q, ldq, here, nbnext, 1, work) - here-- - continue - } - // Recompute nbnext in case 2×2 split. - if t[here*ldt+here-1] == 0 { - nbnext = 1 - } - if nbnext == 2 { - // 2×2 block did not split. - ok = impl.Dlaexc(wantq, n, t, ldt, q, ldq, here-1, 2, 1, work) - if !ok { - return ifst, here, false - } - } else { - // 2×2 block did split. - impl.Dlaexc(wantq, n, t, ldt, q, ldq, here, 1, 1, work) - impl.Dlaexc(wantq, n, t, ldt, q, ldq, here-1, 1, 1, work) - } - here -= 2 - } - return ifst, here, true - } -} diff --git a/vendor/gonum.org/v1/gonum/lapack/gonum/dtrti2.go b/vendor/gonum.org/v1/gonum/lapack/gonum/dtrti2.go deleted file mode 100644 index efc24b65ea..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/gonum/dtrti2.go +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright ©2015 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import ( - "gonum.org/v1/gonum/blas" - "gonum.org/v1/gonum/blas/blas64" -) - -// Dtrti2 computes the inverse of a triangular matrix, storing the result in place -// into a. This is the BLAS level 2 version of the algorithm. -// -// Dtrti2 is an internal routine. It is exported for testing purposes. -func (impl Implementation) Dtrti2(uplo blas.Uplo, diag blas.Diag, n int, a []float64, lda int) { - switch { - case uplo != blas.Upper && uplo != blas.Lower: - panic(badUplo) - case diag != blas.NonUnit && diag != blas.Unit: - panic(badDiag) - case n < 0: - panic(nLT0) - case lda < max(1, n): - panic(badLdA) - } - - if n == 0 { - return - } - - if len(a) < (n-1)*lda+n { - panic(shortA) - } - - bi := blas64.Implementation() - - nonUnit := diag == blas.NonUnit - // TODO(btracey): Replace this with a row-major ordering. - if uplo == blas.Upper { - for j := 0; j < n; j++ { - var ajj float64 - if nonUnit { - ajj = 1 / a[j*lda+j] - a[j*lda+j] = ajj - ajj *= -1 - } else { - ajj = -1 - } - bi.Dtrmv(blas.Upper, blas.NoTrans, diag, j, a, lda, a[j:], lda) - bi.Dscal(j, ajj, a[j:], lda) - } - return - } - for j := n - 1; j >= 0; j-- { - var ajj float64 - if nonUnit { - ajj = 1 / a[j*lda+j] - a[j*lda+j] = ajj - ajj *= -1 - } else { - ajj = -1 - } - if j < n-1 { - bi.Dtrmv(blas.Lower, blas.NoTrans, diag, n-j-1, a[(j+1)*lda+j+1:], lda, a[(j+1)*lda+j:], lda) - bi.Dscal(n-j-1, ajj, a[(j+1)*lda+j:], lda) - } - } -} diff --git a/vendor/gonum.org/v1/gonum/lapack/gonum/dtrtri.go b/vendor/gonum.org/v1/gonum/lapack/gonum/dtrtri.go deleted file mode 100644 index 6ec3663c35..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/gonum/dtrtri.go +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright ©2015 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import ( - "gonum.org/v1/gonum/blas" - "gonum.org/v1/gonum/blas/blas64" -) - -// Dtrtri computes the inverse of a triangular matrix, storing the result in place -// into a. This is the BLAS level 3 version of the algorithm which builds upon -// Dtrti2 to operate on matrix blocks instead of only individual columns. -// -// Dtrtri will not perform the inversion if the matrix is singular, and returns -// a boolean indicating whether the inversion was successful. -func (impl Implementation) Dtrtri(uplo blas.Uplo, diag blas.Diag, n int, a []float64, lda int) (ok bool) { - switch { - case uplo != blas.Upper && uplo != blas.Lower: - panic(badUplo) - case diag != blas.NonUnit && diag != blas.Unit: - panic(badDiag) - case n < 0: - panic(nLT0) - case lda < max(1, n): - panic(badLdA) - } - - if n == 0 { - return true - } - - if len(a) < (n-1)*lda+n { - panic(shortA) - } - - if diag == blas.NonUnit { - for i := 0; i < n; i++ { - if a[i*lda+i] == 0 { - return false - } - } - } - - bi := blas64.Implementation() - - nb := impl.Ilaenv(1, "DTRTRI", "UD", n, -1, -1, -1) - if nb <= 1 || nb > n { - impl.Dtrti2(uplo, diag, n, a, lda) - return true - } - if uplo == blas.Upper { - for j := 0; j < n; j += nb { - jb := min(nb, n-j) - bi.Dtrmm(blas.Left, blas.Upper, blas.NoTrans, diag, j, jb, 1, a, lda, a[j:], lda) - bi.Dtrsm(blas.Right, blas.Upper, blas.NoTrans, diag, j, jb, -1, a[j*lda+j:], lda, a[j:], lda) - impl.Dtrti2(blas.Upper, diag, jb, a[j*lda+j:], lda) - } - return true - } - nn := ((n - 1) / nb) * nb - for j := nn; j >= 0; j -= nb { - jb := min(nb, n-j) - if j+jb <= n-1 { - bi.Dtrmm(blas.Left, blas.Lower, blas.NoTrans, diag, n-j-jb, jb, 1, a[(j+jb)*lda+j+jb:], lda, a[(j+jb)*lda+j:], lda) - bi.Dtrsm(blas.Right, blas.Lower, blas.NoTrans, diag, n-j-jb, jb, -1, a[j*lda+j:], lda, a[(j+jb)*lda+j:], lda) - } - impl.Dtrti2(blas.Lower, diag, jb, a[j*lda+j:], lda) - } - return true -} diff --git a/vendor/gonum.org/v1/gonum/lapack/gonum/dtrtrs.go b/vendor/gonum.org/v1/gonum/lapack/gonum/dtrtrs.go deleted file mode 100644 index 1752dc5c85..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/gonum/dtrtrs.go +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright ©2015 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import ( - "gonum.org/v1/gonum/blas" - "gonum.org/v1/gonum/blas/blas64" -) - -// Dtrtrs solves a triangular system of the form A * X = B or A^T * X = B. Dtrtrs -// returns whether the solve completed successfully. If A is singular, no solve is performed. -func (impl Implementation) Dtrtrs(uplo blas.Uplo, trans blas.Transpose, diag blas.Diag, n, nrhs int, a []float64, lda int, b []float64, ldb int) (ok bool) { - switch { - case uplo != blas.Upper && uplo != blas.Lower: - panic(badUplo) - case trans != blas.NoTrans && trans != blas.Trans && trans != blas.ConjTrans: - panic(badTrans) - case diag != blas.NonUnit && diag != blas.Unit: - panic(badDiag) - case n < 0: - panic(nLT0) - case nrhs < 0: - panic(nrhsLT0) - case lda < max(1, n): - panic(badLdA) - case ldb < max(1, nrhs): - panic(badLdB) - } - - if n == 0 { - return true - } - - switch { - case len(a) < (n-1)*lda+n: - panic(shortA) - case len(b) < (n-1)*ldb+nrhs: - panic(shortB) - } - - // Check for singularity. - nounit := diag == blas.NonUnit - if nounit { - for i := 0; i < n; i++ { - if a[i*lda+i] == 0 { - return false - } - } - } - bi := blas64.Implementation() - bi.Dtrsm(blas.Left, uplo, trans, diag, n, nrhs, 1, a, lda, b, ldb) - return true -} diff --git a/vendor/gonum.org/v1/gonum/lapack/gonum/errors.go b/vendor/gonum.org/v1/gonum/lapack/gonum/errors.go deleted file mode 100644 index 3c0cb68efe..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/gonum/errors.go +++ /dev/null @@ -1,174 +0,0 @@ -// Copyright ©2015 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -// This list is duplicated in netlib/lapack/netlib. Keep in sync. -const ( - // Panic strings for bad enumeration values. - badApplyOrtho = "lapack: bad ApplyOrtho" - badBalanceJob = "lapack: bad BalanceJob" - badDiag = "lapack: bad Diag" - badDirect = "lapack: bad Direct" - badEVComp = "lapack: bad EVComp" - badEVHowMany = "lapack: bad EVHowMany" - badEVJob = "lapack: bad EVJob" - badEVSide = "lapack: bad EVSide" - badGSVDJob = "lapack: bad GSVDJob" - badGenOrtho = "lapack: bad GenOrtho" - badLeftEVJob = "lapack: bad LeftEVJob" - badMatrixType = "lapack: bad MatrixType" - badNorm = "lapack: bad Norm" - badPivot = "lapack: bad Pivot" - badRightEVJob = "lapack: bad RightEVJob" - badSVDJob = "lapack: bad SVDJob" - badSchurComp = "lapack: bad SchurComp" - badSchurJob = "lapack: bad SchurJob" - badSide = "lapack: bad Side" - badSort = "lapack: bad Sort" - badStoreV = "lapack: bad StoreV" - badTrans = "lapack: bad Trans" - badUpdateSchurComp = "lapack: bad UpdateSchurComp" - badUplo = "lapack: bad Uplo" - bothSVDOver = "lapack: both jobU and jobVT are lapack.SVDOverwrite" - - // Panic strings for bad numerical and string values. - badIfst = "lapack: ifst out of range" - badIhi = "lapack: ihi out of range" - badIhiz = "lapack: ihiz out of range" - badIlo = "lapack: ilo out of range" - badIloz = "lapack: iloz out of range" - badIlst = "lapack: ilst out of range" - badIsave = "lapack: bad isave value" - badIspec = "lapack: bad ispec value" - badJ1 = "lapack: j1 out of range" - badJpvt = "lapack: bad element of jpvt" - badK1 = "lapack: k1 out of range" - badK2 = "lapack: k2 out of range" - badKacc22 = "lapack: invalid value of kacc22" - badKbot = "lapack: kbot out of range" - badKtop = "lapack: ktop out of range" - badLWork = "lapack: insufficient declared workspace length" - badMm = "lapack: mm out of range" - badN1 = "lapack: bad value of n1" - badN2 = "lapack: bad value of n2" - badNa = "lapack: bad value of na" - badName = "lapack: bad name" - badNh = "lapack: bad value of nh" - badNw = "lapack: bad value of nw" - badPp = "lapack: bad value of pp" - badShifts = "lapack: bad shifts" - i0LT0 = "lapack: i0 < 0" - kGTM = "lapack: k > m" - kGTN = "lapack: k > n" - kLT0 = "lapack: k < 0" - kLT1 = "lapack: k < 1" - kdLT0 = "lapack: kd < 0" - mGTN = "lapack: m > n" - mLT0 = "lapack: m < 0" - mmLT0 = "lapack: mm < 0" - n0LT0 = "lapack: n0 < 0" - nGTM = "lapack: n > m" - nLT0 = "lapack: n < 0" - nLT1 = "lapack: n < 1" - nLTM = "lapack: n < m" - nanCFrom = "lapack: cfrom is NaN" - nanCTo = "lapack: cto is NaN" - nbGTM = "lapack: nb > m" - nbGTN = "lapack: nb > n" - nbLT0 = "lapack: nb < 0" - nccLT0 = "lapack: ncc < 0" - ncvtLT0 = "lapack: ncvt < 0" - negANorm = "lapack: anorm < 0" - negZ = "lapack: negative z value" - nhLT0 = "lapack: nh < 0" - notIsolated = "lapack: block is not isolated" - nrhsLT0 = "lapack: nrhs < 0" - nruLT0 = "lapack: nru < 0" - nshftsLT0 = "lapack: nshfts < 0" - nshftsOdd = "lapack: nshfts must be even" - nvLT0 = "lapack: nv < 0" - offsetGTM = "lapack: offset > m" - offsetLT0 = "lapack: offset < 0" - pLT0 = "lapack: p < 0" - recurLT0 = "lapack: recur < 0" - zeroCFrom = "lapack: zero cfrom" - - // Panic strings for bad slice lengths. - badLenAlpha = "lapack: bad length of alpha" - badLenBeta = "lapack: bad length of beta" - badLenIpiv = "lapack: bad length of ipiv" - badLenJpvt = "lapack: bad length of jpvt" - badLenK = "lapack: bad length of k" - badLenSelected = "lapack: bad length of selected" - badLenSi = "lapack: bad length of si" - badLenSr = "lapack: bad length of sr" - badLenTau = "lapack: bad length of tau" - badLenWi = "lapack: bad length of wi" - badLenWr = "lapack: bad length of wr" - - // Panic strings for insufficient slice lengths. - shortA = "lapack: insufficient length of a" - shortAB = "lapack: insufficient length of ab" - shortAuxv = "lapack: insufficient length of auxv" - shortB = "lapack: insufficient length of b" - shortC = "lapack: insufficient length of c" - shortCNorm = "lapack: insufficient length of cnorm" - shortD = "lapack: insufficient length of d" - shortE = "lapack: insufficient length of e" - shortF = "lapack: insufficient length of f" - shortH = "lapack: insufficient length of h" - shortIWork = "lapack: insufficient length of iwork" - shortIsgn = "lapack: insufficient length of isgn" - shortQ = "lapack: insufficient length of q" - shortS = "lapack: insufficient length of s" - shortScale = "lapack: insufficient length of scale" - shortT = "lapack: insufficient length of t" - shortTau = "lapack: insufficient length of tau" - shortTauP = "lapack: insufficient length of tauP" - shortTauQ = "lapack: insufficient length of tauQ" - shortU = "lapack: insufficient length of u" - shortV = "lapack: insufficient length of v" - shortVL = "lapack: insufficient length of vl" - shortVR = "lapack: insufficient length of vr" - shortVT = "lapack: insufficient length of vt" - shortVn1 = "lapack: insufficient length of vn1" - shortVn2 = "lapack: insufficient length of vn2" - shortW = "lapack: insufficient length of w" - shortWH = "lapack: insufficient length of wh" - shortWV = "lapack: insufficient length of wv" - shortWi = "lapack: insufficient length of wi" - shortWork = "lapack: insufficient length of work" - shortWr = "lapack: insufficient length of wr" - shortX = "lapack: insufficient length of x" - shortY = "lapack: insufficient length of y" - shortZ = "lapack: insufficient length of z" - - // Panic strings for bad leading dimensions of matrices. - badLdA = "lapack: bad leading dimension of A" - badLdB = "lapack: bad leading dimension of B" - badLdC = "lapack: bad leading dimension of C" - badLdF = "lapack: bad leading dimension of F" - badLdH = "lapack: bad leading dimension of H" - badLdQ = "lapack: bad leading dimension of Q" - badLdT = "lapack: bad leading dimension of T" - badLdU = "lapack: bad leading dimension of U" - badLdV = "lapack: bad leading dimension of V" - badLdVL = "lapack: bad leading dimension of VL" - badLdVR = "lapack: bad leading dimension of VR" - badLdVT = "lapack: bad leading dimension of VT" - badLdW = "lapack: bad leading dimension of W" - badLdWH = "lapack: bad leading dimension of WH" - badLdWV = "lapack: bad leading dimension of WV" - badLdWork = "lapack: bad leading dimension of Work" - badLdX = "lapack: bad leading dimension of X" - badLdY = "lapack: bad leading dimension of Y" - badLdZ = "lapack: bad leading dimension of Z" - - // Panic strings for bad vector increments. - absIncNotOne = "lapack: increment not one or negative one" - badIncX = "lapack: incX <= 0" - badIncY = "lapack: incY <= 0" - zeroIncV = "lapack: incv == 0" -) diff --git a/vendor/gonum.org/v1/gonum/lapack/gonum/iladlc.go b/vendor/gonum.org/v1/gonum/lapack/gonum/iladlc.go deleted file mode 100644 index b251d72691..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/gonum/iladlc.go +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright ©2015 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -// Iladlc scans a matrix for its last non-zero column. Returns -1 if the matrix -// is all zeros. -// -// Iladlc is an internal routine. It is exported for testing purposes. -func (Implementation) Iladlc(m, n int, a []float64, lda int) int { - switch { - case m < 0: - panic(mLT0) - case n < 0: - panic(nLT0) - case lda < max(1, n): - panic(badLdA) - } - - if n == 0 || m == 0 { - return -1 - } - - if len(a) < (m-1)*lda+n { - panic(shortA) - } - - // Test common case where corner is non-zero. - if a[n-1] != 0 || a[(m-1)*lda+(n-1)] != 0 { - return n - 1 - } - - // Scan each row tracking the highest column seen. - highest := -1 - for i := 0; i < m; i++ { - for j := n - 1; j >= 0; j-- { - if a[i*lda+j] != 0 { - highest = max(highest, j) - break - } - } - } - return highest -} diff --git a/vendor/gonum.org/v1/gonum/lapack/gonum/iladlr.go b/vendor/gonum.org/v1/gonum/lapack/gonum/iladlr.go deleted file mode 100644 index b73fe18ea2..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/gonum/iladlr.go +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright ©2015 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -// Iladlr scans a matrix for its last non-zero row. Returns -1 if the matrix -// is all zeros. -// -// Iladlr is an internal routine. It is exported for testing purposes. -func (Implementation) Iladlr(m, n int, a []float64, lda int) int { - switch { - case m < 0: - panic(mLT0) - case n < 0: - panic(nLT0) - case lda < max(1, n): - panic(badLdA) - } - - if n == 0 || m == 0 { - return -1 - } - - if len(a) < (m-1)*lda+n { - panic(shortA) - } - - // Check the common case where the corner is non-zero - if a[(m-1)*lda] != 0 || a[(m-1)*lda+n-1] != 0 { - return m - 1 - } - for i := m - 1; i >= 0; i-- { - for j := 0; j < n; j++ { - if a[i*lda+j] != 0 { - return i - } - } - } - return -1 -} diff --git a/vendor/gonum.org/v1/gonum/lapack/gonum/ilaenv.go b/vendor/gonum.org/v1/gonum/lapack/gonum/ilaenv.go deleted file mode 100644 index c134d21bb1..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/gonum/ilaenv.go +++ /dev/null @@ -1,387 +0,0 @@ -// Copyright ©2015 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -// Ilaenv returns algorithm tuning parameters for the algorithm given by the -// input string. ispec specifies the parameter to return: -// 1: The optimal block size for a blocked algorithm. -// 2: The minimum block size for a blocked algorithm. -// 3: The block size of unprocessed data at which a blocked algorithm should -// crossover to an unblocked version. -// 4: The number of shifts. -// 5: The minimum column dimension for blocking to be used. -// 6: The crossover point for SVD (to use QR factorization or not). -// 7: The number of processors. -// 8: The crossover point for multi-shift in QR and QZ methods for non-symmetric eigenvalue problems. -// 9: Maximum size of the subproblems in divide-and-conquer algorithms. -// 10: ieee NaN arithmetic can be trusted not to trap. -// 11: infinity arithmetic can be trusted not to trap. -// 12...16: parameters for Dhseqr and related functions. See Iparmq for more -// information. -// -// Ilaenv is an internal routine. It is exported for testing purposes. -func (impl Implementation) Ilaenv(ispec int, name string, opts string, n1, n2, n3, n4 int) int { - // TODO(btracey): Replace this with a constant lookup? A list of constants? - sname := name[0] == 'S' || name[0] == 'D' - cname := name[0] == 'C' || name[0] == 'Z' - if !sname && !cname { - panic(badName) - } - c2 := name[1:3] - c3 := name[3:6] - c4 := c3[1:3] - - switch ispec { - default: - panic(badIspec) - case 1: - switch c2 { - default: - panic(badName) - case "GE": - switch c3 { - default: - panic(badName) - case "TRF": - if sname { - return 64 - } - return 64 - case "QRF", "RQF", "LQF", "QLF": - if sname { - return 32 - } - return 32 - case "HRD": - if sname { - return 32 - } - return 32 - case "BRD": - if sname { - return 32 - } - return 32 - case "TRI": - if sname { - return 64 - } - return 64 - } - case "PO": - switch c3 { - default: - panic(badName) - case "TRF": - if sname { - return 64 - } - return 64 - } - case "SY": - switch c3 { - default: - panic(badName) - case "TRF": - if sname { - return 64 - } - return 64 - case "TRD": - return 32 - case "GST": - return 64 - } - case "HE": - switch c3 { - default: - panic(badName) - case "TRF": - return 64 - case "TRD": - return 32 - case "GST": - return 64 - } - case "OR": - switch c3[0] { - default: - panic(badName) - case 'G': - switch c3[1:] { - default: - panic(badName) - case "QR", "RQ", "LQ", "QL", "HR", "TR", "BR": - return 32 - } - case 'M': - switch c3[1:] { - default: - panic(badName) - case "QR", "RQ", "LQ", "QL", "HR", "TR", "BR": - return 32 - } - } - case "UN": - switch c3[0] { - default: - panic(badName) - case 'G': - switch c3[1:] { - default: - panic(badName) - case "QR", "RQ", "LQ", "QL", "HR", "TR", "BR": - return 32 - } - case 'M': - switch c3[1:] { - default: - panic(badName) - case "QR", "RQ", "LQ", "QL", "HR", "TR", "BR": - return 32 - } - } - case "GB": - switch c3 { - default: - panic(badName) - case "TRF": - if sname { - if n4 <= 64 { - return 1 - } - return 32 - } - if n4 <= 64 { - return 1 - } - return 32 - } - case "PB": - switch c3 { - default: - panic(badName) - case "TRF": - if sname { - if n4 <= 64 { - return 1 - } - return 32 - } - if n4 <= 64 { - return 1 - } - return 32 - } - case "TR": - switch c3 { - default: - panic(badName) - case "TRI": - if sname { - return 64 - } - return 64 - case "EVC": - if sname { - return 64 - } - return 64 - } - case "LA": - switch c3 { - default: - panic(badName) - case "UUM": - if sname { - return 64 - } - return 64 - } - case "ST": - if sname && c3 == "EBZ" { - return 1 - } - panic(badName) - } - case 2: - switch c2 { - default: - panic(badName) - case "GE": - switch c3 { - default: - panic(badName) - case "QRF", "RQF", "LQF", "QLF": - if sname { - return 2 - } - return 2 - case "HRD": - if sname { - return 2 - } - return 2 - case "BRD": - if sname { - return 2 - } - return 2 - case "TRI": - if sname { - return 2 - } - return 2 - } - case "SY": - switch c3 { - default: - panic(badName) - case "TRF": - if sname { - return 8 - } - return 8 - case "TRD": - if sname { - return 2 - } - panic(badName) - } - case "HE": - if c3 == "TRD" { - return 2 - } - panic(badName) - case "OR": - if !sname { - panic(badName) - } - switch c3[0] { - default: - panic(badName) - case 'G': - switch c4 { - default: - panic(badName) - case "QR", "RQ", "LQ", "QL", "HR", "TR", "BR": - return 2 - } - case 'M': - switch c4 { - default: - panic(badName) - case "QR", "RQ", "LQ", "QL", "HR", "TR", "BR": - return 2 - } - } - case "UN": - switch c3[0] { - default: - panic(badName) - case 'G': - switch c4 { - default: - panic(badName) - case "QR", "RQ", "LQ", "QL", "HR", "TR", "BR": - return 2 - } - case 'M': - switch c4 { - default: - panic(badName) - case "QR", "RQ", "LQ", "QL", "HR", "TR", "BR": - return 2 - } - } - } - case 3: - switch c2 { - default: - panic(badName) - case "GE": - switch c3 { - default: - panic(badName) - case "QRF", "RQF", "LQF", "QLF": - if sname { - return 128 - } - return 128 - case "HRD": - if sname { - return 128 - } - return 128 - case "BRD": - if sname { - return 128 - } - return 128 - } - case "SY": - if sname && c3 == "TRD" { - return 32 - } - panic(badName) - case "HE": - if c3 == "TRD" { - return 32 - } - panic(badName) - case "OR": - switch c3[0] { - default: - panic(badName) - case 'G': - switch c4 { - default: - panic(badName) - case "QR", "RQ", "LQ", "QL", "HR", "TR", "BR": - return 128 - } - } - case "UN": - switch c3[0] { - default: - panic(badName) - case 'G': - switch c4 { - default: - panic(badName) - case "QR", "RQ", "LQ", "QL", "HR", "TR", "BR": - return 128 - } - } - } - case 4: - // Used by xHSEQR - return 6 - case 5: - // Not used - return 2 - case 6: - // Used by xGELSS and xGESVD - return int(float64(min(n1, n2)) * 1.6) - case 7: - // Not used - return 1 - case 8: - // Used by xHSEQR - return 50 - case 9: - // used by xGELSD and xGESDD - return 25 - case 10: - // Go guarantees ieee - return 1 - case 11: - // Go guarantees ieee - return 1 - case 12, 13, 14, 15, 16: - // Dhseqr and related functions for eigenvalue problems. - return impl.Iparmq(ispec, name, opts, n1, n2, n3, n4) - } -} diff --git a/vendor/gonum.org/v1/gonum/lapack/gonum/iparmq.go b/vendor/gonum.org/v1/gonum/lapack/gonum/iparmq.go deleted file mode 100644 index 3800f11ce1..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/gonum/iparmq.go +++ /dev/null @@ -1,115 +0,0 @@ -// Copyright ©2016 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import "math" - -// Iparmq returns problem and machine dependent parameters useful for Dhseqr and -// related subroutines for eigenvalue problems. -// -// ispec specifies the parameter to return: -// 12: Crossover point between Dlahqr and Dlaqr0. Will be at least 11. -// 13: Deflation window size. -// 14: Nibble crossover point. Determines when to skip a multi-shift QR sweep. -// 15: Number of simultaneous shifts in a multishift QR iteration. -// 16: Select structured matrix multiply. -// For other values of ispec Iparmq will panic. -// -// name is the name of the calling function. name must be in uppercase but this -// is not checked. -// -// opts is not used and exists for future use. -// -// n is the order of the Hessenberg matrix H. -// -// ilo and ihi specify the block [ilo:ihi+1,ilo:ihi+1] that is being processed. -// -// lwork is the amount of workspace available. -// -// Except for ispec input parameters are not checked. -// -// Iparmq is an internal routine. It is exported for testing purposes. -func (Implementation) Iparmq(ispec int, name, opts string, n, ilo, ihi, lwork int) int { - nh := ihi - ilo + 1 - ns := 2 - switch { - case nh >= 30: - ns = 4 - case nh >= 60: - ns = 10 - case nh >= 150: - ns = max(10, nh/int(math.Log(float64(nh))/math.Ln2)) - case nh >= 590: - ns = 64 - case nh >= 3000: - ns = 128 - case nh >= 6000: - ns = 256 - } - ns = max(2, ns-(ns%2)) - - switch ispec { - default: - panic(badIspec) - - case 12: - // Matrices of order smaller than nmin get sent to Dlahqr, the - // classic double shift algorithm. This must be at least 11. - const nmin = 75 - return nmin - - case 13: - const knwswp = 500 - if nh <= knwswp { - return ns - } - return 3 * ns / 2 - - case 14: - // Skip a computationally expensive multi-shift QR sweep with - // Dlaqr5 whenever aggressive early deflation finds at least - // nibble*(window size)/100 deflations. The default, small, - // value reflects the expectation that the cost of looking - // through the deflation window with Dlaqr3 will be - // substantially smaller. - const nibble = 14 - return nibble - - case 15: - return ns - - case 16: - if len(name) != 6 { - panic(badName) - } - const ( - k22min = 14 - kacmin = 14 - ) - var acc22 int - switch { - case name[1:] == "GGHRD" || name[1:] == "GGHD3": - acc22 = 1 - if nh >= k22min { - acc22 = 2 - } - case name[3:] == "EXC": - if nh >= kacmin { - acc22 = 1 - } - if nh >= k22min { - acc22 = 2 - } - case name[1:] == "HSEQR" || name[1:5] == "LAQR": - if ns >= kacmin { - acc22 = 1 - } - if ns >= k22min { - acc22 = 2 - } - } - return acc22 - } -} diff --git a/vendor/gonum.org/v1/gonum/lapack/gonum/lapack.go b/vendor/gonum.org/v1/gonum/lapack/gonum/lapack.go deleted file mode 100644 index 434da02d2d..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/gonum/lapack.go +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright ©2015 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gonum - -import "gonum.org/v1/gonum/lapack" - -// Implementation is the native Go implementation of LAPACK routines. It -// is built on top of calls to the return of blas64.Implementation(), so while -// this code is in pure Go, the underlying BLAS implementation may not be. -type Implementation struct{} - -var _ lapack.Float64 = Implementation{} - -func min(a, b int) int { - if a < b { - return a - } - return b -} - -func max(a, b int) int { - if a > b { - return a - } - return b -} - -func abs(a int) int { - if a < 0 { - return -a - } - return a -} - -const ( - // dlamchE is the machine epsilon. For IEEE this is 2^{-53}. - dlamchE = 1.0 / (1 << 53) - - // dlamchB is the radix of the machine (the base of the number system). - dlamchB = 2 - - // dlamchP is base * eps. - dlamchP = dlamchB * dlamchE - - // dlamchS is the "safe minimum", that is, the lowest number such that - // 1/dlamchS does not overflow, or also the smallest normal number. - // For IEEE this is 2^{-1022}. - dlamchS = 1.0 / (1 << 256) / (1 << 256) / (1 << 256) / (1 << 254) -) diff --git a/vendor/gonum.org/v1/gonum/lapack/lapack.go b/vendor/gonum.org/v1/gonum/lapack/lapack.go deleted file mode 100644 index eef14c17a4..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/lapack.go +++ /dev/null @@ -1,213 +0,0 @@ -// Copyright ©2015 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package lapack - -import "gonum.org/v1/gonum/blas" - -// Complex128 defines the public complex128 LAPACK API supported by gonum/lapack. -type Complex128 interface{} - -// Float64 defines the public float64 LAPACK API supported by gonum/lapack. -type Float64 interface { - Dgecon(norm MatrixNorm, n int, a []float64, lda int, anorm float64, work []float64, iwork []int) float64 - Dgeev(jobvl LeftEVJob, jobvr RightEVJob, n int, a []float64, lda int, wr, wi []float64, vl []float64, ldvl int, vr []float64, ldvr int, work []float64, lwork int) (first int) - Dgels(trans blas.Transpose, m, n, nrhs int, a []float64, lda int, b []float64, ldb int, work []float64, lwork int) bool - Dgelqf(m, n int, a []float64, lda int, tau, work []float64, lwork int) - Dgeqrf(m, n int, a []float64, lda int, tau, work []float64, lwork int) - Dgesvd(jobU, jobVT SVDJob, m, n int, a []float64, lda int, s, u []float64, ldu int, vt []float64, ldvt int, work []float64, lwork int) (ok bool) - Dgetrf(m, n int, a []float64, lda int, ipiv []int) (ok bool) - Dgetri(n int, a []float64, lda int, ipiv []int, work []float64, lwork int) (ok bool) - Dgetrs(trans blas.Transpose, n, nrhs int, a []float64, lda int, ipiv []int, b []float64, ldb int) - Dggsvd3(jobU, jobV, jobQ GSVDJob, m, n, p int, a []float64, lda int, b []float64, ldb int, alpha, beta, u []float64, ldu int, v []float64, ldv int, q []float64, ldq int, work []float64, lwork int, iwork []int) (k, l int, ok bool) - Dlantr(norm MatrixNorm, uplo blas.Uplo, diag blas.Diag, m, n int, a []float64, lda int, work []float64) float64 - Dlange(norm MatrixNorm, m, n int, a []float64, lda int, work []float64) float64 - Dlansy(norm MatrixNorm, uplo blas.Uplo, n int, a []float64, lda int, work []float64) float64 - Dlapmt(forward bool, m, n int, x []float64, ldx int, k []int) - Dormqr(side blas.Side, trans blas.Transpose, m, n, k int, a []float64, lda int, tau, c []float64, ldc int, work []float64, lwork int) - Dormlq(side blas.Side, trans blas.Transpose, m, n, k int, a []float64, lda int, tau, c []float64, ldc int, work []float64, lwork int) - Dpocon(uplo blas.Uplo, n int, a []float64, lda int, anorm float64, work []float64, iwork []int) float64 - Dpotrf(ul blas.Uplo, n int, a []float64, lda int) (ok bool) - Dpotri(ul blas.Uplo, n int, a []float64, lda int) (ok bool) - Dpotrs(ul blas.Uplo, n, nrhs int, a []float64, lda int, b []float64, ldb int) - Dsyev(jobz EVJob, uplo blas.Uplo, n int, a []float64, lda int, w, work []float64, lwork int) (ok bool) - Dtrcon(norm MatrixNorm, uplo blas.Uplo, diag blas.Diag, n int, a []float64, lda int, work []float64, iwork []int) float64 - Dtrtri(uplo blas.Uplo, diag blas.Diag, n int, a []float64, lda int) (ok bool) - Dtrtrs(uplo blas.Uplo, trans blas.Transpose, diag blas.Diag, n, nrhs int, a []float64, lda int, b []float64, ldb int) (ok bool) -} - -// Direct specifies the direction of the multiplication for the Householder matrix. -type Direct byte - -const ( - Forward Direct = 'F' // Reflectors are right-multiplied, H_0 * H_1 * ... * H_{k-1}. - Backward Direct = 'B' // Reflectors are left-multiplied, H_{k-1} * ... * H_1 * H_0. -) - -// Sort is the sorting order. -type Sort byte - -const ( - SortIncreasing Sort = 'I' - SortDecreasing Sort = 'D' -) - -// StoreV indicates the storage direction of elementary reflectors. -type StoreV byte - -const ( - ColumnWise StoreV = 'C' // Reflector stored in a column of the matrix. - RowWise StoreV = 'R' // Reflector stored in a row of the matrix. -) - -// MatrixNorm represents the kind of matrix norm to compute. -type MatrixNorm byte - -const ( - MaxAbs MatrixNorm = 'M' // max(abs(A(i,j))) - MaxColumnSum MatrixNorm = 'O' // Maximum absolute column sum (one norm) - MaxRowSum MatrixNorm = 'I' // Maximum absolute row sum (infinity norm) - Frobenius MatrixNorm = 'F' // Frobenius norm (sqrt of sum of squares) -) - -// MatrixType represents the kind of matrix represented in the data. -type MatrixType byte - -const ( - General MatrixType = 'G' // A general dense matrix. - UpperTri MatrixType = 'U' // An upper triangular matrix. - LowerTri MatrixType = 'L' // A lower triangular matrix. -) - -// Pivot specifies the pivot type for plane rotations. -type Pivot byte - -const ( - Variable Pivot = 'V' - Top Pivot = 'T' - Bottom Pivot = 'B' -) - -// ApplyOrtho specifies which orthogonal matrix is applied in Dormbr. -type ApplyOrtho byte - -const ( - ApplyP ApplyOrtho = 'P' // Apply P or P^T. - ApplyQ ApplyOrtho = 'Q' // Apply Q or Q^T. -) - -// GenOrtho specifies which orthogonal matrix is generated in Dorgbr. -type GenOrtho byte - -const ( - GeneratePT GenOrtho = 'P' // Generate P^T. - GenerateQ GenOrtho = 'Q' // Generate Q. -) - -// SVDJob specifies the singular vector computation type for SVD. -type SVDJob byte - -const ( - SVDAll SVDJob = 'A' // Compute all columns of the orthogonal matrix U or V. - SVDStore SVDJob = 'S' // Compute the singular vectors and store them in the orthogonal matrix U or V. - SVDOverwrite SVDJob = 'O' // Compute the singular vectors and overwrite them on the input matrix A. - SVDNone SVDJob = 'N' // Do not compute singular vectors. -) - -// GSVDJob specifies the singular vector computation type for Generalized SVD. -type GSVDJob byte - -const ( - GSVDU GSVDJob = 'U' // Compute orthogonal matrix U. - GSVDV GSVDJob = 'V' // Compute orthogonal matrix V. - GSVDQ GSVDJob = 'Q' // Compute orthogonal matrix Q. - GSVDUnit GSVDJob = 'I' // Use unit-initialized matrix. - GSVDNone GSVDJob = 'N' // Do not compute orthogonal matrix. -) - -// EVComp specifies how eigenvectors are computed in Dsteqr. -type EVComp byte - -const ( - EVOrig EVComp = 'V' // Compute eigenvectors of the original symmetric matrix. - EVTridiag EVComp = 'I' // Compute eigenvectors of the tridiagonal matrix. - EVCompNone EVComp = 'N' // Do not compute eigenvectors. -) - -// EVJob specifies whether eigenvectors are computed in Dsyev. -type EVJob byte - -const ( - EVCompute EVJob = 'V' // Compute eigenvectors. - EVNone EVJob = 'N' // Do not compute eigenvectors. -) - -// LeftEVJob specifies whether left eigenvectors are computed in Dgeev. -type LeftEVJob byte - -const ( - LeftEVCompute LeftEVJob = 'V' // Compute left eigenvectors. - LeftEVNone LeftEVJob = 'N' // Do not compute left eigenvectors. -) - -// RightEVJob specifies whether right eigenvectors are computed in Dgeev. -type RightEVJob byte - -const ( - RightEVCompute RightEVJob = 'V' // Compute right eigenvectors. - RightEVNone RightEVJob = 'N' // Do not compute right eigenvectors. -) - -// BalanceJob specifies matrix balancing operation. -type BalanceJob byte - -const ( - Permute BalanceJob = 'P' - Scale BalanceJob = 'S' - PermuteScale BalanceJob = 'B' - BalanceNone BalanceJob = 'N' -) - -// SchurJob specifies whether the Schur form is computed in Dhseqr. -type SchurJob byte - -const ( - EigenvaluesOnly SchurJob = 'E' - EigenvaluesAndSchur SchurJob = 'S' -) - -// SchurComp specifies whether and how the Schur vectors are computed in Dhseqr. -type SchurComp byte - -const ( - SchurOrig SchurComp = 'V' // Compute Schur vectors of the original matrix. - SchurHess SchurComp = 'I' // Compute Schur vectors of the upper Hessenberg matrix. - SchurNone SchurComp = 'N' // Do not compute Schur vectors. -) - -// UpdateSchurComp specifies whether the matrix of Schur vectors is updated in Dtrexc. -type UpdateSchurComp byte - -const ( - UpdateSchur UpdateSchurComp = 'V' // Update the matrix of Schur vectors. - UpdateSchurNone UpdateSchurComp = 'N' // Do not update the matrix of Schur vectors. -) - -// EVSide specifies what eigenvectors are computed in Dtrevc3. -type EVSide byte - -const ( - EVRight EVSide = 'R' // Compute only right eigenvectors. - EVLeft EVSide = 'L' // Compute only left eigenvectors. - EVBoth EVSide = 'B' // Compute both right and left eigenvectors. -) - -// EVHowMany specifies which eigenvectors are computed in Dtrevc3 and how. -type EVHowMany byte - -const ( - EVAll EVHowMany = 'A' // Compute all right and/or left eigenvectors. - EVAllMulQ EVHowMany = 'B' // Compute all right and/or left eigenvectors multiplied by an input matrix. - EVSelected EVHowMany = 'S' // Compute selected right and/or left eigenvectors. -) diff --git a/vendor/gonum.org/v1/gonum/lapack/lapack64/doc.go b/vendor/gonum.org/v1/gonum/lapack/lapack64/doc.go deleted file mode 100644 index da19e3ec78..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/lapack64/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright ©2017 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package lapack64 provides a set of convenient wrapper functions for LAPACK -// calls, as specified in the netlib standard (www.netlib.org). -// -// The native Go routines are used by default, and the Use function can be used -// to set an alternative implementation. -// -// If the type of matrix (General, Symmetric, etc.) is known and fixed, it is -// used in the wrapper signature. In many cases, however, the type of the matrix -// changes during the call to the routine, for example the matrix is symmetric on -// entry and is triangular on exit. In these cases the correct types should be checked -// in the documentation. -// -// The full set of Lapack functions is very large, and it is not clear that a -// full implementation is desirable, let alone feasible. Please open up an issue -// if there is a specific function you need and/or are willing to implement. -package lapack64 // import "gonum.org/v1/gonum/lapack/lapack64" diff --git a/vendor/gonum.org/v1/gonum/lapack/lapack64/lapack64.go b/vendor/gonum.org/v1/gonum/lapack/lapack64/lapack64.go deleted file mode 100644 index 208ee1f43f..0000000000 --- a/vendor/gonum.org/v1/gonum/lapack/lapack64/lapack64.go +++ /dev/null @@ -1,581 +0,0 @@ -// Copyright ©2015 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package lapack64 - -import ( - "gonum.org/v1/gonum/blas" - "gonum.org/v1/gonum/blas/blas64" - "gonum.org/v1/gonum/lapack" - "gonum.org/v1/gonum/lapack/gonum" -) - -var lapack64 lapack.Float64 = gonum.Implementation{} - -// Use sets the LAPACK float64 implementation to be used by subsequent BLAS calls. -// The default implementation is native.Implementation. -func Use(l lapack.Float64) { - lapack64 = l -} - -func max(a, b int) int { - if a > b { - return a - } - return b -} - -// Potrf computes the Cholesky factorization of a. -// The factorization has the form -// A = U^T * U if a.Uplo == blas.Upper, or -// A = L * L^T if a.Uplo == blas.Lower, -// where U is an upper triangular matrix and L is lower triangular. -// The triangular matrix is returned in t, and the underlying data between -// a and t is shared. The returned bool indicates whether a is positive -// definite and the factorization could be finished. -func Potrf(a blas64.Symmetric) (t blas64.Triangular, ok bool) { - ok = lapack64.Dpotrf(a.Uplo, a.N, a.Data, max(1, a.Stride)) - t.Uplo = a.Uplo - t.N = a.N - t.Data = a.Data - t.Stride = a.Stride - t.Diag = blas.NonUnit - return -} - -// Potri computes the inverse of a real symmetric positive definite matrix A -// using its Cholesky factorization. -// -// On entry, t contains the triangular factor U or L from the Cholesky -// factorization A = U^T*U or A = L*L^T, as computed by Potrf. -// -// On return, the upper or lower triangle of the (symmetric) inverse of A is -// stored in t, overwriting the input factor U or L, and also returned in a. The -// underlying data between a and t is shared. -// -// The returned bool indicates whether the inverse was computed successfully. -func Potri(t blas64.Triangular) (a blas64.Symmetric, ok bool) { - ok = lapack64.Dpotri(t.Uplo, t.N, t.Data, max(1, t.Stride)) - a.Uplo = t.Uplo - a.N = t.N - a.Data = t.Data - a.Stride = t.Stride - return -} - -// Potrs solves a system of n linear equations A*X = B where A is an n×n -// symmetric positive definite matrix and B is an n×nrhs matrix, using the -// Cholesky factorization A = U^T*U or A = L*L^T. t contains the corresponding -// triangular factor as returned by Potrf. On entry, B contains the right-hand -// side matrix B, on return it contains the solution matrix X. -func Potrs(t blas64.Triangular, b blas64.General) { - lapack64.Dpotrs(t.Uplo, t.N, b.Cols, t.Data, max(1, t.Stride), b.Data, max(1, b.Stride)) -} - -// Gecon estimates the reciprocal of the condition number of the n×n matrix A -// given the LU decomposition of the matrix. The condition number computed may -// be based on the 1-norm or the ∞-norm. -// -// a contains the result of the LU decomposition of A as computed by Getrf. -// -// anorm is the corresponding 1-norm or ∞-norm of the original matrix A. -// -// work is a temporary data slice of length at least 4*n and Gecon will panic otherwise. -// -// iwork is a temporary data slice of length at least n and Gecon will panic otherwise. -func Gecon(norm lapack.MatrixNorm, a blas64.General, anorm float64, work []float64, iwork []int) float64 { - return lapack64.Dgecon(norm, a.Cols, a.Data, max(1, a.Stride), anorm, work, iwork) -} - -// Gels finds a minimum-norm solution based on the matrices A and B using the -// QR or LQ factorization. Gels returns false if the matrix -// A is singular, and true if this solution was successfully found. -// -// The minimization problem solved depends on the input parameters. -// -// 1. If m >= n and trans == blas.NoTrans, Gels finds X such that || A*X - B||_2 -// is minimized. -// 2. If m < n and trans == blas.NoTrans, Gels finds the minimum norm solution of -// A * X = B. -// 3. If m >= n and trans == blas.Trans, Gels finds the minimum norm solution of -// A^T * X = B. -// 4. If m < n and trans == blas.Trans, Gels finds X such that || A*X - B||_2 -// is minimized. -// Note that the least-squares solutions (cases 1 and 3) perform the minimization -// per column of B. This is not the same as finding the minimum-norm matrix. -// -// The matrix A is a general matrix of size m×n and is modified during this call. -// The input matrix B is of size max(m,n)×nrhs, and serves two purposes. On entry, -// the elements of b specify the input matrix B. B has size m×nrhs if -// trans == blas.NoTrans, and n×nrhs if trans == blas.Trans. On exit, the -// leading submatrix of b contains the solution vectors X. If trans == blas.NoTrans, -// this submatrix is of size n×nrhs, and of size m×nrhs otherwise. -// -// Work is temporary storage, and lwork specifies the usable memory length. -// At minimum, lwork >= max(m,n) + max(m,n,nrhs), and this function will panic -// otherwise. A longer work will enable blocked algorithms to be called. -// In the special case that lwork == -1, work[0] will be set to the optimal working -// length. -func Gels(trans blas.Transpose, a blas64.General, b blas64.General, work []float64, lwork int) bool { - return lapack64.Dgels(trans, a.Rows, a.Cols, b.Cols, a.Data, max(1, a.Stride), b.Data, max(1, b.Stride), work, lwork) -} - -// Geqrf computes the QR factorization of the m×n matrix A using a blocked -// algorithm. A is modified to contain the information to construct Q and R. -// The upper triangle of a contains the matrix R. The lower triangular elements -// (not including the diagonal) contain the elementary reflectors. tau is modified -// to contain the reflector scales. tau must have length at least min(m,n), and -// this function will panic otherwise. -// -// The ith elementary reflector can be explicitly constructed by first extracting -// the -// v[j] = 0 j < i -// v[j] = 1 j == i -// v[j] = a[j*lda+i] j > i -// and computing H_i = I - tau[i] * v * v^T. -// -// The orthonormal matrix Q can be constucted from a product of these elementary -// reflectors, Q = H_0 * H_1 * ... * H_{k-1}, where k = min(m,n). -// -// Work is temporary storage, and lwork specifies the usable memory length. -// At minimum, lwork >= m and this function will panic otherwise. -// Geqrf is a blocked QR factorization, but the block size is limited -// by the temporary space available. If lwork == -1, instead of performing Geqrf, -// the optimal work length will be stored into work[0]. -func Geqrf(a blas64.General, tau, work []float64, lwork int) { - lapack64.Dgeqrf(a.Rows, a.Cols, a.Data, max(1, a.Stride), tau, work, lwork) -} - -// Gelqf computes the LQ factorization of the m×n matrix A using a blocked -// algorithm. A is modified to contain the information to construct L and Q. The -// lower triangle of a contains the matrix L. The elements above the diagonal -// and the slice tau represent the matrix Q. tau is modified to contain the -// reflector scales. tau must have length at least min(m,n), and this function -// will panic otherwise. -// -// See Geqrf for a description of the elementary reflectors and orthonormal -// matrix Q. Q is constructed as a product of these elementary reflectors, -// Q = H_{k-1} * ... * H_1 * H_0. -// -// Work is temporary storage, and lwork specifies the usable memory length. -// At minimum, lwork >= m and this function will panic otherwise. -// Gelqf is a blocked LQ factorization, but the block size is limited -// by the temporary space available. If lwork == -1, instead of performing Gelqf, -// the optimal work length will be stored into work[0]. -func Gelqf(a blas64.General, tau, work []float64, lwork int) { - lapack64.Dgelqf(a.Rows, a.Cols, a.Data, max(1, a.Stride), tau, work, lwork) -} - -// Gesvd computes the singular value decomposition of the input matrix A. -// -// The singular value decomposition is -// A = U * Sigma * V^T -// where Sigma is an m×n diagonal matrix containing the singular values of A, -// U is an m×m orthogonal matrix and V is an n×n orthogonal matrix. The first -// min(m,n) columns of U and V are the left and right singular vectors of A -// respectively. -// -// jobU and jobVT are options for computing the singular vectors. The behavior -// is as follows -// jobU == lapack.SVDAll All m columns of U are returned in u -// jobU == lapack.SVDStore The first min(m,n) columns are returned in u -// jobU == lapack.SVDOverwrite The first min(m,n) columns of U are written into a -// jobU == lapack.SVDNone The columns of U are not computed. -// The behavior is the same for jobVT and the rows of V^T. At most one of jobU -// and jobVT can equal lapack.SVDOverwrite, and Gesvd will panic otherwise. -// -// On entry, a contains the data for the m×n matrix A. During the call to Gesvd -// the data is overwritten. On exit, A contains the appropriate singular vectors -// if either job is lapack.SVDOverwrite. -// -// s is a slice of length at least min(m,n) and on exit contains the singular -// values in decreasing order. -// -// u contains the left singular vectors on exit, stored columnwise. If -// jobU == lapack.SVDAll, u is of size m×m. If jobU == lapack.SVDStore u is -// of size m×min(m,n). If jobU == lapack.SVDOverwrite or lapack.SVDNone, u is -// not used. -// -// vt contains the left singular vectors on exit, stored rowwise. If -// jobV == lapack.SVDAll, vt is of size n×m. If jobVT == lapack.SVDStore vt is -// of size min(m,n)×n. If jobVT == lapack.SVDOverwrite or lapack.SVDNone, vt is -// not used. -// -// work is a slice for storing temporary memory, and lwork is the usable size of -// the slice. lwork must be at least max(5*min(m,n), 3*min(m,n)+max(m,n)). -// If lwork == -1, instead of performing Gesvd, the optimal work length will be -// stored into work[0]. Gesvd will panic if the working memory has insufficient -// storage. -// -// Gesvd returns whether the decomposition successfully completed. -func Gesvd(jobU, jobVT lapack.SVDJob, a, u, vt blas64.General, s, work []float64, lwork int) (ok bool) { - return lapack64.Dgesvd(jobU, jobVT, a.Rows, a.Cols, a.Data, max(1, a.Stride), s, u.Data, max(1, u.Stride), vt.Data, max(1, vt.Stride), work, lwork) -} - -// Getrf computes the LU decomposition of the m×n matrix A. -// The LU decomposition is a factorization of A into -// A = P * L * U -// where P is a permutation matrix, L is a unit lower triangular matrix, and -// U is a (usually) non-unit upper triangular matrix. On exit, L and U are stored -// in place into a. -// -// ipiv is a permutation vector. It indicates that row i of the matrix was -// changed with ipiv[i]. ipiv must have length at least min(m,n), and will panic -// otherwise. ipiv is zero-indexed. -// -// Getrf is the blocked version of the algorithm. -// -// Getrf returns whether the matrix A is singular. The LU decomposition will -// be computed regardless of the singularity of A, but division by zero -// will occur if the false is returned and the result is used to solve a -// system of equations. -func Getrf(a blas64.General, ipiv []int) bool { - return lapack64.Dgetrf(a.Rows, a.Cols, a.Data, max(1, a.Stride), ipiv) -} - -// Getri computes the inverse of the matrix A using the LU factorization computed -// by Getrf. On entry, a contains the PLU decomposition of A as computed by -// Getrf and on exit contains the reciprocal of the original matrix. -// -// Getri will not perform the inversion if the matrix is singular, and returns -// a boolean indicating whether the inversion was successful. -// -// Work is temporary storage, and lwork specifies the usable memory length. -// At minimum, lwork >= n and this function will panic otherwise. -// Getri is a blocked inversion, but the block size is limited -// by the temporary space available. If lwork == -1, instead of performing Getri, -// the optimal work length will be stored into work[0]. -func Getri(a blas64.General, ipiv []int, work []float64, lwork int) (ok bool) { - return lapack64.Dgetri(a.Cols, a.Data, max(1, a.Stride), ipiv, work, lwork) -} - -// Getrs solves a system of equations using an LU factorization. -// The system of equations solved is -// A * X = B if trans == blas.Trans -// A^T * X = B if trans == blas.NoTrans -// A is a general n×n matrix with stride lda. B is a general matrix of size n×nrhs. -// -// On entry b contains the elements of the matrix B. On exit, b contains the -// elements of X, the solution to the system of equations. -// -// a and ipiv contain the LU factorization of A and the permutation indices as -// computed by Getrf. ipiv is zero-indexed. -func Getrs(trans blas.Transpose, a blas64.General, b blas64.General, ipiv []int) { - lapack64.Dgetrs(trans, a.Cols, b.Cols, a.Data, max(1, a.Stride), ipiv, b.Data, max(1, b.Stride)) -} - -// Ggsvd3 computes the generalized singular value decomposition (GSVD) -// of an m×n matrix A and p×n matrix B: -// U^T*A*Q = D1*[ 0 R ] -// -// V^T*B*Q = D2*[ 0 R ] -// where U, V and Q are orthogonal matrices. -// -// Ggsvd3 returns k and l, the dimensions of the sub-blocks. k+l -// is the effective numerical rank of the (m+p)×n matrix [ A^T B^T ]^T. -// R is a (k+l)×(k+l) nonsingular upper triangular matrix, D1 and -// D2 are m×(k+l) and p×(k+l) diagonal matrices and of the following -// structures, respectively: -// -// If m-k-l >= 0, -// -// k l -// D1 = k [ I 0 ] -// l [ 0 C ] -// m-k-l [ 0 0 ] -// -// k l -// D2 = l [ 0 S ] -// p-l [ 0 0 ] -// -// n-k-l k l -// [ 0 R ] = k [ 0 R11 R12 ] k -// l [ 0 0 R22 ] l -// -// where -// -// C = diag( alpha_k, ... , alpha_{k+l} ), -// S = diag( beta_k, ... , beta_{k+l} ), -// C^2 + S^2 = I. -// -// R is stored in -// A[0:k+l, n-k-l:n] -// on exit. -// -// If m-k-l < 0, -// -// k m-k k+l-m -// D1 = k [ I 0 0 ] -// m-k [ 0 C 0 ] -// -// k m-k k+l-m -// D2 = m-k [ 0 S 0 ] -// k+l-m [ 0 0 I ] -// p-l [ 0 0 0 ] -// -// n-k-l k m-k k+l-m -// [ 0 R ] = k [ 0 R11 R12 R13 ] -// m-k [ 0 0 R22 R23 ] -// k+l-m [ 0 0 0 R33 ] -// -// where -// C = diag( alpha_k, ... , alpha_m ), -// S = diag( beta_k, ... , beta_m ), -// C^2 + S^2 = I. -// -// R = [ R11 R12 R13 ] is stored in A[1:m, n-k-l+1:n] -// [ 0 R22 R23 ] -// and R33 is stored in -// B[m-k:l, n+m-k-l:n] on exit. -// -// Ggsvd3 computes C, S, R, and optionally the orthogonal transformation -// matrices U, V and Q. -// -// jobU, jobV and jobQ are options for computing the orthogonal matrices. The behavior -// is as follows -// jobU == lapack.GSVDU Compute orthogonal matrix U -// jobU == lapack.GSVDNone Do not compute orthogonal matrix. -// The behavior is the same for jobV and jobQ with the exception that instead of -// lapack.GSVDU these accept lapack.GSVDV and lapack.GSVDQ respectively. -// The matrices U, V and Q must be m×m, p×p and n×n respectively unless the -// relevant job parameter is lapack.GSVDNone. -// -// alpha and beta must have length n or Ggsvd3 will panic. On exit, alpha and -// beta contain the generalized singular value pairs of A and B -// alpha[0:k] = 1, -// beta[0:k] = 0, -// if m-k-l >= 0, -// alpha[k:k+l] = diag(C), -// beta[k:k+l] = diag(S), -// if m-k-l < 0, -// alpha[k:m]= C, alpha[m:k+l]= 0 -// beta[k:m] = S, beta[m:k+l] = 1. -// if k+l < n, -// alpha[k+l:n] = 0 and -// beta[k+l:n] = 0. -// -// On exit, iwork contains the permutation required to sort alpha descending. -// -// iwork must have length n, work must have length at least max(1, lwork), and -// lwork must be -1 or greater than n, otherwise Ggsvd3 will panic. If -// lwork is -1, work[0] holds the optimal lwork on return, but Ggsvd3 does -// not perform the GSVD. -func Ggsvd3(jobU, jobV, jobQ lapack.GSVDJob, a, b blas64.General, alpha, beta []float64, u, v, q blas64.General, work []float64, lwork int, iwork []int) (k, l int, ok bool) { - return lapack64.Dggsvd3(jobU, jobV, jobQ, a.Rows, a.Cols, b.Rows, a.Data, max(1, a.Stride), b.Data, max(1, b.Stride), alpha, beta, u.Data, max(1, u.Stride), v.Data, max(1, v.Stride), q.Data, max(1, q.Stride), work, lwork, iwork) -} - -// Lange computes the matrix norm of the general m×n matrix A. The input norm -// specifies the norm computed. -// lapack.MaxAbs: the maximum absolute value of an element. -// lapack.MaxColumnSum: the maximum column sum of the absolute values of the entries. -// lapack.MaxRowSum: the maximum row sum of the absolute values of the entries. -// lapack.Frobenius: the square root of the sum of the squares of the entries. -// If norm == lapack.MaxColumnSum, work must be of length n, and this function will panic otherwise. -// There are no restrictions on work for the other matrix norms. -func Lange(norm lapack.MatrixNorm, a blas64.General, work []float64) float64 { - return lapack64.Dlange(norm, a.Rows, a.Cols, a.Data, max(1, a.Stride), work) -} - -// Lansy computes the specified norm of an n×n symmetric matrix. If -// norm == lapack.MaxColumnSum or norm == lapackMaxRowSum work must have length -// at least n and this function will panic otherwise. -// There are no restrictions on work for the other matrix norms. -func Lansy(norm lapack.MatrixNorm, a blas64.Symmetric, work []float64) float64 { - return lapack64.Dlansy(norm, a.Uplo, a.N, a.Data, max(1, a.Stride), work) -} - -// Lantr computes the specified norm of an m×n trapezoidal matrix A. If -// norm == lapack.MaxColumnSum work must have length at least n and this function -// will panic otherwise. There are no restrictions on work for the other matrix norms. -func Lantr(norm lapack.MatrixNorm, a blas64.Triangular, work []float64) float64 { - return lapack64.Dlantr(norm, a.Uplo, a.Diag, a.N, a.N, a.Data, max(1, a.Stride), work) -} - -// Lapmt rearranges the columns of the m×n matrix X as specified by the -// permutation k_0, k_1, ..., k_{n-1} of the integers 0, ..., n-1. -// -// If forward is true a forward permutation is performed: -// -// X[0:m, k[j]] is moved to X[0:m, j] for j = 0, 1, ..., n-1. -// -// otherwise a backward permutation is performed: -// -// X[0:m, j] is moved to X[0:m, k[j]] for j = 0, 1, ..., n-1. -// -// k must have length n, otherwise Lapmt will panic. k is zero-indexed. -func Lapmt(forward bool, x blas64.General, k []int) { - lapack64.Dlapmt(forward, x.Rows, x.Cols, x.Data, max(1, x.Stride), k) -} - -// Ormlq multiplies the matrix C by the othogonal matrix Q defined by -// A and tau. A and tau are as returned from Gelqf. -// C = Q * C if side == blas.Left and trans == blas.NoTrans -// C = Q^T * C if side == blas.Left and trans == blas.Trans -// C = C * Q if side == blas.Right and trans == blas.NoTrans -// C = C * Q^T if side == blas.Right and trans == blas.Trans -// If side == blas.Left, A is a matrix of side k×m, and if side == blas.Right -// A is of size k×n. This uses a blocked algorithm. -// -// Work is temporary storage, and lwork specifies the usable memory length. -// At minimum, lwork >= m if side == blas.Left and lwork >= n if side == blas.Right, -// and this function will panic otherwise. -// Ormlq uses a block algorithm, but the block size is limited -// by the temporary space available. If lwork == -1, instead of performing Ormlq, -// the optimal work length will be stored into work[0]. -// -// Tau contains the Householder scales and must have length at least k, and -// this function will panic otherwise. -func Ormlq(side blas.Side, trans blas.Transpose, a blas64.General, tau []float64, c blas64.General, work []float64, lwork int) { - lapack64.Dormlq(side, trans, c.Rows, c.Cols, a.Rows, a.Data, max(1, a.Stride), tau, c.Data, max(1, c.Stride), work, lwork) -} - -// Ormqr multiplies an m×n matrix C by an orthogonal matrix Q as -// C = Q * C, if side == blas.Left and trans == blas.NoTrans, -// C = Q^T * C, if side == blas.Left and trans == blas.Trans, -// C = C * Q, if side == blas.Right and trans == blas.NoTrans, -// C = C * Q^T, if side == blas.Right and trans == blas.Trans, -// where Q is defined as the product of k elementary reflectors -// Q = H_0 * H_1 * ... * H_{k-1}. -// -// If side == blas.Left, A is an m×k matrix and 0 <= k <= m. -// If side == blas.Right, A is an n×k matrix and 0 <= k <= n. -// The ith column of A contains the vector which defines the elementary -// reflector H_i and tau[i] contains its scalar factor. tau must have length k -// and Ormqr will panic otherwise. Geqrf returns A and tau in the required -// form. -// -// work must have length at least max(1,lwork), and lwork must be at least n if -// side == blas.Left and at least m if side == blas.Right, otherwise Ormqr will -// panic. -// -// work is temporary storage, and lwork specifies the usable memory length. At -// minimum, lwork >= m if side == blas.Left and lwork >= n if side == -// blas.Right, and this function will panic otherwise. Larger values of lwork -// will generally give better performance. On return, work[0] will contain the -// optimal value of lwork. -// -// If lwork is -1, instead of performing Ormqr, the optimal workspace size will -// be stored into work[0]. -func Ormqr(side blas.Side, trans blas.Transpose, a blas64.General, tau []float64, c blas64.General, work []float64, lwork int) { - lapack64.Dormqr(side, trans, c.Rows, c.Cols, a.Cols, a.Data, max(1, a.Stride), tau, c.Data, max(1, c.Stride), work, lwork) -} - -// Pocon estimates the reciprocal of the condition number of a positive-definite -// matrix A given the Cholesky decmposition of A. The condition number computed -// is based on the 1-norm and the ∞-norm. -// -// anorm is the 1-norm and the ∞-norm of the original matrix A. -// -// work is a temporary data slice of length at least 3*n and Pocon will panic otherwise. -// -// iwork is a temporary data slice of length at least n and Pocon will panic otherwise. -func Pocon(a blas64.Symmetric, anorm float64, work []float64, iwork []int) float64 { - return lapack64.Dpocon(a.Uplo, a.N, a.Data, max(1, a.Stride), anorm, work, iwork) -} - -// Syev computes all eigenvalues and, optionally, the eigenvectors of a real -// symmetric matrix A. -// -// w contains the eigenvalues in ascending order upon return. w must have length -// at least n, and Syev will panic otherwise. -// -// On entry, a contains the elements of the symmetric matrix A in the triangular -// portion specified by uplo. If jobz == lapack.EVCompute, a contains the -// orthonormal eigenvectors of A on exit, otherwise jobz must be lapack.EVNone -// and on exit the specified triangular region is overwritten. -// -// Work is temporary storage, and lwork specifies the usable memory length. At minimum, -// lwork >= 3*n-1, and Syev will panic otherwise. The amount of blocking is -// limited by the usable length. If lwork == -1, instead of computing Syev the -// optimal work length is stored into work[0]. -func Syev(jobz lapack.EVJob, a blas64.Symmetric, w, work []float64, lwork int) (ok bool) { - return lapack64.Dsyev(jobz, a.Uplo, a.N, a.Data, max(1, a.Stride), w, work, lwork) -} - -// Trcon estimates the reciprocal of the condition number of a triangular matrix A. -// The condition number computed may be based on the 1-norm or the ∞-norm. -// -// work is a temporary data slice of length at least 3*n and Trcon will panic otherwise. -// -// iwork is a temporary data slice of length at least n and Trcon will panic otherwise. -func Trcon(norm lapack.MatrixNorm, a blas64.Triangular, work []float64, iwork []int) float64 { - return lapack64.Dtrcon(norm, a.Uplo, a.Diag, a.N, a.Data, max(1, a.Stride), work, iwork) -} - -// Trtri computes the inverse of a triangular matrix, storing the result in place -// into a. -// -// Trtri will not perform the inversion if the matrix is singular, and returns -// a boolean indicating whether the inversion was successful. -func Trtri(a blas64.Triangular) (ok bool) { - return lapack64.Dtrtri(a.Uplo, a.Diag, a.N, a.Data, max(1, a.Stride)) -} - -// Trtrs solves a triangular system of the form A * X = B or A^T * X = B. Trtrs -// returns whether the solve completed successfully. If A is singular, no solve is performed. -func Trtrs(trans blas.Transpose, a blas64.Triangular, b blas64.General) (ok bool) { - return lapack64.Dtrtrs(a.Uplo, trans, a.Diag, a.N, b.Cols, a.Data, max(1, a.Stride), b.Data, max(1, b.Stride)) -} - -// Geev computes the eigenvalues and, optionally, the left and/or right -// eigenvectors for an n×n real nonsymmetric matrix A. -// -// The right eigenvector v_j of A corresponding to an eigenvalue λ_j -// is defined by -// A v_j = λ_j v_j, -// and the left eigenvector u_j corresponding to an eigenvalue λ_j is defined by -// u_j^H A = λ_j u_j^H, -// where u_j^H is the conjugate transpose of u_j. -// -// On return, A will be overwritten and the left and right eigenvectors will be -// stored, respectively, in the columns of the n×n matrices VL and VR in the -// same order as their eigenvalues. If the j-th eigenvalue is real, then -// u_j = VL[:,j], -// v_j = VR[:,j], -// and if it is not real, then j and j+1 form a complex conjugate pair and the -// eigenvectors can be recovered as -// u_j = VL[:,j] + i*VL[:,j+1], -// u_{j+1} = VL[:,j] - i*VL[:,j+1], -// v_j = VR[:,j] + i*VR[:,j+1], -// v_{j+1} = VR[:,j] - i*VR[:,j+1], -// where i is the imaginary unit. The computed eigenvectors are normalized to -// have Euclidean norm equal to 1 and largest component real. -// -// Left eigenvectors will be computed only if jobvl == lapack.LeftEVCompute, -// otherwise jobvl must be lapack.LeftEVNone. -// Right eigenvectors will be computed only if jobvr == lapack.RightEVCompute, -// otherwise jobvr must be lapack.RightEVNone. -// For other values of jobvl and jobvr Geev will panic. -// -// On return, wr and wi will contain the real and imaginary parts, respectively, -// of the computed eigenvalues. Complex conjugate pairs of eigenvalues appear -// consecutively with the eigenvalue having the positive imaginary part first. -// wr and wi must have length n, and Geev will panic otherwise. -// -// work must have length at least lwork and lwork must be at least max(1,4*n) if -// the left or right eigenvectors are computed, and at least max(1,3*n) if no -// eigenvectors are computed. For good performance, lwork must generally be -// larger. On return, optimal value of lwork will be stored in work[0]. -// -// If lwork == -1, instead of performing Geev, the function only calculates the -// optimal vaule of lwork and stores it into work[0]. -// -// On return, first will be the index of the first valid eigenvalue. -// If first == 0, all eigenvalues and eigenvectors have been computed. -// If first is positive, Geev failed to compute all the eigenvalues, no -// eigenvectors have been computed and wr[first:] and wi[first:] contain those -// eigenvalues which have converged. -func Geev(jobvl lapack.LeftEVJob, jobvr lapack.RightEVJob, a blas64.General, wr, wi []float64, vl, vr blas64.General, work []float64, lwork int) (first int) { - n := a.Rows - if a.Cols != n { - panic("lapack64: matrix not square") - } - if jobvl == lapack.LeftEVCompute && (vl.Rows != n || vl.Cols != n) { - panic("lapack64: bad size of VL") - } - if jobvr == lapack.RightEVCompute && (vr.Rows != n || vr.Cols != n) { - panic("lapack64: bad size of VR") - } - return lapack64.Dgeev(jobvl, jobvr, n, a.Data, max(1, a.Stride), wr, wi, vl.Data, max(1, vl.Stride), vr.Data, max(1, vr.Stride), work, lwork) -} diff --git a/vendor/gonum.org/v1/gonum/mat/README.md b/vendor/gonum.org/v1/gonum/mat/README.md deleted file mode 100644 index 0f77e470ed..0000000000 --- a/vendor/gonum.org/v1/gonum/mat/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Gonum matrix [![GoDoc](https://godoc.org/gonum.org/v1/gonum/mat?status.svg)](https://godoc.org/gonum.org/v1/gonum/mat) - -Package mat is a matrix package for the Go language. diff --git a/vendor/gonum.org/v1/gonum/mat/band.go b/vendor/gonum.org/v1/gonum/mat/band.go deleted file mode 100644 index 72ebefddd1..0000000000 --- a/vendor/gonum.org/v1/gonum/mat/band.go +++ /dev/null @@ -1,263 +0,0 @@ -// Copyright ©2017 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package mat - -import ( - "gonum.org/v1/gonum/blas/blas64" -) - -var ( - bandDense *BandDense - _ Matrix = bandDense - _ Banded = bandDense - _ RawBander = bandDense - - _ NonZeroDoer = bandDense - _ RowNonZeroDoer = bandDense - _ ColNonZeroDoer = bandDense -) - -// BandDense represents a band matrix in dense storage format. -type BandDense struct { - mat blas64.Band -} - -// Banded is a band matrix representation. -type Banded interface { - Matrix - // Bandwidth returns the lower and upper bandwidth values for - // the matrix. The total bandwidth of the matrix is kl+ku+1. - Bandwidth() (kl, ku int) - - // TBand is the equivalent of the T() method in the Matrix - // interface but guarantees the transpose is of banded type. - TBand() Banded -} - -// A RawBander can return a blas64.Band representation of the receiver. -// Changes to the blas64.Band.Data slice will be reflected in the original -// matrix, changes to the Rows, Cols, KL, KU and Stride fields will not. -type RawBander interface { - RawBand() blas64.Band -} - -// A MutableBanded can set elements of a band matrix. -type MutableBanded interface { - Banded - SetBand(i, j int, v float64) -} - -var ( - _ Matrix = TransposeBand{} - _ Banded = TransposeBand{} - _ UntransposeBander = TransposeBand{} -) - -// TransposeBand is a type for performing an implicit transpose of a band -// matrix. It implements the Banded interface, returning values from the -// transpose of the matrix within. -type TransposeBand struct { - Banded Banded -} - -// At returns the value of the element at row i and column j of the transposed -// matrix, that is, row j and column i of the Banded field. -func (t TransposeBand) At(i, j int) float64 { - return t.Banded.At(j, i) -} - -// Dims returns the dimensions of the transposed matrix. -func (t TransposeBand) Dims() (r, c int) { - c, r = t.Banded.Dims() - return r, c -} - -// T performs an implicit transpose by returning the Banded field. -func (t TransposeBand) T() Matrix { - return t.Banded -} - -// Bandwidth returns the lower and upper bandwidth values for -// the transposed matrix. -func (t TransposeBand) Bandwidth() (kl, ku int) { - kl, ku = t.Banded.Bandwidth() - return ku, kl -} - -// TBand performs an implicit transpose by returning the Banded field. -func (t TransposeBand) TBand() Banded { - return t.Banded -} - -// Untranspose returns the Banded field. -func (t TransposeBand) Untranspose() Matrix { - return t.Banded -} - -// UntransposeBand returns the Banded field. -func (t TransposeBand) UntransposeBand() Banded { - return t.Banded -} - -// NewBandDense creates a new Band matrix with r rows and c columns. If data == nil, -// a new slice is allocated for the backing slice. If len(data) == min(r, c+kl)*(kl+ku+1), -// data is used as the backing slice, and changes to the elements of the returned -// BandDense will be reflected in data. If neither of these is true, NewBandDense -// will panic. kl must be at least zero and less r, and ku must be at least zero and -// less than c, otherwise NewBandDense will panic. -// NewBandDense will panic if either r or c is zero. -// -// The data must be arranged in row-major order constructed by removing the zeros -// from the rows outside the band and aligning the diagonals. For example, the matrix -// 1 2 3 0 0 0 -// 4 5 6 7 0 0 -// 0 8 9 10 11 0 -// 0 0 12 13 14 15 -// 0 0 0 16 17 18 -// 0 0 0 0 19 20 -// becomes (* entries are never accessed) -// * 1 2 3 -// 4 5 6 7 -// 8 9 10 11 -// 12 13 14 15 -// 16 17 18 * -// 19 20 * * -// which is passed to NewBandDense as []float64{*, 1, 2, 3, 4, ...} with kl=1 and ku=2. -// Only the values in the band portion of the matrix are used. -func NewBandDense(r, c, kl, ku int, data []float64) *BandDense { - if r <= 0 || c <= 0 || kl < 0 || ku < 0 { - if r == 0 || c == 0 { - panic(ErrZeroLength) - } - panic("mat: negative dimension") - } - if kl+1 > r || ku+1 > c { - panic("mat: band out of range") - } - bc := kl + ku + 1 - if data != nil && len(data) != min(r, c+kl)*bc { - panic(ErrShape) - } - if data == nil { - data = make([]float64, min(r, c+kl)*bc) - } - return &BandDense{ - mat: blas64.Band{ - Rows: r, - Cols: c, - KL: kl, - KU: ku, - Stride: bc, - Data: data, - }, - } -} - -// NewDiagonalRect is a convenience function that returns a diagonal matrix represented by a -// BandDense. The length of data must be min(r, c) otherwise NewDiagonalRect will panic. -func NewDiagonalRect(r, c int, data []float64) *BandDense { - return NewBandDense(r, c, 0, 0, data) -} - -// Dims returns the number of rows and columns in the matrix. -func (b *BandDense) Dims() (r, c int) { - return b.mat.Rows, b.mat.Cols -} - -// Bandwidth returns the upper and lower bandwidths of the matrix. -func (b *BandDense) Bandwidth() (kl, ku int) { - return b.mat.KL, b.mat.KU -} - -// T performs an implicit transpose by returning the receiver inside a Transpose. -func (b *BandDense) T() Matrix { - return Transpose{b} -} - -// TBand performs an implicit transpose by returning the receiver inside a TransposeBand. -func (b *BandDense) TBand() Banded { - return TransposeBand{b} -} - -// RawBand returns the underlying blas64.Band used by the receiver. -// Changes to elements in the receiver following the call will be reflected -// in returned blas64.Band. -func (b *BandDense) RawBand() blas64.Band { - return b.mat -} - -// SetRawBand sets the underlying blas64.Band used by the receiver. -// Changes to elements in the receiver following the call will be reflected -// in the input. -func (b *BandDense) SetRawBand(mat blas64.Band) { - b.mat = mat -} - -// DiagView returns the diagonal as a matrix backed by the original data. -func (b *BandDense) DiagView() Diagonal { - n := min(b.mat.Rows, b.mat.Cols) - return &DiagDense{ - mat: blas64.Vector{ - N: n, - Inc: b.mat.Stride, - Data: b.mat.Data[b.mat.KL : (n-1)*b.mat.Stride+b.mat.KL+1], - }, - } -} - -// DoNonZero calls the function fn for each of the non-zero elements of b. The function fn -// takes a row/column index and the element value of b at (i, j). -func (b *BandDense) DoNonZero(fn func(i, j int, v float64)) { - for i := 0; i < min(b.mat.Rows, b.mat.Cols+b.mat.KL); i++ { - for j := max(0, i-b.mat.KL); j < min(b.mat.Cols, i+b.mat.KU+1); j++ { - v := b.at(i, j) - if v != 0 { - fn(i, j, v) - } - } - } -} - -// DoRowNonZero calls the function fn for each of the non-zero elements of row i of b. The function fn -// takes a row/column index and the element value of b at (i, j). -func (b *BandDense) DoRowNonZero(i int, fn func(i, j int, v float64)) { - if i < 0 || b.mat.Rows <= i { - panic(ErrRowAccess) - } - for j := max(0, i-b.mat.KL); j < min(b.mat.Cols, i+b.mat.KU+1); j++ { - v := b.at(i, j) - if v != 0 { - fn(i, j, v) - } - } -} - -// DoColNonZero calls the function fn for each of the non-zero elements of column j of b. The function fn -// takes a row/column index and the element value of b at (i, j). -func (b *BandDense) DoColNonZero(j int, fn func(i, j int, v float64)) { - if j < 0 || b.mat.Cols <= j { - panic(ErrColAccess) - } - for i := 0; i < min(b.mat.Rows, b.mat.Cols+b.mat.KL); i++ { - if i-b.mat.KL <= j && j < i+b.mat.KU+1 { - v := b.at(i, j) - if v != 0 { - fn(i, j, v) - } - } - } -} - -// Zero sets all of the matrix elements to zero. -func (b *BandDense) Zero() { - m := b.mat.Rows - kL := b.mat.KL - nCol := b.mat.KU + 1 + kL - for i := 0; i < m; i++ { - l := max(0, kL-i) - u := min(nCol, m+kL-i) - zero(b.mat.Data[i*b.mat.Stride+l : i*b.mat.Stride+u]) - } -} diff --git a/vendor/gonum.org/v1/gonum/mat/cdense.go b/vendor/gonum.org/v1/gonum/mat/cdense.go deleted file mode 100644 index 9c29d1afd1..0000000000 --- a/vendor/gonum.org/v1/gonum/mat/cdense.go +++ /dev/null @@ -1,168 +0,0 @@ -// Copyright ©2019 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package mat - -import "gonum.org/v1/gonum/blas/cblas128" - -// Dense is a dense matrix representation with complex data. -type CDense struct { - mat cblas128.General - - capRows, capCols int -} - -// Dims returns the number of rows and columns in the matrix. -func (m *CDense) Dims() (r, c int) { - return m.mat.Rows, m.mat.Cols -} - -// H performs an implicit conjugate transpose by returning the receiver inside a -// Conjugate. -func (m *CDense) H() CMatrix { - return Conjugate{m} -} - -// NewCDense creates a new complex Dense matrix with r rows and c columns. -// If data == nil, a new slice is allocated for the backing slice. -// If len(data) == r*c, data is used as the backing slice, and changes to the -// elements of the returned CDense will be reflected in data. -// If neither of these is true, NewCDense will panic. -// NewCDense will panic if either r or c is zero. -// -// The data must be arranged in row-major order, i.e. the (i*c + j)-th -// element in the data slice is the {i, j}-th element in the matrix. -func NewCDense(r, c int, data []complex128) *CDense { - if r <= 0 || c <= 0 { - if r == 0 || c == 0 { - panic(ErrZeroLength) - } - panic("mat: negative dimension") - } - if data != nil && r*c != len(data) { - panic(ErrShape) - } - if data == nil { - data = make([]complex128, r*c) - } - return &CDense{ - mat: cblas128.General{ - Rows: r, - Cols: c, - Stride: c, - Data: data, - }, - capRows: r, - capCols: c, - } -} - -// reuseAs resizes an empty matrix to a r×c matrix, -// or checks that a non-empty matrix is r×c. -// -// reuseAs must be kept in sync with reuseAsZeroed. -func (m *CDense) reuseAs(r, c int) { - if m.mat.Rows > m.capRows || m.mat.Cols > m.capCols { - // Panic as a string, not a mat.Error. - panic("mat: caps not correctly set") - } - if r == 0 || c == 0 { - panic(ErrZeroLength) - } - if m.IsZero() { - m.mat = cblas128.General{ - Rows: r, - Cols: c, - Stride: c, - Data: useC(m.mat.Data, r*c), - } - m.capRows = r - m.capCols = c - return - } - if r != m.mat.Rows || c != m.mat.Cols { - panic(ErrShape) - } -} - -func (m *CDense) reuseAsZeroed(r, c int) { - // This must be kept in-sync with reuseAs. - if m.mat.Rows > m.capRows || m.mat.Cols > m.capCols { - // Panic as a string, not a mat.Error. - panic("mat: caps not correctly set") - } - if r == 0 || c == 0 { - panic(ErrZeroLength) - } - if m.IsZero() { - m.mat = cblas128.General{ - Rows: r, - Cols: c, - Stride: c, - Data: useZeroedC(m.mat.Data, r*c), - } - m.capRows = r - m.capCols = c - return - } - if r != m.mat.Rows || c != m.mat.Cols { - panic(ErrShape) - } - m.Zero() -} - -// Reset zeros the dimensions of the matrix so that it can be reused as the -// receiver of a dimensionally restricted operation. -// -// See the Reseter interface for more information. -func (m *CDense) Reset() { - // Row, Cols and Stride must be zeroed in unison. - m.mat.Rows, m.mat.Cols, m.mat.Stride = 0, 0, 0 - m.capRows, m.capCols = 0, 0 - m.mat.Data = m.mat.Data[:0] -} - -// IsZero returns whether the receiver is zero-sized. Zero-sized matrices can be the -// receiver for size-restricted operations. CDense matrices can be zeroed using Reset. -func (m *CDense) IsZero() bool { - // It must be the case that m.Dims() returns - // zeros in this case. See comment in Reset(). - return m.mat.Stride == 0 -} - -// Zero sets all of the matrix elements to zero. -func (m *CDense) Zero() { - r := m.mat.Rows - c := m.mat.Cols - for i := 0; i < r; i++ { - zeroC(m.mat.Data[i*m.mat.Stride : i*m.mat.Stride+c]) - } -} - -// Copy makes a copy of elements of a into the receiver. It is similar to the -// built-in copy; it copies as much as the overlap between the two matrices and -// returns the number of rows and columns it copied. If a aliases the receiver -// and is a transposed Dense or VecDense, with a non-unitary increment, Copy will -// panic. -// -// See the Copier interface for more information. -func (m *CDense) Copy(a CMatrix) (r, c int) { - r, c = a.Dims() - if a == m { - return r, c - } - r = min(r, m.mat.Rows) - c = min(c, m.mat.Cols) - if r == 0 || c == 0 { - return 0, 0 - } - // TODO(btracey): Check for overlap when complex version exists. - // TODO(btracey): Add fast-paths. - for i := 0; i < r; i++ { - for j := 0; j < c; j++ { - m.set(i, j, a.At(i, j)) - } - } - return r, c -} diff --git a/vendor/gonum.org/v1/gonum/mat/cholesky.go b/vendor/gonum.org/v1/gonum/mat/cholesky.go deleted file mode 100644 index bee438538f..0000000000 --- a/vendor/gonum.org/v1/gonum/mat/cholesky.go +++ /dev/null @@ -1,673 +0,0 @@ -// Copyright ©2013 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package mat - -import ( - "math" - - "gonum.org/v1/gonum/blas" - "gonum.org/v1/gonum/blas/blas64" - "gonum.org/v1/gonum/lapack/lapack64" -) - -const ( - badTriangle = "mat: invalid triangle" - badCholesky = "mat: invalid Cholesky factorization" -) - -var ( - _ Matrix = (*Cholesky)(nil) - _ Symmetric = (*Cholesky)(nil) -) - -// Cholesky is a symmetric positive definite matrix represented by its -// Cholesky decomposition. -// -// The decomposition can be constructed using the Factorize method. The -// factorization itself can be extracted using the UTo or LTo methods, and the -// original symmetric matrix can be recovered with ToSym. -// -// Note that this matrix representation is useful for certain operations, in -// particular finding solutions to linear equations. It is very inefficient -// at other operations, in particular At is slow. -// -// Cholesky methods may only be called on a value that has been successfully -// initialized by a call to Factorize that has returned true. Calls to methods -// of an unsuccessful Cholesky factorization will panic. -type Cholesky struct { - // The chol pointer must never be retained as a pointer outside the Cholesky - // struct, either by returning chol outside the struct or by setting it to - // a pointer coming from outside. The same prohibition applies to the data - // slice within chol. - chol *TriDense - cond float64 -} - -// updateCond updates the condition number of the Cholesky decomposition. If -// norm > 0, then that norm is used as the norm of the original matrix A, otherwise -// the norm is estimated from the decomposition. -func (c *Cholesky) updateCond(norm float64) { - n := c.chol.mat.N - work := getFloats(3*n, false) - defer putFloats(work) - if norm < 0 { - // This is an approximation. By the definition of a norm, - // |AB| <= |A| |B|. - // Since A = U^T*U, we get for the condition number κ that - // κ(A) := |A| |A^-1| = |U^T*U| |A^-1| <= |U^T| |U| |A^-1|, - // so this will overestimate the condition number somewhat. - // The norm of the original factorized matrix cannot be stored - // because of update possibilities. - unorm := lapack64.Lantr(CondNorm, c.chol.mat, work) - lnorm := lapack64.Lantr(CondNormTrans, c.chol.mat, work) - norm = unorm * lnorm - } - sym := c.chol.asSymBlas() - iwork := getInts(n, false) - v := lapack64.Pocon(sym, norm, work, iwork) - putInts(iwork) - c.cond = 1 / v -} - -// Dims returns the dimensions of the matrix. -func (ch *Cholesky) Dims() (r, c int) { - if !ch.valid() { - panic(badCholesky) - } - r, c = ch.chol.Dims() - return r, c -} - -// At returns the element at row i, column j. -func (c *Cholesky) At(i, j int) float64 { - if !c.valid() { - panic(badCholesky) - } - n := c.Symmetric() - if uint(i) >= uint(n) { - panic(ErrRowAccess) - } - if uint(j) >= uint(n) { - panic(ErrColAccess) - } - - var val float64 - for k := 0; k <= min(i, j); k++ { - val += c.chol.at(k, i) * c.chol.at(k, j) - } - return val -} - -// T returns the the receiver, the transpose of a symmetric matrix. -func (c *Cholesky) T() Matrix { - return c -} - -// Symmetric implements the Symmetric interface and returns the number of rows -// in the matrix (this is also the number of columns). -func (c *Cholesky) Symmetric() int { - r, _ := c.chol.Dims() - return r -} - -// Cond returns the condition number of the factorized matrix. -func (c *Cholesky) Cond() float64 { - if !c.valid() { - panic(badCholesky) - } - return c.cond -} - -// Factorize calculates the Cholesky decomposition of the matrix A and returns -// whether the matrix is positive definite. If Factorize returns false, the -// factorization must not be used. -func (c *Cholesky) Factorize(a Symmetric) (ok bool) { - n := a.Symmetric() - if c.chol == nil { - c.chol = NewTriDense(n, Upper, nil) - } else { - c.chol = NewTriDense(n, Upper, use(c.chol.mat.Data, n*n)) - } - copySymIntoTriangle(c.chol, a) - - sym := c.chol.asSymBlas() - work := getFloats(c.chol.mat.N, false) - norm := lapack64.Lansy(CondNorm, sym, work) - putFloats(work) - _, ok = lapack64.Potrf(sym) - if ok { - c.updateCond(norm) - } else { - c.Reset() - } - return ok -} - -// Reset resets the factorization so that it can be reused as the receiver of a -// dimensionally restricted operation. -func (c *Cholesky) Reset() { - if c.chol != nil { - c.chol.Reset() - } - c.cond = math.Inf(1) -} - -// SetFromU sets the Cholesky decomposition from the given triangular matrix. -// SetFromU panics if t is not upper triangular. Note that t is copied into, -// not stored inside, the receiver. -func (c *Cholesky) SetFromU(t *TriDense) { - n, kind := t.Triangle() - if kind != Upper { - panic("cholesky: matrix must be upper triangular") - } - if c.chol == nil { - c.chol = NewTriDense(n, Upper, nil) - } else { - c.chol = NewTriDense(n, Upper, use(c.chol.mat.Data, n*n)) - } - c.chol.Copy(t) - c.updateCond(-1) -} - -// Clone makes a copy of the input Cholesky into the receiver, overwriting the -// previous value of the receiver. Clone does not place any restrictions on receiver -// shape. Clone panics if the input Cholesky is not the result of a valid decomposition. -func (c *Cholesky) Clone(chol *Cholesky) { - if !chol.valid() { - panic(badCholesky) - } - n := chol.Symmetric() - if c.chol == nil { - c.chol = NewTriDense(n, Upper, nil) - } else { - c.chol = NewTriDense(n, Upper, use(c.chol.mat.Data, n*n)) - } - c.chol.Copy(chol.chol) - c.cond = chol.cond -} - -// Det returns the determinant of the matrix that has been factorized. -func (c *Cholesky) Det() float64 { - if !c.valid() { - panic(badCholesky) - } - return math.Exp(c.LogDet()) -} - -// LogDet returns the log of the determinant of the matrix that has been factorized. -func (c *Cholesky) LogDet() float64 { - if !c.valid() { - panic(badCholesky) - } - var det float64 - for i := 0; i < c.chol.mat.N; i++ { - det += 2 * math.Log(c.chol.mat.Data[i*c.chol.mat.Stride+i]) - } - return det -} - -// SolveTo finds the matrix X that solves A * X = B where A is represented -// by the Cholesky decomposition. The result is stored in-place into dst. -func (c *Cholesky) SolveTo(dst *Dense, b Matrix) error { - if !c.valid() { - panic(badCholesky) - } - n := c.chol.mat.N - bm, bn := b.Dims() - if n != bm { - panic(ErrShape) - } - - dst.reuseAs(bm, bn) - if b != dst { - dst.Copy(b) - } - lapack64.Potrs(c.chol.mat, dst.mat) - if c.cond > ConditionTolerance { - return Condition(c.cond) - } - return nil -} - -// SolveCholTo finds the matrix X that solves A * X = B where A and B are represented -// by their Cholesky decompositions a and b. The result is stored in-place into -// dst. -func (a *Cholesky) SolveCholTo(dst *Dense, b *Cholesky) error { - if !a.valid() || !b.valid() { - panic(badCholesky) - } - bn := b.chol.mat.N - if a.chol.mat.N != bn { - panic(ErrShape) - } - - dst.reuseAsZeroed(bn, bn) - dst.Copy(b.chol.T()) - blas64.Trsm(blas.Left, blas.Trans, 1, a.chol.mat, dst.mat) - blas64.Trsm(blas.Left, blas.NoTrans, 1, a.chol.mat, dst.mat) - blas64.Trmm(blas.Right, blas.NoTrans, 1, b.chol.mat, dst.mat) - if a.cond > ConditionTolerance { - return Condition(a.cond) - } - return nil -} - -// SolveVecTo finds the vector X that solves A * x = b where A is represented -// by the Cholesky decomposition. The result is stored in-place into -// dst. -func (c *Cholesky) SolveVecTo(dst *VecDense, b Vector) error { - if !c.valid() { - panic(badCholesky) - } - n := c.chol.mat.N - if br, bc := b.Dims(); br != n || bc != 1 { - panic(ErrShape) - } - switch rv := b.(type) { - default: - dst.reuseAs(n) - return c.SolveTo(dst.asDense(), b) - case RawVectorer: - bmat := rv.RawVector() - if dst != b { - dst.checkOverlap(bmat) - } - dst.reuseAs(n) - if dst != b { - dst.CopyVec(b) - } - lapack64.Potrs(c.chol.mat, dst.asGeneral()) - if c.cond > ConditionTolerance { - return Condition(c.cond) - } - return nil - } -} - -// RawU returns the Triangular matrix used to store the Cholesky decomposition of -// the original matrix A. The returned matrix should not be modified. If it is -// modified, the decomposition is invalid and should not be used. -func (c *Cholesky) RawU() Triangular { - return c.chol -} - -// UTo extracts the n×n upper triangular matrix U from a Cholesky -// decomposition into dst and returns the result. If dst is nil a new -// TriDense is allocated. -// A = U^T * U. -func (c *Cholesky) UTo(dst *TriDense) *TriDense { - if !c.valid() { - panic(badCholesky) - } - n := c.chol.mat.N - if dst == nil { - dst = NewTriDense(n, Upper, make([]float64, n*n)) - } else { - dst.reuseAs(n, Upper) - } - dst.Copy(c.chol) - return dst -} - -// LTo extracts the n×n lower triangular matrix L from a Cholesky -// decomposition into dst and returns the result. If dst is nil a new -// TriDense is allocated. -// A = L * L^T. -func (c *Cholesky) LTo(dst *TriDense) *TriDense { - if !c.valid() { - panic(badCholesky) - } - n := c.chol.mat.N - if dst == nil { - dst = NewTriDense(n, Lower, make([]float64, n*n)) - } else { - dst.reuseAs(n, Lower) - } - dst.Copy(c.chol.TTri()) - return dst -} - -// ToSym reconstructs the original positive definite matrix given its -// Cholesky decomposition into dst and returns the result. If dst is nil -// a new SymDense is allocated. -func (c *Cholesky) ToSym(dst *SymDense) *SymDense { - if !c.valid() { - panic(badCholesky) - } - n := c.chol.mat.N - if dst == nil { - dst = NewSymDense(n, nil) - } else { - dst.reuseAs(n) - } - // Create a TriDense representing the Cholesky factor U with dst's - // backing slice. - // Operations on u are reflected in s. - u := &TriDense{ - mat: blas64.Triangular{ - Uplo: blas.Upper, - Diag: blas.NonUnit, - N: n, - Data: dst.mat.Data, - Stride: dst.mat.Stride, - }, - cap: n, - } - u.Copy(c.chol) - // Compute the product U^T*U using the algorithm from LAPACK/TESTING/LIN/dpot01.f - a := u.mat.Data - lda := u.mat.Stride - bi := blas64.Implementation() - for k := n - 1; k >= 0; k-- { - a[k*lda+k] = bi.Ddot(k+1, a[k:], lda, a[k:], lda) - if k > 0 { - bi.Dtrmv(blas.Upper, blas.Trans, blas.NonUnit, k, a, lda, a[k:], lda) - } - } - return dst -} - -// InverseTo computes the inverse of the matrix represented by its Cholesky -// factorization and stores the result into s. If the factorized -// matrix is ill-conditioned, a Condition error will be returned. -// Note that matrix inversion is numerically unstable, and should generally be -// avoided where possible, for example by using the Solve routines. -func (c *Cholesky) InverseTo(s *SymDense) error { - if !c.valid() { - panic(badCholesky) - } - s.reuseAs(c.chol.mat.N) - // Create a TriDense representing the Cholesky factor U with the backing - // slice from s. - // Operations on u are reflected in s. - u := &TriDense{ - mat: blas64.Triangular{ - Uplo: blas.Upper, - Diag: blas.NonUnit, - N: s.mat.N, - Data: s.mat.Data, - Stride: s.mat.Stride, - }, - cap: s.mat.N, - } - u.Copy(c.chol) - - _, ok := lapack64.Potri(u.mat) - if !ok { - return Condition(math.Inf(1)) - } - if c.cond > ConditionTolerance { - return Condition(c.cond) - } - return nil -} - -// Scale multiplies the original matrix A by a positive constant using -// its Cholesky decomposition, storing the result in-place into the receiver. -// That is, if the original Cholesky factorization is -// U^T * U = A -// the updated factorization is -// U'^T * U' = f A = A' -// Scale panics if the constant is non-positive, or if the receiver is non-zero -// and is of a different size from the input. -func (c *Cholesky) Scale(f float64, orig *Cholesky) { - if !orig.valid() { - panic(badCholesky) - } - if f <= 0 { - panic("cholesky: scaling by a non-positive constant") - } - n := orig.Symmetric() - if c.chol == nil { - c.chol = NewTriDense(n, Upper, nil) - } else if c.chol.mat.N != n { - panic(ErrShape) - } - c.chol.ScaleTri(math.Sqrt(f), orig.chol) - c.cond = orig.cond // Scaling by a positive constant does not change the condition number. -} - -// ExtendVecSym computes the Cholesky decomposition of the original matrix A, -// whose Cholesky decomposition is in a, extended by a the n×1 vector v according to -// [A w] -// [w' k] -// where k = v[n-1] and w = v[:n-1]. The result is stored into the receiver. -// In order for the updated matrix to be positive definite, it must be the case -// that k > w' A^-1 w. If this condition does not hold then ExtendVecSym will -// return false and the receiver will not be updated. -// -// ExtendVecSym will panic if v.Len() != a.Symmetric()+1 or if a does not contain -// a valid decomposition. -func (c *Cholesky) ExtendVecSym(a *Cholesky, v Vector) (ok bool) { - n := a.Symmetric() - - if v.Len() != n+1 { - panic(badSliceLength) - } - if !a.valid() { - panic(badCholesky) - } - - // The algorithm is commented here, but see also - // https://math.stackexchange.com/questions/955874/cholesky-factor-when-adding-a-row-and-column-to-already-factorized-matrix - // We have A and want to compute the Cholesky of - // [A w] - // [w' k] - // We want - // [U c] - // [0 d] - // to be the updated Cholesky, and so it must be that - // [A w] = [U' 0] [U c] - // [w' k] [c' d] [0 d] - // Thus, we need - // 1) A = U'U (true by the original decomposition being valid), - // 2) U' * c = w => c = U'^-1 w - // 3) c'*c + d'*d = k => d = sqrt(k-c'*c) - - // First, compute c = U'^-1 a - // TODO(btracey): Replace this with CopyVec when issue 167 is fixed. - w := NewVecDense(n, nil) - for i := 0; i < n; i++ { - w.SetVec(i, v.At(i, 0)) - } - k := v.At(n, 0) - - var t VecDense - t.SolveVec(a.chol.T(), w) - - dot := Dot(&t, &t) - if dot >= k { - return false - } - d := math.Sqrt(k - dot) - - newU := NewTriDense(n+1, Upper, nil) - newU.Copy(a.chol) - for i := 0; i < n; i++ { - newU.SetTri(i, n, t.At(i, 0)) - } - newU.SetTri(n, n, d) - c.chol = newU - c.updateCond(-1) - return true -} - -// SymRankOne performs a rank-1 update of the original matrix A and refactorizes -// its Cholesky factorization, storing the result into the receiver. That is, if -// in the original Cholesky factorization -// U^T * U = A, -// in the updated factorization -// U'^T * U' = A + alpha * x * x^T = A'. -// -// Note that when alpha is negative, the updating problem may be ill-conditioned -// and the results may be inaccurate, or the updated matrix A' may not be -// positive definite and not have a Cholesky factorization. SymRankOne returns -// whether the updated matrix A' is positive definite. -// -// SymRankOne updates a Cholesky factorization in O(n²) time. The Cholesky -// factorization computation from scratch is O(n³). -func (c *Cholesky) SymRankOne(orig *Cholesky, alpha float64, x Vector) (ok bool) { - if !orig.valid() { - panic(badCholesky) - } - n := orig.Symmetric() - if r, c := x.Dims(); r != n || c != 1 { - panic(ErrShape) - } - if orig != c { - if c.chol == nil { - c.chol = NewTriDense(n, Upper, nil) - } else if c.chol.mat.N != n { - panic(ErrShape) - } - c.chol.Copy(orig.chol) - } - - if alpha == 0 { - return true - } - - // Algorithms for updating and downdating the Cholesky factorization are - // described, for example, in - // - J. J. Dongarra, J. R. Bunch, C. B. Moler, G. W. Stewart: LINPACK - // Users' Guide. SIAM (1979), pages 10.10--10.14 - // or - // - P. E. Gill, G. H. Golub, W. Murray, and M. A. Saunders: Methods for - // modifying matrix factorizations. Mathematics of Computation 28(126) - // (1974), Method C3 on page 521 - // - // The implementation is based on LINPACK code - // http://www.netlib.org/linpack/dchud.f - // http://www.netlib.org/linpack/dchdd.f - // and - // https://icl.cs.utk.edu/lapack-forum/viewtopic.php?f=2&t=2646 - // - // According to http://icl.cs.utk.edu/lapack-forum/archives/lapack/msg00301.html - // LINPACK is released under BSD license. - // - // See also: - // - M. A. Saunders: Large-scale Linear Programming Using the Cholesky - // Factorization. Technical Report Stanford University (1972) - // http://i.stanford.edu/pub/cstr/reports/cs/tr/72/252/CS-TR-72-252.pdf - // - Matthias Seeger: Low rank updates for the Cholesky decomposition. - // EPFL Technical Report 161468 (2004) - // http://infoscience.epfl.ch/record/161468 - - work := getFloats(n, false) - defer putFloats(work) - var xmat blas64.Vector - if rv, ok := x.(RawVectorer); ok { - xmat = rv.RawVector() - } else { - var tmp *VecDense - tmp.CopyVec(x) - xmat = tmp.RawVector() - } - blas64.Copy(xmat, blas64.Vector{N: n, Data: work, Inc: 1}) - - if alpha > 0 { - // Compute rank-1 update. - if alpha != 1 { - blas64.Scal(math.Sqrt(alpha), blas64.Vector{N: n, Data: work, Inc: 1}) - } - umat := c.chol.mat - stride := umat.Stride - for i := 0; i < n; i++ { - // Compute parameters of the Givens matrix that zeroes - // the i-th element of x. - c, s, r, _ := blas64.Rotg(umat.Data[i*stride+i], work[i]) - if r < 0 { - // Multiply by -1 to have positive diagonal - // elemnts. - r *= -1 - c *= -1 - s *= -1 - } - umat.Data[i*stride+i] = r - if i < n-1 { - // Multiply the extended factorization matrix by - // the Givens matrix from the left. Only - // the i-th row and x are modified. - blas64.Rot( - blas64.Vector{N: n - i - 1, Data: umat.Data[i*stride+i+1 : i*stride+n], Inc: 1}, - blas64.Vector{N: n - i - 1, Data: work[i+1 : n], Inc: 1}, - c, s) - } - } - c.updateCond(-1) - return true - } - - // Compute rank-1 downdate. - alpha = math.Sqrt(-alpha) - if alpha != 1 { - blas64.Scal(alpha, blas64.Vector{N: n, Data: work, Inc: 1}) - } - // Solve U^T * p = x storing the result into work. - ok = lapack64.Trtrs(blas.Trans, c.chol.RawTriangular(), blas64.General{ - Rows: n, - Cols: 1, - Stride: 1, - Data: work, - }) - if !ok { - // The original matrix is singular. Should not happen, because - // the factorization is valid. - panic(badCholesky) - } - norm := blas64.Nrm2(blas64.Vector{N: n, Data: work, Inc: 1}) - if norm >= 1 { - // The updated matrix is not positive definite. - return false - } - norm = math.Sqrt((1 + norm) * (1 - norm)) - cos := getFloats(n, false) - defer putFloats(cos) - sin := getFloats(n, false) - defer putFloats(sin) - for i := n - 1; i >= 0; i-- { - // Compute parameters of Givens matrices that zero elements of p - // backwards. - cos[i], sin[i], norm, _ = blas64.Rotg(norm, work[i]) - if norm < 0 { - norm *= -1 - cos[i] *= -1 - sin[i] *= -1 - } - } - umat := c.chol.mat - stride := umat.Stride - for i := n - 1; i >= 0; i-- { - work[i] = 0 - // Apply Givens matrices to U. - // TODO(vladimir-ch): Use workspace to avoid modifying the - // receiver in case an invalid factorization is created. - blas64.Rot( - blas64.Vector{N: n - i, Data: work[i:n], Inc: 1}, - blas64.Vector{N: n - i, Data: umat.Data[i*stride+i : i*stride+n], Inc: 1}, - cos[i], sin[i]) - if umat.Data[i*stride+i] == 0 { - // The matrix is singular (may rarely happen due to - // floating-point effects?). - ok = false - } else if umat.Data[i*stride+i] < 0 { - // Diagonal elements should be positive. If it happens - // that on the i-th row the diagonal is negative, - // multiply U from the left by an identity matrix that - // has -1 on the i-th row. - blas64.Scal(-1, blas64.Vector{N: n - i, Data: umat.Data[i*stride+i : i*stride+n], Inc: 1}) - } - } - if ok { - c.updateCond(-1) - } else { - c.Reset() - } - return ok -} - -func (c *Cholesky) valid() bool { - return c.chol != nil && !c.chol.IsZero() -} diff --git a/vendor/gonum.org/v1/gonum/mat/cmatrix.go b/vendor/gonum.org/v1/gonum/mat/cmatrix.go deleted file mode 100644 index 6219c28aaa..0000000000 --- a/vendor/gonum.org/v1/gonum/mat/cmatrix.go +++ /dev/null @@ -1,210 +0,0 @@ -// Copyright ©2013 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package mat - -import ( - "math" - "math/cmplx" - - "gonum.org/v1/gonum/floats" -) - -// CMatrix is the basic matrix interface type for complex matrices. -type CMatrix interface { - // Dims returns the dimensions of a Matrix. - Dims() (r, c int) - - // At returns the value of a matrix element at row i, column j. - // It will panic if i or j are out of bounds for the matrix. - At(i, j int) complex128 - - // H returns the conjugate transpose of the Matrix. Whether H - // returns a copy of the underlying data is implementation dependent. - // This method may be implemented using the Conjugate type, which - // provides an implicit matrix conjugate transpose. - H() CMatrix -} - -var ( - _ CMatrix = Conjugate{} - _ Unconjugator = Conjugate{} -) - -// Conjugate is a type for performing an implicit matrix conjugate transpose. -// It implements the Matrix interface, returning values from the conjugate -// transpose of the matrix within. -type Conjugate struct { - CMatrix CMatrix -} - -// At returns the value of the element at row i and column j of the conjugate -// transposed matrix, that is, row j and column i of the Matrix field. -func (t Conjugate) At(i, j int) complex128 { - z := t.CMatrix.At(j, i) - return cmplx.Conj(z) -} - -// Dims returns the dimensions of the transposed matrix. The number of rows returned -// is the number of columns in the Matrix field, and the number of columns is -// the number of rows in the Matrix field. -func (t Conjugate) Dims() (r, c int) { - c, r = t.CMatrix.Dims() - return r, c -} - -// H performs an implicit conjugate transpose by returning the Matrix field. -func (t Conjugate) H() CMatrix { - return t.CMatrix -} - -// Unconjugate returns the Matrix field. -func (t Conjugate) Unconjugate() CMatrix { - return t.CMatrix -} - -// Unconjugator is a type that can undo an implicit conjugate transpose. -type Unconjugator interface { - // Note: This interface is needed to unify all of the Conjugate types. In - // the cmat128 methods, we need to test if the Matrix has been implicitly - // transposed. If this is checked by testing for the specific Conjugate type - // then the behavior will be different if the user uses H() or HTri() for a - // triangular matrix. - - // Unconjugate returns the underlying Matrix stored for the implicit - // conjugate transpose. - Unconjugate() CMatrix -} - -// useC returns a complex128 slice with l elements, using c if it -// has the necessary capacity, otherwise creating a new slice. -func useC(c []complex128, l int) []complex128 { - if l <= cap(c) { - return c[:l] - } - return make([]complex128, l) -} - -// useZeroedC returns a complex128 slice with l elements, using c if it -// has the necessary capacity, otherwise creating a new slice. The -// elements of the returned slice are guaranteed to be zero. -func useZeroedC(c []complex128, l int) []complex128 { - if l <= cap(c) { - c = c[:l] - zeroC(c) - return c - } - return make([]complex128, l) -} - -// zeroC zeros the given slice's elements. -func zeroC(c []complex128) { - for i := range c { - c[i] = 0 - } -} - -// unconjugate unconjugates a matrix if applicable. If a is an Unconjugator, then -// unconjugate returns the underlying matrix and true. If it is not, then it returns -// the input matrix and false. -func unconjugate(a CMatrix) (CMatrix, bool) { - if ut, ok := a.(Unconjugator); ok { - return ut.Unconjugate(), true - } - return a, false -} - -// CEqual returns whether the matrices a and b have the same size -// and are element-wise equal. -func CEqual(a, b CMatrix) bool { - ar, ac := a.Dims() - br, bc := b.Dims() - if ar != br || ac != bc { - return false - } - // TODO(btracey): Add in fast-paths. - for i := 0; i < ar; i++ { - for j := 0; j < ac; j++ { - if a.At(i, j) != b.At(i, j) { - return false - } - } - } - return true -} - -// CEqualApprox returns whether the matrices a and b have the same size and contain all equal -// elements with tolerance for element-wise equality specified by epsilon. Matrices -// with non-equal shapes are not equal. -func CEqualApprox(a, b CMatrix, epsilon float64) bool { - // TODO(btracey): - ar, ac := a.Dims() - br, bc := b.Dims() - if ar != br || ac != bc { - return false - } - for i := 0; i < ar; i++ { - for j := 0; j < ac; j++ { - if !cEqualWithinAbsOrRel(a.At(i, j), b.At(i, j), epsilon, epsilon) { - return false - } - } - } - return true -} - -// TODO(btracey): Move these into a cmplxs if/when we have one. - -func cEqualWithinAbsOrRel(a, b complex128, absTol, relTol float64) bool { - if cEqualWithinAbs(a, b, absTol) { - return true - } - return cEqualWithinRel(a, b, relTol) -} - -// cEqualWithinAbs returns true if a and b have an absolute -// difference of less than tol. -func cEqualWithinAbs(a, b complex128, tol float64) bool { - return a == b || cmplx.Abs(a-b) <= tol -} - -const minNormalFloat64 = 2.2250738585072014e-308 - -// cEqualWithinRel returns true if the difference between a and b -// is not greater than tol times the greater value. -func cEqualWithinRel(a, b complex128, tol float64) bool { - if a == b { - return true - } - if cmplx.IsNaN(a) || cmplx.IsNaN(b) { - return false - } - // Cannot play the same trick as in floats because there are multiple - // possible infinities. - if cmplx.IsInf(a) { - if !cmplx.IsInf(b) { - return false - } - ra := real(a) - if math.IsInf(ra, 0) { - if ra == real(b) { - return floats.EqualWithinRel(imag(a), imag(b), tol) - } - return false - } - if imag(a) == imag(b) { - return floats.EqualWithinRel(ra, real(b), tol) - } - return false - } - if cmplx.IsInf(b) { - return false - } - - delta := cmplx.Abs(a - b) - if delta <= minNormalFloat64 { - return delta <= tol*minNormalFloat64 - } - return delta/math.Max(cmplx.Abs(a), cmplx.Abs(b)) <= tol -} diff --git a/vendor/gonum.org/v1/gonum/mat/consts.go b/vendor/gonum.org/v1/gonum/mat/consts.go deleted file mode 100644 index 3de3f5bf47..0000000000 --- a/vendor/gonum.org/v1/gonum/mat/consts.go +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright ©2016 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package mat - -// TriKind represents the triangularity of the matrix. -type TriKind bool - -const ( - // Upper specifies an upper triangular matrix. - Upper TriKind = true - // Lower specifies a lower triangular matrix. - Lower TriKind = false -) diff --git a/vendor/gonum.org/v1/gonum/mat/dense.go b/vendor/gonum.org/v1/gonum/mat/dense.go deleted file mode 100644 index 87b1105cad..0000000000 --- a/vendor/gonum.org/v1/gonum/mat/dense.go +++ /dev/null @@ -1,558 +0,0 @@ -// Copyright ©2013 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package mat - -import ( - "gonum.org/v1/gonum/blas" - "gonum.org/v1/gonum/blas/blas64" -) - -var ( - dense *Dense - - _ Matrix = dense - _ Mutable = dense - - _ Cloner = dense - _ RowViewer = dense - _ ColViewer = dense - _ RawRowViewer = dense - _ Grower = dense - - _ RawMatrixSetter = dense - _ RawMatrixer = dense - - _ Reseter = dense -) - -// Dense is a dense matrix representation. -type Dense struct { - mat blas64.General - - capRows, capCols int -} - -// NewDense creates a new Dense matrix with r rows and c columns. If data == nil, -// a new slice is allocated for the backing slice. If len(data) == r*c, data is -// used as the backing slice, and changes to the elements of the returned Dense -// will be reflected in data. If neither of these is true, NewDense will panic. -// NewDense will panic if either r or c is zero. -// -// The data must be arranged in row-major order, i.e. the (i*c + j)-th -// element in the data slice is the {i, j}-th element in the matrix. -func NewDense(r, c int, data []float64) *Dense { - if r <= 0 || c <= 0 { - if r == 0 || c == 0 { - panic(ErrZeroLength) - } - panic("mat: negative dimension") - } - if data != nil && r*c != len(data) { - panic(ErrShape) - } - if data == nil { - data = make([]float64, r*c) - } - return &Dense{ - mat: blas64.General{ - Rows: r, - Cols: c, - Stride: c, - Data: data, - }, - capRows: r, - capCols: c, - } -} - -// reuseAs resizes an empty matrix to a r×c matrix, -// or checks that a non-empty matrix is r×c. -// -// reuseAs must be kept in sync with reuseAsZeroed. -func (m *Dense) reuseAs(r, c int) { - if m.mat.Rows > m.capRows || m.mat.Cols > m.capCols { - // Panic as a string, not a mat.Error. - panic("mat: caps not correctly set") - } - if r == 0 || c == 0 { - panic(ErrZeroLength) - } - if m.IsZero() { - m.mat = blas64.General{ - Rows: r, - Cols: c, - Stride: c, - Data: use(m.mat.Data, r*c), - } - m.capRows = r - m.capCols = c - return - } - if r != m.mat.Rows || c != m.mat.Cols { - panic(ErrShape) - } -} - -// reuseAsZeroed resizes an empty matrix to a r×c matrix, -// or checks that a non-empty matrix is r×c. It zeroes -// all the elements of the matrix. -// -// reuseAsZeroed must be kept in sync with reuseAs. -func (m *Dense) reuseAsZeroed(r, c int) { - if m.mat.Rows > m.capRows || m.mat.Cols > m.capCols { - // Panic as a string, not a mat.Error. - panic("mat: caps not correctly set") - } - if r == 0 || c == 0 { - panic(ErrZeroLength) - } - if m.IsZero() { - m.mat = blas64.General{ - Rows: r, - Cols: c, - Stride: c, - Data: useZeroed(m.mat.Data, r*c), - } - m.capRows = r - m.capCols = c - return - } - if r != m.mat.Rows || c != m.mat.Cols { - panic(ErrShape) - } - m.Zero() -} - -// Zero sets all of the matrix elements to zero. -func (m *Dense) Zero() { - r := m.mat.Rows - c := m.mat.Cols - for i := 0; i < r; i++ { - zero(m.mat.Data[i*m.mat.Stride : i*m.mat.Stride+c]) - } -} - -// isolatedWorkspace returns a new dense matrix w with the size of a and -// returns a callback to defer which performs cleanup at the return of the call. -// This should be used when a method receiver is the same pointer as an input argument. -func (m *Dense) isolatedWorkspace(a Matrix) (w *Dense, restore func()) { - r, c := a.Dims() - if r == 0 || c == 0 { - panic(ErrZeroLength) - } - w = getWorkspace(r, c, false) - return w, func() { - m.Copy(w) - putWorkspace(w) - } -} - -// Reset zeros the dimensions of the matrix so that it can be reused as the -// receiver of a dimensionally restricted operation. -// -// See the Reseter interface for more information. -func (m *Dense) Reset() { - // Row, Cols and Stride must be zeroed in unison. - m.mat.Rows, m.mat.Cols, m.mat.Stride = 0, 0, 0 - m.capRows, m.capCols = 0, 0 - m.mat.Data = m.mat.Data[:0] -} - -// IsZero returns whether the receiver is zero-sized. Zero-sized matrices can be the -// receiver for size-restricted operations. Dense matrices can be zeroed using Reset. -func (m *Dense) IsZero() bool { - // It must be the case that m.Dims() returns - // zeros in this case. See comment in Reset(). - return m.mat.Stride == 0 -} - -// asTriDense returns a TriDense with the given size and side. The backing data -// of the TriDense is the same as the receiver. -func (m *Dense) asTriDense(n int, diag blas.Diag, uplo blas.Uplo) *TriDense { - return &TriDense{ - mat: blas64.Triangular{ - N: n, - Stride: m.mat.Stride, - Data: m.mat.Data, - Uplo: uplo, - Diag: diag, - }, - cap: n, - } -} - -// DenseCopyOf returns a newly allocated copy of the elements of a. -func DenseCopyOf(a Matrix) *Dense { - d := &Dense{} - d.Clone(a) - return d -} - -// SetRawMatrix sets the underlying blas64.General used by the receiver. -// Changes to elements in the receiver following the call will be reflected -// in b. -func (m *Dense) SetRawMatrix(b blas64.General) { - m.capRows, m.capCols = b.Rows, b.Cols - m.mat = b -} - -// RawMatrix returns the underlying blas64.General used by the receiver. -// Changes to elements in the receiver following the call will be reflected -// in returned blas64.General. -func (m *Dense) RawMatrix() blas64.General { return m.mat } - -// Dims returns the number of rows and columns in the matrix. -func (m *Dense) Dims() (r, c int) { return m.mat.Rows, m.mat.Cols } - -// Caps returns the number of rows and columns in the backing matrix. -func (m *Dense) Caps() (r, c int) { return m.capRows, m.capCols } - -// T performs an implicit transpose by returning the receiver inside a Transpose. -func (m *Dense) T() Matrix { - return Transpose{m} -} - -// ColView returns a Vector reflecting the column j, backed by the matrix data. -// -// See ColViewer for more information. -func (m *Dense) ColView(j int) Vector { - var v VecDense - v.ColViewOf(m, j) - return &v -} - -// SetCol sets the values in the specified column of the matrix to the values -// in src. len(src) must equal the number of rows in the receiver. -func (m *Dense) SetCol(j int, src []float64) { - if j >= m.mat.Cols || j < 0 { - panic(ErrColAccess) - } - if len(src) != m.mat.Rows { - panic(ErrColLength) - } - - blas64.Copy( - blas64.Vector{N: m.mat.Rows, Inc: 1, Data: src}, - blas64.Vector{N: m.mat.Rows, Inc: m.mat.Stride, Data: m.mat.Data[j:]}, - ) -} - -// SetRow sets the values in the specified rows of the matrix to the values -// in src. len(src) must equal the number of columns in the receiver. -func (m *Dense) SetRow(i int, src []float64) { - if i >= m.mat.Rows || i < 0 { - panic(ErrRowAccess) - } - if len(src) != m.mat.Cols { - panic(ErrRowLength) - } - - copy(m.rawRowView(i), src) -} - -// RowView returns row i of the matrix data represented as a column vector, -// backed by the matrix data. -// -// See RowViewer for more information. -func (m *Dense) RowView(i int) Vector { - var v VecDense - v.RowViewOf(m, i) - return &v -} - -// RawRowView returns a slice backed by the same array as backing the -// receiver. -func (m *Dense) RawRowView(i int) []float64 { - if i >= m.mat.Rows || i < 0 { - panic(ErrRowAccess) - } - return m.rawRowView(i) -} - -func (m *Dense) rawRowView(i int) []float64 { - return m.mat.Data[i*m.mat.Stride : i*m.mat.Stride+m.mat.Cols] -} - -// DiagView returns the diagonal as a matrix backed by the original data. -func (m *Dense) DiagView() Diagonal { - n := min(m.mat.Rows, m.mat.Cols) - return &DiagDense{ - mat: blas64.Vector{ - N: n, - Inc: m.mat.Stride + 1, - Data: m.mat.Data[:(n-1)*m.mat.Stride+n], - }, - } -} - -// Slice returns a new Matrix that shares backing data with the receiver. -// The returned matrix starts at {i,j} of the receiver and extends k-i rows -// and l-j columns. The final row in the resulting matrix is k-1 and the -// final column is l-1. -// Slice panics with ErrIndexOutOfRange if the slice is outside the capacity -// of the receiver. -func (m *Dense) Slice(i, k, j, l int) Matrix { - mr, mc := m.Caps() - if i < 0 || mr <= i || j < 0 || mc <= j || k < i || mr < k || l < j || mc < l { - if i == k || j == l { - panic(ErrZeroLength) - } - panic(ErrIndexOutOfRange) - } - t := *m - t.mat.Data = t.mat.Data[i*t.mat.Stride+j : (k-1)*t.mat.Stride+l] - t.mat.Rows = k - i - t.mat.Cols = l - j - t.capRows -= i - t.capCols -= j - return &t -} - -// Grow returns the receiver expanded by r rows and c columns. If the dimensions -// of the expanded matrix are outside the capacities of the receiver a new -// allocation is made, otherwise not. Note the receiver itself is not modified -// during the call to Grow. -func (m *Dense) Grow(r, c int) Matrix { - if r < 0 || c < 0 { - panic(ErrIndexOutOfRange) - } - if r == 0 && c == 0 { - return m - } - - r += m.mat.Rows - c += m.mat.Cols - - var t Dense - switch { - case m.mat.Rows == 0 || m.mat.Cols == 0: - t.mat = blas64.General{ - Rows: r, - Cols: c, - Stride: c, - // We zero because we don't know how the matrix will be used. - // In other places, the mat is immediately filled with a result; - // this is not the case here. - Data: useZeroed(m.mat.Data, r*c), - } - case r > m.capRows || c > m.capCols: - cr := max(r, m.capRows) - cc := max(c, m.capCols) - t.mat = blas64.General{ - Rows: r, - Cols: c, - Stride: cc, - Data: make([]float64, cr*cc), - } - t.capRows = cr - t.capCols = cc - // Copy the complete matrix over to the new matrix. - // Including elements not currently visible. Use a temporary structure - // to avoid modifying the receiver. - var tmp Dense - tmp.mat = blas64.General{ - Rows: m.mat.Rows, - Cols: m.mat.Cols, - Stride: m.mat.Stride, - Data: m.mat.Data, - } - tmp.capRows = m.capRows - tmp.capCols = m.capCols - t.Copy(&tmp) - return &t - default: - t.mat = blas64.General{ - Data: m.mat.Data[:(r-1)*m.mat.Stride+c], - Rows: r, - Cols: c, - Stride: m.mat.Stride, - } - } - t.capRows = r - t.capCols = c - return &t -} - -// Clone makes a copy of a into the receiver, overwriting the previous value of -// the receiver. The clone operation does not make any restriction on shape and -// will not cause shadowing. -// -// See the Cloner interface for more information. -func (m *Dense) Clone(a Matrix) { - r, c := a.Dims() - mat := blas64.General{ - Rows: r, - Cols: c, - Stride: c, - } - m.capRows, m.capCols = r, c - - aU, trans := untranspose(a) - switch aU := aU.(type) { - case RawMatrixer: - amat := aU.RawMatrix() - mat.Data = make([]float64, r*c) - if trans { - for i := 0; i < r; i++ { - blas64.Copy(blas64.Vector{N: c, Inc: amat.Stride, Data: amat.Data[i : i+(c-1)*amat.Stride+1]}, - blas64.Vector{N: c, Inc: 1, Data: mat.Data[i*c : (i+1)*c]}) - } - } else { - for i := 0; i < r; i++ { - copy(mat.Data[i*c:(i+1)*c], amat.Data[i*amat.Stride:i*amat.Stride+c]) - } - } - case *VecDense: - amat := aU.mat - mat.Data = make([]float64, aU.mat.N) - blas64.Copy(blas64.Vector{N: aU.mat.N, Inc: amat.Inc, Data: amat.Data}, - blas64.Vector{N: aU.mat.N, Inc: 1, Data: mat.Data}) - default: - mat.Data = make([]float64, r*c) - w := *m - w.mat = mat - for i := 0; i < r; i++ { - for j := 0; j < c; j++ { - w.set(i, j, a.At(i, j)) - } - } - *m = w - return - } - m.mat = mat -} - -// Copy makes a copy of elements of a into the receiver. It is similar to the -// built-in copy; it copies as much as the overlap between the two matrices and -// returns the number of rows and columns it copied. If a aliases the receiver -// and is a transposed Dense or VecDense, with a non-unitary increment, Copy will -// panic. -// -// See the Copier interface for more information. -func (m *Dense) Copy(a Matrix) (r, c int) { - r, c = a.Dims() - if a == m { - return r, c - } - r = min(r, m.mat.Rows) - c = min(c, m.mat.Cols) - if r == 0 || c == 0 { - return 0, 0 - } - - aU, trans := untranspose(a) - switch aU := aU.(type) { - case RawMatrixer: - amat := aU.RawMatrix() - if trans { - if amat.Stride != 1 { - m.checkOverlap(amat) - } - for i := 0; i < r; i++ { - blas64.Copy(blas64.Vector{N: c, Inc: amat.Stride, Data: amat.Data[i : i+(c-1)*amat.Stride+1]}, - blas64.Vector{N: c, Inc: 1, Data: m.mat.Data[i*m.mat.Stride : i*m.mat.Stride+c]}) - } - } else { - switch o := offset(m.mat.Data, amat.Data); { - case o < 0: - for i := r - 1; i >= 0; i-- { - copy(m.mat.Data[i*m.mat.Stride:i*m.mat.Stride+c], amat.Data[i*amat.Stride:i*amat.Stride+c]) - } - case o > 0: - for i := 0; i < r; i++ { - copy(m.mat.Data[i*m.mat.Stride:i*m.mat.Stride+c], amat.Data[i*amat.Stride:i*amat.Stride+c]) - } - default: - // Nothing to do. - } - } - case *VecDense: - var n, stride int - amat := aU.mat - if trans { - if amat.Inc != 1 { - m.checkOverlap(aU.asGeneral()) - } - n = c - stride = 1 - } else { - n = r - stride = m.mat.Stride - } - if amat.Inc == 1 && stride == 1 { - copy(m.mat.Data, amat.Data[:n]) - break - } - switch o := offset(m.mat.Data, amat.Data); { - case o < 0: - blas64.Copy(blas64.Vector{N: n, Inc: -amat.Inc, Data: amat.Data}, - blas64.Vector{N: n, Inc: -stride, Data: m.mat.Data}) - case o > 0: - blas64.Copy(blas64.Vector{N: n, Inc: amat.Inc, Data: amat.Data}, - blas64.Vector{N: n, Inc: stride, Data: m.mat.Data}) - default: - // Nothing to do. - } - default: - m.checkOverlapMatrix(aU) - for i := 0; i < r; i++ { - for j := 0; j < c; j++ { - m.set(i, j, a.At(i, j)) - } - } - } - - return r, c -} - -// Stack appends the rows of b onto the rows of a, placing the result into the -// receiver with b placed in the greater indexed rows. Stack will panic if the -// two input matrices do not have the same number of columns or the constructed -// stacked matrix is not the same shape as the receiver. -func (m *Dense) Stack(a, b Matrix) { - ar, ac := a.Dims() - br, bc := b.Dims() - if ac != bc || m == a || m == b { - panic(ErrShape) - } - - m.reuseAs(ar+br, ac) - - m.Copy(a) - w := m.Slice(ar, ar+br, 0, bc).(*Dense) - w.Copy(b) -} - -// Augment creates the augmented matrix of a and b, where b is placed in the -// greater indexed columns. Augment will panic if the two input matrices do -// not have the same number of rows or the constructed augmented matrix is -// not the same shape as the receiver. -func (m *Dense) Augment(a, b Matrix) { - ar, ac := a.Dims() - br, bc := b.Dims() - if ar != br || m == a || m == b { - panic(ErrShape) - } - - m.reuseAs(ar, ac+bc) - - m.Copy(a) - w := m.Slice(0, br, ac, ac+bc).(*Dense) - w.Copy(b) -} - -// Trace returns the trace of the matrix. The matrix must be square or Trace -// will panic. -func (m *Dense) Trace() float64 { - if m.mat.Rows != m.mat.Cols { - panic(ErrSquare) - } - // TODO(btracey): could use internal asm sum routine. - var v float64 - for i := 0; i < m.mat.Rows; i++ { - v += m.mat.Data[i*m.mat.Stride+i] - } - return v -} diff --git a/vendor/gonum.org/v1/gonum/mat/dense_arithmetic.go b/vendor/gonum.org/v1/gonum/mat/dense_arithmetic.go deleted file mode 100644 index dd4526f634..0000000000 --- a/vendor/gonum.org/v1/gonum/mat/dense_arithmetic.go +++ /dev/null @@ -1,886 +0,0 @@ -// Copyright ©2013 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package mat - -import ( - "math" - - "gonum.org/v1/gonum/blas" - "gonum.org/v1/gonum/blas/blas64" - "gonum.org/v1/gonum/lapack/lapack64" -) - -// Add adds a and b element-wise, placing the result in the receiver. Add -// will panic if the two matrices do not have the same shape. -func (m *Dense) Add(a, b Matrix) { - ar, ac := a.Dims() - br, bc := b.Dims() - if ar != br || ac != bc { - panic(ErrShape) - } - - aU, _ := untranspose(a) - bU, _ := untranspose(b) - m.reuseAs(ar, ac) - - if arm, ok := a.(RawMatrixer); ok { - if brm, ok := b.(RawMatrixer); ok { - amat, bmat := arm.RawMatrix(), brm.RawMatrix() - if m != aU { - m.checkOverlap(amat) - } - if m != bU { - m.checkOverlap(bmat) - } - for ja, jb, jm := 0, 0, 0; ja < ar*amat.Stride; ja, jb, jm = ja+amat.Stride, jb+bmat.Stride, jm+m.mat.Stride { - for i, v := range amat.Data[ja : ja+ac] { - m.mat.Data[i+jm] = v + bmat.Data[i+jb] - } - } - return - } - } - - m.checkOverlapMatrix(aU) - m.checkOverlapMatrix(bU) - var restore func() - if m == aU { - m, restore = m.isolatedWorkspace(aU) - defer restore() - } else if m == bU { - m, restore = m.isolatedWorkspace(bU) - defer restore() - } - - for r := 0; r < ar; r++ { - for c := 0; c < ac; c++ { - m.set(r, c, a.At(r, c)+b.At(r, c)) - } - } -} - -// Sub subtracts the matrix b from a, placing the result in the receiver. Sub -// will panic if the two matrices do not have the same shape. -func (m *Dense) Sub(a, b Matrix) { - ar, ac := a.Dims() - br, bc := b.Dims() - if ar != br || ac != bc { - panic(ErrShape) - } - - aU, _ := untranspose(a) - bU, _ := untranspose(b) - m.reuseAs(ar, ac) - - if arm, ok := a.(RawMatrixer); ok { - if brm, ok := b.(RawMatrixer); ok { - amat, bmat := arm.RawMatrix(), brm.RawMatrix() - if m != aU { - m.checkOverlap(amat) - } - if m != bU { - m.checkOverlap(bmat) - } - for ja, jb, jm := 0, 0, 0; ja < ar*amat.Stride; ja, jb, jm = ja+amat.Stride, jb+bmat.Stride, jm+m.mat.Stride { - for i, v := range amat.Data[ja : ja+ac] { - m.mat.Data[i+jm] = v - bmat.Data[i+jb] - } - } - return - } - } - - m.checkOverlapMatrix(aU) - m.checkOverlapMatrix(bU) - var restore func() - if m == aU { - m, restore = m.isolatedWorkspace(aU) - defer restore() - } else if m == bU { - m, restore = m.isolatedWorkspace(bU) - defer restore() - } - - for r := 0; r < ar; r++ { - for c := 0; c < ac; c++ { - m.set(r, c, a.At(r, c)-b.At(r, c)) - } - } -} - -// MulElem performs element-wise multiplication of a and b, placing the result -// in the receiver. MulElem will panic if the two matrices do not have the same -// shape. -func (m *Dense) MulElem(a, b Matrix) { - ar, ac := a.Dims() - br, bc := b.Dims() - if ar != br || ac != bc { - panic(ErrShape) - } - - aU, _ := untranspose(a) - bU, _ := untranspose(b) - m.reuseAs(ar, ac) - - if arm, ok := a.(RawMatrixer); ok { - if brm, ok := b.(RawMatrixer); ok { - amat, bmat := arm.RawMatrix(), brm.RawMatrix() - if m != aU { - m.checkOverlap(amat) - } - if m != bU { - m.checkOverlap(bmat) - } - for ja, jb, jm := 0, 0, 0; ja < ar*amat.Stride; ja, jb, jm = ja+amat.Stride, jb+bmat.Stride, jm+m.mat.Stride { - for i, v := range amat.Data[ja : ja+ac] { - m.mat.Data[i+jm] = v * bmat.Data[i+jb] - } - } - return - } - } - - m.checkOverlapMatrix(aU) - m.checkOverlapMatrix(bU) - var restore func() - if m == aU { - m, restore = m.isolatedWorkspace(aU) - defer restore() - } else if m == bU { - m, restore = m.isolatedWorkspace(bU) - defer restore() - } - - for r := 0; r < ar; r++ { - for c := 0; c < ac; c++ { - m.set(r, c, a.At(r, c)*b.At(r, c)) - } - } -} - -// DivElem performs element-wise division of a by b, placing the result -// in the receiver. DivElem will panic if the two matrices do not have the same -// shape. -func (m *Dense) DivElem(a, b Matrix) { - ar, ac := a.Dims() - br, bc := b.Dims() - if ar != br || ac != bc { - panic(ErrShape) - } - - aU, _ := untranspose(a) - bU, _ := untranspose(b) - m.reuseAs(ar, ac) - - if arm, ok := a.(RawMatrixer); ok { - if brm, ok := b.(RawMatrixer); ok { - amat, bmat := arm.RawMatrix(), brm.RawMatrix() - if m != aU { - m.checkOverlap(amat) - } - if m != bU { - m.checkOverlap(bmat) - } - for ja, jb, jm := 0, 0, 0; ja < ar*amat.Stride; ja, jb, jm = ja+amat.Stride, jb+bmat.Stride, jm+m.mat.Stride { - for i, v := range amat.Data[ja : ja+ac] { - m.mat.Data[i+jm] = v / bmat.Data[i+jb] - } - } - return - } - } - - m.checkOverlapMatrix(aU) - m.checkOverlapMatrix(bU) - var restore func() - if m == aU { - m, restore = m.isolatedWorkspace(aU) - defer restore() - } else if m == bU { - m, restore = m.isolatedWorkspace(bU) - defer restore() - } - - for r := 0; r < ar; r++ { - for c := 0; c < ac; c++ { - m.set(r, c, a.At(r, c)/b.At(r, c)) - } - } -} - -// Inverse computes the inverse of the matrix a, storing the result into the -// receiver. If a is ill-conditioned, a Condition error will be returned. -// Note that matrix inversion is numerically unstable, and should generally -// be avoided where possible, for example by using the Solve routines. -func (m *Dense) Inverse(a Matrix) error { - // TODO(btracey): Special case for RawTriangular, etc. - r, c := a.Dims() - if r != c { - panic(ErrSquare) - } - m.reuseAs(a.Dims()) - aU, aTrans := untranspose(a) - switch rm := aU.(type) { - case RawMatrixer: - if m != aU || aTrans { - if m == aU || m.checkOverlap(rm.RawMatrix()) { - tmp := getWorkspace(r, c, false) - tmp.Copy(a) - m.Copy(tmp) - putWorkspace(tmp) - break - } - m.Copy(a) - } - default: - m.Copy(a) - } - ipiv := getInts(r, false) - defer putInts(ipiv) - ok := lapack64.Getrf(m.mat, ipiv) - if !ok { - return Condition(math.Inf(1)) - } - work := getFloats(4*r, false) // must be at least 4*r for cond. - lapack64.Getri(m.mat, ipiv, work, -1) - if int(work[0]) > 4*r { - l := int(work[0]) - putFloats(work) - work = getFloats(l, false) - } else { - work = work[:4*r] - } - defer putFloats(work) - lapack64.Getri(m.mat, ipiv, work, len(work)) - norm := lapack64.Lange(CondNorm, m.mat, work) - rcond := lapack64.Gecon(CondNorm, m.mat, norm, work, ipiv) // reuse ipiv - if rcond == 0 { - return Condition(math.Inf(1)) - } - cond := 1 / rcond - if cond > ConditionTolerance { - return Condition(cond) - } - return nil -} - -// Mul takes the matrix product of a and b, placing the result in the receiver. -// If the number of columns in a does not equal the number of rows in b, Mul will panic. -func (m *Dense) Mul(a, b Matrix) { - ar, ac := a.Dims() - br, bc := b.Dims() - - if ac != br { - panic(ErrShape) - } - - aU, aTrans := untranspose(a) - bU, bTrans := untranspose(b) - m.reuseAs(ar, bc) - var restore func() - if m == aU { - m, restore = m.isolatedWorkspace(aU) - defer restore() - } else if m == bU { - m, restore = m.isolatedWorkspace(bU) - defer restore() - } - aT := blas.NoTrans - if aTrans { - aT = blas.Trans - } - bT := blas.NoTrans - if bTrans { - bT = blas.Trans - } - - // Some of the cases do not have a transpose option, so create - // temporary memory. - // C = A^T * B = (B^T * A)^T - // C^T = B^T * A. - if aUrm, ok := aU.(RawMatrixer); ok { - amat := aUrm.RawMatrix() - if restore == nil { - m.checkOverlap(amat) - } - if bUrm, ok := bU.(RawMatrixer); ok { - bmat := bUrm.RawMatrix() - if restore == nil { - m.checkOverlap(bmat) - } - blas64.Gemm(aT, bT, 1, amat, bmat, 0, m.mat) - return - } - if bU, ok := bU.(RawSymmetricer); ok { - bmat := bU.RawSymmetric() - if aTrans { - c := getWorkspace(ac, ar, false) - blas64.Symm(blas.Left, 1, bmat, amat, 0, c.mat) - strictCopy(m, c.T()) - putWorkspace(c) - return - } - blas64.Symm(blas.Right, 1, bmat, amat, 0, m.mat) - return - } - if bU, ok := bU.(RawTriangular); ok { - // Trmm updates in place, so copy aU first. - bmat := bU.RawTriangular() - if aTrans { - c := getWorkspace(ac, ar, false) - var tmp Dense - tmp.SetRawMatrix(amat) - c.Copy(&tmp) - bT := blas.Trans - if bTrans { - bT = blas.NoTrans - } - blas64.Trmm(blas.Left, bT, 1, bmat, c.mat) - strictCopy(m, c.T()) - putWorkspace(c) - return - } - m.Copy(a) - blas64.Trmm(blas.Right, bT, 1, bmat, m.mat) - return - } - if bU, ok := bU.(*VecDense); ok { - m.checkOverlap(bU.asGeneral()) - bvec := bU.RawVector() - if bTrans { - // {ar,1} x {1,bc}, which is not a vector. - // Instead, construct B as a General. - bmat := blas64.General{ - Rows: bc, - Cols: 1, - Stride: bvec.Inc, - Data: bvec.Data, - } - blas64.Gemm(aT, bT, 1, amat, bmat, 0, m.mat) - return - } - cvec := blas64.Vector{ - Inc: m.mat.Stride, - Data: m.mat.Data, - } - blas64.Gemv(aT, 1, amat, bvec, 0, cvec) - return - } - } - if bUrm, ok := bU.(RawMatrixer); ok { - bmat := bUrm.RawMatrix() - if restore == nil { - m.checkOverlap(bmat) - } - if aU, ok := aU.(RawSymmetricer); ok { - amat := aU.RawSymmetric() - if bTrans { - c := getWorkspace(bc, br, false) - blas64.Symm(blas.Right, 1, amat, bmat, 0, c.mat) - strictCopy(m, c.T()) - putWorkspace(c) - return - } - blas64.Symm(blas.Left, 1, amat, bmat, 0, m.mat) - return - } - if aU, ok := aU.(RawTriangular); ok { - // Trmm updates in place, so copy bU first. - amat := aU.RawTriangular() - if bTrans { - c := getWorkspace(bc, br, false) - var tmp Dense - tmp.SetRawMatrix(bmat) - c.Copy(&tmp) - aT := blas.Trans - if aTrans { - aT = blas.NoTrans - } - blas64.Trmm(blas.Right, aT, 1, amat, c.mat) - strictCopy(m, c.T()) - putWorkspace(c) - return - } - m.Copy(b) - blas64.Trmm(blas.Left, aT, 1, amat, m.mat) - return - } - if aU, ok := aU.(*VecDense); ok { - m.checkOverlap(aU.asGeneral()) - avec := aU.RawVector() - if aTrans { - // {1,ac} x {ac, bc} - // Transpose B so that the vector is on the right. - cvec := blas64.Vector{ - Inc: 1, - Data: m.mat.Data, - } - bT := blas.Trans - if bTrans { - bT = blas.NoTrans - } - blas64.Gemv(bT, 1, bmat, avec, 0, cvec) - return - } - // {ar,1} x {1,bc} which is not a vector result. - // Instead, construct A as a General. - amat := blas64.General{ - Rows: ar, - Cols: 1, - Stride: avec.Inc, - Data: avec.Data, - } - blas64.Gemm(aT, bT, 1, amat, bmat, 0, m.mat) - return - } - } - - m.checkOverlapMatrix(aU) - m.checkOverlapMatrix(bU) - row := getFloats(ac, false) - defer putFloats(row) - for r := 0; r < ar; r++ { - for i := range row { - row[i] = a.At(r, i) - } - for c := 0; c < bc; c++ { - var v float64 - for i, e := range row { - v += e * b.At(i, c) - } - m.mat.Data[r*m.mat.Stride+c] = v - } - } -} - -// strictCopy copies a into m panicking if the shape of a and m differ. -func strictCopy(m *Dense, a Matrix) { - r, c := m.Copy(a) - if r != m.mat.Rows || c != m.mat.Cols { - // Panic with a string since this - // is not a user-facing panic. - panic(ErrShape.Error()) - } -} - -// Exp calculates the exponential of the matrix a, e^a, placing the result -// in the receiver. Exp will panic with matrix.ErrShape if a is not square. -func (m *Dense) Exp(a Matrix) { - // The implementation used here is from Functions of Matrices: Theory and Computation - // Chapter 10, Algorithm 10.20. https://doi.org/10.1137/1.9780898717778.ch10 - - r, c := a.Dims() - if r != c { - panic(ErrShape) - } - - m.reuseAs(r, r) - if r == 1 { - m.mat.Data[0] = math.Exp(a.At(0, 0)) - return - } - - pade := []struct { - theta float64 - b []float64 - }{ - {theta: 0.015, b: []float64{ - 120, 60, 12, 1, - }}, - {theta: 0.25, b: []float64{ - 30240, 15120, 3360, 420, 30, 1, - }}, - {theta: 0.95, b: []float64{ - 17297280, 8648640, 1995840, 277200, 25200, 1512, 56, 1, - }}, - {theta: 2.1, b: []float64{ - 17643225600, 8821612800, 2075673600, 302702400, 30270240, 2162160, 110880, 3960, 90, 1, - }}, - } - - a1 := m - a1.Copy(a) - v := getWorkspace(r, r, true) - vraw := v.RawMatrix() - n := r * r - vvec := blas64.Vector{N: n, Inc: 1, Data: vraw.Data} - defer putWorkspace(v) - - u := getWorkspace(r, r, true) - uraw := u.RawMatrix() - uvec := blas64.Vector{N: n, Inc: 1, Data: uraw.Data} - defer putWorkspace(u) - - a2 := getWorkspace(r, r, false) - defer putWorkspace(a2) - - n1 := Norm(a, 1) - for i, t := range pade { - if n1 > t.theta { - continue - } - - // This loop only executes once, so - // this is not as horrible as it looks. - p := getWorkspace(r, r, true) - praw := p.RawMatrix() - pvec := blas64.Vector{N: n, Inc: 1, Data: praw.Data} - defer putWorkspace(p) - - for k := 0; k < r; k++ { - p.set(k, k, 1) - v.set(k, k, t.b[0]) - u.set(k, k, t.b[1]) - } - - a2.Mul(a1, a1) - for j := 0; j <= i; j++ { - p.Mul(p, a2) - blas64.Axpy(t.b[2*j+2], pvec, vvec) - blas64.Axpy(t.b[2*j+3], pvec, uvec) - } - u.Mul(a1, u) - - // Use p as a workspace here and - // rename u for the second call's - // receiver. - vmu, vpu := u, p - vpu.Add(v, u) - vmu.Sub(v, u) - - m.Solve(vmu, vpu) - return - } - - // Remaining Padé table line. - const theta13 = 5.4 - b := [...]float64{ - 64764752532480000, 32382376266240000, 7771770303897600, 1187353796428800, - 129060195264000, 10559470521600, 670442572800, 33522128640, - 1323241920, 40840800, 960960, 16380, 182, 1, - } - - s := math.Log2(n1 / theta13) - if s >= 0 { - s = math.Ceil(s) - a1.Scale(1/math.Pow(2, s), a1) - } - a2.Mul(a1, a1) - - i := getWorkspace(r, r, true) - for j := 0; j < r; j++ { - i.set(j, j, 1) - } - iraw := i.RawMatrix() - ivec := blas64.Vector{N: n, Inc: 1, Data: iraw.Data} - defer putWorkspace(i) - - a2raw := a2.RawMatrix() - a2vec := blas64.Vector{N: n, Inc: 1, Data: a2raw.Data} - - a4 := getWorkspace(r, r, false) - a4raw := a4.RawMatrix() - a4vec := blas64.Vector{N: n, Inc: 1, Data: a4raw.Data} - defer putWorkspace(a4) - a4.Mul(a2, a2) - - a6 := getWorkspace(r, r, false) - a6raw := a6.RawMatrix() - a6vec := blas64.Vector{N: n, Inc: 1, Data: a6raw.Data} - defer putWorkspace(a6) - a6.Mul(a2, a4) - - // V = A_6(b_12*A_6 + b_10*A_4 + b_8*A_2) + b_6*A_6 + b_4*A_4 + b_2*A_2 +b_0*I - blas64.Axpy(b[12], a6vec, vvec) - blas64.Axpy(b[10], a4vec, vvec) - blas64.Axpy(b[8], a2vec, vvec) - v.Mul(v, a6) - blas64.Axpy(b[6], a6vec, vvec) - blas64.Axpy(b[4], a4vec, vvec) - blas64.Axpy(b[2], a2vec, vvec) - blas64.Axpy(b[0], ivec, vvec) - - // U = A(A_6(b_13*A_6 + b_11*A_4 + b_9*A_2) + b_7*A_6 + b_5*A_4 + b_2*A_3 +b_1*I) - blas64.Axpy(b[13], a6vec, uvec) - blas64.Axpy(b[11], a4vec, uvec) - blas64.Axpy(b[9], a2vec, uvec) - u.Mul(u, a6) - blas64.Axpy(b[7], a6vec, uvec) - blas64.Axpy(b[5], a4vec, uvec) - blas64.Axpy(b[3], a2vec, uvec) - blas64.Axpy(b[1], ivec, uvec) - u.Mul(u, a1) - - // Use i as a workspace here and - // rename u for the second call's - // receiver. - vmu, vpu := u, i - vpu.Add(v, u) - vmu.Sub(v, u) - - m.Solve(vmu, vpu) - - for ; s > 0; s-- { - m.Mul(m, m) - } -} - -// Pow calculates the integral power of the matrix a to n, placing the result -// in the receiver. Pow will panic if n is negative or if a is not square. -func (m *Dense) Pow(a Matrix, n int) { - if n < 0 { - panic("matrix: illegal power") - } - r, c := a.Dims() - if r != c { - panic(ErrShape) - } - - m.reuseAs(r, c) - - // Take possible fast paths. - switch n { - case 0: - for i := 0; i < r; i++ { - zero(m.mat.Data[i*m.mat.Stride : i*m.mat.Stride+c]) - m.mat.Data[i*m.mat.Stride+i] = 1 - } - return - case 1: - m.Copy(a) - return - case 2: - m.Mul(a, a) - return - } - - // Perform iterative exponentiation by squaring in work space. - w := getWorkspace(r, r, false) - w.Copy(a) - s := getWorkspace(r, r, false) - s.Copy(a) - x := getWorkspace(r, r, false) - for n--; n > 0; n >>= 1 { - if n&1 != 0 { - x.Mul(w, s) - w, x = x, w - } - if n != 1 { - x.Mul(s, s) - s, x = x, s - } - } - m.Copy(w) - putWorkspace(w) - putWorkspace(s) - putWorkspace(x) -} - -// Scale multiplies the elements of a by f, placing the result in the receiver. -// -// See the Scaler interface for more information. -func (m *Dense) Scale(f float64, a Matrix) { - ar, ac := a.Dims() - - m.reuseAs(ar, ac) - - aU, aTrans := untranspose(a) - if rm, ok := aU.(RawMatrixer); ok { - amat := rm.RawMatrix() - if m == aU || m.checkOverlap(amat) { - var restore func() - m, restore = m.isolatedWorkspace(a) - defer restore() - } - if !aTrans { - for ja, jm := 0, 0; ja < ar*amat.Stride; ja, jm = ja+amat.Stride, jm+m.mat.Stride { - for i, v := range amat.Data[ja : ja+ac] { - m.mat.Data[i+jm] = v * f - } - } - } else { - for ja, jm := 0, 0; ja < ac*amat.Stride; ja, jm = ja+amat.Stride, jm+1 { - for i, v := range amat.Data[ja : ja+ar] { - m.mat.Data[i*m.mat.Stride+jm] = v * f - } - } - } - return - } - - m.checkOverlapMatrix(a) - for r := 0; r < ar; r++ { - for c := 0; c < ac; c++ { - m.set(r, c, f*a.At(r, c)) - } - } -} - -// Apply applies the function fn to each of the elements of a, placing the -// resulting matrix in the receiver. The function fn takes a row/column -// index and element value and returns some function of that tuple. -func (m *Dense) Apply(fn func(i, j int, v float64) float64, a Matrix) { - ar, ac := a.Dims() - - m.reuseAs(ar, ac) - - aU, aTrans := untranspose(a) - if rm, ok := aU.(RawMatrixer); ok { - amat := rm.RawMatrix() - if m == aU || m.checkOverlap(amat) { - var restore func() - m, restore = m.isolatedWorkspace(a) - defer restore() - } - if !aTrans { - for j, ja, jm := 0, 0, 0; ja < ar*amat.Stride; j, ja, jm = j+1, ja+amat.Stride, jm+m.mat.Stride { - for i, v := range amat.Data[ja : ja+ac] { - m.mat.Data[i+jm] = fn(j, i, v) - } - } - } else { - for j, ja, jm := 0, 0, 0; ja < ac*amat.Stride; j, ja, jm = j+1, ja+amat.Stride, jm+1 { - for i, v := range amat.Data[ja : ja+ar] { - m.mat.Data[i*m.mat.Stride+jm] = fn(i, j, v) - } - } - } - return - } - - m.checkOverlapMatrix(a) - for r := 0; r < ar; r++ { - for c := 0; c < ac; c++ { - m.set(r, c, fn(r, c, a.At(r, c))) - } - } -} - -// RankOne performs a rank-one update to the matrix a and stores the result -// in the receiver. If a is zero, see Outer. -// m = a + alpha * x * y' -func (m *Dense) RankOne(a Matrix, alpha float64, x, y Vector) { - ar, ac := a.Dims() - xr, xc := x.Dims() - if xr != ar || xc != 1 { - panic(ErrShape) - } - yr, yc := y.Dims() - if yr != ac || yc != 1 { - panic(ErrShape) - } - - if a != m { - aU, _ := untranspose(a) - if rm, ok := aU.(RawMatrixer); ok { - m.checkOverlap(rm.RawMatrix()) - } - } - - var xmat, ymat blas64.Vector - fast := true - xU, _ := untranspose(x) - if rv, ok := xU.(RawVectorer); ok { - xmat = rv.RawVector() - m.checkOverlap((&VecDense{mat: xmat}).asGeneral()) - } else { - fast = false - } - yU, _ := untranspose(y) - if rv, ok := yU.(RawVectorer); ok { - ymat = rv.RawVector() - m.checkOverlap((&VecDense{mat: ymat}).asGeneral()) - } else { - fast = false - } - - if fast { - if m != a { - m.reuseAs(ar, ac) - m.Copy(a) - } - blas64.Ger(alpha, xmat, ymat, m.mat) - return - } - - m.reuseAs(ar, ac) - for i := 0; i < ar; i++ { - for j := 0; j < ac; j++ { - m.set(i, j, a.At(i, j)+alpha*x.AtVec(i)*y.AtVec(j)) - } - } -} - -// Outer calculates the outer product of the column vectors x and y, -// and stores the result in the receiver. -// m = alpha * x * y' -// In order to update an existing matrix, see RankOne. -func (m *Dense) Outer(alpha float64, x, y Vector) { - xr, xc := x.Dims() - if xc != 1 { - panic(ErrShape) - } - yr, yc := y.Dims() - if yc != 1 { - panic(ErrShape) - } - - r := xr - c := yr - - // Copied from reuseAs with use replaced by useZeroed - // and a final zero of the matrix elements if we pass - // the shape checks. - // TODO(kortschak): Factor out into reuseZeroedAs if - // we find another case that needs it. - if m.mat.Rows > m.capRows || m.mat.Cols > m.capCols { - // Panic as a string, not a mat.Error. - panic("mat: caps not correctly set") - } - if m.IsZero() { - m.mat = blas64.General{ - Rows: r, - Cols: c, - Stride: c, - Data: useZeroed(m.mat.Data, r*c), - } - m.capRows = r - m.capCols = c - } else if r != m.mat.Rows || c != m.mat.Cols { - panic(ErrShape) - } - - var xmat, ymat blas64.Vector - fast := true - xU, _ := untranspose(x) - if rv, ok := xU.(RawVectorer); ok { - xmat = rv.RawVector() - m.checkOverlap((&VecDense{mat: xmat}).asGeneral()) - - } else { - fast = false - } - yU, _ := untranspose(y) - if rv, ok := yU.(RawVectorer); ok { - ymat = rv.RawVector() - m.checkOverlap((&VecDense{mat: ymat}).asGeneral()) - } else { - fast = false - } - - if fast { - for i := 0; i < r; i++ { - zero(m.mat.Data[i*m.mat.Stride : i*m.mat.Stride+c]) - } - blas64.Ger(alpha, xmat, ymat, m.mat) - return - } - - for i := 0; i < r; i++ { - for j := 0; j < c; j++ { - m.set(i, j, alpha*x.AtVec(i)*y.AtVec(j)) - } - } -} diff --git a/vendor/gonum.org/v1/gonum/mat/diagonal.go b/vendor/gonum.org/v1/gonum/mat/diagonal.go deleted file mode 100644 index e9f074a7fb..0000000000 --- a/vendor/gonum.org/v1/gonum/mat/diagonal.go +++ /dev/null @@ -1,311 +0,0 @@ -// Copyright ©2018 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package mat - -import ( - "gonum.org/v1/gonum/blas" - "gonum.org/v1/gonum/blas/blas64" -) - -var ( - diagDense *DiagDense - _ Matrix = diagDense - _ Diagonal = diagDense - _ MutableDiagonal = diagDense - _ Triangular = diagDense - _ TriBanded = diagDense - _ Symmetric = diagDense - _ SymBanded = diagDense - _ Banded = diagDense - _ RawBander = diagDense - _ RawSymBander = diagDense - - diag Diagonal - _ Matrix = diag - _ Diagonal = diag - _ Triangular = diag - _ TriBanded = diag - _ Symmetric = diag - _ SymBanded = diag - _ Banded = diag -) - -// Diagonal represents a diagonal matrix, that is a square matrix that only -// has non-zero terms on the diagonal. -type Diagonal interface { - Matrix - // Diag returns the number of rows/columns in the matrix. - Diag() int - - // Bandwidth and TBand are included in the Diagonal interface - // to allow the use of Diagonal types in banded functions. - // Bandwidth will always return (0, 0). - Bandwidth() (kl, ku int) - TBand() Banded - - // Triangle and TTri are included in the Diagonal interface - // to allow the use of Diagonal types in triangular functions. - Triangle() (int, TriKind) - TTri() Triangular - - // Symmetric and SymBand are included in the Diagonal interface - // to allow the use of Diagonal types in symmetric and banded symmetric - // functions respectively. - Symmetric() int - SymBand() (n, k int) - - // TriBand and TTriBand are included in the Diagonal interface - // to allow the use of Diagonal types in triangular banded functions. - TriBand() (n, k int, kind TriKind) - TTriBand() TriBanded -} - -// MutableDiagonal is a Diagonal matrix whose elements can be set. -type MutableDiagonal interface { - Diagonal - SetDiag(i int, v float64) -} - -// DiagDense represents a diagonal matrix in dense storage format. -type DiagDense struct { - mat blas64.Vector -} - -// NewDiagDense creates a new Diagonal matrix with n rows and n columns. -// The length of data must be n or data must be nil, otherwise NewDiagDense -// will panic. NewDiagDense will panic if n is zero. -func NewDiagDense(n int, data []float64) *DiagDense { - if n <= 0 { - if n == 0 { - panic(ErrZeroLength) - } - panic("mat: negative dimension") - } - if data == nil { - data = make([]float64, n) - } - if len(data) != n { - panic(ErrShape) - } - return &DiagDense{ - mat: blas64.Vector{N: n, Data: data, Inc: 1}, - } -} - -// Diag returns the dimension of the receiver. -func (d *DiagDense) Diag() int { - return d.mat.N -} - -// Dims returns the dimensions of the matrix. -func (d *DiagDense) Dims() (r, c int) { - return d.mat.N, d.mat.N -} - -// T returns the transpose of the matrix. -func (d *DiagDense) T() Matrix { - return d -} - -// TTri returns the transpose of the matrix. Note that Diagonal matrices are -// Upper by default. -func (d *DiagDense) TTri() Triangular { - return TransposeTri{d} -} - -// TBand performs an implicit transpose by returning the receiver inside a -// TransposeBand. -func (d *DiagDense) TBand() Banded { - return TransposeBand{d} -} - -// TTriBand performs an implicit transpose by returning the receiver inside a -// TransposeTriBand. Note that Diagonal matrices are Upper by default. -func (d *DiagDense) TTriBand() TriBanded { - return TransposeTriBand{d} -} - -// Bandwidth returns the upper and lower bandwidths of the matrix. -// These values are always zero for diagonal matrices. -func (d *DiagDense) Bandwidth() (kl, ku int) { - return 0, 0 -} - -// Symmetric implements the Symmetric interface. -func (d *DiagDense) Symmetric() int { - return d.mat.N -} - -// SymBand returns the number of rows/columns in the matrix, and the size of -// the bandwidth. -func (d *DiagDense) SymBand() (n, k int) { - return d.mat.N, 0 -} - -// Triangle implements the Triangular interface. -func (d *DiagDense) Triangle() (int, TriKind) { - return d.mat.N, Upper -} - -// TriBand returns the number of rows/columns in the matrix, the -// size of the bandwidth, and the orientation. Note that Diagonal matrices are -// Upper by default. -func (d *DiagDense) TriBand() (n, k int, kind TriKind) { - return d.mat.N, 0, Upper -} - -// Reset zeros the length of the matrix so that it can be reused as the -// receiver of a dimensionally restricted operation. -// -// See the Reseter interface for more information. -func (d *DiagDense) Reset() { - // No change of Inc or n to 0 may be - // made unless both are set to 0. - d.mat.Inc = 0 - d.mat.N = 0 - d.mat.Data = d.mat.Data[:0] -} - -// Zero sets all of the matrix elements to zero. -func (d *DiagDense) Zero() { - for i := 0; i < d.mat.N; i++ { - d.mat.Data[d.mat.Inc*i] = 0 - } -} - -// DiagView returns the diagonal as a matrix backed by the original data. -func (d *DiagDense) DiagView() Diagonal { - return d -} - -// DiagFrom copies the diagonal of m into the receiver. The receiver must -// be min(r, c) long or zero. Otherwise DiagFrom will panic. -func (d *DiagDense) DiagFrom(m Matrix) { - n := min(m.Dims()) - d.reuseAs(n) - - var vec blas64.Vector - switch r := m.(type) { - case *DiagDense: - vec = r.mat - case RawBander: - mat := r.RawBand() - vec = blas64.Vector{ - N: n, - Inc: mat.Stride, - Data: mat.Data[mat.KL : (n-1)*mat.Stride+mat.KL+1], - } - case RawMatrixer: - mat := r.RawMatrix() - vec = blas64.Vector{ - N: n, - Inc: mat.Stride + 1, - Data: mat.Data[:(n-1)*mat.Stride+n], - } - case RawSymBander: - mat := r.RawSymBand() - vec = blas64.Vector{ - N: n, - Inc: mat.Stride, - Data: mat.Data[:(n-1)*mat.Stride+1], - } - case RawSymmetricer: - mat := r.RawSymmetric() - vec = blas64.Vector{ - N: n, - Inc: mat.Stride + 1, - Data: mat.Data[:(n-1)*mat.Stride+n], - } - case RawTriBander: - mat := r.RawTriBand() - data := mat.Data - if mat.Uplo == blas.Lower { - data = data[mat.K:] - } - vec = blas64.Vector{ - N: n, - Inc: mat.Stride, - Data: data[:(n-1)*mat.Stride+1], - } - case RawTriangular: - mat := r.RawTriangular() - if mat.Diag == blas.Unit { - for i := 0; i < n; i += d.mat.Inc { - d.mat.Data[i] = 1 - } - return - } - vec = blas64.Vector{ - N: n, - Inc: mat.Stride + 1, - Data: mat.Data[:(n-1)*mat.Stride+n], - } - case RawVectorer: - d.mat.Data[0] = r.RawVector().Data[0] - return - default: - for i := 0; i < n; i++ { - d.setDiag(i, m.At(i, i)) - } - return - } - blas64.Copy(vec, d.mat) -} - -// RawBand returns the underlying data used by the receiver represented -// as a blas64.Band. -// Changes to elements in the receiver following the call will be reflected -// in returned blas64.Band. -func (d *DiagDense) RawBand() blas64.Band { - return blas64.Band{ - Rows: d.mat.N, - Cols: d.mat.N, - KL: 0, - KU: 0, - Stride: d.mat.Inc, - Data: d.mat.Data, - } -} - -// RawSymBand returns the underlying data used by the receiver represented -// as a blas64.SymmetricBand. -// Changes to elements in the receiver following the call will be reflected -// in returned blas64.Band. -func (d *DiagDense) RawSymBand() blas64.SymmetricBand { - return blas64.SymmetricBand{ - N: d.mat.N, - K: 0, - Stride: d.mat.Inc, - Uplo: blas.Upper, - Data: d.mat.Data, - } -} - -// reuseAs resizes an empty diagonal to a r×r diagonal, -// or checks that a non-empty matrix is r×r. -func (d *DiagDense) reuseAs(r int) { - if r == 0 { - panic(ErrZeroLength) - } - if d.IsZero() { - d.mat = blas64.Vector{ - Inc: 1, - Data: use(d.mat.Data, r), - } - d.mat.N = r - return - } - if r != d.mat.N { - panic(ErrShape) - } -} - -// IsZero returns whether the receiver is zero-sized. Zero-sized vectors can be the -// receiver for size-restricted operations. DiagDenses can be zeroed using Reset. -func (d *DiagDense) IsZero() bool { - // It must be the case that d.Dims() returns - // zeros in this case. See comment in Reset(). - return d.mat.Inc == 0 -} diff --git a/vendor/gonum.org/v1/gonum/mat/doc.go b/vendor/gonum.org/v1/gonum/mat/doc.go deleted file mode 100644 index 2cc9100159..0000000000 --- a/vendor/gonum.org/v1/gonum/mat/doc.go +++ /dev/null @@ -1,169 +0,0 @@ -// Copyright ©2015 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package mat provides implementations of float64 and complex128 matrix -// structures and linear algebra operations on them. -// -// Overview -// -// This section provides a quick overview of the mat package. The following -// sections provide more in depth commentary. -// -// mat provides: -// - Interfaces for Matrix classes (Matrix, Symmetric, Triangular) -// - Concrete implementations (Dense, SymDense, TriDense) -// - Methods and functions for using matrix data (Add, Trace, SymRankOne) -// - Types for constructing and using matrix factorizations (QR, LU) -// - The complementary types for complex matrices, CMatrix, CSymDense, etc. -// -// A matrix may be constructed through the corresponding New function. If no -// backing array is provided the matrix will be initialized to all zeros. -// // Allocate a zeroed real matrix of size 3×5 -// zero := mat.NewDense(3, 5, nil) -// If a backing data slice is provided, the matrix will have those elements. -// Matrices are all stored in row-major format. -// // Generate a 6×6 matrix of random values. -// data := make([]float64, 36) -// for i := range data { -// data[i] = rand.NormFloat64() -// } -// a := mat.NewDense(6, 6, data) -// Operations involving matrix data are implemented as functions when the values -// of the matrix remain unchanged -// tr := mat.Trace(a) -// and are implemented as methods when the operation modifies the receiver. -// zero.Copy(a) -// -// Receivers must be the correct size for the matrix operations, otherwise the -// operation will panic. As a special case for convenience, a zero-value matrix -// will be modified to have the correct size, allocating data if necessary. -// var c mat.Dense // construct a new zero-sized matrix -// c.Mul(a, a) // c is automatically adjusted to be 6×6 -// -// Zero-value of a matrix -// -// A zero-value matrix is either the Go language definition of a zero-value or -// is a zero-sized matrix with zero-length stride. Matrix implementations may have -// a Reset method to revert the receiver into a zero-valued matrix and an IsZero -// method that returns whether the matrix is zero-valued. -// So the following will all result in a zero-value matrix. -// - var a mat.Dense -// - a := NewDense(0, 0, make([]float64, 0, 100)) -// - a.Reset() -// A zero-value matrix can not be sliced even if it does have an adequately sized -// backing data slice, but can be expanded using its Grow method if it exists. -// -// The Matrix Interfaces -// -// The Matrix interface is the common link between the concrete types of real -// matrices, The Matrix interface is defined by three functions: Dims, which -// returns the dimensions of the Matrix, At, which returns the element in the -// specified location, and T for returning a Transpose (discussed later). All of -// the concrete types can perform these behaviors and so implement the interface. -// Methods and functions are designed to use this interface, so in particular the method -// func (m *Dense) Mul(a, b Matrix) -// constructs a *Dense from the result of a multiplication with any Matrix types, -// not just *Dense. Where more restrictive requirements must be met, there are also the -// Symmetric and Triangular interfaces. For example, in -// func (s *SymDense) AddSym(a, b Symmetric) -// the Symmetric interface guarantees a symmetric result. -// -// The CMatrix interface plays the same role for complex matrices. The difference -// is that the CMatrix type has the H method instead T, for returning the conjugate -// transpose. -// -// (Conjugate) Transposes -// -// The T method is used for transposition on real matrices, and H is used for -// conjugate transposition on complex matrices. For example, c.Mul(a.T(), b) computes -// c = a^T * b. The mat types implement this method implicitly — -// see the Transpose and Conjugate types for more details. Note that some -// operations have a transpose as part of their definition, as in *SymDense.SymOuterK. -// -// Matrix Factorization -// -// Matrix factorizations, such as the LU decomposition, typically have their own -// specific data storage, and so are each implemented as a specific type. The -// factorization can be computed through a call to Factorize -// var lu mat.LU -// lu.Factorize(a) -// The elements of the factorization can be extracted through methods on the -// factorized type, i.e. *LU.UTo. The factorization types can also be used directly, -// as in *Dense.SolveCholesky. Some factorizations can be updated directly, -// without needing to update the original matrix and refactorize, -// as in *LU.RankOne. -// -// BLAS and LAPACK -// -// BLAS and LAPACK are the standard APIs for linear algebra routines. Many -// operations in mat are implemented using calls to the wrapper functions -// in gonum/blas/blas64 and gonum/lapack/lapack64 and their complex equivalents. -// By default, blas64 and lapack64 call the native Go implementations of the -// routines. Alternatively, it is possible to use C-based implementations of the -// APIs through the respective cgo packages and "Use" functions. The Go -// implementation of LAPACK (used by default) makes calls -// through blas64, so if a cgo BLAS implementation is registered, the lapack64 -// calls will be partially executed in Go and partially executed in C. -// -// Type Switching -// -// The Matrix abstraction enables efficiency as well as interoperability. Go's -// type reflection capabilities are used to choose the most efficient routine -// given the specific concrete types. For example, in -// c.Mul(a, b) -// if a and b both implement RawMatrixer, that is, they can be represented as a -// blas64.General, blas64.Gemm (general matrix multiplication) is called, while -// instead if b is a RawSymmetricer blas64.Symm is used (general-symmetric -// multiplication), and if b is a *VecDense blas64.Gemv is used. -// -// There are many possible type combinations and special cases. No specific guarantees -// are made about the performance of any method, and in particular, note that an -// abstract matrix type may be copied into a concrete type of the corresponding -// value. If there are specific special cases that are needed, please submit a -// pull-request or file an issue. -// -// Invariants -// -// Matrix input arguments to functions are never directly modified. If an operation -// changes Matrix data, the mutated matrix will be the receiver of a function. -// -// For convenience, a matrix may be used as both a receiver and as an input, e.g. -// a.Pow(a, 6) -// v.SolveVec(a.T(), v) -// though in many cases this will cause an allocation (see Element Aliasing). -// An exception to this rule is Copy, which does not allow a.Copy(a.T()). -// -// Element Aliasing -// -// Most methods in mat modify receiver data. It is forbidden for the modified -// data region of the receiver to overlap the used data area of the input -// arguments. The exception to this rule is when the method receiver is equal to one -// of the input arguments, as in the a.Pow(a, 6) call above, or its implicit transpose. -// -// This prohibition is to help avoid subtle mistakes when the method needs to read -// from and write to the same data region. There are ways to make mistakes using the -// mat API, and mat functions will detect and complain about those. -// There are many ways to make mistakes by excursion from the mat API via -// interaction with raw matrix values. -// -// If you need to read the rest of this section to understand the behavior of -// your program, you are being clever. Don't be clever. If you must be clever, -// blas64 and lapack64 may be used to call the behavior directly. -// -// mat will use the following rules to detect overlap between the receiver and one -// of the inputs: -// - the input implements one of the Raw methods, and -// - the address ranges of the backing data slices overlap, and -// - the strides differ or there is an overlap in the used data elements. -// If such an overlap is detected, the method will panic. -// -// The following cases will not panic: -// - the data slices do not overlap, -// - there is pointer identity between the receiver and input values after -// the value has been untransposed if necessary. -// -// mat will not attempt to detect element overlap if the input does not implement a -// Raw method. Method behavior is undefined if there is undetected overlap. -// -package mat // import "gonum.org/v1/gonum/mat" diff --git a/vendor/gonum.org/v1/gonum/mat/eigen.go b/vendor/gonum.org/v1/gonum/mat/eigen.go deleted file mode 100644 index ee971e4ae4..0000000000 --- a/vendor/gonum.org/v1/gonum/mat/eigen.go +++ /dev/null @@ -1,350 +0,0 @@ -// Copyright ©2013 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package mat - -import ( - "gonum.org/v1/gonum/lapack" - "gonum.org/v1/gonum/lapack/lapack64" -) - -const ( - badFact = "mat: use without successful factorization" - badNoVect = "mat: eigenvectors not computed" -) - -// EigenSym is a type for creating and manipulating the Eigen decomposition of -// symmetric matrices. -type EigenSym struct { - vectorsComputed bool - - values []float64 - vectors *Dense -} - -// Factorize computes the eigenvalue decomposition of the symmetric matrix a. -// The Eigen decomposition is defined as -// A = P * D * P^-1 -// where D is a diagonal matrix containing the eigenvalues of the matrix, and -// P is a matrix of the eigenvectors of A. Factorize computes the eigenvalues -// in ascending order. If the vectors input argument is false, the eigenvectors -// are not computed. -// -// Factorize returns whether the decomposition succeeded. If the decomposition -// failed, methods that require a successful factorization will panic. -func (e *EigenSym) Factorize(a Symmetric, vectors bool) (ok bool) { - // kill previous decomposition - e.vectorsComputed = false - e.values = e.values[:] - - n := a.Symmetric() - sd := NewSymDense(n, nil) - sd.CopySym(a) - - jobz := lapack.EVNone - if vectors { - jobz = lapack.EVCompute - } - w := make([]float64, n) - work := []float64{0} - lapack64.Syev(jobz, sd.mat, w, work, -1) - - work = getFloats(int(work[0]), false) - ok = lapack64.Syev(jobz, sd.mat, w, work, len(work)) - putFloats(work) - if !ok { - e.vectorsComputed = false - e.values = nil - e.vectors = nil - return false - } - e.vectorsComputed = vectors - e.values = w - e.vectors = NewDense(n, n, sd.mat.Data) - return true -} - -// succFact returns whether the receiver contains a successful factorization. -func (e *EigenSym) succFact() bool { - return len(e.values) != 0 -} - -// Values extracts the eigenvalues of the factorized matrix. If dst is -// non-nil, the values are stored in-place into dst. In this case -// dst must have length n, otherwise Values will panic. If dst is -// nil, then a new slice will be allocated of the proper length and filled -// with the eigenvalues. -// -// Values panics if the Eigen decomposition was not successful. -func (e *EigenSym) Values(dst []float64) []float64 { - if !e.succFact() { - panic(badFact) - } - if dst == nil { - dst = make([]float64, len(e.values)) - } - if len(dst) != len(e.values) { - panic(ErrSliceLengthMismatch) - } - copy(dst, e.values) - return dst -} - -// VectorsTo returns the eigenvectors of the decomposition. VectorsTo -// will panic if the eigenvectors were not computed during the factorization, -// or if the factorization was not successful. -// -// If dst is not nil, the eigenvectors are stored in-place into dst, and dst -// must have size n×n and panics otherwise. If dst is nil, a new matrix -// is allocated and returned. -func (e *EigenSym) VectorsTo(dst *Dense) *Dense { - if !e.succFact() { - panic(badFact) - } - if !e.vectorsComputed { - panic(badNoVect) - } - r, c := e.vectors.Dims() - if dst == nil { - dst = NewDense(r, c, nil) - } else { - dst.reuseAs(r, c) - } - dst.Copy(e.vectors) - return dst -} - -// EigenKind specifies the computation of eigenvectors during factorization. -type EigenKind int - -const ( - // EigenNone specifies to not compute any eigenvectors. - EigenNone EigenKind = 0 - // EigenLeft specifies to compute the left eigenvectors. - EigenLeft EigenKind = 1 << iota - // EigenRight specifies to compute the right eigenvectors. - EigenRight - // EigenBoth is a convenience value for computing both eigenvectors. - EigenBoth EigenKind = EigenLeft | EigenRight -) - -// Eigen is a type for creating and using the eigenvalue decomposition of a dense matrix. -type Eigen struct { - n int // The size of the factorized matrix. - - kind EigenKind - - values []complex128 - rVectors *CDense - lVectors *CDense -} - -// succFact returns whether the receiver contains a successful factorization. -func (e *Eigen) succFact() bool { - return e.n != 0 -} - -// Factorize computes the eigenvalues of the square matrix a, and optionally -// the eigenvectors. -// -// A right eigenvalue/eigenvector combination is defined by -// A * x_r = λ * x_r -// where x_r is the column vector called an eigenvector, and λ is the corresponding -// eigenvalue. -// -// Similarly, a left eigenvalue/eigenvector combination is defined by -// x_l * A = λ * x_l -// The eigenvalues, but not the eigenvectors, are the same for both decompositions. -// -// Typically eigenvectors refer to right eigenvectors. -// -// In all cases, Factorize computes the eigenvalues of the matrix. kind -// specifies which of the eigenvectors, if any, to compute. See the EigenKind -// documentation for more information. -// Eigen panics if the input matrix is not square. -// -// Factorize returns whether the decomposition succeeded. If the decomposition -// failed, methods that require a successful factorization will panic. -func (e *Eigen) Factorize(a Matrix, kind EigenKind) (ok bool) { - // kill previous factorization. - e.n = 0 - e.kind = 0 - // Copy a because it is modified during the Lapack call. - r, c := a.Dims() - if r != c { - panic(ErrShape) - } - var sd Dense - sd.Clone(a) - - left := kind&EigenLeft != 0 - right := kind&EigenRight != 0 - - var vl, vr Dense - jobvl := lapack.LeftEVNone - jobvr := lapack.RightEVNone - if left { - vl = *NewDense(r, r, nil) - jobvl = lapack.LeftEVCompute - } - if right { - vr = *NewDense(c, c, nil) - jobvr = lapack.RightEVCompute - } - - wr := getFloats(c, false) - defer putFloats(wr) - wi := getFloats(c, false) - defer putFloats(wi) - - work := []float64{0} - lapack64.Geev(jobvl, jobvr, sd.mat, wr, wi, vl.mat, vr.mat, work, -1) - work = getFloats(int(work[0]), false) - first := lapack64.Geev(jobvl, jobvr, sd.mat, wr, wi, vl.mat, vr.mat, work, len(work)) - putFloats(work) - - if first != 0 { - e.values = nil - return false - } - e.n = r - e.kind = kind - - // Construct complex eigenvalues from float64 data. - values := make([]complex128, r) - for i, v := range wr { - values[i] = complex(v, wi[i]) - } - e.values = values - - // Construct complex eigenvectors from float64 data. - var cvl, cvr CDense - if left { - cvl = *NewCDense(r, r, nil) - e.complexEigenTo(&cvl, &vl) - e.lVectors = &cvl - } else { - e.lVectors = nil - } - if right { - cvr = *NewCDense(c, c, nil) - e.complexEigenTo(&cvr, &vr) - e.rVectors = &cvr - } else { - e.rVectors = nil - } - return true -} - -// Kind returns the EigenKind of the decomposition. If no decomposition has been -// computed, Kind returns -1. -func (e *Eigen) Kind() EigenKind { - if !e.succFact() { - return -1 - } - return e.kind -} - -// Values extracts the eigenvalues of the factorized matrix. If dst is -// non-nil, the values are stored in-place into dst. In this case -// dst must have length n, otherwise Values will panic. If dst is -// nil, then a new slice will be allocated of the proper length and -// filed with the eigenvalues. -// -// Values panics if the Eigen decomposition was not successful. -func (e *Eigen) Values(dst []complex128) []complex128 { - if !e.succFact() { - panic(badFact) - } - if dst == nil { - dst = make([]complex128, e.n) - } - if len(dst) != e.n { - panic(ErrSliceLengthMismatch) - } - copy(dst, e.values) - return dst -} - -// complexEigenTo extracts the complex eigenvectors from the real matrix d -// and stores them into the complex matrix dst. -// -// The columns of the returned n×n dense matrix contain the eigenvectors of the -// decomposition in the same order as the eigenvalues. -// If the j-th eigenvalue is real, then -// dst[:,j] = d[:,j], -// and if it is not real, then the elements of the j-th and (j+1)-th columns of d -// form complex conjugate pairs and the eigenvectors are recovered as -// dst[:,j] = d[:,j] + i*d[:,j+1], -// dst[:,j+1] = d[:,j] - i*d[:,j+1], -// where i is the imaginary unit. -func (e *Eigen) complexEigenTo(dst *CDense, d *Dense) { - r, c := d.Dims() - cr, cc := dst.Dims() - if r != cr { - panic("size mismatch") - } - if c != cc { - panic("size mismatch") - } - for j := 0; j < c; j++ { - if imag(e.values[j]) == 0 { - for i := 0; i < r; i++ { - dst.set(i, j, complex(d.at(i, j), 0)) - } - continue - } - for i := 0; i < r; i++ { - real := d.at(i, j) - imag := d.at(i, j+1) - dst.set(i, j, complex(real, imag)) - dst.set(i, j+1, complex(real, -imag)) - } - j++ - } -} - -// VectorsTo returns the right eigenvectors of the decomposition. VectorsTo -// will panic if the right eigenvectors were not computed during the factorization, -// or if the factorization was not successful. -// -// The computed eigenvectors are normalized to have Euclidean norm equal to 1 -// and largest component real. -func (e *Eigen) VectorsTo(dst *CDense) *CDense { - if !e.succFact() { - panic(badFact) - } - if e.kind&EigenRight == 0 { - panic(badNoVect) - } - if dst == nil { - dst = NewCDense(e.n, e.n, nil) - } else { - dst.reuseAs(e.n, e.n) - } - dst.Copy(e.rVectors) - return dst -} - -// LeftVectorsTo returns the left eigenvectors of the decomposition. LeftVectorsTo -// will panic if the left eigenvectors were not computed during the factorization, -// or if the factorization was not successful. -// -// The computed eigenvectors are normalized to have Euclidean norm equal to 1 -// and largest component real. -func (e *Eigen) LeftVectorsTo(dst *CDense) *CDense { - if !e.succFact() { - panic(badFact) - } - if e.kind&EigenLeft == 0 { - panic(badNoVect) - } - if dst == nil { - dst = NewCDense(e.n, e.n, nil) - } else { - dst.reuseAs(e.n, e.n) - } - dst.Copy(e.lVectors) - return dst -} diff --git a/vendor/gonum.org/v1/gonum/mat/errors.go b/vendor/gonum.org/v1/gonum/mat/errors.go deleted file mode 100644 index 0430d126f2..0000000000 --- a/vendor/gonum.org/v1/gonum/mat/errors.go +++ /dev/null @@ -1,149 +0,0 @@ -// Copyright ©2013 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package mat - -import ( - "fmt" - "runtime" - - "gonum.org/v1/gonum/lapack" -) - -// Condition is the condition number of a matrix. The condition -// number is defined as |A| * |A^-1|. -// -// One important use of Condition is during linear solve routines (finding x such -// that A * x = b). The condition number of A indicates the accuracy of -// the computed solution. A Condition error will be returned if the condition -// number of A is sufficiently large. If A is exactly singular to working precision, -// Condition == ∞, and the solve algorithm may have completed early. If Condition -// is large and finite the solve algorithm will be performed, but the computed -// solution may be innacurate. Due to the nature of finite precision arithmetic, -// the value of Condition is only an approximate test of singularity. -type Condition float64 - -func (c Condition) Error() string { - return fmt.Sprintf("matrix singular or near-singular with condition number %.4e", c) -} - -// ConditionTolerance is the tolerance limit of the condition number. If the -// condition number is above this value, the matrix is considered singular. -const ConditionTolerance = 1e16 - -const ( - // CondNorm is the matrix norm used for computing the condition number by routines - // in the matrix packages. - CondNorm = lapack.MaxRowSum - - // CondNormTrans is the norm used to compute on A^T to get the same result as - // computing CondNorm on A. - CondNormTrans = lapack.MaxColumnSum -) - -const stackTraceBufferSize = 1 << 20 - -// Maybe will recover a panic with a type mat.Error from fn, and return this error -// as the Err field of an ErrorStack. The stack trace for the panicking function will be -// recovered and placed in the StackTrace field. Any other error is re-panicked. -func Maybe(fn func()) (err error) { - defer func() { - if r := recover(); r != nil { - if e, ok := r.(Error); ok { - if e.string == "" { - panic("mat: invalid error") - } - buf := make([]byte, stackTraceBufferSize) - n := runtime.Stack(buf, false) - err = ErrorStack{Err: e, StackTrace: string(buf[:n])} - return - } - panic(r) - } - }() - fn() - return -} - -// MaybeFloat will recover a panic with a type mat.Error from fn, and return this error -// as the Err field of an ErrorStack. The stack trace for the panicking function will be -// recovered and placed in the StackTrace field. Any other error is re-panicked. -func MaybeFloat(fn func() float64) (f float64, err error) { - defer func() { - if r := recover(); r != nil { - if e, ok := r.(Error); ok { - if e.string == "" { - panic("mat: invalid error") - } - buf := make([]byte, stackTraceBufferSize) - n := runtime.Stack(buf, false) - err = ErrorStack{Err: e, StackTrace: string(buf[:n])} - return - } - panic(r) - } - }() - return fn(), nil -} - -// MaybeComplex will recover a panic with a type mat.Error from fn, and return this error -// as the Err field of an ErrorStack. The stack trace for the panicking function will be -// recovered and placed in the StackTrace field. Any other error is re-panicked. -func MaybeComplex(fn func() complex128) (f complex128, err error) { - defer func() { - if r := recover(); r != nil { - if e, ok := r.(Error); ok { - if e.string == "" { - panic("mat: invalid error") - } - buf := make([]byte, stackTraceBufferSize) - n := runtime.Stack(buf, false) - err = ErrorStack{Err: e, StackTrace: string(buf[:n])} - return - } - panic(r) - } - }() - return fn(), nil -} - -// Error represents matrix handling errors. These errors can be recovered by Maybe wrappers. -type Error struct{ string } - -func (err Error) Error() string { return err.string } - -var ( - ErrIndexOutOfRange = Error{"matrix: index out of range"} - ErrRowAccess = Error{"matrix: row index out of range"} - ErrColAccess = Error{"matrix: column index out of range"} - ErrVectorAccess = Error{"matrix: vector index out of range"} - ErrZeroLength = Error{"matrix: zero length in matrix dimension"} - ErrRowLength = Error{"matrix: row length mismatch"} - ErrColLength = Error{"matrix: col length mismatch"} - ErrSquare = Error{"matrix: expect square matrix"} - ErrNormOrder = Error{"matrix: invalid norm order for matrix"} - ErrSingular = Error{"matrix: matrix is singular"} - ErrShape = Error{"matrix: dimension mismatch"} - ErrIllegalStride = Error{"matrix: illegal stride"} - ErrPivot = Error{"matrix: malformed pivot list"} - ErrTriangle = Error{"matrix: triangular storage mismatch"} - ErrTriangleSet = Error{"matrix: triangular set out of bounds"} - ErrBandSet = Error{"matrix: band set out of bounds"} - ErrDiagSet = Error{"matrix: diagonal set out of bounds"} - ErrSliceLengthMismatch = Error{"matrix: input slice length mismatch"} - ErrNotPSD = Error{"matrix: input not positive symmetric definite"} - ErrFailedEigen = Error{"matrix: eigendecomposition not successful"} -) - -// ErrorStack represents matrix handling errors that have been recovered by Maybe wrappers. -type ErrorStack struct { - Err error - - // StackTrace is the stack trace - // recovered by Maybe, MaybeFloat - // or MaybeComplex. - StackTrace string -} - -func (err ErrorStack) Error() string { return err.Err.Error() } diff --git a/vendor/gonum.org/v1/gonum/mat/format.go b/vendor/gonum.org/v1/gonum/mat/format.go deleted file mode 100644 index 9b60cb3186..0000000000 --- a/vendor/gonum.org/v1/gonum/mat/format.go +++ /dev/null @@ -1,238 +0,0 @@ -// Copyright ©2013 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package mat - -import ( - "fmt" - "strconv" -) - -// Formatted returns a fmt.Formatter for the matrix m using the given options. -func Formatted(m Matrix, options ...FormatOption) fmt.Formatter { - f := formatter{ - matrix: m, - dot: '.', - } - for _, o := range options { - o(&f) - } - return f -} - -type formatter struct { - matrix Matrix - prefix string - margin int - dot byte - squeeze bool -} - -// FormatOption is a functional option for matrix formatting. -type FormatOption func(*formatter) - -// Prefix sets the formatted prefix to the string p. Prefix is a string that is prepended to -// each line of output. -func Prefix(p string) FormatOption { - return func(f *formatter) { f.prefix = p } -} - -// Excerpt sets the maximum number of rows and columns to print at the margins of the matrix -// to m. If m is zero or less all elements are printed. -func Excerpt(m int) FormatOption { - return func(f *formatter) { f.margin = m } -} - -// DotByte sets the dot character to b. The dot character is used to replace zero elements -// if the result is printed with the fmt ' ' verb flag. Without a DotByte option, the default -// dot character is '.'. -func DotByte(b byte) FormatOption { - return func(f *formatter) { f.dot = b } -} - -// Squeeze sets the printing behaviour to minimise column width for each individual column. -func Squeeze() FormatOption { - return func(f *formatter) { f.squeeze = true } -} - -// Format satisfies the fmt.Formatter interface. -func (f formatter) Format(fs fmt.State, c rune) { - if c == 'v' && fs.Flag('#') { - fmt.Fprintf(fs, "%#v", f.matrix) - return - } - format(f.matrix, f.prefix, f.margin, f.dot, f.squeeze, fs, c) -} - -// format prints a pretty representation of m to the fs io.Writer. The format character c -// specifies the numerical representation of elements; valid values are those for float64 -// specified in the fmt package, with their associated flags. In addition to this, a space -// preceding a verb indicates that zero values should be represented by the dot character. -// The printed range of the matrix can be limited by specifying a positive value for margin; -// If margin is greater than zero, only the first and last margin rows/columns of the matrix -// are output. If squeeze is true, column widths are determined on a per-column basis. -// -// format will not provide Go syntax output. -func format(m Matrix, prefix string, margin int, dot byte, squeeze bool, fs fmt.State, c rune) { - rows, cols := m.Dims() - - var printed int - if margin <= 0 { - printed = rows - if cols > printed { - printed = cols - } - } else { - printed = margin - } - - prec, pOk := fs.Precision() - if !pOk { - prec = -1 - } - - var ( - maxWidth int - widths widther - buf, pad []byte - ) - if squeeze { - widths = make(columnWidth, cols) - } else { - widths = new(uniformWidth) - } - switch c { - case 'v', 'e', 'E', 'f', 'F', 'g', 'G': - if c == 'v' { - buf, maxWidth = maxCellWidth(m, 'g', printed, prec, widths) - } else { - buf, maxWidth = maxCellWidth(m, c, printed, prec, widths) - } - default: - fmt.Fprintf(fs, "%%!%c(%T=Dims(%d, %d))", c, m, rows, cols) - return - } - width, _ := fs.Width() - width = max(width, maxWidth) - pad = make([]byte, max(width, 2)) - for i := range pad { - pad[i] = ' ' - } - - first := true - if rows > 2*printed || cols > 2*printed { - first = false - fmt.Fprintf(fs, "Dims(%d, %d)\n", rows, cols) - } - - skipZero := fs.Flag(' ') - for i := 0; i < rows; i++ { - if !first { - fmt.Fprint(fs, prefix) - } - first = false - var el string - switch { - case rows == 1: - fmt.Fprint(fs, "[") - el = "]" - case i == 0: - fmt.Fprint(fs, "⎡") - el = "⎤\n" - case i < rows-1: - fmt.Fprint(fs, "⎢") - el = "⎥\n" - default: - fmt.Fprint(fs, "⎣") - el = "⎦" - } - - for j := 0; j < cols; j++ { - if j >= printed && j < cols-printed { - j = cols - printed - 1 - if i == 0 || i == rows-1 { - fmt.Fprint(fs, "... ... ") - } else { - fmt.Fprint(fs, " ") - } - continue - } - - v := m.At(i, j) - if v == 0 && skipZero { - buf = buf[:1] - buf[0] = dot - } else { - if c == 'v' { - buf = strconv.AppendFloat(buf[:0], v, 'g', prec, 64) - } else { - buf = strconv.AppendFloat(buf[:0], v, byte(c), prec, 64) - } - } - if fs.Flag('-') { - fs.Write(buf) - fs.Write(pad[:widths.width(j)-len(buf)]) - } else { - fs.Write(pad[:widths.width(j)-len(buf)]) - fs.Write(buf) - } - - if j < cols-1 { - fs.Write(pad[:2]) - } - } - - fmt.Fprint(fs, el) - - if i >= printed-1 && i < rows-printed && 2*printed < rows { - i = rows - printed - 1 - fmt.Fprintf(fs, "%s .\n%[1]s .\n%[1]s .\n", prefix) - continue - } - } -} - -func maxCellWidth(m Matrix, c rune, printed, prec int, w widther) ([]byte, int) { - var ( - buf = make([]byte, 0, 64) - rows, cols = m.Dims() - max int - ) - for i := 0; i < rows; i++ { - if i >= printed-1 && i < rows-printed && 2*printed < rows { - i = rows - printed - 1 - continue - } - for j := 0; j < cols; j++ { - if j >= printed && j < cols-printed { - continue - } - - buf = strconv.AppendFloat(buf, m.At(i, j), byte(c), prec, 64) - if len(buf) > max { - max = len(buf) - } - if len(buf) > w.width(j) { - w.setWidth(j, len(buf)) - } - buf = buf[:0] - } - } - return buf, max -} - -type widther interface { - width(i int) int - setWidth(i, w int) -} - -type uniformWidth int - -func (u *uniformWidth) width(_ int) int { return int(*u) } -func (u *uniformWidth) setWidth(_, w int) { *u = uniformWidth(w) } - -type columnWidth []int - -func (c columnWidth) width(i int) int { return c[i] } -func (c columnWidth) setWidth(i, w int) { c[i] = w } diff --git a/vendor/gonum.org/v1/gonum/mat/gsvd.go b/vendor/gonum.org/v1/gonum/mat/gsvd.go deleted file mode 100644 index 2de511a9fe..0000000000 --- a/vendor/gonum.org/v1/gonum/mat/gsvd.go +++ /dev/null @@ -1,415 +0,0 @@ -// Copyright ©2017 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package mat - -import ( - "gonum.org/v1/gonum/blas/blas64" - "gonum.org/v1/gonum/floats" - "gonum.org/v1/gonum/lapack" - "gonum.org/v1/gonum/lapack/lapack64" -) - -// GSVDKind specifies the treatment of singular vectors during a GSVD -// factorization. -type GSVDKind int - -const ( - // GSVDNone specifies that no singular vectors should be computed during - // the decomposition. - GSVDNone GSVDKind = 0 - - // GSVDU specifies that the U singular vectors should be computed during - // the decomposition. - GSVDU GSVDKind = 1 << iota - // GSVDV specifies that the V singular vectors should be computed during - // the decomposition. - GSVDV - // GSVDQ specifies that the Q singular vectors should be computed during - // the decomposition. - GSVDQ - - // GSVDAll is a convenience value for computing all of the singular vectors. - GSVDAll = GSVDU | GSVDV | GSVDQ -) - -// GSVD is a type for creating and using the Generalized Singular Value Decomposition -// (GSVD) of a matrix. -// -// The factorization is a linear transformation of the data sets from the given -// variable×sample spaces to reduced and diagonalized "eigenvariable"×"eigensample" -// spaces. -type GSVD struct { - kind GSVDKind - - r, p, c, k, l int - s1, s2 []float64 - a, b, u, v, q blas64.General - - work []float64 - iwork []int -} - -// succFact returns whether the receiver contains a successful factorization. -func (gsvd *GSVD) succFact() bool { - return gsvd.r != 0 -} - -// Factorize computes the generalized singular value decomposition (GSVD) of the input -// the r×c matrix A and the p×c matrix B. The singular values of A and B are computed -// in all cases, while the singular vectors are optionally computed depending on the -// input kind. -// -// The full singular value decomposition (kind == GSVDAll) deconstructs A and B as -// A = U * Σ₁ * [ 0 R ] * Q^T -// -// B = V * Σ₂ * [ 0 R ] * Q^T -// where Σ₁ and Σ₂ are r×(k+l) and p×(k+l) diagonal matrices of singular values, and -// U, V and Q are r×r, p×p and c×c orthogonal matrices of singular vectors. k+l is the -// effective numerical rank of the matrix [ A^T B^T ]^T. -// -// It is frequently not necessary to compute the full GSVD. Computation time and -// storage costs can be reduced using the appropriate kind. Either only the singular -// values can be computed (kind == SVDNone), or in conjunction with specific singular -// vectors (kind bit set according to matrix.GSVDU, matrix.GSVDV and matrix.GSVDQ). -// -// Factorize returns whether the decomposition succeeded. If the decomposition -// failed, routines that require a successful factorization will panic. -func (gsvd *GSVD) Factorize(a, b Matrix, kind GSVDKind) (ok bool) { - // kill the previous decomposition - gsvd.r = 0 - gsvd.kind = 0 - - r, c := a.Dims() - gsvd.r, gsvd.c = r, c - p, c := b.Dims() - gsvd.p = p - if gsvd.c != c { - panic(ErrShape) - } - var jobU, jobV, jobQ lapack.GSVDJob - switch { - default: - panic("gsvd: bad input kind") - case kind == GSVDNone: - jobU = lapack.GSVDNone - jobV = lapack.GSVDNone - jobQ = lapack.GSVDNone - case GSVDAll&kind != 0: - if GSVDU&kind != 0 { - jobU = lapack.GSVDU - gsvd.u = blas64.General{ - Rows: r, - Cols: r, - Stride: r, - Data: use(gsvd.u.Data, r*r), - } - } - if GSVDV&kind != 0 { - jobV = lapack.GSVDV - gsvd.v = blas64.General{ - Rows: p, - Cols: p, - Stride: p, - Data: use(gsvd.v.Data, p*p), - } - } - if GSVDQ&kind != 0 { - jobQ = lapack.GSVDQ - gsvd.q = blas64.General{ - Rows: c, - Cols: c, - Stride: c, - Data: use(gsvd.q.Data, c*c), - } - } - } - - // A and B are destroyed on call, so copy the matrices. - aCopy := DenseCopyOf(a) - bCopy := DenseCopyOf(b) - - gsvd.s1 = use(gsvd.s1, c) - gsvd.s2 = use(gsvd.s2, c) - - gsvd.iwork = useInt(gsvd.iwork, c) - - gsvd.work = use(gsvd.work, 1) - lapack64.Ggsvd3(jobU, jobV, jobQ, aCopy.mat, bCopy.mat, gsvd.s1, gsvd.s2, gsvd.u, gsvd.v, gsvd.q, gsvd.work, -1, gsvd.iwork) - gsvd.work = use(gsvd.work, int(gsvd.work[0])) - gsvd.k, gsvd.l, ok = lapack64.Ggsvd3(jobU, jobV, jobQ, aCopy.mat, bCopy.mat, gsvd.s1, gsvd.s2, gsvd.u, gsvd.v, gsvd.q, gsvd.work, len(gsvd.work), gsvd.iwork) - if ok { - gsvd.a = aCopy.mat - gsvd.b = bCopy.mat - gsvd.kind = kind - } - return ok -} - -// Kind returns the GSVDKind of the decomposition. If no decomposition has been -// computed, Kind returns -1. -func (gsvd *GSVD) Kind() GSVDKind { - if !gsvd.succFact() { - return -1 - } - return gsvd.kind -} - -// Rank returns the k and l terms of the rank of [ A^T B^T ]^T. -func (gsvd *GSVD) Rank() (k, l int) { - return gsvd.k, gsvd.l -} - -// GeneralizedValues returns the generalized singular values of the factorized matrices. -// If the input slice is non-nil, the values will be stored in-place into the slice. -// In this case, the slice must have length min(r,c)-k, and GeneralizedValues will -// panic with matrix.ErrSliceLengthMismatch otherwise. If the input slice is nil, -// a new slice of the appropriate length will be allocated and returned. -// -// GeneralizedValues will panic if the receiver does not contain a successful factorization. -func (gsvd *GSVD) GeneralizedValues(v []float64) []float64 { - if !gsvd.succFact() { - panic(badFact) - } - r := gsvd.r - c := gsvd.c - k := gsvd.k - d := min(r, c) - if v == nil { - v = make([]float64, d-k) - } - if len(v) != d-k { - panic(ErrSliceLengthMismatch) - } - floats.DivTo(v, gsvd.s1[k:d], gsvd.s2[k:d]) - return v -} - -// ValuesA returns the singular values of the factorized A matrix. -// If the input slice is non-nil, the values will be stored in-place into the slice. -// In this case, the slice must have length min(r,c)-k, and ValuesA will panic with -// matrix.ErrSliceLengthMismatch otherwise. If the input slice is nil, -// a new slice of the appropriate length will be allocated and returned. -// -// ValuesA will panic if the receiver does not contain a successful factorization. -func (gsvd *GSVD) ValuesA(s []float64) []float64 { - if !gsvd.succFact() { - panic(badFact) - } - r := gsvd.r - c := gsvd.c - k := gsvd.k - d := min(r, c) - if s == nil { - s = make([]float64, d-k) - } - if len(s) != d-k { - panic(ErrSliceLengthMismatch) - } - copy(s, gsvd.s1[k:min(r, c)]) - return s -} - -// ValuesB returns the singular values of the factorized B matrix. -// If the input slice is non-nil, the values will be stored in-place into the slice. -// In this case, the slice must have length min(r,c)-k, and ValuesB will panic with -// matrix.ErrSliceLengthMismatch otherwise. If the input slice is nil, -// a new slice of the appropriate length will be allocated and returned. -// -// ValuesB will panic if the receiver does not contain a successful factorization. -func (gsvd *GSVD) ValuesB(s []float64) []float64 { - if !gsvd.succFact() { - panic(badFact) - } - r := gsvd.r - c := gsvd.c - k := gsvd.k - d := min(r, c) - if s == nil { - s = make([]float64, d-k) - } - if len(s) != d-k { - panic(ErrSliceLengthMismatch) - } - copy(s, gsvd.s2[k:d]) - return s -} - -// ZeroRTo extracts the matrix [ 0 R ] from the singular value decomposition, storing -// the result in-place into dst. [ 0 R ] is size (k+l)×c. -// If dst is nil, a new matrix is allocated. The resulting ZeroR matrix is returned. -// -// ZeroRTo will panic if the receiver does not contain a successful factorization. -func (gsvd *GSVD) ZeroRTo(dst *Dense) *Dense { - if !gsvd.succFact() { - panic(badFact) - } - r := gsvd.r - c := gsvd.c - k := gsvd.k - l := gsvd.l - h := min(k+l, r) - if dst == nil { - dst = NewDense(k+l, c, nil) - } else { - dst.reuseAsZeroed(k+l, c) - } - a := Dense{ - mat: gsvd.a, - capRows: r, - capCols: c, - } - dst.Slice(0, h, c-k-l, c).(*Dense). - Copy(a.Slice(0, h, c-k-l, c)) - if r < k+l { - b := Dense{ - mat: gsvd.b, - capRows: gsvd.p, - capCols: c, - } - dst.Slice(r, k+l, c+r-k-l, c).(*Dense). - Copy(b.Slice(r-k, l, c+r-k-l, c)) - } - return dst -} - -// SigmaATo extracts the matrix Σ₁ from the singular value decomposition, storing -// the result in-place into dst. Σ₁ is size r×(k+l). -// If dst is nil, a new matrix is allocated. The resulting SigmaA matrix is returned. -// -// SigmaATo will panic if the receiver does not contain a successful factorization. -func (gsvd *GSVD) SigmaATo(dst *Dense) *Dense { - if !gsvd.succFact() { - panic(badFact) - } - r := gsvd.r - k := gsvd.k - l := gsvd.l - if dst == nil { - dst = NewDense(r, k+l, nil) - } else { - dst.reuseAsZeroed(r, k+l) - } - for i := 0; i < k; i++ { - dst.set(i, i, 1) - } - for i := k; i < min(r, k+l); i++ { - dst.set(i, i, gsvd.s1[i]) - } - return dst -} - -// SigmaBTo extracts the matrix Σ₂ from the singular value decomposition, storing -// the result in-place into dst. Σ₂ is size p×(k+l). -// If dst is nil, a new matrix is allocated. The resulting SigmaB matrix is returned. -// -// SigmaBTo will panic if the receiver does not contain a successful factorization. -func (gsvd *GSVD) SigmaBTo(dst *Dense) *Dense { - if !gsvd.succFact() { - panic(badFact) - } - r := gsvd.r - p := gsvd.p - k := gsvd.k - l := gsvd.l - if dst == nil { - dst = NewDense(p, k+l, nil) - } else { - dst.reuseAsZeroed(p, k+l) - } - for i := 0; i < min(l, r-k); i++ { - dst.set(i, i+k, gsvd.s2[k+i]) - } - for i := r - k; i < l; i++ { - dst.set(i, i+k, 1) - } - return dst -} - -// UTo extracts the matrix U from the singular value decomposition, storing -// the result in-place into dst. U is size r×r. -// If dst is nil, a new matrix is allocated. The resulting U matrix is returned. -// -// UTo will panic if the receiver does not contain a successful factorization. -func (gsvd *GSVD) UTo(dst *Dense) *Dense { - if !gsvd.succFact() { - panic(badFact) - } - if gsvd.kind&GSVDU == 0 { - panic("mat: improper GSVD kind") - } - r := gsvd.u.Rows - c := gsvd.u.Cols - if dst == nil { - dst = NewDense(r, c, nil) - } else { - dst.reuseAs(r, c) - } - - tmp := &Dense{ - mat: gsvd.u, - capRows: r, - capCols: c, - } - dst.Copy(tmp) - return dst -} - -// VTo extracts the matrix V from the singular value decomposition, storing -// the result in-place into dst. V is size p×p. -// If dst is nil, a new matrix is allocated. The resulting V matrix is returned. -// -// VTo will panic if the receiver does not contain a successful factorization. -func (gsvd *GSVD) VTo(dst *Dense) *Dense { - if !gsvd.succFact() { - panic(badFact) - } - if gsvd.kind&GSVDV == 0 { - panic("mat: improper GSVD kind") - } - r := gsvd.v.Rows - c := gsvd.v.Cols - if dst == nil { - dst = NewDense(r, c, nil) - } else { - dst.reuseAs(r, c) - } - - tmp := &Dense{ - mat: gsvd.v, - capRows: r, - capCols: c, - } - dst.Copy(tmp) - return dst -} - -// QTo extracts the matrix Q from the singular value decomposition, storing -// the result in-place into dst. Q is size c×c. -// If dst is nil, a new matrix is allocated. The resulting Q matrix is returned. -// -// QTo will panic if the receiver does not contain a successful factorization. -func (gsvd *GSVD) QTo(dst *Dense) *Dense { - if !gsvd.succFact() { - panic(badFact) - } - if gsvd.kind&GSVDQ == 0 { - panic("mat: improper GSVD kind") - } - r := gsvd.q.Rows - c := gsvd.q.Cols - if dst == nil { - dst = NewDense(r, c, nil) - } else { - dst.reuseAs(r, c) - } - - tmp := &Dense{ - mat: gsvd.q, - capRows: r, - capCols: c, - } - dst.Copy(tmp) - return dst -} diff --git a/vendor/gonum.org/v1/gonum/mat/hogsvd.go b/vendor/gonum.org/v1/gonum/mat/hogsvd.go deleted file mode 100644 index bd843e6b36..0000000000 --- a/vendor/gonum.org/v1/gonum/mat/hogsvd.go +++ /dev/null @@ -1,233 +0,0 @@ -// Copyright ©2017 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package mat - -import ( - "errors" - - "gonum.org/v1/gonum/blas/blas64" -) - -// HOGSVD is a type for creating and using the Higher Order Generalized Singular Value -// Decomposition (HOGSVD) of a set of matrices. -// -// The factorization is a linear transformation of the data sets from the given -// variable×sample spaces to reduced and diagonalized "eigenvariable"×"eigensample" -// spaces. -type HOGSVD struct { - n int - v *Dense - b []Dense - - err error -} - -// succFact returns whether the receiver contains a successful factorization. -func (gsvd *HOGSVD) succFact() bool { - return gsvd.n != 0 -} - -// Factorize computes the higher order generalized singular value decomposition (HOGSVD) -// of the n input r_i×c column tall matrices in m. HOGSV extends the GSVD case from 2 to n -// input matrices. -// -// M_0 = U_0 * Σ_0 * V^T -// M_1 = U_1 * Σ_1 * V^T -// . -// . -// . -// M_{n-1} = U_{n-1} * Σ_{n-1} * V^T -// -// where U_i are r_i×c matrices of singular vectors, Σ are c×c matrices singular values, and V -// is a c×c matrix of singular vectors. -// -// Factorize returns whether the decomposition succeeded. If the decomposition -// failed, routines that require a successful factorization will panic. -func (gsvd *HOGSVD) Factorize(m ...Matrix) (ok bool) { - // Factorize performs the HOGSVD factorisation - // essentially as described by Ponnapalli et al. - // https://doi.org/10.1371/journal.pone.0028072 - - if len(m) < 2 { - panic("hogsvd: too few matrices") - } - gsvd.n = 0 - - r, c := m[0].Dims() - a := make([]Cholesky, len(m)) - var ts SymDense - for i, d := range m { - rd, cd := d.Dims() - if rd < cd { - gsvd.err = ErrShape - return false - } - if rd > r { - r = rd - } - if cd != c { - panic(ErrShape) - } - ts.Reset() - ts.SymOuterK(1, d.T()) - ok = a[i].Factorize(&ts) - if !ok { - gsvd.err = errors.New("hogsvd: cholesky decomposition failed") - return false - } - } - - s := getWorkspace(c, c, true) - defer putWorkspace(s) - sij := getWorkspace(c, c, false) - defer putWorkspace(sij) - for i, ai := range a { - for _, aj := range a[i+1:] { - gsvd.err = ai.SolveCholTo(sij, &aj) - if gsvd.err != nil { - return false - } - s.Add(s, sij) - - gsvd.err = aj.SolveCholTo(sij, &ai) - if gsvd.err != nil { - return false - } - s.Add(s, sij) - } - } - s.Scale(1/float64(len(m)*(len(m)-1)), s) - - var eig Eigen - ok = eig.Factorize(s.T(), EigenRight) - if !ok { - gsvd.err = errors.New("hogsvd: eigen decomposition failed") - return false - } - vc := eig.VectorsTo(nil) - // vc is guaranteed to have real eigenvalues. - rc, cc := vc.Dims() - v := NewDense(rc, cc, nil) - for i := 0; i < rc; i++ { - for j := 0; j < cc; j++ { - a := vc.At(i, j) - v.set(i, j, real(a)) - } - } - // Rescale the columns of v by their Frobenius norms. - // Work done in cv is reflected in v. - var cv VecDense - for j := 0; j < c; j++ { - cv.ColViewOf(v, j) - cv.ScaleVec(1/blas64.Nrm2(cv.mat), &cv) - } - - b := make([]Dense, len(m)) - biT := getWorkspace(c, r, false) - defer putWorkspace(biT) - for i, d := range m { - // All calls to reset will leave a zeroed - // matrix with capacity to store the result - // without additional allocation. - biT.Reset() - gsvd.err = biT.Solve(v, d.T()) - if gsvd.err != nil { - return false - } - b[i].Clone(biT.T()) - } - - gsvd.n = len(m) - gsvd.v = v - gsvd.b = b - return true -} - -// Err returns the reason for a factorization failure. -func (gsvd *HOGSVD) Err() error { - return gsvd.err -} - -// Len returns the number of matrices that have been factorized. If Len returns -// zero, the factorization was not successful. -func (gsvd *HOGSVD) Len() int { - return gsvd.n -} - -// UTo extracts the matrix U_n from the singular value decomposition, storing -// the result in-place into dst. U_n is size r×c. -// If dst is nil, a new matrix is allocated. The resulting U matrix is returned. -// -// UTo will panic if the receiver does not contain a successful factorization. -func (gsvd *HOGSVD) UTo(dst *Dense, n int) *Dense { - if !gsvd.succFact() { - panic(badFact) - } - if n < 0 || gsvd.n <= n { - panic("hogsvd: invalid index") - } - - if dst == nil { - r, c := gsvd.b[n].Dims() - dst = NewDense(r, c, nil) - } else { - dst.reuseAs(gsvd.b[n].Dims()) - } - dst.Copy(&gsvd.b[n]) - var v VecDense - for j, f := range gsvd.Values(nil, n) { - v.ColViewOf(dst, j) - v.ScaleVec(1/f, &v) - } - return dst -} - -// Values returns the nth set of singular values of the factorized system. -// If the input slice is non-nil, the values will be stored in-place into the slice. -// In this case, the slice must have length c, and Values will panic with -// matrix.ErrSliceLengthMismatch otherwise. If the input slice is nil, -// a new slice of the appropriate length will be allocated and returned. -// -// Values will panic if the receiver does not contain a successful factorization. -func (gsvd *HOGSVD) Values(s []float64, n int) []float64 { - if !gsvd.succFact() { - panic(badFact) - } - if n < 0 || gsvd.n <= n { - panic("hogsvd: invalid index") - } - - _, c := gsvd.b[n].Dims() - if s == nil { - s = make([]float64, c) - } else if len(s) != c { - panic(ErrSliceLengthMismatch) - } - var v VecDense - for j := 0; j < c; j++ { - v.ColViewOf(&gsvd.b[n], j) - s[j] = blas64.Nrm2(v.mat) - } - return s -} - -// VTo extracts the matrix V from the singular value decomposition, storing -// the result in-place into dst. V is size c×c. -// If dst is nil, a new matrix is allocated. The resulting V matrix is returned. -// -// VTo will panic if the receiver does not contain a successful factorization. -func (gsvd *HOGSVD) VTo(dst *Dense) *Dense { - if !gsvd.succFact() { - panic(badFact) - } - if dst == nil { - r, c := gsvd.v.Dims() - dst = NewDense(r, c, nil) - } else { - dst.reuseAs(gsvd.v.Dims()) - } - dst.Copy(gsvd.v) - return dst -} diff --git a/vendor/gonum.org/v1/gonum/mat/index_bound_checks.go b/vendor/gonum.org/v1/gonum/mat/index_bound_checks.go deleted file mode 100644 index 59815a6768..0000000000 --- a/vendor/gonum.org/v1/gonum/mat/index_bound_checks.go +++ /dev/null @@ -1,348 +0,0 @@ -// Copyright ©2014 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// This file must be kept in sync with index_no_bound_checks.go. - -// +build bounds - -package mat - -// At returns the element at row i, column j. -func (m *Dense) At(i, j int) float64 { - return m.at(i, j) -} - -func (m *Dense) at(i, j int) float64 { - if uint(i) >= uint(m.mat.Rows) { - panic(ErrRowAccess) - } - if uint(j) >= uint(m.mat.Cols) { - panic(ErrColAccess) - } - return m.mat.Data[i*m.mat.Stride+j] -} - -// Set sets the element at row i, column j to the value v. -func (m *Dense) Set(i, j int, v float64) { - m.set(i, j, v) -} - -func (m *Dense) set(i, j int, v float64) { - if uint(i) >= uint(m.mat.Rows) { - panic(ErrRowAccess) - } - if uint(j) >= uint(m.mat.Cols) { - panic(ErrColAccess) - } - m.mat.Data[i*m.mat.Stride+j] = v -} - -// At returns the element at row i, column j. -func (m *CDense) At(i, j int) complex128 { - return m.at(i, j) -} - -func (m *CDense) at(i, j int) complex128 { - if uint(i) >= uint(m.mat.Rows) { - panic(ErrRowAccess) - } - if uint(j) >= uint(m.mat.Cols) { - panic(ErrColAccess) - } - return m.mat.Data[i*m.mat.Stride+j] -} - -// Set sets the element at row i, column j to the value v. -func (m *CDense) Set(i, j int, v complex128) { - m.set(i, j, v) -} - -func (m *CDense) set(i, j int, v complex128) { - if uint(i) >= uint(m.mat.Rows) { - panic(ErrRowAccess) - } - if uint(j) >= uint(m.mat.Cols) { - panic(ErrColAccess) - } - m.mat.Data[i*m.mat.Stride+j] = v -} - -// At returns the element at row i. -// It panics if i is out of bounds or if j is not zero. -func (v *VecDense) At(i, j int) float64 { - if j != 0 { - panic(ErrColAccess) - } - return v.at(i) -} - -// AtVec returns the element at row i. -// It panics if i is out of bounds. -func (v *VecDense) AtVec(i int) float64 { - return v.at(i) -} - -func (v *VecDense) at(i int) float64 { - if uint(i) >= uint(v.mat.N) { - panic(ErrRowAccess) - } - return v.mat.Data[i*v.mat.Inc] -} - -// SetVec sets the element at row i to the value val. -// It panics if i is out of bounds. -func (v *VecDense) SetVec(i int, val float64) { - v.setVec(i, val) -} - -func (v *VecDense) setVec(i int, val float64) { - if uint(i) >= uint(v.mat.N) { - panic(ErrVectorAccess) - } - v.mat.Data[i*v.mat.Inc] = val -} - -// At returns the element at row i and column j. -func (t *SymDense) At(i, j int) float64 { - return t.at(i, j) -} - -func (t *SymDense) at(i, j int) float64 { - if uint(i) >= uint(t.mat.N) { - panic(ErrRowAccess) - } - if uint(j) >= uint(t.mat.N) { - panic(ErrColAccess) - } - if i > j { - i, j = j, i - } - return t.mat.Data[i*t.mat.Stride+j] -} - -// SetSym sets the elements at (i,j) and (j,i) to the value v. -func (t *SymDense) SetSym(i, j int, v float64) { - t.set(i, j, v) -} - -func (t *SymDense) set(i, j int, v float64) { - if uint(i) >= uint(t.mat.N) { - panic(ErrRowAccess) - } - if uint(j) >= uint(t.mat.N) { - panic(ErrColAccess) - } - if i > j { - i, j = j, i - } - t.mat.Data[i*t.mat.Stride+j] = v -} - -// At returns the element at row i, column j. -func (t *TriDense) At(i, j int) float64 { - return t.at(i, j) -} - -func (t *TriDense) at(i, j int) float64 { - if uint(i) >= uint(t.mat.N) { - panic(ErrRowAccess) - } - if uint(j) >= uint(t.mat.N) { - panic(ErrColAccess) - } - isUpper := t.isUpper() - if (isUpper && i > j) || (!isUpper && i < j) { - return 0 - } - return t.mat.Data[i*t.mat.Stride+j] -} - -// SetTri sets the element of the triangular matrix at row i, column j to the value v. -// It panics if the location is outside the appropriate half of the matrix. -func (t *TriDense) SetTri(i, j int, v float64) { - t.set(i, j, v) -} - -func (t *TriDense) set(i, j int, v float64) { - if uint(i) >= uint(t.mat.N) { - panic(ErrRowAccess) - } - if uint(j) >= uint(t.mat.N) { - panic(ErrColAccess) - } - isUpper := t.isUpper() - if (isUpper && i > j) || (!isUpper && i < j) { - panic(ErrTriangleSet) - } - t.mat.Data[i*t.mat.Stride+j] = v -} - -// At returns the element at row i, column j. -func (b *BandDense) At(i, j int) float64 { - return b.at(i, j) -} - -func (b *BandDense) at(i, j int) float64 { - if uint(i) >= uint(b.mat.Rows) { - panic(ErrRowAccess) - } - if uint(j) >= uint(b.mat.Cols) { - panic(ErrColAccess) - } - pj := j + b.mat.KL - i - if pj < 0 || b.mat.KL+b.mat.KU+1 <= pj { - return 0 - } - return b.mat.Data[i*b.mat.Stride+pj] -} - -// SetBand sets the element at row i, column j to the value v. -// It panics if the location is outside the appropriate region of the matrix. -func (b *BandDense) SetBand(i, j int, v float64) { - b.set(i, j, v) -} - -func (b *BandDense) set(i, j int, v float64) { - if uint(i) >= uint(b.mat.Rows) { - panic(ErrRowAccess) - } - if uint(j) >= uint(b.mat.Cols) { - panic(ErrColAccess) - } - pj := j + b.mat.KL - i - if pj < 0 || b.mat.KL+b.mat.KU+1 <= pj { - panic(ErrBandSet) - } - b.mat.Data[i*b.mat.Stride+pj] = v -} - -// At returns the element at row i, column j. -func (s *SymBandDense) At(i, j int) float64 { - return s.at(i, j) -} - -func (s *SymBandDense) at(i, j int) float64 { - if uint(i) >= uint(s.mat.N) { - panic(ErrRowAccess) - } - if uint(j) >= uint(s.mat.N) { - panic(ErrColAccess) - } - if i > j { - i, j = j, i - } - pj := j - i - if s.mat.K+1 <= pj { - return 0 - } - return s.mat.Data[i*s.mat.Stride+pj] -} - -// SetSymBand sets the element at row i, column j to the value v. -// It panics if the location is outside the appropriate region of the matrix. -func (s *SymBandDense) SetSymBand(i, j int, v float64) { - s.set(i, j, v) -} - -func (s *SymBandDense) set(i, j int, v float64) { - if uint(i) >= uint(s.mat.N) { - panic(ErrRowAccess) - } - if uint(j) >= uint(s.mat.N) { - panic(ErrColAccess) - } - if i > j { - i, j = j, i - } - pj := j - i - if s.mat.K+1 <= pj { - panic(ErrBandSet) - } - s.mat.Data[i*s.mat.Stride+pj] = v -} - -func (t *TriBandDense) At(i, j int) float64 { - return t.at(i, j) -} - -func (t *TriBandDense) at(i, j int) float64 { - // TODO(btracey): Support Diag field, see #692. - if uint(i) >= uint(t.mat.N) { - panic(ErrRowAccess) - } - if uint(j) >= uint(t.mat.N) { - panic(ErrColAccess) - } - isUpper := t.isUpper() - if (isUpper && i > j) || (!isUpper && i < j) { - return 0 - } - kl, ku := t.mat.K, 0 - if isUpper { - kl, ku = 0, t.mat.K - } - pj := j + kl - i - if pj < 0 || kl+ku+1 <= pj { - return 0 - } - return t.mat.Data[i*t.mat.Stride+pj] -} - -func (t *TriBandDense) SetTriBand(i, j int, v float64) { - t.setTriBand(i, j, v) -} - -func (t *TriBandDense) setTriBand(i, j int, v float64) { - if uint(i) >= uint(t.mat.N) { - panic(ErrRowAccess) - } - if uint(j) >= uint(t.mat.N) { - panic(ErrColAccess) - } - isUpper := t.isUpper() - if (isUpper && i > j) || (!isUpper && i < j) { - panic(ErrTriangleSet) - } - kl, ku := t.mat.K, 0 - if isUpper { - kl, ku = 0, t.mat.K - } - pj := j + kl - i - if pj < 0 || kl+ku+1 <= pj { - panic(ErrBandSet) - } - // TODO(btracey): Support Diag field, see #692. - t.mat.Data[i*t.mat.Stride+pj] = v -} - -// At returns the element at row i, column j. -func (d *DiagDense) At(i, j int) float64 { - return d.at(i, j) -} - -func (d *DiagDense) at(i, j int) float64 { - if uint(i) >= uint(d.mat.N) { - panic(ErrRowAccess) - } - if uint(j) >= uint(d.mat.N) { - panic(ErrColAccess) - } - if i != j { - return 0 - } - return d.mat.Data[i*d.mat.Inc] -} - -// SetDiag sets the element at row i, column i to the value v. -// It panics if the location is outside the appropriate region of the matrix. -func (d *DiagDense) SetDiag(i int, v float64) { - d.setDiag(i, v) -} - -func (d *DiagDense) setDiag(i int, v float64) { - if uint(i) >= uint(d.mat.N) { - panic(ErrRowAccess) - } - d.mat.Data[i*d.mat.Inc] = v -} diff --git a/vendor/gonum.org/v1/gonum/mat/index_no_bound_checks.go b/vendor/gonum.org/v1/gonum/mat/index_no_bound_checks.go deleted file mode 100644 index 051f8437af..0000000000 --- a/vendor/gonum.org/v1/gonum/mat/index_no_bound_checks.go +++ /dev/null @@ -1,359 +0,0 @@ -// Copyright ©2014 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// This file must be kept in sync with index_bound_checks.go. - -// +build !bounds - -package mat - -// At returns the element at row i, column j. -func (m *Dense) At(i, j int) float64 { - if uint(i) >= uint(m.mat.Rows) { - panic(ErrRowAccess) - } - if uint(j) >= uint(m.mat.Cols) { - panic(ErrColAccess) - } - return m.at(i, j) -} - -func (m *Dense) at(i, j int) float64 { - return m.mat.Data[i*m.mat.Stride+j] -} - -// Set sets the element at row i, column j to the value v. -func (m *Dense) Set(i, j int, v float64) { - if uint(i) >= uint(m.mat.Rows) { - panic(ErrRowAccess) - } - if uint(j) >= uint(m.mat.Cols) { - panic(ErrColAccess) - } - m.set(i, j, v) -} - -func (m *Dense) set(i, j int, v float64) { - m.mat.Data[i*m.mat.Stride+j] = v -} - -// At returns the element at row i, column j. -func (m *CDense) At(i, j int) complex128 { - if uint(i) >= uint(m.mat.Rows) { - panic(ErrRowAccess) - } - if uint(j) >= uint(m.mat.Cols) { - panic(ErrColAccess) - } - return m.at(i, j) -} - -func (m *CDense) at(i, j int) complex128 { - return m.mat.Data[i*m.mat.Stride+j] -} - -// Set sets the element at row i, column j to the value v. -func (m *CDense) Set(i, j int, v complex128) { - if uint(i) >= uint(m.mat.Rows) { - panic(ErrRowAccess) - } - if uint(j) >= uint(m.mat.Cols) { - panic(ErrColAccess) - } - m.set(i, j, v) -} - -func (m *CDense) set(i, j int, v complex128) { - m.mat.Data[i*m.mat.Stride+j] = v -} - -// At returns the element at row i. -// It panics if i is out of bounds or if j is not zero. -func (v *VecDense) At(i, j int) float64 { - if uint(i) >= uint(v.mat.N) { - panic(ErrRowAccess) - } - if j != 0 { - panic(ErrColAccess) - } - return v.at(i) -} - -// AtVec returns the element at row i. -// It panics if i is out of bounds. -func (v *VecDense) AtVec(i int) float64 { - if uint(i) >= uint(v.mat.N) { - panic(ErrRowAccess) - } - return v.at(i) -} - -func (v *VecDense) at(i int) float64 { - return v.mat.Data[i*v.mat.Inc] -} - -// SetVec sets the element at row i to the value val. -// It panics if i is out of bounds. -func (v *VecDense) SetVec(i int, val float64) { - if uint(i) >= uint(v.mat.N) { - panic(ErrVectorAccess) - } - v.setVec(i, val) -} - -func (v *VecDense) setVec(i int, val float64) { - v.mat.Data[i*v.mat.Inc] = val -} - -// At returns the element at row i and column j. -func (s *SymDense) At(i, j int) float64 { - if uint(i) >= uint(s.mat.N) { - panic(ErrRowAccess) - } - if uint(j) >= uint(s.mat.N) { - panic(ErrColAccess) - } - return s.at(i, j) -} - -func (s *SymDense) at(i, j int) float64 { - if i > j { - i, j = j, i - } - return s.mat.Data[i*s.mat.Stride+j] -} - -// SetSym sets the elements at (i,j) and (j,i) to the value v. -func (s *SymDense) SetSym(i, j int, v float64) { - if uint(i) >= uint(s.mat.N) { - panic(ErrRowAccess) - } - if uint(j) >= uint(s.mat.N) { - panic(ErrColAccess) - } - s.set(i, j, v) -} - -func (s *SymDense) set(i, j int, v float64) { - if i > j { - i, j = j, i - } - s.mat.Data[i*s.mat.Stride+j] = v -} - -// At returns the element at row i, column j. -func (t *TriDense) At(i, j int) float64 { - if uint(i) >= uint(t.mat.N) { - panic(ErrRowAccess) - } - if uint(j) >= uint(t.mat.N) { - panic(ErrColAccess) - } - return t.at(i, j) -} - -func (t *TriDense) at(i, j int) float64 { - isUpper := t.triKind() - if (isUpper && i > j) || (!isUpper && i < j) { - return 0 - } - return t.mat.Data[i*t.mat.Stride+j] -} - -// SetTri sets the element at row i, column j to the value v. -// It panics if the location is outside the appropriate half of the matrix. -func (t *TriDense) SetTri(i, j int, v float64) { - if uint(i) >= uint(t.mat.N) { - panic(ErrRowAccess) - } - if uint(j) >= uint(t.mat.N) { - panic(ErrColAccess) - } - isUpper := t.isUpper() - if (isUpper && i > j) || (!isUpper && i < j) { - panic(ErrTriangleSet) - } - t.set(i, j, v) -} - -func (t *TriDense) set(i, j int, v float64) { - t.mat.Data[i*t.mat.Stride+j] = v -} - -// At returns the element at row i, column j. -func (b *BandDense) At(i, j int) float64 { - if uint(i) >= uint(b.mat.Rows) { - panic(ErrRowAccess) - } - if uint(j) >= uint(b.mat.Cols) { - panic(ErrColAccess) - } - return b.at(i, j) -} - -func (b *BandDense) at(i, j int) float64 { - pj := j + b.mat.KL - i - if pj < 0 || b.mat.KL+b.mat.KU+1 <= pj { - return 0 - } - return b.mat.Data[i*b.mat.Stride+pj] -} - -// SetBand sets the element at row i, column j to the value v. -// It panics if the location is outside the appropriate region of the matrix. -func (b *BandDense) SetBand(i, j int, v float64) { - if uint(i) >= uint(b.mat.Rows) { - panic(ErrRowAccess) - } - if uint(j) >= uint(b.mat.Cols) { - panic(ErrColAccess) - } - pj := j + b.mat.KL - i - if pj < 0 || b.mat.KL+b.mat.KU+1 <= pj { - panic(ErrBandSet) - } - b.set(i, j, v) -} - -func (b *BandDense) set(i, j int, v float64) { - pj := j + b.mat.KL - i - b.mat.Data[i*b.mat.Stride+pj] = v -} - -// At returns the element at row i, column j. -func (s *SymBandDense) At(i, j int) float64 { - if uint(i) >= uint(s.mat.N) { - panic(ErrRowAccess) - } - if uint(j) >= uint(s.mat.N) { - panic(ErrColAccess) - } - return s.at(i, j) -} - -func (s *SymBandDense) at(i, j int) float64 { - if i > j { - i, j = j, i - } - pj := j - i - if s.mat.K+1 <= pj { - return 0 - } - return s.mat.Data[i*s.mat.Stride+pj] -} - -// SetSymBand sets the element at row i, column j to the value v. -// It panics if the location is outside the appropriate region of the matrix. -func (s *SymBandDense) SetSymBand(i, j int, v float64) { - if uint(i) >= uint(s.mat.N) { - panic(ErrRowAccess) - } - if uint(j) >= uint(s.mat.N) { - panic(ErrColAccess) - } - s.set(i, j, v) -} - -func (s *SymBandDense) set(i, j int, v float64) { - if i > j { - i, j = j, i - } - pj := j - i - if s.mat.K+1 <= pj { - panic(ErrBandSet) - } - s.mat.Data[i*s.mat.Stride+pj] = v -} - -func (t *TriBandDense) At(i, j int) float64 { - if uint(i) >= uint(t.mat.N) { - panic(ErrRowAccess) - } - if uint(j) >= uint(t.mat.N) { - panic(ErrColAccess) - } - return t.at(i, j) -} - -func (t *TriBandDense) at(i, j int) float64 { - // TODO(btracey): Support Diag field, see #692. - isUpper := t.isUpper() - if (isUpper && i > j) || (!isUpper && i < j) { - return 0 - } - kl := t.mat.K - ku := 0 - if isUpper { - ku = t.mat.K - kl = 0 - } - pj := j + kl - i - if pj < 0 || kl+ku+1 <= pj { - return 0 - } - return t.mat.Data[i*t.mat.Stride+pj] -} - -func (t *TriBandDense) SetTriBand(i, j int, v float64) { - if uint(i) >= uint(t.mat.N) { - panic(ErrRowAccess) - } - if uint(j) >= uint(t.mat.N) { - panic(ErrColAccess) - } - isUpper := t.isUpper() - if (isUpper && i > j) || (!isUpper && i < j) { - panic(ErrTriangleSet) - } - kl, ku := t.mat.K, 0 - if isUpper { - kl, ku = 0, t.mat.K - } - pj := j + kl - i - if pj < 0 || kl+ku+1 <= pj { - panic(ErrBandSet) - } - // TODO(btracey): Support Diag field, see #692. - t.mat.Data[i*t.mat.Stride+pj] = v -} - -func (t *TriBandDense) setTriBand(i, j int, v float64) { - var kl int - if !t.isUpper() { - kl = t.mat.K - } - pj := j + kl - i - t.mat.Data[i*t.mat.Stride+pj] = v -} - -// At returns the element at row i, column j. -func (d *DiagDense) At(i, j int) float64 { - if uint(i) >= uint(d.mat.N) { - panic(ErrRowAccess) - } - if uint(j) >= uint(d.mat.N) { - panic(ErrColAccess) - } - return d.at(i, j) -} - -func (d *DiagDense) at(i, j int) float64 { - if i != j { - return 0 - } - return d.mat.Data[i*d.mat.Inc] -} - -// SetDiag sets the element at row i, column i to the value v. -// It panics if the location is outside the appropriate region of the matrix. -func (d *DiagDense) SetDiag(i int, v float64) { - if uint(i) >= uint(d.mat.N) { - panic(ErrRowAccess) - } - d.setDiag(i, v) -} - -func (d *DiagDense) setDiag(i int, v float64) { - d.mat.Data[i*d.mat.Inc] = v -} diff --git a/vendor/gonum.org/v1/gonum/mat/inner.go b/vendor/gonum.org/v1/gonum/mat/inner.go deleted file mode 100644 index fba3e0b046..0000000000 --- a/vendor/gonum.org/v1/gonum/mat/inner.go +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright ©2014 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package mat - -import ( - "gonum.org/v1/gonum/blas" - "gonum.org/v1/gonum/blas/blas64" - "gonum.org/v1/gonum/internal/asm/f64" -) - -// Inner computes the generalized inner product -// x^T A y -// between column vectors x and y with matrix A. This is only a true inner product if -// A is symmetric positive definite, though the operation works for any matrix A. -// -// Inner panics if x.Len != m or y.Len != n when A is an m x n matrix. -func Inner(x Vector, a Matrix, y Vector) float64 { - m, n := a.Dims() - if x.Len() != m { - panic(ErrShape) - } - if y.Len() != n { - panic(ErrShape) - } - if m == 0 || n == 0 { - return 0 - } - - var sum float64 - - switch a := a.(type) { - case RawSymmetricer: - amat := a.RawSymmetric() - if amat.Uplo != blas.Upper { - // Panic as a string not a mat.Error. - panic(badSymTriangle) - } - var xmat, ymat blas64.Vector - if xrv, ok := x.(RawVectorer); ok { - xmat = xrv.RawVector() - } else { - break - } - if yrv, ok := y.(RawVectorer); ok { - ymat = yrv.RawVector() - } else { - break - } - for i := 0; i < x.Len(); i++ { - xi := x.AtVec(i) - if xi != 0 { - if ymat.Inc == 1 { - sum += xi * f64.DotUnitary( - amat.Data[i*amat.Stride+i:i*amat.Stride+n], - ymat.Data[i:], - ) - } else { - sum += xi * f64.DotInc( - amat.Data[i*amat.Stride+i:i*amat.Stride+n], - ymat.Data[i*ymat.Inc:], uintptr(n-i), - 1, uintptr(ymat.Inc), - 0, 0, - ) - } - } - yi := y.AtVec(i) - if i != n-1 && yi != 0 { - if xmat.Inc == 1 { - sum += yi * f64.DotUnitary( - amat.Data[i*amat.Stride+i+1:i*amat.Stride+n], - xmat.Data[i+1:], - ) - } else { - sum += yi * f64.DotInc( - amat.Data[i*amat.Stride+i+1:i*amat.Stride+n], - xmat.Data[(i+1)*xmat.Inc:], uintptr(n-i-1), - 1, uintptr(xmat.Inc), - 0, 0, - ) - } - } - } - return sum - case RawMatrixer: - amat := a.RawMatrix() - var ymat blas64.Vector - if yrv, ok := y.(RawVectorer); ok { - ymat = yrv.RawVector() - } else { - break - } - for i := 0; i < x.Len(); i++ { - xi := x.AtVec(i) - if xi != 0 { - if ymat.Inc == 1 { - sum += xi * f64.DotUnitary( - amat.Data[i*amat.Stride:i*amat.Stride+n], - ymat.Data, - ) - } else { - sum += xi * f64.DotInc( - amat.Data[i*amat.Stride:i*amat.Stride+n], - ymat.Data, uintptr(n), - 1, uintptr(ymat.Inc), - 0, 0, - ) - } - } - } - return sum - } - for i := 0; i < x.Len(); i++ { - xi := x.AtVec(i) - for j := 0; j < y.Len(); j++ { - sum += xi * a.At(i, j) * y.AtVec(j) - } - } - return sum -} diff --git a/vendor/gonum.org/v1/gonum/mat/io.go b/vendor/gonum.org/v1/gonum/mat/io.go deleted file mode 100644 index 7f7ef0703e..0000000000 --- a/vendor/gonum.org/v1/gonum/mat/io.go +++ /dev/null @@ -1,492 +0,0 @@ -// Copyright ©2015 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package mat - -import ( - "bytes" - "encoding/binary" - "errors" - "fmt" - "io" - "math" -) - -// version is the current on-disk codec version. -const version uint32 = 0x1 - -// maxLen is the biggest slice/array len one can create on a 32/64b platform. -const maxLen = int64(int(^uint(0) >> 1)) - -var ( - headerSize = binary.Size(storage{}) - sizeInt64 = binary.Size(int64(0)) - sizeFloat64 = binary.Size(float64(0)) - - errWrongType = errors.New("mat: wrong data type") - - errTooBig = errors.New("mat: resulting data slice too big") - errTooSmall = errors.New("mat: input slice too small") - errBadBuffer = errors.New("mat: data buffer size mismatch") - errBadSize = errors.New("mat: invalid dimension") -) - -// Type encoding scheme: -// -// Type Form Packing Uplo Unit Rows Columns kU kL -// uint8 [GST] uint8 [BPF] uint8 [AUL] bool int64 int64 int64 int64 -// General 'G' 'F' 'A' false r c 0 0 -// Band 'G' 'B' 'A' false r c kU kL -// Symmetric 'S' 'F' ul false n n 0 0 -// SymmetricBand 'S' 'B' ul false n n k k -// SymmetricPacked 'S' 'P' ul false n n 0 0 -// Triangular 'T' 'F' ul Diag==Unit n n 0 0 -// TriangularBand 'T' 'B' ul Diag==Unit n n k k -// TriangularPacked 'T' 'P' ul Diag==Unit n n 0 0 -// -// G - general, S - symmetric, T - triangular -// F - full, B - band, P - packed -// A - all, U - upper, L - lower - -// MarshalBinary encodes the receiver into a binary form and returns the result. -// -// Dense is little-endian encoded as follows: -// 0 - 3 Version = 1 (uint32) -// 4 'G' (byte) -// 5 'F' (byte) -// 6 'A' (byte) -// 7 0 (byte) -// 8 - 15 number of rows (int64) -// 16 - 23 number of columns (int64) -// 24 - 31 0 (int64) -// 32 - 39 0 (int64) -// 40 - .. matrix data elements (float64) -// [0,0] [0,1] ... [0,ncols-1] -// [1,0] [1,1] ... [1,ncols-1] -// ... -// [nrows-1,0] ... [nrows-1,ncols-1] -func (m Dense) MarshalBinary() ([]byte, error) { - bufLen := int64(headerSize) + int64(m.mat.Rows)*int64(m.mat.Cols)*int64(sizeFloat64) - if bufLen <= 0 { - // bufLen is too big and has wrapped around. - return nil, errTooBig - } - - header := storage{ - Form: 'G', Packing: 'F', Uplo: 'A', - Rows: int64(m.mat.Rows), Cols: int64(m.mat.Cols), - Version: version, - } - buf := make([]byte, bufLen) - n, err := header.marshalBinaryTo(bytes.NewBuffer(buf[:0])) - if err != nil { - return buf[:n], err - } - - p := headerSize - r, c := m.Dims() - for i := 0; i < r; i++ { - for j := 0; j < c; j++ { - binary.LittleEndian.PutUint64(buf[p:p+sizeFloat64], math.Float64bits(m.at(i, j))) - p += sizeFloat64 - } - } - - return buf, nil -} - -// MarshalBinaryTo encodes the receiver into a binary form and writes it into w. -// MarshalBinaryTo returns the number of bytes written into w and an error, if any. -// -// See MarshalBinary for the on-disk layout. -func (m Dense) MarshalBinaryTo(w io.Writer) (int, error) { - header := storage{ - Form: 'G', Packing: 'F', Uplo: 'A', - Rows: int64(m.mat.Rows), Cols: int64(m.mat.Cols), - Version: version, - } - n, err := header.marshalBinaryTo(w) - if err != nil { - return n, err - } - - r, c := m.Dims() - var b [8]byte - for i := 0; i < r; i++ { - for j := 0; j < c; j++ { - binary.LittleEndian.PutUint64(b[:], math.Float64bits(m.at(i, j))) - nn, err := w.Write(b[:]) - n += nn - if err != nil { - return n, err - } - } - } - - return n, nil -} - -// UnmarshalBinary decodes the binary form into the receiver. -// It panics if the receiver is a non-zero Dense matrix. -// -// See MarshalBinary for the on-disk layout. -// -// Limited checks on the validity of the binary input are performed: -// - matrix.ErrShape is returned if the number of rows or columns is negative, -// - an error is returned if the resulting Dense matrix is too -// big for the current architecture (e.g. a 16GB matrix written by a -// 64b application and read back from a 32b application.) -// UnmarshalBinary does not limit the size of the unmarshaled matrix, and so -// it should not be used on untrusted data. -func (m *Dense) UnmarshalBinary(data []byte) error { - if !m.IsZero() { - panic("mat: unmarshal into non-zero matrix") - } - - if len(data) < headerSize { - return errTooSmall - } - - var header storage - err := header.unmarshalBinary(data[:headerSize]) - if err != nil { - return err - } - rows := header.Rows - cols := header.Cols - header.Version = 0 - header.Rows = 0 - header.Cols = 0 - if (header != storage{Form: 'G', Packing: 'F', Uplo: 'A'}) { - return errWrongType - } - if rows < 0 || cols < 0 { - return errBadSize - } - size := rows * cols - if size == 0 { - return ErrZeroLength - } - if int(size) < 0 || size > maxLen { - return errTooBig - } - if len(data) != headerSize+int(rows*cols)*sizeFloat64 { - return errBadBuffer - } - - p := headerSize - m.reuseAs(int(rows), int(cols)) - for i := range m.mat.Data { - m.mat.Data[i] = math.Float64frombits(binary.LittleEndian.Uint64(data[p : p+sizeFloat64])) - p += sizeFloat64 - } - - return nil -} - -// UnmarshalBinaryFrom decodes the binary form into the receiver and returns -// the number of bytes read and an error if any. -// It panics if the receiver is a non-zero Dense matrix. -// -// See MarshalBinary for the on-disk layout. -// -// Limited checks on the validity of the binary input are performed: -// - matrix.ErrShape is returned if the number of rows or columns is negative, -// - an error is returned if the resulting Dense matrix is too -// big for the current architecture (e.g. a 16GB matrix written by a -// 64b application and read back from a 32b application.) -// UnmarshalBinary does not limit the size of the unmarshaled matrix, and so -// it should not be used on untrusted data. -func (m *Dense) UnmarshalBinaryFrom(r io.Reader) (int, error) { - if !m.IsZero() { - panic("mat: unmarshal into non-zero matrix") - } - - var header storage - n, err := header.unmarshalBinaryFrom(r) - if err != nil { - return n, err - } - rows := header.Rows - cols := header.Cols - header.Version = 0 - header.Rows = 0 - header.Cols = 0 - if (header != storage{Form: 'G', Packing: 'F', Uplo: 'A'}) { - return n, errWrongType - } - if rows < 0 || cols < 0 { - return n, errBadSize - } - size := rows * cols - if size == 0 { - return n, ErrZeroLength - } - if int(size) < 0 || size > maxLen { - return n, errTooBig - } - - m.reuseAs(int(rows), int(cols)) - var b [8]byte - for i := range m.mat.Data { - nn, err := readFull(r, b[:]) - n += nn - if err != nil { - if err == io.EOF { - return n, io.ErrUnexpectedEOF - } - return n, err - } - m.mat.Data[i] = math.Float64frombits(binary.LittleEndian.Uint64(b[:])) - } - - return n, nil -} - -// MarshalBinary encodes the receiver into a binary form and returns the result. -// -// VecDense is little-endian encoded as follows: -// -// 0 - 3 Version = 1 (uint32) -// 4 'G' (byte) -// 5 'F' (byte) -// 6 'A' (byte) -// 7 0 (byte) -// 8 - 15 number of elements (int64) -// 16 - 23 1 (int64) -// 24 - 31 0 (int64) -// 32 - 39 0 (int64) -// 40 - .. vector's data elements (float64) -func (v VecDense) MarshalBinary() ([]byte, error) { - bufLen := int64(headerSize) + int64(v.mat.N)*int64(sizeFloat64) - if bufLen <= 0 { - // bufLen is too big and has wrapped around. - return nil, errTooBig - } - - header := storage{ - Form: 'G', Packing: 'F', Uplo: 'A', - Rows: int64(v.mat.N), Cols: 1, - Version: version, - } - buf := make([]byte, bufLen) - n, err := header.marshalBinaryTo(bytes.NewBuffer(buf[:0])) - if err != nil { - return buf[:n], err - } - - p := headerSize - for i := 0; i < v.mat.N; i++ { - binary.LittleEndian.PutUint64(buf[p:p+sizeFloat64], math.Float64bits(v.at(i))) - p += sizeFloat64 - } - - return buf, nil -} - -// MarshalBinaryTo encodes the receiver into a binary form, writes it to w and -// returns the number of bytes written and an error if any. -// -// See MarshalBainry for the on-disk format. -func (v VecDense) MarshalBinaryTo(w io.Writer) (int, error) { - header := storage{ - Form: 'G', Packing: 'F', Uplo: 'A', - Rows: int64(v.mat.N), Cols: 1, - Version: version, - } - n, err := header.marshalBinaryTo(w) - if err != nil { - return n, err - } - - var buf [8]byte - for i := 0; i < v.mat.N; i++ { - binary.LittleEndian.PutUint64(buf[:], math.Float64bits(v.at(i))) - nn, err := w.Write(buf[:]) - n += nn - if err != nil { - return n, err - } - } - - return n, nil -} - -// UnmarshalBinary decodes the binary form into the receiver. -// It panics if the receiver is a non-zero VecDense. -// -// See MarshalBinary for the on-disk layout. -// -// Limited checks on the validity of the binary input are performed: -// - matrix.ErrShape is returned if the number of rows is negative, -// - an error is returned if the resulting VecDense is too -// big for the current architecture (e.g. a 16GB vector written by a -// 64b application and read back from a 32b application.) -// UnmarshalBinary does not limit the size of the unmarshaled vector, and so -// it should not be used on untrusted data. -func (v *VecDense) UnmarshalBinary(data []byte) error { - if !v.IsZero() { - panic("mat: unmarshal into non-zero vector") - } - - if len(data) < headerSize { - return errTooSmall - } - - var header storage - err := header.unmarshalBinary(data[:headerSize]) - if err != nil { - return err - } - if header.Cols != 1 { - return ErrShape - } - n := header.Rows - header.Version = 0 - header.Rows = 0 - header.Cols = 0 - if (header != storage{Form: 'G', Packing: 'F', Uplo: 'A'}) { - return errWrongType - } - if n == 0 { - return ErrZeroLength - } - if n < 0 { - return errBadSize - } - if int64(maxLen) < n { - return errTooBig - } - if len(data) != headerSize+int(n)*sizeFloat64 { - return errBadBuffer - } - - p := headerSize - v.reuseAs(int(n)) - for i := range v.mat.Data { - v.mat.Data[i] = math.Float64frombits(binary.LittleEndian.Uint64(data[p : p+sizeFloat64])) - p += sizeFloat64 - } - - return nil -} - -// UnmarshalBinaryFrom decodes the binary form into the receiver, from the -// io.Reader and returns the number of bytes read and an error if any. -// It panics if the receiver is a non-zero VecDense. -// -// See MarshalBinary for the on-disk layout. -// See UnmarshalBinary for the list of sanity checks performed on the input. -func (v *VecDense) UnmarshalBinaryFrom(r io.Reader) (int, error) { - if !v.IsZero() { - panic("mat: unmarshal into non-zero vector") - } - - var header storage - n, err := header.unmarshalBinaryFrom(r) - if err != nil { - return n, err - } - if header.Cols != 1 { - return n, ErrShape - } - l := header.Rows - header.Version = 0 - header.Rows = 0 - header.Cols = 0 - if (header != storage{Form: 'G', Packing: 'F', Uplo: 'A'}) { - return n, errWrongType - } - if l == 0 { - return n, ErrZeroLength - } - if l < 0 { - return n, errBadSize - } - if int64(maxLen) < l { - return n, errTooBig - } - - v.reuseAs(int(l)) - var b [8]byte - for i := range v.mat.Data { - nn, err := readFull(r, b[:]) - n += nn - if err != nil { - if err == io.EOF { - return n, io.ErrUnexpectedEOF - } - return n, err - } - v.mat.Data[i] = math.Float64frombits(binary.LittleEndian.Uint64(b[:])) - } - - return n, nil -} - -// storage is the internal representation of the storage format of a -// serialised matrix. -type storage struct { - Version uint32 // Keep this first. - Form byte // [GST] - Packing byte // [BPF] - Uplo byte // [AUL] - Unit bool - Rows int64 - Cols int64 - KU int64 - KL int64 -} - -// TODO(kortschak): Consider replacing these with calls to direct -// encoding/decoding of fields rather than to binary.Write/binary.Read. - -func (s storage) marshalBinaryTo(w io.Writer) (int, error) { - buf := bytes.NewBuffer(make([]byte, 0, headerSize)) - err := binary.Write(buf, binary.LittleEndian, s) - if err != nil { - return 0, err - } - return w.Write(buf.Bytes()) -} - -func (s *storage) unmarshalBinary(buf []byte) error { - err := binary.Read(bytes.NewReader(buf), binary.LittleEndian, s) - if err != nil { - return err - } - if s.Version != version { - return fmt.Errorf("mat: incorrect version: %d", s.Version) - } - return nil -} - -func (s *storage) unmarshalBinaryFrom(r io.Reader) (int, error) { - buf := make([]byte, headerSize) - n, err := readFull(r, buf) - if err != nil { - return n, err - } - return n, s.unmarshalBinary(buf[:n]) -} - -// readFull reads from r into buf until it has read len(buf). -// It returns the number of bytes copied and an error if fewer bytes were read. -// If an EOF happens after reading fewer than len(buf) bytes, io.ErrUnexpectedEOF is returned. -func readFull(r io.Reader, buf []byte) (int, error) { - var n int - var err error - for n < len(buf) && err == nil { - var nn int - nn, err = r.Read(buf[n:]) - n += nn - } - if n == len(buf) { - return n, nil - } - if err == io.EOF { - return n, io.ErrUnexpectedEOF - } - return n, err -} diff --git a/vendor/gonum.org/v1/gonum/mat/lq.go b/vendor/gonum.org/v1/gonum/mat/lq.go deleted file mode 100644 index d788457d2b..0000000000 --- a/vendor/gonum.org/v1/gonum/mat/lq.go +++ /dev/null @@ -1,262 +0,0 @@ -// Copyright ©2013 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package mat - -import ( - "math" - - "gonum.org/v1/gonum/blas" - "gonum.org/v1/gonum/blas/blas64" - "gonum.org/v1/gonum/lapack" - "gonum.org/v1/gonum/lapack/lapack64" -) - -const badLQ = "mat: invalid LQ factorization" - -// LQ is a type for creating and using the LQ factorization of a matrix. -type LQ struct { - lq *Dense - tau []float64 - cond float64 -} - -func (lq *LQ) updateCond(norm lapack.MatrixNorm) { - // Since A = L*Q, and Q is orthogonal, we get for the condition number κ - // κ(A) := |A| |A^-1| = |L*Q| |(L*Q)^-1| = |L| |Q^T * L^-1| - // = |L| |L^-1| = κ(L), - // where we used that fact that Q^-1 = Q^T. However, this assumes that - // the matrix norm is invariant under orthogonal transformations which - // is not the case for CondNorm. Hopefully the error is negligible: κ - // is only a qualitative measure anyway. - m := lq.lq.mat.Rows - work := getFloats(3*m, false) - iwork := getInts(m, false) - l := lq.lq.asTriDense(m, blas.NonUnit, blas.Lower) - v := lapack64.Trcon(norm, l.mat, work, iwork) - lq.cond = 1 / v - putFloats(work) - putInts(iwork) -} - -// Factorize computes the LQ factorization of an m×n matrix a where n <= m. The LQ -// factorization always exists even if A is singular. -// -// The LQ decomposition is a factorization of the matrix A such that A = L * Q. -// The matrix Q is an orthonormal n×n matrix, and L is an m×n upper triangular matrix. -// L and Q can be extracted from the LTo and QTo methods. -func (lq *LQ) Factorize(a Matrix) { - lq.factorize(a, CondNorm) -} - -func (lq *LQ) factorize(a Matrix, norm lapack.MatrixNorm) { - m, n := a.Dims() - if m > n { - panic(ErrShape) - } - k := min(m, n) - if lq.lq == nil { - lq.lq = &Dense{} - } - lq.lq.Clone(a) - work := []float64{0} - lq.tau = make([]float64, k) - lapack64.Gelqf(lq.lq.mat, lq.tau, work, -1) - work = getFloats(int(work[0]), false) - lapack64.Gelqf(lq.lq.mat, lq.tau, work, len(work)) - putFloats(work) - lq.updateCond(norm) -} - -// isValid returns whether the receiver contains a factorization. -func (lq *LQ) isValid() bool { - return lq.lq != nil && !lq.lq.IsZero() -} - -// Cond returns the condition number for the factorized matrix. -// Cond will panic if the receiver does not contain a factorization. -func (lq *LQ) Cond() float64 { - if !lq.isValid() { - panic(badLQ) - } - return lq.cond -} - -// TODO(btracey): Add in the "Reduced" forms for extracting the m×m orthogonal -// and upper triangular matrices. - -// LTo extracts the m×n lower trapezoidal matrix from a LQ decomposition. -// If dst is nil, a new matrix is allocated. The resulting L matrix is returned. -// LTo will panic if the receiver does not contain a factorization. -func (lq *LQ) LTo(dst *Dense) *Dense { - if !lq.isValid() { - panic(badLQ) - } - - r, c := lq.lq.Dims() - if dst == nil { - dst = NewDense(r, c, nil) - } else { - dst.reuseAs(r, c) - } - - // Disguise the LQ as a lower triangular. - t := &TriDense{ - mat: blas64.Triangular{ - N: r, - Stride: lq.lq.mat.Stride, - Data: lq.lq.mat.Data, - Uplo: blas.Lower, - Diag: blas.NonUnit, - }, - cap: lq.lq.capCols, - } - dst.Copy(t) - - if r == c { - return dst - } - // Zero right of the triangular. - for i := 0; i < r; i++ { - zero(dst.mat.Data[i*dst.mat.Stride+r : i*dst.mat.Stride+c]) - } - - return dst -} - -// QTo extracts the n×n orthonormal matrix Q from an LQ decomposition. -// If dst is nil, a new matrix is allocated. The resulting Q matrix is returned. -// QTo will panic if the receiver does not contain a factorization. -func (lq *LQ) QTo(dst *Dense) *Dense { - if !lq.isValid() { - panic(badLQ) - } - - _, c := lq.lq.Dims() - if dst == nil { - dst = NewDense(c, c, nil) - } else { - dst.reuseAsZeroed(c, c) - } - q := dst.mat - - // Set Q = I. - ldq := q.Stride - for i := 0; i < c; i++ { - q.Data[i*ldq+i] = 1 - } - - // Construct Q from the elementary reflectors. - work := []float64{0} - lapack64.Ormlq(blas.Left, blas.NoTrans, lq.lq.mat, lq.tau, q, work, -1) - work = getFloats(int(work[0]), false) - lapack64.Ormlq(blas.Left, blas.NoTrans, lq.lq.mat, lq.tau, q, work, len(work)) - putFloats(work) - - return dst -} - -// SolveTo finds a minimum-norm solution to a system of linear equations defined -// by the matrices A and b, where A is an m×n matrix represented in its LQ factorized -// form. If A is singular or near-singular a Condition error is returned. -// See the documentation for Condition for more information. -// -// The minimization problem solved depends on the input parameters. -// If trans == false, find the minimum norm solution of A * X = B. -// If trans == true, find X such that ||A*X - B||_2 is minimized. -// The solution matrix, X, is stored in place into dst. -// SolveTo will panic if the receiver does not contain a factorization. -func (lq *LQ) SolveTo(dst *Dense, trans bool, b Matrix) error { - if !lq.isValid() { - panic(badLQ) - } - - r, c := lq.lq.Dims() - br, bc := b.Dims() - - // The LQ solve algorithm stores the result in-place into the right hand side. - // The storage for the answer must be large enough to hold both b and x. - // However, this method's receiver must be the size of x. Copy b, and then - // copy the result into x at the end. - if trans { - if c != br { - panic(ErrShape) - } - dst.reuseAs(r, bc) - } else { - if r != br { - panic(ErrShape) - } - dst.reuseAs(c, bc) - } - // Do not need to worry about overlap between x and b because w has its own - // independent storage. - w := getWorkspace(max(r, c), bc, false) - w.Copy(b) - t := lq.lq.asTriDense(lq.lq.mat.Rows, blas.NonUnit, blas.Lower).mat - if trans { - work := []float64{0} - lapack64.Ormlq(blas.Left, blas.NoTrans, lq.lq.mat, lq.tau, w.mat, work, -1) - work = getFloats(int(work[0]), false) - lapack64.Ormlq(blas.Left, blas.NoTrans, lq.lq.mat, lq.tau, w.mat, work, len(work)) - putFloats(work) - - ok := lapack64.Trtrs(blas.Trans, t, w.mat) - if !ok { - return Condition(math.Inf(1)) - } - } else { - ok := lapack64.Trtrs(blas.NoTrans, t, w.mat) - if !ok { - return Condition(math.Inf(1)) - } - for i := r; i < c; i++ { - zero(w.mat.Data[i*w.mat.Stride : i*w.mat.Stride+bc]) - } - work := []float64{0} - lapack64.Ormlq(blas.Left, blas.Trans, lq.lq.mat, lq.tau, w.mat, work, -1) - work = getFloats(int(work[0]), false) - lapack64.Ormlq(blas.Left, blas.Trans, lq.lq.mat, lq.tau, w.mat, work, len(work)) - putFloats(work) - } - // x was set above to be the correct size for the result. - dst.Copy(w) - putWorkspace(w) - if lq.cond > ConditionTolerance { - return Condition(lq.cond) - } - return nil -} - -// SolveVecTo finds a minimum-norm solution to a system of linear equations. -// See LQ.SolveTo for the full documentation. -// SolveToVec will panic if the receiver does not contain a factorization. -func (lq *LQ) SolveVecTo(dst *VecDense, trans bool, b Vector) error { - if !lq.isValid() { - panic(badLQ) - } - - r, c := lq.lq.Dims() - if _, bc := b.Dims(); bc != 1 { - panic(ErrShape) - } - - // The Solve implementation is non-trivial, so rather than duplicate the code, - // instead recast the VecDenses as Dense and call the matrix code. - bm := Matrix(b) - if rv, ok := b.(RawVectorer); ok { - bmat := rv.RawVector() - if dst != b { - dst.checkOverlap(bmat) - } - b := VecDense{mat: bmat} - bm = b.asDense() - } - if trans { - dst.reuseAs(r) - } else { - dst.reuseAs(c) - } - return lq.SolveTo(dst.asDense(), trans, bm) -} diff --git a/vendor/gonum.org/v1/gonum/mat/lu.go b/vendor/gonum.org/v1/gonum/mat/lu.go deleted file mode 100644 index e0437169be..0000000000 --- a/vendor/gonum.org/v1/gonum/mat/lu.go +++ /dev/null @@ -1,422 +0,0 @@ -// Copyright ©2013 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package mat - -import ( - "math" - - "gonum.org/v1/gonum/blas" - "gonum.org/v1/gonum/blas/blas64" - "gonum.org/v1/gonum/floats" - "gonum.org/v1/gonum/lapack" - "gonum.org/v1/gonum/lapack/lapack64" -) - -const ( - badSliceLength = "mat: improper slice length" - badLU = "mat: invalid LU factorization" -) - -// LU is a type for creating and using the LU factorization of a matrix. -type LU struct { - lu *Dense - pivot []int - cond float64 -} - -// updateCond updates the stored condition number of the matrix. anorm is the -// norm of the original matrix. If anorm is negative it will be estimated. -func (lu *LU) updateCond(anorm float64, norm lapack.MatrixNorm) { - n := lu.lu.mat.Cols - work := getFloats(4*n, false) - defer putFloats(work) - iwork := getInts(n, false) - defer putInts(iwork) - if anorm < 0 { - // This is an approximation. By the definition of a norm, - // |AB| <= |A| |B|. - // Since A = L*U, we get for the condition number κ that - // κ(A) := |A| |A^-1| = |L*U| |A^-1| <= |L| |U| |A^-1|, - // so this will overestimate the condition number somewhat. - // The norm of the original factorized matrix cannot be stored - // because of update possibilities. - u := lu.lu.asTriDense(n, blas.NonUnit, blas.Upper) - l := lu.lu.asTriDense(n, blas.Unit, blas.Lower) - unorm := lapack64.Lantr(norm, u.mat, work) - lnorm := lapack64.Lantr(norm, l.mat, work) - anorm = unorm * lnorm - } - v := lapack64.Gecon(norm, lu.lu.mat, anorm, work, iwork) - lu.cond = 1 / v -} - -// Factorize computes the LU factorization of the square matrix a and stores the -// result. The LU decomposition will complete regardless of the singularity of a. -// -// The LU factorization is computed with pivoting, and so really the decomposition -// is a PLU decomposition where P is a permutation matrix. The individual matrix -// factors can be extracted from the factorization using the Permutation method -// on Dense, and the LU LTo and UTo methods. -func (lu *LU) Factorize(a Matrix) { - lu.factorize(a, CondNorm) -} - -func (lu *LU) factorize(a Matrix, norm lapack.MatrixNorm) { - r, c := a.Dims() - if r != c { - panic(ErrSquare) - } - if lu.lu == nil { - lu.lu = NewDense(r, r, nil) - } else { - lu.lu.Reset() - lu.lu.reuseAs(r, r) - } - lu.lu.Copy(a) - if cap(lu.pivot) < r { - lu.pivot = make([]int, r) - } - lu.pivot = lu.pivot[:r] - work := getFloats(r, false) - anorm := lapack64.Lange(norm, lu.lu.mat, work) - putFloats(work) - lapack64.Getrf(lu.lu.mat, lu.pivot) - lu.updateCond(anorm, norm) -} - -// isValid returns whether the receiver contains a factorization. -func (lu *LU) isValid() bool { - return lu.lu != nil && !lu.lu.IsZero() -} - -// Cond returns the condition number for the factorized matrix. -// Cond will panic if the receiver does not contain a factorization. -func (lu *LU) Cond() float64 { - if !lu.isValid() { - panic(badLU) - } - return lu.cond -} - -// Reset resets the factorization so that it can be reused as the receiver of a -// dimensionally restricted operation. -func (lu *LU) Reset() { - if lu.lu != nil { - lu.lu.Reset() - } - lu.pivot = lu.pivot[:0] -} - -func (lu *LU) isZero() bool { - return len(lu.pivot) == 0 -} - -// Det returns the determinant of the matrix that has been factorized. In many -// expressions, using LogDet will be more numerically stable. -// Det will panic if the receiver does not contain a factorization. -func (lu *LU) Det() float64 { - det, sign := lu.LogDet() - return math.Exp(det) * sign -} - -// LogDet returns the log of the determinant and the sign of the determinant -// for the matrix that has been factorized. Numerical stability in product and -// division expressions is generally improved by working in log space. -// LogDet will panic if the receiver does not contain a factorization. -func (lu *LU) LogDet() (det float64, sign float64) { - if !lu.isValid() { - panic(badLU) - } - - _, n := lu.lu.Dims() - logDiag := getFloats(n, false) - defer putFloats(logDiag) - sign = 1.0 - for i := 0; i < n; i++ { - v := lu.lu.at(i, i) - if v < 0 { - sign *= -1 - } - if lu.pivot[i] != i { - sign *= -1 - } - logDiag[i] = math.Log(math.Abs(v)) - } - return floats.Sum(logDiag), sign -} - -// Pivot returns pivot indices that enable the construction of the permutation -// matrix P (see Dense.Permutation). If swaps == nil, then new memory will be -// allocated, otherwise the length of the input must be equal to the size of the -// factorized matrix. -// Pivot will panic if the receiver does not contain a factorization. -func (lu *LU) Pivot(swaps []int) []int { - if !lu.isValid() { - panic(badLU) - } - - _, n := lu.lu.Dims() - if swaps == nil { - swaps = make([]int, n) - } - if len(swaps) != n { - panic(badSliceLength) - } - // Perform the inverse of the row swaps in order to find the final - // row swap position. - for i := range swaps { - swaps[i] = i - } - for i := n - 1; i >= 0; i-- { - v := lu.pivot[i] - swaps[i], swaps[v] = swaps[v], swaps[i] - } - return swaps -} - -// RankOne updates an LU factorization as if a rank-one update had been applied to -// the original matrix A, storing the result into the receiver. That is, if in -// the original LU decomposition P * L * U = A, in the updated decomposition -// P * L * U = A + alpha * x * y^T. -// RankOne will panic if orig does not contain a factorization. -func (lu *LU) RankOne(orig *LU, alpha float64, x, y Vector) { - if !orig.isValid() { - panic(badLU) - } - - // RankOne uses algorithm a1 on page 28 of "Multiple-Rank Updates to Matrix - // Factorizations for Nonlinear Analysis and Circuit Design" by Linzhong Deng. - // http://web.stanford.edu/group/SOL/dissertations/Linzhong-Deng-thesis.pdf - _, n := orig.lu.Dims() - if r, c := x.Dims(); r != n || c != 1 { - panic(ErrShape) - } - if r, c := y.Dims(); r != n || c != 1 { - panic(ErrShape) - } - if orig != lu { - if lu.isZero() { - if cap(lu.pivot) < n { - lu.pivot = make([]int, n) - } - lu.pivot = lu.pivot[:n] - if lu.lu == nil { - lu.lu = NewDense(n, n, nil) - } else { - lu.lu.reuseAs(n, n) - } - } else if len(lu.pivot) != n { - panic(ErrShape) - } - copy(lu.pivot, orig.pivot) - lu.lu.Copy(orig.lu) - } - - xs := getFloats(n, false) - defer putFloats(xs) - ys := getFloats(n, false) - defer putFloats(ys) - for i := 0; i < n; i++ { - xs[i] = x.AtVec(i) - ys[i] = y.AtVec(i) - } - - // Adjust for the pivoting in the LU factorization - for i, v := range lu.pivot { - xs[i], xs[v] = xs[v], xs[i] - } - - lum := lu.lu.mat - omega := alpha - for j := 0; j < n; j++ { - ujj := lum.Data[j*lum.Stride+j] - ys[j] /= ujj - theta := 1 + xs[j]*ys[j]*omega - beta := omega * ys[j] / theta - gamma := omega * xs[j] - omega -= beta * gamma - lum.Data[j*lum.Stride+j] *= theta - for i := j + 1; i < n; i++ { - xs[i] -= lum.Data[i*lum.Stride+j] * xs[j] - tmp := ys[i] - ys[i] -= lum.Data[j*lum.Stride+i] * ys[j] - lum.Data[i*lum.Stride+j] += beta * xs[i] - lum.Data[j*lum.Stride+i] += gamma * tmp - } - } - lu.updateCond(-1, CondNorm) -} - -// LTo extracts the lower triangular matrix from an LU factorization. -// If dst is nil, a new matrix is allocated. The resulting L matrix is returned. -// LTo will panic if the receiver does not contain a factorization. -func (lu *LU) LTo(dst *TriDense) *TriDense { - if !lu.isValid() { - panic(badLU) - } - - _, n := lu.lu.Dims() - if dst == nil { - dst = NewTriDense(n, Lower, nil) - } else { - dst.reuseAs(n, Lower) - } - // Extract the lower triangular elements. - for i := 0; i < n; i++ { - for j := 0; j < i; j++ { - dst.mat.Data[i*dst.mat.Stride+j] = lu.lu.mat.Data[i*lu.lu.mat.Stride+j] - } - } - // Set ones on the diagonal. - for i := 0; i < n; i++ { - dst.mat.Data[i*dst.mat.Stride+i] = 1 - } - return dst -} - -// UTo extracts the upper triangular matrix from an LU factorization. -// If dst is nil, a new matrix is allocated. The resulting U matrix is returned. -// UTo will panic if the receiver does not contain a factorization. -func (lu *LU) UTo(dst *TriDense) *TriDense { - if !lu.isValid() { - panic(badLU) - } - - _, n := lu.lu.Dims() - if dst == nil { - dst = NewTriDense(n, Upper, nil) - } else { - dst.reuseAs(n, Upper) - } - // Extract the upper triangular elements. - for i := 0; i < n; i++ { - for j := i; j < n; j++ { - dst.mat.Data[i*dst.mat.Stride+j] = lu.lu.mat.Data[i*lu.lu.mat.Stride+j] - } - } - return dst -} - -// Permutation constructs an r×r permutation matrix with the given row swaps. -// A permutation matrix has exactly one element equal to one in each row and column -// and all other elements equal to zero. swaps[i] specifies the row with which -// i will be swapped, which is equivalent to the non-zero column of row i. -func (m *Dense) Permutation(r int, swaps []int) { - m.reuseAs(r, r) - for i := 0; i < r; i++ { - zero(m.mat.Data[i*m.mat.Stride : i*m.mat.Stride+r]) - v := swaps[i] - if v < 0 || v >= r { - panic(ErrRowAccess) - } - m.mat.Data[i*m.mat.Stride+v] = 1 - } -} - -// SolveTo solves a system of linear equations using the LU decomposition of a matrix. -// It computes -// A * X = B if trans == false -// A^T * X = B if trans == true -// In both cases, A is represented in LU factorized form, and the matrix X is -// stored into dst. -// -// If A is singular or near-singular a Condition error is returned. See -// the documentation for Condition for more information. -// SolveTo will panic if the receiver does not contain a factorization. -func (lu *LU) SolveTo(dst *Dense, trans bool, b Matrix) error { - if !lu.isValid() { - panic(badLU) - } - - _, n := lu.lu.Dims() - br, bc := b.Dims() - if br != n { - panic(ErrShape) - } - // TODO(btracey): Should test the condition number instead of testing that - // the determinant is exactly zero. - if lu.Det() == 0 { - return Condition(math.Inf(1)) - } - - dst.reuseAs(n, bc) - bU, _ := untranspose(b) - var restore func() - if dst == bU { - dst, restore = dst.isolatedWorkspace(bU) - defer restore() - } else if rm, ok := bU.(RawMatrixer); ok { - dst.checkOverlap(rm.RawMatrix()) - } - - dst.Copy(b) - t := blas.NoTrans - if trans { - t = blas.Trans - } - lapack64.Getrs(t, lu.lu.mat, dst.mat, lu.pivot) - if lu.cond > ConditionTolerance { - return Condition(lu.cond) - } - return nil -} - -// SolveVecTo solves a system of linear equations using the LU decomposition of a matrix. -// It computes -// A * x = b if trans == false -// A^T * x = b if trans == true -// In both cases, A is represented in LU factorized form, and the vector x is -// stored into dst. -// -// If A is singular or near-singular a Condition error is returned. See -// the documentation for Condition for more information. -// SolveVecTo will panic if the receiver does not contain a factorization. -func (lu *LU) SolveVecTo(dst *VecDense, trans bool, b Vector) error { - if !lu.isValid() { - panic(badLU) - } - - _, n := lu.lu.Dims() - if br, bc := b.Dims(); br != n || bc != 1 { - panic(ErrShape) - } - switch rv := b.(type) { - default: - dst.reuseAs(n) - return lu.SolveTo(dst.asDense(), trans, b) - case RawVectorer: - if dst != b { - dst.checkOverlap(rv.RawVector()) - } - // TODO(btracey): Should test the condition number instead of testing that - // the determinant is exactly zero. - if lu.Det() == 0 { - return Condition(math.Inf(1)) - } - - dst.reuseAs(n) - var restore func() - if dst == b { - dst, restore = dst.isolatedWorkspace(b) - defer restore() - } - dst.CopyVec(b) - vMat := blas64.General{ - Rows: n, - Cols: 1, - Stride: dst.mat.Inc, - Data: dst.mat.Data, - } - t := blas.NoTrans - if trans { - t = blas.Trans - } - lapack64.Getrs(t, lu.lu.mat, vMat, lu.pivot) - if lu.cond > ConditionTolerance { - return Condition(lu.cond) - } - return nil - } -} diff --git a/vendor/gonum.org/v1/gonum/mat/matrix.go b/vendor/gonum.org/v1/gonum/mat/matrix.go deleted file mode 100644 index 444d044579..0000000000 --- a/vendor/gonum.org/v1/gonum/mat/matrix.go +++ /dev/null @@ -1,946 +0,0 @@ -// Copyright ©2013 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package mat - -import ( - "math" - - "gonum.org/v1/gonum/blas" - "gonum.org/v1/gonum/blas/blas64" - "gonum.org/v1/gonum/floats" - "gonum.org/v1/gonum/lapack" - "gonum.org/v1/gonum/lapack/lapack64" -) - -// Matrix is the basic matrix interface type. -type Matrix interface { - // Dims returns the dimensions of a Matrix. - Dims() (r, c int) - - // At returns the value of a matrix element at row i, column j. - // It will panic if i or j are out of bounds for the matrix. - At(i, j int) float64 - - // T returns the transpose of the Matrix. Whether T returns a copy of the - // underlying data is implementation dependent. - // This method may be implemented using the Transpose type, which - // provides an implicit matrix transpose. - T() Matrix -} - -var ( - _ Matrix = Transpose{} - _ Untransposer = Transpose{} -) - -// Transpose is a type for performing an implicit matrix transpose. It implements -// the Matrix interface, returning values from the transpose of the matrix within. -type Transpose struct { - Matrix Matrix -} - -// At returns the value of the element at row i and column j of the transposed -// matrix, that is, row j and column i of the Matrix field. -func (t Transpose) At(i, j int) float64 { - return t.Matrix.At(j, i) -} - -// Dims returns the dimensions of the transposed matrix. The number of rows returned -// is the number of columns in the Matrix field, and the number of columns is -// the number of rows in the Matrix field. -func (t Transpose) Dims() (r, c int) { - c, r = t.Matrix.Dims() - return r, c -} - -// T performs an implicit transpose by returning the Matrix field. -func (t Transpose) T() Matrix { - return t.Matrix -} - -// Untranspose returns the Matrix field. -func (t Transpose) Untranspose() Matrix { - return t.Matrix -} - -// Untransposer is a type that can undo an implicit transpose. -type Untransposer interface { - // Note: This interface is needed to unify all of the Transpose types. In - // the mat methods, we need to test if the Matrix has been implicitly - // transposed. If this is checked by testing for the specific Transpose type - // then the behavior will be different if the user uses T() or TTri() for a - // triangular matrix. - - // Untranspose returns the underlying Matrix stored for the implicit transpose. - Untranspose() Matrix -} - -// UntransposeBander is a type that can undo an implicit band transpose. -type UntransposeBander interface { - // Untranspose returns the underlying Banded stored for the implicit transpose. - UntransposeBand() Banded -} - -// UntransposeTrier is a type that can undo an implicit triangular transpose. -type UntransposeTrier interface { - // Untranspose returns the underlying Triangular stored for the implicit transpose. - UntransposeTri() Triangular -} - -// UntransposeTriBander is a type that can undo an implicit triangular banded -// transpose. -type UntransposeTriBander interface { - // Untranspose returns the underlying Triangular stored for the implicit transpose. - UntransposeTriBand() TriBanded -} - -// Mutable is a matrix interface type that allows elements to be altered. -type Mutable interface { - // Set alters the matrix element at row i, column j to v. - // It will panic if i or j are out of bounds for the matrix. - Set(i, j int, v float64) - - Matrix -} - -// A RowViewer can return a Vector reflecting a row that is backed by the matrix -// data. The Vector returned will have length equal to the number of columns. -type RowViewer interface { - RowView(i int) Vector -} - -// A RawRowViewer can return a slice of float64 reflecting a row that is backed by the matrix -// data. -type RawRowViewer interface { - RawRowView(i int) []float64 -} - -// A ColViewer can return a Vector reflecting a column that is backed by the matrix -// data. The Vector returned will have length equal to the number of rows. -type ColViewer interface { - ColView(j int) Vector -} - -// A RawColViewer can return a slice of float64 reflecting a column that is backed by the matrix -// data. -type RawColViewer interface { - RawColView(j int) []float64 -} - -// A Cloner can make a copy of a into the receiver, overwriting the previous value of the -// receiver. The clone operation does not make any restriction on shape and will not cause -// shadowing. -type Cloner interface { - Clone(a Matrix) -} - -// A Reseter can reset the matrix so that it can be reused as the receiver of a dimensionally -// restricted operation. This is commonly used when the matrix is being used as a workspace -// or temporary matrix. -// -// If the matrix is a view, using the reset matrix may result in data corruption in elements -// outside the view. -type Reseter interface { - Reset() -} - -// A Copier can make a copy of elements of a into the receiver. The submatrix copied -// starts at row and column 0 and has dimensions equal to the minimum dimensions of -// the two matrices. The number of row and columns copied is returned. -// Copy will copy from a source that aliases the receiver unless the source is transposed; -// an aliasing transpose copy will panic with the exception for a special case when -// the source data has a unitary increment or stride. -type Copier interface { - Copy(a Matrix) (r, c int) -} - -// A Grower can grow the size of the represented matrix by the given number of rows and columns. -// Growing beyond the size given by the Caps method will result in the allocation of a new -// matrix and copying of the elements. If Grow is called with negative increments it will -// panic with ErrIndexOutOfRange. -type Grower interface { - Caps() (r, c int) - Grow(r, c int) Matrix -} - -// A BandWidther represents a banded matrix and can return the left and right half-bandwidths, k1 and -// k2. -type BandWidther interface { - BandWidth() (k1, k2 int) -} - -// A RawMatrixSetter can set the underlying blas64.General used by the receiver. There is no restriction -// on the shape of the receiver. Changes to the receiver's elements will be reflected in the blas64.General.Data. -type RawMatrixSetter interface { - SetRawMatrix(a blas64.General) -} - -// A RawMatrixer can return a blas64.General representation of the receiver. Changes to the blas64.General.Data -// slice will be reflected in the original matrix, changes to the Rows, Cols and Stride fields will not. -type RawMatrixer interface { - RawMatrix() blas64.General -} - -// A RawVectorer can return a blas64.Vector representation of the receiver. Changes to the blas64.Vector.Data -// slice will be reflected in the original matrix, changes to the Inc field will not. -type RawVectorer interface { - RawVector() blas64.Vector -} - -// A NonZeroDoer can call a function for each non-zero element of the receiver. -// The parameters of the function are the element indices and its value. -type NonZeroDoer interface { - DoNonZero(func(i, j int, v float64)) -} - -// A RowNonZeroDoer can call a function for each non-zero element of a row of the receiver. -// The parameters of the function are the element indices and its value. -type RowNonZeroDoer interface { - DoRowNonZero(i int, fn func(i, j int, v float64)) -} - -// A ColNonZeroDoer can call a function for each non-zero element of a column of the receiver. -// The parameters of the function are the element indices and its value. -type ColNonZeroDoer interface { - DoColNonZero(j int, fn func(i, j int, v float64)) -} - -// untranspose untransposes a matrix if applicable. If a is an Untransposer, then -// untranspose returns the underlying matrix and true. If it is not, then it returns -// the input matrix and false. -func untranspose(a Matrix) (Matrix, bool) { - if ut, ok := a.(Untransposer); ok { - return ut.Untranspose(), true - } - return a, false -} - -// untransposeExtract returns an untransposed matrix in a built-in matrix type. -// -// The untransposed matrix is returned unaltered if it is a built-in matrix type. -// Otherwise, if it implements a Raw method, an appropriate built-in type value -// is returned holding the raw matrix value of the input. If neither of these -// is possible, the untransposed matrix is returned. -func untransposeExtract(a Matrix) (Matrix, bool) { - ut, trans := untranspose(a) - switch m := ut.(type) { - case *DiagDense, *SymBandDense, *TriBandDense, *BandDense, *TriDense, *SymDense, *Dense: - return m, trans - // TODO(btracey): Add here if we ever have an equivalent of RawDiagDense. - case RawSymBander: - rsb := m.RawSymBand() - if rsb.Uplo != blas.Upper { - return ut, trans - } - var sb SymBandDense - sb.SetRawSymBand(rsb) - return &sb, trans - case RawTriBander: - rtb := m.RawTriBand() - if rtb.Diag == blas.Unit { - return ut, trans - } - var tb TriBandDense - tb.SetRawTriBand(rtb) - return &tb, trans - case RawBander: - var b BandDense - b.SetRawBand(m.RawBand()) - return &b, trans - case RawTriangular: - rt := m.RawTriangular() - if rt.Diag == blas.Unit { - return ut, trans - } - var t TriDense - t.SetRawTriangular(rt) - return &t, trans - case RawSymmetricer: - rs := m.RawSymmetric() - if rs.Uplo != blas.Upper { - return ut, trans - } - var s SymDense - s.SetRawSymmetric(rs) - return &s, trans - case RawMatrixer: - var d Dense - d.SetRawMatrix(m.RawMatrix()) - return &d, trans - default: - return ut, trans - } -} - -// TODO(btracey): Consider adding CopyCol/CopyRow if the behavior seems useful. -// TODO(btracey): Add in fast paths to Row/Col for the other concrete types -// (TriDense, etc.) as well as relevant interfaces (RowColer, RawRowViewer, etc.) - -// Col copies the elements in the jth column of the matrix into the slice dst. -// The length of the provided slice must equal the number of rows, unless the -// slice is nil in which case a new slice is first allocated. -func Col(dst []float64, j int, a Matrix) []float64 { - r, c := a.Dims() - if j < 0 || j >= c { - panic(ErrColAccess) - } - if dst == nil { - dst = make([]float64, r) - } else { - if len(dst) != r { - panic(ErrColLength) - } - } - aU, aTrans := untranspose(a) - if rm, ok := aU.(RawMatrixer); ok { - m := rm.RawMatrix() - if aTrans { - copy(dst, m.Data[j*m.Stride:j*m.Stride+m.Cols]) - return dst - } - blas64.Copy(blas64.Vector{N: r, Inc: m.Stride, Data: m.Data[j:]}, - blas64.Vector{N: r, Inc: 1, Data: dst}, - ) - return dst - } - for i := 0; i < r; i++ { - dst[i] = a.At(i, j) - } - return dst -} - -// Row copies the elements in the ith row of the matrix into the slice dst. -// The length of the provided slice must equal the number of columns, unless the -// slice is nil in which case a new slice is first allocated. -func Row(dst []float64, i int, a Matrix) []float64 { - r, c := a.Dims() - if i < 0 || i >= r { - panic(ErrColAccess) - } - if dst == nil { - dst = make([]float64, c) - } else { - if len(dst) != c { - panic(ErrRowLength) - } - } - aU, aTrans := untranspose(a) - if rm, ok := aU.(RawMatrixer); ok { - m := rm.RawMatrix() - if aTrans { - blas64.Copy(blas64.Vector{N: c, Inc: m.Stride, Data: m.Data[i:]}, - blas64.Vector{N: c, Inc: 1, Data: dst}, - ) - return dst - } - copy(dst, m.Data[i*m.Stride:i*m.Stride+m.Cols]) - return dst - } - for j := 0; j < c; j++ { - dst[j] = a.At(i, j) - } - return dst -} - -// Cond returns the condition number of the given matrix under the given norm. -// The condition number must be based on the 1-norm, 2-norm or ∞-norm. -// Cond will panic with matrix.ErrShape if the matrix has zero size. -// -// BUG(btracey): The computation of the 1-norm and ∞-norm for non-square matrices -// is innacurate, although is typically the right order of magnitude. See -// https://github.com/xianyi/OpenBLAS/issues/636. While the value returned will -// change with the resolution of this bug, the result from Cond will match the -// condition number used internally. -func Cond(a Matrix, norm float64) float64 { - m, n := a.Dims() - if m == 0 || n == 0 { - panic(ErrShape) - } - var lnorm lapack.MatrixNorm - switch norm { - default: - panic("mat: bad norm value") - case 1: - lnorm = lapack.MaxColumnSum - case 2: - var svd SVD - ok := svd.Factorize(a, SVDNone) - if !ok { - return math.Inf(1) - } - return svd.Cond() - case math.Inf(1): - lnorm = lapack.MaxRowSum - } - - if m == n { - // Use the LU decomposition to compute the condition number. - var lu LU - lu.factorize(a, lnorm) - return lu.Cond() - } - if m > n { - // Use the QR factorization to compute the condition number. - var qr QR - qr.factorize(a, lnorm) - return qr.Cond() - } - // Use the LQ factorization to compute the condition number. - var lq LQ - lq.factorize(a, lnorm) - return lq.Cond() -} - -// Det returns the determinant of the matrix a. In many expressions using LogDet -// will be more numerically stable. -func Det(a Matrix) float64 { - det, sign := LogDet(a) - return math.Exp(det) * sign -} - -// Dot returns the sum of the element-wise product of a and b. -// Dot panics if the matrix sizes are unequal. -func Dot(a, b Vector) float64 { - la := a.Len() - lb := b.Len() - if la != lb { - panic(ErrShape) - } - if arv, ok := a.(RawVectorer); ok { - if brv, ok := b.(RawVectorer); ok { - return blas64.Dot(arv.RawVector(), brv.RawVector()) - } - } - var sum float64 - for i := 0; i < la; i++ { - sum += a.At(i, 0) * b.At(i, 0) - } - return sum -} - -// Equal returns whether the matrices a and b have the same size -// and are element-wise equal. -func Equal(a, b Matrix) bool { - ar, ac := a.Dims() - br, bc := b.Dims() - if ar != br || ac != bc { - return false - } - aU, aTrans := untranspose(a) - bU, bTrans := untranspose(b) - if rma, ok := aU.(RawMatrixer); ok { - if rmb, ok := bU.(RawMatrixer); ok { - ra := rma.RawMatrix() - rb := rmb.RawMatrix() - if aTrans == bTrans { - for i := 0; i < ra.Rows; i++ { - for j := 0; j < ra.Cols; j++ { - if ra.Data[i*ra.Stride+j] != rb.Data[i*rb.Stride+j] { - return false - } - } - } - return true - } - for i := 0; i < ra.Rows; i++ { - for j := 0; j < ra.Cols; j++ { - if ra.Data[i*ra.Stride+j] != rb.Data[j*rb.Stride+i] { - return false - } - } - } - return true - } - } - if rma, ok := aU.(RawSymmetricer); ok { - if rmb, ok := bU.(RawSymmetricer); ok { - ra := rma.RawSymmetric() - rb := rmb.RawSymmetric() - // Symmetric matrices are always upper and equal to their transpose. - for i := 0; i < ra.N; i++ { - for j := i; j < ra.N; j++ { - if ra.Data[i*ra.Stride+j] != rb.Data[i*rb.Stride+j] { - return false - } - } - } - return true - } - } - if ra, ok := aU.(*VecDense); ok { - if rb, ok := bU.(*VecDense); ok { - // If the raw vectors are the same length they must either both be - // transposed or both not transposed (or have length 1). - for i := 0; i < ra.mat.N; i++ { - if ra.mat.Data[i*ra.mat.Inc] != rb.mat.Data[i*rb.mat.Inc] { - return false - } - } - return true - } - } - for i := 0; i < ar; i++ { - for j := 0; j < ac; j++ { - if a.At(i, j) != b.At(i, j) { - return false - } - } - } - return true -} - -// EqualApprox returns whether the matrices a and b have the same size and contain all equal -// elements with tolerance for element-wise equality specified by epsilon. Matrices -// with non-equal shapes are not equal. -func EqualApprox(a, b Matrix, epsilon float64) bool { - ar, ac := a.Dims() - br, bc := b.Dims() - if ar != br || ac != bc { - return false - } - aU, aTrans := untranspose(a) - bU, bTrans := untranspose(b) - if rma, ok := aU.(RawMatrixer); ok { - if rmb, ok := bU.(RawMatrixer); ok { - ra := rma.RawMatrix() - rb := rmb.RawMatrix() - if aTrans == bTrans { - for i := 0; i < ra.Rows; i++ { - for j := 0; j < ra.Cols; j++ { - if !floats.EqualWithinAbsOrRel(ra.Data[i*ra.Stride+j], rb.Data[i*rb.Stride+j], epsilon, epsilon) { - return false - } - } - } - return true - } - for i := 0; i < ra.Rows; i++ { - for j := 0; j < ra.Cols; j++ { - if !floats.EqualWithinAbsOrRel(ra.Data[i*ra.Stride+j], rb.Data[j*rb.Stride+i], epsilon, epsilon) { - return false - } - } - } - return true - } - } - if rma, ok := aU.(RawSymmetricer); ok { - if rmb, ok := bU.(RawSymmetricer); ok { - ra := rma.RawSymmetric() - rb := rmb.RawSymmetric() - // Symmetric matrices are always upper and equal to their transpose. - for i := 0; i < ra.N; i++ { - for j := i; j < ra.N; j++ { - if !floats.EqualWithinAbsOrRel(ra.Data[i*ra.Stride+j], rb.Data[i*rb.Stride+j], epsilon, epsilon) { - return false - } - } - } - return true - } - } - if ra, ok := aU.(*VecDense); ok { - if rb, ok := bU.(*VecDense); ok { - // If the raw vectors are the same length they must either both be - // transposed or both not transposed (or have length 1). - for i := 0; i < ra.mat.N; i++ { - if !floats.EqualWithinAbsOrRel(ra.mat.Data[i*ra.mat.Inc], rb.mat.Data[i*rb.mat.Inc], epsilon, epsilon) { - return false - } - } - return true - } - } - for i := 0; i < ar; i++ { - for j := 0; j < ac; j++ { - if !floats.EqualWithinAbsOrRel(a.At(i, j), b.At(i, j), epsilon, epsilon) { - return false - } - } - } - return true -} - -// LogDet returns the log of the determinant and the sign of the determinant -// for the matrix that has been factorized. Numerical stability in product and -// division expressions is generally improved by working in log space. -func LogDet(a Matrix) (det float64, sign float64) { - // TODO(btracey): Add specialized routines for TriDense, etc. - var lu LU - lu.Factorize(a) - return lu.LogDet() -} - -// Max returns the largest element value of the matrix A. -// Max will panic with matrix.ErrShape if the matrix has zero size. -func Max(a Matrix) float64 { - r, c := a.Dims() - if r == 0 || c == 0 { - panic(ErrShape) - } - // Max(A) = Max(A^T) - aU, _ := untranspose(a) - switch m := aU.(type) { - case RawMatrixer: - rm := m.RawMatrix() - max := math.Inf(-1) - for i := 0; i < rm.Rows; i++ { - for _, v := range rm.Data[i*rm.Stride : i*rm.Stride+rm.Cols] { - if v > max { - max = v - } - } - } - return max - case RawTriangular: - rm := m.RawTriangular() - // The max of a triangular is at least 0 unless the size is 1. - if rm.N == 1 { - return rm.Data[0] - } - max := 0.0 - if rm.Uplo == blas.Upper { - for i := 0; i < rm.N; i++ { - for _, v := range rm.Data[i*rm.Stride+i : i*rm.Stride+rm.N] { - if v > max { - max = v - } - } - } - return max - } - for i := 0; i < rm.N; i++ { - for _, v := range rm.Data[i*rm.Stride : i*rm.Stride+i+1] { - if v > max { - max = v - } - } - } - return max - case RawSymmetricer: - rm := m.RawSymmetric() - if rm.Uplo != blas.Upper { - panic(badSymTriangle) - } - max := math.Inf(-1) - for i := 0; i < rm.N; i++ { - for _, v := range rm.Data[i*rm.Stride+i : i*rm.Stride+rm.N] { - if v > max { - max = v - } - } - } - return max - default: - r, c := aU.Dims() - max := math.Inf(-1) - for i := 0; i < r; i++ { - for j := 0; j < c; j++ { - v := aU.At(i, j) - if v > max { - max = v - } - } - } - return max - } -} - -// Min returns the smallest element value of the matrix A. -// Min will panic with matrix.ErrShape if the matrix has zero size. -func Min(a Matrix) float64 { - r, c := a.Dims() - if r == 0 || c == 0 { - panic(ErrShape) - } - // Min(A) = Min(A^T) - aU, _ := untranspose(a) - switch m := aU.(type) { - case RawMatrixer: - rm := m.RawMatrix() - min := math.Inf(1) - for i := 0; i < rm.Rows; i++ { - for _, v := range rm.Data[i*rm.Stride : i*rm.Stride+rm.Cols] { - if v < min { - min = v - } - } - } - return min - case RawTriangular: - rm := m.RawTriangular() - // The min of a triangular is at most 0 unless the size is 1. - if rm.N == 1 { - return rm.Data[0] - } - min := 0.0 - if rm.Uplo == blas.Upper { - for i := 0; i < rm.N; i++ { - for _, v := range rm.Data[i*rm.Stride+i : i*rm.Stride+rm.N] { - if v < min { - min = v - } - } - } - return min - } - for i := 0; i < rm.N; i++ { - for _, v := range rm.Data[i*rm.Stride : i*rm.Stride+i+1] { - if v < min { - min = v - } - } - } - return min - case RawSymmetricer: - rm := m.RawSymmetric() - if rm.Uplo != blas.Upper { - panic(badSymTriangle) - } - min := math.Inf(1) - for i := 0; i < rm.N; i++ { - for _, v := range rm.Data[i*rm.Stride+i : i*rm.Stride+rm.N] { - if v < min { - min = v - } - } - } - return min - default: - r, c := aU.Dims() - min := math.Inf(1) - for i := 0; i < r; i++ { - for j := 0; j < c; j++ { - v := aU.At(i, j) - if v < min { - min = v - } - } - } - return min - } -} - -// Norm returns the specified (induced) norm of the matrix a. See -// https://en.wikipedia.org/wiki/Matrix_norm for the definition of an induced norm. -// -// Valid norms are: -// 1 - The maximum absolute column sum -// 2 - Frobenius norm, the square root of the sum of the squares of the elements. -// Inf - The maximum absolute row sum. -// Norm will panic with ErrNormOrder if an illegal norm order is specified and -// with matrix.ErrShape if the matrix has zero size. -func Norm(a Matrix, norm float64) float64 { - r, c := a.Dims() - if r == 0 || c == 0 { - panic(ErrShape) - } - aU, aTrans := untranspose(a) - var work []float64 - switch rma := aU.(type) { - case RawMatrixer: - rm := rma.RawMatrix() - n := normLapack(norm, aTrans) - if n == lapack.MaxColumnSum { - work = getFloats(rm.Cols, false) - defer putFloats(work) - } - return lapack64.Lange(n, rm, work) - case RawTriangular: - rm := rma.RawTriangular() - n := normLapack(norm, aTrans) - if n == lapack.MaxRowSum || n == lapack.MaxColumnSum { - work = getFloats(rm.N, false) - defer putFloats(work) - } - return lapack64.Lantr(n, rm, work) - case RawSymmetricer: - rm := rma.RawSymmetric() - n := normLapack(norm, aTrans) - if n == lapack.MaxRowSum || n == lapack.MaxColumnSum { - work = getFloats(rm.N, false) - defer putFloats(work) - } - return lapack64.Lansy(n, rm, work) - case *VecDense: - rv := rma.RawVector() - switch norm { - default: - panic("unreachable") - case 1: - if aTrans { - imax := blas64.Iamax(rv) - return math.Abs(rma.At(imax, 0)) - } - return blas64.Asum(rv) - case 2: - return blas64.Nrm2(rv) - case math.Inf(1): - if aTrans { - return blas64.Asum(rv) - } - imax := blas64.Iamax(rv) - return math.Abs(rma.At(imax, 0)) - } - } - switch norm { - default: - panic("unreachable") - case 1: - var max float64 - for j := 0; j < c; j++ { - var sum float64 - for i := 0; i < r; i++ { - sum += math.Abs(a.At(i, j)) - } - if sum > max { - max = sum - } - } - return max - case 2: - var sum float64 - for i := 0; i < r; i++ { - for j := 0; j < c; j++ { - v := a.At(i, j) - sum += v * v - } - } - return math.Sqrt(sum) - case math.Inf(1): - var max float64 - for i := 0; i < r; i++ { - var sum float64 - for j := 0; j < c; j++ { - sum += math.Abs(a.At(i, j)) - } - if sum > max { - max = sum - } - } - return max - } -} - -// normLapack converts the float64 norm input in Norm to a lapack.MatrixNorm. -func normLapack(norm float64, aTrans bool) lapack.MatrixNorm { - switch norm { - case 1: - n := lapack.MaxColumnSum - if aTrans { - n = lapack.MaxRowSum - } - return n - case 2: - return lapack.Frobenius - case math.Inf(1): - n := lapack.MaxRowSum - if aTrans { - n = lapack.MaxColumnSum - } - return n - default: - panic(ErrNormOrder) - } -} - -// Sum returns the sum of the elements of the matrix. -func Sum(a Matrix) float64 { - // TODO(btracey): Add a fast path for the other supported matrix types. - - r, c := a.Dims() - var sum float64 - aU, _ := untranspose(a) - if rma, ok := aU.(RawMatrixer); ok { - rm := rma.RawMatrix() - for i := 0; i < rm.Rows; i++ { - for _, v := range rm.Data[i*rm.Stride : i*rm.Stride+rm.Cols] { - sum += v - } - } - return sum - } - for i := 0; i < r; i++ { - for j := 0; j < c; j++ { - sum += a.At(i, j) - } - } - return sum -} - -// A Tracer can compute the trace of the matrix. Trace must panic if the -// matrix is not square. -type Tracer interface { - Trace() float64 -} - -// Trace returns the trace of the matrix. Trace will panic if the -// matrix is not square. -func Trace(a Matrix) float64 { - m, _ := untransposeExtract(a) - if t, ok := m.(Tracer); ok { - return t.Trace() - } - r, c := a.Dims() - if r != c { - panic(ErrSquare) - } - var v float64 - for i := 0; i < r; i++ { - v += a.At(i, i) - } - return v -} - -func min(a, b int) int { - if a < b { - return a - } - return b -} - -func max(a, b int) int { - if a > b { - return a - } - return b -} - -// use returns a float64 slice with l elements, using f if it -// has the necessary capacity, otherwise creating a new slice. -func use(f []float64, l int) []float64 { - if l <= cap(f) { - return f[:l] - } - return make([]float64, l) -} - -// useZeroed returns a float64 slice with l elements, using f if it -// has the necessary capacity, otherwise creating a new slice. The -// elements of the returned slice are guaranteed to be zero. -func useZeroed(f []float64, l int) []float64 { - if l <= cap(f) { - f = f[:l] - zero(f) - return f - } - return make([]float64, l) -} - -// zero zeros the given slice's elements. -func zero(f []float64) { - for i := range f { - f[i] = 0 - } -} - -// useInt returns an int slice with l elements, using i if it -// has the necessary capacity, otherwise creating a new slice. -func useInt(i []int, l int) []int { - if l <= cap(i) { - return i[:l] - } - return make([]int, l) -} diff --git a/vendor/gonum.org/v1/gonum/mat/offset.go b/vendor/gonum.org/v1/gonum/mat/offset.go deleted file mode 100644 index af2c03b64a..0000000000 --- a/vendor/gonum.org/v1/gonum/mat/offset.go +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright ©2015 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build !appengine,!safe - -package mat - -import "unsafe" - -// offset returns the number of float64 values b[0] is after a[0]. -func offset(a, b []float64) int { - if &a[0] == &b[0] { - return 0 - } - // This expression must be atomic with respect to GC moves. - // At this stage this is true, because the GC does not - // move. See https://golang.org/issue/12445. - return int(uintptr(unsafe.Pointer(&b[0]))-uintptr(unsafe.Pointer(&a[0]))) / int(unsafe.Sizeof(float64(0))) -} diff --git a/vendor/gonum.org/v1/gonum/mat/offset_appengine.go b/vendor/gonum.org/v1/gonum/mat/offset_appengine.go deleted file mode 100644 index df617478cf..0000000000 --- a/vendor/gonum.org/v1/gonum/mat/offset_appengine.go +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright ©2015 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build appengine safe - -package mat - -import "reflect" - -var sizeOfFloat64 = int(reflect.TypeOf(float64(0)).Size()) - -// offset returns the number of float64 values b[0] is after a[0]. -func offset(a, b []float64) int { - va0 := reflect.ValueOf(a).Index(0) - vb0 := reflect.ValueOf(b).Index(0) - if va0.Addr() == vb0.Addr() { - return 0 - } - // This expression must be atomic with respect to GC moves. - // At this stage this is true, because the GC does not - // move. See https://golang.org/issue/12445. - return int(vb0.UnsafeAddr()-va0.UnsafeAddr()) / sizeOfFloat64 -} diff --git a/vendor/gonum.org/v1/gonum/mat/pool.go b/vendor/gonum.org/v1/gonum/mat/pool.go deleted file mode 100644 index 25ca29f18f..0000000000 --- a/vendor/gonum.org/v1/gonum/mat/pool.go +++ /dev/null @@ -1,236 +0,0 @@ -// Copyright ©2014 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package mat - -import ( - "sync" - - "gonum.org/v1/gonum/blas" - "gonum.org/v1/gonum/blas/blas64" -) - -var tab64 = [64]byte{ - 0x3f, 0x00, 0x3a, 0x01, 0x3b, 0x2f, 0x35, 0x02, - 0x3c, 0x27, 0x30, 0x1b, 0x36, 0x21, 0x2a, 0x03, - 0x3d, 0x33, 0x25, 0x28, 0x31, 0x12, 0x1c, 0x14, - 0x37, 0x1e, 0x22, 0x0b, 0x2b, 0x0e, 0x16, 0x04, - 0x3e, 0x39, 0x2e, 0x34, 0x26, 0x1a, 0x20, 0x29, - 0x32, 0x24, 0x11, 0x13, 0x1d, 0x0a, 0x0d, 0x15, - 0x38, 0x2d, 0x19, 0x1f, 0x23, 0x10, 0x09, 0x0c, - 0x2c, 0x18, 0x0f, 0x08, 0x17, 0x07, 0x06, 0x05, -} - -// bits returns the ceiling of base 2 log of v. -// Approach based on http://stackoverflow.com/a/11398748. -func bits(v uint64) byte { - if v == 0 { - return 0 - } - v <<= 2 - v-- - v |= v >> 1 - v |= v >> 2 - v |= v >> 4 - v |= v >> 8 - v |= v >> 16 - v |= v >> 32 - return tab64[((v-(v>>1))*0x07EDD5E59A4E28C2)>>58] - 1 -} - -var ( - // pool contains size stratified workspace Dense pools. - // Each pool element i returns sized matrices with a data - // slice capped at 1< 2. - if !m.IsZero() { - if fr != r { - panic(ErrShape) - } - if _, lc := factors[len(factors)-1].Dims(); lc != c { - panic(ErrShape) - } - } - - dims := make([]int, len(factors)+1) - dims[0] = r - dims[len(dims)-1] = c - pc := fc - for i, f := range factors[1:] { - cr, cc := f.Dims() - dims[i+1] = cr - if pc != cr { - panic(ErrShape) - } - pc = cc - } - - return &multiplier{ - factors: factors, - dims: dims, - table: newTable(len(factors)), - } -} - -// optimize determines an optimal matrix multiply operation order. -func (p *multiplier) optimize() { - if debugProductWalk { - fmt.Printf("chain dims: %v\n", p.dims) - } - const maxInt = int(^uint(0) >> 1) - for f := 1; f < len(p.factors); f++ { - for i := 0; i < len(p.factors)-f; i++ { - j := i + f - p.table.set(i, j, entry{cost: maxInt}) - for k := i; k < j; k++ { - cost := p.table.at(i, k).cost + p.table.at(k+1, j).cost + p.dims[i]*p.dims[k+1]*p.dims[j+1] - if cost < p.table.at(i, j).cost { - p.table.set(i, j, entry{cost: cost, k: k}) - } - } - } - } -} - -// multiply walks the optimal operation tree found by optimize, -// leaving the final result in the stack. It returns the -// product, which may be copied but should be returned to -// the workspace pool. -func (p *multiplier) multiply() *Dense { - result, _ := p.multiplySubchain(0, len(p.factors)-1) - if debugProductWalk { - r, c := result.Dims() - fmt.Printf("\tpop result (%d×%d) cost=%d\n", r, c, p.table.at(0, len(p.factors)-1).cost) - } - return result.(*Dense) -} - -func (p *multiplier) multiplySubchain(i, j int) (m Matrix, intermediate bool) { - if i == j { - return p.factors[i], false - } - - a, aTmp := p.multiplySubchain(i, p.table.at(i, j).k) - b, bTmp := p.multiplySubchain(p.table.at(i, j).k+1, j) - - ar, ac := a.Dims() - br, bc := b.Dims() - if ac != br { - // Panic with a string since this - // is not a user-facing panic. - panic(ErrShape.Error()) - } - - if debugProductWalk { - fmt.Printf("\tpush f[%d] (%d×%d)%s * f[%d] (%d×%d)%s\n", - i, ar, ac, result(aTmp), j, br, bc, result(bTmp)) - } - - r := getWorkspace(ar, bc, false) - r.Mul(a, b) - if aTmp { - putWorkspace(a.(*Dense)) - } - if bTmp { - putWorkspace(b.(*Dense)) - } - return r, true -} - -type entry struct { - k int // is the chain subdivision index. - cost int // cost is the cost of the operation. -} - -// table is a row major n×n dynamic programming table. -type table struct { - n int - entries []entry -} - -func newTable(n int) table { - return table{n: n, entries: make([]entry, n*n)} -} - -func (t table) at(i, j int) entry { return t.entries[i*t.n+j] } -func (t table) set(i, j int, e entry) { t.entries[i*t.n+j] = e } - -type result bool - -func (r result) String() string { - if r { - return " (popped result)" - } - return "" -} diff --git a/vendor/gonum.org/v1/gonum/mat/qr.go b/vendor/gonum.org/v1/gonum/mat/qr.go deleted file mode 100644 index bf38ee4d6d..0000000000 --- a/vendor/gonum.org/v1/gonum/mat/qr.go +++ /dev/null @@ -1,260 +0,0 @@ -// Copyright ©2013 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package mat - -import ( - "math" - - "gonum.org/v1/gonum/blas" - "gonum.org/v1/gonum/blas/blas64" - "gonum.org/v1/gonum/lapack" - "gonum.org/v1/gonum/lapack/lapack64" -) - -const badQR = "mat: invalid QR factorization" - -// QR is a type for creating and using the QR factorization of a matrix. -type QR struct { - qr *Dense - tau []float64 - cond float64 -} - -func (qr *QR) updateCond(norm lapack.MatrixNorm) { - // Since A = Q*R, and Q is orthogonal, we get for the condition number κ - // κ(A) := |A| |A^-1| = |Q*R| |(Q*R)^-1| = |R| |R^-1 * Q^T| - // = |R| |R^-1| = κ(R), - // where we used that fact that Q^-1 = Q^T. However, this assumes that - // the matrix norm is invariant under orthogonal transformations which - // is not the case for CondNorm. Hopefully the error is negligible: κ - // is only a qualitative measure anyway. - n := qr.qr.mat.Cols - work := getFloats(3*n, false) - iwork := getInts(n, false) - r := qr.qr.asTriDense(n, blas.NonUnit, blas.Upper) - v := lapack64.Trcon(norm, r.mat, work, iwork) - putFloats(work) - putInts(iwork) - qr.cond = 1 / v -} - -// Factorize computes the QR factorization of an m×n matrix a where m >= n. The QR -// factorization always exists even if A is singular. -// -// The QR decomposition is a factorization of the matrix A such that A = Q * R. -// The matrix Q is an orthonormal m×m matrix, and R is an m×n upper triangular matrix. -// Q and R can be extracted using the QTo and RTo methods. -func (qr *QR) Factorize(a Matrix) { - qr.factorize(a, CondNorm) -} - -func (qr *QR) factorize(a Matrix, norm lapack.MatrixNorm) { - m, n := a.Dims() - if m < n { - panic(ErrShape) - } - k := min(m, n) - if qr.qr == nil { - qr.qr = &Dense{} - } - qr.qr.Clone(a) - work := []float64{0} - qr.tau = make([]float64, k) - lapack64.Geqrf(qr.qr.mat, qr.tau, work, -1) - - work = getFloats(int(work[0]), false) - lapack64.Geqrf(qr.qr.mat, qr.tau, work, len(work)) - putFloats(work) - qr.updateCond(norm) -} - -// isValid returns whether the receiver contains a factorization. -func (qr *QR) isValid() bool { - return qr.qr != nil && !qr.qr.IsZero() -} - -// Cond returns the condition number for the factorized matrix. -// Cond will panic if the receiver does not contain a factorization. -func (qr *QR) Cond() float64 { - if !qr.isValid() { - panic(badQR) - } - return qr.cond -} - -// TODO(btracey): Add in the "Reduced" forms for extracting the n×n orthogonal -// and upper triangular matrices. - -// RTo extracts the m×n upper trapezoidal matrix from a QR decomposition. -// If dst is nil, a new matrix is allocated. The resulting dst matrix is returned. -// RTo will panic if the receiver does not contain a factorization. -func (qr *QR) RTo(dst *Dense) *Dense { - if !qr.isValid() { - panic(badQR) - } - - r, c := qr.qr.Dims() - if dst == nil { - dst = NewDense(r, c, nil) - } else { - dst.reuseAs(r, c) - } - - // Disguise the QR as an upper triangular - t := &TriDense{ - mat: blas64.Triangular{ - N: c, - Stride: qr.qr.mat.Stride, - Data: qr.qr.mat.Data, - Uplo: blas.Upper, - Diag: blas.NonUnit, - }, - cap: qr.qr.capCols, - } - dst.Copy(t) - - // Zero below the triangular. - for i := r; i < c; i++ { - zero(dst.mat.Data[i*dst.mat.Stride : i*dst.mat.Stride+c]) - } - - return dst -} - -// QTo extracts the m×m orthonormal matrix Q from a QR decomposition. -// If dst is nil, a new matrix is allocated. The resulting Q matrix is returned. -// QTo will panic if the receiver does not contain a factorization. -func (qr *QR) QTo(dst *Dense) *Dense { - if !qr.isValid() { - panic(badQR) - } - - r, _ := qr.qr.Dims() - if dst == nil { - dst = NewDense(r, r, nil) - } else { - dst.reuseAsZeroed(r, r) - } - - // Set Q = I. - for i := 0; i < r*r; i += r + 1 { - dst.mat.Data[i] = 1 - } - - // Construct Q from the elementary reflectors. - work := []float64{0} - lapack64.Ormqr(blas.Left, blas.NoTrans, qr.qr.mat, qr.tau, dst.mat, work, -1) - work = getFloats(int(work[0]), false) - lapack64.Ormqr(blas.Left, blas.NoTrans, qr.qr.mat, qr.tau, dst.mat, work, len(work)) - putFloats(work) - - return dst -} - -// SolveTo finds a minimum-norm solution to a system of linear equations defined -// by the matrices A and b, where A is an m×n matrix represented in its QR factorized -// form. If A is singular or near-singular a Condition error is returned. -// See the documentation for Condition for more information. -// -// The minimization problem solved depends on the input parameters. -// If trans == false, find X such that ||A*X - B||_2 is minimized. -// If trans == true, find the minimum norm solution of A^T * X = B. -// The solution matrix, X, is stored in place into dst. -// SolveTo will panic if the receiver does not contain a factorization. -func (qr *QR) SolveTo(dst *Dense, trans bool, b Matrix) error { - if !qr.isValid() { - panic(badQR) - } - - r, c := qr.qr.Dims() - br, bc := b.Dims() - - // The QR solve algorithm stores the result in-place into the right hand side. - // The storage for the answer must be large enough to hold both b and x. - // However, this method's receiver must be the size of x. Copy b, and then - // copy the result into m at the end. - if trans { - if c != br { - panic(ErrShape) - } - dst.reuseAs(r, bc) - } else { - if r != br { - panic(ErrShape) - } - dst.reuseAs(c, bc) - } - // Do not need to worry about overlap between m and b because x has its own - // independent storage. - w := getWorkspace(max(r, c), bc, false) - w.Copy(b) - t := qr.qr.asTriDense(qr.qr.mat.Cols, blas.NonUnit, blas.Upper).mat - if trans { - ok := lapack64.Trtrs(blas.Trans, t, w.mat) - if !ok { - return Condition(math.Inf(1)) - } - for i := c; i < r; i++ { - zero(w.mat.Data[i*w.mat.Stride : i*w.mat.Stride+bc]) - } - work := []float64{0} - lapack64.Ormqr(blas.Left, blas.NoTrans, qr.qr.mat, qr.tau, w.mat, work, -1) - work = getFloats(int(work[0]), false) - lapack64.Ormqr(blas.Left, blas.NoTrans, qr.qr.mat, qr.tau, w.mat, work, len(work)) - putFloats(work) - } else { - work := []float64{0} - lapack64.Ormqr(blas.Left, blas.Trans, qr.qr.mat, qr.tau, w.mat, work, -1) - work = getFloats(int(work[0]), false) - lapack64.Ormqr(blas.Left, blas.Trans, qr.qr.mat, qr.tau, w.mat, work, len(work)) - putFloats(work) - - ok := lapack64.Trtrs(blas.NoTrans, t, w.mat) - if !ok { - return Condition(math.Inf(1)) - } - } - // X was set above to be the correct size for the result. - dst.Copy(w) - putWorkspace(w) - if qr.cond > ConditionTolerance { - return Condition(qr.cond) - } - return nil -} - -// SolveVecTo finds a minimum-norm solution to a system of linear equations, -// Ax = b. -// See QR.SolveTo for the full documentation. -// SolveVecTo will panic if the receiver does not contain a factorization. -func (qr *QR) SolveVecTo(dst *VecDense, trans bool, b Vector) error { - if !qr.isValid() { - panic(badQR) - } - - r, c := qr.qr.Dims() - if _, bc := b.Dims(); bc != 1 { - panic(ErrShape) - } - - // The Solve implementation is non-trivial, so rather than duplicate the code, - // instead recast the VecDenses as Dense and call the matrix code. - bm := Matrix(b) - if rv, ok := b.(RawVectorer); ok { - bmat := rv.RawVector() - if dst != b { - dst.checkOverlap(bmat) - } - b := VecDense{mat: bmat} - bm = b.asDense() - } - if trans { - dst.reuseAs(r) - } else { - dst.reuseAs(c) - } - return qr.SolveTo(dst.asDense(), trans, bm) - -} diff --git a/vendor/gonum.org/v1/gonum/mat/shadow.go b/vendor/gonum.org/v1/gonum/mat/shadow.go deleted file mode 100644 index cc62e44f0b..0000000000 --- a/vendor/gonum.org/v1/gonum/mat/shadow.go +++ /dev/null @@ -1,226 +0,0 @@ -// Copyright ©2015 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package mat - -import ( - "gonum.org/v1/gonum/blas/blas64" -) - -const ( - // regionOverlap is the panic string used for the general case - // of a matrix region overlap between a source and destination. - regionOverlap = "mat: bad region: overlap" - - // regionIdentity is the panic string used for the specific - // case of complete agreement between a source and a destination. - regionIdentity = "mat: bad region: identical" - - // mismatchedStrides is the panic string used for overlapping - // data slices with differing strides. - mismatchedStrides = "mat: bad region: different strides" -) - -// checkOverlap returns false if the receiver does not overlap data elements -// referenced by the parameter and panics otherwise. -// -// checkOverlap methods return a boolean to allow the check call to be added to a -// boolean expression, making use of short-circuit operators. -func checkOverlap(a, b blas64.General) bool { - if cap(a.Data) == 0 || cap(b.Data) == 0 { - return false - } - - off := offset(a.Data[:1], b.Data[:1]) - - if off == 0 { - // At least one element overlaps. - if a.Cols == b.Cols && a.Rows == b.Rows && a.Stride == b.Stride { - panic(regionIdentity) - } - panic(regionOverlap) - } - - if off > 0 && len(a.Data) <= off { - // We know a is completely before b. - return false - } - if off < 0 && len(b.Data) <= -off { - // We know a is completely after b. - return false - } - - if a.Stride != b.Stride { - // Too hard, so assume the worst. - panic(mismatchedStrides) - } - - if off < 0 { - off = -off - a.Cols, b.Cols = b.Cols, a.Cols - } - if rectanglesOverlap(off, a.Cols, b.Cols, a.Stride) { - panic(regionOverlap) - } - return false -} - -func (m *Dense) checkOverlap(a blas64.General) bool { - return checkOverlap(m.RawMatrix(), a) -} - -func (m *Dense) checkOverlapMatrix(a Matrix) bool { - if m == a { - return false - } - var amat blas64.General - switch a := a.(type) { - default: - return false - case RawMatrixer: - amat = a.RawMatrix() - case RawSymmetricer: - amat = generalFromSymmetric(a.RawSymmetric()) - case RawTriangular: - amat = generalFromTriangular(a.RawTriangular()) - } - return m.checkOverlap(amat) -} - -func (s *SymDense) checkOverlap(a blas64.General) bool { - return checkOverlap(generalFromSymmetric(s.RawSymmetric()), a) -} - -func (s *SymDense) checkOverlapMatrix(a Matrix) bool { - if s == a { - return false - } - var amat blas64.General - switch a := a.(type) { - default: - return false - case RawMatrixer: - amat = a.RawMatrix() - case RawSymmetricer: - amat = generalFromSymmetric(a.RawSymmetric()) - case RawTriangular: - amat = generalFromTriangular(a.RawTriangular()) - } - return s.checkOverlap(amat) -} - -// generalFromSymmetric returns a blas64.General with the backing -// data and dimensions of a. -func generalFromSymmetric(a blas64.Symmetric) blas64.General { - return blas64.General{ - Rows: a.N, - Cols: a.N, - Stride: a.Stride, - Data: a.Data, - } -} - -func (t *TriDense) checkOverlap(a blas64.General) bool { - return checkOverlap(generalFromTriangular(t.RawTriangular()), a) -} - -func (t *TriDense) checkOverlapMatrix(a Matrix) bool { - if t == a { - return false - } - var amat blas64.General - switch a := a.(type) { - default: - return false - case RawMatrixer: - amat = a.RawMatrix() - case RawSymmetricer: - amat = generalFromSymmetric(a.RawSymmetric()) - case RawTriangular: - amat = generalFromTriangular(a.RawTriangular()) - } - return t.checkOverlap(amat) -} - -// generalFromTriangular returns a blas64.General with the backing -// data and dimensions of a. -func generalFromTriangular(a blas64.Triangular) blas64.General { - return blas64.General{ - Rows: a.N, - Cols: a.N, - Stride: a.Stride, - Data: a.Data, - } -} - -func (v *VecDense) checkOverlap(a blas64.Vector) bool { - mat := v.mat - if cap(mat.Data) == 0 || cap(a.Data) == 0 { - return false - } - - off := offset(mat.Data[:1], a.Data[:1]) - - if off == 0 { - // At least one element overlaps. - if mat.Inc == a.Inc && len(mat.Data) == len(a.Data) { - panic(regionIdentity) - } - panic(regionOverlap) - } - - if off > 0 && len(mat.Data) <= off { - // We know v is completely before a. - return false - } - if off < 0 && len(a.Data) <= -off { - // We know v is completely after a. - return false - } - - if mat.Inc != a.Inc { - // Too hard, so assume the worst. - panic(mismatchedStrides) - } - - if mat.Inc == 1 || off&mat.Inc == 0 { - panic(regionOverlap) - } - return false -} - -// rectanglesOverlap returns whether the strided rectangles a and b overlap -// when b is offset by off elements after a but has at least one element before -// the end of a. off must be positive. a and b have aCols and bCols respectively. -// -// rectanglesOverlap works by shifting both matrices left such that the left -// column of a is at 0. The column indexes are flattened by obtaining the shifted -// relative left and right column positions modulo the common stride. This allows -// direct comparison of the column offsets when the matrix backing data slices -// are known to overlap. -func rectanglesOverlap(off, aCols, bCols, stride int) bool { - if stride == 1 { - // Unit stride means overlapping data - // slices must overlap as matrices. - return true - } - - // Flatten the shifted matrix column positions - // so a starts at 0, modulo the common stride. - aTo := aCols - // The mod stride operations here make the from - // and to indexes comparable between a and b when - // the data slices of a and b overlap. - bFrom := off % stride - bTo := (bFrom + bCols) % stride - - if bTo == 0 || bFrom < bTo { - // b matrix is not wrapped: compare for - // simple overlap. - return bFrom < aTo - } - - // b strictly wraps and so must overlap with a. - return true -} diff --git a/vendor/gonum.org/v1/gonum/mat/solve.go b/vendor/gonum.org/v1/gonum/mat/solve.go deleted file mode 100644 index 11813280f8..0000000000 --- a/vendor/gonum.org/v1/gonum/mat/solve.go +++ /dev/null @@ -1,140 +0,0 @@ -// Copyright ©2015 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package mat - -import ( - "gonum.org/v1/gonum/blas" - "gonum.org/v1/gonum/blas/blas64" - "gonum.org/v1/gonum/lapack/lapack64" -) - -// Solve finds a minimum-norm solution to a system of linear equations defined -// by the matrices A and B. If A is singular or near-singular, a Condition error -// is returned. See the documentation for Condition for more information. -// -// The minimization problem solved depends on the input parameters: -// - if m >= n, find X such that ||A*X - B||_2 is minimized, -// - if m < n, find the minimum norm solution of A * X = B. -// The solution matrix, X, is stored in-place into the receiver. -func (m *Dense) Solve(a, b Matrix) error { - ar, ac := a.Dims() - br, bc := b.Dims() - if ar != br { - panic(ErrShape) - } - m.reuseAs(ac, bc) - - // TODO(btracey): Add special cases for SymDense, etc. - aU, aTrans := untranspose(a) - bU, bTrans := untranspose(b) - switch rma := aU.(type) { - case RawTriangular: - side := blas.Left - tA := blas.NoTrans - if aTrans { - tA = blas.Trans - } - - switch rm := bU.(type) { - case RawMatrixer: - if m != bU || bTrans { - if m == bU || m.checkOverlap(rm.RawMatrix()) { - tmp := getWorkspace(br, bc, false) - tmp.Copy(b) - m.Copy(tmp) - putWorkspace(tmp) - break - } - m.Copy(b) - } - default: - if m != bU { - m.Copy(b) - } else if bTrans { - // m and b share data so Copy cannot be used directly. - tmp := getWorkspace(br, bc, false) - tmp.Copy(b) - m.Copy(tmp) - putWorkspace(tmp) - } - } - - rm := rma.RawTriangular() - blas64.Trsm(side, tA, 1, rm, m.mat) - work := getFloats(3*rm.N, false) - iwork := getInts(rm.N, false) - cond := lapack64.Trcon(CondNorm, rm, work, iwork) - putFloats(work) - putInts(iwork) - if cond > ConditionTolerance { - return Condition(cond) - } - return nil - } - - switch { - case ar == ac: - if a == b { - // x = I. - if ar == 1 { - m.mat.Data[0] = 1 - return nil - } - for i := 0; i < ar; i++ { - v := m.mat.Data[i*m.mat.Stride : i*m.mat.Stride+ac] - zero(v) - v[i] = 1 - } - return nil - } - var lu LU - lu.Factorize(a) - return lu.SolveTo(m, false, b) - case ar > ac: - var qr QR - qr.Factorize(a) - return qr.SolveTo(m, false, b) - default: - var lq LQ - lq.Factorize(a) - return lq.SolveTo(m, false, b) - } -} - -// SolveVec finds a minimum-norm solution to a system of linear equations defined -// by the matrix a and the right-hand side column vector b. If A is singular or -// near-singular, a Condition error is returned. See the documentation for -// Dense.Solve for more information. -func (v *VecDense) SolveVec(a Matrix, b Vector) error { - if _, bc := b.Dims(); bc != 1 { - panic(ErrShape) - } - _, c := a.Dims() - - // The Solve implementation is non-trivial, so rather than duplicate the code, - // instead recast the VecDenses as Dense and call the matrix code. - - if rv, ok := b.(RawVectorer); ok { - bmat := rv.RawVector() - if v != b { - v.checkOverlap(bmat) - } - v.reuseAs(c) - m := v.asDense() - // We conditionally create bm as m when b and v are identical - // to prevent the overlap detection code from identifying m - // and bm as overlapping but not identical. - bm := m - if v != b { - b := VecDense{mat: bmat} - bm = b.asDense() - } - return m.Solve(a, bm) - } - - v.reuseAs(c) - m := v.asDense() - return m.Solve(a, b) -} diff --git a/vendor/gonum.org/v1/gonum/mat/svd.go b/vendor/gonum.org/v1/gonum/mat/svd.go deleted file mode 100644 index 2f55c4114b..0000000000 --- a/vendor/gonum.org/v1/gonum/mat/svd.go +++ /dev/null @@ -1,247 +0,0 @@ -// Copyright ©2013 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package mat - -import ( - "gonum.org/v1/gonum/blas/blas64" - "gonum.org/v1/gonum/lapack" - "gonum.org/v1/gonum/lapack/lapack64" -) - -// SVD is a type for creating and using the Singular Value Decomposition (SVD) -// of a matrix. -type SVD struct { - kind SVDKind - - s []float64 - u blas64.General - vt blas64.General -} - -// SVDKind specifies the treatment of singular vectors during an SVD -// factorization. -type SVDKind int - -const ( - // SVDNone specifies that no singular vectors should be computed during - // the decomposition. - SVDNone SVDKind = 0 - - // SVDThinU specifies the thin decomposition for U should be computed. - SVDThinU SVDKind = 1 << (iota - 1) - // SVDFullU specifies the full decomposition for U should be computed. - SVDFullU - // SVDThinV specifies the thin decomposition for V should be computed. - SVDThinV - // SVDFullV specifies the full decomposition for V should be computed. - SVDFullV - - // SVDThin is a convenience value for computing both thin vectors. - SVDThin SVDKind = SVDThinU | SVDThinV - // SVDThin is a convenience value for computing both full vectors. - SVDFull SVDKind = SVDFullU | SVDFullV -) - -// succFact returns whether the receiver contains a successful factorization. -func (svd *SVD) succFact() bool { - return len(svd.s) != 0 -} - -// Factorize computes the singular value decomposition (SVD) of the input matrix A. -// The singular values of A are computed in all cases, while the singular -// vectors are optionally computed depending on the input kind. -// -// The full singular value decomposition (kind == SVDFull) is a factorization -// of an m×n matrix A of the form -// A = U * Σ * V^T -// where Σ is an m×n diagonal matrix, U is an m×m orthogonal matrix, and V is an -// n×n orthogonal matrix. The diagonal elements of Σ are the singular values of A. -// The first min(m,n) columns of U and V are, respectively, the left and right -// singular vectors of A. -// -// Significant storage space can be saved by using the thin representation of -// the SVD (kind == SVDThin) instead of the full SVD, especially if -// m >> n or m << n. The thin SVD finds -// A = U~ * Σ * V~^T -// where U~ is of size m×min(m,n), Σ is a diagonal matrix of size min(m,n)×min(m,n) -// and V~ is of size n×min(m,n). -// -// Factorize returns whether the decomposition succeeded. If the decomposition -// failed, routines that require a successful factorization will panic. -func (svd *SVD) Factorize(a Matrix, kind SVDKind) (ok bool) { - // kill previous factorization - svd.s = svd.s[:0] - svd.kind = kind - - m, n := a.Dims() - var jobU, jobVT lapack.SVDJob - - // TODO(btracey): This code should be modified to have the smaller - // matrix written in-place into aCopy when the lapack/native/dgesvd - // implementation is complete. - switch { - case kind&SVDFullU != 0: - jobU = lapack.SVDAll - svd.u = blas64.General{ - Rows: m, - Cols: m, - Stride: m, - Data: use(svd.u.Data, m*m), - } - case kind&SVDThinU != 0: - jobU = lapack.SVDStore - svd.u = blas64.General{ - Rows: m, - Cols: min(m, n), - Stride: min(m, n), - Data: use(svd.u.Data, m*min(m, n)), - } - default: - jobU = lapack.SVDNone - } - switch { - case kind&SVDFullV != 0: - svd.vt = blas64.General{ - Rows: n, - Cols: n, - Stride: n, - Data: use(svd.vt.Data, n*n), - } - jobVT = lapack.SVDAll - case kind&SVDThinV != 0: - svd.vt = blas64.General{ - Rows: min(m, n), - Cols: n, - Stride: n, - Data: use(svd.vt.Data, min(m, n)*n), - } - jobVT = lapack.SVDStore - default: - jobVT = lapack.SVDNone - } - - // A is destroyed on call, so copy the matrix. - aCopy := DenseCopyOf(a) - svd.kind = kind - svd.s = use(svd.s, min(m, n)) - - work := []float64{0} - lapack64.Gesvd(jobU, jobVT, aCopy.mat, svd.u, svd.vt, svd.s, work, -1) - work = getFloats(int(work[0]), false) - ok = lapack64.Gesvd(jobU, jobVT, aCopy.mat, svd.u, svd.vt, svd.s, work, len(work)) - putFloats(work) - if !ok { - svd.kind = 0 - } - return ok -} - -// Kind returns the SVDKind of the decomposition. If no decomposition has been -// computed, Kind returns -1. -func (svd *SVD) Kind() SVDKind { - if !svd.succFact() { - return -1 - } - return svd.kind -} - -// Cond returns the 2-norm condition number for the factorized matrix. Cond will -// panic if the receiver does not contain a successful factorization. -func (svd *SVD) Cond() float64 { - if !svd.succFact() { - panic(badFact) - } - return svd.s[0] / svd.s[len(svd.s)-1] -} - -// Values returns the singular values of the factorized matrix in descending order. -// -// If the input slice is non-nil, the values will be stored in-place into -// the slice. In this case, the slice must have length min(m,n), and Values will -// panic with ErrSliceLengthMismatch otherwise. If the input slice is nil, a new -// slice of the appropriate length will be allocated and returned. -// -// Values will panic if the receiver does not contain a successful factorization. -func (svd *SVD) Values(s []float64) []float64 { - if !svd.succFact() { - panic(badFact) - } - if s == nil { - s = make([]float64, len(svd.s)) - } - if len(s) != len(svd.s) { - panic(ErrSliceLengthMismatch) - } - copy(s, svd.s) - return s -} - -// UTo extracts the matrix U from the singular value decomposition. The first -// min(m,n) columns are the left singular vectors and correspond to the singular -// values as returned from SVD.Values. -// -// If dst is not nil, U is stored in-place into dst, and dst must have size -// m×m if the full U was computed, size m×min(m,n) if the thin U was computed, -// and UTo panics otherwise. If dst is nil, a new matrix of the appropriate size -// is allocated and returned. -func (svd *SVD) UTo(dst *Dense) *Dense { - if !svd.succFact() { - panic(badFact) - } - kind := svd.kind - if kind&SVDThinU == 0 && kind&SVDFullU == 0 { - panic("svd: u not computed during factorization") - } - r := svd.u.Rows - c := svd.u.Cols - if dst == nil { - dst = NewDense(r, c, nil) - } else { - dst.reuseAs(r, c) - } - - tmp := &Dense{ - mat: svd.u, - capRows: r, - capCols: c, - } - dst.Copy(tmp) - - return dst -} - -// VTo extracts the matrix V from the singular value decomposition. The first -// min(m,n) columns are the right singular vectors and correspond to the singular -// values as returned from SVD.Values. -// -// If dst is not nil, V is stored in-place into dst, and dst must have size -// n×n if the full V was computed, size n×min(m,n) if the thin V was computed, -// and VTo panics otherwise. If dst is nil, a new matrix of the appropriate size -// is allocated and returned. -func (svd *SVD) VTo(dst *Dense) *Dense { - if !svd.succFact() { - panic(badFact) - } - kind := svd.kind - if kind&SVDThinU == 0 && kind&SVDFullV == 0 { - panic("svd: v not computed during factorization") - } - r := svd.vt.Rows - c := svd.vt.Cols - if dst == nil { - dst = NewDense(c, r, nil) - } else { - dst.reuseAs(c, r) - } - - tmp := &Dense{ - mat: svd.vt, - capRows: r, - capCols: c, - } - dst.Copy(tmp.T()) - - return dst -} diff --git a/vendor/gonum.org/v1/gonum/mat/symband.go b/vendor/gonum.org/v1/gonum/mat/symband.go deleted file mode 100644 index add9a807d3..0000000000 --- a/vendor/gonum.org/v1/gonum/mat/symband.go +++ /dev/null @@ -1,221 +0,0 @@ -// Copyright ©2017 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package mat - -import ( - "gonum.org/v1/gonum/blas" - "gonum.org/v1/gonum/blas/blas64" -) - -var ( - symBandDense *SymBandDense - _ Matrix = symBandDense - _ Symmetric = symBandDense - _ Banded = symBandDense - _ SymBanded = symBandDense - _ RawSymBander = symBandDense - _ MutableSymBanded = symBandDense - - _ NonZeroDoer = symBandDense - _ RowNonZeroDoer = symBandDense - _ ColNonZeroDoer = symBandDense -) - -// SymBandDense represents a symmetric band matrix in dense storage format. -type SymBandDense struct { - mat blas64.SymmetricBand -} - -// SymBanded is a symmetric band matrix interface type. -type SymBanded interface { - Banded - - // Symmetric returns the number of rows/columns in the matrix. - Symmetric() int - - // SymBand returns the number of rows/columns in the matrix, and the size of - // the bandwidth. - SymBand() (n, k int) -} - -// MutableSymBanded is a symmetric band matrix interface type that allows elements -// to be altered. -type MutableSymBanded interface { - SymBanded - SetSymBand(i, j int, v float64) -} - -// A RawSymBander can return a blas64.SymmetricBand representation of the receiver. -// Changes to the blas64.SymmetricBand.Data slice will be reflected in the original -// matrix, changes to the N, K, Stride and Uplo fields will not. -type RawSymBander interface { - RawSymBand() blas64.SymmetricBand -} - -// NewSymBandDense creates a new SymBand matrix with n rows and columns. If data == nil, -// a new slice is allocated for the backing slice. If len(data) == n*(k+1), -// data is used as the backing slice, and changes to the elements of the returned -// SymBandDense will be reflected in data. If neither of these is true, NewSymBandDense -// will panic. k must be at least zero and less than n, otherwise NewSymBandDense will panic. -// -// The data must be arranged in row-major order constructed by removing the zeros -// from the rows outside the band and aligning the diagonals. SymBandDense matrices -// are stored in the upper triangle. For example, the matrix -// 1 2 3 0 0 0 -// 2 4 5 6 0 0 -// 3 5 7 8 9 0 -// 0 6 8 10 11 12 -// 0 0 9 11 13 14 -// 0 0 0 12 14 15 -// becomes (* entries are never accessed) -// 1 2 3 -// 4 5 6 -// 7 8 9 -// 10 11 12 -// 13 14 * -// 15 * * -// which is passed to NewSymBandDense as []float64{1, 2, ..., 15, *, *, *} with k=2. -// Only the values in the band portion of the matrix are used. -func NewSymBandDense(n, k int, data []float64) *SymBandDense { - if n <= 0 || k < 0 { - if n == 0 { - panic(ErrZeroLength) - } - panic("mat: negative dimension") - } - if k+1 > n { - panic("mat: band out of range") - } - bc := k + 1 - if data != nil && len(data) != n*bc { - panic(ErrShape) - } - if data == nil { - data = make([]float64, n*bc) - } - return &SymBandDense{ - mat: blas64.SymmetricBand{ - N: n, - K: k, - Stride: bc, - Uplo: blas.Upper, - Data: data, - }, - } -} - -// Dims returns the number of rows and columns in the matrix. -func (s *SymBandDense) Dims() (r, c int) { - return s.mat.N, s.mat.N -} - -// Symmetric returns the size of the receiver. -func (s *SymBandDense) Symmetric() int { - return s.mat.N -} - -// Bandwidth returns the bandwidths of the matrix. -func (s *SymBandDense) Bandwidth() (kl, ku int) { - return s.mat.K, s.mat.K -} - -// SymBand returns the number of rows/columns in the matrix, and the size of -// the bandwidth. -func (s *SymBandDense) SymBand() (n, k int) { - return s.mat.N, s.mat.K -} - -// T implements the Matrix interface. Symmetric matrices, by definition, are -// equal to their transpose, and this is a no-op. -func (s *SymBandDense) T() Matrix { - return s -} - -// TBand implements the Banded interface. -func (s *SymBandDense) TBand() Banded { - return s -} - -// RawSymBand returns the underlying blas64.SymBand used by the receiver. -// Changes to elements in the receiver following the call will be reflected -// in returned blas64.SymBand. -func (s *SymBandDense) RawSymBand() blas64.SymmetricBand { - return s.mat -} - -// SetRawSymBand sets the underlying blas64.SymmetricBand used by the receiver. -// Changes to elements in the receiver following the call will be reflected -// in the input. -// -// The supplied SymmetricBand must use blas.Upper storage format. -func (s *SymBandDense) SetRawSymBand(mat blas64.SymmetricBand) { - if mat.Uplo != blas.Upper { - panic("mat: blas64.SymmetricBand does not have blas.Upper storage") - } - s.mat = mat -} - -// Zero sets all of the matrix elements to zero. -func (s *SymBandDense) Zero() { - for i := 0; i < s.mat.N; i++ { - u := min(1+s.mat.K, s.mat.N-i) - zero(s.mat.Data[i*s.mat.Stride : i*s.mat.Stride+u]) - } -} - -// DiagView returns the diagonal as a matrix backed by the original data. -func (s *SymBandDense) DiagView() Diagonal { - n := s.mat.N - return &DiagDense{ - mat: blas64.Vector{ - N: n, - Inc: s.mat.Stride, - Data: s.mat.Data[:(n-1)*s.mat.Stride+1], - }, - } -} - -// DoNonZero calls the function fn for each of the non-zero elements of s. The function fn -// takes a row/column index and the element value of s at (i, j). -func (s *SymBandDense) DoNonZero(fn func(i, j int, v float64)) { - for i := 0; i < s.mat.N; i++ { - for j := max(0, i-s.mat.K); j < min(s.mat.N, i+s.mat.K+1); j++ { - v := s.at(i, j) - if v != 0 { - fn(i, j, v) - } - } - } -} - -// DoRowNonZero calls the function fn for each of the non-zero elements of row i of s. The function fn -// takes a row/column index and the element value of s at (i, j). -func (s *SymBandDense) DoRowNonZero(i int, fn func(i, j int, v float64)) { - if i < 0 || s.mat.N <= i { - panic(ErrRowAccess) - } - for j := max(0, i-s.mat.K); j < min(s.mat.N, i+s.mat.K+1); j++ { - v := s.at(i, j) - if v != 0 { - fn(i, j, v) - } - } -} - -// DoColNonZero calls the function fn for each of the non-zero elements of column j of s. The function fn -// takes a row/column index and the element value of s at (i, j). -func (s *SymBandDense) DoColNonZero(j int, fn func(i, j int, v float64)) { - if j < 0 || s.mat.N <= j { - panic(ErrColAccess) - } - for i := 0; i < s.mat.N; i++ { - if i-s.mat.K <= j && j < i+s.mat.K+1 { - v := s.at(i, j) - if v != 0 { - fn(i, j, v) - } - } - } -} diff --git a/vendor/gonum.org/v1/gonum/mat/symmetric.go b/vendor/gonum.org/v1/gonum/mat/symmetric.go deleted file mode 100644 index 2ea5bdb039..0000000000 --- a/vendor/gonum.org/v1/gonum/mat/symmetric.go +++ /dev/null @@ -1,602 +0,0 @@ -// Copyright ©2015 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package mat - -import ( - "math" - - "gonum.org/v1/gonum/blas" - "gonum.org/v1/gonum/blas/blas64" -) - -var ( - symDense *SymDense - - _ Matrix = symDense - _ Symmetric = symDense - _ RawSymmetricer = symDense - _ MutableSymmetric = symDense -) - -const ( - badSymTriangle = "mat: blas64.Symmetric not upper" - badSymCap = "mat: bad capacity for SymDense" -) - -// SymDense is a symmetric matrix that uses dense storage. SymDense -// matrices are stored in the upper triangle. -type SymDense struct { - mat blas64.Symmetric - cap int -} - -// Symmetric represents a symmetric matrix (where the element at {i, j} equals -// the element at {j, i}). Symmetric matrices are always square. -type Symmetric interface { - Matrix - // Symmetric returns the number of rows/columns in the matrix. - Symmetric() int -} - -// A RawSymmetricer can return a view of itself as a BLAS Symmetric matrix. -type RawSymmetricer interface { - RawSymmetric() blas64.Symmetric -} - -// A MutableSymmetric can set elements of a symmetric matrix. -type MutableSymmetric interface { - Symmetric - SetSym(i, j int, v float64) -} - -// NewSymDense creates a new Symmetric matrix with n rows and columns. If data == nil, -// a new slice is allocated for the backing slice. If len(data) == n*n, data is -// used as the backing slice, and changes to the elements of the returned SymDense -// will be reflected in data. If neither of these is true, NewSymDense will panic. -// NewSymDense will panic if n is zero. -// -// The data must be arranged in row-major order, i.e. the (i*c + j)-th -// element in the data slice is the {i, j}-th element in the matrix. -// Only the values in the upper triangular portion of the matrix are used. -func NewSymDense(n int, data []float64) *SymDense { - if n <= 0 { - if n == 0 { - panic(ErrZeroLength) - } - panic("mat: negative dimension") - } - if data != nil && n*n != len(data) { - panic(ErrShape) - } - if data == nil { - data = make([]float64, n*n) - } - return &SymDense{ - mat: blas64.Symmetric{ - N: n, - Stride: n, - Data: data, - Uplo: blas.Upper, - }, - cap: n, - } -} - -// Dims returns the number of rows and columns in the matrix. -func (s *SymDense) Dims() (r, c int) { - return s.mat.N, s.mat.N -} - -// Caps returns the number of rows and columns in the backing matrix. -func (s *SymDense) Caps() (r, c int) { - return s.cap, s.cap -} - -// T returns the receiver, the transpose of a symmetric matrix. -func (s *SymDense) T() Matrix { - return s -} - -// Symmetric implements the Symmetric interface and returns the number of rows -// and columns in the matrix. -func (s *SymDense) Symmetric() int { - return s.mat.N -} - -// RawSymmetric returns the matrix as a blas64.Symmetric. The returned -// value must be stored in upper triangular format. -func (s *SymDense) RawSymmetric() blas64.Symmetric { - return s.mat -} - -// SetRawSymmetric sets the underlying blas64.Symmetric used by the receiver. -// Changes to elements in the receiver following the call will be reflected -// in the input. -// -// The supplied Symmetric must use blas.Upper storage format. -func (s *SymDense) SetRawSymmetric(mat blas64.Symmetric) { - if mat.Uplo != blas.Upper { - panic(badSymTriangle) - } - s.mat = mat -} - -// Reset zeros the dimensions of the matrix so that it can be reused as the -// receiver of a dimensionally restricted operation. -// -// See the Reseter interface for more information. -func (s *SymDense) Reset() { - // N and Stride must be zeroed in unison. - s.mat.N, s.mat.Stride = 0, 0 - s.mat.Data = s.mat.Data[:0] -} - -// Zero sets all of the matrix elements to zero. -func (s *SymDense) Zero() { - for i := 0; i < s.mat.N; i++ { - zero(s.mat.Data[i*s.mat.Stride+i : i*s.mat.Stride+s.mat.N]) - } -} - -// IsZero returns whether the receiver is zero-sized. Zero-sized matrices can be the -// receiver for size-restricted operations. SymDense matrices can be zeroed using Reset. -func (s *SymDense) IsZero() bool { - // It must be the case that m.Dims() returns - // zeros in this case. See comment in Reset(). - return s.mat.N == 0 -} - -// reuseAs resizes an empty matrix to a n×n matrix, -// or checks that a non-empty matrix is n×n. -func (s *SymDense) reuseAs(n int) { - if n == 0 { - panic(ErrZeroLength) - } - if s.mat.N > s.cap { - panic(badSymCap) - } - if s.IsZero() { - s.mat = blas64.Symmetric{ - N: n, - Stride: n, - Data: use(s.mat.Data, n*n), - Uplo: blas.Upper, - } - s.cap = n - return - } - if s.mat.Uplo != blas.Upper { - panic(badSymTriangle) - } - if s.mat.N != n { - panic(ErrShape) - } -} - -func (s *SymDense) isolatedWorkspace(a Symmetric) (w *SymDense, restore func()) { - n := a.Symmetric() - if n == 0 { - panic(ErrZeroLength) - } - w = getWorkspaceSym(n, false) - return w, func() { - s.CopySym(w) - putWorkspaceSym(w) - } -} - -// DiagView returns the diagonal as a matrix backed by the original data. -func (s *SymDense) DiagView() Diagonal { - n := s.mat.N - return &DiagDense{ - mat: blas64.Vector{ - N: n, - Inc: s.mat.Stride + 1, - Data: s.mat.Data[:(n-1)*s.mat.Stride+n], - }, - } -} - -func (s *SymDense) AddSym(a, b Symmetric) { - n := a.Symmetric() - if n != b.Symmetric() { - panic(ErrShape) - } - s.reuseAs(n) - - if a, ok := a.(RawSymmetricer); ok { - if b, ok := b.(RawSymmetricer); ok { - amat, bmat := a.RawSymmetric(), b.RawSymmetric() - if s != a { - s.checkOverlap(generalFromSymmetric(amat)) - } - if s != b { - s.checkOverlap(generalFromSymmetric(bmat)) - } - for i := 0; i < n; i++ { - btmp := bmat.Data[i*bmat.Stride+i : i*bmat.Stride+n] - stmp := s.mat.Data[i*s.mat.Stride+i : i*s.mat.Stride+n] - for j, v := range amat.Data[i*amat.Stride+i : i*amat.Stride+n] { - stmp[j] = v + btmp[j] - } - } - return - } - } - - s.checkOverlapMatrix(a) - s.checkOverlapMatrix(b) - for i := 0; i < n; i++ { - stmp := s.mat.Data[i*s.mat.Stride : i*s.mat.Stride+n] - for j := i; j < n; j++ { - stmp[j] = a.At(i, j) + b.At(i, j) - } - } -} - -func (s *SymDense) CopySym(a Symmetric) int { - n := a.Symmetric() - n = min(n, s.mat.N) - if n == 0 { - return 0 - } - switch a := a.(type) { - case RawSymmetricer: - amat := a.RawSymmetric() - if amat.Uplo != blas.Upper { - panic(badSymTriangle) - } - for i := 0; i < n; i++ { - copy(s.mat.Data[i*s.mat.Stride+i:i*s.mat.Stride+n], amat.Data[i*amat.Stride+i:i*amat.Stride+n]) - } - default: - for i := 0; i < n; i++ { - stmp := s.mat.Data[i*s.mat.Stride : i*s.mat.Stride+n] - for j := i; j < n; j++ { - stmp[j] = a.At(i, j) - } - } - } - return n -} - -// SymRankOne performs a symetric rank-one update to the matrix a and stores -// the result in the receiver -// s = a + alpha * x * x' -func (s *SymDense) SymRankOne(a Symmetric, alpha float64, x Vector) { - n, c := x.Dims() - if a.Symmetric() != n || c != 1 { - panic(ErrShape) - } - s.reuseAs(n) - - if s != a { - if rs, ok := a.(RawSymmetricer); ok { - s.checkOverlap(generalFromSymmetric(rs.RawSymmetric())) - } - s.CopySym(a) - } - - xU, _ := untranspose(x) - if rv, ok := xU.(RawVectorer); ok { - xmat := rv.RawVector() - s.checkOverlap((&VecDense{mat: xmat}).asGeneral()) - blas64.Syr(alpha, xmat, s.mat) - return - } - - for i := 0; i < n; i++ { - for j := i; j < n; j++ { - s.set(i, j, s.at(i, j)+alpha*x.AtVec(i)*x.AtVec(j)) - } - } -} - -// SymRankK performs a symmetric rank-k update to the matrix a and stores the -// result into the receiver. If a is zero, see SymOuterK. -// s = a + alpha * x * x' -func (s *SymDense) SymRankK(a Symmetric, alpha float64, x Matrix) { - n := a.Symmetric() - r, _ := x.Dims() - if r != n { - panic(ErrShape) - } - xMat, aTrans := untranspose(x) - var g blas64.General - if rm, ok := xMat.(RawMatrixer); ok { - g = rm.RawMatrix() - } else { - g = DenseCopyOf(x).mat - aTrans = false - } - if a != s { - if rs, ok := a.(RawSymmetricer); ok { - s.checkOverlap(generalFromSymmetric(rs.RawSymmetric())) - } - s.reuseAs(n) - s.CopySym(a) - } - t := blas.NoTrans - if aTrans { - t = blas.Trans - } - blas64.Syrk(t, alpha, g, 1, s.mat) -} - -// SymOuterK calculates the outer product of x with itself and stores -// the result into the receiver. It is equivalent to the matrix -// multiplication -// s = alpha * x * x'. -// In order to update an existing matrix, see SymRankOne. -func (s *SymDense) SymOuterK(alpha float64, x Matrix) { - n, _ := x.Dims() - switch { - case s.IsZero(): - s.mat = blas64.Symmetric{ - N: n, - Stride: n, - Data: useZeroed(s.mat.Data, n*n), - Uplo: blas.Upper, - } - s.cap = n - s.SymRankK(s, alpha, x) - case s.mat.Uplo != blas.Upper: - panic(badSymTriangle) - case s.mat.N == n: - if s == x { - w := getWorkspaceSym(n, true) - w.SymRankK(w, alpha, x) - s.CopySym(w) - putWorkspaceSym(w) - } else { - switch r := x.(type) { - case RawMatrixer: - s.checkOverlap(r.RawMatrix()) - case RawSymmetricer: - s.checkOverlap(generalFromSymmetric(r.RawSymmetric())) - case RawTriangular: - s.checkOverlap(generalFromTriangular(r.RawTriangular())) - } - // Only zero the upper triangle. - for i := 0; i < n; i++ { - ri := i * s.mat.Stride - zero(s.mat.Data[ri+i : ri+n]) - } - s.SymRankK(s, alpha, x) - } - default: - panic(ErrShape) - } -} - -// RankTwo performs a symmmetric rank-two update to the matrix a and stores -// the result in the receiver -// m = a + alpha * (x * y' + y * x') -func (s *SymDense) RankTwo(a Symmetric, alpha float64, x, y Vector) { - n := s.mat.N - xr, xc := x.Dims() - if xr != n || xc != 1 { - panic(ErrShape) - } - yr, yc := y.Dims() - if yr != n || yc != 1 { - panic(ErrShape) - } - - if s != a { - if rs, ok := a.(RawSymmetricer); ok { - s.checkOverlap(generalFromSymmetric(rs.RawSymmetric())) - } - } - - var xmat, ymat blas64.Vector - fast := true - xU, _ := untranspose(x) - if rv, ok := xU.(RawVectorer); ok { - xmat = rv.RawVector() - s.checkOverlap((&VecDense{mat: xmat}).asGeneral()) - } else { - fast = false - } - yU, _ := untranspose(y) - if rv, ok := yU.(RawVectorer); ok { - ymat = rv.RawVector() - s.checkOverlap((&VecDense{mat: ymat}).asGeneral()) - } else { - fast = false - } - - if s != a { - if rs, ok := a.(RawSymmetricer); ok { - s.checkOverlap(generalFromSymmetric(rs.RawSymmetric())) - } - s.reuseAs(n) - s.CopySym(a) - } - - if fast { - if s != a { - s.reuseAs(n) - s.CopySym(a) - } - blas64.Syr2(alpha, xmat, ymat, s.mat) - return - } - - for i := 0; i < n; i++ { - s.reuseAs(n) - for j := i; j < n; j++ { - s.set(i, j, a.At(i, j)+alpha*(x.AtVec(i)*y.AtVec(j)+y.AtVec(i)*x.AtVec(j))) - } - } -} - -// ScaleSym multiplies the elements of a by f, placing the result in the receiver. -func (s *SymDense) ScaleSym(f float64, a Symmetric) { - n := a.Symmetric() - s.reuseAs(n) - if a, ok := a.(RawSymmetricer); ok { - amat := a.RawSymmetric() - if s != a { - s.checkOverlap(generalFromSymmetric(amat)) - } - for i := 0; i < n; i++ { - for j := i; j < n; j++ { - s.mat.Data[i*s.mat.Stride+j] = f * amat.Data[i*amat.Stride+j] - } - } - return - } - for i := 0; i < n; i++ { - for j := i; j < n; j++ { - s.mat.Data[i*s.mat.Stride+j] = f * a.At(i, j) - } - } -} - -// SubsetSym extracts a subset of the rows and columns of the matrix a and stores -// the result in-place into the receiver. The resulting matrix size is -// len(set)×len(set). Specifically, at the conclusion of SubsetSym, -// s.At(i, j) equals a.At(set[i], set[j]). Note that the supplied set does not -// have to be a strict subset, dimension repeats are allowed. -func (s *SymDense) SubsetSym(a Symmetric, set []int) { - n := len(set) - na := a.Symmetric() - s.reuseAs(n) - var restore func() - if a == s { - s, restore = s.isolatedWorkspace(a) - defer restore() - } - - if a, ok := a.(RawSymmetricer); ok { - raw := a.RawSymmetric() - if s != a { - s.checkOverlap(generalFromSymmetric(raw)) - } - for i := 0; i < n; i++ { - ssub := s.mat.Data[i*s.mat.Stride : i*s.mat.Stride+n] - r := set[i] - rsub := raw.Data[r*raw.Stride : r*raw.Stride+na] - for j := i; j < n; j++ { - c := set[j] - if r <= c { - ssub[j] = rsub[c] - } else { - ssub[j] = raw.Data[c*raw.Stride+r] - } - } - } - return - } - for i := 0; i < n; i++ { - for j := i; j < n; j++ { - s.mat.Data[i*s.mat.Stride+j] = a.At(set[i], set[j]) - } - } -} - -// SliceSym returns a new Matrix that shares backing data with the receiver. -// The returned matrix starts at {i,i} of the receiver and extends k-i rows -// and columns. The final row and column in the resulting matrix is k-1. -// SliceSym panics with ErrIndexOutOfRange if the slice is outside the -// capacity of the receiver. -func (s *SymDense) SliceSym(i, k int) Symmetric { - sz := s.cap - if i < 0 || sz < i || k < i || sz < k { - panic(ErrIndexOutOfRange) - } - v := *s - v.mat.Data = s.mat.Data[i*s.mat.Stride+i : (k-1)*s.mat.Stride+k] - v.mat.N = k - i - v.cap = s.cap - i - return &v -} - -// Trace returns the trace of the matrix. -func (s *SymDense) Trace() float64 { - // TODO(btracey): could use internal asm sum routine. - var v float64 - for i := 0; i < s.mat.N; i++ { - v += s.mat.Data[i*s.mat.Stride+i] - } - return v -} - -// GrowSym returns the receiver expanded by n rows and n columns. If the -// dimensions of the expanded matrix are outside the capacity of the receiver -// a new allocation is made, otherwise not. Note that the receiver itself is -// not modified during the call to GrowSquare. -func (s *SymDense) GrowSym(n int) Symmetric { - if n < 0 { - panic(ErrIndexOutOfRange) - } - if n == 0 { - return s - } - var v SymDense - n += s.mat.N - if n > s.cap { - v.mat = blas64.Symmetric{ - N: n, - Stride: n, - Uplo: blas.Upper, - Data: make([]float64, n*n), - } - v.cap = n - // Copy elements, including those not currently visible. Use a temporary - // structure to avoid modifying the receiver. - var tmp SymDense - tmp.mat = blas64.Symmetric{ - N: s.cap, - Stride: s.mat.Stride, - Data: s.mat.Data, - Uplo: s.mat.Uplo, - } - tmp.cap = s.cap - v.CopySym(&tmp) - return &v - } - v.mat = blas64.Symmetric{ - N: n, - Stride: s.mat.Stride, - Uplo: blas.Upper, - Data: s.mat.Data[:(n-1)*s.mat.Stride+n], - } - v.cap = s.cap - return &v -} - -// PowPSD computes a^pow where a is a positive symmetric definite matrix. -// -// PowPSD returns an error if the matrix is not not positive symmetric definite -// or the Eigendecomposition is not successful. -func (s *SymDense) PowPSD(a Symmetric, pow float64) error { - dim := a.Symmetric() - s.reuseAs(dim) - - var eigen EigenSym - ok := eigen.Factorize(a, true) - if !ok { - return ErrFailedEigen - } - values := eigen.Values(nil) - for i, v := range values { - if v <= 0 { - return ErrNotPSD - } - values[i] = math.Pow(v, pow) - } - u := eigen.VectorsTo(nil) - - s.SymOuterK(values[0], u.ColView(0)) - - var v VecDense - for i := 1; i < dim; i++ { - v.ColViewOf(u, i) - s.SymRankOne(s, values[i], &v) - } - return nil -} diff --git a/vendor/gonum.org/v1/gonum/mat/triangular.go b/vendor/gonum.org/v1/gonum/mat/triangular.go deleted file mode 100644 index e32ee40549..0000000000 --- a/vendor/gonum.org/v1/gonum/mat/triangular.go +++ /dev/null @@ -1,659 +0,0 @@ -// Copyright ©2015 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package mat - -import ( - "math" - - "gonum.org/v1/gonum/blas" - "gonum.org/v1/gonum/blas/blas64" - "gonum.org/v1/gonum/lapack/lapack64" -) - -var ( - triDense *TriDense - _ Matrix = triDense - _ Triangular = triDense - _ RawTriangular = triDense - _ MutableTriangular = triDense - - _ NonZeroDoer = triDense - _ RowNonZeroDoer = triDense - _ ColNonZeroDoer = triDense -) - -const badTriCap = "mat: bad capacity for TriDense" - -// TriDense represents an upper or lower triangular matrix in dense storage -// format. -type TriDense struct { - mat blas64.Triangular - cap int -} - -// Triangular represents a triangular matrix. Triangular matrices are always square. -type Triangular interface { - Matrix - // Triangle returns the number of rows/columns in the matrix and its - // orientation. - Triangle() (n int, kind TriKind) - - // TTri is the equivalent of the T() method in the Matrix interface but - // guarantees the transpose is of triangular type. - TTri() Triangular -} - -// A RawTriangular can return a blas64.Triangular representation of the receiver. -// Changes to the blas64.Triangular.Data slice will be reflected in the original -// matrix, changes to the N, Stride, Uplo and Diag fields will not. -type RawTriangular interface { - RawTriangular() blas64.Triangular -} - -// A MutableTriangular can set elements of a triangular matrix. -type MutableTriangular interface { - Triangular - SetTri(i, j int, v float64) -} - -var ( - _ Matrix = TransposeTri{} - _ Triangular = TransposeTri{} - _ UntransposeTrier = TransposeTri{} -) - -// TransposeTri is a type for performing an implicit transpose of a Triangular -// matrix. It implements the Triangular interface, returning values from the -// transpose of the matrix within. -type TransposeTri struct { - Triangular Triangular -} - -// At returns the value of the element at row i and column j of the transposed -// matrix, that is, row j and column i of the Triangular field. -func (t TransposeTri) At(i, j int) float64 { - return t.Triangular.At(j, i) -} - -// Dims returns the dimensions of the transposed matrix. Triangular matrices are -// square and thus this is the same size as the original Triangular. -func (t TransposeTri) Dims() (r, c int) { - c, r = t.Triangular.Dims() - return r, c -} - -// T performs an implicit transpose by returning the Triangular field. -func (t TransposeTri) T() Matrix { - return t.Triangular -} - -// Triangle returns the number of rows/columns in the matrix and its orientation. -func (t TransposeTri) Triangle() (int, TriKind) { - n, upper := t.Triangular.Triangle() - return n, !upper -} - -// TTri performs an implicit transpose by returning the Triangular field. -func (t TransposeTri) TTri() Triangular { - return t.Triangular -} - -// Untranspose returns the Triangular field. -func (t TransposeTri) Untranspose() Matrix { - return t.Triangular -} - -func (t TransposeTri) UntransposeTri() Triangular { - return t.Triangular -} - -// NewTriDense creates a new Triangular matrix with n rows and columns. If data == nil, -// a new slice is allocated for the backing slice. If len(data) == n*n, data is -// used as the backing slice, and changes to the elements of the returned TriDense -// will be reflected in data. If neither of these is true, NewTriDense will panic. -// NewTriDense will panic if n is zero. -// -// The data must be arranged in row-major order, i.e. the (i*c + j)-th -// element in the data slice is the {i, j}-th element in the matrix. -// Only the values in the triangular portion corresponding to kind are used. -func NewTriDense(n int, kind TriKind, data []float64) *TriDense { - if n <= 0 { - if n == 0 { - panic(ErrZeroLength) - } - panic("mat: negative dimension") - } - if data != nil && len(data) != n*n { - panic(ErrShape) - } - if data == nil { - data = make([]float64, n*n) - } - uplo := blas.Lower - if kind == Upper { - uplo = blas.Upper - } - return &TriDense{ - mat: blas64.Triangular{ - N: n, - Stride: n, - Data: data, - Uplo: uplo, - Diag: blas.NonUnit, - }, - cap: n, - } -} - -func (t *TriDense) Dims() (r, c int) { - return t.mat.N, t.mat.N -} - -// Triangle returns the dimension of t and its orientation. The returned -// orientation is only valid when n is not zero. -func (t *TriDense) Triangle() (n int, kind TriKind) { - return t.mat.N, t.triKind() -} - -func (t *TriDense) isUpper() bool { - return isUpperUplo(t.mat.Uplo) -} - -func (t *TriDense) triKind() TriKind { - return TriKind(isUpperUplo(t.mat.Uplo)) -} - -func isUpperUplo(u blas.Uplo) bool { - switch u { - case blas.Upper: - return true - case blas.Lower: - return false - default: - panic(badTriangle) - } -} - -func uploToTriKind(u blas.Uplo) TriKind { - switch u { - case blas.Upper: - return Upper - case blas.Lower: - return Lower - default: - panic(badTriangle) - } -} - -// asSymBlas returns the receiver restructured as a blas64.Symmetric with the -// same backing memory. Panics if the receiver is unit. -// This returns a blas64.Symmetric and not a *SymDense because SymDense can only -// be upper triangular. -func (t *TriDense) asSymBlas() blas64.Symmetric { - if t.mat.Diag == blas.Unit { - panic("mat: cannot convert unit TriDense into blas64.Symmetric") - } - return blas64.Symmetric{ - N: t.mat.N, - Stride: t.mat.Stride, - Data: t.mat.Data, - Uplo: t.mat.Uplo, - } -} - -// T performs an implicit transpose by returning the receiver inside a Transpose. -func (t *TriDense) T() Matrix { - return Transpose{t} -} - -// TTri performs an implicit transpose by returning the receiver inside a TransposeTri. -func (t *TriDense) TTri() Triangular { - return TransposeTri{t} -} - -func (t *TriDense) RawTriangular() blas64.Triangular { - return t.mat -} - -// SetRawTriangular sets the underlying blas64.Triangular used by the receiver. -// Changes to elements in the receiver following the call will be reflected -// in the input. -// -// The supplied Triangular must not use blas.Unit storage format. -func (t *TriDense) SetRawTriangular(mat blas64.Triangular) { - if mat.Diag == blas.Unit { - panic("mat: cannot set TriDense with Unit storage format") - } - t.mat = mat -} - -// Reset zeros the dimensions of the matrix so that it can be reused as the -// receiver of a dimensionally restricted operation. -// -// See the Reseter interface for more information. -func (t *TriDense) Reset() { - // N and Stride must be zeroed in unison. - t.mat.N, t.mat.Stride = 0, 0 - // Defensively zero Uplo to ensure - // it is set correctly later. - t.mat.Uplo = 0 - t.mat.Data = t.mat.Data[:0] -} - -// Zero sets all of the matrix elements to zero. -func (t *TriDense) Zero() { - if t.isUpper() { - for i := 0; i < t.mat.N; i++ { - zero(t.mat.Data[i*t.mat.Stride+i : i*t.mat.Stride+t.mat.N]) - } - return - } - for i := 0; i < t.mat.N; i++ { - zero(t.mat.Data[i*t.mat.Stride : i*t.mat.Stride+i+1]) - } -} - -// IsZero returns whether the receiver is zero-sized. Zero-sized matrices can be the -// receiver for size-restricted operations. TriDense matrices can be zeroed using Reset. -func (t *TriDense) IsZero() bool { - // It must be the case that t.Dims() returns - // zeros in this case. See comment in Reset(). - return t.mat.Stride == 0 -} - -// untranspose untransposes a matrix if applicable. If a is an Untransposer, then -// untranspose returns the underlying matrix and true. If it is not, then it returns -// the input matrix and false. -func untransposeTri(a Triangular) (Triangular, bool) { - if ut, ok := a.(UntransposeTrier); ok { - return ut.UntransposeTri(), true - } - return a, false -} - -// reuseAs resizes a zero receiver to an n×n triangular matrix with the given -// orientation. If the receiver is non-zero, reuseAs checks that the receiver -// is the correct size and orientation. -func (t *TriDense) reuseAs(n int, kind TriKind) { - if n == 0 { - panic(ErrZeroLength) - } - ul := blas.Lower - if kind == Upper { - ul = blas.Upper - } - if t.mat.N > t.cap { - panic(badTriCap) - } - if t.IsZero() { - t.mat = blas64.Triangular{ - N: n, - Stride: n, - Diag: blas.NonUnit, - Data: use(t.mat.Data, n*n), - Uplo: ul, - } - t.cap = n - return - } - if t.mat.N != n { - panic(ErrShape) - } - if t.mat.Uplo != ul { - panic(ErrTriangle) - } -} - -// isolatedWorkspace returns a new TriDense matrix w with the size of a and -// returns a callback to defer which performs cleanup at the return of the call. -// This should be used when a method receiver is the same pointer as an input argument. -func (t *TriDense) isolatedWorkspace(a Triangular) (w *TriDense, restore func()) { - n, kind := a.Triangle() - if n == 0 { - panic(ErrZeroLength) - } - w = getWorkspaceTri(n, kind, false) - return w, func() { - t.Copy(w) - putWorkspaceTri(w) - } -} - -// DiagView returns the diagonal as a matrix backed by the original data. -func (t *TriDense) DiagView() Diagonal { - if t.mat.Diag == blas.Unit { - panic("mat: cannot take view of Unit diagonal") - } - n := t.mat.N - return &DiagDense{ - mat: blas64.Vector{ - N: n, - Inc: t.mat.Stride + 1, - Data: t.mat.Data[:(n-1)*t.mat.Stride+n], - }, - } -} - -// Copy makes a copy of elements of a into the receiver. It is similar to the -// built-in copy; it copies as much as the overlap between the two matrices and -// returns the number of rows and columns it copied. Only elements within the -// receiver's non-zero triangle are set. -// -// See the Copier interface for more information. -func (t *TriDense) Copy(a Matrix) (r, c int) { - r, c = a.Dims() - r = min(r, t.mat.N) - c = min(c, t.mat.N) - if r == 0 || c == 0 { - return 0, 0 - } - - switch a := a.(type) { - case RawMatrixer: - amat := a.RawMatrix() - if t.isUpper() { - for i := 0; i < r; i++ { - copy(t.mat.Data[i*t.mat.Stride+i:i*t.mat.Stride+c], amat.Data[i*amat.Stride+i:i*amat.Stride+c]) - } - } else { - for i := 0; i < r; i++ { - copy(t.mat.Data[i*t.mat.Stride:i*t.mat.Stride+i+1], amat.Data[i*amat.Stride:i*amat.Stride+i+1]) - } - } - case RawTriangular: - amat := a.RawTriangular() - aIsUpper := isUpperUplo(amat.Uplo) - tIsUpper := t.isUpper() - switch { - case tIsUpper && aIsUpper: - for i := 0; i < r; i++ { - copy(t.mat.Data[i*t.mat.Stride+i:i*t.mat.Stride+c], amat.Data[i*amat.Stride+i:i*amat.Stride+c]) - } - case !tIsUpper && !aIsUpper: - for i := 0; i < r; i++ { - copy(t.mat.Data[i*t.mat.Stride:i*t.mat.Stride+i+1], amat.Data[i*amat.Stride:i*amat.Stride+i+1]) - } - default: - for i := 0; i < r; i++ { - t.set(i, i, amat.Data[i*amat.Stride+i]) - } - } - default: - isUpper := t.isUpper() - for i := 0; i < r; i++ { - if isUpper { - for j := i; j < c; j++ { - t.set(i, j, a.At(i, j)) - } - } else { - for j := 0; j <= i; j++ { - t.set(i, j, a.At(i, j)) - } - } - } - } - - return r, c -} - -// InverseTri computes the inverse of the triangular matrix a, storing the result -// into the receiver. If a is ill-conditioned, a Condition error will be returned. -// Note that matrix inversion is numerically unstable, and should generally be -// avoided where possible, for example by using the Solve routines. -func (t *TriDense) InverseTri(a Triangular) error { - t.checkOverlapMatrix(a) - n, _ := a.Triangle() - t.reuseAs(a.Triangle()) - t.Copy(a) - work := getFloats(3*n, false) - iwork := getInts(n, false) - cond := lapack64.Trcon(CondNorm, t.mat, work, iwork) - putFloats(work) - putInts(iwork) - if math.IsInf(cond, 1) { - return Condition(cond) - } - ok := lapack64.Trtri(t.mat) - if !ok { - return Condition(math.Inf(1)) - } - if cond > ConditionTolerance { - return Condition(cond) - } - return nil -} - -// MulTri takes the product of triangular matrices a and b and places the result -// in the receiver. The size of a and b must match, and they both must have the -// same TriKind, or Mul will panic. -func (t *TriDense) MulTri(a, b Triangular) { - n, kind := a.Triangle() - nb, kindb := b.Triangle() - if n != nb { - panic(ErrShape) - } - if kind != kindb { - panic(ErrTriangle) - } - - aU, _ := untransposeTri(a) - bU, _ := untransposeTri(b) - t.checkOverlapMatrix(bU) - t.checkOverlapMatrix(aU) - t.reuseAs(n, kind) - var restore func() - if t == aU { - t, restore = t.isolatedWorkspace(aU) - defer restore() - } else if t == bU { - t, restore = t.isolatedWorkspace(bU) - defer restore() - } - - // TODO(btracey): Improve the set of fast-paths. - if kind == Upper { - for i := 0; i < n; i++ { - for j := i; j < n; j++ { - var v float64 - for k := i; k <= j; k++ { - v += a.At(i, k) * b.At(k, j) - } - t.SetTri(i, j, v) - } - } - return - } - for i := 0; i < n; i++ { - for j := 0; j <= i; j++ { - var v float64 - for k := j; k <= i; k++ { - v += a.At(i, k) * b.At(k, j) - } - t.SetTri(i, j, v) - } - } -} - -// ScaleTri multiplies the elements of a by f, placing the result in the receiver. -// If the receiver is non-zero, the size and kind of the receiver must match -// the input, or ScaleTri will panic. -func (t *TriDense) ScaleTri(f float64, a Triangular) { - n, kind := a.Triangle() - t.reuseAs(n, kind) - - // TODO(btracey): Improve the set of fast-paths. - switch a := a.(type) { - case RawTriangular: - amat := a.RawTriangular() - if t != a { - t.checkOverlap(generalFromTriangular(amat)) - } - if kind == Upper { - for i := 0; i < n; i++ { - ts := t.mat.Data[i*t.mat.Stride+i : i*t.mat.Stride+n] - as := amat.Data[i*amat.Stride+i : i*amat.Stride+n] - for i, v := range as { - ts[i] = v * f - } - } - return - } - for i := 0; i < n; i++ { - ts := t.mat.Data[i*t.mat.Stride : i*t.mat.Stride+i+1] - as := amat.Data[i*amat.Stride : i*amat.Stride+i+1] - for i, v := range as { - ts[i] = v * f - } - } - return - default: - t.checkOverlapMatrix(a) - isUpper := kind == Upper - for i := 0; i < n; i++ { - if isUpper { - for j := i; j < n; j++ { - t.set(i, j, f*a.At(i, j)) - } - } else { - for j := 0; j <= i; j++ { - t.set(i, j, f*a.At(i, j)) - } - } - } - } -} - -// Trace returns the trace of the matrix. -func (t *TriDense) Trace() float64 { - // TODO(btracey): could use internal asm sum routine. - var v float64 - for i := 0; i < t.mat.N; i++ { - v += t.mat.Data[i*t.mat.Stride+i] - } - return v -} - -// copySymIntoTriangle copies a symmetric matrix into a TriDense -func copySymIntoTriangle(t *TriDense, s Symmetric) { - n, upper := t.Triangle() - ns := s.Symmetric() - if n != ns { - panic("mat: triangle size mismatch") - } - ts := t.mat.Stride - if rs, ok := s.(RawSymmetricer); ok { - sd := rs.RawSymmetric() - ss := sd.Stride - if upper { - if sd.Uplo == blas.Upper { - for i := 0; i < n; i++ { - copy(t.mat.Data[i*ts+i:i*ts+n], sd.Data[i*ss+i:i*ss+n]) - } - return - } - for i := 0; i < n; i++ { - for j := i; j < n; j++ { - t.mat.Data[i*ts+j] = sd.Data[j*ss+i] - } - } - return - } - if sd.Uplo == blas.Upper { - for i := 0; i < n; i++ { - for j := 0; j <= i; j++ { - t.mat.Data[i*ts+j] = sd.Data[j*ss+i] - } - } - return - } - for i := 0; i < n; i++ { - copy(t.mat.Data[i*ts:i*ts+i+1], sd.Data[i*ss:i*ss+i+1]) - } - return - } - if upper { - for i := 0; i < n; i++ { - for j := i; j < n; j++ { - t.mat.Data[i*ts+j] = s.At(i, j) - } - } - return - } - for i := 0; i < n; i++ { - for j := 0; j <= i; j++ { - t.mat.Data[i*ts+j] = s.At(i, j) - } - } -} - -// DoNonZero calls the function fn for each of the non-zero elements of t. The function fn -// takes a row/column index and the element value of t at (i, j). -func (t *TriDense) DoNonZero(fn func(i, j int, v float64)) { - if t.isUpper() { - for i := 0; i < t.mat.N; i++ { - for j := i; j < t.mat.N; j++ { - v := t.at(i, j) - if v != 0 { - fn(i, j, v) - } - } - } - return - } - for i := 0; i < t.mat.N; i++ { - for j := 0; j <= i; j++ { - v := t.at(i, j) - if v != 0 { - fn(i, j, v) - } - } - } -} - -// DoRowNonZero calls the function fn for each of the non-zero elements of row i of t. The function fn -// takes a row/column index and the element value of t at (i, j). -func (t *TriDense) DoRowNonZero(i int, fn func(i, j int, v float64)) { - if i < 0 || t.mat.N <= i { - panic(ErrRowAccess) - } - if t.isUpper() { - for j := i; j < t.mat.N; j++ { - v := t.at(i, j) - if v != 0 { - fn(i, j, v) - } - } - return - } - for j := 0; j <= i; j++ { - v := t.at(i, j) - if v != 0 { - fn(i, j, v) - } - } -} - -// DoColNonZero calls the function fn for each of the non-zero elements of column j of t. The function fn -// takes a row/column index and the element value of t at (i, j). -func (t *TriDense) DoColNonZero(j int, fn func(i, j int, v float64)) { - if j < 0 || t.mat.N <= j { - panic(ErrColAccess) - } - if t.isUpper() { - for i := 0; i <= j; i++ { - v := t.at(i, j) - if v != 0 { - fn(i, j, v) - } - } - return - } - for i := j; i < t.mat.N; i++ { - v := t.at(i, j) - if v != 0 { - fn(i, j, v) - } - } -} diff --git a/vendor/gonum.org/v1/gonum/mat/triband.go b/vendor/gonum.org/v1/gonum/mat/triband.go deleted file mode 100644 index f97855046e..0000000000 --- a/vendor/gonum.org/v1/gonum/mat/triband.go +++ /dev/null @@ -1,353 +0,0 @@ -// Copyright ©2018 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package mat - -import ( - "gonum.org/v1/gonum/blas" - "gonum.org/v1/gonum/blas/blas64" -) - -var ( - triBand TriBanded - _ Banded = triBand - _ Triangular = triBand - - triBandDense *TriBandDense - _ Matrix = triBandDense - _ Triangular = triBandDense - _ Banded = triBandDense - _ TriBanded = triBandDense - _ RawTriBander = triBandDense - _ MutableTriBanded = triBandDense -) - -// TriBanded is a triangular band matrix interface type. -type TriBanded interface { - Banded - - // Triangle returns the number of rows/columns in the matrix and its - // orientation. - Triangle() (n int, kind TriKind) - - // TTri is the equivalent of the T() method in the Matrix interface but - // guarantees the transpose is of triangular type. - TTri() Triangular - - // TriBand returns the number of rows/columns in the matrix, the - // size of the bandwidth, and the orientation. - TriBand() (n, k int, kind TriKind) - - // TTriBand is the equivalent of the T() method in the Matrix interface but - // guarantees the transpose is of banded triangular type. - TTriBand() TriBanded -} - -// A RawTriBander can return a blas64.TriangularBand representation of the receiver. -// Changes to the blas64.TriangularBand.Data slice will be reflected in the original -// matrix, changes to the N, K, Stride, Uplo and Diag fields will not. -type RawTriBander interface { - RawTriBand() blas64.TriangularBand -} - -// MutableTriBanded is a triangular band matrix interface type that allows -// elements to be altered. -type MutableTriBanded interface { - TriBanded - SetTriBand(i, j int, v float64) -} - -var ( - tTriBand TransposeTriBand - _ Matrix = tTriBand - _ TriBanded = tTriBand - _ Untransposer = tTriBand - _ UntransposeTrier = tTriBand - _ UntransposeBander = tTriBand - _ UntransposeTriBander = tTriBand -) - -// TransposeTriBand is a type for performing an implicit transpose of a TriBanded -// matrix. It implements the TriBanded interface, returning values from the -// transpose of the matrix within. -type TransposeTriBand struct { - TriBanded TriBanded -} - -// At returns the value of the element at row i and column j of the transposed -// matrix, that is, row j and column i of the TriBanded field. -func (t TransposeTriBand) At(i, j int) float64 { - return t.TriBanded.At(j, i) -} - -// Dims returns the dimensions of the transposed matrix. TriBanded matrices are -// square and thus this is the same size as the original TriBanded. -func (t TransposeTriBand) Dims() (r, c int) { - c, r = t.TriBanded.Dims() - return r, c -} - -// T performs an implicit transpose by returning the TriBand field. -func (t TransposeTriBand) T() Matrix { - return t.TriBanded -} - -// Triangle returns the number of rows/columns in the matrix and its orientation. -func (t TransposeTriBand) Triangle() (int, TriKind) { - n, upper := t.TriBanded.Triangle() - return n, !upper -} - -// TTri performs an implicit transpose by returning the TriBand field. -func (t TransposeTriBand) TTri() Triangular { - return t.TriBanded -} - -// Bandwidth returns the upper and lower bandwidths of the matrix. -func (t TransposeTriBand) Bandwidth() (kl, ku int) { - kl, ku = t.TriBanded.Bandwidth() - return ku, kl -} - -// TBand performs an implicit transpose by returning the TriBand field. -func (t TransposeTriBand) TBand() Banded { - return t.TriBanded -} - -// TriBand returns the number of rows/columns in the matrix, the -// size of the bandwidth, and the orientation. -func (t TransposeTriBand) TriBand() (n, k int, kind TriKind) { - n, k, kind = t.TriBanded.TriBand() - return n, k, !kind -} - -// TTriBand performs an implicit transpose by returning the TriBand field. -func (t TransposeTriBand) TTriBand() TriBanded { - return t.TriBanded -} - -// Untranspose returns the Triangular field. -func (t TransposeTriBand) Untranspose() Matrix { - return t.TriBanded -} - -// UntransposeTri returns the underlying Triangular matrix. -func (t TransposeTriBand) UntransposeTri() Triangular { - return t.TriBanded -} - -// UntransposeBand returns the underlying Banded matrix. -func (t TransposeTriBand) UntransposeBand() Banded { - return t.TriBanded -} - -// UntransposeTriBand returns the underlying TriBanded matrix. -func (t TransposeTriBand) UntransposeTriBand() TriBanded { - return t.TriBanded -} - -// TriBandDense represents a triangular band matrix in dense storage format. -type TriBandDense struct { - mat blas64.TriangularBand -} - -// NewTriBandDense creates a new triangular banded matrix with n rows and columns, -// k bands in the direction of the specified kind. If data == nil, -// a new slice is allocated for the backing slice. If len(data) == n*(k+1), -// data is used as the backing slice, and changes to the elements of the returned -// TriBandDense will be reflected in data. If neither of these is true, NewTriBandDense -// will panic. k must be at least zero and less than n, otherwise NewTriBandDense will panic. -// -// The data must be arranged in row-major order constructed by removing the zeros -// from the rows outside the band and aligning the diagonals. For example, if -// the upper-triangular banded matrix -// 1 2 3 0 0 0 -// 0 4 5 6 0 0 -// 0 0 7 8 9 0 -// 0 0 0 10 11 12 -// 0 0 0 0 13 14 -// 0 0 0 0 0 15 -// becomes (* entries are never accessed) -// 1 2 3 -// 4 5 6 -// 7 8 9 -// 10 11 12 -// 13 14 * -// 15 * * -// which is passed to NewTriBandDense as []float64{1, 2, ..., 15, *, *, *} -// with k=2 and kind = mat.Upper. -// The lower triangular banded matrix -// 1 0 0 0 0 0 -// 2 3 0 0 0 0 -// 4 5 6 0 0 0 -// 0 7 8 9 0 0 -// 0 0 10 11 12 0 -// 0 0 0 13 14 15 -// becomes (* entries are never accessed) -// * * 1 -// * 2 3 -// 4 5 6 -// 7 8 9 -// 10 11 12 -// 13 14 15 -// which is passed to NewTriBandDense as []float64{*, *, *, 1, 2, ..., 15} -// with k=2 and kind = mat.Lower. -// Only the values in the band portion of the matrix are used. -func NewTriBandDense(n, k int, kind TriKind, data []float64) *TriBandDense { - if n <= 0 || k < 0 { - if n == 0 { - panic(ErrZeroLength) - } - panic("mat: negative dimension") - } - if k+1 > n { - panic("mat: band out of range") - } - bc := k + 1 - if data != nil && len(data) != n*bc { - panic(ErrShape) - } - if data == nil { - data = make([]float64, n*bc) - } - uplo := blas.Lower - if kind { - uplo = blas.Upper - } - return &TriBandDense{ - mat: blas64.TriangularBand{ - Uplo: uplo, - Diag: blas.NonUnit, - N: n, - K: k, - Data: data, - Stride: bc, - }, - } -} - -// Dims returns the number of rows and columns in the matrix. -func (t *TriBandDense) Dims() (r, c int) { - return t.mat.N, t.mat.N -} - -// T performs an implicit transpose by returning the receiver inside a Transpose. -func (t *TriBandDense) T() Matrix { - return Transpose{t} -} - -// IsZero returns whether the receiver is zero-sized. Zero-sized matrices can be the -// receiver for size-restricted operations. TriBandDense matrices can be zeroed using Reset. -func (t *TriBandDense) IsZero() bool { - // It must be the case that t.Dims() returns - // zeros in this case. See comment in Reset(). - return t.mat.Stride == 0 -} - -// Reset zeros the dimensions of the matrix so that it can be reused as the -// receiver of a dimensionally restricted operation. -// -// See the Reseter interface for more information. -func (t *TriBandDense) Reset() { - t.mat.N = 0 - t.mat.Stride = 0 - t.mat.K = 0 - t.mat.Data = t.mat.Data[:0] -} - -// Zero sets all of the matrix elements to zero. -func (t *TriBandDense) Zero() { - if t.isUpper() { - for i := 0; i < t.mat.N; i++ { - u := min(1+t.mat.K, t.mat.N-i) - zero(t.mat.Data[i*t.mat.Stride : i*t.mat.Stride+u]) - } - return - } - for i := 0; i < t.mat.N; i++ { - l := max(0, t.mat.K-i) - zero(t.mat.Data[i*t.mat.Stride+l : i*t.mat.Stride+t.mat.K+1]) - } -} - -func (t *TriBandDense) isUpper() bool { - return isUpperUplo(t.mat.Uplo) -} - -func (t *TriBandDense) triKind() TriKind { - return TriKind(isUpperUplo(t.mat.Uplo)) -} - -// Triangle returns the dimension of t and its orientation. The returned -// orientation is only valid when n is not zero. -func (t *TriBandDense) Triangle() (n int, kind TriKind) { - return t.mat.N, t.triKind() -} - -// TTri performs an implicit transpose by returning the receiver inside a TransposeTri. -func (t *TriBandDense) TTri() Triangular { - return TransposeTri{t} -} - -// Bandwidth returns the upper and lower bandwidths of the matrix. -func (t *TriBandDense) Bandwidth() (kl, ku int) { - if t.isUpper() { - return 0, t.mat.K - } - return t.mat.K, 0 -} - -// TBand performs an implicit transpose by returning the receiver inside a TransposeBand. -func (t *TriBandDense) TBand() Banded { - return TransposeBand{t} -} - -// TriBand returns the number of rows/columns in the matrix, the -// size of the bandwidth, and the orientation. -func (t *TriBandDense) TriBand() (n, k int, kind TriKind) { - return t.mat.N, t.mat.K, TriKind(!t.IsZero()) && t.triKind() -} - -// TTriBand performs an implicit transpose by returning the receiver inside a TransposeTriBand. -func (t *TriBandDense) TTriBand() TriBanded { - return TransposeTriBand{t} -} - -// RawTriBand returns the underlying blas64.TriangularBand used by the receiver. -// Changes to the blas64.TriangularBand.Data slice will be reflected in the original -// matrix, changes to the N, K, Stride, Uplo and Diag fields will not. -func (t *TriBandDense) RawTriBand() blas64.TriangularBand { - return t.mat -} - -// SetRawTriBand sets the underlying blas64.TriangularBand used by the receiver. -// Changes to elements in the receiver following the call will be reflected -// in the input. -// -// The supplied TriangularBand must not use blas.Unit storage format. -func (t *TriBandDense) SetRawTriBand(mat blas64.TriangularBand) { - if mat.Diag == blas.Unit { - panic("mat: cannot set TriBand with Unit storage") - } - t.mat = mat -} - -// DiagView returns the diagonal as a matrix backed by the original data. -func (t *TriBandDense) DiagView() Diagonal { - if t.mat.Diag == blas.Unit { - panic("mat: cannot take view of Unit diagonal") - } - n := t.mat.N - data := t.mat.Data - if !t.isUpper() { - data = data[t.mat.K:] - } - return &DiagDense{ - mat: blas64.Vector{ - N: n, - Inc: t.mat.Stride, - Data: data[:(n-1)*t.mat.Stride+1], - }, - } -} diff --git a/vendor/gonum.org/v1/gonum/mat/vector.go b/vendor/gonum.org/v1/gonum/mat/vector.go deleted file mode 100644 index 8191312bfe..0000000000 --- a/vendor/gonum.org/v1/gonum/mat/vector.go +++ /dev/null @@ -1,741 +0,0 @@ -// Copyright ©2013 The Gonum Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package mat - -import ( - "gonum.org/v1/gonum/blas" - "gonum.org/v1/gonum/blas/blas64" - "gonum.org/v1/gonum/internal/asm/f64" -) - -var ( - vector *VecDense - - _ Matrix = vector - _ Vector = vector - _ Reseter = vector -) - -// Vector is a vector. -type Vector interface { - Matrix - AtVec(int) float64 - Len() int -} - -// TransposeVec is a type for performing an implicit transpose of a Vector. -// It implements the Vector interface, returning values from the transpose -// of the vector within. -type TransposeVec struct { - Vector Vector -} - -// At returns the value of the element at row i and column j of the transposed -// matrix, that is, row j and column i of the Vector field. -func (t TransposeVec) At(i, j int) float64 { - return t.Vector.At(j, i) -} - -// AtVec returns the element at position i. It panics if i is out of bounds. -func (t TransposeVec) AtVec(i int) float64 { - return t.Vector.AtVec(i) -} - -// Dims returns the dimensions of the transposed vector. -func (t TransposeVec) Dims() (r, c int) { - c, r = t.Vector.Dims() - return r, c -} - -// T performs an implicit transpose by returning the Vector field. -func (t TransposeVec) T() Matrix { - return t.Vector -} - -// Len returns the number of columns in the vector. -func (t TransposeVec) Len() int { - return t.Vector.Len() -} - -// TVec performs an implicit transpose by returning the Vector field. -func (t TransposeVec) TVec() Vector { - return t.Vector -} - -// Untranspose returns the Vector field. -func (t TransposeVec) Untranspose() Matrix { - return t.Vector -} - -func (t TransposeVec) UntransposeVec() Vector { - return t.Vector -} - -// VecDense represents a column vector. -type VecDense struct { - mat blas64.Vector - // A BLAS vector can have a negative increment, but allowing this - // in the mat type complicates a lot of code, and doesn't gain anything. - // VecDense must have positive increment in this package. -} - -// NewVecDense creates a new VecDense of length n. If data == nil, -// a new slice is allocated for the backing slice. If len(data) == n, data is -// used as the backing slice, and changes to the elements of the returned VecDense -// will be reflected in data. If neither of these is true, NewVecDense will panic. -// NewVecDense will panic if n is zero. -func NewVecDense(n int, data []float64) *VecDense { - if n <= 0 { - if n == 0 { - panic(ErrZeroLength) - } - panic("mat: negative dimension") - } - if len(data) != n && data != nil { - panic(ErrShape) - } - if data == nil { - data = make([]float64, n) - } - return &VecDense{ - mat: blas64.Vector{ - N: n, - Inc: 1, - Data: data, - }, - } -} - -// SliceVec returns a new Vector that shares backing data with the receiver. -// The returned matrix starts at i of the receiver and extends k-i elements. -// SliceVec panics with ErrIndexOutOfRange if the slice is outside the capacity -// of the receiver. -func (v *VecDense) SliceVec(i, k int) Vector { - if i < 0 || k <= i || v.Cap() < k { - panic(ErrIndexOutOfRange) - } - return &VecDense{ - mat: blas64.Vector{ - N: k - i, - Inc: v.mat.Inc, - Data: v.mat.Data[i*v.mat.Inc : (k-1)*v.mat.Inc+1], - }, - } -} - -// Dims returns the number of rows and columns in the matrix. Columns is always 1 -// for a non-Reset vector. -func (v *VecDense) Dims() (r, c int) { - if v.IsZero() { - return 0, 0 - } - return v.mat.N, 1 -} - -// Caps returns the number of rows and columns in the backing matrix. Columns is always 1 -// for a non-Reset vector. -func (v *VecDense) Caps() (r, c int) { - if v.IsZero() { - return 0, 0 - } - return v.Cap(), 1 -} - -// Len returns the length of the vector. -func (v *VecDense) Len() int { - return v.mat.N -} - -// Cap returns the capacity of the vector. -func (v *VecDense) Cap() int { - if v.IsZero() { - return 0 - } - return (cap(v.mat.Data)-1)/v.mat.Inc + 1 -} - -// T performs an implicit transpose by returning the receiver inside a Transpose. -func (v *VecDense) T() Matrix { - return Transpose{v} -} - -// TVec performs an implicit transpose by returning the receiver inside a TransposeVec. -func (v *VecDense) TVec() Vector { - return TransposeVec{v} -} - -// Reset zeros the length of the vector so that it can be reused as the -// receiver of a dimensionally restricted operation. -// -// See the Reseter interface for more information. -func (v *VecDense) Reset() { - // No change of Inc or N to 0 may be - // made unless both are set to 0. - v.mat.Inc = 0 - v.mat.N = 0 - v.mat.Data = v.mat.Data[:0] -} - -// Zero sets all of the matrix elements to zero. -func (v *VecDense) Zero() { - for i := 0; i < v.mat.N; i++ { - v.mat.Data[v.mat.Inc*i] = 0 - } -} - -// CloneVec makes a copy of a into the receiver, overwriting the previous value -// of the receiver. -func (v *VecDense) CloneVec(a Vector) { - if v == a { - return - } - n := a.Len() - v.mat = blas64.Vector{ - N: n, - Inc: 1, - Data: use(v.mat.Data, n), - } - if r, ok := a.(RawVectorer); ok { - blas64.Copy(r.RawVector(), v.mat) - return - } - for i := 0; i < a.Len(); i++ { - v.SetVec(i, a.AtVec(i)) - } -} - -// VecDenseCopyOf returns a newly allocated copy of the elements of a. -func VecDenseCopyOf(a Vector) *VecDense { - v := &VecDense{} - v.CloneVec(a) - return v -} - -func (v *VecDense) RawVector() blas64.Vector { - return v.mat -} - -// CopyVec makes a copy of elements of a into the receiver. It is similar to the -// built-in copy; it copies as much as the overlap between the two vectors and -// returns the number of elements it copied. -func (v *VecDense) CopyVec(a Vector) int { - n := min(v.Len(), a.Len()) - if v == a { - return n - } - if r, ok := a.(RawVectorer); ok { - blas64.Copy(r.RawVector(), v.mat) - return n - } - for i := 0; i < n; i++ { - v.setVec(i, a.AtVec(i)) - } - return n -} - -// ScaleVec scales the vector a by alpha, placing the result in the receiver. -func (v *VecDense) ScaleVec(alpha float64, a Vector) { - n := a.Len() - - if v == a { - if v.mat.Inc == 1 { - f64.ScalUnitary(alpha, v.mat.Data) - return - } - f64.ScalInc(alpha, v.mat.Data, uintptr(n), uintptr(v.mat.Inc)) - return - } - - v.reuseAs(n) - - if rv, ok := a.(RawVectorer); ok { - mat := rv.RawVector() - v.checkOverlap(mat) - if v.mat.Inc == 1 && mat.Inc == 1 { - f64.ScalUnitaryTo(v.mat.Data, alpha, mat.Data) - return - } - f64.ScalIncTo(v.mat.Data, uintptr(v.mat.Inc), - alpha, mat.Data, uintptr(n), uintptr(mat.Inc)) - return - } - - for i := 0; i < n; i++ { - v.setVec(i, alpha*a.AtVec(i)) - } -} - -// AddScaledVec adds the vectors a and alpha*b, placing the result in the receiver. -func (v *VecDense) AddScaledVec(a Vector, alpha float64, b Vector) { - if alpha == 1 { - v.AddVec(a, b) - return - } - if alpha == -1 { - v.SubVec(a, b) - return - } - - ar := a.Len() - br := b.Len() - - if ar != br { - panic(ErrShape) - } - - var amat, bmat blas64.Vector - fast := true - aU, _ := untranspose(a) - if rv, ok := aU.(RawVectorer); ok { - amat = rv.RawVector() - if v != a { - v.checkOverlap(amat) - } - } else { - fast = false - } - bU, _ := untranspose(b) - if rv, ok := bU.(RawVectorer); ok { - bmat = rv.RawVector() - if v != b { - v.checkOverlap(bmat) - } - } else { - fast = false - } - - v.reuseAs(ar) - - switch { - case alpha == 0: // v <- a - if v == a { - return - } - v.CopyVec(a) - case v == a && v == b: // v <- v + alpha * v = (alpha + 1) * v - blas64.Scal(alpha+1, v.mat) - case !fast: // v <- a + alpha * b without blas64 support. - for i := 0; i < ar; i++ { - v.setVec(i, a.AtVec(i)+alpha*b.AtVec(i)) - } - case v == a && v != b: // v <- v + alpha * b - if v.mat.Inc == 1 && bmat.Inc == 1 { - // Fast path for a common case. - f64.AxpyUnitaryTo(v.mat.Data, alpha, bmat.Data, amat.Data) - } else { - f64.AxpyInc(alpha, bmat.Data, v.mat.Data, - uintptr(ar), uintptr(bmat.Inc), uintptr(v.mat.Inc), 0, 0) - } - default: // v <- a + alpha * b or v <- a + alpha * v - if v.mat.Inc == 1 && amat.Inc == 1 && bmat.Inc == 1 { - // Fast path for a common case. - f64.AxpyUnitaryTo(v.mat.Data, alpha, bmat.Data, amat.Data) - } else { - f64.AxpyIncTo(v.mat.Data, uintptr(v.mat.Inc), 0, - alpha, bmat.Data, amat.Data, - uintptr(ar), uintptr(bmat.Inc), uintptr(amat.Inc), 0, 0) - } - } -} - -// AddVec adds the vectors a and b, placing the result in the receiver. -func (v *VecDense) AddVec(a, b Vector) { - ar := a.Len() - br := b.Len() - - if ar != br { - panic(ErrShape) - } - - v.reuseAs(ar) - - aU, _ := untranspose(a) - bU, _ := untranspose(b) - - if arv, ok := aU.(RawVectorer); ok { - if brv, ok := bU.(RawVectorer); ok { - amat := arv.RawVector() - bmat := brv.RawVector() - - if v != a { - v.checkOverlap(amat) - } - if v != b { - v.checkOverlap(bmat) - } - - if v.mat.Inc == 1 && amat.Inc == 1 && bmat.Inc == 1 { - // Fast path for a common case. - f64.AxpyUnitaryTo(v.mat.Data, 1, bmat.Data, amat.Data) - return - } - f64.AxpyIncTo(v.mat.Data, uintptr(v.mat.Inc), 0, - 1, bmat.Data, amat.Data, - uintptr(ar), uintptr(bmat.Inc), uintptr(amat.Inc), 0, 0) - return - } - } - - for i := 0; i < ar; i++ { - v.setVec(i, a.AtVec(i)+b.AtVec(i)) - } -} - -// SubVec subtracts the vector b from a, placing the result in the receiver. -func (v *VecDense) SubVec(a, b Vector) { - ar := a.Len() - br := b.Len() - - if ar != br { - panic(ErrShape) - } - - v.reuseAs(ar) - - aU, _ := untranspose(a) - bU, _ := untranspose(b) - - if arv, ok := aU.(RawVectorer); ok { - if brv, ok := bU.(RawVectorer); ok { - amat := arv.RawVector() - bmat := brv.RawVector() - - if v != a { - v.checkOverlap(amat) - } - if v != b { - v.checkOverlap(bmat) - } - - if v.mat.Inc == 1 && amat.Inc == 1 && bmat.Inc == 1 { - // Fast path for a common case. - f64.AxpyUnitaryTo(v.mat.Data, -1, bmat.Data, amat.Data) - return - } - f64.AxpyIncTo(v.mat.Data, uintptr(v.mat.Inc), 0, - -1, bmat.Data, amat.Data, - uintptr(ar), uintptr(bmat.Inc), uintptr(amat.Inc), 0, 0) - return - } - } - - for i := 0; i < ar; i++ { - v.setVec(i, a.AtVec(i)-b.AtVec(i)) - } -} - -// MulElemVec performs element-wise multiplication of a and b, placing the result -// in the receiver. -func (v *VecDense) MulElemVec(a, b Vector) { - ar := a.Len() - br := b.Len() - - if ar != br { - panic(ErrShape) - } - - v.reuseAs(ar) - - aU, _ := untranspose(a) - bU, _ := untranspose(b) - - if arv, ok := aU.(RawVectorer); ok { - if brv, ok := bU.(RawVectorer); ok { - amat := arv.RawVector() - bmat := brv.RawVector() - - if v != a { - v.checkOverlap(amat) - } - if v != b { - v.checkOverlap(bmat) - } - - if v.mat.Inc == 1 && amat.Inc == 1 && bmat.Inc == 1 { - // Fast path for a common case. - for i, a := range amat.Data { - v.mat.Data[i] = a * bmat.Data[i] - } - return - } - var ia, ib int - for i := 0; i < ar; i++ { - v.setVec(i, amat.Data[ia]*bmat.Data[ib]) - ia += amat.Inc - ib += bmat.Inc - } - return - } - } - - for i := 0; i < ar; i++ { - v.setVec(i, a.AtVec(i)*b.AtVec(i)) - } -} - -// DivElemVec performs element-wise division of a by b, placing the result -// in the receiver. -func (v *VecDense) DivElemVec(a, b Vector) { - ar := a.Len() - br := b.Len() - - if ar != br { - panic(ErrShape) - } - - v.reuseAs(ar) - - aU, _ := untranspose(a) - bU, _ := untranspose(b) - - if arv, ok := aU.(RawVectorer); ok { - if brv, ok := bU.(RawVectorer); ok { - amat := arv.RawVector() - bmat := brv.RawVector() - - if v != a { - v.checkOverlap(amat) - } - if v != b { - v.checkOverlap(bmat) - } - - if v.mat.Inc == 1 && amat.Inc == 1 && bmat.Inc == 1 { - // Fast path for a common case. - for i, a := range amat.Data { - v.setVec(i, a/bmat.Data[i]) - } - return - } - var ia, ib int - for i := 0; i < ar; i++ { - v.setVec(i, amat.Data[ia]/bmat.Data[ib]) - ia += amat.Inc - ib += bmat.Inc - } - } - } - - for i := 0; i < ar; i++ { - v.setVec(i, a.AtVec(i)/b.AtVec(i)) - } -} - -// MulVec computes a * b. The result is stored into the receiver. -// MulVec panics if the number of columns in a does not equal the number of rows in b -// or if the number of columns in b does not equal 1. -func (v *VecDense) MulVec(a Matrix, b Vector) { - r, c := a.Dims() - br, bc := b.Dims() - if c != br || bc != 1 { - panic(ErrShape) - } - - aU, trans := untranspose(a) - var bmat blas64.Vector - fast := true - bU, _ := untranspose(b) - if rv, ok := bU.(RawVectorer); ok { - bmat = rv.RawVector() - if v != b { - v.checkOverlap(bmat) - } - } else { - fast = false - } - - v.reuseAs(r) - var restore func() - if v == aU { - v, restore = v.isolatedWorkspace(aU.(*VecDense)) - defer restore() - } else if v == b { - v, restore = v.isolatedWorkspace(b) - defer restore() - } - - // TODO(kortschak): Improve the non-fast paths. - switch aU := aU.(type) { - case Vector: - if b.Len() == 1 { - // {n,1} x {1,1} - v.ScaleVec(b.AtVec(0), aU) - return - } - - // {1,n} x {n,1} - if fast { - if rv, ok := aU.(RawVectorer); ok { - amat := rv.RawVector() - if v != aU { - v.checkOverlap(amat) - } - - if amat.Inc == 1 && bmat.Inc == 1 { - // Fast path for a common case. - v.setVec(0, f64.DotUnitary(amat.Data, bmat.Data)) - return - } - v.setVec(0, f64.DotInc(amat.Data, bmat.Data, - uintptr(c), uintptr(amat.Inc), uintptr(bmat.Inc), 0, 0)) - return - } - } - var sum float64 - for i := 0; i < c; i++ { - sum += aU.AtVec(i) * b.AtVec(i) - } - v.setVec(0, sum) - return - case RawSymmetricer: - if fast { - amat := aU.RawSymmetric() - // We don't know that a is a *SymDense, so make - // a temporary SymDense to check overlap. - (&SymDense{mat: amat}).checkOverlap(v.asGeneral()) - blas64.Symv(1, amat, bmat, 0, v.mat) - return - } - case RawTriangular: - v.CopyVec(b) - amat := aU.RawTriangular() - // We don't know that a is a *TriDense, so make - // a temporary TriDense to check overlap. - (&TriDense{mat: amat}).checkOverlap(v.asGeneral()) - ta := blas.NoTrans - if trans { - ta = blas.Trans - } - blas64.Trmv(ta, amat, v.mat) - case RawMatrixer: - if fast { - amat := aU.RawMatrix() - // We don't know that a is a *Dense, so make - // a temporary Dense to check overlap. - (&Dense{mat: amat}).checkOverlap(v.asGeneral()) - t := blas.NoTrans - if trans { - t = blas.Trans - } - blas64.Gemv(t, 1, amat, bmat, 0, v.mat) - return - } - default: - if fast { - for i := 0; i < r; i++ { - var f float64 - for j := 0; j < c; j++ { - f += a.At(i, j) * bmat.Data[j*bmat.Inc] - } - v.setVec(i, f) - } - return - } - } - - for i := 0; i < r; i++ { - var f float64 - for j := 0; j < c; j++ { - f += a.At(i, j) * b.AtVec(j) - } - v.setVec(i, f) - } -} - -// reuseAs resizes an empty vector to a r×1 vector, -// or checks that a non-empty matrix is r×1. -func (v *VecDense) reuseAs(r int) { - if r == 0 { - panic(ErrZeroLength) - } - if v.IsZero() { - v.mat = blas64.Vector{ - N: r, - Inc: 1, - Data: use(v.mat.Data, r), - } - return - } - if r != v.mat.N { - panic(ErrShape) - } -} - -// IsZero returns whether the receiver is zero-sized. Zero-sized vectors can be the -// receiver for size-restricted operations. VecDenses can be zeroed using Reset. -func (v *VecDense) IsZero() bool { - // It must be the case that v.Dims() returns - // zeros in this case. See comment in Reset(). - return v.mat.Inc == 0 -} - -func (v *VecDense) isolatedWorkspace(a Vector) (n *VecDense, restore func()) { - l := a.Len() - if l == 0 { - panic(ErrZeroLength) - } - n = getWorkspaceVec(l, false) - return n, func() { - v.CopyVec(n) - putWorkspaceVec(n) - } -} - -// asDense returns a Dense representation of the receiver with the same -// underlying data. -func (v *VecDense) asDense() *Dense { - return &Dense{ - mat: v.asGeneral(), - capRows: v.mat.N, - capCols: 1, - } -} - -// asGeneral returns a blas64.General representation of the receiver with the -// same underlying data. -func (v *VecDense) asGeneral() blas64.General { - return blas64.General{ - Rows: v.mat.N, - Cols: 1, - Stride: v.mat.Inc, - Data: v.mat.Data, - } -} - -// ColViewOf reflects the column j of the RawMatrixer m, into the receiver -// backed by the same underlying data. The length of the receiver must either be -// zero or match the number of rows in m. -func (v *VecDense) ColViewOf(m RawMatrixer, j int) { - rm := m.RawMatrix() - - if j >= rm.Cols || j < 0 { - panic(ErrColAccess) - } - if !v.IsZero() && v.mat.N != rm.Rows { - panic(ErrShape) - } - - v.mat.Inc = rm.Stride - v.mat.Data = rm.Data[j : (rm.Rows-1)*rm.Stride+j+1] - v.mat.N = rm.Rows -} - -// RowViewOf reflects the row i of the RawMatrixer m, into the receiver -// backed by the same underlying data. The length of the receiver must either be -// zero or match the number of columns in m. -func (v *VecDense) RowViewOf(m RawMatrixer, i int) { - rm := m.RawMatrix() - - if i >= rm.Rows || i < 0 { - panic(ErrRowAccess) - } - if !v.IsZero() && v.mat.N != rm.Cols { - panic(ErrShape) - } - - v.mat.Inc = 1 - v.mat.Data = rm.Data[i*rm.Stride : i*rm.Stride+rm.Cols] - v.mat.N = rm.Cols -} diff --git a/vendor/honnef.co/go/tools/pattern/match.go b/vendor/honnef.co/go/tools/pattern/match.go index ff039baa75..2c036ed19b 100644 --- a/vendor/honnef.co/go/tools/pattern/match.go +++ b/vendor/honnef.co/go/tools/pattern/match.go @@ -242,6 +242,28 @@ func match(m *Matcher, l, r interface{}) (interface{}, bool) { } } + { + ln, ok1 := l.([]*ast.Field) + rn, ok2 := r.([]*ast.Field) + if ok1 || ok2 { + if ok1 && !ok2 { + rn = []*ast.Field{r.(*ast.Field)} + } else if !ok1 && ok2 { + ln = []*ast.Field{l.(*ast.Field)} + } + + if len(ln) != len(rn) { + return nil, false + } + for i, ll := range ln { + if _, ok := match(m, ll, rn[i]); !ok { + return nil, false + } + } + return r, true + } + } + panic(fmt.Sprintf("unsupported comparison: %T and %T", l, r)) } diff --git a/vendor/honnef.co/go/tools/staticcheck/lint.go b/vendor/honnef.co/go/tools/staticcheck/lint.go index 16b6dbd848..22b6bbc2dc 100644 --- a/vendor/honnef.co/go/tools/staticcheck/lint.go +++ b/vendor/honnef.co/go/tools/staticcheck/lint.go @@ -1721,6 +1721,10 @@ func CheckUnreadVariableValues(pass *analysis.Pass) (interface{}, error) { continue } + if _, ok := val.(*ir.Const); ok { + // a zero-valued constant, for example in 'foo := []string(nil)' + continue + } if !hasUse(val, nil) { report.Report(pass, assign, fmt.Sprintf("this value of %s is never used", lhs)) } diff --git a/vendor/honnef.co/go/tools/version/version.go b/vendor/honnef.co/go/tools/version/version.go index eed7b0def9..79066e90a8 100644 --- a/vendor/honnef.co/go/tools/version/version.go +++ b/vendor/honnef.co/go/tools/version/version.go @@ -7,7 +7,7 @@ import ( "runtime" ) -const Version = "2020.1.4" +const Version = "2020.1.5" // version returns a version descriptor and reports whether the // version is a known release. diff --git a/vendor/k8s.io/api/admission/v1/generated.pb.go b/vendor/k8s.io/api/admission/v1/generated.pb.go index e6b4f7240e..ed5b5dfe12 100644 --- a/vendor/k8s.io/api/admission/v1/generated.pb.go +++ b/vendor/k8s.io/api/admission/v1/generated.pb.go @@ -45,7 +45,7 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *AdmissionRequest) Reset() { *m = AdmissionRequest{} } func (*AdmissionRequest) ProtoMessage() {} @@ -1660,6 +1660,7 @@ func (m *AdmissionReview) Unmarshal(dAtA []byte) error { func skipGenerated(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -1691,10 +1692,8 @@ func skipGenerated(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -1715,55 +1714,30 @@ func skipGenerated(dAtA []byte) (n int, err error) { return 0, ErrInvalidLengthGenerated } iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - return iNdEx, nil case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipGenerated(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenerated + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenerated + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group") ) diff --git a/vendor/k8s.io/api/admissionregistration/v1/generated.pb.go b/vendor/k8s.io/api/admissionregistration/v1/generated.pb.go index 1acb6345a6..adc47be7fa 100644 --- a/vendor/k8s.io/api/admissionregistration/v1/generated.pb.go +++ b/vendor/k8s.io/api/admissionregistration/v1/generated.pb.go @@ -42,7 +42,7 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *MutatingWebhook) Reset() { *m = MutatingWebhook{} } func (*MutatingWebhook) ProtoMessage() {} @@ -3360,6 +3360,7 @@ func (m *WebhookClientConfig) Unmarshal(dAtA []byte) error { func skipGenerated(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -3391,10 +3392,8 @@ func skipGenerated(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -3415,55 +3414,30 @@ func skipGenerated(dAtA []byte) (n int, err error) { return 0, ErrInvalidLengthGenerated } iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - return iNdEx, nil case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipGenerated(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenerated + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenerated + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group") ) diff --git a/vendor/k8s.io/api/admissionregistration/v1beta1/generated.pb.go b/vendor/k8s.io/api/admissionregistration/v1beta1/generated.pb.go index d84d8b6342..c98aa7477b 100644 --- a/vendor/k8s.io/api/admissionregistration/v1beta1/generated.pb.go +++ b/vendor/k8s.io/api/admissionregistration/v1beta1/generated.pb.go @@ -42,7 +42,7 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *MutatingWebhook) Reset() { *m = MutatingWebhook{} } func (*MutatingWebhook) ProtoMessage() {} @@ -3361,6 +3361,7 @@ func (m *WebhookClientConfig) Unmarshal(dAtA []byte) error { func skipGenerated(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -3392,10 +3393,8 @@ func skipGenerated(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -3416,55 +3415,30 @@ func skipGenerated(dAtA []byte) (n int, err error) { return 0, ErrInvalidLengthGenerated } iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - return iNdEx, nil case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipGenerated(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenerated + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenerated + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group") ) diff --git a/vendor/k8s.io/api/apps/v1/generated.pb.go b/vendor/k8s.io/api/apps/v1/generated.pb.go index 425144d857..6ef25f50f9 100644 --- a/vendor/k8s.io/api/apps/v1/generated.pb.go +++ b/vendor/k8s.io/api/apps/v1/generated.pb.go @@ -46,7 +46,7 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *ControllerRevision) Reset() { *m = ControllerRevision{} } func (*ControllerRevision) ProtoMessage() {} @@ -8155,6 +8155,7 @@ func (m *StatefulSetUpdateStrategy) Unmarshal(dAtA []byte) error { func skipGenerated(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -8186,10 +8187,8 @@ func skipGenerated(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -8210,55 +8209,30 @@ func skipGenerated(dAtA []byte) (n int, err error) { return 0, ErrInvalidLengthGenerated } iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - return iNdEx, nil case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipGenerated(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenerated + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenerated + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group") ) diff --git a/vendor/k8s.io/api/apps/v1beta1/generated.pb.go b/vendor/k8s.io/api/apps/v1beta1/generated.pb.go index 921e055cf8..f81b559013 100644 --- a/vendor/k8s.io/api/apps/v1beta1/generated.pb.go +++ b/vendor/k8s.io/api/apps/v1beta1/generated.pb.go @@ -47,7 +47,7 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *ControllerRevision) Reset() { *m = ControllerRevision{} } func (*ControllerRevision) ProtoMessage() {} @@ -6163,6 +6163,7 @@ func (m *StatefulSetUpdateStrategy) Unmarshal(dAtA []byte) error { func skipGenerated(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -6194,10 +6195,8 @@ func skipGenerated(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -6218,55 +6217,30 @@ func skipGenerated(dAtA []byte) (n int, err error) { return 0, ErrInvalidLengthGenerated } iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - return iNdEx, nil case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipGenerated(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenerated + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenerated + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group") ) diff --git a/vendor/k8s.io/api/apps/v1beta2/generated.pb.go b/vendor/k8s.io/api/apps/v1beta2/generated.pb.go index 624bb94259..8a9f20052b 100644 --- a/vendor/k8s.io/api/apps/v1beta2/generated.pb.go +++ b/vendor/k8s.io/api/apps/v1beta2/generated.pb.go @@ -47,7 +47,7 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *ControllerRevision) Reset() { *m = ControllerRevision{} } func (*ControllerRevision) ProtoMessage() {} @@ -8931,6 +8931,7 @@ func (m *StatefulSetUpdateStrategy) Unmarshal(dAtA []byte) error { func skipGenerated(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -8962,10 +8963,8 @@ func skipGenerated(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -8986,55 +8985,30 @@ func skipGenerated(dAtA []byte) (n int, err error) { return 0, ErrInvalidLengthGenerated } iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - return iNdEx, nil case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipGenerated(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenerated + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenerated + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group") ) diff --git a/vendor/k8s.io/api/auditregistration/v1alpha1/generated.pb.go b/vendor/k8s.io/api/auditregistration/v1alpha1/generated.pb.go index 003cc30bfb..f8eec3df2b 100644 --- a/vendor/k8s.io/api/auditregistration/v1alpha1/generated.pb.go +++ b/vendor/k8s.io/api/auditregistration/v1alpha1/generated.pb.go @@ -41,7 +41,7 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *AuditSink) Reset() { *m = AuditSink{} } func (*AuditSink) ProtoMessage() {} @@ -1947,6 +1947,7 @@ func (m *WebhookThrottleConfig) Unmarshal(dAtA []byte) error { func skipGenerated(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -1978,10 +1979,8 @@ func skipGenerated(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -2002,55 +2001,30 @@ func skipGenerated(dAtA []byte) (n int, err error) { return 0, ErrInvalidLengthGenerated } iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - return iNdEx, nil case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipGenerated(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenerated + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenerated + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group") ) diff --git a/vendor/k8s.io/api/authentication/v1/generated.pb.go b/vendor/k8s.io/api/authentication/v1/generated.pb.go index 02be20dec5..6524f8ca96 100644 --- a/vendor/k8s.io/api/authentication/v1/generated.pb.go +++ b/vendor/k8s.io/api/authentication/v1/generated.pb.go @@ -44,7 +44,7 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *BoundObjectReference) Reset() { *m = BoundObjectReference{} } func (*BoundObjectReference) ProtoMessage() {} @@ -2498,6 +2498,7 @@ func (m *UserInfo) Unmarshal(dAtA []byte) error { func skipGenerated(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -2529,10 +2530,8 @@ func skipGenerated(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -2553,55 +2552,30 @@ func skipGenerated(dAtA []byte) (n int, err error) { return 0, ErrInvalidLengthGenerated } iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - return iNdEx, nil case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipGenerated(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenerated + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenerated + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group") ) diff --git a/vendor/k8s.io/api/authentication/v1/types.go b/vendor/k8s.io/api/authentication/v1/types.go index c48b03691e..668b720380 100644 --- a/vendor/k8s.io/api/authentication/v1/types.go +++ b/vendor/k8s.io/api/authentication/v1/types.go @@ -40,7 +40,7 @@ const ( // +genclient // +genclient:nonNamespaced -// +genclient:noVerbs +// +genclient:onlyVerbs=create // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // TokenReview attempts to authenticate a token to a known user. diff --git a/vendor/k8s.io/api/authentication/v1beta1/generated.pb.go b/vendor/k8s.io/api/authentication/v1beta1/generated.pb.go index 0721bda875..6c391dbfa3 100644 --- a/vendor/k8s.io/api/authentication/v1beta1/generated.pb.go +++ b/vendor/k8s.io/api/authentication/v1beta1/generated.pb.go @@ -42,7 +42,7 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *ExtraValue) Reset() { *m = ExtraValue{} } func (*ExtraValue) ProtoMessage() {} @@ -1475,6 +1475,7 @@ func (m *UserInfo) Unmarshal(dAtA []byte) error { func skipGenerated(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -1506,10 +1507,8 @@ func skipGenerated(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -1530,55 +1529,30 @@ func skipGenerated(dAtA []byte) (n int, err error) { return 0, ErrInvalidLengthGenerated } iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - return iNdEx, nil case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipGenerated(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenerated + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenerated + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group") ) diff --git a/vendor/k8s.io/api/authentication/v1beta1/types.go b/vendor/k8s.io/api/authentication/v1beta1/types.go index 0b6cba822a..0083fb0e3d 100644 --- a/vendor/k8s.io/api/authentication/v1beta1/types.go +++ b/vendor/k8s.io/api/authentication/v1beta1/types.go @@ -24,7 +24,7 @@ import ( // +genclient // +genclient:nonNamespaced -// +genclient:noVerbs +// +genclient:onlyVerbs=create // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // TokenReview attempts to authenticate a token to a known user. diff --git a/vendor/k8s.io/api/authorization/v1/generated.pb.go b/vendor/k8s.io/api/authorization/v1/generated.pb.go index 0dc01bc92d..dbc0bdc71d 100644 --- a/vendor/k8s.io/api/authorization/v1/generated.pb.go +++ b/vendor/k8s.io/api/authorization/v1/generated.pb.go @@ -42,7 +42,7 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *ExtraValue) Reset() { *m = ExtraValue{} } func (*ExtraValue) ProtoMessage() {} @@ -4004,6 +4004,7 @@ func (m *SubjectRulesReviewStatus) Unmarshal(dAtA []byte) error { func skipGenerated(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -4035,10 +4036,8 @@ func skipGenerated(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -4059,55 +4058,30 @@ func skipGenerated(dAtA []byte) (n int, err error) { return 0, ErrInvalidLengthGenerated } iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - return iNdEx, nil case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipGenerated(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenerated + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenerated + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group") ) diff --git a/vendor/k8s.io/api/authorization/v1/types.go b/vendor/k8s.io/api/authorization/v1/types.go index 86b05c54e3..be8913eb4f 100644 --- a/vendor/k8s.io/api/authorization/v1/types.go +++ b/vendor/k8s.io/api/authorization/v1/types.go @@ -24,7 +24,7 @@ import ( // +genclient // +genclient:nonNamespaced -// +genclient:noVerbs +// +genclient:onlyVerbs=create // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // SubjectAccessReview checks whether or not a user or group can perform an action. @@ -43,7 +43,7 @@ type SubjectAccessReview struct { // +genclient // +genclient:nonNamespaced -// +genclient:noVerbs +// +genclient:onlyVerbs=create // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // SelfSubjectAccessReview checks whether or the current user can perform an action. Not filling in a @@ -63,7 +63,7 @@ type SelfSubjectAccessReview struct { } // +genclient -// +genclient:noVerbs +// +genclient:onlyVerbs=create // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // LocalSubjectAccessReview checks whether or not a user or group can perform an action in a given namespace. @@ -189,7 +189,7 @@ type SubjectAccessReviewStatus struct { // +genclient // +genclient:nonNamespaced -// +genclient:noVerbs +// +genclient:onlyVerbs=create // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // SelfSubjectRulesReview enumerates the set of actions the current user can perform within a namespace. diff --git a/vendor/k8s.io/api/authorization/v1beta1/generated.pb.go b/vendor/k8s.io/api/authorization/v1beta1/generated.pb.go index f0def20b90..647c0c582b 100644 --- a/vendor/k8s.io/api/authorization/v1beta1/generated.pb.go +++ b/vendor/k8s.io/api/authorization/v1beta1/generated.pb.go @@ -42,7 +42,7 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *ExtraValue) Reset() { *m = ExtraValue{} } func (*ExtraValue) ProtoMessage() {} @@ -4004,6 +4004,7 @@ func (m *SubjectRulesReviewStatus) Unmarshal(dAtA []byte) error { func skipGenerated(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -4035,10 +4036,8 @@ func skipGenerated(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -4059,55 +4058,30 @@ func skipGenerated(dAtA []byte) (n int, err error) { return 0, ErrInvalidLengthGenerated } iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - return iNdEx, nil case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipGenerated(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenerated + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenerated + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group") ) diff --git a/vendor/k8s.io/api/authorization/v1beta1/types.go b/vendor/k8s.io/api/authorization/v1beta1/types.go index 618ff8c0f1..cf117d268c 100644 --- a/vendor/k8s.io/api/authorization/v1beta1/types.go +++ b/vendor/k8s.io/api/authorization/v1beta1/types.go @@ -24,7 +24,7 @@ import ( // +genclient // +genclient:nonNamespaced -// +genclient:noVerbs +// +genclient:onlyVerbs=create // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // SubjectAccessReview checks whether or not a user or group can perform an action. @@ -43,7 +43,7 @@ type SubjectAccessReview struct { // +genclient // +genclient:nonNamespaced -// +genclient:noVerbs +// +genclient:onlyVerbs=create // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // SelfSubjectAccessReview checks whether or the current user can perform an action. Not filling in a @@ -63,7 +63,7 @@ type SelfSubjectAccessReview struct { } // +genclient -// +genclient:noVerbs +// +genclient:onlyVerbs=create // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // LocalSubjectAccessReview checks whether or not a user or group can perform an action in a given namespace. @@ -189,7 +189,7 @@ type SubjectAccessReviewStatus struct { // +genclient // +genclient:nonNamespaced -// +genclient:noVerbs +// +genclient:onlyVerbs=create // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // SelfSubjectRulesReview enumerates the set of actions the current user can perform within a namespace. diff --git a/vendor/k8s.io/api/autoscaling/v1/generated.pb.go b/vendor/k8s.io/api/autoscaling/v1/generated.pb.go index 174e6f5f88..1e3d89076d 100644 --- a/vendor/k8s.io/api/autoscaling/v1/generated.pb.go +++ b/vendor/k8s.io/api/autoscaling/v1/generated.pb.go @@ -45,7 +45,7 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *CrossVersionObjectReference) Reset() { *m = CrossVersionObjectReference{} } func (*CrossVersionObjectReference) ProtoMessage() {} @@ -5487,6 +5487,7 @@ func (m *ScaleStatus) Unmarshal(dAtA []byte) error { func skipGenerated(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -5518,10 +5519,8 @@ func skipGenerated(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -5542,55 +5541,30 @@ func skipGenerated(dAtA []byte) (n int, err error) { return 0, ErrInvalidLengthGenerated } iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - return iNdEx, nil case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipGenerated(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenerated + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenerated + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group") ) diff --git a/vendor/k8s.io/api/autoscaling/v2beta1/generated.pb.go b/vendor/k8s.io/api/autoscaling/v2beta1/generated.pb.go index 0b6ed38158..e129e41b8b 100644 --- a/vendor/k8s.io/api/autoscaling/v2beta1/generated.pb.go +++ b/vendor/k8s.io/api/autoscaling/v2beta1/generated.pb.go @@ -45,7 +45,7 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *CrossVersionObjectReference) Reset() { *m = CrossVersionObjectReference{} } func (*CrossVersionObjectReference) ProtoMessage() {} @@ -5012,6 +5012,7 @@ func (m *ResourceMetricStatus) Unmarshal(dAtA []byte) error { func skipGenerated(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -5043,10 +5044,8 @@ func skipGenerated(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -5067,55 +5066,30 @@ func skipGenerated(dAtA []byte) (n int, err error) { return 0, ErrInvalidLengthGenerated } iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - return iNdEx, nil case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipGenerated(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenerated + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenerated + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group") ) diff --git a/vendor/k8s.io/api/autoscaling/v2beta2/generated.pb.go b/vendor/k8s.io/api/autoscaling/v2beta2/generated.pb.go index 23bc5b9832..c69d6cb9e7 100644 --- a/vendor/k8s.io/api/autoscaling/v2beta2/generated.pb.go +++ b/vendor/k8s.io/api/autoscaling/v2beta2/generated.pb.go @@ -45,7 +45,7 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *CrossVersionObjectReference) Reset() { *m = CrossVersionObjectReference{} } func (*CrossVersionObjectReference) ProtoMessage() {} @@ -131,10 +131,66 @@ func (m *ExternalMetricStatus) XXX_DiscardUnknown() { var xxx_messageInfo_ExternalMetricStatus proto.InternalMessageInfo +func (m *HPAScalingPolicy) Reset() { *m = HPAScalingPolicy{} } +func (*HPAScalingPolicy) ProtoMessage() {} +func (*HPAScalingPolicy) Descriptor() ([]byte, []int) { + return fileDescriptor_592ad94d7d6be24f, []int{3} +} +func (m *HPAScalingPolicy) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *HPAScalingPolicy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *HPAScalingPolicy) XXX_Merge(src proto.Message) { + xxx_messageInfo_HPAScalingPolicy.Merge(m, src) +} +func (m *HPAScalingPolicy) XXX_Size() int { + return m.Size() +} +func (m *HPAScalingPolicy) XXX_DiscardUnknown() { + xxx_messageInfo_HPAScalingPolicy.DiscardUnknown(m) +} + +var xxx_messageInfo_HPAScalingPolicy proto.InternalMessageInfo + +func (m *HPAScalingRules) Reset() { *m = HPAScalingRules{} } +func (*HPAScalingRules) ProtoMessage() {} +func (*HPAScalingRules) Descriptor() ([]byte, []int) { + return fileDescriptor_592ad94d7d6be24f, []int{4} +} +func (m *HPAScalingRules) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *HPAScalingRules) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *HPAScalingRules) XXX_Merge(src proto.Message) { + xxx_messageInfo_HPAScalingRules.Merge(m, src) +} +func (m *HPAScalingRules) XXX_Size() int { + return m.Size() +} +func (m *HPAScalingRules) XXX_DiscardUnknown() { + xxx_messageInfo_HPAScalingRules.DiscardUnknown(m) +} + +var xxx_messageInfo_HPAScalingRules proto.InternalMessageInfo + func (m *HorizontalPodAutoscaler) Reset() { *m = HorizontalPodAutoscaler{} } func (*HorizontalPodAutoscaler) ProtoMessage() {} func (*HorizontalPodAutoscaler) Descriptor() ([]byte, []int) { - return fileDescriptor_592ad94d7d6be24f, []int{3} + return fileDescriptor_592ad94d7d6be24f, []int{5} } func (m *HorizontalPodAutoscaler) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -159,10 +215,38 @@ func (m *HorizontalPodAutoscaler) XXX_DiscardUnknown() { var xxx_messageInfo_HorizontalPodAutoscaler proto.InternalMessageInfo +func (m *HorizontalPodAutoscalerBehavior) Reset() { *m = HorizontalPodAutoscalerBehavior{} } +func (*HorizontalPodAutoscalerBehavior) ProtoMessage() {} +func (*HorizontalPodAutoscalerBehavior) Descriptor() ([]byte, []int) { + return fileDescriptor_592ad94d7d6be24f, []int{6} +} +func (m *HorizontalPodAutoscalerBehavior) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *HorizontalPodAutoscalerBehavior) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *HorizontalPodAutoscalerBehavior) XXX_Merge(src proto.Message) { + xxx_messageInfo_HorizontalPodAutoscalerBehavior.Merge(m, src) +} +func (m *HorizontalPodAutoscalerBehavior) XXX_Size() int { + return m.Size() +} +func (m *HorizontalPodAutoscalerBehavior) XXX_DiscardUnknown() { + xxx_messageInfo_HorizontalPodAutoscalerBehavior.DiscardUnknown(m) +} + +var xxx_messageInfo_HorizontalPodAutoscalerBehavior proto.InternalMessageInfo + func (m *HorizontalPodAutoscalerCondition) Reset() { *m = HorizontalPodAutoscalerCondition{} } func (*HorizontalPodAutoscalerCondition) ProtoMessage() {} func (*HorizontalPodAutoscalerCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_592ad94d7d6be24f, []int{4} + return fileDescriptor_592ad94d7d6be24f, []int{7} } func (m *HorizontalPodAutoscalerCondition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -190,7 +274,7 @@ var xxx_messageInfo_HorizontalPodAutoscalerCondition proto.InternalMessageInfo func (m *HorizontalPodAutoscalerList) Reset() { *m = HorizontalPodAutoscalerList{} } func (*HorizontalPodAutoscalerList) ProtoMessage() {} func (*HorizontalPodAutoscalerList) Descriptor() ([]byte, []int) { - return fileDescriptor_592ad94d7d6be24f, []int{5} + return fileDescriptor_592ad94d7d6be24f, []int{8} } func (m *HorizontalPodAutoscalerList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -218,7 +302,7 @@ var xxx_messageInfo_HorizontalPodAutoscalerList proto.InternalMessageInfo func (m *HorizontalPodAutoscalerSpec) Reset() { *m = HorizontalPodAutoscalerSpec{} } func (*HorizontalPodAutoscalerSpec) ProtoMessage() {} func (*HorizontalPodAutoscalerSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_592ad94d7d6be24f, []int{6} + return fileDescriptor_592ad94d7d6be24f, []int{9} } func (m *HorizontalPodAutoscalerSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -246,7 +330,7 @@ var xxx_messageInfo_HorizontalPodAutoscalerSpec proto.InternalMessageInfo func (m *HorizontalPodAutoscalerStatus) Reset() { *m = HorizontalPodAutoscalerStatus{} } func (*HorizontalPodAutoscalerStatus) ProtoMessage() {} func (*HorizontalPodAutoscalerStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_592ad94d7d6be24f, []int{7} + return fileDescriptor_592ad94d7d6be24f, []int{10} } func (m *HorizontalPodAutoscalerStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -274,7 +358,7 @@ var xxx_messageInfo_HorizontalPodAutoscalerStatus proto.InternalMessageInfo func (m *MetricIdentifier) Reset() { *m = MetricIdentifier{} } func (*MetricIdentifier) ProtoMessage() {} func (*MetricIdentifier) Descriptor() ([]byte, []int) { - return fileDescriptor_592ad94d7d6be24f, []int{8} + return fileDescriptor_592ad94d7d6be24f, []int{11} } func (m *MetricIdentifier) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -302,7 +386,7 @@ var xxx_messageInfo_MetricIdentifier proto.InternalMessageInfo func (m *MetricSpec) Reset() { *m = MetricSpec{} } func (*MetricSpec) ProtoMessage() {} func (*MetricSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_592ad94d7d6be24f, []int{9} + return fileDescriptor_592ad94d7d6be24f, []int{12} } func (m *MetricSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -330,7 +414,7 @@ var xxx_messageInfo_MetricSpec proto.InternalMessageInfo func (m *MetricStatus) Reset() { *m = MetricStatus{} } func (*MetricStatus) ProtoMessage() {} func (*MetricStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_592ad94d7d6be24f, []int{10} + return fileDescriptor_592ad94d7d6be24f, []int{13} } func (m *MetricStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -358,7 +442,7 @@ var xxx_messageInfo_MetricStatus proto.InternalMessageInfo func (m *MetricTarget) Reset() { *m = MetricTarget{} } func (*MetricTarget) ProtoMessage() {} func (*MetricTarget) Descriptor() ([]byte, []int) { - return fileDescriptor_592ad94d7d6be24f, []int{11} + return fileDescriptor_592ad94d7d6be24f, []int{14} } func (m *MetricTarget) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -386,7 +470,7 @@ var xxx_messageInfo_MetricTarget proto.InternalMessageInfo func (m *MetricValueStatus) Reset() { *m = MetricValueStatus{} } func (*MetricValueStatus) ProtoMessage() {} func (*MetricValueStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_592ad94d7d6be24f, []int{12} + return fileDescriptor_592ad94d7d6be24f, []int{15} } func (m *MetricValueStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -414,7 +498,7 @@ var xxx_messageInfo_MetricValueStatus proto.InternalMessageInfo func (m *ObjectMetricSource) Reset() { *m = ObjectMetricSource{} } func (*ObjectMetricSource) ProtoMessage() {} func (*ObjectMetricSource) Descriptor() ([]byte, []int) { - return fileDescriptor_592ad94d7d6be24f, []int{13} + return fileDescriptor_592ad94d7d6be24f, []int{16} } func (m *ObjectMetricSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -442,7 +526,7 @@ var xxx_messageInfo_ObjectMetricSource proto.InternalMessageInfo func (m *ObjectMetricStatus) Reset() { *m = ObjectMetricStatus{} } func (*ObjectMetricStatus) ProtoMessage() {} func (*ObjectMetricStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_592ad94d7d6be24f, []int{14} + return fileDescriptor_592ad94d7d6be24f, []int{17} } func (m *ObjectMetricStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -470,7 +554,7 @@ var xxx_messageInfo_ObjectMetricStatus proto.InternalMessageInfo func (m *PodsMetricSource) Reset() { *m = PodsMetricSource{} } func (*PodsMetricSource) ProtoMessage() {} func (*PodsMetricSource) Descriptor() ([]byte, []int) { - return fileDescriptor_592ad94d7d6be24f, []int{15} + return fileDescriptor_592ad94d7d6be24f, []int{18} } func (m *PodsMetricSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -498,7 +582,7 @@ var xxx_messageInfo_PodsMetricSource proto.InternalMessageInfo func (m *PodsMetricStatus) Reset() { *m = PodsMetricStatus{} } func (*PodsMetricStatus) ProtoMessage() {} func (*PodsMetricStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_592ad94d7d6be24f, []int{16} + return fileDescriptor_592ad94d7d6be24f, []int{19} } func (m *PodsMetricStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -526,7 +610,7 @@ var xxx_messageInfo_PodsMetricStatus proto.InternalMessageInfo func (m *ResourceMetricSource) Reset() { *m = ResourceMetricSource{} } func (*ResourceMetricSource) ProtoMessage() {} func (*ResourceMetricSource) Descriptor() ([]byte, []int) { - return fileDescriptor_592ad94d7d6be24f, []int{17} + return fileDescriptor_592ad94d7d6be24f, []int{20} } func (m *ResourceMetricSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -554,7 +638,7 @@ var xxx_messageInfo_ResourceMetricSource proto.InternalMessageInfo func (m *ResourceMetricStatus) Reset() { *m = ResourceMetricStatus{} } func (*ResourceMetricStatus) ProtoMessage() {} func (*ResourceMetricStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_592ad94d7d6be24f, []int{18} + return fileDescriptor_592ad94d7d6be24f, []int{21} } func (m *ResourceMetricStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -583,7 +667,10 @@ func init() { proto.RegisterType((*CrossVersionObjectReference)(nil), "k8s.io.api.autoscaling.v2beta2.CrossVersionObjectReference") proto.RegisterType((*ExternalMetricSource)(nil), "k8s.io.api.autoscaling.v2beta2.ExternalMetricSource") proto.RegisterType((*ExternalMetricStatus)(nil), "k8s.io.api.autoscaling.v2beta2.ExternalMetricStatus") + proto.RegisterType((*HPAScalingPolicy)(nil), "k8s.io.api.autoscaling.v2beta2.HPAScalingPolicy") + proto.RegisterType((*HPAScalingRules)(nil), "k8s.io.api.autoscaling.v2beta2.HPAScalingRules") proto.RegisterType((*HorizontalPodAutoscaler)(nil), "k8s.io.api.autoscaling.v2beta2.HorizontalPodAutoscaler") + proto.RegisterType((*HorizontalPodAutoscalerBehavior)(nil), "k8s.io.api.autoscaling.v2beta2.HorizontalPodAutoscalerBehavior") proto.RegisterType((*HorizontalPodAutoscalerCondition)(nil), "k8s.io.api.autoscaling.v2beta2.HorizontalPodAutoscalerCondition") proto.RegisterType((*HorizontalPodAutoscalerList)(nil), "k8s.io.api.autoscaling.v2beta2.HorizontalPodAutoscalerList") proto.RegisterType((*HorizontalPodAutoscalerSpec)(nil), "k8s.io.api.autoscaling.v2beta2.HorizontalPodAutoscalerSpec") @@ -606,97 +693,111 @@ func init() { } var fileDescriptor_592ad94d7d6be24f = []byte{ - // 1425 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x58, 0xdd, 0x6f, 0x1b, 0xc5, - 0x16, 0xcf, 0xda, 0x8e, 0x93, 0x8e, 0xd3, 0x24, 0x9d, 0x5b, 0xb5, 0x56, 0xaa, 0x6b, 0x47, 0xab, - 0xab, 0xab, 0x52, 0xd1, 0x35, 0x31, 0xe1, 0x43, 0x42, 0x48, 0xc4, 0x01, 0xda, 0x8a, 0xa4, 0x2d, - 0x93, 0xb4, 0x42, 0xa8, 0x45, 0x8c, 0x77, 0x4f, 0xdc, 0x21, 0xde, 0x5d, 0x6b, 0x76, 0x6c, 0x35, - 0x45, 0x42, 0xbc, 0xf0, 0x8e, 0x40, 0xfc, 0x13, 0x88, 0x17, 0x5e, 0x90, 0x78, 0xe4, 0x43, 0xa8, - 0x42, 0x08, 0xf5, 0xb1, 0x08, 0xc9, 0xa2, 0xe6, 0xbf, 0xe8, 0x13, 0xda, 0x99, 0xd9, 0xf5, 0xae, - 0xed, 0xc4, 0x4e, 0x95, 0x14, 0xf5, 0xcd, 0x33, 0xe7, 0x9c, 0xdf, 0xf9, 0x9c, 0x73, 0xce, 0x1a, - 0x5d, 0xda, 0x7d, 0x35, 0xb0, 0x98, 0x5f, 0xd9, 0x6d, 0xd7, 0x81, 0x7b, 0x20, 0x20, 0xa8, 0x74, - 0xc0, 0x73, 0x7c, 0x5e, 0xd1, 0x04, 0xda, 0x62, 0x15, 0xda, 0x16, 0x7e, 0x60, 0xd3, 0x26, 0xf3, - 0x1a, 0x95, 0x4e, 0xb5, 0x0e, 0x82, 0x56, 0x2b, 0x0d, 0xf0, 0x80, 0x53, 0x01, 0x8e, 0xd5, 0xe2, - 0xbe, 0xf0, 0x71, 0x49, 0xf1, 0x5b, 0xb4, 0xc5, 0xac, 0x04, 0xbf, 0xa5, 0xf9, 0x97, 0x2e, 0x36, - 0x98, 0xb8, 0xd3, 0xae, 0x5b, 0xb6, 0xef, 0x56, 0x1a, 0x7e, 0xc3, 0xaf, 0x48, 0xb1, 0x7a, 0x7b, - 0x47, 0x9e, 0xe4, 0x41, 0xfe, 0x52, 0x70, 0x4b, 0x66, 0x42, 0xbd, 0xed, 0x73, 0xa8, 0x74, 0x56, - 0x06, 0x55, 0x2e, 0xad, 0xf6, 0x79, 0x5c, 0x6a, 0xdf, 0x61, 0x1e, 0xf0, 0xbd, 0x4a, 0x6b, 0xb7, - 0x21, 0x85, 0x38, 0x04, 0x7e, 0x9b, 0xdb, 0x70, 0x28, 0xa9, 0xa0, 0xe2, 0x82, 0xa0, 0xa3, 0x74, - 0x55, 0xf6, 0x93, 0xe2, 0x6d, 0x4f, 0x30, 0x77, 0x58, 0xcd, 0xcb, 0xe3, 0x04, 0x02, 0xfb, 0x0e, - 0xb8, 0x74, 0x50, 0xce, 0xfc, 0xca, 0x40, 0xe7, 0xd6, 0xb9, 0x1f, 0x04, 0x37, 0x81, 0x07, 0xcc, - 0xf7, 0xae, 0xd5, 0x3f, 0x02, 0x5b, 0x10, 0xd8, 0x01, 0x0e, 0x9e, 0x0d, 0x78, 0x19, 0xe5, 0x76, - 0x99, 0xe7, 0x14, 0x8d, 0x65, 0xe3, 0xfc, 0x89, 0xda, 0xdc, 0xfd, 0x6e, 0x79, 0xaa, 0xd7, 0x2d, - 0xe7, 0xde, 0x61, 0x9e, 0x43, 0x24, 0x25, 0xe4, 0xf0, 0xa8, 0x0b, 0xc5, 0x4c, 0x9a, 0xe3, 0x2a, - 0x75, 0x81, 0x48, 0x0a, 0xae, 0x22, 0x44, 0x5b, 0x4c, 0x2b, 0x28, 0x66, 0x25, 0x1f, 0xd6, 0x7c, - 0x68, 0xed, 0xfa, 0x15, 0x4d, 0x21, 0x09, 0x2e, 0xf3, 0x17, 0x03, 0x9d, 0x7e, 0xeb, 0xae, 0x00, - 0xee, 0xd1, 0xe6, 0x26, 0x08, 0xce, 0xec, 0x2d, 0x19, 0x5f, 0xfc, 0x1e, 0xca, 0xbb, 0xf2, 0x2c, - 0x4d, 0x2a, 0x54, 0x5f, 0xb0, 0x0e, 0xae, 0x04, 0x4b, 0x49, 0x5f, 0x71, 0xc0, 0x13, 0x6c, 0x87, - 0x01, 0xaf, 0xcd, 0x6b, 0xd5, 0x79, 0x45, 0x21, 0x1a, 0x0f, 0x6f, 0xa3, 0xbc, 0xa0, 0xbc, 0x01, - 0x42, 0xba, 0x52, 0xa8, 0x3e, 0x3f, 0x19, 0xf2, 0xb6, 0x94, 0xe9, 0xa3, 0xaa, 0x33, 0xd1, 0x58, - 0xe6, 0xef, 0xc3, 0x8e, 0x08, 0x2a, 0xda, 0xc1, 0x31, 0x3a, 0x72, 0x0b, 0xcd, 0xd8, 0x6d, 0xce, - 0xc1, 0x8b, 0x3c, 0x59, 0x99, 0x0c, 0xfa, 0x26, 0x6d, 0xb6, 0x41, 0x59, 0x57, 0x5b, 0xd0, 0xd8, - 0x33, 0xeb, 0x0a, 0x89, 0x44, 0x90, 0xe6, 0x0f, 0x19, 0x74, 0xf6, 0xb2, 0xcf, 0xd9, 0x3d, 0xdf, - 0x13, 0xb4, 0x79, 0xdd, 0x77, 0xd6, 0x34, 0x20, 0x70, 0xfc, 0x21, 0x9a, 0x0d, 0x2b, 0xda, 0xa1, - 0x82, 0x8e, 0xf0, 0x2a, 0x2e, 0x4c, 0xab, 0xb5, 0xdb, 0x08, 0x2f, 0x02, 0x2b, 0xe4, 0xb6, 0x3a, - 0x2b, 0x96, 0x2a, 0xbb, 0x4d, 0x10, 0xb4, 0x5f, 0x19, 0xfd, 0x3b, 0x12, 0xa3, 0xe2, 0xdb, 0x28, - 0x17, 0xb4, 0xc0, 0xd6, 0x8e, 0xbd, 0x36, 0xce, 0xb1, 0x7d, 0x0c, 0xdd, 0x6a, 0x81, 0xdd, 0x2f, - 0xd5, 0xf0, 0x44, 0x24, 0x2c, 0x06, 0x94, 0x0f, 0x64, 0x00, 0x64, 0x99, 0x16, 0xaa, 0xaf, 0x3f, - 0xa9, 0x02, 0x15, 0xc5, 0x38, 0x43, 0xea, 0x4c, 0x34, 0xb8, 0xf9, 0x59, 0x16, 0x2d, 0xef, 0x23, - 0xb9, 0xee, 0x7b, 0x0e, 0x13, 0xcc, 0xf7, 0xf0, 0x65, 0x94, 0x13, 0x7b, 0x2d, 0xd0, 0x4f, 0x6f, - 0x35, 0xb2, 0x76, 0x7b, 0xaf, 0x05, 0x8f, 0xbb, 0xe5, 0xff, 0x8d, 0x93, 0x0f, 0xf9, 0x88, 0x44, - 0xc0, 0x1b, 0xb1, 0x57, 0x99, 0x14, 0x96, 0x36, 0xeb, 0x71, 0xb7, 0x3c, 0xa2, 0xff, 0x59, 0x31, - 0x52, 0xda, 0x78, 0xdc, 0x41, 0xb8, 0x49, 0x03, 0xb1, 0xcd, 0xa9, 0x17, 0x28, 0x4d, 0xcc, 0x05, - 0x1d, 0xaf, 0x0b, 0x93, 0xa5, 0x3b, 0x94, 0xa8, 0x2d, 0x69, 0x2b, 0xf0, 0xc6, 0x10, 0x1a, 0x19, - 0xa1, 0x01, 0xff, 0x1f, 0xe5, 0x39, 0xd0, 0xc0, 0xf7, 0x8a, 0x39, 0xe9, 0x45, 0x1c, 0x5c, 0x22, - 0x6f, 0x89, 0xa6, 0xe2, 0xe7, 0xd0, 0x8c, 0x0b, 0x41, 0x40, 0x1b, 0x50, 0x9c, 0x96, 0x8c, 0x71, - 0x2d, 0x6f, 0xaa, 0x6b, 0x12, 0xd1, 0xcd, 0x3f, 0x0c, 0x74, 0x6e, 0x9f, 0x38, 0x6e, 0xb0, 0x40, - 0xe0, 0x5b, 0x43, 0xf5, 0x6c, 0x4d, 0xe6, 0x60, 0x28, 0x2d, 0xab, 0x79, 0x51, 0xeb, 0x9e, 0x8d, - 0x6e, 0x12, 0xb5, 0x7c, 0x0b, 0x4d, 0x33, 0x01, 0x6e, 0x98, 0x95, 0xec, 0xf9, 0x42, 0xf5, 0x95, - 0x27, 0xac, 0xb5, 0xda, 0x49, 0xad, 0x63, 0xfa, 0x4a, 0x88, 0x46, 0x14, 0xa8, 0xf9, 0x67, 0x66, - 0x5f, 0xdf, 0xc2, 0x82, 0xc7, 0x1f, 0xa3, 0x79, 0x79, 0xd2, 0xfd, 0x0a, 0x76, 0xb4, 0x87, 0x63, - 0xdf, 0xd4, 0x01, 0xe3, 0xa2, 0x76, 0x46, 0x9b, 0x32, 0xbf, 0x95, 0x82, 0x26, 0x03, 0xaa, 0xf0, - 0x0a, 0x2a, 0xb8, 0xcc, 0x23, 0xd0, 0x6a, 0x32, 0x9b, 0xaa, 0xb2, 0x9c, 0xae, 0x2d, 0xf4, 0xba, - 0xe5, 0xc2, 0x66, 0xff, 0x9a, 0x24, 0x79, 0xf0, 0x4b, 0xa8, 0xe0, 0xd2, 0xbb, 0xb1, 0x48, 0x56, - 0x8a, 0xfc, 0x47, 0xeb, 0x2b, 0x6c, 0xf6, 0x49, 0x24, 0xc9, 0x87, 0x6f, 0x84, 0xd5, 0x10, 0x76, - 0xb7, 0xa0, 0x98, 0x93, 0x61, 0xbe, 0x30, 0x59, 0x33, 0x94, 0x2d, 0x22, 0x51, 0x39, 0x12, 0x82, - 0x44, 0x58, 0xe6, 0x77, 0x39, 0xf4, 0xdf, 0x03, 0xdf, 0x3e, 0x7e, 0x1b, 0x61, 0xbf, 0x1e, 0x00, - 0xef, 0x80, 0x73, 0x49, 0x0d, 0xdd, 0x70, 0xfa, 0x85, 0x31, 0xce, 0xd6, 0xce, 0x84, 0x65, 0x7f, - 0x6d, 0x88, 0x4a, 0x46, 0x48, 0x60, 0x1b, 0x9d, 0x0c, 0x1f, 0x83, 0x0a, 0x28, 0xd3, 0x83, 0xf6, - 0x70, 0x2f, 0xed, 0x54, 0xaf, 0x5b, 0x3e, 0xb9, 0x91, 0x04, 0x21, 0x69, 0x4c, 0xbc, 0x86, 0x16, - 0x74, 0x7f, 0x1f, 0x08, 0xf0, 0x59, 0x1d, 0x81, 0x85, 0xf5, 0x34, 0x99, 0x0c, 0xf2, 0x87, 0x10, - 0x0e, 0x04, 0x8c, 0x83, 0x13, 0x43, 0xe4, 0xd2, 0x10, 0x6f, 0xa6, 0xc9, 0x64, 0x90, 0x1f, 0x37, - 0xd1, 0xbc, 0x46, 0xd5, 0xf1, 0x2e, 0x4e, 0xcb, 0x94, 0x4d, 0x38, 0x89, 0x75, 0xd3, 0x8d, 0x6b, - 0x70, 0x3d, 0x85, 0x45, 0x06, 0xb0, 0xb1, 0x40, 0xc8, 0x8e, 0x5a, 0x5c, 0x50, 0xcc, 0x4b, 0x4d, - 0x6f, 0x3c, 0xe1, 0x1b, 0x8c, 0x7b, 0x65, 0x7f, 0x7c, 0xc5, 0x57, 0x01, 0x49, 0xe8, 0x31, 0xbf, - 0x34, 0xd0, 0xe2, 0xe0, 0x24, 0x8f, 0x77, 0x28, 0x63, 0xdf, 0x1d, 0xea, 0x36, 0x9a, 0x0d, 0xa0, - 0x09, 0xb6, 0xf0, 0xb9, 0x2e, 0x80, 0x17, 0x27, 0xec, 0x44, 0xb4, 0x0e, 0xcd, 0x2d, 0x2d, 0x5a, - 0x9b, 0x0b, 0x5b, 0x51, 0x74, 0x22, 0x31, 0xa4, 0xf9, 0x75, 0x16, 0xa1, 0x7e, 0xdd, 0xe3, 0xd5, - 0xd4, 0xe8, 0x59, 0x1e, 0x18, 0x3d, 0x8b, 0xc9, 0x85, 0x2c, 0x31, 0x66, 0x6e, 0xa2, 0xbc, 0x2f, - 0xfb, 0x81, 0xb6, 0xb0, 0x3a, 0x2e, 0x98, 0xf1, 0x84, 0x8f, 0xd1, 0x6a, 0x28, 0x6c, 0xe8, 0xba, - 0xab, 0x68, 0x34, 0x7c, 0x15, 0xe5, 0x5a, 0xbe, 0x13, 0x8d, 0xe4, 0xb1, 0x7b, 0xd2, 0x75, 0xdf, - 0x09, 0x52, 0x98, 0xb3, 0xa1, 0xed, 0xe1, 0x2d, 0x91, 0x38, 0xf8, 0x03, 0x34, 0x1b, 0xad, 0xeb, - 0xb2, 0x44, 0x0b, 0xd5, 0xd5, 0x71, 0x98, 0x44, 0xf3, 0xa7, 0x70, 0x65, 0x30, 0x23, 0x0a, 0x89, - 0x31, 0x43, 0x7c, 0xd0, 0x1b, 0x9f, 0x9c, 0x40, 0x13, 0xe0, 0x8f, 0x5a, 0x75, 0x15, 0x7e, 0x44, - 0x21, 0x31, 0xa6, 0xf9, 0x4d, 0x16, 0xcd, 0xa5, 0x56, 0xc9, 0x7f, 0x23, 0x5d, 0xea, 0xad, 0x1d, - 0x6d, 0xba, 0x14, 0xe6, 0xd1, 0xa7, 0x4b, 0xe1, 0x1e, 0x5f, 0xba, 0x12, 0xf8, 0x23, 0xd2, 0xf5, - 0x53, 0x26, 0x4a, 0x97, 0x9a, 0x7f, 0x93, 0xa5, 0x4b, 0xf1, 0x26, 0xd2, 0x75, 0x0d, 0x4d, 0x77, - 0xc2, 0x05, 0x5d, 0x67, 0xeb, 0xc0, 0x45, 0xc4, 0x8a, 0x9c, 0xb3, 0xde, 0x6d, 0x53, 0x4f, 0x30, - 0xb1, 0x57, 0x3b, 0x11, 0x2e, 0x08, 0x72, 0xc3, 0x27, 0x0a, 0x07, 0x3b, 0x68, 0x8e, 0x76, 0x80, - 0xd3, 0x06, 0xc8, 0x6b, 0x9d, 0xaf, 0xc3, 0xe2, 0x2e, 0xf6, 0xba, 0xe5, 0xb9, 0xb5, 0x04, 0x0e, - 0x49, 0xa1, 0x86, 0x63, 0x50, 0x9f, 0x6f, 0x08, 0xd6, 0x64, 0xf7, 0xd4, 0x18, 0x54, 0x93, 0x41, - 0x8e, 0xc1, 0xb5, 0x21, 0x2a, 0x19, 0x21, 0x61, 0x7e, 0x91, 0x41, 0xa7, 0x86, 0x3e, 0x53, 0xfa, - 0x41, 0x31, 0x8e, 0x29, 0x28, 0x99, 0xa7, 0x18, 0x94, 0xec, 0xa1, 0x83, 0xf2, 0x73, 0x06, 0xe1, - 0xe1, 0x26, 0x8a, 0x3f, 0x91, 0xa3, 0xd8, 0xe6, 0xac, 0x0e, 0x8e, 0x22, 0x1f, 0xc5, 0x6e, 0x97, - 0x9c, 0xe3, 0x49, 0x6c, 0x32, 0xa8, 0xec, 0x78, 0xbe, 0xa4, 0x13, 0x1f, 0xcc, 0xd9, 0xa3, 0xfd, - 0x60, 0x36, 0x7f, 0x1b, 0x0c, 0xe3, 0x33, 0xfd, 0x85, 0x3e, 0x2a, 0xfd, 0xd9, 0xa7, 0x98, 0x7e, - 0xf3, 0x47, 0x03, 0x2d, 0x0e, 0x0e, 0xe1, 0x67, 0xee, 0x7f, 0x9b, 0x5f, 0xd3, 0x4e, 0x3c, 0xdb, - 0xff, 0xd9, 0x7c, 0x6b, 0xa0, 0xd3, 0xa3, 0x56, 0x18, 0xbc, 0x9e, 0x5a, 0x3c, 0x2b, 0xc9, 0xc5, - 0xf3, 0x71, 0xb7, 0x5c, 0x1e, 0xf1, 0xaf, 0x40, 0x04, 0x93, 0xd8, 0x4d, 0x8f, 0x27, 0x01, 0xdf, - 0x0f, 0xdb, 0xac, 0x92, 0x70, 0x24, 0x36, 0x1f, 0x6b, 0xbc, 0x6b, 0x17, 0xef, 0x3f, 0x2a, 0x4d, - 0x3d, 0x78, 0x54, 0x9a, 0x7a, 0xf8, 0xa8, 0x34, 0xf5, 0x69, 0xaf, 0x64, 0xdc, 0xef, 0x95, 0x8c, - 0x07, 0xbd, 0x92, 0xf1, 0xb0, 0x57, 0x32, 0xfe, 0xea, 0x95, 0x8c, 0xcf, 0xff, 0x2e, 0x4d, 0xbd, - 0x3f, 0xa3, 0xa1, 0xff, 0x09, 0x00, 0x00, 0xff, 0xff, 0x7e, 0xa0, 0xce, 0xf5, 0x16, 0x17, 0x00, - 0x00, + // 1657 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x58, 0xdb, 0x6f, 0x1b, 0x45, + 0x17, 0xcf, 0xda, 0xce, 0x6d, 0x9c, 0x5b, 0xa7, 0xfd, 0x5a, 0x2b, 0xd5, 0x67, 0x47, 0xfb, 0x55, + 0x1f, 0x50, 0xd1, 0x35, 0x31, 0x01, 0x2a, 0x55, 0x08, 0xe2, 0x14, 0xda, 0xaa, 0x49, 0x1b, 0xc6, + 0x69, 0x40, 0x28, 0xad, 0x18, 0xef, 0x4e, 0x9c, 0x21, 0xf6, 0xae, 0xb5, 0xb3, 0x76, 0x9b, 0x22, + 0x21, 0x5e, 0x78, 0x47, 0x20, 0x5e, 0xf9, 0x03, 0x10, 0x42, 0xe2, 0x05, 0x89, 0x47, 0x2e, 0xaa, + 0x2a, 0x84, 0x50, 0xdf, 0x28, 0x2f, 0x16, 0x35, 0xff, 0x45, 0x9e, 0xd0, 0x5c, 0x76, 0xbd, 0xbb, + 0x76, 0x62, 0x27, 0x4a, 0x8a, 0xfa, 0xb6, 0x33, 0xe7, 0x9c, 0xdf, 0x99, 0x39, 0xf7, 0x59, 0x70, + 0x65, 0xfb, 0x22, 0x33, 0xa8, 0x93, 0xdf, 0x6e, 0x94, 0x89, 0x6b, 0x13, 0x8f, 0xb0, 0x7c, 0x93, + 0xd8, 0x96, 0xe3, 0xe6, 0x15, 0x01, 0xd7, 0x69, 0x1e, 0x37, 0x3c, 0x87, 0x99, 0xb8, 0x4a, 0xed, + 0x4a, 0xbe, 0x59, 0x28, 0x13, 0x0f, 0x17, 0xf2, 0x15, 0x62, 0x13, 0x17, 0x7b, 0xc4, 0x32, 0xea, + 0xae, 0xe3, 0x39, 0x30, 0x2b, 0xf9, 0x0d, 0x5c, 0xa7, 0x46, 0x88, 0xdf, 0x50, 0xfc, 0xb3, 0x17, + 0x2a, 0xd4, 0xdb, 0x6a, 0x94, 0x0d, 0xd3, 0xa9, 0xe5, 0x2b, 0x4e, 0xc5, 0xc9, 0x0b, 0xb1, 0x72, + 0x63, 0x53, 0xac, 0xc4, 0x42, 0x7c, 0x49, 0xb8, 0x59, 0x3d, 0xa4, 0xde, 0x74, 0x5c, 0x92, 0x6f, + 0xce, 0xc7, 0x55, 0xce, 0x2e, 0x74, 0x78, 0x6a, 0xd8, 0xdc, 0xa2, 0x36, 0x71, 0x77, 0xf2, 0xf5, + 0xed, 0x8a, 0x10, 0x72, 0x09, 0x73, 0x1a, 0xae, 0x49, 0x0e, 0x24, 0xc5, 0xf2, 0x35, 0xe2, 0xe1, + 0x5e, 0xba, 0xf2, 0x7b, 0x49, 0xb9, 0x0d, 0xdb, 0xa3, 0xb5, 0x6e, 0x35, 0xaf, 0xf6, 0x13, 0x60, + 0xe6, 0x16, 0xa9, 0xe1, 0xb8, 0x9c, 0xfe, 0xa5, 0x06, 0xce, 0x2e, 0xb9, 0x0e, 0x63, 0xeb, 0xc4, + 0x65, 0xd4, 0xb1, 0x6f, 0x96, 0x3f, 0x24, 0xa6, 0x87, 0xc8, 0x26, 0x71, 0x89, 0x6d, 0x12, 0x38, + 0x07, 0x52, 0xdb, 0xd4, 0xb6, 0x32, 0xda, 0x9c, 0xf6, 0xfc, 0x78, 0x71, 0xe2, 0x61, 0x2b, 0x37, + 0xd4, 0x6e, 0xe5, 0x52, 0xd7, 0xa9, 0x6d, 0x21, 0x41, 0xe1, 0x1c, 0x36, 0xae, 0x91, 0x4c, 0x22, + 0xca, 0x71, 0x03, 0xd7, 0x08, 0x12, 0x14, 0x58, 0x00, 0x00, 0xd7, 0xa9, 0x52, 0x90, 0x49, 0x0a, + 0x3e, 0xa8, 0xf8, 0xc0, 0xe2, 0xea, 0x35, 0x45, 0x41, 0x21, 0x2e, 0xfd, 0x81, 0x06, 0x4e, 0xbd, + 0x75, 0xcf, 0x23, 0xae, 0x8d, 0xab, 0x2b, 0xc4, 0x73, 0xa9, 0x59, 0x12, 0xf6, 0x85, 0xef, 0x81, + 0x91, 0x9a, 0x58, 0x8b, 0x23, 0xa5, 0x0b, 0x2f, 0x19, 0xfb, 0x47, 0x82, 0x21, 0xa5, 0xaf, 0x59, + 0xc4, 0xf6, 0xe8, 0x26, 0x25, 0x6e, 0x71, 0x4a, 0xa9, 0x1e, 0x91, 0x14, 0xa4, 0xf0, 0xe0, 0x1a, + 0x18, 0xf1, 0xb0, 0x5b, 0x21, 0x9e, 0xb8, 0x4a, 0xba, 0xf0, 0xe2, 0x60, 0xc8, 0x6b, 0x42, 0xa6, + 0x83, 0x2a, 0xd7, 0x48, 0x61, 0xe9, 0xbf, 0x77, 0x5f, 0xc4, 0xc3, 0x5e, 0x83, 0x1d, 0xe3, 0x45, + 0x36, 0xc0, 0xa8, 0xd9, 0x70, 0x5d, 0x62, 0xfb, 0x37, 0x99, 0x1f, 0x0c, 0x7a, 0x1d, 0x57, 0x1b, + 0x44, 0x9e, 0xae, 0x38, 0xad, 0xb0, 0x47, 0x97, 0x24, 0x12, 0xf2, 0x21, 0xf5, 0x6f, 0x35, 0x30, + 0x73, 0x75, 0x75, 0xb1, 0x24, 0x21, 0x56, 0x9d, 0x2a, 0x35, 0x77, 0xe0, 0x45, 0x90, 0xf2, 0x76, + 0xea, 0x44, 0x85, 0xc9, 0x39, 0x3f, 0x08, 0xd6, 0x76, 0xea, 0x64, 0xb7, 0x95, 0x3b, 0x15, 0xe7, + 0xe7, 0xfb, 0x48, 0x48, 0xc0, 0xff, 0x81, 0xe1, 0x26, 0xd7, 0x2b, 0x8e, 0x3a, 0x5c, 0x9c, 0x54, + 0xa2, 0xc3, 0xe2, 0x30, 0x48, 0xd2, 0xe0, 0x25, 0x30, 0x59, 0x27, 0x2e, 0x75, 0xac, 0x12, 0x31, + 0x1d, 0xdb, 0x62, 0x22, 0x88, 0x86, 0x8b, 0xff, 0x51, 0xcc, 0x93, 0xab, 0x61, 0x22, 0x8a, 0xf2, + 0xea, 0x5f, 0x25, 0xc0, 0x74, 0xe7, 0x00, 0xa8, 0x51, 0x25, 0x0c, 0xde, 0x01, 0xb3, 0xcc, 0xc3, + 0x65, 0x5a, 0xa5, 0xf7, 0xb1, 0x47, 0x1d, 0xfb, 0x5d, 0x6a, 0x5b, 0xce, 0xdd, 0x28, 0x7a, 0xb6, + 0xdd, 0xca, 0xcd, 0x96, 0xf6, 0xe4, 0x42, 0xfb, 0x20, 0xc0, 0xeb, 0x60, 0x82, 0x91, 0x2a, 0x31, + 0x3d, 0x79, 0x5f, 0x65, 0x97, 0xe7, 0xda, 0xad, 0xdc, 0x44, 0x29, 0xb4, 0xbf, 0xdb, 0xca, 0x9d, + 0x8c, 0x18, 0x46, 0x12, 0x51, 0x44, 0x18, 0xde, 0x01, 0x63, 0x75, 0xfe, 0x45, 0x09, 0xcb, 0x24, + 0xe6, 0x92, 0x83, 0xc4, 0x4a, 0xdc, 0xe0, 0xc5, 0x19, 0x65, 0xaa, 0xb1, 0x55, 0x85, 0x84, 0x02, + 0x4c, 0xfd, 0xc7, 0x04, 0x38, 0x73, 0xd5, 0x71, 0xe9, 0x7d, 0xc7, 0xf6, 0x70, 0x75, 0xd5, 0xb1, + 0x16, 0x15, 0x22, 0x71, 0xe1, 0x07, 0x60, 0x8c, 0xd7, 0x28, 0x0b, 0x7b, 0xb8, 0x47, 0x9c, 0x06, + 0xa5, 0xc6, 0xa8, 0x6f, 0x57, 0xf8, 0x06, 0x33, 0x38, 0xb7, 0xd1, 0x9c, 0x37, 0x64, 0x21, 0x59, + 0x21, 0x1e, 0xee, 0xe4, 0x7a, 0x67, 0x0f, 0x05, 0xa8, 0xf0, 0x36, 0x48, 0xb1, 0x3a, 0x31, 0x55, + 0xa8, 0x5e, 0xea, 0x7b, 0xb3, 0xde, 0x07, 0x2d, 0xd5, 0x89, 0xd9, 0x29, 0x3e, 0x7c, 0x85, 0x04, + 0x2c, 0x24, 0x60, 0x84, 0x89, 0x90, 0x16, 0x5e, 0x4d, 0x17, 0x5e, 0x3f, 0xac, 0x02, 0x99, 0x17, + 0x41, 0xce, 0xc9, 0x35, 0x52, 0xe0, 0xfa, 0x1f, 0x1a, 0xc8, 0xed, 0x21, 0x59, 0x24, 0x5b, 0xb8, + 0x49, 0x1d, 0x17, 0xae, 0x83, 0x51, 0xb1, 0x73, 0xab, 0xae, 0x4c, 0x99, 0x1f, 0xdc, 0x8d, 0x22, + 0x6c, 0x8b, 0x69, 0x9e, 0x91, 0x25, 0x89, 0x81, 0x7c, 0x30, 0xb8, 0x01, 0xc6, 0xc5, 0xe7, 0x65, + 0xe7, 0xae, 0xad, 0xcc, 0x78, 0x60, 0xe4, 0xc9, 0x76, 0x2b, 0x37, 0x5e, 0xf2, 0x51, 0x50, 0x07, + 0x50, 0xff, 0x34, 0x09, 0xe6, 0xf6, 0xb8, 0xd9, 0x92, 0x63, 0x5b, 0x94, 0x07, 0x3f, 0xbc, 0x1a, + 0xc9, 0xff, 0x85, 0x58, 0xfe, 0x9f, 0xeb, 0x27, 0x1f, 0xaa, 0x07, 0xcb, 0x81, 0xbf, 0x12, 0x11, + 0x2c, 0x65, 0xf0, 0xdd, 0x56, 0xae, 0x47, 0xaf, 0x36, 0x02, 0xa4, 0xa8, 0x5b, 0x60, 0x13, 0xc0, + 0x2a, 0x66, 0xde, 0x9a, 0x8b, 0x6d, 0x26, 0x35, 0xd1, 0x1a, 0x51, 0x91, 0x70, 0x7e, 0xb0, 0x40, + 0xe6, 0x12, 0xc5, 0x59, 0x75, 0x0a, 0xb8, 0xdc, 0x85, 0x86, 0x7a, 0x68, 0x80, 0xff, 0x07, 0x23, + 0x2e, 0xc1, 0xcc, 0xb1, 0x33, 0x29, 0x71, 0x8b, 0x20, 0x6c, 0x90, 0xd8, 0x45, 0x8a, 0x0a, 0x5f, + 0x00, 0xa3, 0x35, 0xc2, 0x18, 0xae, 0x90, 0xcc, 0xb0, 0x60, 0x0c, 0xea, 0xee, 0x8a, 0xdc, 0x46, + 0x3e, 0x5d, 0xff, 0x53, 0x03, 0x67, 0xf7, 0xb0, 0xe3, 0x32, 0x65, 0x1e, 0xdc, 0xe8, 0xca, 0x54, + 0x63, 0xb0, 0x0b, 0x72, 0x69, 0x91, 0xa7, 0x41, 0x8d, 0xf0, 0x77, 0x42, 0x59, 0xba, 0x01, 0x86, + 0xa9, 0x47, 0x6a, 0x7e, 0x01, 0x7a, 0xed, 0x90, 0x59, 0xd4, 0xa9, 0xef, 0xd7, 0x38, 0x1a, 0x92, + 0xa0, 0xfa, 0x83, 0xe4, 0x9e, 0x77, 0xe3, 0xa9, 0x0c, 0x3f, 0x02, 0x53, 0x62, 0xa5, 0x7a, 0x2b, + 0xd9, 0x54, 0x37, 0xec, 0x5b, 0x2d, 0xf6, 0x19, 0x6d, 0x8a, 0xa7, 0xd5, 0x51, 0xa6, 0x4a, 0x11, + 0x68, 0x14, 0x53, 0x05, 0xe7, 0x41, 0xba, 0x46, 0x6d, 0x44, 0xea, 0x55, 0x6a, 0x62, 0xa6, 0xfa, + 0xd4, 0x74, 0xbb, 0x95, 0x4b, 0xaf, 0x74, 0xb6, 0x51, 0x98, 0x07, 0xbe, 0x02, 0xd2, 0x35, 0x7c, + 0x2f, 0x10, 0x91, 0xfd, 0xe4, 0xa4, 0xd2, 0x97, 0x5e, 0xe9, 0x90, 0x50, 0x98, 0x0f, 0xde, 0xe2, + 0xd1, 0xc0, 0x3b, 0x31, 0xcb, 0xa4, 0x84, 0x99, 0xcf, 0x0f, 0xd6, 0xb8, 0x45, 0xf1, 0x0b, 0x45, + 0x8e, 0x80, 0x40, 0x3e, 0x16, 0xa4, 0x60, 0xac, 0xac, 0x6a, 0x90, 0x88, 0xb2, 0x74, 0xe1, 0x8d, + 0xc3, 0xba, 0x4f, 0xc1, 0x14, 0x27, 0x78, 0x98, 0xf8, 0x2b, 0x14, 0xc0, 0xeb, 0xdf, 0xa7, 0xc0, + 0x7f, 0xf7, 0x2d, 0xa0, 0xf0, 0x6d, 0x00, 0x9d, 0x32, 0x23, 0x6e, 0x93, 0x58, 0x57, 0xe4, 0x2c, + 0xca, 0x87, 0x42, 0xee, 0xce, 0x64, 0xf1, 0x34, 0xcf, 0xb0, 0x9b, 0x5d, 0x54, 0xd4, 0x43, 0x02, + 0x9a, 0x60, 0x92, 0xe7, 0x9d, 0xf4, 0x1d, 0x55, 0xf3, 0xe7, 0xc1, 0x92, 0xfa, 0x04, 0x1f, 0x1d, + 0x96, 0xc3, 0x20, 0x28, 0x8a, 0x09, 0x17, 0xc1, 0xb4, 0x1a, 0x7b, 0x62, 0xbe, 0x3c, 0xa3, 0x8c, + 0x3d, 0xbd, 0x14, 0x25, 0xa3, 0x38, 0x3f, 0x87, 0xb0, 0x08, 0xa3, 0x2e, 0xb1, 0x02, 0x88, 0x54, + 0x14, 0xe2, 0x72, 0x94, 0x8c, 0xe2, 0xfc, 0xb0, 0x0a, 0xa6, 0x14, 0xaa, 0x72, 0x6d, 0x66, 0x58, + 0x44, 0xc7, 0x80, 0x03, 0xaa, 0xea, 0x5c, 0x41, 0xb8, 0x2f, 0x45, 0xb0, 0x50, 0x0c, 0x1b, 0x7a, + 0x00, 0x98, 0x7e, 0x35, 0x65, 0x99, 0x11, 0xa1, 0xe9, 0xcd, 0x43, 0xc6, 0x4b, 0x50, 0x96, 0x3b, + 0x33, 0x40, 0xb0, 0xc5, 0x50, 0x48, 0x8f, 0xfe, 0x85, 0x06, 0x66, 0xe2, 0x03, 0x6e, 0xf0, 0xb4, + 0xd0, 0xf6, 0x7c, 0x5a, 0xdc, 0x06, 0x63, 0x72, 0x54, 0x72, 0x5c, 0x15, 0x00, 0x2f, 0x0f, 0x58, + 0xf4, 0x70, 0x99, 0x54, 0x4b, 0x4a, 0x54, 0x86, 0xb3, 0xbf, 0x42, 0x01, 0xa4, 0xfe, 0x75, 0x12, + 0x80, 0x4e, 0x8a, 0xc1, 0x85, 0x48, 0x97, 0x9b, 0x8b, 0x75, 0xb9, 0x99, 0xf0, 0x3b, 0x25, 0xd4, + 0xd1, 0xd6, 0xc1, 0x88, 0x23, 0x4a, 0x8f, 0x3a, 0x61, 0xa1, 0x9f, 0x31, 0x83, 0x31, 0x29, 0x40, + 0x2b, 0x02, 0xde, 0x3b, 0x54, 0x01, 0x53, 0x68, 0xf0, 0x06, 0x48, 0xd5, 0x1d, 0xcb, 0x9f, 0x6b, + 0xfa, 0x8e, 0x84, 0xab, 0x8e, 0xc5, 0x22, 0x98, 0x63, 0xfc, 0xec, 0x7c, 0x17, 0x09, 0x1c, 0x3e, + 0x66, 0xfa, 0xaf, 0x58, 0x11, 0xa2, 0xe9, 0xc2, 0x42, 0x3f, 0x4c, 0xa4, 0xf8, 0x23, 0xb8, 0xc2, + 0x98, 0x3e, 0x05, 0x05, 0x98, 0x1c, 0x9f, 0xa8, 0x87, 0x90, 0x2a, 0x43, 0x7d, 0xf1, 0x7b, 0xbd, + 0x00, 0x25, 0xbe, 0x4f, 0x41, 0x01, 0xa6, 0xfe, 0x4d, 0x12, 0x4c, 0x44, 0x5e, 0x58, 0xff, 0x86, + 0xbb, 0x64, 0xae, 0x1d, 0xad, 0xbb, 0x24, 0xe6, 0xd1, 0xbb, 0x4b, 0xe2, 0x1e, 0x9f, 0xbb, 0x42, + 0xf8, 0x3d, 0xdc, 0xf5, 0x73, 0xc2, 0x77, 0x97, 0x6c, 0xb5, 0x83, 0xb9, 0x4b, 0xf2, 0x86, 0xdc, + 0x75, 0x33, 0xfc, 0x7e, 0xec, 0x33, 0xf3, 0x18, 0xfe, 0xe5, 0x8c, 0x77, 0x1a, 0xd8, 0xf6, 0xa8, + 0xb7, 0x53, 0x1c, 0xef, 0x7a, 0x6b, 0x5a, 0x60, 0x02, 0x37, 0x89, 0x8b, 0x2b, 0x44, 0x6c, 0x2b, + 0x7f, 0x1d, 0x14, 0x77, 0x86, 0x3f, 0xf5, 0x16, 0x43, 0x38, 0x28, 0x82, 0xca, 0xdb, 0xa0, 0x5a, + 0xdf, 0xf2, 0x82, 0x37, 0xa4, 0xea, 0x0c, 0xa2, 0x0d, 0x2e, 0x76, 0x51, 0x51, 0x0f, 0x09, 0xfd, + 0xf3, 0x04, 0x38, 0xd1, 0xf5, 0x7a, 0xef, 0x18, 0x45, 0x3b, 0x26, 0xa3, 0x24, 0x9e, 0xa2, 0x51, + 0x92, 0x07, 0x36, 0xca, 0x2f, 0x09, 0x00, 0xbb, 0x8b, 0x28, 0xfc, 0x58, 0xb4, 0x62, 0xd3, 0xa5, + 0x65, 0x62, 0x49, 0xf2, 0x51, 0x8c, 0x91, 0xe1, 0x3e, 0x1e, 0xc6, 0x46, 0x71, 0x65, 0xc7, 0xf3, + 0x83, 0x29, 0xf4, 0x1f, 0x29, 0x79, 0xb4, 0xff, 0x91, 0xf4, 0xdf, 0xe2, 0x66, 0x7c, 0xa6, 0x7f, + 0x5c, 0xf5, 0x72, 0x7f, 0xf2, 0x29, 0xba, 0x5f, 0xff, 0x49, 0x03, 0x33, 0xf1, 0x26, 0xfc, 0xcc, + 0xfd, 0xce, 0xfc, 0x35, 0x7a, 0x89, 0x67, 0xfb, 0x57, 0xe6, 0x77, 0x1a, 0x38, 0xd5, 0x6b, 0x84, + 0x81, 0x4b, 0x91, 0xc1, 0x33, 0x1f, 0x1e, 0x3c, 0x77, 0x5b, 0xb9, 0x5c, 0x8f, 0x1f, 0x10, 0x3e, + 0x4c, 0x68, 0x36, 0x3d, 0x1e, 0x07, 0xfc, 0xd0, 0x7d, 0x66, 0xe9, 0x84, 0x23, 0x39, 0xf3, 0xb1, + 0xda, 0xbb, 0x78, 0xe1, 0xe1, 0x93, 0xec, 0xd0, 0xa3, 0x27, 0xd9, 0xa1, 0xc7, 0x4f, 0xb2, 0x43, + 0x9f, 0xb4, 0xb3, 0xda, 0xc3, 0x76, 0x56, 0x7b, 0xd4, 0xce, 0x6a, 0x8f, 0xdb, 0x59, 0xed, 0xaf, + 0x76, 0x56, 0xfb, 0xec, 0xef, 0xec, 0xd0, 0xfb, 0xa3, 0x0a, 0xfa, 0x9f, 0x00, 0x00, 0x00, 0xff, + 0xff, 0x79, 0xae, 0x08, 0x04, 0x2d, 0x1a, 0x00, 0x00, } func (m *CrossVersionObjectReference) Marshal() (dAtA []byte, err error) { @@ -823,6 +924,89 @@ func (m *ExternalMetricStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *HPAScalingPolicy) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *HPAScalingPolicy) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *HPAScalingPolicy) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + i = encodeVarintGenerated(dAtA, i, uint64(m.PeriodSeconds)) + i-- + dAtA[i] = 0x18 + i = encodeVarintGenerated(dAtA, i, uint64(m.Value)) + i-- + dAtA[i] = 0x10 + i -= len(m.Type) + copy(dAtA[i:], m.Type) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *HPAScalingRules) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *HPAScalingRules) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *HPAScalingRules) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.StabilizationWindowSeconds != nil { + i = encodeVarintGenerated(dAtA, i, uint64(*m.StabilizationWindowSeconds)) + i-- + dAtA[i] = 0x18 + } + if len(m.Policies) > 0 { + for iNdEx := len(m.Policies) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Policies[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if m.SelectPolicy != nil { + i -= len(*m.SelectPolicy) + copy(dAtA[i:], *m.SelectPolicy) + i = encodeVarintGenerated(dAtA, i, uint64(len(*m.SelectPolicy))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func (m *HorizontalPodAutoscaler) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -876,6 +1060,53 @@ func (m *HorizontalPodAutoscaler) MarshalToSizedBuffer(dAtA []byte) (int, error) return len(dAtA) - i, nil } +func (m *HorizontalPodAutoscalerBehavior) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *HorizontalPodAutoscalerBehavior) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *HorizontalPodAutoscalerBehavior) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.ScaleDown != nil { + { + size, err := m.ScaleDown.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.ScaleUp != nil { + { + size, err := m.ScaleUp.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func (m *HorizontalPodAutoscalerCondition) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -996,6 +1227,18 @@ func (m *HorizontalPodAutoscalerSpec) MarshalToSizedBuffer(dAtA []byte) (int, er _ = i var l int _ = l + if m.Behavior != nil { + { + size, err := m.Behavior.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } if len(m.Metrics) > 0 { for iNdEx := len(m.Metrics) - 1; iNdEx >= 0; iNdEx-- { { @@ -1726,6 +1969,41 @@ func (m *ExternalMetricStatus) Size() (n int) { return n } +func (m *HPAScalingPolicy) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Type) + n += 1 + l + sovGenerated(uint64(l)) + n += 1 + sovGenerated(uint64(m.Value)) + n += 1 + sovGenerated(uint64(m.PeriodSeconds)) + return n +} + +func (m *HPAScalingRules) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.SelectPolicy != nil { + l = len(*m.SelectPolicy) + n += 1 + l + sovGenerated(uint64(l)) + } + if len(m.Policies) > 0 { + for _, e := range m.Policies { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + if m.StabilizationWindowSeconds != nil { + n += 1 + sovGenerated(uint64(*m.StabilizationWindowSeconds)) + } + return n +} + func (m *HorizontalPodAutoscaler) Size() (n int) { if m == nil { return 0 @@ -1741,6 +2019,23 @@ func (m *HorizontalPodAutoscaler) Size() (n int) { return n } +func (m *HorizontalPodAutoscalerBehavior) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ScaleUp != nil { + l = m.ScaleUp.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + if m.ScaleDown != nil { + l = m.ScaleDown.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + return n +} + func (m *HorizontalPodAutoscalerCondition) Size() (n int) { if m == nil { return 0 @@ -1795,6 +2090,10 @@ func (m *HorizontalPodAutoscalerSpec) Size() (n int) { n += 1 + l + sovGenerated(uint64(l)) } } + if m.Behavior != nil { + l = m.Behavior.Size() + n += 1 + l + sovGenerated(uint64(l)) + } return n } @@ -2061,42 +2360,82 @@ func (this *ExternalMetricStatus) String() string { }, "") return s } -func (this *HorizontalPodAutoscaler) String() string { +func (this *HPAScalingPolicy) String() string { if this == nil { return "nil" } - s := strings.Join([]string{`&HorizontalPodAutoscaler{`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "HorizontalPodAutoscalerSpec", "HorizontalPodAutoscalerSpec", 1), `&`, ``, 1) + `,`, - `Status:` + strings.Replace(strings.Replace(this.Status.String(), "HorizontalPodAutoscalerStatus", "HorizontalPodAutoscalerStatus", 1), `&`, ``, 1) + `,`, + s := strings.Join([]string{`&HPAScalingPolicy{`, + `Type:` + fmt.Sprintf("%v", this.Type) + `,`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `PeriodSeconds:` + fmt.Sprintf("%v", this.PeriodSeconds) + `,`, `}`, }, "") return s } -func (this *HorizontalPodAutoscalerCondition) String() string { +func (this *HPAScalingRules) String() string { if this == nil { return "nil" } - s := strings.Join([]string{`&HorizontalPodAutoscalerCondition{`, - `Type:` + fmt.Sprintf("%v", this.Type) + `,`, - `Status:` + fmt.Sprintf("%v", this.Status) + `,`, - `LastTransitionTime:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.LastTransitionTime), "Time", "v1.Time", 1), `&`, ``, 1) + `,`, - `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`, - `Message:` + fmt.Sprintf("%v", this.Message) + `,`, + repeatedStringForPolicies := "[]HPAScalingPolicy{" + for _, f := range this.Policies { + repeatedStringForPolicies += strings.Replace(strings.Replace(f.String(), "HPAScalingPolicy", "HPAScalingPolicy", 1), `&`, ``, 1) + "," + } + repeatedStringForPolicies += "}" + s := strings.Join([]string{`&HPAScalingRules{`, + `SelectPolicy:` + valueToStringGenerated(this.SelectPolicy) + `,`, + `Policies:` + repeatedStringForPolicies + `,`, + `StabilizationWindowSeconds:` + valueToStringGenerated(this.StabilizationWindowSeconds) + `,`, `}`, }, "") return s } -func (this *HorizontalPodAutoscalerList) String() string { +func (this *HorizontalPodAutoscaler) String() string { if this == nil { return "nil" } - repeatedStringForItems := "[]HorizontalPodAutoscaler{" - for _, f := range this.Items { - repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "HorizontalPodAutoscaler", "HorizontalPodAutoscaler", 1), `&`, ``, 1) + "," - } - repeatedStringForItems += "}" - s := strings.Join([]string{`&HorizontalPodAutoscalerList{`, + s := strings.Join([]string{`&HorizontalPodAutoscaler{`, + `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "HorizontalPodAutoscalerSpec", "HorizontalPodAutoscalerSpec", 1), `&`, ``, 1) + `,`, + `Status:` + strings.Replace(strings.Replace(this.Status.String(), "HorizontalPodAutoscalerStatus", "HorizontalPodAutoscalerStatus", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *HorizontalPodAutoscalerBehavior) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&HorizontalPodAutoscalerBehavior{`, + `ScaleUp:` + strings.Replace(this.ScaleUp.String(), "HPAScalingRules", "HPAScalingRules", 1) + `,`, + `ScaleDown:` + strings.Replace(this.ScaleDown.String(), "HPAScalingRules", "HPAScalingRules", 1) + `,`, + `}`, + }, "") + return s +} +func (this *HorizontalPodAutoscalerCondition) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&HorizontalPodAutoscalerCondition{`, + `Type:` + fmt.Sprintf("%v", this.Type) + `,`, + `Status:` + fmt.Sprintf("%v", this.Status) + `,`, + `LastTransitionTime:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.LastTransitionTime), "Time", "v1.Time", 1), `&`, ``, 1) + `,`, + `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`, + `Message:` + fmt.Sprintf("%v", this.Message) + `,`, + `}`, + }, "") + return s +} +func (this *HorizontalPodAutoscalerList) String() string { + if this == nil { + return "nil" + } + repeatedStringForItems := "[]HorizontalPodAutoscaler{" + for _, f := range this.Items { + repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "HorizontalPodAutoscaler", "HorizontalPodAutoscaler", 1), `&`, ``, 1) + "," + } + repeatedStringForItems += "}" + s := strings.Join([]string{`&HorizontalPodAutoscalerList{`, `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, `Items:` + repeatedStringForItems + `,`, `}`, @@ -2117,6 +2456,7 @@ func (this *HorizontalPodAutoscalerSpec) String() string { `MinReplicas:` + valueToStringGenerated(this.MinReplicas) + `,`, `MaxReplicas:` + fmt.Sprintf("%v", this.MaxReplicas) + `,`, `Metrics:` + repeatedStringForMetrics + `,`, + `Behavior:` + strings.Replace(this.Behavior.String(), "HorizontalPodAutoscalerBehavior", "HorizontalPodAutoscalerBehavior", 1) + `,`, `}`, }, "") return s @@ -2271,22 +2611,409 @@ func (this *ResourceMetricStatus) String() string { if this == nil { return "nil" } - s := strings.Join([]string{`&ResourceMetricStatus{`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `Current:` + strings.Replace(strings.Replace(this.Current.String(), "MetricValueStatus", "MetricValueStatus", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func valueToStringGenerated(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" + s := strings.Join([]string{`&ResourceMetricStatus{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `Current:` + strings.Replace(strings.Replace(this.Current.String(), "MetricValueStatus", "MetricValueStatus", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func valueToStringGenerated(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *CrossVersionObjectReference) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: CrossVersionObjectReference: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CrossVersionObjectReference: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Kind = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field APIVersion", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.APIVersion = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ExternalMetricSource) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ExternalMetricSource: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ExternalMetricSource: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Metric", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Metric.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Target", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Target.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ExternalMetricStatus) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ExternalMetricStatus: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ExternalMetricStatus: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Metric", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Metric.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Current", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Current.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) + return nil } -func (m *CrossVersionObjectReference) Unmarshal(dAtA []byte) error { +func (m *HPAScalingPolicy) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2309,15 +3036,15 @@ func (m *CrossVersionObjectReference) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: CrossVersionObjectReference: wiretype end group for non-group") + return fmt.Errorf("proto: HPAScalingPolicy: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: CrossVersionObjectReference: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: HPAScalingPolicy: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2345,13 +3072,13 @@ func (m *CrossVersionObjectReference) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Kind = string(dAtA[iNdEx:postIndex]) + m.Type = HPAScalingPolicyType(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) } - var stringLen uint64 + m.Value = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -2361,29 +3088,16 @@ func (m *CrossVersionObjectReference) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + m.Value |= int32(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field APIVersion", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PeriodSeconds", wireType) } - var stringLen uint64 + m.PeriodSeconds = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -2393,24 +3107,11 @@ func (m *CrossVersionObjectReference) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + m.PeriodSeconds |= int32(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.APIVersion = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -2435,7 +3136,7 @@ func (m *CrossVersionObjectReference) Unmarshal(dAtA []byte) error { } return nil } -func (m *ExternalMetricSource) Unmarshal(dAtA []byte) error { +func (m *HPAScalingRules) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2458,17 +3159,17 @@ func (m *ExternalMetricSource) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ExternalMetricSource: wiretype end group for non-group") + return fmt.Errorf("proto: HPAScalingRules: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ExternalMetricSource: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: HPAScalingRules: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Metric", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SelectPolicy", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -2478,28 +3179,28 @@ func (m *ExternalMetricSource) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Metric.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + s := ScalingPolicySelect(dAtA[iNdEx:postIndex]) + m.SelectPolicy = &s iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Target", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Policies", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -2526,10 +3227,31 @@ func (m *ExternalMetricSource) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Target.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Policies = append(m.Policies, HPAScalingPolicy{}) + if err := m.Policies[len(m.Policies)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field StabilizationWindowSeconds", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.StabilizationWindowSeconds = &v default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -2554,7 +3276,7 @@ func (m *ExternalMetricSource) Unmarshal(dAtA []byte) error { } return nil } -func (m *ExternalMetricStatus) Unmarshal(dAtA []byte) error { +func (m *HorizontalPodAutoscaler) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2577,15 +3299,15 @@ func (m *ExternalMetricStatus) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ExternalMetricStatus: wiretype end group for non-group") + return fmt.Errorf("proto: HorizontalPodAutoscaler: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ExternalMetricStatus: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: HorizontalPodAutoscaler: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Metric", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -2612,13 +3334,13 @@ func (m *ExternalMetricStatus) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Metric.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Current", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -2645,7 +3367,40 @@ func (m *ExternalMetricStatus) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Current.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -2673,7 +3428,7 @@ func (m *ExternalMetricStatus) Unmarshal(dAtA []byte) error { } return nil } -func (m *HorizontalPodAutoscaler) Unmarshal(dAtA []byte) error { +func (m *HorizontalPodAutoscalerBehavior) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2696,15 +3451,15 @@ func (m *HorizontalPodAutoscaler) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: HorizontalPodAutoscaler: wiretype end group for non-group") + return fmt.Errorf("proto: HorizontalPodAutoscalerBehavior: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: HorizontalPodAutoscaler: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: HorizontalPodAutoscalerBehavior: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ScaleUp", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -2731,13 +3486,16 @@ func (m *HorizontalPodAutoscaler) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if m.ScaleUp == nil { + m.ScaleUp = &HPAScalingRules{} + } + if err := m.ScaleUp.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ScaleDown", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -2764,40 +3522,10 @@ func (m *HorizontalPodAutoscaler) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF + if m.ScaleDown == nil { + m.ScaleDown = &HPAScalingRules{} } - if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.ScaleDown.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -3294,6 +4022,42 @@ func (m *HorizontalPodAutoscalerSpec) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Behavior", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Behavior == nil { + m.Behavior = &HorizontalPodAutoscalerBehavior{} + } + if err := m.Behavior.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -5215,6 +5979,7 @@ func (m *ResourceMetricStatus) Unmarshal(dAtA []byte) error { func skipGenerated(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -5246,10 +6011,8 @@ func skipGenerated(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -5270,55 +6033,30 @@ func skipGenerated(dAtA []byte) (n int, err error) { return 0, ErrInvalidLengthGenerated } iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - return iNdEx, nil case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipGenerated(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenerated + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenerated + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group") ) diff --git a/vendor/k8s.io/api/autoscaling/v2beta2/generated.proto b/vendor/k8s.io/api/autoscaling/v2beta2/generated.proto index 80f1d345d4..24dc5882e7 100644 --- a/vendor/k8s.io/api/autoscaling/v2beta2/generated.proto +++ b/vendor/k8s.io/api/autoscaling/v2beta2/generated.proto @@ -64,6 +64,47 @@ message ExternalMetricStatus { optional MetricValueStatus current = 2; } +// HPAScalingPolicy is a single policy which must hold true for a specified past interval. +message HPAScalingPolicy { + // Type is used to specify the scaling policy. + optional string type = 1; + + // Value contains the amount of change which is permitted by the policy. + // It must be greater than zero + optional int32 value = 2; + + // PeriodSeconds specifies the window of time for which the policy should hold true. + // PeriodSeconds must be greater than zero and less than or equal to 1800 (30 min). + optional int32 periodSeconds = 3; +} + +// HPAScalingRules configures the scaling behavior for one direction. +// These Rules are applied after calculating DesiredReplicas from metrics for the HPA. +// They can limit the scaling velocity by specifying scaling policies. +// They can prevent flapping by specifying the stabilization window, so that the +// number of replicas is not set instantly, instead, the safest value from the stabilization +// window is chosen. +message HPAScalingRules { + // StabilizationWindowSeconds is the number of seconds for which past recommendations should be + // considered while scaling up or scaling down. + // StabilizationWindowSeconds must be greater than or equal to zero and less than or equal to 3600 (one hour). + // If not set, use the default values: + // - For scale up: 0 (i.e. no stabilization is done). + // - For scale down: 300 (i.e. the stabilization window is 300 seconds long). + // +optional + optional int32 stabilizationWindowSeconds = 3; + + // selectPolicy is used to specify which policy should be used. + // If not set, the default value MaxPolicySelect is used. + // +optional + optional string selectPolicy = 1; + + // policies is a list of potential scaling polices which can be used during scaling. + // At least one policy must be specified, otherwise the HPAScalingRules will be discarded as invalid + // +optional + repeated HPAScalingPolicy policies = 2; +} + // HorizontalPodAutoscaler is the configuration for a horizontal pod // autoscaler, which automatically manages the replica count of any resource // implementing the scale subresource based on the metrics specified. @@ -83,6 +124,25 @@ message HorizontalPodAutoscaler { optional HorizontalPodAutoscalerStatus status = 3; } +// HorizontalPodAutoscalerBehavior configures the scaling behavior of the target +// in both Up and Down directions (scaleUp and scaleDown fields respectively). +message HorizontalPodAutoscalerBehavior { + // scaleUp is scaling policy for scaling Up. + // If not set, the default value is the higher of: + // * increase no more than 4 pods per 60 seconds + // * double the number of pods per 60 seconds + // No stabilization is used. + // +optional + optional HPAScalingRules scaleUp = 1; + + // scaleDown is scaling policy for scaling Down. + // If not set, the default value is to allow to scale down to minReplicas pods, with a + // 300 second stabilization window (i.e., the highest recommendation for + // the last 300sec is used). + // +optional + optional HPAScalingRules scaleDown = 2; +} + // HorizontalPodAutoscalerCondition describes the state of // a HorizontalPodAutoscaler at a certain point. message HorizontalPodAutoscalerCondition { @@ -145,6 +205,12 @@ message HorizontalPodAutoscalerSpec { // If not set, the default metric will be set to 80% average CPU utilization. // +optional repeated MetricSpec metrics = 4; + + // behavior configures the scaling behavior of the target + // in both Up and Down directions (scaleUp and scaleDown fields respectively). + // If not set, the default HPAScalingRules for scale up and scale down are used. + // +optional + optional HorizontalPodAutoscalerBehavior behavior = 5; } // HorizontalPodAutoscalerStatus describes the current status of a horizontal pod autoscaler. diff --git a/vendor/k8s.io/api/autoscaling/v2beta2/types.go b/vendor/k8s.io/api/autoscaling/v2beta2/types.go index 4480c7da8d..614caeb6c5 100644 --- a/vendor/k8s.io/api/autoscaling/v2beta2/types.go +++ b/vendor/k8s.io/api/autoscaling/v2beta2/types.go @@ -72,6 +72,12 @@ type HorizontalPodAutoscalerSpec struct { // If not set, the default metric will be set to 80% average CPU utilization. // +optional Metrics []MetricSpec `json:"metrics,omitempty" protobuf:"bytes,4,rep,name=metrics"` + + // behavior configures the scaling behavior of the target + // in both Up and Down directions (scaleUp and scaleDown fields respectively). + // If not set, the default HPAScalingRules for scale up and scale down are used. + // +optional + Behavior *HorizontalPodAutoscalerBehavior `json:"behavior,omitempty" protobuf:"bytes,5,opt,name=behavior"` } // CrossVersionObjectReference contains enough information to let you identify the referred resource. @@ -117,6 +123,84 @@ type MetricSpec struct { External *ExternalMetricSource `json:"external,omitempty" protobuf:"bytes,5,opt,name=external"` } +// HorizontalPodAutoscalerBehavior configures the scaling behavior of the target +// in both Up and Down directions (scaleUp and scaleDown fields respectively). +type HorizontalPodAutoscalerBehavior struct { + // scaleUp is scaling policy for scaling Up. + // If not set, the default value is the higher of: + // * increase no more than 4 pods per 60 seconds + // * double the number of pods per 60 seconds + // No stabilization is used. + // +optional + ScaleUp *HPAScalingRules `json:"scaleUp,omitempty" protobuf:"bytes,1,opt,name=scaleUp"` + // scaleDown is scaling policy for scaling Down. + // If not set, the default value is to allow to scale down to minReplicas pods, with a + // 300 second stabilization window (i.e., the highest recommendation for + // the last 300sec is used). + // +optional + ScaleDown *HPAScalingRules `json:"scaleDown,omitempty" protobuf:"bytes,2,opt,name=scaleDown"` +} + +// ScalingPolicySelect is used to specify which policy should be used while scaling in a certain direction +type ScalingPolicySelect string + +const ( + // MaxPolicySelect selects the policy with the highest possible change. + MaxPolicySelect ScalingPolicySelect = "Max" + // MinPolicySelect selects the policy with the lowest possible change. + MinPolicySelect ScalingPolicySelect = "Min" + // DisabledPolicySelect disables the scaling in this direction. + DisabledPolicySelect ScalingPolicySelect = "Disabled" +) + +// HPAScalingRules configures the scaling behavior for one direction. +// These Rules are applied after calculating DesiredReplicas from metrics for the HPA. +// They can limit the scaling velocity by specifying scaling policies. +// They can prevent flapping by specifying the stabilization window, so that the +// number of replicas is not set instantly, instead, the safest value from the stabilization +// window is chosen. +type HPAScalingRules struct { + // StabilizationWindowSeconds is the number of seconds for which past recommendations should be + // considered while scaling up or scaling down. + // StabilizationWindowSeconds must be greater than or equal to zero and less than or equal to 3600 (one hour). + // If not set, use the default values: + // - For scale up: 0 (i.e. no stabilization is done). + // - For scale down: 300 (i.e. the stabilization window is 300 seconds long). + // +optional + StabilizationWindowSeconds *int32 `json:"stabilizationWindowSeconds" protobuf:"varint,3,opt,name=stabilizationWindowSeconds"` + // selectPolicy is used to specify which policy should be used. + // If not set, the default value MaxPolicySelect is used. + // +optional + SelectPolicy *ScalingPolicySelect `json:"selectPolicy,omitempty" protobuf:"bytes,1,opt,name=selectPolicy"` + // policies is a list of potential scaling polices which can be used during scaling. + // At least one policy must be specified, otherwise the HPAScalingRules will be discarded as invalid + // +optional + Policies []HPAScalingPolicy `json:"policies,omitempty" protobuf:"bytes,2,rep,name=policies"` +} + +// HPAScalingPolicyType is the type of the policy which could be used while making scaling decisions. +type HPAScalingPolicyType string + +const ( + // PodsScalingPolicy is a policy used to specify a change in absolute number of pods. + PodsScalingPolicy HPAScalingPolicyType = "Pods" + // PercentScalingPolicy is a policy used to specify a relative amount of change with respect to + // the current number of pods. + PercentScalingPolicy HPAScalingPolicyType = "Percent" +) + +// HPAScalingPolicy is a single policy which must hold true for a specified past interval. +type HPAScalingPolicy struct { + // Type is used to specify the scaling policy. + Type HPAScalingPolicyType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=HPAScalingPolicyType"` + // Value contains the amount of change which is permitted by the policy. + // It must be greater than zero + Value int32 `json:"value" protobuf:"varint,2,opt,name=value"` + // PeriodSeconds specifies the window of time for which the policy should hold true. + // PeriodSeconds must be greater than zero and less than or equal to 1800 (30 min). + PeriodSeconds int32 `json:"periodSeconds" protobuf:"varint,3,opt,name=periodSeconds"` +} + // MetricSourceType indicates the type of metric. type MetricSourceType string diff --git a/vendor/k8s.io/api/autoscaling/v2beta2/types_swagger_doc_generated.go b/vendor/k8s.io/api/autoscaling/v2beta2/types_swagger_doc_generated.go index bb85b9f0f4..3f38880f95 100644 --- a/vendor/k8s.io/api/autoscaling/v2beta2/types_swagger_doc_generated.go +++ b/vendor/k8s.io/api/autoscaling/v2beta2/types_swagger_doc_generated.go @@ -58,6 +58,28 @@ func (ExternalMetricStatus) SwaggerDoc() map[string]string { return map_ExternalMetricStatus } +var map_HPAScalingPolicy = map[string]string{ + "": "HPAScalingPolicy is a single policy which must hold true for a specified past interval.", + "type": "Type is used to specify the scaling policy.", + "value": "Value contains the amount of change which is permitted by the policy. It must be greater than zero", + "periodSeconds": "PeriodSeconds specifies the window of time for which the policy should hold true. PeriodSeconds must be greater than zero and less than or equal to 1800 (30 min).", +} + +func (HPAScalingPolicy) SwaggerDoc() map[string]string { + return map_HPAScalingPolicy +} + +var map_HPAScalingRules = map[string]string{ + "": "HPAScalingRules configures the scaling behavior for one direction. These Rules are applied after calculating DesiredReplicas from metrics for the HPA. They can limit the scaling velocity by specifying scaling policies. They can prevent flapping by specifying the stabilization window, so that the number of replicas is not set instantly, instead, the safest value from the stabilization window is chosen.", + "stabilizationWindowSeconds": "StabilizationWindowSeconds is the number of seconds for which past recommendations should be considered while scaling up or scaling down. StabilizationWindowSeconds must be greater than or equal to zero and less than or equal to 3600 (one hour). If not set, use the default values: - For scale up: 0 (i.e. no stabilization is done). - For scale down: 300 (i.e. the stabilization window is 300 seconds long).", + "selectPolicy": "selectPolicy is used to specify which policy should be used. If not set, the default value MaxPolicySelect is used.", + "policies": "policies is a list of potential scaling polices which can be used during scaling. At least one policy must be specified, otherwise the HPAScalingRules will be discarded as invalid", +} + +func (HPAScalingRules) SwaggerDoc() map[string]string { + return map_HPAScalingRules +} + var map_HorizontalPodAutoscaler = map[string]string{ "": "HorizontalPodAutoscaler is the configuration for a horizontal pod autoscaler, which automatically manages the replica count of any resource implementing the scale subresource based on the metrics specified.", "metadata": "metadata is the standard object metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", @@ -69,6 +91,16 @@ func (HorizontalPodAutoscaler) SwaggerDoc() map[string]string { return map_HorizontalPodAutoscaler } +var map_HorizontalPodAutoscalerBehavior = map[string]string{ + "": "HorizontalPodAutoscalerBehavior configures the scaling behavior of the target in both Up and Down directions (scaleUp and scaleDown fields respectively).", + "scaleUp": "scaleUp is scaling policy for scaling Up. If not set, the default value is the higher of:\n * increase no more than 4 pods per 60 seconds\n * double the number of pods per 60 seconds\nNo stabilization is used.", + "scaleDown": "scaleDown is scaling policy for scaling Down. If not set, the default value is to allow to scale down to minReplicas pods, with a 300 second stabilization window (i.e., the highest recommendation for the last 300sec is used).", +} + +func (HorizontalPodAutoscalerBehavior) SwaggerDoc() map[string]string { + return map_HorizontalPodAutoscalerBehavior +} + var map_HorizontalPodAutoscalerCondition = map[string]string{ "": "HorizontalPodAutoscalerCondition describes the state of a HorizontalPodAutoscaler at a certain point.", "type": "type describes the current condition", @@ -98,6 +130,7 @@ var map_HorizontalPodAutoscalerSpec = map[string]string{ "minReplicas": "minReplicas is the lower limit for the number of replicas to which the autoscaler can scale down. It defaults to 1 pod. minReplicas is allowed to be 0 if the alpha feature gate HPAScaleToZero is enabled and at least one Object or External metric is configured. Scaling is active as long as at least one metric value is available.", "maxReplicas": "maxReplicas is the upper limit for the number of replicas to which the autoscaler can scale up. It cannot be less that minReplicas.", "metrics": "metrics contains the specifications for which to use to calculate the desired replica count (the maximum replica count across all metrics will be used). The desired replica count is calculated multiplying the ratio between the target value and the current value by the current number of pods. Ergo, metrics used must decrease as the pod count is increased, and vice-versa. See the individual metric source types for more information about how each type of metric must respond. If not set, the default metric will be set to 80% average CPU utilization.", + "behavior": "behavior configures the scaling behavior of the target in both Up and Down directions (scaleUp and scaleDown fields respectively). If not set, the default HPAScalingRules for scale up and scale down are used.", } func (HorizontalPodAutoscalerSpec) SwaggerDoc() map[string]string { diff --git a/vendor/k8s.io/api/autoscaling/v2beta2/zz_generated.deepcopy.go b/vendor/k8s.io/api/autoscaling/v2beta2/zz_generated.deepcopy.go index 2dffa33360..ca26fe9206 100644 --- a/vendor/k8s.io/api/autoscaling/v2beta2/zz_generated.deepcopy.go +++ b/vendor/k8s.io/api/autoscaling/v2beta2/zz_generated.deepcopy.go @@ -77,6 +77,53 @@ func (in *ExternalMetricStatus) DeepCopy() *ExternalMetricStatus { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *HPAScalingPolicy) DeepCopyInto(out *HPAScalingPolicy) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HPAScalingPolicy. +func (in *HPAScalingPolicy) DeepCopy() *HPAScalingPolicy { + if in == nil { + return nil + } + out := new(HPAScalingPolicy) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *HPAScalingRules) DeepCopyInto(out *HPAScalingRules) { + *out = *in + if in.StabilizationWindowSeconds != nil { + in, out := &in.StabilizationWindowSeconds, &out.StabilizationWindowSeconds + *out = new(int32) + **out = **in + } + if in.SelectPolicy != nil { + in, out := &in.SelectPolicy, &out.SelectPolicy + *out = new(ScalingPolicySelect) + **out = **in + } + if in.Policies != nil { + in, out := &in.Policies, &out.Policies + *out = make([]HPAScalingPolicy, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HPAScalingRules. +func (in *HPAScalingRules) DeepCopy() *HPAScalingRules { + if in == nil { + return nil + } + out := new(HPAScalingRules) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *HorizontalPodAutoscaler) DeepCopyInto(out *HorizontalPodAutoscaler) { *out = *in @@ -105,6 +152,32 @@ func (in *HorizontalPodAutoscaler) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *HorizontalPodAutoscalerBehavior) DeepCopyInto(out *HorizontalPodAutoscalerBehavior) { + *out = *in + if in.ScaleUp != nil { + in, out := &in.ScaleUp, &out.ScaleUp + *out = new(HPAScalingRules) + (*in).DeepCopyInto(*out) + } + if in.ScaleDown != nil { + in, out := &in.ScaleDown, &out.ScaleDown + *out = new(HPAScalingRules) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HorizontalPodAutoscalerBehavior. +func (in *HorizontalPodAutoscalerBehavior) DeepCopy() *HorizontalPodAutoscalerBehavior { + if in == nil { + return nil + } + out := new(HorizontalPodAutoscalerBehavior) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *HorizontalPodAutoscalerCondition) DeepCopyInto(out *HorizontalPodAutoscalerCondition) { *out = *in @@ -171,6 +244,11 @@ func (in *HorizontalPodAutoscalerSpec) DeepCopyInto(out *HorizontalPodAutoscaler (*in)[i].DeepCopyInto(&(*out)[i]) } } + if in.Behavior != nil { + in, out := &in.Behavior, &out.Behavior + *out = new(HorizontalPodAutoscalerBehavior) + (*in).DeepCopyInto(*out) + } return } diff --git a/vendor/k8s.io/api/batch/v1/generated.pb.go b/vendor/k8s.io/api/batch/v1/generated.pb.go index fb9d21e17b..35944e7267 100644 --- a/vendor/k8s.io/api/batch/v1/generated.pb.go +++ b/vendor/k8s.io/api/batch/v1/generated.pb.go @@ -43,7 +43,7 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *Job) Reset() { *m = Job{} } func (*Job) ProtoMessage() {} @@ -1771,6 +1771,7 @@ func (m *JobStatus) Unmarshal(dAtA []byte) error { func skipGenerated(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -1802,10 +1803,8 @@ func skipGenerated(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -1826,55 +1825,30 @@ func skipGenerated(dAtA []byte) (n int, err error) { return 0, ErrInvalidLengthGenerated } iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - return iNdEx, nil case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipGenerated(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenerated + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenerated + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group") ) diff --git a/vendor/k8s.io/api/batch/v1beta1/generated.pb.go b/vendor/k8s.io/api/batch/v1beta1/generated.pb.go index 837a2f9c1c..69c4054bfe 100644 --- a/vendor/k8s.io/api/batch/v1beta1/generated.pb.go +++ b/vendor/k8s.io/api/batch/v1beta1/generated.pb.go @@ -43,7 +43,7 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *CronJob) Reset() { *m = CronJob{} } func (*CronJob) ProtoMessage() {} @@ -1660,6 +1660,7 @@ func (m *JobTemplateSpec) Unmarshal(dAtA []byte) error { func skipGenerated(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -1691,10 +1692,8 @@ func skipGenerated(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -1715,55 +1714,30 @@ func skipGenerated(dAtA []byte) (n int, err error) { return 0, ErrInvalidLengthGenerated } iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - return iNdEx, nil case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipGenerated(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenerated + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenerated + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group") ) diff --git a/vendor/k8s.io/api/batch/v2alpha1/generated.pb.go b/vendor/k8s.io/api/batch/v2alpha1/generated.pb.go index 8271c84111..3e58dbb92a 100644 --- a/vendor/k8s.io/api/batch/v2alpha1/generated.pb.go +++ b/vendor/k8s.io/api/batch/v2alpha1/generated.pb.go @@ -43,7 +43,7 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *CronJob) Reset() { *m = CronJob{} } func (*CronJob) ProtoMessage() {} @@ -1660,6 +1660,7 @@ func (m *JobTemplateSpec) Unmarshal(dAtA []byte) error { func skipGenerated(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -1691,10 +1692,8 @@ func skipGenerated(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -1715,55 +1714,30 @@ func skipGenerated(dAtA []byte) (n int, err error) { return 0, ErrInvalidLengthGenerated } iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - return iNdEx, nil case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipGenerated(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenerated + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenerated + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group") ) diff --git a/vendor/k8s.io/api/certificates/v1beta1/generated.pb.go b/vendor/k8s.io/api/certificates/v1beta1/generated.pb.go index 2e61b568e8..24fa4bf810 100644 --- a/vendor/k8s.io/api/certificates/v1beta1/generated.pb.go +++ b/vendor/k8s.io/api/certificates/v1beta1/generated.pb.go @@ -42,7 +42,7 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *CertificateSigningRequest) Reset() { *m = CertificateSigningRequest{} } func (*CertificateSigningRequest) ProtoMessage() {} @@ -227,58 +227,59 @@ func init() { } var fileDescriptor_09d156762b8218ef = []byte{ - // 805 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x54, 0x4b, 0x8f, 0x1b, 0x45, - 0x10, 0xf6, 0xf8, 0xb5, 0x76, 0x7b, 0xd9, 0x44, 0x2d, 0x14, 0x0d, 0x2b, 0x65, 0x66, 0x35, 0x02, - 0xb4, 0x3c, 0xd2, 0xc3, 0x46, 0x08, 0x56, 0x7b, 0x40, 0x30, 0x4b, 0x04, 0x2b, 0x12, 0x21, 0x75, - 0x62, 0x0e, 0x08, 0x89, 0xb4, 0xc7, 0x95, 0x71, 0xc7, 0x99, 0x07, 0xd3, 0x3d, 0x06, 0xdf, 0xf2, - 0x13, 0x38, 0x72, 0x41, 0xe2, 0x97, 0x70, 0x5e, 0x0e, 0x48, 0x39, 0xe6, 0x80, 0x2c, 0xd6, 0xfc, - 0x8b, 0x9c, 0x50, 0xf7, 0xb4, 0x3d, 0xc6, 0x2b, 0xe3, 0x28, 0x7b, 0x9b, 0xfa, 0xaa, 0xbe, 0xaf, - 0x1e, 0x5d, 0x35, 0xe8, 0xcb, 0xf1, 0xb1, 0x20, 0x3c, 0xf5, 0xc7, 0xc5, 0x00, 0xf2, 0x04, 0x24, - 0x08, 0x7f, 0x02, 0xc9, 0x30, 0xcd, 0x7d, 0xe3, 0x60, 0x19, 0xf7, 0x43, 0xc8, 0x25, 0x7f, 0xc4, - 0x43, 0xa6, 0xdd, 0x47, 0x03, 0x90, 0xec, 0xc8, 0x8f, 0x20, 0x81, 0x9c, 0x49, 0x18, 0x92, 0x2c, - 0x4f, 0x65, 0x8a, 0xdd, 0x92, 0x40, 0x58, 0xc6, 0xc9, 0x2a, 0x81, 0x18, 0xc2, 0xfe, 0xad, 0x88, - 0xcb, 0x51, 0x31, 0x20, 0x61, 0x1a, 0xfb, 0x51, 0x1a, 0xa5, 0xbe, 0xe6, 0x0d, 0x8a, 0x47, 0xda, - 0xd2, 0x86, 0xfe, 0x2a, 0xf5, 0xf6, 0x3f, 0xac, 0x0a, 0x88, 0x59, 0x38, 0xe2, 0x09, 0xe4, 0x53, - 0x3f, 0x1b, 0x47, 0x0a, 0x10, 0x7e, 0x0c, 0x92, 0xf9, 0x93, 0x4b, 0x55, 0xec, 0xfb, 0x9b, 0x58, - 0x79, 0x91, 0x48, 0x1e, 0xc3, 0x25, 0xc2, 0x47, 0xdb, 0x08, 0x22, 0x1c, 0x41, 0xcc, 0xd6, 0x79, - 0xde, 0x1f, 0x75, 0xf4, 0xc6, 0x69, 0xd5, 0xe6, 0x7d, 0x1e, 0x25, 0x3c, 0x89, 0x28, 0xfc, 0x50, - 0x80, 0x90, 0xf8, 0x21, 0xea, 0xa8, 0x0a, 0x87, 0x4c, 0x32, 0xdb, 0x3a, 0xb0, 0x0e, 0x7b, 0xb7, - 0x3f, 0x20, 0xd5, 0x7c, 0x96, 0x89, 0x48, 0x36, 0x8e, 0x14, 0x20, 0x88, 0x8a, 0x26, 0x93, 0x23, - 0xf2, 0xf5, 0xe0, 0x31, 0x84, 0xf2, 0x1e, 0x48, 0x16, 0xe0, 0xf3, 0x99, 0x5b, 0x9b, 0xcf, 0x5c, - 0x54, 0x61, 0x74, 0xa9, 0x8a, 0x1f, 0xa2, 0xa6, 0xc8, 0x20, 0xb4, 0xeb, 0x5a, 0xfd, 0x13, 0xb2, - 0x65, 0xfa, 0x64, 0x63, 0xad, 0xf7, 0x33, 0x08, 0x83, 0x5d, 0x93, 0xab, 0xa9, 0x2c, 0xaa, 0x95, - 0xf1, 0x08, 0xb5, 0x85, 0x64, 0xb2, 0x10, 0x76, 0x43, 0xe7, 0xf8, 0xf4, 0x0a, 0x39, 0xb4, 0x4e, - 0xb0, 0x67, 0xb2, 0xb4, 0x4b, 0x9b, 0x1a, 0x7d, 0xef, 0xd7, 0x3a, 0xf2, 0x36, 0x72, 0x4f, 0xd3, - 0x64, 0xc8, 0x25, 0x4f, 0x13, 0x7c, 0x8c, 0x9a, 0x72, 0x9a, 0x81, 0x1e, 0x68, 0x37, 0x78, 0x73, - 0x51, 0xf2, 0x83, 0x69, 0x06, 0x2f, 0x66, 0xee, 0xeb, 0xeb, 0xf1, 0x0a, 0xa7, 0x9a, 0x81, 0xdf, - 0x46, 0xed, 0x1c, 0x98, 0x48, 0x13, 0x3d, 0xae, 0x6e, 0x55, 0x08, 0xd5, 0x28, 0x35, 0x5e, 0xfc, - 0x0e, 0xda, 0x89, 0x41, 0x08, 0x16, 0x81, 0xee, 0xb9, 0x1b, 0x5c, 0x33, 0x81, 0x3b, 0xf7, 0x4a, - 0x98, 0x2e, 0xfc, 0xf8, 0x31, 0xda, 0x7b, 0xc2, 0x84, 0xec, 0x67, 0x43, 0x26, 0xe1, 0x01, 0x8f, - 0xc1, 0x6e, 0xea, 0x29, 0xbd, 0xfb, 0x72, 0xef, 0xac, 0x18, 0xc1, 0x0d, 0xa3, 0xbe, 0x77, 0xf7, - 0x3f, 0x4a, 0x74, 0x4d, 0xd9, 0x9b, 0x59, 0xe8, 0xe6, 0xc6, 0xf9, 0xdc, 0xe5, 0x42, 0xe2, 0xef, - 0x2e, 0xed, 0x1b, 0x79, 0xb9, 0x3a, 0x14, 0x5b, 0x6f, 0xdb, 0x75, 0x53, 0x4b, 0x67, 0x81, 0xac, - 0xec, 0xda, 0xf7, 0xa8, 0xc5, 0x25, 0xc4, 0xc2, 0xae, 0x1f, 0x34, 0x0e, 0x7b, 0xb7, 0x4f, 0x5e, - 0x7d, 0x11, 0x82, 0xd7, 0x4c, 0x9a, 0xd6, 0x99, 0x12, 0xa4, 0xa5, 0xae, 0xf7, 0x7b, 0xe3, 0x7f, - 0x1a, 0x54, 0x2b, 0x89, 0xdf, 0x42, 0x3b, 0x79, 0x69, 0xea, 0xfe, 0x76, 0x83, 0x9e, 0x7a, 0x15, - 0x13, 0x41, 0x17, 0x3e, 0x4c, 0x50, 0xbb, 0x50, 0xcf, 0x23, 0xec, 0xd6, 0x41, 0xe3, 0xb0, 0x1b, - 0xdc, 0x50, 0x8f, 0xdc, 0xd7, 0xc8, 0x8b, 0x99, 0xdb, 0xf9, 0x0a, 0xa6, 0xda, 0xa0, 0x26, 0x0a, - 0xbf, 0x8f, 0x3a, 0x85, 0x80, 0x3c, 0x61, 0x31, 0x98, 0xd5, 0x58, 0xce, 0xa1, 0x6f, 0x70, 0xba, - 0x8c, 0xc0, 0x37, 0x51, 0xa3, 0xe0, 0x43, 0xb3, 0x1a, 0x3d, 0x13, 0xd8, 0xe8, 0x9f, 0x7d, 0x4e, - 0x15, 0x8e, 0x3d, 0xd4, 0x8e, 0xf2, 0xb4, 0xc8, 0x84, 0xdd, 0xd4, 0xc9, 0x91, 0x4a, 0xfe, 0x85, - 0x46, 0xa8, 0xf1, 0xe0, 0x04, 0xb5, 0xe0, 0x27, 0x99, 0x33, 0xbb, 0xad, 0x47, 0x79, 0x76, 0xb5, - 0xbb, 0x25, 0x77, 0x94, 0xd6, 0x9d, 0x44, 0xe6, 0xd3, 0x6a, 0xb2, 0x1a, 0xa3, 0x65, 0x9a, 0x7d, - 0x40, 0xa8, 0x8a, 0xc1, 0xd7, 0x51, 0x63, 0x0c, 0xd3, 0xf2, 0x80, 0xa8, 0xfa, 0xc4, 0x9f, 0xa1, - 0xd6, 0x84, 0x3d, 0x29, 0xc0, 0xfc, 0x47, 0xde, 0xdb, 0x5a, 0x8f, 0x56, 0xfb, 0x46, 0x51, 0x68, - 0xc9, 0x3c, 0xa9, 0x1f, 0x5b, 0xde, 0x9f, 0x16, 0x72, 0xb7, 0x5c, 0x3f, 0xfe, 0x11, 0xa1, 0x70, - 0x71, 0x9b, 0xc2, 0xb6, 0x74, 0xff, 0xa7, 0xaf, 0xde, 0xff, 0xf2, 0xce, 0xab, 0x1f, 0xe5, 0x12, - 0x12, 0x74, 0x25, 0x15, 0x3e, 0x42, 0xbd, 0x15, 0x69, 0xdd, 0xe9, 0x6e, 0x70, 0x6d, 0x3e, 0x73, - 0x7b, 0x2b, 0xe2, 0x74, 0x35, 0xc6, 0xfb, 0xd8, 0x8c, 0x4d, 0x37, 0x8a, 0xdd, 0xc5, 0xfe, 0x5b, - 0xfa, 0x5d, 0xbb, 0xeb, 0xfb, 0x7b, 0xd2, 0xf9, 0xe5, 0x37, 0xb7, 0xf6, 0xf4, 0xaf, 0x83, 0x5a, - 0x70, 0xeb, 0xfc, 0xc2, 0xa9, 0x3d, 0xbb, 0x70, 0x6a, 0xcf, 0x2f, 0x9c, 0xda, 0xd3, 0xb9, 0x63, - 0x9d, 0xcf, 0x1d, 0xeb, 0xd9, 0xdc, 0xb1, 0x9e, 0xcf, 0x1d, 0xeb, 0xef, 0xb9, 0x63, 0xfd, 0xfc, - 0x8f, 0x53, 0xfb, 0x76, 0xc7, 0x74, 0xf7, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x39, 0x0e, 0xb6, - 0xcd, 0x7f, 0x07, 0x00, 0x00, + // 824 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x54, 0x4d, 0x6f, 0x1b, 0x45, + 0x18, 0xf6, 0xfa, 0xdb, 0xe3, 0x90, 0x56, 0x23, 0x54, 0x2d, 0x91, 0xba, 0x1b, 0xad, 0x00, 0x85, + 0x8f, 0xce, 0x92, 0x0a, 0x41, 0x94, 0x03, 0x82, 0x0d, 0x15, 0x44, 0xb4, 0x20, 0x4d, 0x1a, 0x0e, + 0x08, 0x89, 0x8e, 0xd7, 0x6f, 0x37, 0x53, 0x77, 0x3f, 0xd8, 0x99, 0x35, 0xf8, 0xd6, 0x9f, 0xc0, + 0x91, 0x0b, 0x12, 0x3f, 0x27, 0x1c, 0x90, 0x7a, 0xec, 0x01, 0x59, 0xc4, 0xdc, 0xf9, 0x01, 0x3d, + 0xa1, 0x99, 0x1d, 0x7b, 0x8d, 0x23, 0xd7, 0x55, 0x73, 0xdb, 0xf7, 0x79, 0xdf, 0xe7, 0x79, 0x3f, + 0x67, 0xd1, 0x97, 0xa3, 0x03, 0x41, 0x78, 0xea, 0x8f, 0x8a, 0x01, 0xe4, 0x09, 0x48, 0x10, 0xfe, + 0x18, 0x92, 0x61, 0x9a, 0xfb, 0xc6, 0xc1, 0x32, 0xee, 0x87, 0x90, 0x4b, 0xfe, 0x90, 0x87, 0x4c, + 0xbb, 0xf7, 0x07, 0x20, 0xd9, 0xbe, 0x1f, 0x41, 0x02, 0x39, 0x93, 0x30, 0x24, 0x59, 0x9e, 0xca, + 0x14, 0xbb, 0x25, 0x81, 0xb0, 0x8c, 0x93, 0x65, 0x02, 0x31, 0x84, 0x9d, 0x5b, 0x11, 0x97, 0x67, + 0xc5, 0x80, 0x84, 0x69, 0xec, 0x47, 0x69, 0x94, 0xfa, 0x9a, 0x37, 0x28, 0x1e, 0x6a, 0x4b, 0x1b, + 0xfa, 0xab, 0xd4, 0xdb, 0xf9, 0xb0, 0x2a, 0x20, 0x66, 0xe1, 0x19, 0x4f, 0x20, 0x9f, 0xf8, 0xd9, + 0x28, 0x52, 0x80, 0xf0, 0x63, 0x90, 0xcc, 0x1f, 0x5f, 0xaa, 0x62, 0xc7, 0x5f, 0xc7, 0xca, 0x8b, + 0x44, 0xf2, 0x18, 0x2e, 0x11, 0x3e, 0xda, 0x44, 0x10, 0xe1, 0x19, 0xc4, 0x6c, 0x95, 0xe7, 0xfd, + 0x51, 0x47, 0x6f, 0x1c, 0x55, 0x6d, 0x9e, 0xf0, 0x28, 0xe1, 0x49, 0x44, 0xe1, 0xc7, 0x02, 0x84, + 0xc4, 0x0f, 0x50, 0x57, 0x55, 0x38, 0x64, 0x92, 0xd9, 0xd6, 0xae, 0xb5, 0xd7, 0xbf, 0xfd, 0x01, + 0xa9, 0xe6, 0xb3, 0x48, 0x44, 0xb2, 0x51, 0xa4, 0x00, 0x41, 0x54, 0x34, 0x19, 0xef, 0x93, 0x6f, + 0x06, 0x8f, 0x20, 0x94, 0xf7, 0x40, 0xb2, 0x00, 0x9f, 0x4f, 0xdd, 0xda, 0x6c, 0xea, 0xa2, 0x0a, + 0xa3, 0x0b, 0x55, 0xfc, 0x00, 0x35, 0x45, 0x06, 0xa1, 0x5d, 0xd7, 0xea, 0x9f, 0x90, 0x0d, 0xd3, + 0x27, 0x6b, 0x6b, 0x3d, 0xc9, 0x20, 0x0c, 0xb6, 0x4c, 0xae, 0xa6, 0xb2, 0xa8, 0x56, 0xc6, 0x67, + 0xa8, 0x2d, 0x24, 0x93, 0x85, 0xb0, 0x1b, 0x3a, 0xc7, 0xa7, 0x57, 0xc8, 0xa1, 0x75, 0x82, 0x6d, + 0x93, 0xa5, 0x5d, 0xda, 0xd4, 0xe8, 0x7b, 0xbf, 0xd5, 0x91, 0xb7, 0x96, 0x7b, 0x94, 0x26, 0x43, + 0x2e, 0x79, 0x9a, 0xe0, 0x03, 0xd4, 0x94, 0x93, 0x0c, 0xf4, 0x40, 0x7b, 0xc1, 0x9b, 0xf3, 0x92, + 0xef, 0x4f, 0x32, 0x78, 0x3e, 0x75, 0x5f, 0x5f, 0x8d, 0x57, 0x38, 0xd5, 0x0c, 0xfc, 0x36, 0x6a, + 0xe7, 0xc0, 0x44, 0x9a, 0xe8, 0x71, 0xf5, 0xaa, 0x42, 0xa8, 0x46, 0xa9, 0xf1, 0xe2, 0x77, 0x50, + 0x27, 0x06, 0x21, 0x58, 0x04, 0xba, 0xe7, 0x5e, 0x70, 0xcd, 0x04, 0x76, 0xee, 0x95, 0x30, 0x9d, + 0xfb, 0xf1, 0x23, 0xb4, 0xfd, 0x98, 0x09, 0x79, 0x9a, 0x0d, 0x99, 0x84, 0xfb, 0x3c, 0x06, 0xbb, + 0xa9, 0xa7, 0xf4, 0xee, 0xcb, 0xed, 0x59, 0x31, 0x82, 0x1b, 0x46, 0x7d, 0xfb, 0xee, 0xff, 0x94, + 0xe8, 0x8a, 0xb2, 0x37, 0xb5, 0xd0, 0xcd, 0xb5, 0xf3, 0xb9, 0xcb, 0x85, 0xc4, 0xdf, 0x5f, 0xba, + 0x37, 0xf2, 0x72, 0x75, 0x28, 0xb6, 0xbe, 0xb6, 0xeb, 0xa6, 0x96, 0xee, 0x1c, 0x59, 0xba, 0xb5, + 0x1f, 0x50, 0x8b, 0x4b, 0x88, 0x85, 0x5d, 0xdf, 0x6d, 0xec, 0xf5, 0x6f, 0x1f, 0xbe, 0xfa, 0x21, + 0x04, 0xaf, 0x99, 0x34, 0xad, 0x63, 0x25, 0x48, 0x4b, 0x5d, 0xef, 0xdf, 0xc6, 0x0b, 0x1a, 0x54, + 0x27, 0x89, 0xdf, 0x42, 0x9d, 0xbc, 0x34, 0x75, 0x7f, 0x5b, 0x41, 0x5f, 0x6d, 0xc5, 0x44, 0xd0, + 0xb9, 0x0f, 0x13, 0x84, 0x04, 0x8f, 0x12, 0xc8, 0xbf, 0x66, 0x31, 0xd8, 0x9d, 0x72, 0xd9, 0xea, + 0x0d, 0x9d, 0x2c, 0x50, 0xba, 0x14, 0x81, 0x09, 0x6a, 0x17, 0x6a, 0x9d, 0xc2, 0x6e, 0xed, 0x36, + 0xf6, 0x7a, 0xc1, 0x0d, 0x75, 0x14, 0xa7, 0x1a, 0x79, 0x3e, 0x75, 0xbb, 0x5f, 0xc1, 0x44, 0x1b, + 0xd4, 0x44, 0xe1, 0xf7, 0x51, 0xb7, 0x10, 0x90, 0x27, 0x4a, 0xbd, 0x3c, 0xa5, 0xc5, 0xdc, 0x4e, + 0x0d, 0x4e, 0x17, 0x11, 0xf8, 0x26, 0x6a, 0x14, 0x7c, 0x68, 0x4e, 0xa9, 0x6f, 0x02, 0x1b, 0xa7, + 0xc7, 0x9f, 0x53, 0x85, 0x63, 0x0f, 0xb5, 0xa3, 0x3c, 0x2d, 0x32, 0x61, 0x37, 0x75, 0x72, 0xa4, + 0x92, 0x7f, 0xa1, 0x11, 0x6a, 0x3c, 0x38, 0x41, 0x2d, 0xf8, 0x59, 0xe6, 0xcc, 0x6e, 0xeb, 0xd1, + 0x1f, 0x5f, 0xed, 0x9d, 0x93, 0x3b, 0x4a, 0xeb, 0x4e, 0x22, 0xf3, 0x49, 0xb5, 0x09, 0x8d, 0xd1, + 0x32, 0xcd, 0x0e, 0x20, 0x54, 0xc5, 0xe0, 0xeb, 0xa8, 0x31, 0x82, 0x49, 0xf9, 0xe0, 0xa8, 0xfa, + 0xc4, 0x9f, 0xa1, 0xd6, 0x98, 0x3d, 0x2e, 0xc0, 0xfc, 0x77, 0xde, 0xdb, 0x58, 0x8f, 0x56, 0xfb, + 0x56, 0x51, 0x68, 0xc9, 0x3c, 0xac, 0x1f, 0x58, 0xde, 0x9f, 0x16, 0x72, 0x37, 0xfc, 0x2d, 0xf0, + 0x4f, 0x08, 0x85, 0xf3, 0xb7, 0x2c, 0x6c, 0x4b, 0xf7, 0x7f, 0xf4, 0xea, 0xfd, 0x2f, 0xfe, 0x0b, + 0xd5, 0x8f, 0x75, 0x01, 0x09, 0xba, 0x94, 0x0a, 0xef, 0xa3, 0xfe, 0x92, 0xb4, 0xee, 0x74, 0x2b, + 0xb8, 0x36, 0x9b, 0xba, 0xfd, 0x25, 0x71, 0xba, 0x1c, 0xe3, 0x7d, 0x6c, 0xc6, 0xa6, 0x1b, 0xc5, + 0xee, 0xfc, 0xbd, 0x58, 0x7a, 0xaf, 0xbd, 0xd5, 0x7b, 0x3f, 0xec, 0xfe, 0xfa, 0xbb, 0x5b, 0x7b, + 0xf2, 0xd7, 0x6e, 0x2d, 0xb8, 0x75, 0x7e, 0xe1, 0xd4, 0x9e, 0x5e, 0x38, 0xb5, 0x67, 0x17, 0x4e, + 0xed, 0xc9, 0xcc, 0xb1, 0xce, 0x67, 0x8e, 0xf5, 0x74, 0xe6, 0x58, 0xcf, 0x66, 0x8e, 0xf5, 0xf7, + 0xcc, 0xb1, 0x7e, 0xf9, 0xc7, 0xa9, 0x7d, 0xd7, 0x31, 0xdd, 0xfd, 0x17, 0x00, 0x00, 0xff, 0xff, + 0x69, 0x8d, 0xc8, 0xd3, 0xaf, 0x07, 0x00, 0x00, } func (m *CertificateSigningRequest) Marshal() (dAtA []byte, err error) { @@ -449,6 +450,13 @@ func (m *CertificateSigningRequestSpec) MarshalToSizedBuffer(dAtA []byte) (int, _ = i var l int _ = l + if m.SignerName != nil { + i -= len(*m.SignerName) + copy(dAtA[i:], *m.SignerName) + i = encodeVarintGenerated(dAtA, i, uint64(len(*m.SignerName))) + i-- + dAtA[i] = 0x3a + } if len(m.Extra) > 0 { keysForExtra := make([]string, 0, len(m.Extra)) for k := range m.Extra { @@ -687,6 +695,10 @@ func (m *CertificateSigningRequestSpec) Size() (n int) { n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize)) } } + if m.SignerName != nil { + l = len(*m.SignerName) + n += 1 + l + sovGenerated(uint64(l)) + } return n } @@ -792,6 +804,7 @@ func (this *CertificateSigningRequestSpec) String() string { `Groups:` + fmt.Sprintf("%v", this.Groups) + `,`, `Usages:` + fmt.Sprintf("%v", this.Usages) + `,`, `Extra:` + mapStringForExtra + `,`, + `SignerName:` + valueToStringGenerated(this.SignerName) + `,`, `}`, }, "") return s @@ -1594,6 +1607,39 @@ func (m *CertificateSigningRequestSpec) Unmarshal(dAtA []byte) error { } m.Extra[mapkey] = *mapvalue iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SignerName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.SignerName = &s + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -1827,6 +1873,7 @@ func (m *ExtraValue) Unmarshal(dAtA []byte) error { func skipGenerated(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -1858,10 +1905,8 @@ func skipGenerated(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -1882,55 +1927,30 @@ func skipGenerated(dAtA []byte) (n int, err error) { return 0, ErrInvalidLengthGenerated } iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - return iNdEx, nil case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipGenerated(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenerated + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenerated + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group") ) diff --git a/vendor/k8s.io/api/certificates/v1beta1/generated.proto b/vendor/k8s.io/api/certificates/v1beta1/generated.proto index 5200224a2f..78d2dbc78f 100644 --- a/vendor/k8s.io/api/certificates/v1beta1/generated.proto +++ b/vendor/k8s.io/api/certificates/v1beta1/generated.proto @@ -73,6 +73,19 @@ message CertificateSigningRequestSpec { // Base64-encoded PKCS#10 CSR data optional bytes request = 1; + // Requested signer for the request. It is a qualified name in the form: + // `scope-hostname.io/name`. + // If empty, it will be defaulted: + // 1. If it's a kubelet client certificate, it is assigned + // "kubernetes.io/kube-apiserver-client-kubelet". + // 2. If it's a kubelet serving certificate, it is assigned + // "kubernetes.io/kubelet-serving". + // 3. Otherwise, it is assigned "kubernetes.io/legacy-unknown". + // Distribution of trust for signers happens out of band. + // You can select on this field using `spec.signerName`. + // +optional + optional string signerName = 7; + // allowedUsages specifies a set of usage contexts the key will be // valid for. // See: https://tools.ietf.org/html/rfc5280#section-4.2.1.3 diff --git a/vendor/k8s.io/api/certificates/v1beta1/types.go b/vendor/k8s.io/api/certificates/v1beta1/types.go index 93f81cd529..5a46e63420 100644 --- a/vendor/k8s.io/api/certificates/v1beta1/types.go +++ b/vendor/k8s.io/api/certificates/v1beta1/types.go @@ -48,6 +48,19 @@ type CertificateSigningRequestSpec struct { // Base64-encoded PKCS#10 CSR data Request []byte `json:"request" protobuf:"bytes,1,opt,name=request"` + // Requested signer for the request. It is a qualified name in the form: + // `scope-hostname.io/name`. + // If empty, it will be defaulted: + // 1. If it's a kubelet client certificate, it is assigned + // "kubernetes.io/kube-apiserver-client-kubelet". + // 2. If it's a kubelet serving certificate, it is assigned + // "kubernetes.io/kubelet-serving". + // 3. Otherwise, it is assigned "kubernetes.io/legacy-unknown". + // Distribution of trust for signers happens out of band. + // You can select on this field using `spec.signerName`. + // +optional + SignerName *string `json:"signerName,omitempty" protobuf:"bytes,7,opt,name=signerName"` + // allowedUsages specifies a set of usage contexts the key will be // valid for. // See: https://tools.ietf.org/html/rfc5280#section-4.2.1.3 @@ -72,6 +85,28 @@ type CertificateSigningRequestSpec struct { Extra map[string]ExtraValue `json:"extra,omitempty" protobuf:"bytes,6,rep,name=extra"` } +// Built in signerName values that are honoured by kube-controller-manager. +// None of these usages are related to ServiceAccount token secrets +// `.data[ca.crt]` in any way. +const ( + // Signs certificates that will be honored as client-certs by the + // kube-apiserver. Never auto-approved by kube-controller-manager. + KubeAPIServerClientSignerName = "kubernetes.io/kube-apiserver-client" + + // Signs client certificates that will be honored as client-certs by the + // kube-apiserver for a kubelet. + // May be auto-approved by kube-controller-manager. + KubeAPIServerClientKubeletSignerName = "kubernetes.io/kube-apiserver-client-kubelet" + + // Signs serving certificates that are honored as a valid kubelet serving + // certificate by the kube-apiserver, but has no other guarantees. + KubeletServingSignerName = "kubernetes.io/kubelet-serving" + + // Has no guarantees for trust at all. Some distributions may honor these + // as client certs, but that behavior is not standard kubernetes behavior. + LegacyUnknownSignerName = "kubernetes.io/legacy-unknown" +) + // ExtraValue masks the value so protobuf can generate // +protobuf.nullable=true // +protobuf.options.(gogoproto.goproto_stringer)=false diff --git a/vendor/k8s.io/api/certificates/v1beta1/types_swagger_doc_generated.go b/vendor/k8s.io/api/certificates/v1beta1/types_swagger_doc_generated.go index f6a7e16acb..a2edb45a81 100644 --- a/vendor/k8s.io/api/certificates/v1beta1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/api/certificates/v1beta1/types_swagger_doc_generated.go @@ -49,13 +49,14 @@ func (CertificateSigningRequestCondition) SwaggerDoc() map[string]string { } var map_CertificateSigningRequestSpec = map[string]string{ - "": "This information is immutable after the request is created. Only the Request and Usages fields can be set on creation, other fields are derived by Kubernetes and cannot be modified by users.", - "request": "Base64-encoded PKCS#10 CSR data", - "usages": "allowedUsages specifies a set of usage contexts the key will be valid for. See: https://tools.ietf.org/html/rfc5280#section-4.2.1.3\n https://tools.ietf.org/html/rfc5280#section-4.2.1.12", - "username": "Information about the requesting user. See user.Info interface for details.", - "uid": "UID information about the requesting user. See user.Info interface for details.", - "groups": "Group information about the requesting user. See user.Info interface for details.", - "extra": "Extra information about the requesting user. See user.Info interface for details.", + "": "This information is immutable after the request is created. Only the Request and Usages fields can be set on creation, other fields are derived by Kubernetes and cannot be modified by users.", + "request": "Base64-encoded PKCS#10 CSR data", + "signerName": "Requested signer for the request. It is a qualified name in the form: `scope-hostname.io/name`. If empty, it will be defaulted:\n 1. If it's a kubelet client certificate, it is assigned\n \"kubernetes.io/kube-apiserver-client-kubelet\".\n 2. If it's a kubelet serving certificate, it is assigned\n \"kubernetes.io/kubelet-serving\".\n 3. Otherwise, it is assigned \"kubernetes.io/legacy-unknown\".\nDistribution of trust for signers happens out of band. You can select on this field using `spec.signerName`.", + "usages": "allowedUsages specifies a set of usage contexts the key will be valid for. See: https://tools.ietf.org/html/rfc5280#section-4.2.1.3\n https://tools.ietf.org/html/rfc5280#section-4.2.1.12", + "username": "Information about the requesting user. See user.Info interface for details.", + "uid": "UID information about the requesting user. See user.Info interface for details.", + "groups": "Group information about the requesting user. See user.Info interface for details.", + "extra": "Extra information about the requesting user. See user.Info interface for details.", } func (CertificateSigningRequestSpec) SwaggerDoc() map[string]string { diff --git a/vendor/k8s.io/api/certificates/v1beta1/zz_generated.deepcopy.go b/vendor/k8s.io/api/certificates/v1beta1/zz_generated.deepcopy.go index b3e0aeb507..11d0f77dd9 100644 --- a/vendor/k8s.io/api/certificates/v1beta1/zz_generated.deepcopy.go +++ b/vendor/k8s.io/api/certificates/v1beta1/zz_generated.deepcopy.go @@ -110,6 +110,11 @@ func (in *CertificateSigningRequestSpec) DeepCopyInto(out *CertificateSigningReq *out = make([]byte, len(*in)) copy(*out, *in) } + if in.SignerName != nil { + in, out := &in.SignerName, &out.SignerName + *out = new(string) + **out = **in + } if in.Usages != nil { in, out := &in.Usages, &out.Usages *out = make([]KeyUsage, len(*in)) diff --git a/vendor/k8s.io/api/coordination/v1/generated.pb.go b/vendor/k8s.io/api/coordination/v1/generated.pb.go index 7e78be191c..22c3d624e2 100644 --- a/vendor/k8s.io/api/coordination/v1/generated.pb.go +++ b/vendor/k8s.io/api/coordination/v1/generated.pb.go @@ -42,7 +42,7 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *Lease) Reset() { *m = Lease{} } func (*Lease) ProtoMessage() {} @@ -893,6 +893,7 @@ func (m *LeaseSpec) Unmarshal(dAtA []byte) error { func skipGenerated(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -924,10 +925,8 @@ func skipGenerated(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -948,55 +947,30 @@ func skipGenerated(dAtA []byte) (n int, err error) { return 0, ErrInvalidLengthGenerated } iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - return iNdEx, nil case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipGenerated(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenerated + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenerated + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group") ) diff --git a/vendor/k8s.io/api/coordination/v1beta1/generated.pb.go b/vendor/k8s.io/api/coordination/v1beta1/generated.pb.go index 2463d6258e..57a314cfd7 100644 --- a/vendor/k8s.io/api/coordination/v1beta1/generated.pb.go +++ b/vendor/k8s.io/api/coordination/v1beta1/generated.pb.go @@ -42,7 +42,7 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *Lease) Reset() { *m = Lease{} } func (*Lease) ProtoMessage() {} @@ -893,6 +893,7 @@ func (m *LeaseSpec) Unmarshal(dAtA []byte) error { func skipGenerated(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -924,10 +925,8 @@ func skipGenerated(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -948,55 +947,30 @@ func skipGenerated(dAtA []byte) (n int, err error) { return 0, ErrInvalidLengthGenerated } iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - return iNdEx, nil case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipGenerated(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenerated + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenerated + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group") ) diff --git a/vendor/k8s.io/api/core/v1/generated.pb.go b/vendor/k8s.io/api/core/v1/generated.pb.go index 732385ce92..8e58752068 100644 --- a/vendor/k8s.io/api/core/v1/generated.pb.go +++ b/vendor/k8s.io/api/core/v1/generated.pb.go @@ -47,7 +47,7 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *AWSElasticBlockStoreVolumeSource) Reset() { *m = AWSElasticBlockStoreVolumeSource{} } func (*AWSElasticBlockStoreVolumeSource) ProtoMessage() {} @@ -6000,859 +6000,865 @@ func init() { } var fileDescriptor_83c10c24ec417dc9 = []byte{ - // 13620 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0xbd, 0x6b, 0x70, 0x24, 0x59, - 0x5a, 0x18, 0xba, 0x59, 0xa5, 0x47, 0xd5, 0xa7, 0xf7, 0xe9, 0xc7, 0xa8, 0x35, 0xdd, 0xad, 0x9e, - 0x9c, 0xdd, 0x9e, 0x9e, 0x9d, 0x19, 0xf5, 0xce, 0x6b, 0x67, 0x98, 0x99, 0x1d, 0x90, 0x54, 0x52, - 0x77, 0x4d, 0xb7, 0xd4, 0x35, 0xa7, 0xd4, 0xdd, 0xbb, 0xc3, 0xec, 0xde, 0x4d, 0x55, 0x1e, 0x49, - 0x39, 0x2a, 0x65, 0xd6, 0x64, 0x66, 0x49, 0xad, 0xb9, 0x10, 0x97, 0xbb, 0x3c, 0xf7, 0x02, 0x37, - 0x36, 0x6c, 0xc2, 0x0f, 0x20, 0xb0, 0x03, 0xe3, 0x00, 0x0c, 0x76, 0x18, 0x83, 0x01, 0xef, 0x62, - 0x1b, 0x83, 0xed, 0xc0, 0xfe, 0x81, 0xb1, 0xc3, 0xf6, 0x12, 0x41, 0x58, 0x86, 0xc6, 0x61, 0x62, - 0x7f, 0x18, 0x08, 0x83, 0x7f, 0x58, 0x26, 0x8c, 0xe3, 0x3c, 0xf3, 0x9c, 0xac, 0xcc, 0xaa, 0x52, - 0x8f, 0x5a, 0x3b, 0x6c, 0xcc, 0xbf, 0xaa, 0xf3, 0x7d, 0xe7, 0x3b, 0x27, 0xcf, 0xf3, 0x3b, 0xdf, - 0x13, 0x5e, 0xdd, 0x7e, 0x39, 0x9a, 0xf3, 0x82, 0xab, 0xdb, 0xed, 0x75, 0x12, 0xfa, 0x24, 0x26, - 0xd1, 0xd5, 0x5d, 0xe2, 0xbb, 0x41, 0x78, 0x55, 0x00, 0x9c, 0x96, 0x77, 0xb5, 0x11, 0x84, 0xe4, - 0xea, 0xee, 0xb3, 0x57, 0x37, 0x89, 0x4f, 0x42, 0x27, 0x26, 0xee, 0x5c, 0x2b, 0x0c, 0xe2, 0x00, - 0x21, 0x8e, 0x33, 0xe7, 0xb4, 0xbc, 0x39, 0x8a, 0x33, 0xb7, 0xfb, 0xec, 0xcc, 0x33, 0x9b, 0x5e, - 0xbc, 0xd5, 0x5e, 0x9f, 0x6b, 0x04, 0x3b, 0x57, 0x37, 0x83, 0xcd, 0xe0, 0x2a, 0x43, 0x5d, 0x6f, - 0x6f, 0xb0, 0x7f, 0xec, 0x0f, 0xfb, 0xc5, 0x49, 0xcc, 0xbc, 0x90, 0x34, 0xb3, 0xe3, 0x34, 0xb6, - 0x3c, 0x9f, 0x84, 0xfb, 0x57, 0x5b, 0xdb, 0x9b, 0xac, 0xdd, 0x90, 0x44, 0x41, 0x3b, 0x6c, 0x90, - 0x74, 0xc3, 0x5d, 0x6b, 0x45, 0x57, 0x77, 0x48, 0xec, 0x64, 0x74, 0x77, 0xe6, 0x6a, 0x5e, 0xad, - 0xb0, 0xed, 0xc7, 0xde, 0x4e, 0x67, 0x33, 0x9f, 0xec, 0x55, 0x21, 0x6a, 0x6c, 0x91, 0x1d, 0xa7, - 0xa3, 0xde, 0xf3, 0x79, 0xf5, 0xda, 0xb1, 0xd7, 0xbc, 0xea, 0xf9, 0x71, 0x14, 0x87, 0xe9, 0x4a, - 0xf6, 0x57, 0x2d, 0xb8, 0x34, 0x7f, 0xb7, 0xbe, 0xd4, 0x74, 0xa2, 0xd8, 0x6b, 0x2c, 0x34, 0x83, - 0xc6, 0x76, 0x3d, 0x0e, 0x42, 0x72, 0x27, 0x68, 0xb6, 0x77, 0x48, 0x9d, 0x0d, 0x04, 0x7a, 0x1a, - 0x4a, 0xbb, 0xec, 0x7f, 0xb5, 0x32, 0x6d, 0x5d, 0xb2, 0xae, 0x94, 0x17, 0x26, 0x7f, 0xe3, 0x60, - 0xf6, 0x23, 0xf7, 0x0f, 0x66, 0x4b, 0x77, 0x44, 0x39, 0x56, 0x18, 0xe8, 0x32, 0x0c, 0x6d, 0x44, - 0x6b, 0xfb, 0x2d, 0x32, 0x5d, 0x60, 0xb8, 0xe3, 0x02, 0x77, 0x68, 0xb9, 0x4e, 0x4b, 0xb1, 0x80, - 0xa2, 0xab, 0x50, 0x6e, 0x39, 0x61, 0xec, 0xc5, 0x5e, 0xe0, 0x4f, 0x17, 0x2f, 0x59, 0x57, 0x06, - 0x17, 0xa6, 0x04, 0x6a, 0xb9, 0x26, 0x01, 0x38, 0xc1, 0xa1, 0xdd, 0x08, 0x89, 0xe3, 0xde, 0xf2, - 0x9b, 0xfb, 0xd3, 0x03, 0x97, 0xac, 0x2b, 0xa5, 0xa4, 0x1b, 0x58, 0x94, 0x63, 0x85, 0x61, 0xff, - 0x70, 0x01, 0x4a, 0xf3, 0x1b, 0x1b, 0x9e, 0xef, 0xc5, 0xfb, 0xe8, 0x0e, 0x8c, 0xfa, 0x81, 0x4b, - 0xe4, 0x7f, 0xf6, 0x15, 0x23, 0xcf, 0x5d, 0x9a, 0xeb, 0x5c, 0x4a, 0x73, 0xab, 0x1a, 0xde, 0xc2, - 0xe4, 0xfd, 0x83, 0xd9, 0x51, 0xbd, 0x04, 0x1b, 0x74, 0x10, 0x86, 0x91, 0x56, 0xe0, 0x2a, 0xb2, - 0x05, 0x46, 0x76, 0x36, 0x8b, 0x6c, 0x2d, 0x41, 0x5b, 0x98, 0xb8, 0x7f, 0x30, 0x3b, 0xa2, 0x15, - 0x60, 0x9d, 0x08, 0x5a, 0x87, 0x09, 0xfa, 0xd7, 0x8f, 0x3d, 0x45, 0xb7, 0xc8, 0xe8, 0x3e, 0x9e, - 0x47, 0x57, 0x43, 0x5d, 0x38, 0x75, 0xff, 0x60, 0x76, 0x22, 0x55, 0x88, 0xd3, 0x04, 0xed, 0xf7, - 0x60, 0x7c, 0x3e, 0x8e, 0x9d, 0xc6, 0x16, 0x71, 0xf9, 0x0c, 0xa2, 0x17, 0x60, 0xc0, 0x77, 0x76, - 0x88, 0x98, 0xdf, 0x4b, 0x62, 0x60, 0x07, 0x56, 0x9d, 0x1d, 0x72, 0x78, 0x30, 0x3b, 0x79, 0xdb, - 0xf7, 0xde, 0x6d, 0x8b, 0x55, 0x41, 0xcb, 0x30, 0xc3, 0x46, 0xcf, 0x01, 0xb8, 0x64, 0xd7, 0x6b, - 0x90, 0x9a, 0x13, 0x6f, 0x89, 0xf9, 0x46, 0xa2, 0x2e, 0x54, 0x14, 0x04, 0x6b, 0x58, 0xf6, 0x3d, - 0x28, 0xcf, 0xef, 0x06, 0x9e, 0x5b, 0x0b, 0xdc, 0x08, 0x6d, 0xc3, 0x44, 0x2b, 0x24, 0x1b, 0x24, - 0x54, 0x45, 0xd3, 0xd6, 0xa5, 0xe2, 0x95, 0x91, 0xe7, 0xae, 0x64, 0x7e, 0xac, 0x89, 0xba, 0xe4, - 0xc7, 0xe1, 0xfe, 0xc2, 0x23, 0xa2, 0xbd, 0x89, 0x14, 0x14, 0xa7, 0x29, 0xdb, 0xff, 0xbc, 0x00, - 0x67, 0xe6, 0xdf, 0x6b, 0x87, 0xa4, 0xe2, 0x45, 0xdb, 0xe9, 0x15, 0xee, 0x7a, 0xd1, 0xf6, 0x6a, - 0x32, 0x02, 0x6a, 0x69, 0x55, 0x44, 0x39, 0x56, 0x18, 0xe8, 0x19, 0x18, 0xa6, 0xbf, 0x6f, 0xe3, - 0xaa, 0xf8, 0xe4, 0x53, 0x02, 0x79, 0xa4, 0xe2, 0xc4, 0x4e, 0x85, 0x83, 0xb0, 0xc4, 0x41, 0x2b, - 0x30, 0xd2, 0x60, 0x1b, 0x72, 0x73, 0x25, 0x70, 0x09, 0x9b, 0xcc, 0xf2, 0xc2, 0x53, 0x14, 0x7d, - 0x31, 0x29, 0x3e, 0x3c, 0x98, 0x9d, 0xe6, 0x7d, 0x13, 0x24, 0x34, 0x18, 0xd6, 0xeb, 0x23, 0x5b, - 0xed, 0xaf, 0x01, 0x46, 0x09, 0x32, 0xf6, 0xd6, 0x15, 0x6d, 0xab, 0x0c, 0xb2, 0xad, 0x32, 0x9a, - 0xbd, 0x4d, 0xd0, 0xb3, 0x30, 0xb0, 0xed, 0xf9, 0xee, 0xf4, 0x10, 0xa3, 0x75, 0x81, 0xce, 0xf9, - 0x0d, 0xcf, 0x77, 0x0f, 0x0f, 0x66, 0xa7, 0x8c, 0xee, 0xd0, 0x42, 0xcc, 0x50, 0xed, 0x3f, 0xb1, - 0x60, 0x96, 0xc1, 0x96, 0xbd, 0x26, 0xa9, 0x91, 0x30, 0xf2, 0xa2, 0x98, 0xf8, 0xb1, 0x31, 0xa0, - 0xcf, 0x01, 0x44, 0xa4, 0x11, 0x92, 0x58, 0x1b, 0x52, 0xb5, 0x30, 0xea, 0x0a, 0x82, 0x35, 0x2c, - 0x7a, 0x20, 0x44, 0x5b, 0x4e, 0xc8, 0xd6, 0x97, 0x18, 0x58, 0x75, 0x20, 0xd4, 0x25, 0x00, 0x27, - 0x38, 0xc6, 0x81, 0x50, 0xec, 0x75, 0x20, 0xa0, 0x4f, 0xc1, 0x44, 0xd2, 0x58, 0xd4, 0x72, 0x1a, - 0x72, 0x00, 0xd9, 0x96, 0xa9, 0x9b, 0x20, 0x9c, 0xc6, 0xb5, 0xff, 0x8e, 0x25, 0x16, 0x0f, 0xfd, - 0xea, 0x0f, 0xf8, 0xb7, 0xda, 0xbf, 0x6c, 0xc1, 0xf0, 0x82, 0xe7, 0xbb, 0x9e, 0xbf, 0x89, 0x3e, - 0x0f, 0x25, 0x7a, 0x37, 0xb9, 0x4e, 0xec, 0x88, 0x73, 0xef, 0x13, 0xda, 0xde, 0x52, 0x57, 0xc5, - 0x5c, 0x6b, 0x7b, 0x93, 0x16, 0x44, 0x73, 0x14, 0x9b, 0xee, 0xb6, 0x5b, 0xeb, 0xef, 0x90, 0x46, - 0xbc, 0x42, 0x62, 0x27, 0xf9, 0x9c, 0xa4, 0x0c, 0x2b, 0xaa, 0xe8, 0x06, 0x0c, 0xc5, 0x4e, 0xb8, - 0x49, 0x62, 0x71, 0x00, 0x66, 0x1e, 0x54, 0xbc, 0x26, 0xa6, 0x3b, 0x92, 0xf8, 0x0d, 0x92, 0x5c, - 0x0b, 0x6b, 0xac, 0x2a, 0x16, 0x24, 0xec, 0x1f, 0x1c, 0x86, 0x73, 0x8b, 0xf5, 0x6a, 0xce, 0xba, - 0xba, 0x0c, 0x43, 0x6e, 0xe8, 0xed, 0x92, 0x50, 0x8c, 0xb3, 0xa2, 0x52, 0x61, 0xa5, 0x58, 0x40, - 0xd1, 0xcb, 0x30, 0xca, 0x2f, 0xa4, 0xeb, 0x8e, 0xef, 0x36, 0xe5, 0x10, 0x9f, 0x16, 0xd8, 0xa3, - 0x77, 0x34, 0x18, 0x36, 0x30, 0x8f, 0xb8, 0xa8, 0x2e, 0xa7, 0x36, 0x63, 0xde, 0x65, 0xf7, 0x45, - 0x0b, 0x26, 0x79, 0x33, 0xf3, 0x71, 0x1c, 0x7a, 0xeb, 0xed, 0x98, 0x44, 0xd3, 0x83, 0xec, 0xa4, - 0x5b, 0xcc, 0x1a, 0xad, 0xdc, 0x11, 0x98, 0xbb, 0x93, 0xa2, 0xc2, 0x0f, 0xc1, 0x69, 0xd1, 0xee, - 0x64, 0x1a, 0x8c, 0x3b, 0x9a, 0x45, 0xdf, 0x69, 0xc1, 0x4c, 0x23, 0xf0, 0xe3, 0x30, 0x68, 0x36, - 0x49, 0x58, 0x6b, 0xaf, 0x37, 0xbd, 0x68, 0x8b, 0xaf, 0x53, 0x4c, 0x36, 0xd8, 0x49, 0x90, 0x33, - 0x87, 0x0a, 0x49, 0xcc, 0xe1, 0xc5, 0xfb, 0x07, 0xb3, 0x33, 0x8b, 0xb9, 0xa4, 0x70, 0x97, 0x66, - 0xd0, 0x36, 0x20, 0x7a, 0x95, 0xd6, 0x63, 0x67, 0x93, 0x24, 0x8d, 0x0f, 0xf7, 0xdf, 0xf8, 0xd9, - 0xfb, 0x07, 0xb3, 0x68, 0xb5, 0x83, 0x04, 0xce, 0x20, 0x8b, 0xde, 0x85, 0xd3, 0xb4, 0xb4, 0xe3, - 0x5b, 0x4b, 0xfd, 0x37, 0x37, 0x7d, 0xff, 0x60, 0xf6, 0xf4, 0x6a, 0x06, 0x11, 0x9c, 0x49, 0x1a, - 0x7d, 0x87, 0x05, 0xe7, 0x92, 0xcf, 0x5f, 0xba, 0xd7, 0x72, 0x7c, 0x37, 0x69, 0xb8, 0xdc, 0x7f, - 0xc3, 0xf4, 0x4c, 0x3e, 0xb7, 0x98, 0x47, 0x09, 0xe7, 0x37, 0x32, 0xb3, 0x08, 0x67, 0x32, 0x57, - 0x0b, 0x9a, 0x84, 0xe2, 0x36, 0xe1, 0x5c, 0x50, 0x19, 0xd3, 0x9f, 0xe8, 0x34, 0x0c, 0xee, 0x3a, - 0xcd, 0xb6, 0xd8, 0x28, 0x98, 0xff, 0x79, 0xa5, 0xf0, 0xb2, 0x65, 0xff, 0x8b, 0x22, 0x4c, 0x2c, - 0xd6, 0xab, 0x0f, 0xb4, 0x0b, 0xf5, 0x6b, 0xa8, 0xd0, 0xf5, 0x1a, 0x4a, 0x2e, 0xb5, 0x62, 0xee, - 0xa5, 0xf6, 0xff, 0x64, 0x6c, 0xa1, 0x01, 0xb6, 0x85, 0xbe, 0x29, 0x67, 0x0b, 0x1d, 0xf3, 0xc6, - 0xd9, 0xcd, 0x59, 0x45, 0x83, 0x6c, 0x32, 0x33, 0x39, 0x96, 0x9b, 0x41, 0xc3, 0x69, 0xa6, 0x8f, - 0xbe, 0x23, 0x2e, 0xa5, 0xe3, 0x99, 0xc7, 0x06, 0x8c, 0x2e, 0x3a, 0x2d, 0x67, 0xdd, 0x6b, 0x7a, - 0xb1, 0x47, 0x22, 0xf4, 0x04, 0x14, 0x1d, 0xd7, 0x65, 0xdc, 0x56, 0x79, 0xe1, 0xcc, 0xfd, 0x83, - 0xd9, 0xe2, 0xbc, 0x4b, 0xaf, 0x7d, 0x50, 0x58, 0xfb, 0x98, 0x62, 0xa0, 0x8f, 0xc3, 0x80, 0x1b, - 0x06, 0xad, 0xe9, 0x02, 0xc3, 0xa4, 0xbb, 0x6e, 0xa0, 0x12, 0x06, 0xad, 0x14, 0x2a, 0xc3, 0xb1, - 0x7f, 0xb5, 0x00, 0xe7, 0x17, 0x49, 0x6b, 0x6b, 0xb9, 0x9e, 0x73, 0x7e, 0x5f, 0x81, 0xd2, 0x4e, - 0xe0, 0x7b, 0x71, 0x10, 0x46, 0xa2, 0x69, 0xb6, 0x22, 0x56, 0x44, 0x19, 0x56, 0x50, 0x74, 0x09, - 0x06, 0x5a, 0x09, 0x53, 0x39, 0x2a, 0x19, 0x52, 0xc6, 0x4e, 0x32, 0x08, 0xc5, 0x68, 0x47, 0x24, - 0x14, 0x2b, 0x46, 0x61, 0xdc, 0x8e, 0x48, 0x88, 0x19, 0x24, 0xb9, 0x99, 0xe9, 0x9d, 0x2d, 0x4e, - 0xe8, 0xd4, 0xcd, 0x4c, 0x21, 0x58, 0xc3, 0x42, 0x35, 0x28, 0x47, 0xa9, 0x99, 0xed, 0x6b, 0x9b, - 0x8e, 0xb1, 0xab, 0x5b, 0xcd, 0x64, 0x42, 0xc4, 0xb8, 0x51, 0x86, 0x7a, 0x5e, 0xdd, 0x5f, 0x29, - 0x00, 0xe2, 0x43, 0xf8, 0x17, 0x6c, 0xe0, 0x6e, 0x77, 0x0e, 0x5c, 0xff, 0x5b, 0xe2, 0xb8, 0x46, - 0xef, 0x4f, 0x2d, 0x38, 0xbf, 0xe8, 0xf9, 0x2e, 0x09, 0x73, 0x16, 0xe0, 0xc3, 0x79, 0xcb, 0x1e, - 0x8d, 0x69, 0x30, 0x96, 0xd8, 0xc0, 0x31, 0x2c, 0x31, 0xfb, 0x8f, 0x2c, 0x40, 0xfc, 0xb3, 0x3f, - 0x70, 0x1f, 0x7b, 0xbb, 0xf3, 0x63, 0x8f, 0x61, 0x59, 0xd8, 0x37, 0x61, 0x7c, 0xb1, 0xe9, 0x11, - 0x3f, 0xae, 0xd6, 0x16, 0x03, 0x7f, 0xc3, 0xdb, 0x44, 0xaf, 0xc0, 0x78, 0xec, 0xed, 0x90, 0xa0, - 0x1d, 0xd7, 0x49, 0x23, 0xf0, 0xd9, 0x4b, 0xd2, 0xba, 0x32, 0xb8, 0x80, 0xee, 0x1f, 0xcc, 0x8e, - 0xaf, 0x19, 0x10, 0x9c, 0xc2, 0xb4, 0x7f, 0x87, 0x8e, 0x5f, 0xb0, 0xd3, 0x0a, 0x7c, 0xe2, 0xc7, - 0x8b, 0x81, 0xef, 0x72, 0x89, 0xc3, 0x2b, 0x30, 0x10, 0xd3, 0xf1, 0xe0, 0x63, 0x77, 0x59, 0x6e, - 0x14, 0x3a, 0x0a, 0x87, 0x07, 0xb3, 0x67, 0x3b, 0x6b, 0xb0, 0x71, 0x62, 0x75, 0xd0, 0x37, 0xc1, - 0x50, 0x14, 0x3b, 0x71, 0x3b, 0x12, 0xa3, 0xf9, 0x98, 0x1c, 0xcd, 0x3a, 0x2b, 0x3d, 0x3c, 0x98, - 0x9d, 0x50, 0xd5, 0x78, 0x11, 0x16, 0x15, 0xd0, 0x93, 0x30, 0xbc, 0x43, 0xa2, 0xc8, 0xd9, 0x94, - 0xb7, 0xe1, 0x84, 0xa8, 0x3b, 0xbc, 0xc2, 0x8b, 0xb1, 0x84, 0xa3, 0xc7, 0x61, 0x90, 0x84, 0x61, - 0x10, 0x8a, 0x3d, 0x3a, 0x26, 0x10, 0x07, 0x97, 0x68, 0x21, 0xe6, 0x30, 0xfb, 0xdf, 0x58, 0x30, - 0xa1, 0xfa, 0xca, 0xdb, 0x3a, 0x81, 0x57, 0xc1, 0x5b, 0x00, 0x0d, 0xf9, 0x81, 0x11, 0xbb, 0x3d, - 0x46, 0x9e, 0xbb, 0x9c, 0x79, 0x51, 0x77, 0x0c, 0x63, 0x42, 0x59, 0x15, 0x45, 0x58, 0xa3, 0x66, - 0xff, 0x63, 0x0b, 0x4e, 0xa5, 0xbe, 0xe8, 0xa6, 0x17, 0xc5, 0xe8, 0xed, 0x8e, 0xaf, 0x9a, 0xeb, - 0xef, 0xab, 0x68, 0x6d, 0xf6, 0x4d, 0x6a, 0x29, 0xcb, 0x12, 0xed, 0x8b, 0xae, 0xc3, 0xa0, 0x17, - 0x93, 0x1d, 0xf9, 0x31, 0x8f, 0x77, 0xfd, 0x18, 0xde, 0xab, 0x64, 0x46, 0xaa, 0xb4, 0x26, 0xe6, - 0x04, 0xec, 0xbf, 0x5c, 0x84, 0x32, 0x5f, 0xb6, 0x2b, 0x4e, 0xeb, 0x04, 0xe6, 0xa2, 0x0a, 0x03, - 0x8c, 0x3a, 0xef, 0xf8, 0x13, 0xd9, 0x1d, 0x17, 0xdd, 0x99, 0xa3, 0x4f, 0x7e, 0xce, 0x1c, 0xa9, - 0xab, 0x81, 0x16, 0x61, 0x46, 0x02, 0x39, 0x00, 0xeb, 0x9e, 0xef, 0x84, 0xfb, 0xb4, 0x6c, 0xba, - 0xc8, 0x08, 0x3e, 0xd3, 0x9d, 0xe0, 0x82, 0xc2, 0xe7, 0x64, 0x55, 0x5f, 0x13, 0x00, 0xd6, 0x88, - 0xce, 0xbc, 0x04, 0x65, 0x85, 0x7c, 0x14, 0x1e, 0x67, 0xe6, 0x53, 0x30, 0x91, 0x6a, 0xab, 0x57, - 0xf5, 0x51, 0x9d, 0x45, 0xfa, 0x32, 0x3b, 0x05, 0x44, 0xaf, 0x97, 0xfc, 0x5d, 0x71, 0x8a, 0xbe, - 0x07, 0xa7, 0x9b, 0x19, 0x87, 0x93, 0x98, 0xaa, 0xfe, 0x0f, 0xb3, 0xf3, 0xe2, 0xb3, 0x4f, 0x67, - 0x41, 0x71, 0x66, 0x1b, 0xf4, 0xda, 0x0f, 0x5a, 0x74, 0xcd, 0x3b, 0x4d, 0x9d, 0x83, 0xbe, 0x25, - 0xca, 0xb0, 0x82, 0xd2, 0x23, 0xec, 0xb4, 0xea, 0xfc, 0x0d, 0xb2, 0x5f, 0x27, 0x4d, 0xd2, 0x88, - 0x83, 0xf0, 0xeb, 0xda, 0xfd, 0x0b, 0x7c, 0xf4, 0xf9, 0x09, 0x38, 0x22, 0x08, 0x14, 0x6f, 0x90, - 0x7d, 0x3e, 0x15, 0xfa, 0xd7, 0x15, 0xbb, 0x7e, 0xdd, 0xcf, 0x59, 0x30, 0xa6, 0xbe, 0xee, 0x04, - 0xb6, 0xfa, 0x82, 0xb9, 0xd5, 0x2f, 0x74, 0x5d, 0xe0, 0x39, 0x9b, 0xfc, 0x2b, 0x05, 0x38, 0xa7, - 0x70, 0x28, 0xbb, 0xcf, 0xff, 0x88, 0x55, 0x75, 0x15, 0xca, 0xbe, 0x12, 0x44, 0x59, 0xa6, 0x04, - 0x28, 0x11, 0x43, 0x25, 0x38, 0x94, 0x6b, 0xf3, 0x13, 0x69, 0xd1, 0xa8, 0x2e, 0xa1, 0x15, 0xd2, - 0xd8, 0x05, 0x28, 0xb6, 0x3d, 0x57, 0xdc, 0x19, 0x9f, 0x90, 0xa3, 0x7d, 0xbb, 0x5a, 0x39, 0x3c, - 0x98, 0x7d, 0x2c, 0x4f, 0x3b, 0x40, 0x2f, 0xab, 0x68, 0xee, 0x76, 0xb5, 0x82, 0x69, 0x65, 0x34, - 0x0f, 0x13, 0x52, 0x01, 0x72, 0x87, 0x72, 0x50, 0x81, 0x2f, 0xae, 0x16, 0x25, 0x66, 0xc5, 0x26, - 0x18, 0xa7, 0xf1, 0x51, 0x05, 0x26, 0xb7, 0xdb, 0xeb, 0xa4, 0x49, 0x62, 0xfe, 0xc1, 0x37, 0x08, - 0x17, 0x42, 0x96, 0x93, 0xc7, 0xd6, 0x8d, 0x14, 0x1c, 0x77, 0xd4, 0xb0, 0xff, 0x9c, 0x1d, 0xf1, - 0x62, 0xf4, 0x6a, 0x61, 0x40, 0x17, 0x16, 0xa5, 0xfe, 0xf5, 0x5c, 0xce, 0xfd, 0xac, 0x8a, 0x1b, - 0x64, 0x7f, 0x2d, 0xa0, 0xcc, 0x76, 0xf6, 0xaa, 0x30, 0xd6, 0xfc, 0x40, 0xd7, 0x35, 0xff, 0x0b, - 0x05, 0x38, 0xa3, 0x46, 0xc0, 0xe0, 0xeb, 0xfe, 0xa2, 0x8f, 0xc1, 0xb3, 0x30, 0xe2, 0x92, 0x0d, - 0xa7, 0xdd, 0x8c, 0x95, 0x44, 0x7c, 0x90, 0x6b, 0x45, 0x2a, 0x49, 0x31, 0xd6, 0x71, 0x8e, 0x30, - 0x6c, 0xff, 0x63, 0x84, 0xdd, 0xad, 0xb1, 0x43, 0xd7, 0xb8, 0xda, 0x35, 0x56, 0xee, 0xae, 0x79, - 0x1c, 0x06, 0xbd, 0x1d, 0xca, 0x6b, 0x15, 0x4c, 0x16, 0xaa, 0x4a, 0x0b, 0x31, 0x87, 0xa1, 0x8f, - 0xc1, 0x70, 0x23, 0xd8, 0xd9, 0x71, 0x7c, 0x97, 0x5d, 0x79, 0xe5, 0x85, 0x11, 0xca, 0x8e, 0x2d, - 0xf2, 0x22, 0x2c, 0x61, 0xe8, 0x3c, 0x0c, 0x38, 0xe1, 0x26, 0x17, 0x4b, 0x94, 0x17, 0x4a, 0xb4, - 0xa5, 0xf9, 0x70, 0x33, 0xc2, 0xac, 0x94, 0xbe, 0xaa, 0xf6, 0x82, 0x70, 0xdb, 0xf3, 0x37, 0x2b, - 0x5e, 0x28, 0xb6, 0x84, 0xba, 0x0b, 0xef, 0x2a, 0x08, 0xd6, 0xb0, 0xd0, 0x32, 0x0c, 0xb6, 0x82, - 0x30, 0x8e, 0xa6, 0x87, 0xd8, 0x70, 0x3f, 0x96, 0x73, 0x10, 0xf1, 0xaf, 0xad, 0x05, 0x61, 0x9c, - 0x7c, 0x00, 0xfd, 0x17, 0x61, 0x5e, 0x1d, 0xdd, 0x84, 0x61, 0xe2, 0xef, 0x2e, 0x87, 0xc1, 0xce, - 0xf4, 0xa9, 0x7c, 0x4a, 0x4b, 0x1c, 0x85, 0x2f, 0xb3, 0x84, 0xed, 0x14, 0xc5, 0x58, 0x92, 0x40, - 0xdf, 0x04, 0x45, 0xe2, 0xef, 0x4e, 0x0f, 0x33, 0x4a, 0x33, 0x39, 0x94, 0xee, 0x38, 0x61, 0x72, - 0xe6, 0x2f, 0xf9, 0xbb, 0x98, 0xd6, 0x41, 0x9f, 0x81, 0xb2, 0x3c, 0x30, 0x22, 0x21, 0x7f, 0xcb, - 0x5c, 0xb0, 0xf2, 0x98, 0xc1, 0xe4, 0xdd, 0xb6, 0x17, 0x92, 0x1d, 0xe2, 0xc7, 0x51, 0x72, 0x42, - 0x4a, 0x68, 0x84, 0x13, 0x6a, 0xe8, 0x33, 0x52, 0xe8, 0xbb, 0x12, 0xb4, 0xfd, 0x38, 0x9a, 0x2e, - 0xb3, 0xee, 0x65, 0xaa, 0xe3, 0xee, 0x24, 0x78, 0x69, 0xa9, 0x30, 0xaf, 0x8c, 0x0d, 0x52, 0xe8, - 0xb3, 0x30, 0xc6, 0xff, 0x73, 0xa5, 0x56, 0x34, 0x7d, 0x86, 0xd1, 0xbe, 0x94, 0x4f, 0x9b, 0x23, - 0x2e, 0x9c, 0x11, 0xc4, 0xc7, 0xf4, 0xd2, 0x08, 0x9b, 0xd4, 0x10, 0x86, 0xb1, 0xa6, 0xb7, 0x4b, - 0x7c, 0x12, 0x45, 0xb5, 0x30, 0x58, 0x27, 0xd3, 0xc0, 0x06, 0xe6, 0x5c, 0xb6, 0x12, 0x2c, 0x58, - 0x27, 0x0b, 0x53, 0x94, 0xe6, 0x4d, 0xbd, 0x0e, 0x36, 0x49, 0xa0, 0xdb, 0x30, 0x4e, 0x1f, 0x61, - 0x5e, 0x42, 0x74, 0xa4, 0x17, 0x51, 0xf6, 0x54, 0xc2, 0x46, 0x25, 0x9c, 0x22, 0x82, 0x6e, 0xc1, - 0x68, 0x14, 0x3b, 0x61, 0xdc, 0x6e, 0x71, 0xa2, 0x67, 0x7b, 0x11, 0x65, 0x3a, 0xd4, 0xba, 0x56, - 0x05, 0x1b, 0x04, 0xd0, 0x1b, 0x50, 0x6e, 0x7a, 0x1b, 0xa4, 0xb1, 0xdf, 0x68, 0x92, 0xe9, 0x51, - 0x46, 0x2d, 0xf3, 0x50, 0xb9, 0x29, 0x91, 0xf8, 0xab, 0x50, 0xfd, 0xc5, 0x49, 0x75, 0x74, 0x07, - 0xce, 0xc6, 0x24, 0xdc, 0xf1, 0x7c, 0x87, 0x1e, 0x06, 0xe2, 0xb5, 0xc4, 0x74, 0x93, 0x63, 0x6c, - 0xb7, 0x5d, 0x14, 0xb3, 0x71, 0x76, 0x2d, 0x13, 0x0b, 0xe7, 0xd4, 0x46, 0xf7, 0x60, 0x3a, 0x03, - 0x12, 0x34, 0xbd, 0xc6, 0xfe, 0xf4, 0x69, 0x46, 0xf9, 0x35, 0x41, 0x79, 0x7a, 0x2d, 0x07, 0xef, - 0xb0, 0x0b, 0x0c, 0xe7, 0x52, 0x47, 0xb7, 0x60, 0x82, 0x9d, 0x40, 0xb5, 0x76, 0xb3, 0x29, 0x1a, - 0x1c, 0x67, 0x0d, 0x7e, 0x4c, 0xde, 0xc7, 0x55, 0x13, 0x7c, 0x78, 0x30, 0x0b, 0xc9, 0x3f, 0x9c, - 0xae, 0x8d, 0xd6, 0x99, 0x1a, 0xac, 0x1d, 0x7a, 0xf1, 0x3e, 0x3d, 0x37, 0xc8, 0xbd, 0x78, 0x7a, - 0xa2, 0xab, 0x08, 0x42, 0x47, 0x55, 0xba, 0x32, 0xbd, 0x10, 0xa7, 0x09, 0xd2, 0x23, 0x35, 0x8a, - 0x5d, 0xcf, 0x9f, 0x9e, 0x64, 0x27, 0xb5, 0x3a, 0x91, 0xea, 0xb4, 0x10, 0x73, 0x18, 0x53, 0x81, - 0xd1, 0x1f, 0xb7, 0xe8, 0xcd, 0x35, 0xc5, 0x10, 0x13, 0x15, 0x98, 0x04, 0xe0, 0x04, 0x87, 0x32, - 0x93, 0x71, 0xbc, 0x3f, 0x8d, 0x18, 0xaa, 0x3a, 0x58, 0xd6, 0xd6, 0x3e, 0x83, 0x69, 0xb9, 0xbd, - 0x0e, 0xe3, 0xea, 0x20, 0x64, 0x63, 0x82, 0x66, 0x61, 0x90, 0xb1, 0x4f, 0x42, 0x60, 0x56, 0xa6, - 0x5d, 0x60, 0xac, 0x15, 0xe6, 0xe5, 0xac, 0x0b, 0xde, 0x7b, 0x64, 0x61, 0x3f, 0x26, 0xfc, 0x99, - 0x5e, 0xd4, 0xba, 0x20, 0x01, 0x38, 0xc1, 0xb1, 0xff, 0x37, 0x67, 0x43, 0x93, 0xd3, 0xb6, 0x8f, - 0xfb, 0xe5, 0x69, 0x28, 0x6d, 0x05, 0x51, 0x4c, 0xb1, 0x59, 0x1b, 0x83, 0x09, 0xe3, 0x79, 0x5d, - 0x94, 0x63, 0x85, 0x81, 0x5e, 0x85, 0xb1, 0x86, 0xde, 0x80, 0xb8, 0x1c, 0xd5, 0x31, 0x62, 0xb4, - 0x8e, 0x4d, 0x5c, 0xf4, 0x32, 0x94, 0x98, 0x59, 0x47, 0x23, 0x68, 0x0a, 0xae, 0x4d, 0xde, 0xf0, - 0xa5, 0x9a, 0x28, 0x3f, 0xd4, 0x7e, 0x63, 0x85, 0x8d, 0x2e, 0xc3, 0x10, 0xed, 0x42, 0xb5, 0x26, - 0xae, 0x25, 0x25, 0xfb, 0xb9, 0xce, 0x4a, 0xb1, 0x80, 0xda, 0x7f, 0xa9, 0xa0, 0x8d, 0x32, 0x7d, - 0xe2, 0x12, 0x54, 0x83, 0xe1, 0x3d, 0xc7, 0x8b, 0x3d, 0x7f, 0x53, 0xf0, 0x1f, 0x4f, 0x76, 0xbd, - 0xa3, 0x58, 0xa5, 0xbb, 0xbc, 0x02, 0xbf, 0x45, 0xc5, 0x1f, 0x2c, 0xc9, 0x50, 0x8a, 0x61, 0xdb, - 0xf7, 0x29, 0xc5, 0x42, 0xbf, 0x14, 0x31, 0xaf, 0xc0, 0x29, 0x8a, 0x3f, 0x58, 0x92, 0x41, 0x6f, - 0x03, 0xc8, 0x1d, 0x46, 0x5c, 0x61, 0x4e, 0xf1, 0x74, 0x6f, 0xa2, 0x6b, 0xaa, 0xce, 0xc2, 0x38, - 0xbd, 0xa3, 0x93, 0xff, 0x58, 0xa3, 0x67, 0xc7, 0x8c, 0x4f, 0xeb, 0xec, 0x0c, 0xfa, 0x56, 0xba, - 0xc4, 0x9d, 0x30, 0x26, 0xee, 0x7c, 0x2c, 0x06, 0xe7, 0xe3, 0xfd, 0x3d, 0x52, 0xd6, 0xbc, 0x1d, - 0xa2, 0x6f, 0x07, 0x41, 0x04, 0x27, 0xf4, 0xec, 0x5f, 0x2a, 0xc2, 0x74, 0x5e, 0x77, 0xe9, 0xa2, - 0x23, 0xf7, 0xbc, 0x78, 0x91, 0xb2, 0x57, 0x96, 0xb9, 0xe8, 0x96, 0x44, 0x39, 0x56, 0x18, 0x74, - 0xf6, 0x23, 0x6f, 0x53, 0xbe, 0x31, 0x07, 0x93, 0xd9, 0xaf, 0xb3, 0x52, 0x2c, 0xa0, 0x14, 0x2f, - 0x24, 0x4e, 0x24, 0xec, 0x75, 0xb4, 0x55, 0x82, 0x59, 0x29, 0x16, 0x50, 0x5d, 0x80, 0x35, 0xd0, - 0x43, 0x80, 0x65, 0x0c, 0xd1, 0xe0, 0xf1, 0x0e, 0x11, 0xfa, 0x1c, 0xc0, 0x86, 0xe7, 0x7b, 0xd1, - 0x16, 0xa3, 0x3e, 0x74, 0x64, 0xea, 0x8a, 0x39, 0x5b, 0x56, 0x54, 0xb0, 0x46, 0x11, 0xbd, 0x08, - 0x23, 0x6a, 0x03, 0x56, 0x2b, 0x4c, 0x79, 0xa9, 0x19, 0x83, 0x24, 0xa7, 0x51, 0x05, 0xeb, 0x78, - 0xf6, 0x3b, 0xe9, 0xf5, 0x22, 0x76, 0x80, 0x36, 0xbe, 0x56, 0xbf, 0xe3, 0x5b, 0xe8, 0x3e, 0xbe, - 0xf6, 0xd7, 0x8a, 0x30, 0x61, 0x34, 0xd6, 0x8e, 0xfa, 0x38, 0xb3, 0xae, 0xd1, 0x03, 0xdc, 0x89, - 0x89, 0xd8, 0x7f, 0x76, 0xef, 0xad, 0xa2, 0x1f, 0xf2, 0x74, 0x07, 0xf0, 0xfa, 0xe8, 0x73, 0x50, - 0x6e, 0x3a, 0x11, 0x13, 0x86, 0x11, 0xb1, 0xef, 0xfa, 0x21, 0x96, 0x3c, 0x4c, 0x9c, 0x28, 0xd6, - 0x6e, 0x4d, 0x4e, 0x3b, 0x21, 0x49, 0x6f, 0x1a, 0xca, 0x9f, 0x48, 0x83, 0x30, 0xd5, 0x09, 0xca, - 0xc4, 0xec, 0x63, 0x0e, 0x43, 0x2f, 0xc3, 0x68, 0x48, 0xd8, 0xaa, 0x58, 0xa4, 0xdc, 0x1c, 0x5b, - 0x66, 0x83, 0x09, 0xdb, 0x87, 0x35, 0x18, 0x36, 0x30, 0x93, 0xb7, 0xc1, 0x50, 0x97, 0xb7, 0xc1, - 0x93, 0x30, 0xcc, 0x7e, 0xa8, 0x15, 0xa0, 0x66, 0xa3, 0xca, 0x8b, 0xb1, 0x84, 0xa7, 0x17, 0x4c, - 0xa9, 0xbf, 0x05, 0x43, 0x5f, 0x1f, 0x62, 0x51, 0x33, 0xc5, 0x71, 0x89, 0x9f, 0x72, 0x62, 0xc9, - 0x63, 0x09, 0xb3, 0x3f, 0x0e, 0xe3, 0x15, 0x87, 0xec, 0x04, 0xfe, 0x92, 0xef, 0xb6, 0x02, 0xcf, - 0x8f, 0xd1, 0x34, 0x0c, 0xb0, 0x4b, 0x84, 0x1f, 0x01, 0x03, 0xb4, 0x21, 0x3c, 0x40, 0x1f, 0x04, - 0xf6, 0x26, 0x9c, 0xa9, 0x04, 0x7b, 0xfe, 0x9e, 0x13, 0xba, 0xf3, 0xb5, 0xaa, 0xf6, 0xbe, 0x5e, - 0x95, 0xef, 0x3b, 0x6e, 0x87, 0x95, 0x79, 0xf4, 0x6a, 0x35, 0x39, 0x5b, 0xbb, 0xec, 0x35, 0x49, - 0x8e, 0x14, 0xe4, 0xaf, 0x16, 0x8c, 0x96, 0x12, 0x7c, 0xa5, 0xa8, 0xb2, 0x72, 0x15, 0x55, 0x6f, - 0x42, 0x69, 0xc3, 0x23, 0x4d, 0x17, 0x93, 0x0d, 0xb1, 0x12, 0x9f, 0xc8, 0x37, 0x2d, 0x59, 0xa6, - 0x98, 0x52, 0xea, 0xc5, 0x5f, 0x87, 0xcb, 0xa2, 0x32, 0x56, 0x64, 0xd0, 0x36, 0x4c, 0xca, 0x07, - 0x83, 0x84, 0x8a, 0x75, 0xf9, 0x64, 0xb7, 0x57, 0x88, 0x49, 0xfc, 0xf4, 0xfd, 0x83, 0xd9, 0x49, - 0x9c, 0x22, 0x83, 0x3b, 0x08, 0xd3, 0xe7, 0xe0, 0x0e, 0x3d, 0x81, 0x07, 0xd8, 0xf0, 0xb3, 0xe7, - 0x20, 0x7b, 0xd9, 0xb2, 0x52, 0xfb, 0x47, 0x2d, 0x78, 0xa4, 0x63, 0x64, 0xc4, 0x0b, 0xff, 0x98, - 0x67, 0x21, 0xfd, 0xe2, 0x2e, 0xf4, 0x7e, 0x71, 0xdb, 0x3f, 0x6b, 0xc1, 0xe9, 0xa5, 0x9d, 0x56, - 0xbc, 0x5f, 0xf1, 0x4c, 0xad, 0xd2, 0x4b, 0x30, 0xb4, 0x43, 0x5c, 0xaf, 0xbd, 0x23, 0x66, 0x6e, - 0x56, 0x9e, 0x52, 0x2b, 0xac, 0xf4, 0xf0, 0x60, 0x76, 0xac, 0x1e, 0x07, 0xa1, 0xb3, 0x49, 0x78, - 0x01, 0x16, 0xe8, 0xec, 0xac, 0xf7, 0xde, 0x23, 0x37, 0xbd, 0x1d, 0x4f, 0x9a, 0x0a, 0x75, 0x95, - 0xd9, 0xcd, 0xc9, 0x01, 0x9d, 0x7b, 0xb3, 0xed, 0xf8, 0xb1, 0x17, 0xef, 0x0b, 0x85, 0x90, 0x24, - 0x82, 0x13, 0x7a, 0xf6, 0x57, 0x2d, 0x98, 0x90, 0xeb, 0x7e, 0xde, 0x75, 0x43, 0x12, 0x45, 0x68, - 0x06, 0x0a, 0x5e, 0x4b, 0xf4, 0x12, 0x44, 0x2f, 0x0b, 0xd5, 0x1a, 0x2e, 0x78, 0x2d, 0xc9, 0x96, - 0xb1, 0x83, 0xb0, 0x68, 0xea, 0xc6, 0xae, 0x8b, 0x72, 0xac, 0x30, 0xd0, 0x15, 0x28, 0xf9, 0x81, - 0xcb, 0xcd, 0xb5, 0xf8, 0x95, 0xc6, 0x16, 0xd8, 0xaa, 0x28, 0xc3, 0x0a, 0x8a, 0x6a, 0x50, 0xe6, - 0x96, 0x4c, 0xc9, 0xa2, 0xed, 0xcb, 0x1e, 0x8a, 0x7d, 0xd9, 0x9a, 0xac, 0x89, 0x13, 0x22, 0xf6, - 0x0f, 0x58, 0x30, 0x2a, 0xbf, 0xac, 0x4f, 0x9e, 0x93, 0x6e, 0xad, 0x84, 0xdf, 0x4c, 0xb6, 0x16, - 0xe5, 0x19, 0x19, 0xc4, 0x60, 0x15, 0x8b, 0x47, 0x61, 0x15, 0xed, 0x1f, 0x29, 0xc0, 0xb8, 0xec, - 0x4e, 0xbd, 0xbd, 0x1e, 0x91, 0x18, 0xad, 0x41, 0xd9, 0xe1, 0x43, 0x4e, 0xe4, 0x8a, 0x7d, 0x3c, - 0x5b, 0x28, 0x60, 0xcc, 0x4f, 0x72, 0x7b, 0xcf, 0xcb, 0xda, 0x38, 0x21, 0x84, 0x9a, 0x30, 0xe5, - 0x07, 0x31, 0x3b, 0xc9, 0x15, 0xbc, 0x9b, 0xea, 0x25, 0x4d, 0xfd, 0x9c, 0xa0, 0x3e, 0xb5, 0x9a, - 0xa6, 0x82, 0x3b, 0x09, 0xa3, 0x25, 0x29, 0x68, 0x29, 0xe6, 0xbf, 0xec, 0xf5, 0x59, 0xc8, 0x96, - 0xb3, 0xd8, 0xbf, 0x62, 0x41, 0x59, 0xa2, 0x9d, 0x84, 0x96, 0x6d, 0x05, 0x86, 0x23, 0x36, 0x09, - 0x72, 0x68, 0xec, 0x6e, 0x1d, 0xe7, 0xf3, 0x95, 0x5c, 0x50, 0xfc, 0x7f, 0x84, 0x25, 0x0d, 0x26, - 0x67, 0x57, 0xdd, 0xff, 0x80, 0xc8, 0xd9, 0x55, 0x7f, 0x72, 0x6e, 0x98, 0x3f, 0x60, 0x7d, 0xd6, - 0x04, 0x57, 0x94, 0x8f, 0x6a, 0x85, 0x64, 0xc3, 0xbb, 0x97, 0xe6, 0xa3, 0x6a, 0xac, 0x14, 0x0b, - 0x28, 0x7a, 0x1b, 0x46, 0x1b, 0x52, 0xc0, 0x9a, 0x6c, 0xd7, 0xcb, 0x5d, 0x85, 0xfd, 0x4a, 0x2f, - 0xc4, 0x05, 0x1b, 0x8b, 0x5a, 0x7d, 0x6c, 0x50, 0x33, 0xd5, 0xfc, 0xc5, 0x5e, 0x6a, 0xfe, 0x84, - 0x6e, 0xbe, 0xd2, 0xfb, 0xc7, 0x2c, 0x18, 0xe2, 0x82, 0xb5, 0xfe, 0xe4, 0x9a, 0x9a, 0x9a, 0x2c, - 0x19, 0xbb, 0x3b, 0xb4, 0x50, 0xa8, 0xbd, 0xd0, 0x0a, 0x94, 0xd9, 0x0f, 0x26, 0x18, 0x2c, 0xe6, - 0x5b, 0xc5, 0xf3, 0x56, 0xf5, 0x0e, 0xde, 0x91, 0xd5, 0x70, 0x42, 0xc1, 0xfe, 0xa1, 0x22, 0x3d, - 0xaa, 0x12, 0x54, 0xe3, 0x06, 0xb7, 0x1e, 0xde, 0x0d, 0x5e, 0x78, 0x58, 0x37, 0xf8, 0x26, 0x4c, - 0x34, 0x34, 0xa5, 0x5a, 0x32, 0x93, 0x57, 0xba, 0x2e, 0x12, 0x4d, 0xff, 0xc6, 0x45, 0x26, 0x8b, - 0x26, 0x11, 0x9c, 0xa6, 0x8a, 0xbe, 0x15, 0x46, 0xf9, 0x3c, 0x8b, 0x56, 0xb8, 0xa5, 0xc4, 0xc7, - 0xf2, 0xd7, 0x8b, 0xde, 0x04, 0x17, 0xb1, 0x69, 0xd5, 0xb1, 0x41, 0xcc, 0xfe, 0x63, 0x0b, 0xd0, - 0x52, 0x6b, 0x8b, 0xec, 0x90, 0xd0, 0x69, 0x26, 0xb2, 0xf1, 0xff, 0xcf, 0x82, 0x69, 0xd2, 0x51, - 0xbc, 0x18, 0xec, 0xec, 0x88, 0x17, 0x48, 0xce, 0x23, 0x79, 0x29, 0xa7, 0x8e, 0x72, 0x1b, 0x98, - 0xce, 0xc3, 0xc0, 0xb9, 0xed, 0xa1, 0x15, 0x38, 0xc5, 0xaf, 0x3c, 0x05, 0xd0, 0x6c, 0xa3, 0x1f, - 0x15, 0x84, 0x4f, 0xad, 0x75, 0xa2, 0xe0, 0xac, 0x7a, 0xf6, 0x77, 0x8d, 0x42, 0x6e, 0x2f, 0x3e, - 0x54, 0x0a, 0x7c, 0xa8, 0x14, 0xf8, 0x50, 0x29, 0xf0, 0xa1, 0x52, 0xe0, 0x43, 0xa5, 0xc0, 0x37, - 0xbc, 0x52, 0xe0, 0x0f, 0x2d, 0x38, 0xd5, 0x79, 0x0d, 0x9c, 0x04, 0x63, 0xde, 0x86, 0x53, 0x9d, - 0x77, 0x5d, 0x57, 0x3b, 0xb8, 0xce, 0x7e, 0x26, 0xf7, 0x5e, 0xc6, 0x37, 0xe0, 0x2c, 0xfa, 0xf6, - 0x2f, 0x95, 0x60, 0x70, 0x69, 0x97, 0xf8, 0xf1, 0x09, 0x7c, 0x62, 0x03, 0xc6, 0x3d, 0x7f, 0x37, - 0x68, 0xee, 0x12, 0x97, 0xc3, 0x8f, 0xf2, 0xde, 0x3d, 0x2b, 0x48, 0x8f, 0x57, 0x0d, 0x12, 0x38, - 0x45, 0xf2, 0x61, 0xc8, 0x9c, 0xaf, 0xc1, 0x10, 0xbf, 0x1d, 0x84, 0xc0, 0x39, 0xf3, 0x32, 0x60, - 0x83, 0x28, 0xee, 0xbc, 0x44, 0x1e, 0xce, 0x6f, 0x1f, 0x51, 0x1d, 0xbd, 0x03, 0xe3, 0x1b, 0x5e, - 0x18, 0xc5, 0x6b, 0xde, 0x0e, 0x89, 0x62, 0x67, 0xa7, 0xf5, 0x00, 0x32, 0x66, 0x35, 0x0e, 0xcb, - 0x06, 0x25, 0x9c, 0xa2, 0x8c, 0x36, 0x61, 0xac, 0xe9, 0xe8, 0x4d, 0x0d, 0x1f, 0xb9, 0x29, 0x75, - 0xed, 0xdc, 0xd4, 0x09, 0x61, 0x93, 0x2e, 0xdd, 0xa7, 0x0d, 0x26, 0x26, 0x2d, 0x31, 0xe1, 0x81, - 0xda, 0xa7, 0x5c, 0x3e, 0xca, 0x61, 0x94, 0x83, 0x62, 0x96, 0xb1, 0x65, 0x93, 0x83, 0xd2, 0xec, - 0x5f, 0x3f, 0x0f, 0x65, 0x42, 0x87, 0x90, 0x12, 0x16, 0x37, 0xd7, 0xd5, 0xfe, 0xfa, 0xba, 0xe2, - 0x35, 0xc2, 0xc0, 0x94, 0xee, 0x2f, 0x49, 0x4a, 0x38, 0x21, 0x8a, 0x16, 0x61, 0x28, 0x22, 0xa1, - 0x47, 0x22, 0x71, 0x87, 0x75, 0x99, 0x46, 0x86, 0xc6, 0x9d, 0x4a, 0xf8, 0x6f, 0x2c, 0xaa, 0xd2, - 0xe5, 0xe5, 0x30, 0xc1, 0x27, 0xbb, 0x65, 0xb4, 0xe5, 0x35, 0xcf, 0x4a, 0xb1, 0x80, 0xa2, 0x37, - 0x60, 0x38, 0x24, 0x4d, 0xa6, 0x3e, 0x1a, 0xeb, 0x7f, 0x91, 0x73, 0x6d, 0x14, 0xaf, 0x87, 0x25, - 0x01, 0x74, 0x03, 0x50, 0x48, 0x28, 0x07, 0xe6, 0xf9, 0x9b, 0xca, 0x5e, 0x54, 0x9c, 0xe0, 0x6a, - 0xc7, 0xe3, 0x04, 0x43, 0xfa, 0xf7, 0xe0, 0x8c, 0x6a, 0xe8, 0x1a, 0x4c, 0xa9, 0xd2, 0xaa, 0x1f, - 0xc5, 0x0e, 0x3d, 0x39, 0x27, 0x18, 0x2d, 0x25, 0x00, 0xc1, 0x69, 0x04, 0xdc, 0x59, 0xc7, 0xfe, - 0x69, 0x0b, 0xf8, 0x38, 0x9f, 0xc0, 0xb3, 0xff, 0x75, 0xf3, 0xd9, 0x7f, 0x2e, 0x77, 0xe6, 0x72, - 0x9e, 0xfc, 0xf7, 0x2d, 0x18, 0xd1, 0x66, 0x36, 0x59, 0xb3, 0x56, 0x97, 0x35, 0xdb, 0x86, 0x49, - 0xba, 0xd2, 0x6f, 0xad, 0x47, 0x24, 0xdc, 0x25, 0x2e, 0x5b, 0x98, 0x85, 0x07, 0x5b, 0x98, 0xca, - 0x90, 0xed, 0x66, 0x8a, 0x20, 0xee, 0x68, 0x02, 0xbd, 0x24, 0x75, 0x29, 0x45, 0xc3, 0x0e, 0x9c, - 0xeb, 0x49, 0x0e, 0x0f, 0x66, 0x27, 0xb5, 0x0f, 0xd1, 0x75, 0x27, 0xf6, 0xe7, 0xe5, 0x37, 0x2a, - 0x83, 0xc1, 0x86, 0x5a, 0x2c, 0x29, 0x83, 0x41, 0xb5, 0x1c, 0x70, 0x82, 0x43, 0xf7, 0xe8, 0x56, - 0x10, 0xc5, 0x69, 0x83, 0xc1, 0xeb, 0x41, 0x14, 0x63, 0x06, 0xb1, 0x9f, 0x07, 0x58, 0xba, 0x47, - 0x1a, 0x7c, 0xa9, 0xeb, 0xcf, 0x19, 0x2b, 0xff, 0x39, 0x63, 0xff, 0x3b, 0x0b, 0xc6, 0x97, 0x17, - 0x0d, 0x89, 0xf0, 0x1c, 0x00, 0x7f, 0x83, 0xdd, 0xbd, 0xbb, 0x2a, 0xb5, 0xed, 0x5c, 0x61, 0xaa, - 0x4a, 0xb1, 0x86, 0x81, 0xce, 0x41, 0xb1, 0xd9, 0xf6, 0x85, 0x74, 0x72, 0x98, 0x5e, 0xd8, 0x37, - 0xdb, 0x3e, 0xa6, 0x65, 0x9a, 0x13, 0x42, 0xb1, 0x6f, 0x27, 0x84, 0x9e, 0xc1, 0x00, 0xd0, 0x2c, - 0x0c, 0xee, 0xed, 0x79, 0x2e, 0x77, 0xb9, 0x14, 0x96, 0x00, 0x77, 0xef, 0x56, 0x2b, 0x11, 0xe6, - 0xe5, 0xf6, 0x97, 0x8a, 0x30, 0xb3, 0xdc, 0x24, 0xf7, 0xde, 0xa7, 0xdb, 0x69, 0xbf, 0x2e, 0x14, - 0x47, 0x13, 0x0d, 0x1d, 0xd5, 0x4d, 0xa6, 0xf7, 0x78, 0x6c, 0xc0, 0x30, 0xb7, 0x97, 0x93, 0x4e, - 0xa8, 0xaf, 0x66, 0xb5, 0x9e, 0x3f, 0x20, 0x73, 0xdc, 0xee, 0x4e, 0xf8, 0xd0, 0xa9, 0x9b, 0x56, - 0x94, 0x62, 0x49, 0x7c, 0xe6, 0x15, 0x18, 0xd5, 0x31, 0x8f, 0xe4, 0xb0, 0xf6, 0xff, 0x16, 0x61, - 0x92, 0xf6, 0xe0, 0xa1, 0x4e, 0xc4, 0xed, 0xce, 0x89, 0x38, 0x6e, 0xa7, 0xa5, 0xde, 0xb3, 0xf1, - 0x76, 0x7a, 0x36, 0x9e, 0xcd, 0x9b, 0x8d, 0x93, 0x9e, 0x83, 0xef, 0xb4, 0xe0, 0xd4, 0x72, 0x33, - 0x68, 0x6c, 0xa7, 0x1c, 0x8b, 0x5e, 0x84, 0x11, 0x7a, 0x8e, 0x47, 0x86, 0xcf, 0xbb, 0x11, 0x05, - 0x41, 0x80, 0xb0, 0x8e, 0xa7, 0x55, 0xbb, 0x7d, 0xbb, 0x5a, 0xc9, 0x0a, 0x9e, 0x20, 0x40, 0x58, - 0xc7, 0xb3, 0x7f, 0xd3, 0x82, 0x0b, 0xd7, 0x16, 0x97, 0x92, 0xa5, 0xd8, 0x11, 0xbf, 0xe1, 0x32, - 0x0c, 0xb5, 0x5c, 0xad, 0x2b, 0x89, 0xc0, 0xb7, 0xc2, 0x7a, 0x21, 0xa0, 0x1f, 0x94, 0xd8, 0x24, - 0x3f, 0x65, 0xc1, 0xa9, 0x6b, 0x5e, 0x4c, 0xaf, 0xe5, 0x74, 0x24, 0x01, 0x7a, 0x2f, 0x47, 0x5e, - 0x1c, 0x84, 0xfb, 0xe9, 0x48, 0x02, 0x58, 0x41, 0xb0, 0x86, 0xc5, 0x5b, 0xde, 0xf5, 0x98, 0xa5, - 0x76, 0xc1, 0xd4, 0x63, 0x61, 0x51, 0x8e, 0x15, 0x06, 0xfd, 0x30, 0xd7, 0x0b, 0x99, 0xd4, 0x70, - 0x5f, 0x9c, 0xb0, 0xea, 0xc3, 0x2a, 0x12, 0x80, 0x13, 0x1c, 0xfa, 0x80, 0x9a, 0xbd, 0xd6, 0x6c, - 0x47, 0x31, 0x09, 0x37, 0xa2, 0x9c, 0xd3, 0xf1, 0x79, 0x28, 0x13, 0x29, 0xa3, 0x17, 0xbd, 0x56, - 0xac, 0xa6, 0x12, 0xde, 0xf3, 0x80, 0x06, 0x0a, 0xaf, 0x0f, 0x37, 0xc5, 0xa3, 0xf9, 0x99, 0x2d, - 0x03, 0x22, 0x7a, 0x5b, 0x7a, 0x84, 0x07, 0xe6, 0x2a, 0xbe, 0xd4, 0x01, 0xc5, 0x19, 0x35, 0xec, - 0x1f, 0xb5, 0xe0, 0x8c, 0xfa, 0xe0, 0x0f, 0xdc, 0x67, 0xda, 0x3f, 0x5f, 0x80, 0xb1, 0xeb, 0x6b, - 0x6b, 0xb5, 0x6b, 0x24, 0x16, 0xd7, 0x76, 0x6f, 0x35, 0x3a, 0xd6, 0xb4, 0x81, 0xdd, 0x5e, 0x81, - 0xed, 0xd8, 0x6b, 0xce, 0xf1, 0x40, 0x41, 0x73, 0x55, 0x3f, 0xbe, 0x15, 0xd6, 0xe3, 0xd0, 0xf3, - 0x37, 0x33, 0xf5, 0x87, 0x92, 0xb9, 0x28, 0xe6, 0x31, 0x17, 0xe8, 0x79, 0x18, 0x62, 0x91, 0x8a, - 0xe4, 0x24, 0x3c, 0xaa, 0x1e, 0x51, 0xac, 0xf4, 0xf0, 0x60, 0xb6, 0x7c, 0x1b, 0x57, 0xf9, 0x1f, - 0x2c, 0x50, 0xd1, 0x6d, 0x18, 0xd9, 0x8a, 0xe3, 0xd6, 0x75, 0xe2, 0xb8, 0xf4, 0xb5, 0xcc, 0x8f, - 0xc3, 0x8b, 0x59, 0xc7, 0x21, 0x1d, 0x04, 0x8e, 0x96, 0x9c, 0x20, 0x49, 0x59, 0x84, 0x75, 0x3a, - 0x76, 0x1d, 0x20, 0x81, 0x1d, 0x93, 0xee, 0xc4, 0xfe, 0x7d, 0x0b, 0x86, 0x79, 0xd0, 0x88, 0x10, - 0xbd, 0x06, 0x03, 0xe4, 0x1e, 0x69, 0x08, 0x56, 0x39, 0xb3, 0xc3, 0x09, 0xa7, 0xc5, 0x65, 0xc0, - 0xf4, 0x3f, 0x66, 0xb5, 0xd0, 0x75, 0x18, 0xa6, 0xbd, 0xbd, 0xa6, 0x22, 0x68, 0x3c, 0x96, 0xf7, - 0xc5, 0x6a, 0xda, 0x39, 0x73, 0x26, 0x8a, 0xb0, 0xac, 0xce, 0xb4, 0xcf, 0x8d, 0x56, 0x9d, 0x9e, - 0xd8, 0x71, 0x37, 0xc6, 0x62, 0x6d, 0xb1, 0xc6, 0x91, 0x04, 0x35, 0xae, 0x7d, 0x96, 0x85, 0x38, - 0x21, 0x62, 0xaf, 0x41, 0x99, 0x4e, 0xea, 0x7c, 0xd3, 0x73, 0xba, 0x2b, 0xd4, 0x9f, 0x82, 0xb2, - 0x54, 0x97, 0x47, 0xc2, 0x59, 0x9c, 0x51, 0x95, 0xda, 0xf4, 0x08, 0x27, 0x70, 0x7b, 0x03, 0x4e, - 0x33, 0xe3, 0x47, 0x27, 0xde, 0x32, 0xf6, 0x58, 0xef, 0xc5, 0xfc, 0xb4, 0x78, 0x79, 0xf2, 0x99, - 0x99, 0xd6, 0xfc, 0x31, 0x47, 0x25, 0xc5, 0xe4, 0x15, 0x6a, 0x7f, 0x6d, 0x00, 0x1e, 0xad, 0xd6, - 0xf3, 0xe3, 0x89, 0xbc, 0x0c, 0xa3, 0x9c, 0x2f, 0xa5, 0x4b, 0xdb, 0x69, 0x8a, 0x76, 0x95, 0xf0, - 0x77, 0x4d, 0x83, 0x61, 0x03, 0x13, 0x5d, 0x80, 0xa2, 0xf7, 0xae, 0x9f, 0x76, 0x6d, 0xaa, 0xbe, - 0xb9, 0x8a, 0x69, 0x39, 0x05, 0x53, 0x16, 0x97, 0xdf, 0x1d, 0x0a, 0xac, 0xd8, 0xdc, 0xd7, 0x61, - 0xdc, 0x8b, 0x1a, 0x91, 0x57, 0xf5, 0xe9, 0x39, 0xa3, 0x9d, 0x54, 0x4a, 0x2a, 0x42, 0x3b, 0xad, - 0xa0, 0x38, 0x85, 0xad, 0x5d, 0x64, 0x83, 0x7d, 0xb3, 0xc9, 0x3d, 0xbd, 0xa7, 0xe9, 0x0b, 0xa0, - 0xc5, 0xbe, 0x2e, 0x62, 0x52, 0x7c, 0xf1, 0x02, 0xe0, 0x1f, 0x1c, 0x61, 0x09, 0xa3, 0x4f, 0xce, - 0xc6, 0x96, 0xd3, 0x9a, 0x6f, 0xc7, 0x5b, 0x15, 0x2f, 0x6a, 0x04, 0xbb, 0x24, 0xdc, 0x67, 0xd2, - 0x82, 0x52, 0xf2, 0xe4, 0x54, 0x80, 0xc5, 0xeb, 0xf3, 0x35, 0x8a, 0x89, 0x3b, 0xeb, 0xa0, 0x79, - 0x98, 0x90, 0x85, 0x75, 0x12, 0xb1, 0x2b, 0x6c, 0x84, 0x91, 0x51, 0xce, 0x46, 0xa2, 0x58, 0x11, - 0x49, 0xe3, 0x9b, 0x9c, 0x34, 0x1c, 0x07, 0x27, 0xfd, 0x12, 0x8c, 0x79, 0xbe, 0x17, 0x7b, 0x4e, - 0x1c, 0x70, 0x15, 0x14, 0x17, 0x0c, 0x30, 0xd9, 0x7a, 0x55, 0x07, 0x60, 0x13, 0xcf, 0xfe, 0x2f, - 0x03, 0x30, 0xc5, 0xa6, 0xed, 0xc3, 0x15, 0xf6, 0x8d, 0xb4, 0xc2, 0x6e, 0x77, 0xae, 0xb0, 0xe3, - 0x78, 0x22, 0x3c, 0xf0, 0x32, 0x7b, 0x07, 0xca, 0xca, 0xbf, 0x4a, 0x3a, 0x58, 0x5a, 0x39, 0x0e, - 0x96, 0xbd, 0xb9, 0x0f, 0x69, 0xa2, 0x56, 0xcc, 0x34, 0x51, 0xfb, 0xeb, 0x16, 0x24, 0x3a, 0x15, - 0x74, 0x1d, 0xca, 0xad, 0x80, 0x59, 0x5e, 0x86, 0xd2, 0x9c, 0xf9, 0xd1, 0xcc, 0x8b, 0x8a, 0x5f, - 0x8a, 0xfc, 0xe3, 0x6b, 0xb2, 0x06, 0x4e, 0x2a, 0xa3, 0x05, 0x18, 0x6e, 0x85, 0xa4, 0x1e, 0xb3, - 0xb0, 0x22, 0x3d, 0xe9, 0xf0, 0x35, 0xc2, 0xf1, 0xb1, 0xac, 0x68, 0xff, 0x82, 0x05, 0xc0, 0xad, - 0xc0, 0x1c, 0x7f, 0x93, 0x9c, 0x80, 0xb8, 0xbb, 0x02, 0x03, 0x51, 0x8b, 0x34, 0xba, 0xd9, 0xc4, - 0x26, 0xfd, 0xa9, 0xb7, 0x48, 0x23, 0x19, 0x70, 0xfa, 0x0f, 0xb3, 0xda, 0xf6, 0x77, 0x03, 0x8c, - 0x27, 0x68, 0xd5, 0x98, 0xec, 0xa0, 0x67, 0x8c, 0x30, 0x03, 0xe7, 0x52, 0x61, 0x06, 0xca, 0x0c, - 0x5b, 0x93, 0xac, 0xbe, 0x03, 0xc5, 0x1d, 0xe7, 0x9e, 0x10, 0x9d, 0x3d, 0xd5, 0xbd, 0x1b, 0x94, - 0xfe, 0xdc, 0x8a, 0x73, 0x8f, 0x3f, 0x12, 0x9f, 0x92, 0x0b, 0x64, 0xc5, 0xb9, 0x77, 0xc8, 0x2d, - 0x5f, 0xd9, 0x21, 0x75, 0xd3, 0x8b, 0xe2, 0x2f, 0xfc, 0xe7, 0xe4, 0x3f, 0x5b, 0x76, 0xb4, 0x11, - 0xd6, 0x96, 0xe7, 0x0b, 0x9b, 0xa8, 0xbe, 0xda, 0xf2, 0xfc, 0x74, 0x5b, 0x9e, 0xdf, 0x47, 0x5b, - 0x9e, 0x8f, 0xde, 0x83, 0x61, 0x61, 0x7f, 0x28, 0xc2, 0xfa, 0x5c, 0xed, 0xa3, 0x3d, 0x61, 0xbe, - 0xc8, 0xdb, 0xbc, 0x2a, 0x1f, 0xc1, 0xa2, 0xb4, 0x67, 0xbb, 0xb2, 0x41, 0xf4, 0x57, 0x2c, 0x18, - 0x17, 0xbf, 0x31, 0x79, 0xb7, 0x4d, 0xa2, 0x58, 0xf0, 0x9e, 0x9f, 0xec, 0xbf, 0x0f, 0xa2, 0x22, - 0xef, 0xca, 0x27, 0xe5, 0x31, 0x6b, 0x02, 0x7b, 0xf6, 0x28, 0xd5, 0x0b, 0xf4, 0xf7, 0x2c, 0x38, - 0xbd, 0xe3, 0xdc, 0xe3, 0x2d, 0xf2, 0x32, 0xec, 0xc4, 0x5e, 0x20, 0x54, 0xff, 0xaf, 0xf5, 0x37, - 0xfd, 0x1d, 0xd5, 0x79, 0x27, 0xa5, 0x7e, 0xf2, 0x74, 0x16, 0x4a, 0xcf, 0xae, 0x66, 0xf6, 0x6b, - 0x66, 0x03, 0x4a, 0x72, 0xbd, 0x65, 0x88, 0x1a, 0x2a, 0x3a, 0x63, 0x7d, 0x64, 0xf3, 0x4f, 0xdd, - 0xd7, 0x9f, 0xb6, 0x23, 0xd6, 0xda, 0x43, 0x6d, 0xe7, 0x1d, 0x18, 0xd5, 0xd7, 0xd8, 0x43, 0x6d, - 0xeb, 0x5d, 0x38, 0x95, 0xb1, 0x96, 0x1e, 0x6a, 0x93, 0x7b, 0x70, 0x2e, 0x77, 0x7d, 0x3c, 0xcc, - 0x86, 0xed, 0x9f, 0xb7, 0xf4, 0x73, 0xf0, 0x04, 0x74, 0x0e, 0x8b, 0xa6, 0xce, 0xe1, 0x62, 0xf7, - 0x9d, 0x93, 0xa3, 0x78, 0x78, 0x5b, 0xef, 0x34, 0x3d, 0xd5, 0xd1, 0x1b, 0x30, 0xd4, 0xa4, 0x25, - 0xd2, 0xf0, 0xd5, 0xee, 0xbd, 0x23, 0x13, 0x5e, 0x8a, 0x95, 0x47, 0x58, 0x50, 0xb0, 0x7f, 0xd9, - 0x82, 0x81, 0x13, 0x18, 0x09, 0x6c, 0x8e, 0xc4, 0x33, 0xb9, 0xa4, 0x45, 0xc4, 0xe1, 0x39, 0xec, - 0xec, 0x2d, 0xdd, 0x8b, 0x89, 0x1f, 0xb1, 0xa7, 0x62, 0xe6, 0xc0, 0xfc, 0x5f, 0x70, 0xea, 0x66, - 0xe0, 0xb8, 0x0b, 0x4e, 0xd3, 0xf1, 0x1b, 0x24, 0xac, 0xfa, 0x9b, 0x47, 0xb2, 0xc0, 0x2e, 0xf4, - 0xb2, 0xc0, 0xb6, 0xb7, 0x00, 0xe9, 0x0d, 0x08, 0x57, 0x16, 0x0c, 0xc3, 0x1e, 0x6f, 0x4a, 0x0c, - 0xff, 0x13, 0xd9, 0xac, 0x59, 0x47, 0xcf, 0x34, 0x27, 0x0d, 0x5e, 0x80, 0x25, 0x21, 0xfb, 0x65, - 0xc8, 0xf4, 0x87, 0xef, 0x2d, 0x36, 0xb0, 0x3f, 0x03, 0x53, 0xac, 0xe6, 0x11, 0x9f, 0xb4, 0x76, - 0x4a, 0x2a, 0x99, 0x11, 0xfc, 0xce, 0xfe, 0xa2, 0x05, 0x13, 0xab, 0xa9, 0x98, 0x60, 0x97, 0x99, - 0x02, 0x34, 0x43, 0x18, 0x5e, 0x67, 0xa5, 0x58, 0x40, 0x8f, 0x5d, 0x06, 0xf5, 0xe7, 0x16, 0x24, - 0x21, 0x2a, 0x4e, 0x80, 0xf1, 0x5a, 0x34, 0x18, 0xaf, 0x4c, 0xd9, 0x88, 0xea, 0x4e, 0x1e, 0xdf, - 0x85, 0x6e, 0xa8, 0x78, 0x4c, 0x5d, 0xc4, 0x22, 0x09, 0x19, 0x1e, 0xbd, 0x67, 0xdc, 0x0c, 0xda, - 0x24, 0x23, 0x34, 0xd9, 0xff, 0xb1, 0x00, 0x48, 0xe1, 0xf6, 0x1d, 0x2f, 0xaa, 0xb3, 0xc6, 0xf1, - 0xc4, 0x8b, 0xda, 0x05, 0xc4, 0x54, 0xf8, 0xa1, 0xe3, 0x47, 0x9c, 0xac, 0x27, 0xa4, 0x6e, 0x47, - 0xb3, 0x0f, 0x98, 0x11, 0x4d, 0xa2, 0x9b, 0x1d, 0xd4, 0x70, 0x46, 0x0b, 0x9a, 0x69, 0xc6, 0x60, - 0xbf, 0xa6, 0x19, 0x43, 0x3d, 0xdc, 0xd5, 0x7e, 0xce, 0x82, 0x31, 0x35, 0x4c, 0x1f, 0x10, 0xfb, - 0x73, 0xd5, 0x9f, 0x9c, 0xa3, 0xaf, 0xa6, 0x75, 0x99, 0x5d, 0x09, 0xdf, 0xcc, 0xdc, 0x0e, 0x9d, - 0xa6, 0xf7, 0x1e, 0x51, 0xd1, 0xfa, 0x66, 0x85, 0x1b, 0xa1, 0x28, 0x3d, 0x3c, 0x98, 0x1d, 0x53, - 0xff, 0x78, 0x74, 0xe0, 0xa4, 0x8a, 0xfd, 0x13, 0x74, 0xb3, 0x9b, 0x4b, 0x11, 0xbd, 0x08, 0x83, - 0xad, 0x2d, 0x27, 0x22, 0x29, 0xa7, 0x9b, 0xc1, 0x1a, 0x2d, 0x3c, 0x3c, 0x98, 0x1d, 0x57, 0x15, - 0x58, 0x09, 0xe6, 0xd8, 0xfd, 0x47, 0xe1, 0xea, 0x5c, 0x9c, 0x3d, 0xa3, 0x70, 0xfd, 0xb1, 0x05, - 0x03, 0xab, 0x81, 0x7b, 0x12, 0x47, 0xc0, 0xeb, 0xc6, 0x11, 0x70, 0x3e, 0x2f, 0x70, 0x7b, 0xee, - 0xee, 0x5f, 0x4e, 0xed, 0xfe, 0x8b, 0xb9, 0x14, 0xba, 0x6f, 0xfc, 0x1d, 0x18, 0x61, 0xe1, 0xe0, - 0x85, 0x83, 0xd1, 0xf3, 0xc6, 0x86, 0x9f, 0x4d, 0x6d, 0xf8, 0x09, 0x0d, 0x55, 0xdb, 0xe9, 0x4f, - 0xc2, 0xb0, 0x70, 0x72, 0x49, 0x7b, 0x6f, 0x0a, 0x5c, 0x2c, 0xe1, 0xf6, 0x8f, 0x15, 0xc1, 0x08, - 0x3f, 0x8f, 0x7e, 0xc5, 0x82, 0xb9, 0x90, 0x1b, 0xbf, 0xba, 0x95, 0x76, 0xe8, 0xf9, 0x9b, 0xf5, - 0xc6, 0x16, 0x71, 0xdb, 0x4d, 0xcf, 0xdf, 0xac, 0x6e, 0xfa, 0x81, 0x2a, 0x5e, 0xba, 0x47, 0x1a, - 0x6d, 0xa6, 0xbe, 0xea, 0x11, 0xeb, 0x5e, 0x19, 0x91, 0x3f, 0x77, 0xff, 0x60, 0x76, 0x0e, 0x1f, - 0x89, 0x36, 0x3e, 0x62, 0x5f, 0xd0, 0x6f, 0x5a, 0x70, 0x95, 0x47, 0x65, 0xef, 0xbf, 0xff, 0x5d, - 0xde, 0xb9, 0x35, 0x49, 0x2a, 0x21, 0xb2, 0x46, 0xc2, 0x9d, 0x85, 0x97, 0xc4, 0x80, 0x5e, 0xad, - 0x1d, 0xad, 0x2d, 0x7c, 0xd4, 0xce, 0xd9, 0xff, 0xac, 0x08, 0x63, 0x22, 0xb4, 0x93, 0xb8, 0x03, - 0x5e, 0x34, 0x96, 0xc4, 0x63, 0xa9, 0x25, 0x31, 0x65, 0x20, 0x1f, 0xcf, 0xf1, 0x1f, 0xc1, 0x14, - 0x3d, 0x9c, 0xaf, 0x13, 0x27, 0x8c, 0xd7, 0x89, 0xc3, 0x2d, 0xae, 0x8a, 0x47, 0x3e, 0xfd, 0x95, - 0x60, 0xed, 0x66, 0x9a, 0x18, 0xee, 0xa4, 0xff, 0x8d, 0x74, 0xe7, 0xf8, 0x30, 0xd9, 0x11, 0x9d, - 0xeb, 0x2d, 0x28, 0x2b, 0x0f, 0x0d, 0x71, 0xe8, 0x74, 0x0f, 0x72, 0x97, 0xa6, 0xc0, 0x85, 0x5f, - 0x89, 0x77, 0x50, 0x42, 0xce, 0xfe, 0xfb, 0x05, 0xa3, 0x41, 0x3e, 0x89, 0xab, 0x50, 0x72, 0xa2, - 0xc8, 0xdb, 0xf4, 0x89, 0x2b, 0x76, 0xec, 0x47, 0xf3, 0x76, 0xac, 0xd1, 0x0c, 0xf3, 0x92, 0x99, - 0x17, 0x35, 0xb1, 0xa2, 0x81, 0xae, 0x73, 0xbb, 0xb6, 0x5d, 0xf9, 0x52, 0xeb, 0x8f, 0x1a, 0x48, - 0xcb, 0xb7, 0x5d, 0x82, 0x45, 0x7d, 0xf4, 0x59, 0x6e, 0x78, 0x78, 0xc3, 0x0f, 0xf6, 0xfc, 0x6b, - 0x41, 0x20, 0xc3, 0x27, 0xf4, 0x47, 0x70, 0x4a, 0x9a, 0x1b, 0xaa, 0xea, 0xd8, 0xa4, 0xd6, 0x5f, - 0x04, 0xcb, 0x6f, 0x83, 0x53, 0x94, 0xb4, 0xe9, 0xdd, 0x1c, 0x21, 0x02, 0x13, 0x22, 0x6e, 0x98, - 0x2c, 0x13, 0x63, 0x97, 0xf9, 0x08, 0x33, 0x6b, 0x27, 0x12, 0xe0, 0x1b, 0x26, 0x09, 0x9c, 0xa6, - 0x69, 0xff, 0xa4, 0x05, 0xcc, 0xd3, 0xf3, 0x04, 0xf8, 0x91, 0x4f, 0x99, 0xfc, 0xc8, 0x74, 0xde, - 0x20, 0xe7, 0xb0, 0x22, 0x2f, 0xf0, 0x95, 0x55, 0x0b, 0x83, 0x7b, 0xfb, 0xc2, 0xe8, 0xa3, 0xf7, - 0xfb, 0xc3, 0xfe, 0x5f, 0x16, 0x3f, 0xc4, 0x94, 0xff, 0x04, 0xfa, 0x76, 0x28, 0x35, 0x9c, 0x96, - 0xd3, 0xe0, 0xb9, 0x52, 0x72, 0x65, 0x71, 0x46, 0xa5, 0xb9, 0x45, 0x51, 0x83, 0xcb, 0x96, 0x64, - 0xfc, 0xb9, 0x92, 0x2c, 0xee, 0x29, 0x4f, 0x52, 0x4d, 0xce, 0x6c, 0xc3, 0x98, 0x41, 0xec, 0xa1, - 0x0a, 0x22, 0xbe, 0x9d, 0x5f, 0xb1, 0x2a, 0x5e, 0xe2, 0x0e, 0x4c, 0xf9, 0xda, 0x7f, 0x7a, 0xa1, - 0xc8, 0xc7, 0xe5, 0x47, 0x7b, 0x5d, 0xa2, 0xec, 0xf6, 0xd1, 0xfc, 0x4e, 0x53, 0x64, 0x70, 0x27, - 0x65, 0xfb, 0xc7, 0x2d, 0x78, 0x44, 0x47, 0xd4, 0x5c, 0x5b, 0x7a, 0x49, 0xf7, 0x2b, 0x50, 0x0a, - 0x5a, 0x24, 0x74, 0xe2, 0x20, 0x14, 0xb7, 0xc6, 0x15, 0x39, 0xe8, 0xb7, 0x44, 0xf9, 0xa1, 0x88, - 0x34, 0x2e, 0xa9, 0xcb, 0x72, 0xac, 0x6a, 0xd2, 0xd7, 0x27, 0x1b, 0x8c, 0x48, 0x38, 0x31, 0xb1, - 0x33, 0x80, 0x29, 0xba, 0x23, 0x2c, 0x20, 0xf6, 0xd7, 0x2c, 0xbe, 0xb0, 0xf4, 0xae, 0xa3, 0x77, - 0x61, 0x72, 0xc7, 0x89, 0x1b, 0x5b, 0x4b, 0xf7, 0x5a, 0x21, 0xd7, 0x95, 0xc8, 0x71, 0x7a, 0xaa, - 0xd7, 0x38, 0x69, 0x1f, 0x99, 0xd8, 0x52, 0xae, 0xa4, 0x88, 0xe1, 0x0e, 0xf2, 0x68, 0x1d, 0x46, - 0x58, 0x19, 0xf3, 0xcf, 0x8b, 0xba, 0xb1, 0x06, 0x79, 0xad, 0x29, 0x5b, 0x81, 0x95, 0x84, 0x0e, - 0xd6, 0x89, 0xda, 0x3f, 0x53, 0xe4, 0xbb, 0x9d, 0xb1, 0xf2, 0x4f, 0xc2, 0x70, 0x2b, 0x70, 0x17, - 0xab, 0x15, 0x2c, 0x66, 0x41, 0x5d, 0x23, 0x35, 0x5e, 0x8c, 0x25, 0x1c, 0x5d, 0x81, 0x92, 0xf8, - 0x29, 0x75, 0x5b, 0xec, 0x6c, 0x16, 0x78, 0x11, 0x56, 0x50, 0xf4, 0x1c, 0x40, 0x2b, 0x0c, 0x76, - 0x3d, 0x97, 0x05, 0x81, 0x28, 0x9a, 0x66, 0x3e, 0x35, 0x05, 0xc1, 0x1a, 0x16, 0x7a, 0x15, 0xc6, - 0xda, 0x7e, 0xc4, 0xd9, 0x11, 0x67, 0x5d, 0x04, 0xe5, 0x2e, 0x25, 0x06, 0x28, 0xb7, 0x75, 0x20, - 0x36, 0x71, 0xd1, 0x3c, 0x0c, 0xc5, 0x0e, 0x33, 0x5b, 0x19, 0xcc, 0xb7, 0xb7, 0x5d, 0xa3, 0x18, - 0x7a, 0x5a, 0x0e, 0x5a, 0x01, 0x8b, 0x8a, 0xe8, 0x2d, 0xe9, 0x2a, 0xcb, 0x0f, 0x76, 0x61, 0xe8, - 0xde, 0xdf, 0x25, 0xa0, 0x39, 0xca, 0x0a, 0x03, 0x7a, 0x83, 0x16, 0x7a, 0x05, 0x80, 0xdc, 0x8b, - 0x49, 0xe8, 0x3b, 0x4d, 0x65, 0x15, 0xa6, 0xf8, 0x82, 0x4a, 0xb0, 0x1a, 0xc4, 0xb7, 0x23, 0xb2, - 0xa4, 0x30, 0xb0, 0x86, 0x6d, 0xff, 0x66, 0x19, 0x20, 0xe1, 0xdb, 0xd1, 0x7b, 0x1d, 0x07, 0xd7, - 0xd3, 0xdd, 0x39, 0xfd, 0xe3, 0x3b, 0xb5, 0xd0, 0xf7, 0x58, 0x30, 0xe2, 0x34, 0x9b, 0x41, 0xc3, - 0x89, 0xd9, 0x0c, 0x15, 0xba, 0x1f, 0x9c, 0xa2, 0xfd, 0xf9, 0xa4, 0x06, 0xef, 0xc2, 0xf3, 0x72, - 0x85, 0x6a, 0x90, 0x9e, 0xbd, 0xd0, 0x1b, 0x46, 0x9f, 0x90, 0x4f, 0xc5, 0xa2, 0x31, 0x94, 0xea, - 0xa9, 0x58, 0x66, 0x77, 0x84, 0xfe, 0x4a, 0xbc, 0x6d, 0xbc, 0x12, 0x07, 0xf2, 0x7d, 0x01, 0x0d, - 0xf6, 0xb5, 0xd7, 0x03, 0x11, 0xd5, 0xf4, 0xb8, 0x00, 0x83, 0xf9, 0x8e, 0x77, 0xda, 0x3b, 0xa9, - 0x47, 0x4c, 0x80, 0x77, 0x60, 0xc2, 0x35, 0x99, 0x00, 0xb1, 0x12, 0x9f, 0xc8, 0xa3, 0x9b, 0xe2, - 0x19, 0x92, 0x6b, 0x3f, 0x05, 0xc0, 0x69, 0xc2, 0xa8, 0xc6, 0x63, 0x3e, 0x54, 0xfd, 0x8d, 0x40, - 0x38, 0x5b, 0xd8, 0xb9, 0x73, 0xb9, 0x1f, 0xc5, 0x64, 0x87, 0x62, 0x26, 0xb7, 0xfb, 0xaa, 0xa8, - 0x8b, 0x15, 0x15, 0xf4, 0x06, 0x0c, 0x31, 0xcf, 0xab, 0x68, 0xba, 0x94, 0x2f, 0x2b, 0x36, 0x83, - 0x98, 0x25, 0x1b, 0x92, 0xfd, 0x8d, 0xb0, 0xa0, 0x80, 0xae, 0x4b, 0xbf, 0xc6, 0xa8, 0xea, 0xdf, - 0x8e, 0x08, 0xf3, 0x6b, 0x2c, 0x2f, 0x7c, 0x34, 0x71, 0x59, 0xe4, 0xe5, 0x99, 0xc9, 0xbb, 0x8c, - 0x9a, 0x94, 0x8b, 0x12, 0xff, 0x65, 0x4e, 0xb0, 0x69, 0xc8, 0xef, 0x9e, 0x99, 0x37, 0x2c, 0x19, - 0xce, 0x3b, 0x26, 0x09, 0x9c, 0xa6, 0x49, 0x39, 0x52, 0xbe, 0xeb, 0x85, 0xbb, 0x46, 0xaf, 0xb3, - 0x83, 0x3f, 0xc4, 0xd9, 0x6d, 0xc4, 0x4b, 0xb0, 0xa8, 0x7f, 0xa2, 0xec, 0xc1, 0x8c, 0x0f, 0x93, - 0xe9, 0x2d, 0xfa, 0x50, 0xd9, 0x91, 0xdf, 0x1f, 0x80, 0x71, 0x73, 0x49, 0xa1, 0xab, 0x50, 0x16, - 0x44, 0x54, 0x1c, 0x7f, 0xb5, 0x4b, 0x56, 0x24, 0x00, 0x27, 0x38, 0x2c, 0x7d, 0x03, 0xab, 0xae, - 0x99, 0xd9, 0x26, 0xe9, 0x1b, 0x14, 0x04, 0x6b, 0x58, 0xf4, 0x61, 0xb5, 0x1e, 0x04, 0xb1, 0xba, - 0x90, 0xd4, 0xba, 0x5b, 0x60, 0xa5, 0x58, 0x40, 0xe9, 0x45, 0xb4, 0x4d, 0x42, 0x9f, 0x34, 0xcd, - 0xf0, 0xc0, 0xea, 0x22, 0xba, 0xa1, 0x03, 0xb1, 0x89, 0x4b, 0xaf, 0xd3, 0x20, 0x62, 0x0b, 0x59, - 0x3c, 0xdf, 0x12, 0xb3, 0xe5, 0x3a, 0x77, 0xad, 0x96, 0x70, 0xf4, 0x19, 0x78, 0x44, 0x85, 0x40, - 0xc2, 0x5c, 0x0f, 0x21, 0x5b, 0x1c, 0x32, 0xa4, 0x2d, 0x8f, 0x2c, 0x66, 0xa3, 0xe1, 0xbc, 0xfa, - 0xe8, 0x75, 0x18, 0x17, 0x2c, 0xbe, 0xa4, 0x38, 0x6c, 0x9a, 0xc6, 0xdc, 0x30, 0xa0, 0x38, 0x85, - 0x2d, 0x03, 0x1c, 0x33, 0x2e, 0x5b, 0x52, 0x28, 0x75, 0x06, 0x38, 0xd6, 0xe1, 0xb8, 0xa3, 0x06, - 0x9a, 0x87, 0x09, 0xce, 0x83, 0x79, 0xfe, 0x26, 0x9f, 0x13, 0xe1, 0x4d, 0xa5, 0xb6, 0xd4, 0x2d, - 0x13, 0x8c, 0xd3, 0xf8, 0xe8, 0x65, 0x18, 0x75, 0xc2, 0xc6, 0x96, 0x17, 0x93, 0x46, 0xdc, 0x0e, - 0xb9, 0x9b, 0x95, 0x66, 0x5b, 0x34, 0xaf, 0xc1, 0xb0, 0x81, 0x69, 0xbf, 0x07, 0xa7, 0x32, 0x62, - 0x2e, 0xd0, 0x85, 0xe3, 0xb4, 0x3c, 0xf9, 0x4d, 0x29, 0x03, 0xe4, 0xf9, 0x5a, 0x55, 0x7e, 0x8d, - 0x86, 0x45, 0x57, 0x27, 0x8b, 0xcd, 0xa0, 0xa5, 0x00, 0x54, 0xab, 0x73, 0x59, 0x02, 0x70, 0x82, - 0x63, 0xff, 0xf7, 0x02, 0x4c, 0x64, 0xe8, 0x56, 0x58, 0x1a, 0xba, 0xd4, 0x23, 0x25, 0xc9, 0x3a, - 0x67, 0xc6, 0xcb, 0x2e, 0x1c, 0x21, 0x5e, 0x76, 0xb1, 0x57, 0xbc, 0xec, 0x81, 0xf7, 0x13, 0x2f, - 0xdb, 0x1c, 0xb1, 0xc1, 0xbe, 0x46, 0x2c, 0x23, 0xc6, 0xf6, 0xd0, 0x11, 0x63, 0x6c, 0x1b, 0x83, - 0x3e, 0xdc, 0xc7, 0xa0, 0xff, 0x50, 0x01, 0x26, 0xd3, 0x36, 0x90, 0x27, 0x20, 0xb7, 0x7d, 0xc3, - 0x90, 0xdb, 0x66, 0x27, 0x75, 0x4c, 0x5b, 0x66, 0xe6, 0xc9, 0x70, 0x71, 0x4a, 0x86, 0xfb, 0xf1, - 0xbe, 0xa8, 0x75, 0x97, 0xe7, 0xfe, 0xad, 0x02, 0x9c, 0x49, 0x57, 0x59, 0x6c, 0x3a, 0xde, 0xce, - 0x09, 0x8c, 0xcd, 0x2d, 0x63, 0x6c, 0x9e, 0xe9, 0xe7, 0x6b, 0x58, 0xd7, 0x72, 0x07, 0xe8, 0x6e, - 0x6a, 0x80, 0xae, 0xf6, 0x4f, 0xb2, 0xfb, 0x28, 0x7d, 0xb5, 0x08, 0x17, 0x33, 0xeb, 0x25, 0x62, - 0xcf, 0x65, 0x43, 0xec, 0xf9, 0x5c, 0x4a, 0xec, 0x69, 0x77, 0xaf, 0x7d, 0x3c, 0x72, 0x50, 0xe1, - 0x21, 0xcb, 0x02, 0x08, 0x3c, 0xa0, 0x0c, 0xd4, 0xf0, 0x90, 0x55, 0x84, 0xb0, 0x49, 0xf7, 0x1b, - 0x49, 0xf6, 0xf9, 0xaf, 0x2c, 0x38, 0x97, 0x39, 0x37, 0x27, 0x20, 0xeb, 0x5a, 0x35, 0x65, 0x5d, - 0x4f, 0xf6, 0xbd, 0x5a, 0x73, 0x84, 0x5f, 0xbf, 0x3e, 0x90, 0xf3, 0x2d, 0xec, 0x25, 0x7f, 0x0b, - 0x46, 0x9c, 0x46, 0x83, 0x44, 0xd1, 0x4a, 0xe0, 0xaa, 0x90, 0xc0, 0xcf, 0xb0, 0x77, 0x56, 0x52, - 0x7c, 0x78, 0x30, 0x3b, 0x93, 0x26, 0x91, 0x80, 0xb1, 0x4e, 0x01, 0x7d, 0x16, 0x4a, 0x91, 0xb8, - 0x37, 0xc5, 0xdc, 0x3f, 0xdf, 0xe7, 0xe0, 0x38, 0xeb, 0xa4, 0x69, 0x86, 0x39, 0x52, 0x92, 0x0a, - 0x45, 0xd2, 0x0c, 0x89, 0x52, 0x38, 0xd6, 0x90, 0x28, 0xcf, 0x01, 0xec, 0xaa, 0xc7, 0x40, 0x5a, - 0xfe, 0xa0, 0x3d, 0x13, 0x34, 0x2c, 0xf4, 0x2d, 0x30, 0x19, 0xf1, 0xa0, 0x7e, 0x8b, 0x4d, 0x27, - 0x62, 0x6e, 0x2e, 0x62, 0x15, 0xb2, 0x50, 0x4a, 0xf5, 0x14, 0x0c, 0x77, 0x60, 0xa3, 0x65, 0xd9, - 0x2a, 0x8b, 0x40, 0xc8, 0x17, 0xe6, 0xe5, 0xa4, 0x45, 0x91, 0x04, 0xf7, 0x74, 0x7a, 0xf8, 0xd9, - 0xc0, 0x6b, 0x35, 0xd1, 0x67, 0x01, 0xe8, 0xf2, 0x11, 0x72, 0x88, 0xe1, 0xfc, 0xc3, 0x93, 0x9e, - 0x2a, 0x6e, 0xa6, 0x55, 0x2e, 0xf3, 0x4d, 0xad, 0x28, 0x22, 0x58, 0x23, 0x68, 0xff, 0xd0, 0x00, - 0x3c, 0xda, 0xe5, 0x8c, 0x44, 0xf3, 0xa6, 0x1e, 0xf6, 0xa9, 0xf4, 0xe3, 0x7a, 0x26, 0xb3, 0xb2, - 0xf1, 0xda, 0x4e, 0x2d, 0xc5, 0xc2, 0xfb, 0x5e, 0x8a, 0xdf, 0x6f, 0x69, 0x62, 0x0f, 0x6e, 0xab, - 0xf9, 0xa9, 0x23, 0x9e, 0xfd, 0xc7, 0x28, 0x07, 0xd9, 0xc8, 0x10, 0x26, 0x3c, 0xd7, 0x77, 0x77, - 0xfa, 0x96, 0x2e, 0x9c, 0xac, 0x94, 0xf8, 0x0b, 0x16, 0x3c, 0x96, 0xd9, 0x5f, 0xc3, 0x22, 0xe7, - 0x2a, 0x94, 0x1b, 0xb4, 0x50, 0x73, 0x45, 0x4c, 0x7c, 0xb4, 0x25, 0x00, 0x27, 0x38, 0x86, 0xe1, - 0x4d, 0xa1, 0xa7, 0xe1, 0xcd, 0x3f, 0xb5, 0xa0, 0x63, 0x7f, 0x9c, 0xc0, 0x41, 0x5d, 0x35, 0x0f, - 0xea, 0x8f, 0xf6, 0x33, 0x97, 0x39, 0x67, 0xf4, 0x1f, 0x4d, 0xc0, 0xd9, 0x1c, 0x57, 0x9c, 0x5d, - 0x98, 0xda, 0x6c, 0x10, 0xd3, 0xc9, 0x53, 0x7c, 0x4c, 0xa6, 0x3f, 0x6c, 0x57, 0x8f, 0x50, 0x96, - 0xd1, 0x72, 0xaa, 0x03, 0x05, 0x77, 0x36, 0x81, 0xbe, 0x60, 0xc1, 0x69, 0x67, 0x2f, 0xea, 0x48, - 0x81, 0x2f, 0xd6, 0xcc, 0x0b, 0x99, 0x42, 0x90, 0x1e, 0x29, 0xf3, 0x79, 0x8a, 0xcf, 0x2c, 0x2c, - 0x9c, 0xd9, 0x16, 0xc2, 0x22, 0x48, 0x3c, 0x65, 0xe7, 0xbb, 0xb8, 0x21, 0x67, 0xf9, 0x4c, 0xf1, - 0x1b, 0x44, 0x42, 0xb0, 0xa2, 0x83, 0x3e, 0x0f, 0xe5, 0x4d, 0xe9, 0xc8, 0x98, 0x71, 0x43, 0x25, - 0x03, 0xd9, 0xdd, 0xbd, 0x93, 0x6b, 0x32, 0x15, 0x12, 0x4e, 0x88, 0xa2, 0xd7, 0xa1, 0xe8, 0x6f, - 0x44, 0xdd, 0xb2, 0x64, 0xa6, 0x4c, 0xd6, 0xb8, 0xb3, 0xff, 0xea, 0x72, 0x1d, 0xd3, 0x8a, 0xe8, - 0x3a, 0x14, 0xc3, 0x75, 0x57, 0x48, 0xf0, 0x32, 0xcf, 0x70, 0xbc, 0x50, 0xc9, 0xe9, 0x15, 0xa3, - 0x84, 0x17, 0x2a, 0x98, 0x92, 0x40, 0x35, 0x18, 0x64, 0xfe, 0x2b, 0xe2, 0x3e, 0xc8, 0xe4, 0x7c, - 0xbb, 0xf8, 0x81, 0xf1, 0x88, 0x00, 0x0c, 0x01, 0x73, 0x42, 0x68, 0x0d, 0x86, 0x1a, 0x2c, 0xa3, - 0xa2, 0x88, 0x47, 0xf6, 0x89, 0x4c, 0x59, 0x5d, 0x97, 0x54, 0x93, 0x42, 0x74, 0xc5, 0x30, 0xb0, - 0xa0, 0xc5, 0xa8, 0x92, 0xd6, 0xd6, 0x46, 0x24, 0x32, 0x00, 0x67, 0x53, 0xed, 0x92, 0x41, 0x55, - 0x50, 0x65, 0x18, 0x58, 0xd0, 0x42, 0xaf, 0x40, 0x61, 0xa3, 0x21, 0x7c, 0x53, 0x32, 0x85, 0x76, - 0x66, 0xbc, 0x86, 0x85, 0xa1, 0xfb, 0x07, 0xb3, 0x85, 0xe5, 0x45, 0x5c, 0xd8, 0x68, 0xa0, 0x55, - 0x18, 0xde, 0xe0, 0x1e, 0xde, 0x42, 0x2e, 0xf7, 0x44, 0xb6, 0xf3, 0x79, 0x87, 0x13, 0x38, 0x77, - 0xcb, 0x10, 0x00, 0x2c, 0x89, 0xb0, 0x98, 0xeb, 0xca, 0x53, 0x5d, 0x84, 0xee, 0x9a, 0x3b, 0x5a, - 0x74, 0x01, 0x7e, 0x3f, 0x27, 0xfe, 0xee, 0x58, 0xa3, 0x48, 0x57, 0xb5, 0x23, 0xd3, 0xb0, 0x8b, - 0x50, 0x2c, 0x99, 0xab, 0xba, 0x47, 0x86, 0x7a, 0xbe, 0xaa, 0x15, 0x12, 0x4e, 0x88, 0xa2, 0x6d, - 0x18, 0xdb, 0x8d, 0x5a, 0x5b, 0x44, 0x6e, 0x69, 0x16, 0x99, 0x25, 0xe7, 0x0a, 0xbb, 0x23, 0x10, - 0xbd, 0x30, 0x6e, 0x3b, 0xcd, 0x8e, 0x53, 0x88, 0xa9, 0xbf, 0xef, 0xe8, 0xc4, 0xb0, 0x49, 0x9b, - 0x0e, 0xff, 0xbb, 0xed, 0x60, 0x7d, 0x3f, 0x26, 0x22, 0xe2, 0x56, 0xe6, 0xf0, 0xbf, 0xc9, 0x51, - 0x3a, 0x87, 0x5f, 0x00, 0xb0, 0x24, 0x82, 0xee, 0x88, 0xe1, 0x61, 0xa7, 0xe7, 0x64, 0x7e, 0x58, - 0xcc, 0x79, 0x89, 0x94, 0x33, 0x28, 0xec, 0xb4, 0x4c, 0x48, 0xb1, 0x53, 0xb2, 0xb5, 0x15, 0xc4, - 0x81, 0x9f, 0x3a, 0xa1, 0xa7, 0xf2, 0x4f, 0xc9, 0x5a, 0x06, 0x7e, 0xe7, 0x29, 0x99, 0x85, 0x85, - 0x33, 0xdb, 0x42, 0x2e, 0x8c, 0xb7, 0x82, 0x30, 0xde, 0x0b, 0x42, 0xb9, 0xbe, 0x50, 0x17, 0xb9, - 0x82, 0x81, 0x29, 0x5a, 0x64, 0xc1, 0xec, 0x4c, 0x08, 0x4e, 0xd1, 0x44, 0x9f, 0x86, 0xe1, 0xa8, - 0xe1, 0x34, 0x49, 0xf5, 0xd6, 0xf4, 0xa9, 0xfc, 0xeb, 0xa7, 0xce, 0x51, 0x72, 0x56, 0x17, 0x0f, - 0xd0, 0xce, 0x51, 0xb0, 0x24, 0x87, 0x96, 0x61, 0x90, 0xe5, 0xd4, 0x62, 0xe1, 0xe1, 0x72, 0xa2, - 0x7b, 0x76, 0x18, 0x10, 0xf3, 0xb3, 0x89, 0x15, 0x63, 0x5e, 0x9d, 0xee, 0x01, 0xc1, 0x5e, 0x07, - 0xd1, 0xf4, 0x99, 0xfc, 0x3d, 0x20, 0xb8, 0xf2, 0x5b, 0xf5, 0x6e, 0x7b, 0x40, 0x21, 0xe1, 0x84, - 0x28, 0x3d, 0x99, 0xe9, 0x69, 0x7a, 0xb6, 0x8b, 0xe5, 0x4b, 0xee, 0x59, 0xca, 0x4e, 0x66, 0x7a, - 0x92, 0x52, 0x12, 0xf6, 0xef, 0x0e, 0x77, 0xf2, 0x2c, 0xec, 0x41, 0xf6, 0x5d, 0x56, 0x87, 0xae, - 0xee, 0x93, 0xfd, 0xca, 0x87, 0x8e, 0x91, 0x5b, 0xfd, 0x82, 0x05, 0x67, 0x5b, 0x99, 0x1f, 0x22, - 0x18, 0x80, 0xfe, 0xc4, 0x4c, 0xfc, 0xd3, 0x55, 0x28, 0xc1, 0x6c, 0x38, 0xce, 0x69, 0x29, 0xfd, - 0x22, 0x28, 0xbe, 0xef, 0x17, 0xc1, 0x0a, 0x94, 0x18, 0x93, 0xd9, 0x23, 0xc3, 0x70, 0xfa, 0x61, - 0xc4, 0x58, 0x89, 0x45, 0x51, 0x11, 0x2b, 0x12, 0xe8, 0x07, 0x2c, 0xb8, 0x90, 0xee, 0x3a, 0x26, - 0x0c, 0x2c, 0xe2, 0x0f, 0xf2, 0xb7, 0xe0, 0xb2, 0xf8, 0xfe, 0x0b, 0xb5, 0x6e, 0xc8, 0x87, 0xbd, - 0x10, 0x70, 0xf7, 0xc6, 0x50, 0x25, 0xe3, 0x31, 0x3a, 0x64, 0x0a, 0xe0, 0xfb, 0x78, 0x90, 0xbe, - 0x00, 0xa3, 0x3b, 0x41, 0xdb, 0x8f, 0x85, 0xa1, 0x8c, 0x50, 0xda, 0x33, 0x65, 0xf5, 0x8a, 0x56, - 0x8e, 0x0d, 0xac, 0xd4, 0x33, 0xb6, 0xf4, 0xc0, 0xcf, 0xd8, 0xb7, 0x61, 0xd4, 0xd7, 0x2c, 0x3b, - 0x05, 0x3f, 0x70, 0x39, 0x3f, 0x76, 0xa8, 0x6e, 0x07, 0xca, 0x7b, 0xa9, 0x97, 0x60, 0x83, 0xda, - 0xc9, 0xbe, 0x8d, 0x7e, 0xda, 0xca, 0x60, 0xea, 0xf9, 0x6b, 0xf9, 0x35, 0xf3, 0xb5, 0x7c, 0x39, - 0xfd, 0x5a, 0xee, 0x10, 0xbe, 0x1a, 0x0f, 0xe5, 0xfe, 0xf3, 0x9c, 0xf4, 0x1b, 0x26, 0xd0, 0x6e, - 0xc2, 0xa5, 0x5e, 0xd7, 0x12, 0xb3, 0x98, 0x72, 0x95, 0xaa, 0x2d, 0xb1, 0x98, 0x72, 0xab, 0x15, - 0xcc, 0x20, 0xfd, 0xc6, 0x91, 0xb1, 0xff, 0x9b, 0x05, 0xc5, 0x5a, 0xe0, 0x9e, 0x80, 0x30, 0xf9, - 0x53, 0x86, 0x30, 0xf9, 0xd1, 0xec, 0x0b, 0xd1, 0xcd, 0x15, 0x1d, 0x2f, 0xa5, 0x44, 0xc7, 0x17, - 0xf2, 0x08, 0x74, 0x17, 0x14, 0xff, 0x44, 0x11, 0x46, 0x6a, 0x81, 0xab, 0xcc, 0x95, 0x7f, 0xfd, - 0x41, 0xcc, 0x95, 0x73, 0x03, 0xfc, 0x6b, 0x94, 0x99, 0xa1, 0x95, 0xf4, 0xb1, 0xfc, 0x0b, 0x66, - 0xb5, 0x7c, 0x97, 0x78, 0x9b, 0x5b, 0x31, 0x71, 0xd3, 0x9f, 0x73, 0x72, 0x56, 0xcb, 0xff, 0xd5, - 0x82, 0x89, 0x54, 0xeb, 0xa8, 0x09, 0x63, 0x4d, 0x5d, 0x30, 0x29, 0xd6, 0xe9, 0x03, 0xc9, 0x34, - 0x85, 0xd5, 0xa7, 0x56, 0x84, 0x4d, 0xe2, 0x68, 0x0e, 0x40, 0x69, 0xea, 0xa4, 0x04, 0x8c, 0x71, - 0xfd, 0x4a, 0x95, 0x17, 0x61, 0x0d, 0x03, 0xbd, 0x08, 0x23, 0x71, 0xd0, 0x0a, 0x9a, 0xc1, 0xe6, - 0xfe, 0x0d, 0x22, 0x23, 0x17, 0x29, 0x5b, 0xae, 0xb5, 0x04, 0x84, 0x75, 0x3c, 0xfb, 0xa7, 0x8a, - 0xfc, 0x43, 0xfd, 0xd8, 0xfb, 0x70, 0x4d, 0x7e, 0xb0, 0xd7, 0xe4, 0x57, 0x2d, 0x98, 0xa4, 0xad, - 0x33, 0x73, 0x11, 0x79, 0xd9, 0xaa, 0x98, 0xc1, 0x56, 0x97, 0x98, 0xc1, 0x97, 0xe9, 0xd9, 0xe5, - 0x06, 0xed, 0x58, 0x48, 0xd0, 0xb4, 0xc3, 0x89, 0x96, 0x62, 0x01, 0x15, 0x78, 0x24, 0x0c, 0x85, - 0x8b, 0x9b, 0x8e, 0x47, 0xc2, 0x10, 0x0b, 0xa8, 0x0c, 0x29, 0x3c, 0x90, 0x1d, 0x52, 0x98, 0xc7, - 0x61, 0x14, 0x86, 0x05, 0x82, 0xed, 0xd1, 0xe2, 0x30, 0x4a, 0x8b, 0x83, 0x04, 0xc7, 0xfe, 0xf9, - 0x22, 0x8c, 0xd6, 0x02, 0x37, 0xd1, 0x95, 0xbd, 0x60, 0xe8, 0xca, 0x2e, 0xa5, 0x74, 0x65, 0x93, - 0x3a, 0xee, 0x87, 0x9a, 0xb1, 0xaf, 0x97, 0x66, 0xec, 0x9f, 0x58, 0x6c, 0xd6, 0x2a, 0xab, 0x75, - 0x6e, 0x7d, 0x84, 0x9e, 0x85, 0x11, 0x76, 0x20, 0x31, 0x9f, 0x4a, 0xa9, 0x40, 0x62, 0x29, 0x94, - 0x56, 0x93, 0x62, 0xac, 0xe3, 0xa0, 0x2b, 0x50, 0x8a, 0x88, 0x13, 0x36, 0xb6, 0xd4, 0x19, 0x27, - 0xb4, 0x3d, 0xbc, 0x0c, 0x2b, 0x28, 0x7a, 0x33, 0x09, 0x01, 0x58, 0xcc, 0xf7, 0xd1, 0xd2, 0xfb, - 0xc3, 0xb7, 0x48, 0x7e, 0xdc, 0x3f, 0xfb, 0x2e, 0xa0, 0x4e, 0xfc, 0x3e, 0x62, 0x5f, 0xcd, 0x9a, - 0xb1, 0xaf, 0xca, 0x1d, 0x71, 0xaf, 0xfe, 0xcc, 0x82, 0xf1, 0x5a, 0xe0, 0xd2, 0xad, 0xfb, 0x8d, - 0xb4, 0x4f, 0xf5, 0xf8, 0xa7, 0x43, 0x5d, 0xe2, 0x9f, 0x3e, 0x0e, 0x83, 0xb5, 0xc0, 0xad, 0xd6, - 0xba, 0xf9, 0x36, 0xdb, 0x7f, 0xdb, 0x82, 0xe1, 0x5a, 0xe0, 0x9e, 0x80, 0x70, 0xfe, 0x35, 0x53, - 0x38, 0xff, 0x48, 0xce, 0xba, 0xc9, 0x91, 0xc7, 0xff, 0xcd, 0x01, 0x18, 0xa3, 0xfd, 0x0c, 0x36, - 0xe5, 0x54, 0x1a, 0xc3, 0x66, 0xf5, 0x31, 0x6c, 0x94, 0x17, 0x0e, 0x9a, 0xcd, 0x60, 0x2f, 0x3d, - 0xad, 0xcb, 0xac, 0x14, 0x0b, 0x28, 0x7a, 0x1a, 0x4a, 0xad, 0x90, 0xec, 0x7a, 0x81, 0x60, 0x32, - 0x35, 0x55, 0x47, 0x4d, 0x94, 0x63, 0x85, 0x41, 0x1f, 0x67, 0x91, 0xe7, 0x37, 0x48, 0x9d, 0x34, - 0x02, 0xdf, 0xe5, 0xf2, 0xeb, 0xa2, 0x48, 0x1b, 0xa0, 0x95, 0x63, 0x03, 0x0b, 0xdd, 0x85, 0x32, - 0xfb, 0xcf, 0x8e, 0x9d, 0xa3, 0x67, 0x93, 0x14, 0xd9, 0xc5, 0x04, 0x01, 0x9c, 0xd0, 0x42, 0xcf, - 0x01, 0xc4, 0x32, 0x42, 0x76, 0x24, 0xe2, 0x1c, 0x29, 0x86, 0x5c, 0xc5, 0xce, 0x8e, 0xb0, 0x86, - 0x85, 0x9e, 0x82, 0x72, 0xec, 0x78, 0xcd, 0x9b, 0x9e, 0x4f, 0x22, 0x26, 0x97, 0x2e, 0xca, 0x24, - 0x5f, 0xa2, 0x10, 0x27, 0x70, 0xca, 0x10, 0xb1, 0x20, 0x00, 0x3c, 0x17, 0x6d, 0x89, 0x61, 0x33, - 0x86, 0xe8, 0xa6, 0x2a, 0xc5, 0x1a, 0x06, 0xda, 0x82, 0xf3, 0x9e, 0xcf, 0x42, 0xec, 0x93, 0xfa, - 0xb6, 0xd7, 0x5a, 0xbb, 0x59, 0xbf, 0x43, 0x42, 0x6f, 0x63, 0x7f, 0xc1, 0x69, 0x6c, 0x13, 0x5f, - 0xe6, 0x09, 0xfc, 0xa8, 0xe8, 0xe2, 0xf9, 0x6a, 0x17, 0x5c, 0xdc, 0x95, 0x92, 0xfd, 0x32, 0x9c, - 0xa9, 0x05, 0x6e, 0x2d, 0x08, 0xe3, 0xe5, 0x20, 0xdc, 0x73, 0x42, 0x57, 0xae, 0x94, 0x59, 0x99, - 0x85, 0x84, 0x1e, 0x85, 0x83, 0xfc, 0xa0, 0x30, 0x72, 0x61, 0x3d, 0xcf, 0x98, 0xaf, 0x23, 0x3a, - 0xa3, 0x34, 0x18, 0x1b, 0xa0, 0xf2, 0x4d, 0x5c, 0x73, 0x62, 0x82, 0x6e, 0xb1, 0xa4, 0xb8, 0xc9, - 0x8d, 0x28, 0xaa, 0x3f, 0xa9, 0x25, 0xc5, 0x4d, 0x80, 0x99, 0x57, 0xa8, 0x59, 0xdf, 0xfe, 0xd9, - 0x01, 0x76, 0x38, 0xa6, 0x72, 0x16, 0xa0, 0xcf, 0xc1, 0x78, 0x44, 0x6e, 0x7a, 0x7e, 0xfb, 0x9e, - 0x94, 0x09, 0x74, 0x71, 0x27, 0xaa, 0x2f, 0xe9, 0x98, 0x5c, 0xb2, 0x68, 0x96, 0xe1, 0x14, 0x35, - 0xb4, 0x03, 0xe3, 0x7b, 0x9e, 0xef, 0x06, 0x7b, 0x91, 0xa4, 0x5f, 0xca, 0x17, 0x30, 0xde, 0xe5, - 0x98, 0xa9, 0x3e, 0x1a, 0xcd, 0xdd, 0x35, 0x88, 0xe1, 0x14, 0x71, 0xba, 0x00, 0xc3, 0xb6, 0x3f, - 0x1f, 0xdd, 0x8e, 0x48, 0x28, 0xd2, 0x1b, 0xb3, 0x05, 0x88, 0x65, 0x21, 0x4e, 0xe0, 0x74, 0x01, - 0xb2, 0x3f, 0xd7, 0xc2, 0xa0, 0xcd, 0xe3, 0xd8, 0x8b, 0x05, 0x88, 0x55, 0x29, 0xd6, 0x30, 0xe8, - 0x06, 0x65, 0xff, 0x56, 0x03, 0x1f, 0x07, 0x41, 0x2c, 0xb7, 0x34, 0x4b, 0xa8, 0xa9, 0x95, 0x63, - 0x03, 0x0b, 0x2d, 0x03, 0x8a, 0xda, 0xad, 0x56, 0x93, 0xd9, 0x29, 0x38, 0x4d, 0x46, 0x8a, 0xeb, - 0x88, 0x8b, 0x3c, 0x4a, 0x67, 0xbd, 0x03, 0x8a, 0x33, 0x6a, 0xd0, 0xb3, 0x7a, 0x43, 0x74, 0x75, - 0x90, 0x75, 0x95, 0x2b, 0x23, 0xea, 0xbc, 0x9f, 0x12, 0x86, 0x96, 0x60, 0x38, 0xda, 0x8f, 0x1a, - 0xb1, 0x08, 0x37, 0x96, 0x93, 0x96, 0xa6, 0xce, 0x50, 0xb4, 0xac, 0x68, 0xbc, 0x0a, 0x96, 0x75, - 0xed, 0x6f, 0x67, 0xac, 0x00, 0x4b, 0x86, 0x1b, 0xb7, 0x43, 0x82, 0x76, 0x60, 0xac, 0xc5, 0x56, - 0x98, 0x08, 0xcc, 0x2e, 0x96, 0xc9, 0x0b, 0x7d, 0xbe, 0xe9, 0xf7, 0xe8, 0x09, 0xaa, 0x64, 0x6e, - 0xec, 0xb1, 0x54, 0xd3, 0xc9, 0x61, 0x93, 0xba, 0xfd, 0xd5, 0xb3, 0xec, 0x32, 0xa9, 0xf3, 0x87, - 0xfa, 0xb0, 0x30, 0xac, 0x16, 0xaf, 0x92, 0x99, 0x7c, 0x89, 0x51, 0xf2, 0x45, 0xc2, 0x38, 0x1b, - 0xcb, 0xba, 0xe8, 0xb3, 0x30, 0x4e, 0x99, 0x7c, 0x2d, 0x31, 0xc5, 0xe9, 0x7c, 0x07, 0xf8, 0x24, - 0x1f, 0x85, 0x96, 0xb4, 0x41, 0xaf, 0x8c, 0x53, 0xc4, 0xd0, 0x9b, 0xcc, 0x04, 0xc0, 0xcc, 0x79, - 0xd1, 0x83, 0xb4, 0xae, 0xed, 0x97, 0x64, 0x35, 0x22, 0x79, 0xf9, 0x34, 0xec, 0x87, 0x9b, 0x4f, - 0x03, 0xdd, 0x84, 0x31, 0x91, 0x11, 0x56, 0x08, 0x3a, 0x8b, 0x86, 0x20, 0x6b, 0x0c, 0xeb, 0xc0, - 0xc3, 0x74, 0x01, 0x36, 0x2b, 0xa3, 0x4d, 0xb8, 0xa0, 0x25, 0x75, 0xb9, 0x16, 0x3a, 0x4c, 0x1b, - 0xed, 0xb1, 0x93, 0x48, 0xbb, 0xe6, 0x1e, 0xbb, 0x7f, 0x30, 0x7b, 0x61, 0xad, 0x1b, 0x22, 0xee, - 0x4e, 0x07, 0xdd, 0x82, 0x33, 0xdc, 0x7d, 0xb3, 0x42, 0x1c, 0xb7, 0xe9, 0xf9, 0xea, 0x1e, 0xe5, - 0xbb, 0xe5, 0xdc, 0xfd, 0x83, 0xd9, 0x33, 0xf3, 0x59, 0x08, 0x38, 0xbb, 0x1e, 0x7a, 0x0d, 0xca, - 0xae, 0x1f, 0x89, 0x31, 0x18, 0x32, 0xf2, 0xe6, 0x94, 0x2b, 0xab, 0x75, 0xf5, 0xfd, 0xc9, 0x1f, - 0x9c, 0x54, 0x40, 0x9b, 0x5c, 0xd8, 0xa9, 0x64, 0x0b, 0xc3, 0x1d, 0x81, 0x67, 0xd2, 0x52, 0x2a, - 0xc3, 0x81, 0x8b, 0x4b, 0xf9, 0x95, 0x5d, 0xb3, 0xe1, 0xdb, 0x65, 0x10, 0x46, 0x6f, 0x00, 0xa2, - 0xcc, 0xb7, 0xd7, 0x20, 0xf3, 0x0d, 0x16, 0xf5, 0x9f, 0xc9, 0x86, 0x4b, 0xa6, 0x4b, 0x51, 0xbd, - 0x03, 0x03, 0x67, 0xd4, 0x42, 0xd7, 0xe9, 0x6d, 0xa0, 0x97, 0x0a, 0xfb, 0x6c, 0x95, 0xe5, 0xac, - 0x42, 0x5a, 0x21, 0x69, 0x38, 0x31, 0x71, 0x4d, 0x8a, 0x38, 0x55, 0x0f, 0xb9, 0x70, 0xde, 0x69, - 0xc7, 0x01, 0x93, 0x23, 0x9b, 0xa8, 0x6b, 0xc1, 0x36, 0xf1, 0x99, 0x0a, 0xa7, 0xb4, 0x70, 0x89, - 0x5e, 0xd4, 0xf3, 0x5d, 0xf0, 0x70, 0x57, 0x2a, 0x94, 0xc1, 0x52, 0x39, 0x4a, 0xc1, 0x8c, 0xa7, - 0x93, 0x91, 0xa7, 0xf4, 0x45, 0x18, 0xd9, 0x0a, 0xa2, 0x78, 0x95, 0xc4, 0x7b, 0x41, 0xb8, 0x2d, - 0xa2, 0x22, 0x26, 0x91, 0x74, 0x13, 0x10, 0xd6, 0xf1, 0xe8, 0x0b, 0x8a, 0x19, 0x18, 0x54, 0x2b, - 0x4c, 0xb7, 0x5b, 0x4a, 0xce, 0x98, 0xeb, 0xbc, 0x18, 0x4b, 0xb8, 0x44, 0xad, 0xd6, 0x16, 0x99, - 0x9e, 0x36, 0x85, 0x5a, 0xad, 0x2d, 0x62, 0x09, 0xa7, 0xcb, 0x35, 0xda, 0x72, 0x42, 0x52, 0x0b, - 0x83, 0x06, 0x89, 0xb4, 0xf8, 0xcd, 0x8f, 0xf2, 0x98, 0x8f, 0x74, 0xb9, 0xd6, 0xb3, 0x10, 0x70, - 0x76, 0x3d, 0x44, 0x3a, 0x13, 0x1a, 0x8d, 0xe7, 0x0b, 0xd8, 0x3b, 0x59, 0x81, 0x3e, 0x73, 0x1a, - 0xf9, 0x30, 0xa9, 0x52, 0x29, 0xf1, 0x28, 0x8f, 0xd1, 0xf4, 0x04, 0x5b, 0xdb, 0xfd, 0x87, 0x88, - 0x54, 0x2a, 0x8b, 0x6a, 0x8a, 0x12, 0xee, 0xa0, 0x6d, 0x84, 0x4c, 0x9a, 0xec, 0x99, 0xb4, 0xf6, - 0x2a, 0x94, 0xa3, 0xf6, 0xba, 0x1b, 0xec, 0x38, 0x9e, 0xcf, 0xf4, 0xb4, 0x1a, 0x2b, 0x5f, 0x97, - 0x00, 0x9c, 0xe0, 0xa0, 0x65, 0x28, 0x39, 0x52, 0x1f, 0x81, 0xf2, 0x23, 0x6d, 0x28, 0x2d, 0x04, - 0x77, 0x3e, 0x97, 0x1a, 0x08, 0x55, 0x17, 0xbd, 0x0a, 0x63, 0xc2, 0xfd, 0x50, 0x64, 0xf1, 0x3b, - 0x65, 0xfa, 0x88, 0xd4, 0x75, 0x20, 0x36, 0x71, 0xd1, 0x6d, 0x18, 0x89, 0x83, 0x26, 0x73, 0x74, - 0xa0, 0x1c, 0xd2, 0xd9, 0xfc, 0x68, 0x5d, 0x6b, 0x0a, 0x4d, 0x17, 0x05, 0xaa, 0xaa, 0x58, 0xa7, - 0x83, 0xd6, 0xf8, 0x7a, 0x67, 0x71, 0x8c, 0x49, 0x34, 0xfd, 0x48, 0xfe, 0x9d, 0xa4, 0xc2, 0x1d, - 0x9b, 0xdb, 0x41, 0xd4, 0xc4, 0x3a, 0x19, 0x74, 0x0d, 0xa6, 0x5a, 0xa1, 0x17, 0xb0, 0x35, 0xa1, - 0x54, 0x51, 0xd3, 0x66, 0xf6, 0x95, 0x5a, 0x1a, 0x01, 0x77, 0xd6, 0x61, 0xde, 0xa3, 0xa2, 0x70, - 0xfa, 0x1c, 0xcf, 0xda, 0xcb, 0x5f, 0x46, 0xbc, 0x0c, 0x2b, 0x28, 0x5a, 0x61, 0x27, 0x31, 0x7f, - 0xd4, 0x4f, 0xcf, 0xe4, 0x07, 0xf7, 0xd0, 0x1f, 0xff, 0x9c, 0xef, 0x53, 0x7f, 0x71, 0x42, 0x01, - 0xb9, 0x5a, 0x46, 0x38, 0xca, 0x6c, 0x47, 0xd3, 0xe7, 0xbb, 0x58, 0x79, 0xa5, 0x38, 0xf3, 0x84, - 0x21, 0x30, 0x8a, 0x23, 0x9c, 0xa2, 0x89, 0xbe, 0x05, 0x26, 0x45, 0x30, 0xb1, 0x64, 0x98, 0x2e, - 0x24, 0xe6, 0xa3, 0x38, 0x05, 0xc3, 0x1d, 0xd8, 0x3c, 0xbe, 0xbb, 0xb3, 0xde, 0x24, 0xe2, 0xe8, - 0xbb, 0xe9, 0xf9, 0xdb, 0xd1, 0xf4, 0x45, 0x76, 0x3e, 0x88, 0xf8, 0xee, 0x69, 0x28, 0xce, 0xa8, - 0x81, 0xd6, 0x60, 0xb2, 0x15, 0x12, 0xb2, 0xc3, 0x78, 0x64, 0x71, 0x9f, 0xcd, 0x72, 0xe7, 0x69, - 0xda, 0x93, 0x5a, 0x0a, 0x76, 0x98, 0x51, 0x86, 0x3b, 0x28, 0xa0, 0x3d, 0x28, 0x05, 0xbb, 0x24, - 0xdc, 0x22, 0x8e, 0x3b, 0x7d, 0xa9, 0x8b, 0x39, 0xb3, 0xb8, 0xdc, 0x6e, 0x09, 0xdc, 0x94, 0xfa, - 0x5a, 0x16, 0xf7, 0x56, 0x5f, 0xcb, 0xc6, 0xd0, 0x0f, 0x5a, 0x70, 0x4e, 0x4a, 0xbc, 0xeb, 0x2d, - 0x3a, 0xea, 0x8b, 0x81, 0x1f, 0xc5, 0x21, 0x77, 0xf7, 0x7d, 0x2c, 0xdf, 0x05, 0x76, 0x2d, 0xa7, - 0x92, 0x92, 0x2b, 0x9e, 0xcb, 0xc3, 0x88, 0x70, 0x7e, 0x8b, 0x33, 0xdf, 0x0c, 0x53, 0x1d, 0x37, - 0xf7, 0x51, 0x52, 0x4e, 0xcc, 0x6c, 0xc3, 0x98, 0x31, 0x3a, 0x0f, 0x55, 0x73, 0xf9, 0x2f, 0x87, - 0xa1, 0xac, 0xb4, 0x5a, 0xe8, 0xaa, 0xa9, 0xac, 0x3c, 0x97, 0x56, 0x56, 0x96, 0xe8, 0x6b, 0x56, - 0xd7, 0x4f, 0xae, 0x65, 0x04, 0x57, 0xca, 0xdb, 0x8b, 0xfd, 0x7b, 0xcd, 0x6a, 0x42, 0xca, 0x62, - 0xdf, 0x5a, 0xcf, 0x81, 0xae, 0x72, 0xcf, 0x6b, 0x30, 0xe5, 0x07, 0x8c, 0x5d, 0x24, 0xae, 0xe4, - 0x05, 0xd8, 0x95, 0x5f, 0xd6, 0xa3, 0x15, 0xa4, 0x10, 0x70, 0x67, 0x1d, 0xda, 0x20, 0xbf, 0xb3, - 0xd3, 0x82, 0x56, 0x7e, 0xa5, 0x63, 0x01, 0x45, 0x8f, 0xc3, 0x60, 0x2b, 0x70, 0xab, 0x35, 0xc1, - 0x2a, 0x6a, 0xe9, 0x47, 0xdd, 0x6a, 0x0d, 0x73, 0x18, 0x9a, 0x87, 0x21, 0xf6, 0x23, 0x9a, 0x1e, - 0xcd, 0x77, 0x4b, 0x67, 0x35, 0xb4, 0x84, 0x1e, 0xac, 0x02, 0x16, 0x15, 0x99, 0xc0, 0x87, 0xf2, - 0xd7, 0x4c, 0xe0, 0x33, 0xfc, 0x80, 0x02, 0x1f, 0x49, 0x00, 0x27, 0xb4, 0xd0, 0x3d, 0x38, 0x63, - 0xbc, 0x69, 0xf8, 0x12, 0x21, 0x91, 0x70, 0x8d, 0x7d, 0xbc, 0xeb, 0x63, 0x46, 0x68, 0x49, 0x2f, - 0x88, 0x4e, 0x9f, 0xa9, 0x66, 0x51, 0xc2, 0xd9, 0x0d, 0xa0, 0x26, 0x4c, 0x35, 0x3a, 0x5a, 0x2d, - 0xf5, 0xdf, 0xaa, 0x9a, 0xd0, 0xce, 0x16, 0x3b, 0x09, 0xa3, 0x57, 0xa1, 0xf4, 0x6e, 0x10, 0xb1, - 0x63, 0x56, 0xb0, 0xb7, 0xd2, 0xaf, 0xb2, 0xf4, 0xe6, 0xad, 0x3a, 0x2b, 0x3f, 0x3c, 0x98, 0x1d, - 0xa9, 0x05, 0xae, 0xfc, 0x8b, 0x55, 0x05, 0xf4, 0xbd, 0x16, 0xcc, 0x74, 0x3e, 0x9a, 0x54, 0xa7, - 0xc7, 0xfa, 0xef, 0xb4, 0x2d, 0x1a, 0x9d, 0x59, 0xca, 0x25, 0x87, 0xbb, 0x34, 0x65, 0x7f, 0x99, - 0x6b, 0x34, 0x85, 0xde, 0x83, 0x44, 0xed, 0xe6, 0x49, 0x24, 0x40, 0x5c, 0x32, 0x54, 0x32, 0x0f, - 0xac, 0x35, 0xff, 0x35, 0x8b, 0x69, 0xcd, 0xd7, 0xc8, 0x4e, 0xab, 0xe9, 0xc4, 0x27, 0xe1, 0x96, - 0xf7, 0x26, 0x94, 0x62, 0xd1, 0x5a, 0xb7, 0x9c, 0x8d, 0x5a, 0xa7, 0x98, 0xe5, 0x80, 0x62, 0x36, - 0x65, 0x29, 0x56, 0x64, 0xec, 0x7f, 0xc8, 0x67, 0x40, 0x42, 0x4e, 0x40, 0xf2, 0x5d, 0x31, 0x25, - 0xdf, 0xb3, 0x3d, 0xbe, 0x20, 0x47, 0x02, 0xfe, 0x0f, 0xcc, 0x7e, 0x33, 0x21, 0xcb, 0x07, 0xdd, - 0x5c, 0xc3, 0xfe, 0x61, 0x0b, 0x4e, 0x67, 0xd9, 0x37, 0xd2, 0x07, 0x02, 0x17, 0xf1, 0x28, 0xf3, - 0x15, 0x35, 0x82, 0x77, 0x44, 0x39, 0x56, 0x18, 0x7d, 0xa7, 0x43, 0x3a, 0x5a, 0x78, 0xd0, 0x5b, - 0x30, 0x56, 0x0b, 0x89, 0x76, 0xa1, 0xbd, 0xce, 0xfd, 0x6c, 0x79, 0x7f, 0x9e, 0x3e, 0xb2, 0x8f, - 0xad, 0xfd, 0x33, 0x05, 0x38, 0xcd, 0xf5, 0xcf, 0xf3, 0xbb, 0x81, 0xe7, 0xd6, 0x02, 0x57, 0xa4, - 0xb2, 0x7a, 0x0b, 0x46, 0x5b, 0x9a, 0x5c, 0xae, 0x5b, 0xa8, 0x3b, 0x5d, 0x7e, 0x97, 0x48, 0x12, - 0xf4, 0x52, 0x6c, 0xd0, 0x42, 0x2e, 0x8c, 0x92, 0x5d, 0xaf, 0xa1, 0x94, 0x98, 0x85, 0x23, 0x5f, - 0x2e, 0xaa, 0x95, 0x25, 0x8d, 0x0e, 0x36, 0xa8, 0x3e, 0x84, 0xec, 0xa6, 0xf6, 0x8f, 0x58, 0xf0, - 0x48, 0x4e, 0x60, 0x3c, 0xda, 0xdc, 0x1e, 0xd3, 0xf4, 0x8b, 0x44, 0x89, 0xaa, 0x39, 0xae, 0xff, - 0xc7, 0x02, 0x8a, 0x3e, 0x0d, 0xc0, 0xf5, 0xf7, 0xf4, 0x85, 0xda, 0x2b, 0x82, 0x98, 0x11, 0xfc, - 0x48, 0x8b, 0x63, 0x23, 0xeb, 0x63, 0x8d, 0x96, 0xfd, 0x93, 0x45, 0x18, 0xe4, 0x29, 0x9e, 0x97, - 0x61, 0x78, 0x8b, 0x07, 0xf8, 0xef, 0x27, 0x97, 0x40, 0x22, 0x3b, 0xe0, 0x05, 0x58, 0x56, 0x46, - 0x2b, 0x70, 0x8a, 0x27, 0x48, 0x68, 0x56, 0x48, 0xd3, 0xd9, 0x97, 0x82, 0x2e, 0x9e, 0x5c, 0x50, - 0x09, 0xfc, 0xaa, 0x9d, 0x28, 0x38, 0xab, 0x1e, 0x7a, 0x1d, 0xc6, 0xe9, 0xc3, 0x23, 0x68, 0xc7, - 0x92, 0x12, 0x4f, 0x8d, 0xa0, 0x5e, 0x3a, 0x6b, 0x06, 0x14, 0xa7, 0xb0, 0xe9, 0xdb, 0xb7, 0xd5, - 0x21, 0xd2, 0x1b, 0x4c, 0xde, 0xbe, 0xa6, 0x18, 0xcf, 0xc4, 0x65, 0x86, 0x8d, 0x6d, 0x66, 0xc6, - 0xb9, 0xb6, 0x15, 0x92, 0x68, 0x2b, 0x68, 0xba, 0x8c, 0xd1, 0x1a, 0xd4, 0x0c, 0x1b, 0x53, 0x70, - 0xdc, 0x51, 0x83, 0x52, 0xd9, 0x70, 0xbc, 0x66, 0x3b, 0x24, 0x09, 0x95, 0x21, 0x93, 0xca, 0x72, - 0x0a, 0x8e, 0x3b, 0x6a, 0xd0, 0x75, 0x74, 0xa6, 0x16, 0x06, 0xf4, 0xf0, 0x92, 0xd1, 0x3e, 0x94, - 0xb5, 0xea, 0xb0, 0x74, 0x4c, 0xec, 0x12, 0x17, 0x4b, 0xd8, 0xf3, 0x71, 0x0a, 0x86, 0xaa, 0xba, - 0x2e, 0x5c, 0x12, 0x25, 0x15, 0xf4, 0x2c, 0x8c, 0x88, 0xb0, 0xf7, 0xcc, 0xa8, 0x92, 0x4f, 0x1d, - 0x53, 0xad, 0x57, 0x92, 0x62, 0xac, 0xe3, 0xd8, 0xdf, 0x57, 0x80, 0x53, 0x19, 0x56, 0xf1, 0xfc, - 0xa8, 0xda, 0xf4, 0xa2, 0x58, 0x25, 0x50, 0xd3, 0x8e, 0x2a, 0x5e, 0x8e, 0x15, 0x06, 0xdd, 0x0f, - 0xfc, 0x30, 0x4c, 0x1f, 0x80, 0xc2, 0xea, 0x54, 0x40, 0x8f, 0x98, 0x8a, 0xec, 0x12, 0x0c, 0xb4, - 0x23, 0x22, 0x23, 0xda, 0xa9, 0xf3, 0x9b, 0x69, 0x5c, 0x18, 0x84, 0xb2, 0xc7, 0x9b, 0x4a, 0x79, - 0xa1, 0xb1, 0xc7, 0x5c, 0x7d, 0xc1, 0x61, 0xb4, 0x73, 0x31, 0xf1, 0x1d, 0x3f, 0x16, 0x4c, 0x74, - 0x12, 0x9a, 0x89, 0x95, 0x62, 0x01, 0xb5, 0xbf, 0x54, 0x84, 0x73, 0xb9, 0x7e, 0x32, 0xb4, 0xeb, - 0x3b, 0x81, 0xef, 0xc5, 0x81, 0xb2, 0x59, 0xe0, 0xe1, 0x98, 0x48, 0x6b, 0x6b, 0x45, 0x94, 0x63, - 0x85, 0x81, 0x2e, 0xc3, 0x20, 0x13, 0x3a, 0x75, 0xa4, 0x92, 0x5b, 0xa8, 0xf0, 0xf8, 0x1c, 0x1c, - 0xdc, 0x77, 0x9a, 0xce, 0xc7, 0x61, 0xa0, 0x15, 0x04, 0xcd, 0xf4, 0xa1, 0x45, 0xbb, 0x1b, 0x04, - 0x4d, 0xcc, 0x80, 0xe8, 0x63, 0x62, 0xbc, 0x52, 0x4a, 0x7a, 0xec, 0xb8, 0x41, 0xa4, 0x0d, 0xda, - 0x93, 0x30, 0xbc, 0x4d, 0xf6, 0x43, 0xcf, 0xdf, 0x4c, 0x1b, 0x6f, 0xdc, 0xe0, 0xc5, 0x58, 0xc2, - 0xcd, 0xac, 0x40, 0xc3, 0xc7, 0x9d, 0x5f, 0xb3, 0xd4, 0xf3, 0x0a, 0xfc, 0xfe, 0x22, 0x4c, 0xe0, - 0x85, 0xca, 0x87, 0x13, 0x71, 0xbb, 0x73, 0x22, 0x8e, 0x3b, 0xbf, 0x66, 0xef, 0xd9, 0xf8, 0x45, - 0x0b, 0x26, 0x58, 0xf0, 0x7d, 0x11, 0xc8, 0xc7, 0x0b, 0xfc, 0x13, 0x60, 0xf1, 0x1e, 0x87, 0xc1, - 0x90, 0x36, 0x9a, 0xce, 0x21, 0xc7, 0x7a, 0x82, 0x39, 0x0c, 0x9d, 0x87, 0x01, 0xd6, 0x05, 0x3a, - 0x79, 0xa3, 0x3c, 0xfd, 0x4e, 0xc5, 0x89, 0x1d, 0xcc, 0x4a, 0x59, 0x74, 0x0a, 0x4c, 0x5a, 0x4d, - 0x8f, 0x77, 0x3a, 0x51, 0x09, 0x7e, 0x30, 0xa2, 0x53, 0x64, 0x76, 0xed, 0xfd, 0x45, 0xa7, 0xc8, - 0x26, 0xd9, 0xfd, 0xf9, 0xf4, 0x87, 0x05, 0xb8, 0x98, 0x59, 0xaf, 0xef, 0xe8, 0x14, 0xdd, 0x6b, - 0x3f, 0xcc, 0x20, 0xed, 0xc5, 0x13, 0x34, 0x8d, 0x1b, 0xe8, 0x97, 0xc3, 0x1c, 0xec, 0x23, 0x68, - 0x44, 0xe6, 0x90, 0x7d, 0x40, 0x82, 0x46, 0x64, 0xf6, 0x2d, 0xe7, 0xf9, 0xf7, 0xe7, 0x85, 0x9c, - 0x6f, 0x61, 0x0f, 0xc1, 0x2b, 0xf4, 0x9c, 0x61, 0xc0, 0x48, 0x70, 0xcc, 0xa3, 0xfc, 0x8c, 0xe1, - 0x65, 0x58, 0x41, 0xd1, 0x3c, 0x4c, 0xec, 0x78, 0x3e, 0x3d, 0x7c, 0xf6, 0x4d, 0xc6, 0x4f, 0xc5, - 0xf4, 0x59, 0x31, 0xc1, 0x38, 0x8d, 0x8f, 0x3c, 0x2d, 0xa0, 0x44, 0x21, 0x3f, 0x2b, 0x73, 0x6e, - 0x6f, 0xe7, 0x4c, 0x75, 0xa9, 0x1a, 0xc5, 0x8c, 0xe0, 0x12, 0x2b, 0xda, 0xfb, 0xbf, 0xd8, 0xff, - 0xfb, 0x7f, 0x34, 0xfb, 0xed, 0x3f, 0xf3, 0x2a, 0x8c, 0x3d, 0xb0, 0xc0, 0xd7, 0xfe, 0x6a, 0x11, - 0x1e, 0xed, 0xb2, 0xed, 0xf9, 0x59, 0x6f, 0xcc, 0x81, 0x76, 0xd6, 0x77, 0xcc, 0x43, 0x0d, 0x4e, - 0x6f, 0xb4, 0x9b, 0xcd, 0x7d, 0x66, 0x7d, 0x4e, 0x5c, 0x89, 0x21, 0x78, 0xca, 0xf3, 0x32, 0xe1, - 0xd1, 0x72, 0x06, 0x0e, 0xce, 0xac, 0x49, 0x19, 0x7a, 0x7a, 0x93, 0xec, 0x2b, 0x52, 0x29, 0x86, - 0x1e, 0xeb, 0x40, 0x6c, 0xe2, 0xa2, 0x6b, 0x30, 0xe5, 0xec, 0x3a, 0x1e, 0x8f, 0xca, 0x29, 0x09, - 0x70, 0x8e, 0x5e, 0xc9, 0xe9, 0xe6, 0xd3, 0x08, 0xb8, 0xb3, 0x0e, 0x7a, 0x03, 0x50, 0x20, 0xb2, - 0xca, 0x5f, 0x23, 0xbe, 0xd0, 0x6a, 0xb1, 0xb9, 0x2b, 0x26, 0x47, 0xc2, 0xad, 0x0e, 0x0c, 0x9c, - 0x51, 0x2b, 0x15, 0xa0, 0x61, 0x28, 0x3f, 0x40, 0x43, 0xf7, 0x73, 0xb1, 0x67, 0x7e, 0x80, 0xff, - 0x64, 0xd1, 0xeb, 0x8b, 0x33, 0xf9, 0x66, 0x9c, 0xb1, 0x57, 0x99, 0x41, 0x17, 0x97, 0xe1, 0x69, - 0xb1, 0x12, 0xce, 0x68, 0x06, 0x5d, 0x09, 0x10, 0x9b, 0xb8, 0x7c, 0x41, 0x44, 0x89, 0x8b, 0x9e, - 0xc1, 0xe2, 0x8b, 0x60, 0x28, 0x0a, 0x03, 0x7d, 0x06, 0x86, 0x5d, 0x6f, 0xd7, 0x8b, 0x82, 0x50, - 0xac, 0xf4, 0x23, 0xaa, 0x0b, 0x92, 0x73, 0xb0, 0xc2, 0xc9, 0x60, 0x49, 0xcf, 0xfe, 0xfe, 0x02, - 0x8c, 0xc9, 0x16, 0xdf, 0x6c, 0x07, 0xb1, 0x73, 0x02, 0xd7, 0xf2, 0x35, 0xe3, 0x5a, 0xfe, 0x58, - 0xb7, 0x88, 0x30, 0xac, 0x4b, 0xb9, 0xd7, 0xf1, 0xad, 0xd4, 0x75, 0xfc, 0x44, 0x6f, 0x52, 0xdd, - 0xaf, 0xe1, 0x7f, 0x64, 0xc1, 0x94, 0x81, 0x7f, 0x02, 0xb7, 0xc1, 0xb2, 0x79, 0x1b, 0x3c, 0xd6, - 0xf3, 0x1b, 0x72, 0x6e, 0x81, 0xef, 0x2e, 0xa6, 0xfa, 0xce, 0x4e, 0xff, 0x77, 0x61, 0x60, 0xcb, - 0x09, 0xdd, 0x6e, 0x11, 0xb0, 0x3b, 0x2a, 0xcd, 0x5d, 0x77, 0x42, 0xa1, 0xd6, 0x7b, 0x5a, 0x25, - 0x45, 0x76, 0xc2, 0xde, 0x2a, 0x3d, 0xd6, 0x14, 0x7a, 0x19, 0x86, 0xa2, 0x46, 0xd0, 0x52, 0xf6, - 0xe2, 0x97, 0x78, 0xc2, 0x64, 0x5a, 0x72, 0x78, 0x30, 0x8b, 0xcc, 0xe6, 0x68, 0x31, 0x16, 0xf8, - 0xe8, 0x2d, 0x18, 0x63, 0xbf, 0x94, 0x8d, 0x4d, 0x31, 0x3f, 0x5b, 0x4e, 0x5d, 0x47, 0xe4, 0x06, - 0x68, 0x46, 0x11, 0x36, 0x49, 0xcd, 0x6c, 0x42, 0x59, 0x7d, 0xd6, 0x43, 0xd5, 0xc7, 0xfd, 0xdb, - 0x22, 0x9c, 0xca, 0x58, 0x73, 0x28, 0x32, 0x66, 0xe2, 0xd9, 0x3e, 0x97, 0xea, 0xfb, 0x9c, 0x8b, - 0x88, 0xbd, 0x86, 0x5c, 0xb1, 0xb6, 0xfa, 0x6e, 0xf4, 0x76, 0x44, 0xd2, 0x8d, 0xd2, 0xa2, 0xde, - 0x8d, 0xd2, 0xc6, 0x4e, 0x6c, 0xa8, 0x69, 0x43, 0xaa, 0xa7, 0x0f, 0x75, 0x4e, 0xff, 0xa4, 0x08, - 0xa7, 0xb3, 0x82, 0x54, 0xa1, 0x6f, 0x4b, 0x65, 0x4e, 0x7b, 0xa1, 0xdf, 0xf0, 0x56, 0x3c, 0x9d, - 0x1a, 0x97, 0x01, 0x2f, 0xcc, 0x99, 0xb9, 0xd4, 0x7a, 0x0e, 0xb3, 0x68, 0x93, 0xb9, 0x9f, 0x87, - 0x3c, 0xe3, 0x9d, 0x3c, 0x3e, 0x3e, 0xd9, 0x77, 0x07, 0x44, 0xaa, 0xbc, 0x28, 0xa5, 0xbf, 0x97, - 0xc5, 0xbd, 0xf5, 0xf7, 0xb2, 0xe5, 0x19, 0x0f, 0x46, 0xb4, 0xaf, 0x79, 0xa8, 0x33, 0xbe, 0x4d, - 0x6f, 0x2b, 0xad, 0xdf, 0x0f, 0x75, 0xd6, 0x7f, 0xc4, 0x82, 0x94, 0x35, 0xb4, 0x12, 0x8b, 0x59, - 0xb9, 0x62, 0xb1, 0x4b, 0x30, 0x10, 0x06, 0x4d, 0x92, 0x4e, 0x54, 0x86, 0x83, 0x26, 0xc1, 0x0c, - 0x42, 0x31, 0xe2, 0x44, 0xd8, 0x31, 0xaa, 0x3f, 0xe4, 0xc4, 0x13, 0xed, 0x71, 0x18, 0x6c, 0x92, - 0x5d, 0xd2, 0x4c, 0xe7, 0x93, 0xb8, 0x49, 0x0b, 0x31, 0x87, 0xd9, 0xbf, 0x38, 0x00, 0x17, 0xba, - 0x06, 0x70, 0xa0, 0xcf, 0xa1, 0x4d, 0x27, 0x26, 0x7b, 0xce, 0x7e, 0x3a, 0xf0, 0xfb, 0x35, 0x5e, - 0x8c, 0x25, 0x9c, 0xf9, 0xab, 0xf0, 0xf8, 0xad, 0x29, 0x21, 0xa2, 0x08, 0xdb, 0x2a, 0xa0, 0xa6, - 0x50, 0xaa, 0x78, 0x1c, 0x42, 0xa9, 0xe7, 0x00, 0xa2, 0xa8, 0xc9, 0x0d, 0x5f, 0x5c, 0xe1, 0x08, - 0x93, 0xc4, 0xf9, 0xad, 0xdf, 0x14, 0x10, 0xac, 0x61, 0xa1, 0x0a, 0x4c, 0xb6, 0xc2, 0x20, 0xe6, - 0x32, 0xd9, 0x0a, 0xb7, 0x0d, 0x1b, 0x34, 0x7d, 0xe7, 0x6b, 0x29, 0x38, 0xee, 0xa8, 0x81, 0x5e, - 0x84, 0x11, 0xe1, 0x4f, 0x5f, 0x0b, 0x82, 0xa6, 0x10, 0x03, 0x29, 0x73, 0xa9, 0x7a, 0x02, 0xc2, - 0x3a, 0x9e, 0x56, 0x8d, 0x09, 0x7a, 0x87, 0x33, 0xab, 0x71, 0x61, 0xaf, 0x86, 0x97, 0x0a, 0x58, - 0x57, 0xea, 0x2b, 0x60, 0x5d, 0x22, 0x18, 0x2b, 0xf7, 0xad, 0xdb, 0x82, 0x9e, 0xa2, 0xa4, 0x9f, - 0x1b, 0x80, 0x53, 0x62, 0xe1, 0x3c, 0xec, 0xe5, 0x72, 0xbb, 0x73, 0xb9, 0x1c, 0x87, 0xe8, 0xec, - 0xc3, 0x35, 0x73, 0xd2, 0x6b, 0xe6, 0x07, 0x2c, 0x30, 0xd9, 0x2b, 0xf4, 0x7f, 0xe7, 0x66, 0xce, - 0x78, 0x31, 0x97, 0x5d, 0x73, 0xe5, 0x05, 0xf2, 0x3e, 0x73, 0x68, 0xd8, 0xff, 0xc1, 0x82, 0xc7, - 0x7a, 0x52, 0x44, 0x4b, 0x50, 0x66, 0x3c, 0xa0, 0xf6, 0x3a, 0x7b, 0x42, 0xd9, 0x8e, 0x4a, 0x40, - 0x0e, 0x4b, 0x9a, 0xd4, 0x44, 0x4b, 0x1d, 0x29, 0x4a, 0x9e, 0xcc, 0x48, 0x51, 0x72, 0xc6, 0x18, - 0x9e, 0x07, 0xcc, 0x51, 0xf2, 0xe5, 0x22, 0x0c, 0xf1, 0x15, 0x7f, 0x02, 0xcf, 0xb0, 0x65, 0x21, - 0xb7, 0xed, 0x12, 0x11, 0x8f, 0xf7, 0x65, 0xae, 0xe2, 0xc4, 0x0e, 0x67, 0x13, 0xd4, 0x6d, 0x95, - 0x48, 0x78, 0xd1, 0xe7, 0x00, 0xa2, 0x38, 0xf4, 0xfc, 0x4d, 0x5a, 0x26, 0x62, 0x25, 0x7e, 0xbc, - 0x0b, 0xb5, 0xba, 0x42, 0xe6, 0x34, 0x93, 0x9d, 0xab, 0x00, 0x58, 0xa3, 0x88, 0xe6, 0x8c, 0xfb, - 0x72, 0x26, 0x25, 0xf8, 0x04, 0x4e, 0x35, 0xb9, 0x3d, 0x67, 0x5e, 0x82, 0xb2, 0x22, 0xde, 0x4b, - 0x8a, 0x33, 0xaa, 0x33, 0x17, 0x9f, 0x82, 0x89, 0x54, 0xdf, 0x8e, 0x24, 0x04, 0xfa, 0x25, 0x0b, - 0x26, 0x78, 0x67, 0x96, 0xfc, 0x5d, 0x71, 0xa6, 0xbe, 0x07, 0xa7, 0x9b, 0x19, 0x67, 0x9b, 0x98, - 0xd1, 0xfe, 0xcf, 0x42, 0x25, 0xf4, 0xc9, 0x82, 0xe2, 0xcc, 0x36, 0xd0, 0x15, 0xba, 0x6e, 0xe9, - 0xd9, 0xe5, 0x34, 0x85, 0x5b, 0xe3, 0x28, 0x5f, 0xb3, 0xbc, 0x0c, 0x2b, 0xa8, 0xfd, 0xdb, 0x16, - 0x4c, 0xf1, 0x9e, 0xdf, 0x20, 0xfb, 0x6a, 0x87, 0x7f, 0x3d, 0xfb, 0x2e, 0xb2, 0x06, 0x15, 0x72, - 0xb2, 0x06, 0xe9, 0x9f, 0x56, 0xec, 0xfa, 0x69, 0x3f, 0x63, 0x81, 0x58, 0x21, 0x27, 0xf0, 0x94, - 0xff, 0x66, 0xf3, 0x29, 0x3f, 0x93, 0xbf, 0x09, 0x72, 0xde, 0xf0, 0x7f, 0x66, 0xc1, 0x24, 0x47, - 0x48, 0x74, 0xce, 0x5f, 0xd7, 0x79, 0xe8, 0x27, 0xb7, 0xe8, 0x0d, 0xb2, 0xbf, 0x16, 0xd4, 0x9c, - 0x78, 0x2b, 0xfb, 0xa3, 0x8c, 0xc9, 0x1a, 0xe8, 0x3a, 0x59, 0xae, 0xdc, 0x40, 0x47, 0x48, 0x58, - 0x7c, 0xe4, 0xa0, 0xfa, 0xf6, 0xd7, 0x2c, 0x40, 0xbc, 0x19, 0x83, 0xfd, 0xa1, 0x4c, 0x05, 0x2b, - 0xd5, 0xae, 0x8b, 0xe4, 0x68, 0x52, 0x10, 0xac, 0x61, 0x1d, 0xcb, 0xf0, 0xa4, 0x0c, 0x07, 0x8a, - 0xbd, 0x0d, 0x07, 0x8e, 0x30, 0xa2, 0x7f, 0x30, 0x08, 0x69, 0x0f, 0x10, 0x74, 0x07, 0x46, 0x1b, - 0x4e, 0xcb, 0x59, 0xf7, 0x9a, 0x5e, 0xec, 0x91, 0xa8, 0x9b, 0xc5, 0xd1, 0xa2, 0x86, 0x27, 0x54, - 0xbd, 0x5a, 0x09, 0x36, 0xe8, 0xa0, 0x39, 0x80, 0x56, 0xe8, 0xed, 0x7a, 0x4d, 0xb2, 0xc9, 0x24, - 0x0e, 0xcc, 0x91, 0x9a, 0x9b, 0xd1, 0xc8, 0x52, 0xac, 0x61, 0x64, 0x78, 0xaa, 0x16, 0x1f, 0xb2, - 0xa7, 0x2a, 0x9c, 0x98, 0xa7, 0xea, 0xc0, 0x91, 0x3c, 0x55, 0x4b, 0x47, 0xf6, 0x54, 0x1d, 0xec, - 0xcb, 0x53, 0x15, 0xc3, 0x59, 0xc9, 0xc1, 0xd1, 0xff, 0xcb, 0x5e, 0x93, 0x08, 0xb6, 0x9d, 0x7b, - 0x7f, 0xcf, 0xdc, 0x3f, 0x98, 0x3d, 0x8b, 0x33, 0x31, 0x70, 0x4e, 0x4d, 0xf4, 0x69, 0x98, 0x76, - 0x9a, 0xcd, 0x60, 0x4f, 0x4d, 0xea, 0x52, 0xd4, 0x70, 0x9a, 0x5c, 0x94, 0x3f, 0xcc, 0xa8, 0x9e, - 0xbf, 0x7f, 0x30, 0x3b, 0x3d, 0x9f, 0x83, 0x83, 0x73, 0x6b, 0xa3, 0xd7, 0xa0, 0xdc, 0x0a, 0x83, - 0xc6, 0x8a, 0xe6, 0xa6, 0x76, 0x91, 0x0e, 0x60, 0x4d, 0x16, 0x1e, 0x1e, 0xcc, 0x8e, 0xa9, 0x3f, - 0xec, 0xc2, 0x4f, 0x2a, 0xd8, 0xdb, 0x70, 0xaa, 0x4e, 0x42, 0x8f, 0xa5, 0x1f, 0x76, 0x93, 0xf3, - 0x63, 0x0d, 0xca, 0x61, 0xea, 0xc4, 0xec, 0x2b, 0x8a, 0x9c, 0x16, 0x7d, 0x5c, 0x9e, 0x90, 0x09, - 0x21, 0xfb, 0x7f, 0x5a, 0x30, 0x2c, 0x3c, 0x32, 0x4e, 0x80, 0x51, 0x9b, 0x37, 0xe4, 0xe5, 0xb3, - 0xd9, 0xb7, 0x0a, 0xeb, 0x4c, 0xae, 0xa4, 0xbc, 0x9a, 0x92, 0x94, 0x3f, 0xd6, 0x8d, 0x48, 0x77, - 0x19, 0xf9, 0x5f, 0x2b, 0xc2, 0xb8, 0xe9, 0xba, 0x77, 0x02, 0x43, 0xb0, 0x0a, 0xc3, 0x91, 0xf0, - 0x4d, 0x2b, 0xe4, 0x5b, 0x64, 0xa7, 0x27, 0x31, 0xb1, 0xd6, 0x12, 0xde, 0x68, 0x92, 0x48, 0xa6, - 0xd3, 0x5b, 0xf1, 0x21, 0x3a, 0xbd, 0xf5, 0xf2, 0x9e, 0x1c, 0x38, 0x0e, 0xef, 0x49, 0xfb, 0x2b, - 0xec, 0x66, 0xd3, 0xcb, 0x4f, 0x80, 0xe9, 0xb9, 0x66, 0xde, 0x81, 0x76, 0x97, 0x95, 0x25, 0x3a, - 0x95, 0xc3, 0xfc, 0xfc, 0x82, 0x05, 0x17, 0x32, 0xbe, 0x4a, 0xe3, 0x84, 0x9e, 0x86, 0x92, 0xd3, - 0x76, 0x3d, 0xb5, 0x97, 0x35, 0xad, 0xd9, 0xbc, 0x28, 0xc7, 0x0a, 0x03, 0x2d, 0xc2, 0x14, 0xb9, - 0xd7, 0xf2, 0xb8, 0xc2, 0x50, 0x37, 0xa9, 0x2c, 0xf2, 0xc8, 0xda, 0x4b, 0x69, 0x20, 0xee, 0xc4, - 0x57, 0xc1, 0x1e, 0x8a, 0xb9, 0xc1, 0x1e, 0xfe, 0xae, 0x05, 0x23, 0xca, 0x3b, 0xeb, 0xa1, 0x8f, - 0xf6, 0xb7, 0x98, 0xa3, 0xfd, 0x68, 0x97, 0xd1, 0xce, 0x19, 0xe6, 0xbf, 0x51, 0x50, 0xfd, 0xad, - 0x05, 0x61, 0xdc, 0x07, 0x87, 0xf5, 0x32, 0x94, 0x5a, 0x61, 0x10, 0x07, 0x8d, 0xa0, 0x29, 0x18, - 0xac, 0xf3, 0x49, 0xd4, 0x13, 0x5e, 0x7e, 0xa8, 0xfd, 0xc6, 0x0a, 0x9b, 0x8d, 0x5e, 0x10, 0xc6, - 0x82, 0xa9, 0x49, 0x46, 0x2f, 0x08, 0x63, 0xcc, 0x20, 0xc8, 0x05, 0x88, 0x9d, 0x70, 0x93, 0xc4, - 0xb4, 0x4c, 0x44, 0x59, 0xca, 0x3f, 0x3c, 0xda, 0xb1, 0xd7, 0x9c, 0xf3, 0xfc, 0x38, 0x8a, 0xc3, - 0xb9, 0xaa, 0x1f, 0xdf, 0x0a, 0xf9, 0x7b, 0x4d, 0x0b, 0x63, 0xa2, 0x68, 0x61, 0x8d, 0xae, 0x74, - 0x2b, 0x66, 0x6d, 0x0c, 0x9a, 0xfa, 0xf7, 0x55, 0x51, 0x8e, 0x15, 0x86, 0xfd, 0x12, 0xbb, 0x4a, - 0xd8, 0x00, 0x1d, 0x2d, 0xee, 0xc7, 0x97, 0xcb, 0x6a, 0x68, 0x99, 0xf2, 0xad, 0xa2, 0x47, 0x17, - 0xe9, 0x7e, 0x72, 0xd3, 0x86, 0x75, 0x17, 0xa3, 0x24, 0x04, 0x09, 0xfa, 0xd6, 0x0e, 0x9b, 0x8a, - 0x67, 0x7a, 0x5c, 0x01, 0x47, 0xb0, 0xa2, 0x60, 0xd1, 0xfe, 0x59, 0x2c, 0xf4, 0x6a, 0x4d, 0x2c, - 0x72, 0x2d, 0xda, 0xbf, 0x00, 0xe0, 0x04, 0x07, 0x5d, 0x15, 0xaf, 0x71, 0x2e, 0x9a, 0x7e, 0x34, - 0xf5, 0x1a, 0x97, 0x9f, 0xaf, 0x09, 0xb3, 0x9f, 0x85, 0x11, 0x95, 0xeb, 0xb2, 0xc6, 0x53, 0x28, - 0x8a, 0x98, 0x53, 0x4b, 0x49, 0x31, 0xd6, 0x71, 0xd0, 0x1a, 0x4c, 0x44, 0x5c, 0xd4, 0xa3, 0x42, - 0x8b, 0x72, 0x91, 0xd9, 0xc7, 0xa5, 0x21, 0x4a, 0xdd, 0x04, 0x1f, 0xb2, 0x22, 0x7e, 0x74, 0x48, - 0x57, 0xde, 0x34, 0x09, 0xf4, 0x3a, 0x8c, 0x37, 0x03, 0xc7, 0x5d, 0x70, 0x9a, 0x8e, 0xdf, 0x60, - 0xdf, 0x5b, 0x32, 0x53, 0xa6, 0xdd, 0x34, 0xa0, 0x38, 0x85, 0x4d, 0x39, 0x1f, 0xbd, 0x44, 0x84, - 0xc3, 0x75, 0xfc, 0x4d, 0x12, 0x89, 0xcc, 0x85, 0x8c, 0xf3, 0xb9, 0x99, 0x83, 0x83, 0x73, 0x6b, - 0xa3, 0x97, 0x61, 0x54, 0x7e, 0xbe, 0xe6, 0xf9, 0x9e, 0xd8, 0xde, 0x6b, 0x30, 0x6c, 0x60, 0xa2, - 0x3d, 0x38, 0x23, 0xff, 0xaf, 0x85, 0xce, 0xc6, 0x86, 0xd7, 0x10, 0xee, 0xa0, 0xdc, 0x31, 0x6e, - 0x5e, 0x7a, 0x6f, 0x2d, 0x65, 0x21, 0x1d, 0x1e, 0xcc, 0x5e, 0x12, 0xa3, 0x96, 0x09, 0x67, 0x93, - 0x98, 0x4d, 0x1f, 0xad, 0xc0, 0xa9, 0x2d, 0xe2, 0x34, 0xe3, 0xad, 0xc5, 0x2d, 0xd2, 0xd8, 0x96, - 0x9b, 0x88, 0xf9, 0xd3, 0x6b, 0x16, 0xeb, 0xd7, 0x3b, 0x51, 0x70, 0x56, 0x3d, 0xf4, 0x36, 0x4c, - 0xb7, 0xda, 0xeb, 0x4d, 0x2f, 0xda, 0x5a, 0x0d, 0x62, 0x66, 0x8d, 0xa2, 0x52, 0x67, 0x0a, 0xc7, - 0x7b, 0x15, 0xb1, 0xa0, 0x96, 0x83, 0x87, 0x73, 0x29, 0xa0, 0xf7, 0xe0, 0x4c, 0x6a, 0x31, 0x08, - 0xd7, 0xe3, 0xf1, 0xfc, 0xe0, 0xe2, 0xf5, 0xac, 0x0a, 0xc2, 0x8b, 0x3f, 0x0b, 0x84, 0xb3, 0x9b, - 0x40, 0x2f, 0x40, 0xc9, 0x6b, 0x2d, 0x3b, 0x3b, 0x5e, 0x73, 0x9f, 0x45, 0x47, 0x2f, 0xb3, 0x88, - 0xe1, 0xa5, 0x6a, 0x8d, 0x97, 0x1d, 0x6a, 0xbf, 0xb1, 0xc2, 0xa4, 0xfc, 0xbe, 0x16, 0x03, 0x32, - 0x9a, 0x9e, 0x4c, 0x8c, 0x6d, 0xb5, 0x40, 0x91, 0x11, 0x36, 0xb0, 0xde, 0x9f, 0x0d, 0xd3, 0xbb, - 0xb4, 0xb2, 0xc6, 0x00, 0xa2, 0xcf, 0xc3, 0xa8, 0xbe, 0x62, 0xc5, 0x65, 0x76, 0x39, 0x9b, 0x3f, - 0xd2, 0x56, 0x36, 0x67, 0x1f, 0xd5, 0xea, 0xd5, 0x61, 0xd8, 0xa0, 0x68, 0x13, 0xc8, 0x1e, 0x4b, - 0x74, 0x13, 0x4a, 0x8d, 0xa6, 0x47, 0xfc, 0xb8, 0x5a, 0xeb, 0x16, 0xbe, 0x68, 0x51, 0xe0, 0x88, - 0xc9, 0x11, 0x91, 0x9f, 0x79, 0x19, 0x56, 0x14, 0xec, 0x5f, 0x2d, 0xc0, 0x6c, 0x8f, 0x30, 0xe2, - 0x29, 0x51, 0xbb, 0xd5, 0x97, 0xa8, 0x7d, 0x5e, 0x26, 0x1d, 0x5d, 0x4d, 0xc9, 0x1f, 0x52, 0x09, - 0x45, 0x13, 0x29, 0x44, 0x1a, 0xbf, 0x6f, 0xd3, 0x67, 0x5d, 0x5a, 0x3f, 0xd0, 0xd3, 0x78, 0xdf, - 0xd0, 0xd2, 0x0d, 0xf6, 0xff, 0xe8, 0xc9, 0xd5, 0xb8, 0xd8, 0x5f, 0x29, 0xc0, 0x19, 0x35, 0x84, - 0xdf, 0xb8, 0x03, 0x77, 0xbb, 0x73, 0xe0, 0x8e, 0x41, 0x5f, 0x65, 0xdf, 0x82, 0x21, 0x1e, 0x8f, - 0xa9, 0x0f, 0x66, 0xeb, 0x71, 0x33, 0x74, 0xa1, 0x62, 0x09, 0x8c, 0xf0, 0x85, 0xdf, 0x6b, 0xc1, - 0xc4, 0xda, 0x62, 0xad, 0x1e, 0x34, 0xb6, 0x49, 0x3c, 0xcf, 0x99, 0x63, 0x2c, 0x78, 0x2d, 0xeb, - 0x01, 0x79, 0xa8, 0x2c, 0xee, 0xec, 0x12, 0x0c, 0x6c, 0x05, 0x51, 0x9c, 0x56, 0x66, 0x5f, 0x0f, - 0xa2, 0x18, 0x33, 0x88, 0xfd, 0x3b, 0x16, 0x0c, 0xb2, 0x34, 0xdb, 0xbd, 0x12, 0xbd, 0xf7, 0xf3, - 0x5d, 0xe8, 0x45, 0x18, 0x22, 0x1b, 0x1b, 0xa4, 0x11, 0x8b, 0x59, 0x95, 0xde, 0xc7, 0x43, 0x4b, - 0xac, 0x94, 0x32, 0x18, 0xac, 0x31, 0xfe, 0x17, 0x0b, 0x64, 0x74, 0x17, 0xca, 0xb1, 0xb7, 0x43, - 0xe6, 0x5d, 0x57, 0xa8, 0x03, 0x1f, 0xc0, 0x83, 0x7a, 0x4d, 0x12, 0xc0, 0x09, 0x2d, 0xfb, 0x4b, - 0x05, 0x80, 0x24, 0x1a, 0x47, 0xaf, 0x4f, 0x5c, 0xe8, 0x50, 0x14, 0x5d, 0xce, 0x50, 0x14, 0xa1, - 0x84, 0x60, 0x86, 0x96, 0x48, 0x0d, 0x53, 0xb1, 0xaf, 0x61, 0x1a, 0x38, 0xca, 0x30, 0x2d, 0xc2, - 0x54, 0x12, 0x4d, 0xc4, 0x0c, 0xa6, 0xc4, 0x1e, 0x44, 0x6b, 0x69, 0x20, 0xee, 0xc4, 0xb7, 0x09, - 0x5c, 0x52, 0x41, 0x15, 0xc4, 0x5d, 0xc3, 0xac, 0x4d, 0x8f, 0x90, 0xf3, 0x3f, 0xd1, 0x84, 0x15, - 0x72, 0x35, 0x61, 0x3f, 0x6e, 0xc1, 0xe9, 0x74, 0x3b, 0xcc, 0xfd, 0xef, 0x8b, 0x16, 0x9c, 0x61, - 0xfa, 0x40, 0xd6, 0x6a, 0xa7, 0xf6, 0xf1, 0x85, 0xae, 0x81, 0x22, 0x72, 0x7a, 0x9c, 0xb8, 0xb9, - 0xaf, 0x64, 0x91, 0xc6, 0xd9, 0x2d, 0xda, 0xff, 0xbe, 0x00, 0xd3, 0x79, 0x11, 0x26, 0x98, 0x31, - 0xba, 0x73, 0xaf, 0xbe, 0x4d, 0xf6, 0x84, 0xc9, 0x6f, 0x62, 0x8c, 0xce, 0x8b, 0xb1, 0x84, 0xa7, - 0x23, 0x43, 0x17, 0xfa, 0x8b, 0x0c, 0x8d, 0xb6, 0x60, 0x6a, 0x6f, 0x8b, 0xf8, 0xb7, 0xfd, 0xc8, - 0x89, 0xbd, 0x68, 0xc3, 0x63, 0x19, 0xdb, 0xf9, 0xba, 0x79, 0x45, 0x1a, 0xe6, 0xde, 0x4d, 0x23, - 0x1c, 0x1e, 0xcc, 0x5e, 0x30, 0x0a, 0x92, 0x2e, 0xf3, 0x83, 0x04, 0x77, 0x12, 0xed, 0x0c, 0xac, - 0x3d, 0xf0, 0x10, 0x03, 0x6b, 0xdb, 0x5f, 0xb4, 0xe0, 0x5c, 0x6e, 0xe2, 0x3b, 0x74, 0x05, 0x4a, - 0x4e, 0xcb, 0xe3, 0x82, 0x53, 0x71, 0x8c, 0x32, 0x01, 0x40, 0xad, 0xca, 0xc5, 0xa6, 0x0a, 0xaa, - 0x12, 0xf2, 0x16, 0x72, 0x13, 0xf2, 0xf6, 0xcc, 0xaf, 0x6b, 0x7f, 0x8f, 0x05, 0xc2, 0x91, 0xae, - 0x8f, 0xb3, 0xfb, 0x2d, 0x99, 0xcf, 0xdc, 0x48, 0xbe, 0x71, 0x29, 0xdf, 0xb3, 0x50, 0xa4, 0xdc, - 0x50, 0xbc, 0x92, 0x91, 0x68, 0xc3, 0xa0, 0x65, 0xbb, 0x20, 0xa0, 0x15, 0xc2, 0xc4, 0x8e, 0xbd, - 0x7b, 0xf3, 0x1c, 0x80, 0xcb, 0x70, 0xb5, 0xac, 0xc6, 0xea, 0x66, 0xae, 0x28, 0x08, 0xd6, 0xb0, - 0xec, 0x7f, 0x5d, 0x80, 0x11, 0x99, 0xec, 0xa1, 0xed, 0xf7, 0x23, 0x1c, 0x38, 0x52, 0xf6, 0x37, - 0x96, 0x06, 0x9c, 0x12, 0xae, 0x25, 0x32, 0x95, 0x24, 0x0d, 0xb8, 0x04, 0xe0, 0x04, 0x87, 0xee, - 0xa2, 0xa8, 0xbd, 0xce, 0xd0, 0x53, 0x6e, 0x5f, 0x75, 0x5e, 0x8c, 0x25, 0x1c, 0x7d, 0x1a, 0x26, - 0x79, 0xbd, 0x30, 0x68, 0x39, 0x9b, 0x5c, 0x22, 0x3d, 0xa8, 0xfc, 0xb5, 0x27, 0x57, 0x52, 0xb0, - 0xc3, 0x83, 0xd9, 0xd3, 0xe9, 0x32, 0xa6, 0x6a, 0xe9, 0xa0, 0xc2, 0xcc, 0x37, 0x78, 0x23, 0x74, - 0xf7, 0x77, 0x58, 0x7d, 0x24, 0x20, 0xac, 0xe3, 0xd9, 0x9f, 0x07, 0xd4, 0x99, 0xf6, 0x02, 0xbd, - 0xc1, 0x6d, 0xf6, 0xbc, 0x90, 0xb8, 0xdd, 0x54, 0x2f, 0xba, 0x57, 0xb2, 0xf4, 0xd8, 0xe0, 0xb5, - 0xb0, 0xaa, 0x6f, 0xff, 0xff, 0x45, 0x98, 0x4c, 0xfb, 0xa8, 0xa2, 0xeb, 0x30, 0xc4, 0x59, 0x0f, - 0x41, 0xbe, 0x8b, 0x66, 0x5f, 0xf3, 0x6c, 0x65, 0x87, 0xb0, 0xe0, 0x5e, 0x44, 0x7d, 0xf4, 0x36, - 0x8c, 0xb8, 0xc1, 0x9e, 0xbf, 0xe7, 0x84, 0xee, 0x7c, 0xad, 0x2a, 0x96, 0x73, 0xe6, 0x6b, 0xa9, - 0x92, 0xa0, 0xe9, 0xde, 0xb2, 0x4c, 0x8b, 0x95, 0x80, 0xb0, 0x4e, 0x0e, 0xad, 0xb1, 0x28, 0xbd, - 0x1b, 0xde, 0xe6, 0x8a, 0xd3, 0xea, 0x66, 0xc0, 0xbd, 0x28, 0x91, 0x34, 0xca, 0x63, 0x22, 0x94, - 0x2f, 0x07, 0xe0, 0x84, 0x10, 0xfa, 0x36, 0x38, 0x15, 0xe5, 0x08, 0x58, 0xf3, 0xb2, 0x20, 0x75, - 0x93, 0x39, 0x2e, 0x3c, 0x42, 0xdf, 0xb1, 0x59, 0xa2, 0xd8, 0xac, 0x66, 0xec, 0x5f, 0x3b, 0x05, - 0xc6, 0x26, 0x36, 0x92, 0xe2, 0x59, 0xc7, 0x94, 0x14, 0x0f, 0x43, 0x89, 0xec, 0xb4, 0xe2, 0xfd, - 0x8a, 0x17, 0x76, 0xcb, 0xaa, 0xba, 0x24, 0x70, 0x3a, 0x69, 0x4a, 0x08, 0x56, 0x74, 0xb2, 0x33, - 0x17, 0x16, 0xbf, 0x8e, 0x99, 0x0b, 0x07, 0x4e, 0x30, 0x73, 0xe1, 0x2a, 0x0c, 0x6f, 0x7a, 0x31, - 0x26, 0xad, 0x40, 0x30, 0xfd, 0x99, 0xeb, 0xf0, 0x1a, 0x47, 0xe9, 0xcc, 0x91, 0x25, 0x00, 0x58, - 0x12, 0x41, 0x6f, 0xa8, 0x1d, 0x38, 0x94, 0xff, 0x66, 0xee, 0x54, 0x41, 0x67, 0xee, 0x41, 0x91, - 0x9f, 0x70, 0xf8, 0x41, 0xf3, 0x13, 0x2e, 0xcb, 0xac, 0x82, 0xa5, 0x7c, 0x6f, 0x0b, 0x96, 0x34, - 0xb0, 0x47, 0x2e, 0xc1, 0x3b, 0x7a, 0x26, 0xc6, 0x72, 0xfe, 0x49, 0xa0, 0x92, 0x2c, 0xf6, 0x99, - 0x7f, 0xf1, 0x7b, 0x2c, 0x38, 0xd3, 0xca, 0x4a, 0x4a, 0x2a, 0xb4, 0xb5, 0x2f, 0xf6, 0x9d, 0x75, - 0xd5, 0x68, 0x90, 0x09, 0x6a, 0x32, 0xd1, 0x70, 0x76, 0x73, 0x74, 0xa0, 0xc3, 0x75, 0x57, 0x24, - 0x10, 0x7c, 0x3c, 0x27, 0x91, 0x63, 0x97, 0xf4, 0x8d, 0x6b, 0x19, 0x49, 0x03, 0x3f, 0x9a, 0x97, - 0x34, 0xb0, 0xef, 0x54, 0x81, 0x6f, 0xa8, 0x14, 0x8e, 0x63, 0xf9, 0x4b, 0x89, 0x27, 0x68, 0xec, - 0x99, 0xb8, 0xf1, 0x0d, 0x95, 0xb8, 0xb1, 0x4b, 0x1c, 0x49, 0x9e, 0x96, 0xb1, 0x67, 0xba, 0x46, - 0x2d, 0xe5, 0xe2, 0xc4, 0xf1, 0xa4, 0x5c, 0x34, 0xae, 0x1a, 0x9e, 0xf5, 0xef, 0xa9, 0x1e, 0x57, - 0x8d, 0x41, 0xb7, 0xfb, 0x65, 0xc3, 0xd3, 0x4b, 0x4e, 0x3d, 0x50, 0x7a, 0xc9, 0x3b, 0x7a, 0xba, - 0x46, 0xd4, 0x23, 0x1f, 0x21, 0x45, 0xea, 0x33, 0x49, 0xe3, 0x1d, 0xfd, 0x02, 0x3c, 0x95, 0x4f, - 0x57, 0xdd, 0x73, 0x9d, 0x74, 0x33, 0xaf, 0xc0, 0x8e, 0xe4, 0x8f, 0xa7, 0x4f, 0x26, 0xf9, 0xe3, - 0x99, 0x63, 0x4f, 0xfe, 0x78, 0xf6, 0x04, 0x92, 0x3f, 0x3e, 0x72, 0x82, 0xc9, 0x1f, 0xef, 0x30, - 0x13, 0x07, 0x1e, 0x8e, 0x44, 0xc4, 0xbd, 0xcc, 0x8e, 0xb1, 0x98, 0x15, 0xb3, 0x84, 0x7f, 0x9c, - 0x02, 0xe1, 0x84, 0x54, 0x46, 0x52, 0xc9, 0xe9, 0x87, 0x90, 0x54, 0x72, 0x35, 0x49, 0x2a, 0x79, - 0x2e, 0x7f, 0xaa, 0x33, 0x4c, 0xcb, 0x73, 0x52, 0x49, 0xde, 0xd1, 0x53, 0x40, 0x3e, 0xda, 0x45, - 0x14, 0x9f, 0x25, 0x78, 0xec, 0x92, 0xf8, 0xf1, 0x75, 0x9e, 0xf8, 0xf1, 0x7c, 0xfe, 0x49, 0x9e, - 0xbe, 0xee, 0xcc, 0x74, 0x8f, 0xdf, 0x57, 0x80, 0x8b, 0xdd, 0xf7, 0x45, 0x22, 0xf5, 0xac, 0x25, - 0x1a, 0xc1, 0x94, 0xd4, 0x93, 0xbf, 0xad, 0x12, 0xac, 0xbe, 0x23, 0x55, 0x5d, 0x83, 0x29, 0x65, - 0x3b, 0xde, 0xf4, 0x1a, 0xfb, 0x5a, 0x86, 0x7b, 0xe5, 0x6f, 0x5b, 0x4f, 0x23, 0xe0, 0xce, 0x3a, - 0x68, 0x1e, 0x26, 0x8c, 0xc2, 0x6a, 0x45, 0xbc, 0xa1, 0x94, 0x98, 0xb5, 0x6e, 0x82, 0x71, 0x1a, - 0xdf, 0xfe, 0x69, 0x0b, 0x1e, 0xc9, 0xc9, 0xab, 0xd4, 0x77, 0x20, 0xa6, 0x0d, 0x98, 0x68, 0x99, - 0x55, 0x7b, 0xc4, 0x6b, 0x33, 0xb2, 0x37, 0xa9, 0xbe, 0xa6, 0x00, 0x38, 0x4d, 0xd4, 0xfe, 0x53, - 0x0b, 0x2e, 0x74, 0x35, 0xe3, 0x42, 0x18, 0xce, 0x6e, 0xee, 0x44, 0xce, 0x62, 0x48, 0x5c, 0xe2, - 0xc7, 0x9e, 0xd3, 0xac, 0xb7, 0x48, 0x43, 0x93, 0x5b, 0x33, 0x7b, 0xa8, 0x6b, 0x2b, 0xf5, 0xf9, - 0x4e, 0x0c, 0x9c, 0x53, 0x13, 0x2d, 0x03, 0xea, 0x84, 0x88, 0x19, 0x66, 0x31, 0x5d, 0x3b, 0xe9, - 0xe1, 0x8c, 0x1a, 0xe8, 0x25, 0x18, 0x53, 0xe6, 0x61, 0xda, 0x8c, 0xb3, 0x03, 0x18, 0xeb, 0x00, - 0x6c, 0xe2, 0x2d, 0x5c, 0xf9, 0x8d, 0xdf, 0xbb, 0xf8, 0x91, 0xdf, 0xfa, 0xbd, 0x8b, 0x1f, 0xf9, - 0xed, 0xdf, 0xbb, 0xf8, 0x91, 0xef, 0xb8, 0x7f, 0xd1, 0xfa, 0x8d, 0xfb, 0x17, 0xad, 0xdf, 0xba, - 0x7f, 0xd1, 0xfa, 0xed, 0xfb, 0x17, 0xad, 0xdf, 0xbd, 0x7f, 0xd1, 0xfa, 0xd2, 0xef, 0x5f, 0xfc, - 0xc8, 0x5b, 0x85, 0xdd, 0x67, 0xff, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x5e, 0x40, 0x10, 0x5c, - 0xb3, 0xfc, 0x00, 0x00, + // 13727 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0xbd, 0x7b, 0x70, 0x24, 0x49, + 0x5a, 0x18, 0x7e, 0xd5, 0xad, 0x47, 0xf7, 0xa7, 0x77, 0xce, 0x63, 0x35, 0xda, 0x99, 0xd1, 0x6c, + 0xed, 0xdd, 0xec, 0xec, 0xed, 0xae, 0xe6, 0xf6, 0x75, 0xbb, 0xdc, 0xde, 0x2d, 0x48, 0x6a, 0x69, + 0xa6, 0x77, 0x46, 0x9a, 0xde, 0x6c, 0xcd, 0xcc, 0xdd, 0xb1, 0x77, 0xbf, 0x2b, 0x75, 0xa5, 0xa4, + 0x3a, 0x75, 0x57, 0xf5, 0x56, 0x55, 0x6b, 0x46, 0xfb, 0x83, 0x30, 0x3e, 0x9e, 0x67, 0xc0, 0x71, + 0x76, 0x10, 0x7e, 0x00, 0x41, 0x38, 0x30, 0x0e, 0xc0, 0xd8, 0x0e, 0x63, 0x30, 0x60, 0x0e, 0x1b, + 0x0c, 0xb6, 0x03, 0xfb, 0x0f, 0x8c, 0x09, 0xdb, 0x47, 0x04, 0x61, 0x19, 0x06, 0x87, 0x89, 0xfb, + 0xc3, 0x40, 0x18, 0xfc, 0x87, 0x65, 0xc2, 0x38, 0xf2, 0x59, 0x99, 0xd5, 0x55, 0xdd, 0xad, 0x59, + 0x8d, 0x6e, 0xb9, 0xd8, 0xff, 0xba, 0xf3, 0xfb, 0xf2, 0xcb, 0xac, 0x7c, 0x7c, 0xf9, 0xe5, 0x97, + 0xdf, 0x03, 0x5e, 0xdb, 0x7d, 0x35, 0x5a, 0xf0, 0x82, 0xab, 0xbb, 0x9d, 0x4d, 0x12, 0xfa, 0x24, + 0x26, 0xd1, 0xd5, 0x3d, 0xe2, 0xbb, 0x41, 0x78, 0x55, 0x00, 0x9c, 0xb6, 0x77, 0xb5, 0x11, 0x84, + 0xe4, 0xea, 0xde, 0xf3, 0x57, 0xb7, 0x89, 0x4f, 0x42, 0x27, 0x26, 0xee, 0x42, 0x3b, 0x0c, 0xe2, + 0x00, 0x21, 0x8e, 0xb3, 0xe0, 0xb4, 0xbd, 0x05, 0x8a, 0xb3, 0xb0, 0xf7, 0xfc, 0xdc, 0x73, 0xdb, + 0x5e, 0xbc, 0xd3, 0xd9, 0x5c, 0x68, 0x04, 0xad, 0xab, 0xdb, 0xc1, 0x76, 0x70, 0x95, 0xa1, 0x6e, + 0x76, 0xb6, 0xd8, 0x3f, 0xf6, 0x87, 0xfd, 0xe2, 0x24, 0xe6, 0x5e, 0x4a, 0x9a, 0x69, 0x39, 0x8d, + 0x1d, 0xcf, 0x27, 0xe1, 0xfe, 0xd5, 0xf6, 0xee, 0x36, 0x6b, 0x37, 0x24, 0x51, 0xd0, 0x09, 0x1b, + 0x24, 0xdd, 0x70, 0xcf, 0x5a, 0xd1, 0xd5, 0x16, 0x89, 0x9d, 0x8c, 0xee, 0xce, 0x5d, 0xcd, 0xab, + 0x15, 0x76, 0xfc, 0xd8, 0x6b, 0x75, 0x37, 0xf3, 0xd1, 0x7e, 0x15, 0xa2, 0xc6, 0x0e, 0x69, 0x39, + 0x5d, 0xf5, 0x5e, 0xcc, 0xab, 0xd7, 0x89, 0xbd, 0xe6, 0x55, 0xcf, 0x8f, 0xa3, 0x38, 0x4c, 0x57, + 0xb2, 0xbf, 0x62, 0xc1, 0xa5, 0xc5, 0xbb, 0xf5, 0x95, 0xa6, 0x13, 0xc5, 0x5e, 0x63, 0xa9, 0x19, + 0x34, 0x76, 0xeb, 0x71, 0x10, 0x92, 0x3b, 0x41, 0xb3, 0xd3, 0x22, 0x75, 0x36, 0x10, 0xe8, 0x59, + 0x28, 0xed, 0xb1, 0xff, 0xd5, 0xca, 0xac, 0x75, 0xc9, 0xba, 0x52, 0x5e, 0x9a, 0xfe, 0xf5, 0x83, + 0xf9, 0x0f, 0x3c, 0x38, 0x98, 0x2f, 0xdd, 0x11, 0xe5, 0x58, 0x61, 0xa0, 0xcb, 0x30, 0xb2, 0x15, + 0x6d, 0xec, 0xb7, 0xc9, 0x6c, 0x81, 0xe1, 0x4e, 0x0a, 0xdc, 0x91, 0xd5, 0x3a, 0x2d, 0xc5, 0x02, + 0x8a, 0xae, 0x42, 0xb9, 0xed, 0x84, 0xb1, 0x17, 0x7b, 0x81, 0x3f, 0x5b, 0xbc, 0x64, 0x5d, 0x19, + 0x5e, 0x9a, 0x11, 0xa8, 0xe5, 0x9a, 0x04, 0xe0, 0x04, 0x87, 0x76, 0x23, 0x24, 0x8e, 0x7b, 0xcb, + 0x6f, 0xee, 0xcf, 0x0e, 0x5d, 0xb2, 0xae, 0x94, 0x92, 0x6e, 0x60, 0x51, 0x8e, 0x15, 0x86, 0xfd, + 0x83, 0x05, 0x28, 0x2d, 0x6e, 0x6d, 0x79, 0xbe, 0x17, 0xef, 0xa3, 0x3b, 0x30, 0xee, 0x07, 0x2e, + 0x91, 0xff, 0xd9, 0x57, 0x8c, 0xbd, 0x70, 0x69, 0xa1, 0x7b, 0x29, 0x2d, 0xac, 0x6b, 0x78, 0x4b, + 0xd3, 0x0f, 0x0e, 0xe6, 0xc7, 0xf5, 0x12, 0x6c, 0xd0, 0x41, 0x18, 0xc6, 0xda, 0x81, 0xab, 0xc8, + 0x16, 0x18, 0xd9, 0xf9, 0x2c, 0xb2, 0xb5, 0x04, 0x6d, 0x69, 0xea, 0xc1, 0xc1, 0xfc, 0x98, 0x56, + 0x80, 0x75, 0x22, 0x68, 0x13, 0xa6, 0xe8, 0x5f, 0x3f, 0xf6, 0x14, 0xdd, 0x22, 0xa3, 0xfb, 0x64, + 0x1e, 0x5d, 0x0d, 0x75, 0xe9, 0xd4, 0x83, 0x83, 0xf9, 0xa9, 0x54, 0x21, 0x4e, 0x13, 0xb4, 0xdf, + 0x81, 0xc9, 0xc5, 0x38, 0x76, 0x1a, 0x3b, 0xc4, 0xe5, 0x33, 0x88, 0x5e, 0x82, 0x21, 0xdf, 0x69, + 0x11, 0x31, 0xbf, 0x97, 0xc4, 0xc0, 0x0e, 0xad, 0x3b, 0x2d, 0x72, 0x78, 0x30, 0x3f, 0x7d, 0xdb, + 0xf7, 0xde, 0xee, 0x88, 0x55, 0x41, 0xcb, 0x30, 0xc3, 0x46, 0x2f, 0x00, 0xb8, 0x64, 0xcf, 0x6b, + 0x90, 0x9a, 0x13, 0xef, 0x88, 0xf9, 0x46, 0xa2, 0x2e, 0x54, 0x14, 0x04, 0x6b, 0x58, 0xf6, 0x7d, + 0x28, 0x2f, 0xee, 0x05, 0x9e, 0x5b, 0x0b, 0xdc, 0x08, 0xed, 0xc2, 0x54, 0x3b, 0x24, 0x5b, 0x24, + 0x54, 0x45, 0xb3, 0xd6, 0xa5, 0xe2, 0x95, 0xb1, 0x17, 0xae, 0x64, 0x7e, 0xac, 0x89, 0xba, 0xe2, + 0xc7, 0xe1, 0xfe, 0xd2, 0x63, 0xa2, 0xbd, 0xa9, 0x14, 0x14, 0xa7, 0x29, 0xdb, 0xff, 0xaa, 0x00, + 0x67, 0x16, 0xdf, 0xe9, 0x84, 0xa4, 0xe2, 0x45, 0xbb, 0xe9, 0x15, 0xee, 0x7a, 0xd1, 0xee, 0x7a, + 0x32, 0x02, 0x6a, 0x69, 0x55, 0x44, 0x39, 0x56, 0x18, 0xe8, 0x39, 0x18, 0xa5, 0xbf, 0x6f, 0xe3, + 0xaa, 0xf8, 0xe4, 0x53, 0x02, 0x79, 0xac, 0xe2, 0xc4, 0x4e, 0x85, 0x83, 0xb0, 0xc4, 0x41, 0x6b, + 0x30, 0xd6, 0x60, 0x1b, 0x72, 0x7b, 0x2d, 0x70, 0x09, 0x9b, 0xcc, 0xf2, 0xd2, 0x33, 0x14, 0x7d, + 0x39, 0x29, 0x3e, 0x3c, 0x98, 0x9f, 0xe5, 0x7d, 0x13, 0x24, 0x34, 0x18, 0xd6, 0xeb, 0x23, 0x5b, + 0xed, 0xaf, 0x21, 0x46, 0x09, 0x32, 0xf6, 0xd6, 0x15, 0x6d, 0xab, 0x0c, 0xb3, 0xad, 0x32, 0x9e, + 0xbd, 0x4d, 0xd0, 0xf3, 0x30, 0xb4, 0xeb, 0xf9, 0xee, 0xec, 0x08, 0xa3, 0x75, 0x81, 0xce, 0xf9, + 0x0d, 0xcf, 0x77, 0x0f, 0x0f, 0xe6, 0x67, 0x8c, 0xee, 0xd0, 0x42, 0xcc, 0x50, 0xed, 0x3f, 0xb1, + 0x60, 0x9e, 0xc1, 0x56, 0xbd, 0x26, 0xa9, 0x91, 0x30, 0xf2, 0xa2, 0x98, 0xf8, 0xb1, 0x31, 0xa0, + 0x2f, 0x00, 0x44, 0xa4, 0x11, 0x92, 0x58, 0x1b, 0x52, 0xb5, 0x30, 0xea, 0x0a, 0x82, 0x35, 0x2c, + 0xca, 0x10, 0xa2, 0x1d, 0x27, 0x64, 0xeb, 0x4b, 0x0c, 0xac, 0x62, 0x08, 0x75, 0x09, 0xc0, 0x09, + 0x8e, 0xc1, 0x10, 0x8a, 0xfd, 0x18, 0x02, 0xfa, 0x04, 0x4c, 0x25, 0x8d, 0x45, 0x6d, 0xa7, 0x21, + 0x07, 0x90, 0x6d, 0x99, 0xba, 0x09, 0xc2, 0x69, 0x5c, 0xfb, 0xef, 0x5b, 0x62, 0xf1, 0xd0, 0xaf, + 0x7e, 0x8f, 0x7f, 0xab, 0xfd, 0x0b, 0x16, 0x8c, 0x2e, 0x79, 0xbe, 0xeb, 0xf9, 0xdb, 0xe8, 0x73, + 0x50, 0xa2, 0x67, 0x93, 0xeb, 0xc4, 0x8e, 0xe0, 0x7b, 0x1f, 0xd1, 0xf6, 0x96, 0x3a, 0x2a, 0x16, + 0xda, 0xbb, 0xdb, 0xb4, 0x20, 0x5a, 0xa0, 0xd8, 0x74, 0xb7, 0xdd, 0xda, 0xfc, 0x3c, 0x69, 0xc4, + 0x6b, 0x24, 0x76, 0x92, 0xcf, 0x49, 0xca, 0xb0, 0xa2, 0x8a, 0x6e, 0xc0, 0x48, 0xec, 0x84, 0xdb, + 0x24, 0x16, 0x0c, 0x30, 0x93, 0x51, 0xf1, 0x9a, 0x98, 0xee, 0x48, 0xe2, 0x37, 0x48, 0x72, 0x2c, + 0x6c, 0xb0, 0xaa, 0x58, 0x90, 0xb0, 0xbf, 0x7f, 0x14, 0xce, 0x2d, 0xd7, 0xab, 0x39, 0xeb, 0xea, + 0x32, 0x8c, 0xb8, 0xa1, 0xb7, 0x47, 0x42, 0x31, 0xce, 0x8a, 0x4a, 0x85, 0x95, 0x62, 0x01, 0x45, + 0xaf, 0xc2, 0x38, 0x3f, 0x90, 0xae, 0x3b, 0xbe, 0xdb, 0x94, 0x43, 0x7c, 0x5a, 0x60, 0x8f, 0xdf, + 0xd1, 0x60, 0xd8, 0xc0, 0x3c, 0xe2, 0xa2, 0xba, 0x9c, 0xda, 0x8c, 0x79, 0x87, 0xdd, 0x17, 0x2d, + 0x98, 0xe6, 0xcd, 0x2c, 0xc6, 0x71, 0xe8, 0x6d, 0x76, 0x62, 0x12, 0xcd, 0x0e, 0x33, 0x4e, 0xb7, + 0x9c, 0x35, 0x5a, 0xb9, 0x23, 0xb0, 0x70, 0x27, 0x45, 0x85, 0x33, 0xc1, 0x59, 0xd1, 0xee, 0x74, + 0x1a, 0x8c, 0xbb, 0x9a, 0x45, 0xdf, 0x6e, 0xc1, 0x5c, 0x23, 0xf0, 0xe3, 0x30, 0x68, 0x36, 0x49, + 0x58, 0xeb, 0x6c, 0x36, 0xbd, 0x68, 0x87, 0xaf, 0x53, 0x4c, 0xb6, 0x18, 0x27, 0xc8, 0x99, 0x43, + 0x85, 0x24, 0xe6, 0xf0, 0xe2, 0x83, 0x83, 0xf9, 0xb9, 0xe5, 0x5c, 0x52, 0xb8, 0x47, 0x33, 0x68, + 0x17, 0x10, 0x3d, 0x4a, 0xeb, 0xb1, 0xb3, 0x4d, 0x92, 0xc6, 0x47, 0x07, 0x6f, 0xfc, 0xec, 0x83, + 0x83, 0x79, 0xb4, 0xde, 0x45, 0x02, 0x67, 0x90, 0x45, 0x6f, 0xc3, 0x69, 0x5a, 0xda, 0xf5, 0xad, + 0xa5, 0xc1, 0x9b, 0x9b, 0x7d, 0x70, 0x30, 0x7f, 0x7a, 0x3d, 0x83, 0x08, 0xce, 0x24, 0x8d, 0xbe, + 0xcd, 0x82, 0x73, 0xc9, 0xe7, 0xaf, 0xdc, 0x6f, 0x3b, 0xbe, 0x9b, 0x34, 0x5c, 0x1e, 0xbc, 0x61, + 0xca, 0x93, 0xcf, 0x2d, 0xe7, 0x51, 0xc2, 0xf9, 0x8d, 0xcc, 0x2d, 0xc3, 0x99, 0xcc, 0xd5, 0x82, + 0xa6, 0xa1, 0xb8, 0x4b, 0xb8, 0x14, 0x54, 0xc6, 0xf4, 0x27, 0x3a, 0x0d, 0xc3, 0x7b, 0x4e, 0xb3, + 0x23, 0x36, 0x0a, 0xe6, 0x7f, 0x3e, 0x56, 0x78, 0xd5, 0xb2, 0xff, 0x75, 0x11, 0xa6, 0x96, 0xeb, + 0xd5, 0x87, 0xda, 0x85, 0xfa, 0x31, 0x54, 0xe8, 0x79, 0x0c, 0x25, 0x87, 0x5a, 0x31, 0xf7, 0x50, + 0xfb, 0x4b, 0x19, 0x5b, 0x68, 0x88, 0x6d, 0xa1, 0x6f, 0xc8, 0xd9, 0x42, 0xc7, 0xbc, 0x71, 0xf6, + 0x72, 0x56, 0xd1, 0x30, 0x9b, 0xcc, 0x4c, 0x89, 0xe5, 0x66, 0xd0, 0x70, 0x9a, 0x69, 0xd6, 0x77, + 0xc4, 0xa5, 0x74, 0x3c, 0xf3, 0xd8, 0x80, 0xf1, 0x65, 0xa7, 0xed, 0x6c, 0x7a, 0x4d, 0x2f, 0xf6, + 0x48, 0x84, 0x9e, 0x82, 0xa2, 0xe3, 0xba, 0x4c, 0xda, 0x2a, 0x2f, 0x9d, 0x79, 0x70, 0x30, 0x5f, + 0x5c, 0x74, 0xe9, 0xb1, 0x0f, 0x0a, 0x6b, 0x1f, 0x53, 0x0c, 0xf4, 0x61, 0x18, 0x72, 0xc3, 0xa0, + 0x3d, 0x5b, 0x60, 0x98, 0x74, 0xd7, 0x0d, 0x55, 0xc2, 0xa0, 0x9d, 0x42, 0x65, 0x38, 0xf6, 0xaf, + 0x14, 0xe0, 0xfc, 0x32, 0x69, 0xef, 0xac, 0xd6, 0x73, 0xf8, 0xf7, 0x15, 0x28, 0xb5, 0x02, 0xdf, + 0x8b, 0x83, 0x30, 0x12, 0x4d, 0xb3, 0x15, 0xb1, 0x26, 0xca, 0xb0, 0x82, 0xa2, 0x4b, 0x30, 0xd4, + 0x4e, 0x84, 0xca, 0x71, 0x29, 0x90, 0x32, 0x71, 0x92, 0x41, 0x28, 0x46, 0x27, 0x22, 0xa1, 0x58, + 0x31, 0x0a, 0xe3, 0x76, 0x44, 0x42, 0xcc, 0x20, 0xc9, 0xc9, 0x4c, 0xcf, 0x6c, 0xc1, 0xa1, 0x53, + 0x27, 0x33, 0x85, 0x60, 0x0d, 0x0b, 0xd5, 0xa0, 0x1c, 0xa5, 0x66, 0x76, 0xa0, 0x6d, 0x3a, 0xc1, + 0x8e, 0x6e, 0x35, 0x93, 0x09, 0x11, 0xe3, 0x44, 0x19, 0xe9, 0x7b, 0x74, 0x7f, 0xb9, 0x00, 0x88, + 0x0f, 0xe1, 0x5f, 0xb0, 0x81, 0xbb, 0xdd, 0x3d, 0x70, 0x83, 0x6f, 0x89, 0xe3, 0x1a, 0xbd, 0x3f, + 0xb5, 0xe0, 0xfc, 0xb2, 0xe7, 0xbb, 0x24, 0xcc, 0x59, 0x80, 0x8f, 0xe6, 0x2e, 0x7b, 0x34, 0xa1, + 0xc1, 0x58, 0x62, 0x43, 0xc7, 0xb0, 0xc4, 0xec, 0x3f, 0xb2, 0x00, 0xf1, 0xcf, 0x7e, 0xcf, 0x7d, + 0xec, 0xed, 0xee, 0x8f, 0x3d, 0x86, 0x65, 0x61, 0xdf, 0x84, 0xc9, 0xe5, 0xa6, 0x47, 0xfc, 0xb8, + 0x5a, 0x5b, 0x0e, 0xfc, 0x2d, 0x6f, 0x1b, 0x7d, 0x0c, 0x26, 0x63, 0xaf, 0x45, 0x82, 0x4e, 0x5c, + 0x27, 0x8d, 0xc0, 0x67, 0x37, 0x49, 0xeb, 0xca, 0xf0, 0x12, 0x7a, 0x70, 0x30, 0x3f, 0xb9, 0x61, + 0x40, 0x70, 0x0a, 0xd3, 0xfe, 0x1d, 0x3a, 0x7e, 0x41, 0xab, 0x1d, 0xf8, 0xc4, 0x8f, 0x97, 0x03, + 0xdf, 0xe5, 0x1a, 0x87, 0x8f, 0xc1, 0x50, 0x4c, 0xc7, 0x83, 0x8f, 0xdd, 0x65, 0xb9, 0x51, 0xe8, + 0x28, 0x1c, 0x1e, 0xcc, 0x9f, 0xed, 0xae, 0xc1, 0xc6, 0x89, 0xd5, 0x41, 0xdf, 0x00, 0x23, 0x51, + 0xec, 0xc4, 0x9d, 0x48, 0x8c, 0xe6, 0x13, 0x72, 0x34, 0xeb, 0xac, 0xf4, 0xf0, 0x60, 0x7e, 0x4a, + 0x55, 0xe3, 0x45, 0x58, 0x54, 0x40, 0x4f, 0xc3, 0x68, 0x8b, 0x44, 0x91, 0xb3, 0x2d, 0x4f, 0xc3, + 0x29, 0x51, 0x77, 0x74, 0x8d, 0x17, 0x63, 0x09, 0x47, 0x4f, 0xc2, 0x30, 0x09, 0xc3, 0x20, 0x14, + 0x7b, 0x74, 0x42, 0x20, 0x0e, 0xaf, 0xd0, 0x42, 0xcc, 0x61, 0xf6, 0xbf, 0xb7, 0x60, 0x4a, 0xf5, + 0x95, 0xb7, 0x75, 0x02, 0xb7, 0x82, 0x4f, 0x03, 0x34, 0xe4, 0x07, 0x46, 0xec, 0xf4, 0x18, 0x7b, + 0xe1, 0x72, 0xe6, 0x41, 0xdd, 0x35, 0x8c, 0x09, 0x65, 0x55, 0x14, 0x61, 0x8d, 0x9a, 0xfd, 0xcf, + 0x2d, 0x38, 0x95, 0xfa, 0xa2, 0x9b, 0x5e, 0x14, 0xa3, 0xb7, 0xba, 0xbe, 0x6a, 0x61, 0xb0, 0xaf, + 0xa2, 0xb5, 0xd9, 0x37, 0xa9, 0xa5, 0x2c, 0x4b, 0xb4, 0x2f, 0xba, 0x0e, 0xc3, 0x5e, 0x4c, 0x5a, + 0xf2, 0x63, 0x9e, 0xec, 0xf9, 0x31, 0xbc, 0x57, 0xc9, 0x8c, 0x54, 0x69, 0x4d, 0xcc, 0x09, 0xd8, + 0xbf, 0x52, 0x84, 0x32, 0x5f, 0xb6, 0x6b, 0x4e, 0xfb, 0x04, 0xe6, 0xe2, 0x19, 0x28, 0x7b, 0xad, + 0x56, 0x27, 0x76, 0x36, 0x05, 0x3b, 0x2f, 0xf1, 0xad, 0x55, 0x95, 0x85, 0x38, 0x81, 0xa3, 0x2a, + 0x0c, 0xb1, 0xae, 0xf0, 0xaf, 0x7c, 0x2a, 0xfb, 0x2b, 0x45, 0xdf, 0x17, 0x2a, 0x4e, 0xec, 0x70, + 0x49, 0x4a, 0x9d, 0x23, 0xb4, 0x08, 0x33, 0x12, 0xc8, 0x01, 0xd8, 0xf4, 0x7c, 0x27, 0xdc, 0xa7, + 0x65, 0xb3, 0x45, 0x46, 0xf0, 0xb9, 0xde, 0x04, 0x97, 0x14, 0x3e, 0x27, 0xab, 0x3e, 0x2c, 0x01, + 0x60, 0x8d, 0xe8, 0xdc, 0x2b, 0x50, 0x56, 0xc8, 0x47, 0x11, 0x88, 0xe6, 0x3e, 0x01, 0x53, 0xa9, + 0xb6, 0xfa, 0x55, 0x1f, 0xd7, 0xe5, 0xa9, 0x5f, 0x64, 0x2c, 0x43, 0xf4, 0x7a, 0xc5, 0xdf, 0x13, + 0x2c, 0xf7, 0x1d, 0x38, 0xdd, 0xcc, 0xe0, 0x64, 0x62, 0x5e, 0x07, 0xe7, 0x7c, 0xe7, 0xc5, 0x67, + 0x9f, 0xce, 0x82, 0xe2, 0xcc, 0x36, 0xa8, 0x8c, 0x10, 0xb4, 0xe9, 0x06, 0x71, 0x9a, 0xba, 0xb8, + 0x7d, 0x4b, 0x94, 0x61, 0x05, 0xa5, 0xfc, 0xee, 0xb4, 0xea, 0xfc, 0x0d, 0xb2, 0x5f, 0x27, 0x4d, + 0xd2, 0x88, 0x83, 0xf0, 0x6b, 0xda, 0xfd, 0x0b, 0x7c, 0xf4, 0x39, 0xbb, 0x1c, 0x13, 0x04, 0x8a, + 0x37, 0xc8, 0x3e, 0x9f, 0x0a, 0xfd, 0xeb, 0x8a, 0x3d, 0xbf, 0xee, 0xa7, 0x2d, 0x98, 0x50, 0x5f, + 0x77, 0x02, 0x7c, 0x61, 0xc9, 0xe4, 0x0b, 0x17, 0x7a, 0x2e, 0xf0, 0x1c, 0x8e, 0xf0, 0xe5, 0x02, + 0x9c, 0x53, 0x38, 0xf4, 0x6e, 0xc0, 0xff, 0x88, 0x55, 0x75, 0x15, 0xca, 0xbe, 0xd2, 0x5a, 0x59, + 0xa6, 0xba, 0x28, 0xd1, 0x59, 0x25, 0x38, 0x54, 0xc4, 0xf3, 0x13, 0xd5, 0xd2, 0xb8, 0xae, 0xce, + 0x15, 0xaa, 0xdb, 0x25, 0x28, 0x76, 0x3c, 0x57, 0x1c, 0x30, 0x1f, 0x91, 0xa3, 0x7d, 0xbb, 0x5a, + 0x39, 0x3c, 0x98, 0x7f, 0x22, 0xef, 0x29, 0x81, 0x9e, 0x6c, 0xd1, 0xc2, 0xed, 0x6a, 0x05, 0xd3, + 0xca, 0x68, 0x11, 0xa6, 0xe4, 0x6b, 0xc9, 0x1d, 0x2a, 0x6e, 0x05, 0xbe, 0x38, 0x87, 0x94, 0x4e, + 0x16, 0x9b, 0x60, 0x9c, 0xc6, 0x47, 0x15, 0x98, 0xde, 0xed, 0x6c, 0x92, 0x26, 0x89, 0xf9, 0x07, + 0xdf, 0x20, 0x5c, 0x63, 0x59, 0x4e, 0x6e, 0x66, 0x37, 0x52, 0x70, 0xdc, 0x55, 0xc3, 0xfe, 0x73, + 0x76, 0x1e, 0x88, 0xd1, 0xab, 0x85, 0x01, 0x5d, 0x58, 0x94, 0xfa, 0xd7, 0x72, 0x39, 0x0f, 0xb2, + 0x2a, 0x6e, 0x90, 0xfd, 0x8d, 0x80, 0x4a, 0xe6, 0xd9, 0xab, 0xc2, 0x58, 0xf3, 0x43, 0x3d, 0xd7, + 0xfc, 0xcf, 0x16, 0xe0, 0x8c, 0x1a, 0x01, 0x43, 0x08, 0xfc, 0x8b, 0x3e, 0x06, 0xcf, 0xc3, 0x98, + 0x4b, 0xb6, 0x9c, 0x4e, 0x33, 0x56, 0xea, 0xf3, 0x61, 0xfe, 0x84, 0x52, 0x49, 0x8a, 0xb1, 0x8e, + 0x73, 0x84, 0x61, 0xfb, 0x5f, 0x63, 0xec, 0x20, 0x8e, 0x1d, 0xba, 0xc6, 0xd5, 0xae, 0xb1, 0x72, + 0x77, 0xcd, 0x93, 0x30, 0xec, 0xb5, 0xa8, 0x60, 0x56, 0x30, 0xe5, 0xad, 0x2a, 0x2d, 0xc4, 0x1c, + 0x86, 0x3e, 0x04, 0xa3, 0x8d, 0xa0, 0xd5, 0x72, 0x7c, 0x97, 0x1d, 0x79, 0xe5, 0xa5, 0x31, 0x2a, + 0xbb, 0x2d, 0xf3, 0x22, 0x2c, 0x61, 0xe8, 0x3c, 0x0c, 0x39, 0xe1, 0x36, 0xd7, 0x61, 0x94, 0x97, + 0x4a, 0xb4, 0xa5, 0xc5, 0x70, 0x3b, 0xc2, 0xac, 0x94, 0x5e, 0xc1, 0xee, 0x05, 0xe1, 0xae, 0xe7, + 0x6f, 0x57, 0xbc, 0x50, 0x6c, 0x09, 0x75, 0x16, 0xde, 0x55, 0x10, 0xac, 0x61, 0xa1, 0x55, 0x18, + 0x6e, 0x07, 0x61, 0x1c, 0xcd, 0x8e, 0xb0, 0xe1, 0x7e, 0x22, 0x87, 0x11, 0xf1, 0xaf, 0xad, 0x05, + 0x61, 0x9c, 0x7c, 0x00, 0xfd, 0x17, 0x61, 0x5e, 0x1d, 0xdd, 0x84, 0x51, 0xe2, 0xef, 0xad, 0x86, + 0x41, 0x6b, 0xf6, 0x54, 0x3e, 0xa5, 0x15, 0x8e, 0xc2, 0x97, 0x59, 0x22, 0xa3, 0x8a, 0x62, 0x2c, + 0x49, 0xa0, 0x6f, 0x80, 0x22, 0xf1, 0xf7, 0x66, 0x47, 0x19, 0xa5, 0xb9, 0x1c, 0x4a, 0x77, 0x9c, + 0x30, 0xe1, 0xf9, 0x2b, 0xfe, 0x1e, 0xa6, 0x75, 0xd0, 0xa7, 0xa0, 0x2c, 0x19, 0x46, 0x24, 0x94, + 0x75, 0x99, 0x0b, 0x56, 0xb2, 0x19, 0x4c, 0xde, 0xee, 0x78, 0x21, 0x69, 0x11, 0x3f, 0x8e, 0x12, + 0x0e, 0x29, 0xa1, 0x11, 0x4e, 0xa8, 0xa1, 0x4f, 0x49, 0x0d, 0xf1, 0x5a, 0xd0, 0xf1, 0xe3, 0x68, + 0xb6, 0xcc, 0xba, 0x97, 0xf9, 0x76, 0x77, 0x27, 0xc1, 0x4b, 0xab, 0x90, 0x79, 0x65, 0x6c, 0x90, + 0x42, 0x9f, 0x81, 0x09, 0xfe, 0x9f, 0xbf, 0x80, 0x45, 0xb3, 0x67, 0x18, 0xed, 0x4b, 0xf9, 0xb4, + 0x39, 0xe2, 0xd2, 0x19, 0x41, 0x7c, 0x42, 0x2f, 0x8d, 0xb0, 0x49, 0x0d, 0x61, 0x98, 0x68, 0x7a, + 0x7b, 0xc4, 0x27, 0x51, 0x54, 0x0b, 0x83, 0x4d, 0x32, 0x0b, 0x6c, 0x60, 0xce, 0x65, 0xbf, 0x98, + 0x05, 0x9b, 0x64, 0x69, 0x86, 0xd2, 0xbc, 0xa9, 0xd7, 0xc1, 0x26, 0x09, 0x74, 0x1b, 0x26, 0xe9, + 0x8d, 0xcd, 0x4b, 0x88, 0x8e, 0xf5, 0x23, 0xca, 0xee, 0x55, 0xd8, 0xa8, 0x84, 0x53, 0x44, 0xd0, + 0x2d, 0x18, 0x8f, 0x62, 0x27, 0x8c, 0x3b, 0x6d, 0x4e, 0xf4, 0x6c, 0x3f, 0xa2, 0xec, 0xc1, 0xb5, + 0xae, 0x55, 0xc1, 0x06, 0x01, 0xf4, 0x06, 0x94, 0x9b, 0xde, 0x16, 0x69, 0xec, 0x37, 0x9a, 0x64, + 0x76, 0x9c, 0x51, 0xcb, 0x64, 0x2a, 0x37, 0x25, 0x12, 0x97, 0x73, 0xd5, 0x5f, 0x9c, 0x54, 0x47, + 0x77, 0xe0, 0x6c, 0x4c, 0xc2, 0x96, 0xe7, 0x3b, 0x94, 0x19, 0x88, 0xab, 0x15, 0x7b, 0xc8, 0x9c, + 0x60, 0xbb, 0xed, 0xa2, 0x98, 0x8d, 0xb3, 0x1b, 0x99, 0x58, 0x38, 0xa7, 0x36, 0xba, 0x0f, 0xb3, + 0x19, 0x90, 0xa0, 0xe9, 0x35, 0xf6, 0x67, 0x4f, 0x33, 0xca, 0x1f, 0x17, 0x94, 0x67, 0x37, 0x72, + 0xf0, 0x0e, 0x7b, 0xc0, 0x70, 0x2e, 0x75, 0x74, 0x0b, 0xa6, 0x18, 0x07, 0xaa, 0x75, 0x9a, 0x4d, + 0xd1, 0xe0, 0x24, 0x6b, 0xf0, 0x43, 0xf2, 0x3c, 0xae, 0x9a, 0xe0, 0xc3, 0x83, 0x79, 0x48, 0xfe, + 0xe1, 0x74, 0x6d, 0xb4, 0xc9, 0xde, 0xcc, 0x3a, 0xa1, 0x17, 0xef, 0x53, 0xbe, 0x41, 0xee, 0xc7, + 0xb3, 0x53, 0x3d, 0xf5, 0x15, 0x3a, 0xaa, 0x7a, 0x58, 0xd3, 0x0b, 0x71, 0x9a, 0x20, 0x65, 0xa9, + 0x51, 0xec, 0x7a, 0xfe, 0xec, 0x34, 0xbf, 0x97, 0x48, 0x8e, 0x54, 0xa7, 0x85, 0x98, 0xc3, 0xd8, + 0x7b, 0x19, 0xfd, 0x71, 0x8b, 0x9e, 0x5c, 0x33, 0x0c, 0x31, 0x79, 0x2f, 0x93, 0x00, 0x9c, 0xe0, + 0x50, 0x61, 0x32, 0x8e, 0xf7, 0x67, 0x11, 0x43, 0x55, 0x8c, 0x65, 0x63, 0xe3, 0x53, 0x98, 0x96, + 0xdb, 0x9b, 0x30, 0xa9, 0x18, 0x21, 0x1b, 0x13, 0x34, 0x0f, 0xc3, 0x4c, 0x7c, 0x12, 0xda, 0xb5, + 0x32, 0xed, 0x02, 0x13, 0xad, 0x30, 0x2f, 0x67, 0x5d, 0xf0, 0xde, 0x21, 0x4b, 0xfb, 0x31, 0xe1, + 0x77, 0xfa, 0xa2, 0xd6, 0x05, 0x09, 0xc0, 0x09, 0x8e, 0xfd, 0x7f, 0xb9, 0x18, 0x9a, 0x70, 0xdb, + 0x01, 0xce, 0x97, 0x67, 0xa1, 0xb4, 0x13, 0x44, 0x31, 0xc5, 0x66, 0x6d, 0x0c, 0x27, 0x82, 0xe7, + 0x75, 0x51, 0x8e, 0x15, 0x06, 0x7a, 0x0d, 0x26, 0x1a, 0x7a, 0x03, 0xe2, 0x70, 0x54, 0x6c, 0xc4, + 0x68, 0x1d, 0x9b, 0xb8, 0xe8, 0x55, 0x28, 0x31, 0x1b, 0x90, 0x46, 0xd0, 0x14, 0x52, 0x9b, 0x3c, + 0xe1, 0x4b, 0x35, 0x51, 0x7e, 0xa8, 0xfd, 0xc6, 0x0a, 0x1b, 0x5d, 0x86, 0x11, 0xda, 0x85, 0x6a, + 0x4d, 0x1c, 0x4b, 0x4a, 0x51, 0x74, 0x9d, 0x95, 0x62, 0x01, 0xb5, 0xff, 0x7a, 0x41, 0x1b, 0x65, + 0x7a, 0x1f, 0x26, 0xa8, 0x06, 0xa3, 0xf7, 0x1c, 0x2f, 0xf6, 0xfc, 0x6d, 0x21, 0x7f, 0x3c, 0xdd, + 0xf3, 0x8c, 0x62, 0x95, 0xee, 0xf2, 0x0a, 0xfc, 0x14, 0x15, 0x7f, 0xb0, 0x24, 0x43, 0x29, 0x86, + 0x1d, 0xdf, 0xa7, 0x14, 0x0b, 0x83, 0x52, 0xc4, 0xbc, 0x02, 0xa7, 0x28, 0xfe, 0x60, 0x49, 0x06, + 0xbd, 0x05, 0x20, 0x77, 0x18, 0x71, 0x85, 0xed, 0xc5, 0xb3, 0xfd, 0x89, 0x6e, 0xa8, 0x3a, 0x4b, + 0x93, 0xf4, 0x8c, 0x4e, 0xfe, 0x63, 0x8d, 0x9e, 0x1d, 0x33, 0x39, 0xad, 0xbb, 0x33, 0xe8, 0x9b, + 0xe9, 0x12, 0x77, 0xc2, 0x98, 0xb8, 0x8b, 0xb1, 0x18, 0x9c, 0x0f, 0x0f, 0x76, 0x49, 0xd9, 0xf0, + 0x5a, 0x44, 0xdf, 0x0e, 0x82, 0x08, 0x4e, 0xe8, 0xd9, 0x3f, 0x5f, 0x84, 0xd9, 0xbc, 0xee, 0xd2, + 0x45, 0x47, 0xee, 0x7b, 0xf1, 0x32, 0x15, 0xaf, 0x2c, 0x73, 0xd1, 0xad, 0x88, 0x72, 0xac, 0x30, + 0xe8, 0xec, 0x47, 0xde, 0xb6, 0xbc, 0x63, 0x0e, 0x27, 0xb3, 0x5f, 0x67, 0xa5, 0x58, 0x40, 0x29, + 0x5e, 0x48, 0x9c, 0x48, 0x18, 0xf7, 0x68, 0xab, 0x04, 0xb3, 0x52, 0x2c, 0xa0, 0xba, 0xb6, 0x6b, + 0xa8, 0x8f, 0xb6, 0xcb, 0x18, 0xa2, 0xe1, 0xe3, 0x1d, 0x22, 0xf4, 0x59, 0x80, 0x2d, 0xcf, 0xf7, + 0xa2, 0x1d, 0x46, 0x7d, 0xe4, 0xc8, 0xd4, 0x95, 0x70, 0xb6, 0xaa, 0xa8, 0x60, 0x8d, 0x22, 0x7a, + 0x19, 0xc6, 0xd4, 0x06, 0xac, 0x56, 0xd8, 0x4b, 0xa7, 0x66, 0x39, 0x92, 0x70, 0xa3, 0x0a, 0xd6, + 0xf1, 0xec, 0xcf, 0xa7, 0xd7, 0x8b, 0xd8, 0x01, 0xda, 0xf8, 0x5a, 0x83, 0x8e, 0x6f, 0xa1, 0xf7, + 0xf8, 0xda, 0x5f, 0x2d, 0xc2, 0x94, 0xd1, 0x58, 0x27, 0x1a, 0x80, 0x67, 0x5d, 0xa3, 0x0c, 0xdc, + 0x89, 0x89, 0xd8, 0x7f, 0x76, 0xff, 0xad, 0xa2, 0x33, 0x79, 0xba, 0x03, 0x78, 0x7d, 0xf4, 0x59, + 0x28, 0x37, 0x9d, 0x88, 0x69, 0xce, 0x88, 0xd8, 0x77, 0x83, 0x10, 0x4b, 0x2e, 0x26, 0x4e, 0x14, + 0x6b, 0xa7, 0x26, 0xa7, 0x9d, 0x90, 0xa4, 0x27, 0x0d, 0x95, 0x4f, 0xa4, 0xf5, 0x98, 0xea, 0x04, + 0x15, 0x62, 0xf6, 0x31, 0x87, 0xa1, 0x57, 0x61, 0x3c, 0x24, 0x6c, 0x55, 0x2c, 0x53, 0x69, 0x8e, + 0x2d, 0xb3, 0xe1, 0x44, 0xec, 0xc3, 0x1a, 0x0c, 0x1b, 0x98, 0xc9, 0xdd, 0x60, 0xa4, 0xc7, 0xdd, + 0xe0, 0x69, 0x18, 0x65, 0x3f, 0xd4, 0x0a, 0x50, 0xb3, 0x51, 0xe5, 0xc5, 0x58, 0xc2, 0xd3, 0x0b, + 0xa6, 0x34, 0xd8, 0x82, 0xa1, 0xb7, 0x0f, 0xb1, 0xa8, 0xd9, 0x2b, 0x73, 0x89, 0x73, 0x39, 0xb1, + 0xe4, 0xb1, 0x84, 0xd9, 0x1f, 0x86, 0xc9, 0x8a, 0x43, 0x5a, 0x81, 0xbf, 0xe2, 0xbb, 0xed, 0xc0, + 0xf3, 0x63, 0x34, 0x0b, 0x43, 0xec, 0x10, 0xe1, 0x2c, 0x60, 0x88, 0x36, 0x84, 0x87, 0xe8, 0x85, + 0xc0, 0xde, 0x86, 0x33, 0x95, 0xe0, 0x9e, 0x7f, 0xcf, 0x09, 0xdd, 0xc5, 0x5a, 0x55, 0xbb, 0x5f, + 0xaf, 0xcb, 0xfb, 0x1d, 0x37, 0xda, 0xca, 0x64, 0xbd, 0x5a, 0x4d, 0x2e, 0xd6, 0xae, 0x7a, 0x4d, + 0x92, 0xa3, 0x05, 0xf9, 0x9b, 0x05, 0xa3, 0xa5, 0x04, 0x5f, 0xbd, 0x6a, 0x59, 0xb9, 0xaf, 0x5a, + 0x6f, 0x42, 0x69, 0xcb, 0x23, 0x4d, 0x17, 0x93, 0x2d, 0xb1, 0x12, 0x9f, 0xca, 0xb7, 0x43, 0x59, + 0xa5, 0x98, 0x52, 0xeb, 0xc5, 0x6f, 0x87, 0xab, 0xa2, 0x32, 0x56, 0x64, 0xd0, 0x2e, 0x4c, 0xcb, + 0x0b, 0x83, 0x84, 0x8a, 0x75, 0xf9, 0x74, 0xaf, 0x5b, 0x88, 0x49, 0xfc, 0xf4, 0x83, 0x83, 0xf9, + 0x69, 0x9c, 0x22, 0x83, 0xbb, 0x08, 0xd3, 0xeb, 0x60, 0x8b, 0x72, 0xe0, 0x21, 0x36, 0xfc, 0xec, + 0x3a, 0xc8, 0x6e, 0xb6, 0xac, 0xd4, 0xfe, 0x61, 0x0b, 0x1e, 0xeb, 0x1a, 0x19, 0x71, 0xc3, 0x3f, + 0xe6, 0x59, 0x48, 0xdf, 0xb8, 0x0b, 0xfd, 0x6f, 0xdc, 0xf6, 0x3f, 0xb0, 0xe0, 0xf4, 0x4a, 0xab, + 0x1d, 0xef, 0x57, 0x3c, 0xf3, 0x09, 0xea, 0x15, 0x18, 0x69, 0x11, 0xd7, 0xeb, 0xb4, 0xc4, 0xcc, + 0xcd, 0x4b, 0x2e, 0xb5, 0xc6, 0x4a, 0x0f, 0x0f, 0xe6, 0x27, 0xea, 0x71, 0x10, 0x3a, 0xdb, 0x84, + 0x17, 0x60, 0x81, 0xce, 0x78, 0xbd, 0xf7, 0x0e, 0xb9, 0xe9, 0xb5, 0x3c, 0x69, 0x57, 0xd4, 0x53, + 0x67, 0xb7, 0x20, 0x07, 0x74, 0xe1, 0xcd, 0x8e, 0xe3, 0xc7, 0x5e, 0xbc, 0x2f, 0x5e, 0x8f, 0x24, + 0x11, 0x9c, 0xd0, 0xb3, 0xbf, 0x62, 0xc1, 0x94, 0x5c, 0xf7, 0x8b, 0xae, 0x1b, 0x92, 0x28, 0x42, + 0x73, 0x50, 0xf0, 0xda, 0xa2, 0x97, 0x20, 0x7a, 0x59, 0xa8, 0xd6, 0x70, 0xc1, 0x6b, 0x4b, 0xb1, + 0x8c, 0x31, 0xc2, 0xa2, 0xf9, 0x90, 0x76, 0x5d, 0x94, 0x63, 0x85, 0x81, 0xae, 0x40, 0xc9, 0x0f, + 0x5c, 0x6e, 0xdb, 0xc5, 0x8f, 0x34, 0xb6, 0xc0, 0xd6, 0x45, 0x19, 0x56, 0x50, 0x54, 0x83, 0x32, + 0x37, 0x7b, 0x4a, 0x16, 0xed, 0x40, 0xc6, 0x53, 0xec, 0xcb, 0x36, 0x64, 0x4d, 0x9c, 0x10, 0xb1, + 0x7f, 0xd9, 0x82, 0x71, 0xf9, 0x65, 0x03, 0xca, 0x9c, 0x74, 0x6b, 0x25, 0xf2, 0x66, 0xb2, 0xb5, + 0xa8, 0xcc, 0xc8, 0x20, 0x86, 0xa8, 0x58, 0x3c, 0x92, 0xa8, 0xf8, 0x3c, 0x8c, 0x39, 0xed, 0x76, + 0xcd, 0x94, 0x33, 0xd9, 0x52, 0x5a, 0x4c, 0x8a, 0xb1, 0x8e, 0x63, 0xff, 0x50, 0x01, 0x26, 0xe5, + 0x17, 0xd4, 0x3b, 0x9b, 0x11, 0x89, 0xd1, 0x06, 0x94, 0x1d, 0x3e, 0x4b, 0x44, 0x2e, 0xf2, 0x27, + 0xb3, 0xf5, 0x08, 0xc6, 0x94, 0x26, 0x07, 0xfe, 0xa2, 0xac, 0x8d, 0x13, 0x42, 0xa8, 0x09, 0x33, + 0x7e, 0x10, 0x33, 0xe6, 0xaf, 0xe0, 0xbd, 0x9e, 0x76, 0xd2, 0xd4, 0xcf, 0x09, 0xea, 0x33, 0xeb, + 0x69, 0x2a, 0xb8, 0x9b, 0x30, 0x5a, 0x91, 0xba, 0x99, 0x62, 0xbe, 0x32, 0x40, 0x9f, 0xb8, 0x6c, + 0xd5, 0x8c, 0xfd, 0x4b, 0x16, 0x94, 0x25, 0xda, 0x49, 0xbc, 0xe2, 0xad, 0xc1, 0x68, 0xc4, 0x26, + 0x41, 0x0e, 0x8d, 0xdd, 0xab, 0xe3, 0x7c, 0xbe, 0x92, 0x33, 0x8d, 0xff, 0x8f, 0xb0, 0xa4, 0xc1, + 0x54, 0xf3, 0xaa, 0xfb, 0xef, 0x11, 0xd5, 0xbc, 0xea, 0x4f, 0xce, 0xa1, 0xf4, 0x07, 0xac, 0xcf, + 0x9a, 0xae, 0x8b, 0x8a, 0x5e, 0xed, 0x90, 0x6c, 0x79, 0xf7, 0xd3, 0xa2, 0x57, 0x8d, 0x95, 0x62, + 0x01, 0x45, 0x6f, 0xc1, 0x78, 0x43, 0xea, 0x64, 0x93, 0x1d, 0x7e, 0xb9, 0xe7, 0xfb, 0x80, 0x7a, + 0x4a, 0xe2, 0xba, 0x90, 0x65, 0xad, 0x3e, 0x36, 0xa8, 0x99, 0x66, 0x04, 0xc5, 0x7e, 0x66, 0x04, + 0x09, 0xdd, 0xfc, 0x47, 0xf5, 0x1f, 0xb1, 0x60, 0x84, 0xeb, 0xe2, 0x06, 0x53, 0x85, 0x6a, 0x2f, + 0x6b, 0xc9, 0xd8, 0xdd, 0xa1, 0x85, 0xe2, 0xa5, 0x0c, 0xad, 0x41, 0x99, 0xfd, 0x60, 0xba, 0xc4, + 0x62, 0xbe, 0xd5, 0x3d, 0x6f, 0x55, 0xef, 0xe0, 0x1d, 0x59, 0x0d, 0x27, 0x14, 0xec, 0x1f, 0x28, + 0x52, 0xee, 0x96, 0xa0, 0x1a, 0x87, 0xbe, 0xf5, 0xe8, 0x0e, 0xfd, 0xc2, 0xa3, 0x3a, 0xf4, 0xb7, + 0x61, 0xaa, 0xa1, 0xbd, 0xc3, 0x25, 0x33, 0x79, 0xa5, 0xe7, 0x22, 0xd1, 0x9e, 0xec, 0xb8, 0x96, + 0x65, 0xd9, 0x24, 0x82, 0xd3, 0x54, 0xd1, 0x37, 0xc3, 0x38, 0x9f, 0x67, 0xd1, 0x0a, 0xb7, 0xc4, + 0xf8, 0x50, 0xfe, 0x7a, 0xd1, 0x9b, 0xe0, 0x5a, 0x39, 0xad, 0x3a, 0x36, 0x88, 0xd9, 0x7f, 0x6c, + 0x01, 0x5a, 0x69, 0xef, 0x90, 0x16, 0x09, 0x9d, 0x66, 0xa2, 0x4e, 0xff, 0x2b, 0x16, 0xcc, 0x92, + 0xae, 0xe2, 0xe5, 0xa0, 0xd5, 0x12, 0x97, 0x96, 0x9c, 0x7b, 0xf5, 0x4a, 0x4e, 0x1d, 0xe5, 0x96, + 0x30, 0x9b, 0x87, 0x81, 0x73, 0xdb, 0x43, 0x6b, 0x70, 0x8a, 0x9f, 0x92, 0x0a, 0xa0, 0xd9, 0x5e, + 0x3f, 0x2e, 0x08, 0x9f, 0xda, 0xe8, 0x46, 0xc1, 0x59, 0xf5, 0xec, 0xef, 0x18, 0x87, 0xdc, 0x5e, + 0xbc, 0xff, 0x8e, 0xf0, 0xfe, 0x3b, 0xc2, 0xfb, 0xef, 0x08, 0xef, 0xbf, 0x23, 0xbc, 0xff, 0x8e, + 0xf0, 0x75, 0xff, 0x8e, 0xf0, 0x87, 0x16, 0x9c, 0xea, 0x3e, 0x06, 0x4e, 0x42, 0x30, 0xef, 0xc0, + 0xa9, 0xee, 0xb3, 0xae, 0xa7, 0x9d, 0x5d, 0x77, 0x3f, 0x93, 0x73, 0x2f, 0xe3, 0x1b, 0x70, 0x16, + 0x7d, 0xfb, 0xe7, 0x4b, 0x30, 0xbc, 0xb2, 0x47, 0xfc, 0xf8, 0x04, 0x3e, 0xb1, 0x01, 0x93, 0x9e, + 0xbf, 0x17, 0x34, 0xf7, 0x88, 0xcb, 0xe1, 0x47, 0xb9, 0x22, 0x9f, 0x15, 0xa4, 0x27, 0xab, 0x06, + 0x09, 0x9c, 0x22, 0xf9, 0x28, 0xd4, 0xd4, 0xd7, 0x60, 0x84, 0x9f, 0x0e, 0x42, 0x47, 0x9d, 0x79, + 0x18, 0xb0, 0x41, 0x14, 0x67, 0x5e, 0xa2, 0x42, 0xe7, 0xa7, 0x8f, 0xa8, 0x8e, 0x3e, 0x0f, 0x93, + 0x5b, 0x5e, 0x18, 0xc5, 0x1b, 0x5e, 0x8b, 0x44, 0xb1, 0xd3, 0x6a, 0x3f, 0x84, 0x5a, 0x5a, 0x8d, + 0xc3, 0xaa, 0x41, 0x09, 0xa7, 0x28, 0xa3, 0x6d, 0x98, 0x68, 0x3a, 0x7a, 0x53, 0xa3, 0x47, 0x6e, + 0x4a, 0x1d, 0x3b, 0x37, 0x75, 0x42, 0xd8, 0xa4, 0x4b, 0xf7, 0x69, 0x83, 0x69, 0x56, 0x4b, 0x4c, + 0xdf, 0xa0, 0xf6, 0x29, 0x57, 0xa9, 0x72, 0x18, 0x95, 0xa0, 0x98, 0xe5, 0x6d, 0xd9, 0x94, 0xa0, + 0x34, 0xfb, 0xda, 0xcf, 0x41, 0x99, 0xd0, 0x21, 0xa4, 0x84, 0xc5, 0xc9, 0x75, 0x75, 0xb0, 0xbe, + 0xae, 0x79, 0x8d, 0x30, 0x30, 0x1f, 0x04, 0x56, 0x24, 0x25, 0x9c, 0x10, 0x45, 0xcb, 0x30, 0x12, + 0x91, 0xd0, 0x23, 0x91, 0x38, 0xc3, 0x7a, 0x4c, 0x23, 0x43, 0xe3, 0x4e, 0x2b, 0xfc, 0x37, 0x16, + 0x55, 0xe9, 0xf2, 0x72, 0x98, 0xae, 0x94, 0x9d, 0x32, 0xda, 0xf2, 0x5a, 0x64, 0xa5, 0x58, 0x40, + 0xd1, 0x1b, 0x30, 0x1a, 0x92, 0x26, 0x7b, 0x71, 0x9a, 0x18, 0x7c, 0x91, 0xf3, 0x07, 0x2c, 0x5e, + 0x0f, 0x4b, 0x02, 0xe8, 0x06, 0xa0, 0x90, 0x50, 0x09, 0xcc, 0xf3, 0xb7, 0x95, 0x3d, 0xaa, 0xe0, + 0xe0, 0x6a, 0xc7, 0xe3, 0x04, 0x43, 0xfa, 0x0f, 0xe1, 0x8c, 0x6a, 0xe8, 0x1a, 0xcc, 0xa8, 0xd2, + 0xaa, 0x1f, 0xc5, 0x0e, 0xe5, 0x9c, 0x53, 0x8c, 0x96, 0x52, 0x80, 0xe0, 0x34, 0x02, 0xee, 0xae, + 0x63, 0xff, 0xa4, 0x05, 0x7c, 0x9c, 0x4f, 0xe0, 0xda, 0xff, 0xba, 0x79, 0xed, 0x3f, 0x97, 0x3b, + 0x73, 0x39, 0x57, 0xfe, 0x07, 0x16, 0x8c, 0x69, 0x33, 0x9b, 0xac, 0x59, 0xab, 0xc7, 0x9a, 0xed, + 0xc0, 0x34, 0x5d, 0xe9, 0xb7, 0x36, 0x23, 0x12, 0xee, 0x11, 0x97, 0x2d, 0xcc, 0xc2, 0xc3, 0x2d, + 0x4c, 0x65, 0xfb, 0x76, 0x33, 0x45, 0x10, 0x77, 0x35, 0x81, 0x5e, 0x91, 0xcf, 0x2f, 0x45, 0xc3, + 0xce, 0x9c, 0x3f, 0xad, 0x1c, 0x1e, 0xcc, 0x4f, 0x6b, 0x1f, 0xa2, 0x3f, 0xb7, 0xd8, 0x9f, 0x93, + 0xdf, 0xa8, 0x6c, 0x0c, 0x1b, 0x6a, 0xb1, 0xa4, 0x6c, 0x0c, 0xd5, 0x72, 0xc0, 0x09, 0x0e, 0xdd, + 0xa3, 0x3b, 0x41, 0x14, 0xa7, 0x6d, 0x0c, 0xaf, 0x07, 0x51, 0x8c, 0x19, 0xc4, 0x7e, 0x11, 0x60, + 0xe5, 0x3e, 0x69, 0xf0, 0xa5, 0xae, 0x5f, 0x67, 0xac, 0xfc, 0xeb, 0x8c, 0xfd, 0x5b, 0x16, 0x4c, + 0xae, 0x2e, 0x1b, 0x4a, 0xe4, 0x05, 0x00, 0x7e, 0x07, 0xbb, 0x7b, 0x77, 0x5d, 0x3e, 0xd0, 0xf3, + 0x37, 0x56, 0x55, 0x8a, 0x35, 0x0c, 0x74, 0x0e, 0x8a, 0xcd, 0x8e, 0x2f, 0x14, 0x9a, 0xa3, 0xf4, + 0xc0, 0xbe, 0xd9, 0xf1, 0x31, 0x2d, 0xd3, 0x9c, 0x1c, 0x8a, 0x03, 0x3b, 0x39, 0xf4, 0x0d, 0x36, + 0x80, 0xe6, 0x61, 0xf8, 0xde, 0x3d, 0xcf, 0xe5, 0x2e, 0x9d, 0xc2, 0x78, 0xe0, 0xee, 0xdd, 0x6a, + 0x25, 0xc2, 0xbc, 0xdc, 0xfe, 0x52, 0x11, 0xe6, 0x56, 0x9b, 0xe4, 0xfe, 0xbb, 0x74, 0x6b, 0x1d, + 0xd4, 0x45, 0xe3, 0x68, 0xaa, 0xa1, 0xa3, 0xba, 0xe1, 0xf4, 0x1f, 0x8f, 0x2d, 0x18, 0xe5, 0x26, + 0x76, 0xd2, 0xc9, 0xf5, 0xb5, 0xac, 0xd6, 0xf3, 0x07, 0x64, 0x81, 0x9b, 0xea, 0x09, 0x1f, 0x3d, + 0x75, 0xd2, 0x8a, 0x52, 0x2c, 0x89, 0xcf, 0x7d, 0x0c, 0xc6, 0x75, 0xcc, 0x23, 0x39, 0xc4, 0xfd, + 0xe5, 0x22, 0x4c, 0xd3, 0x1e, 0x3c, 0xd2, 0x89, 0xb8, 0xdd, 0x3d, 0x11, 0xc7, 0xed, 0x14, 0xd5, + 0x7f, 0x36, 0xde, 0x4a, 0xcf, 0xc6, 0xf3, 0x79, 0xb3, 0x71, 0xd2, 0x73, 0xf0, 0xed, 0x16, 0x9c, + 0x5a, 0x6d, 0x06, 0x8d, 0xdd, 0x94, 0xe3, 0xd2, 0xcb, 0x30, 0x46, 0xf9, 0x78, 0x64, 0xf8, 0xd4, + 0x1b, 0x51, 0x16, 0x04, 0x08, 0xeb, 0x78, 0x5a, 0xb5, 0xdb, 0xb7, 0xab, 0x95, 0xac, 0xe0, 0x0c, + 0x02, 0x84, 0x75, 0x3c, 0xfb, 0x37, 0x2c, 0xb8, 0x70, 0x6d, 0x79, 0x25, 0x59, 0x8a, 0x5d, 0xf1, + 0x21, 0x2e, 0xc3, 0x48, 0xdb, 0xd5, 0xba, 0x92, 0x28, 0x7c, 0x2b, 0xac, 0x17, 0x02, 0xfa, 0x5e, + 0x89, 0x7d, 0xf2, 0x13, 0x16, 0x9c, 0xba, 0xe6, 0xc5, 0xf4, 0x58, 0x4e, 0x47, 0x2a, 0xa0, 0xe7, + 0x72, 0xe4, 0xc5, 0x41, 0xb8, 0x9f, 0x8e, 0x54, 0x80, 0x15, 0x04, 0x6b, 0x58, 0xbc, 0xe5, 0x3d, + 0x8f, 0x19, 0x77, 0x17, 0xcc, 0xa7, 0x2f, 0x2c, 0xca, 0xb1, 0xc2, 0xa0, 0x1f, 0xe6, 0x7a, 0x21, + 0xd3, 0x1a, 0xee, 0x0b, 0x0e, 0xab, 0x3e, 0xac, 0x22, 0x01, 0x38, 0xc1, 0xa1, 0x17, 0xa8, 0xf9, + 0x6b, 0xcd, 0x4e, 0x14, 0x93, 0x70, 0x2b, 0xca, 0xe1, 0x8e, 0x2f, 0x42, 0x99, 0x48, 0x1d, 0xbd, + 0xe8, 0xb5, 0x12, 0x35, 0x95, 0xf2, 0x9e, 0x07, 0x4c, 0x50, 0x78, 0x03, 0xb8, 0x41, 0x1e, 0xcd, + 0x8f, 0x6d, 0x15, 0x10, 0xd1, 0xdb, 0xd2, 0x23, 0x48, 0x30, 0x57, 0xf4, 0x95, 0x2e, 0x28, 0xce, + 0xa8, 0x61, 0xff, 0xb0, 0x05, 0x67, 0xd4, 0x07, 0xbf, 0xe7, 0x3e, 0xd3, 0xfe, 0x99, 0x02, 0x4c, + 0x5c, 0xdf, 0xd8, 0xa8, 0x5d, 0x23, 0xb1, 0x38, 0xb6, 0xfb, 0xbf, 0xbc, 0x63, 0xed, 0x01, 0xb1, + 0xd7, 0x2d, 0xb0, 0x13, 0x7b, 0xcd, 0x05, 0x1e, 0x88, 0x68, 0xa1, 0xea, 0xc7, 0xb7, 0xc2, 0x7a, + 0x1c, 0x7a, 0xfe, 0x76, 0xe6, 0x93, 0xa3, 0x14, 0x2e, 0x8a, 0x79, 0xc2, 0x05, 0x7a, 0x11, 0x46, + 0x58, 0x24, 0x24, 0x39, 0x09, 0x8f, 0xab, 0x4b, 0x14, 0x2b, 0x3d, 0x3c, 0x98, 0x2f, 0xdf, 0xc6, + 0x55, 0xfe, 0x07, 0x0b, 0x54, 0x74, 0x1b, 0xc6, 0x76, 0xe2, 0xb8, 0x7d, 0x9d, 0x38, 0x2e, 0xbd, + 0x2d, 0x73, 0x76, 0x78, 0x31, 0x8b, 0x1d, 0xd2, 0x41, 0xe0, 0x68, 0x09, 0x07, 0x49, 0xca, 0x22, + 0xac, 0xd3, 0xb1, 0xeb, 0x00, 0x09, 0xec, 0x98, 0xde, 0x4e, 0xec, 0xdf, 0xb7, 0x60, 0x94, 0x07, + 0xa5, 0x08, 0xd1, 0xc7, 0x61, 0x88, 0xdc, 0x27, 0x0d, 0x21, 0x2a, 0x67, 0x76, 0x38, 0x91, 0xb4, + 0xb8, 0x0e, 0x98, 0xfe, 0xc7, 0xac, 0x16, 0xba, 0x0e, 0xa3, 0xb4, 0xb7, 0xd7, 0x54, 0x84, 0x8e, + 0x27, 0xf2, 0xbe, 0x58, 0x4d, 0x3b, 0x17, 0xce, 0x44, 0x11, 0x96, 0xd5, 0xd9, 0x83, 0x75, 0xa3, + 0x5d, 0xa7, 0x1c, 0x3b, 0xee, 0x25, 0x58, 0x6c, 0x2c, 0xd7, 0x38, 0x92, 0xa0, 0xc6, 0x1f, 0xac, + 0x65, 0x21, 0x4e, 0x88, 0xd8, 0x1b, 0x50, 0xa6, 0x93, 0xba, 0xd8, 0xf4, 0x9c, 0xde, 0x6f, 0xf0, + 0xcf, 0x40, 0x59, 0xbe, 0xb0, 0x47, 0xc2, 0x19, 0x9d, 0x51, 0x95, 0x0f, 0xf0, 0x11, 0x4e, 0xe0, + 0xf6, 0x16, 0x9c, 0x66, 0xf6, 0x92, 0x4e, 0xbc, 0x63, 0xec, 0xb1, 0xfe, 0x8b, 0xf9, 0x59, 0x71, + 0xf3, 0xe4, 0x33, 0x33, 0xab, 0xf9, 0x7b, 0x8e, 0x4b, 0x8a, 0xc9, 0x2d, 0xd4, 0xfe, 0xea, 0x10, + 0x3c, 0x5e, 0xad, 0xe7, 0xc7, 0x2b, 0x79, 0x15, 0xc6, 0xb9, 0x5c, 0x4a, 0x97, 0xb6, 0xd3, 0x14, + 0xed, 0x2a, 0xe5, 0xef, 0x86, 0x06, 0xc3, 0x06, 0x26, 0xba, 0x00, 0x45, 0xef, 0x6d, 0x3f, 0xed, + 0x0d, 0x55, 0x7d, 0x73, 0x1d, 0xd3, 0x72, 0x0a, 0xa6, 0x22, 0x2e, 0x3f, 0x3b, 0x14, 0x58, 0x89, + 0xb9, 0xaf, 0xc3, 0xa4, 0x17, 0x35, 0x22, 0xaf, 0xea, 0x53, 0x3e, 0xa3, 0x71, 0x2a, 0xa5, 0x15, + 0xa1, 0x9d, 0x56, 0x50, 0x9c, 0xc2, 0xd6, 0x0e, 0xb2, 0xe1, 0x81, 0xc5, 0xe4, 0xbe, 0xde, 0xd9, + 0xf4, 0x06, 0xd0, 0x66, 0x5f, 0x17, 0x31, 0x2d, 0xbe, 0xb8, 0x01, 0xf0, 0x0f, 0x8e, 0xb0, 0x84, + 0xd1, 0x2b, 0x67, 0x63, 0xc7, 0x69, 0x2f, 0x76, 0xe2, 0x9d, 0x8a, 0x17, 0x35, 0x82, 0x3d, 0x12, + 0xee, 0x33, 0x6d, 0x41, 0x29, 0xb9, 0x72, 0x2a, 0xc0, 0xf2, 0xf5, 0xc5, 0x1a, 0xc5, 0xc4, 0xdd, + 0x75, 0xd0, 0x22, 0x4c, 0xc9, 0xc2, 0x3a, 0x89, 0xd8, 0x11, 0x36, 0xc6, 0xc8, 0x28, 0xff, 0x24, + 0x51, 0xac, 0x88, 0xa4, 0xf1, 0x4d, 0x49, 0x1a, 0x8e, 0x43, 0x92, 0x7e, 0x05, 0x26, 0x3c, 0xdf, + 0x8b, 0x3d, 0x27, 0x0e, 0xf8, 0x13, 0x14, 0x57, 0x0c, 0x30, 0xdd, 0x7a, 0x55, 0x07, 0x60, 0x13, + 0xcf, 0xfe, 0x6f, 0x43, 0x30, 0xc3, 0xa6, 0xed, 0xfd, 0x15, 0xf6, 0xf5, 0xb4, 0xc2, 0x6e, 0x77, + 0xaf, 0xb0, 0xe3, 0xb8, 0x22, 0x3c, 0xf4, 0x32, 0xfb, 0x3c, 0x94, 0x95, 0x4b, 0x96, 0xf4, 0xc9, + 0xb4, 0x72, 0x7c, 0x32, 0xfb, 0x4b, 0x1f, 0xd2, 0xaa, 0xad, 0x98, 0x69, 0xd5, 0xf6, 0xb7, 0x2d, + 0x48, 0xde, 0x54, 0xd0, 0x75, 0x28, 0xb7, 0x03, 0x66, 0xac, 0x19, 0x4a, 0x0b, 0xe8, 0xc7, 0x33, + 0x0f, 0x2a, 0x7e, 0x28, 0xf2, 0x8f, 0xaf, 0xc9, 0x1a, 0x38, 0xa9, 0x8c, 0x96, 0x60, 0xb4, 0x1d, + 0x92, 0x7a, 0xcc, 0xc2, 0x96, 0xf4, 0xa5, 0xc3, 0xd7, 0x08, 0xc7, 0xc7, 0xb2, 0xa2, 0xfd, 0xb3, + 0x16, 0x00, 0x37, 0x1c, 0x73, 0xfc, 0x6d, 0x72, 0x02, 0xea, 0xee, 0x0a, 0x0c, 0x45, 0x6d, 0xd2, + 0xe8, 0x65, 0x46, 0x9b, 0xf4, 0xa7, 0xde, 0x26, 0x8d, 0x64, 0xc0, 0xe9, 0x3f, 0xcc, 0x6a, 0xdb, + 0xdf, 0x09, 0x30, 0x99, 0xa0, 0x55, 0x63, 0xd2, 0x42, 0xcf, 0x19, 0x61, 0x0c, 0xce, 0xa5, 0xc2, + 0x18, 0x94, 0x19, 0xb6, 0xa6, 0x59, 0xfd, 0x3c, 0x14, 0x5b, 0xce, 0x7d, 0xa1, 0x3a, 0x7b, 0xa6, + 0x77, 0x37, 0x28, 0xfd, 0x85, 0x35, 0xe7, 0x3e, 0xbf, 0x24, 0x3e, 0x23, 0x17, 0xc8, 0x9a, 0x73, + 0xff, 0x90, 0x1b, 0xcb, 0x32, 0x26, 0x75, 0xd3, 0x8b, 0xe2, 0x2f, 0xfc, 0xd7, 0xe4, 0x3f, 0x5b, + 0x76, 0xb4, 0x11, 0xd6, 0x96, 0xe7, 0x0b, 0x9b, 0xa8, 0x81, 0xda, 0xf2, 0xfc, 0x74, 0x5b, 0x9e, + 0x3f, 0x40, 0x5b, 0x9e, 0x8f, 0xde, 0x81, 0x51, 0x61, 0xb2, 0x28, 0xc2, 0x06, 0x5d, 0x1d, 0xa0, + 0x3d, 0x61, 0xf1, 0xc8, 0xdb, 0xbc, 0x2a, 0x2f, 0xc1, 0xa2, 0xb4, 0x6f, 0xbb, 0xb2, 0x41, 0xf4, + 0x37, 0x2c, 0x98, 0x14, 0xbf, 0x31, 0x79, 0xbb, 0x43, 0xa2, 0x58, 0xc8, 0x9e, 0x1f, 0x1d, 0xbc, + 0x0f, 0xa2, 0x22, 0xef, 0xca, 0x47, 0x25, 0x9b, 0x35, 0x81, 0x7d, 0x7b, 0x94, 0xea, 0x05, 0xfa, + 0x47, 0x16, 0x9c, 0x6e, 0x39, 0xf7, 0x79, 0x8b, 0xbc, 0x0c, 0x3b, 0xb1, 0x17, 0x88, 0xa7, 0xff, + 0x8f, 0x0f, 0x36, 0xfd, 0x5d, 0xd5, 0x79, 0x27, 0xe5, 0xfb, 0xe4, 0xe9, 0x2c, 0x94, 0xbe, 0x5d, + 0xcd, 0xec, 0xd7, 0xdc, 0x16, 0x94, 0xe4, 0x7a, 0xcb, 0x50, 0x35, 0x54, 0x74, 0xc1, 0xfa, 0xc8, + 0x16, 0xa3, 0x7a, 0x78, 0x00, 0xda, 0x8e, 0x58, 0x6b, 0x8f, 0xb4, 0x9d, 0xcf, 0xc3, 0xb8, 0xbe, + 0xc6, 0x1e, 0x69, 0x5b, 0x6f, 0xc3, 0xa9, 0x8c, 0xb5, 0xf4, 0x48, 0x9b, 0xbc, 0x07, 0xe7, 0x72, + 0xd7, 0xc7, 0xa3, 0x6c, 0xd8, 0xfe, 0x19, 0x4b, 0xe7, 0x83, 0x27, 0xf0, 0xe6, 0xb0, 0x6c, 0xbe, + 0x39, 0x5c, 0xec, 0xbd, 0x73, 0x72, 0x1e, 0x1e, 0xde, 0xd2, 0x3b, 0x4d, 0xb9, 0x3a, 0x7a, 0x03, + 0x46, 0x9a, 0xb4, 0x44, 0x1a, 0xbe, 0xda, 0xfd, 0x77, 0x64, 0x22, 0x4b, 0xb1, 0xf2, 0x08, 0x0b, + 0x0a, 0xf6, 0x2f, 0x58, 0x30, 0x74, 0x02, 0x23, 0x81, 0xcd, 0x91, 0x78, 0x2e, 0x97, 0xb4, 0x88, + 0x68, 0xbc, 0x80, 0x9d, 0x7b, 0x2b, 0xf7, 0x63, 0xe2, 0x47, 0xec, 0xaa, 0x98, 0x39, 0x30, 0xff, + 0x1f, 0x9c, 0xba, 0x19, 0x38, 0xee, 0x92, 0xd3, 0x74, 0xfc, 0x06, 0x09, 0xab, 0xfe, 0xf6, 0x91, + 0x8c, 0xb6, 0x0b, 0xfd, 0x8c, 0xb6, 0xed, 0x1d, 0x40, 0x7a, 0x03, 0xc2, 0xfb, 0x05, 0xc3, 0xa8, + 0xc7, 0x9b, 0x12, 0xc3, 0xff, 0x54, 0xb6, 0x68, 0xd6, 0xd5, 0x33, 0xcd, 0xaf, 0x83, 0x17, 0x60, + 0x49, 0xc8, 0x7e, 0x15, 0x32, 0x5d, 0xe8, 0xfb, 0xab, 0x0d, 0xec, 0x4f, 0xc1, 0x0c, 0xab, 0x79, + 0xc4, 0x2b, 0xad, 0x9d, 0xd2, 0x4a, 0x66, 0x04, 0xd7, 0xb3, 0xbf, 0x68, 0xc1, 0xd4, 0x7a, 0x2a, + 0xe6, 0xd8, 0x65, 0xf6, 0x00, 0x9a, 0xa1, 0x0c, 0xaf, 0xb3, 0x52, 0x2c, 0xa0, 0xc7, 0xae, 0x83, + 0xfa, 0x73, 0x0b, 0x92, 0xa8, 0x16, 0x27, 0x20, 0x78, 0x2d, 0x1b, 0x82, 0x57, 0xa6, 0x6e, 0x44, + 0x75, 0x27, 0x4f, 0xee, 0x42, 0x37, 0x54, 0xbc, 0xa7, 0x1e, 0x6a, 0x91, 0x84, 0x0c, 0x8f, 0x0e, + 0x34, 0x69, 0x06, 0x85, 0x92, 0x11, 0xa0, 0xec, 0xff, 0x5c, 0x00, 0xa4, 0x70, 0x07, 0x8e, 0x47, + 0xd5, 0x5d, 0xe3, 0x78, 0xe2, 0x51, 0xed, 0x01, 0x62, 0x4f, 0xf8, 0xa1, 0xe3, 0x47, 0x9c, 0xac, + 0x27, 0xb4, 0x6e, 0x47, 0xb3, 0x0f, 0x98, 0x13, 0x4d, 0xa2, 0x9b, 0x5d, 0xd4, 0x70, 0x46, 0x0b, + 0x9a, 0x69, 0xc6, 0xf0, 0xa0, 0xa6, 0x19, 0x23, 0x7d, 0x3c, 0xdc, 0x7e, 0xda, 0x82, 0x09, 0x35, + 0x4c, 0xef, 0x11, 0xfb, 0x73, 0xd5, 0x9f, 0x1c, 0xd6, 0x57, 0xd3, 0xba, 0xcc, 0x8e, 0x84, 0x6f, + 0x64, 0x9e, 0x8a, 0x4e, 0xd3, 0x7b, 0x87, 0xa8, 0x68, 0x80, 0xf3, 0xc2, 0xf3, 0x50, 0x94, 0x1e, + 0x1e, 0xcc, 0x4f, 0xa8, 0x7f, 0x3c, 0xfa, 0x70, 0x52, 0xc5, 0xfe, 0x31, 0xba, 0xd9, 0xcd, 0xa5, + 0x88, 0x5e, 0x86, 0xe1, 0xf6, 0x8e, 0x13, 0x91, 0x94, 0x9f, 0xce, 0x70, 0x8d, 0x16, 0x1e, 0x1e, + 0xcc, 0x4f, 0xaa, 0x0a, 0xac, 0x04, 0x73, 0xec, 0xc1, 0xa3, 0x7c, 0x75, 0x2f, 0xce, 0xbe, 0x51, + 0xbe, 0xfe, 0xd8, 0x82, 0xa1, 0xf5, 0xc0, 0x3d, 0x09, 0x16, 0xf0, 0xba, 0xc1, 0x02, 0xce, 0xe7, + 0x05, 0x86, 0xcf, 0xdd, 0xfd, 0xab, 0xa9, 0xdd, 0x7f, 0x31, 0x97, 0x42, 0xef, 0x8d, 0xdf, 0x82, + 0x31, 0x16, 0x6e, 0x5e, 0xf8, 0x24, 0xbd, 0x68, 0x6c, 0xf8, 0xf9, 0xd4, 0x86, 0x9f, 0xd2, 0x50, + 0xb5, 0x9d, 0xfe, 0x34, 0x8c, 0x0a, 0x27, 0x97, 0xb4, 0xc3, 0xa7, 0xc0, 0xc5, 0x12, 0x6e, 0xff, + 0x48, 0x11, 0x8c, 0xf0, 0xf6, 0xe8, 0x97, 0x2c, 0x58, 0x08, 0xb9, 0xf1, 0xab, 0x5b, 0xe9, 0x84, + 0x9e, 0xbf, 0x5d, 0x6f, 0xec, 0x10, 0xb7, 0xd3, 0xf4, 0xfc, 0xed, 0xea, 0xb6, 0x1f, 0xa8, 0xe2, + 0x95, 0xfb, 0xa4, 0xd1, 0x61, 0xcf, 0x57, 0x7d, 0x62, 0xe9, 0x2b, 0x23, 0xf2, 0x17, 0x1e, 0x1c, + 0xcc, 0x2f, 0xe0, 0x23, 0xd1, 0xc6, 0x47, 0xec, 0x0b, 0xfa, 0x0d, 0x0b, 0xae, 0xf2, 0xa8, 0xef, + 0x83, 0xf7, 0xbf, 0xc7, 0x3d, 0xb7, 0x26, 0x49, 0x25, 0x44, 0x36, 0x48, 0xd8, 0x5a, 0x7a, 0x45, + 0x0c, 0xe8, 0xd5, 0xda, 0xd1, 0xda, 0xc2, 0x47, 0xed, 0x9c, 0xfd, 0x2f, 0x8b, 0x30, 0x21, 0xa2, + 0x41, 0x89, 0x33, 0xe0, 0x65, 0x63, 0x49, 0x3c, 0x91, 0x5a, 0x12, 0x33, 0x06, 0xf2, 0xf1, 0xb0, + 0xff, 0x08, 0x66, 0x28, 0x73, 0xbe, 0x4e, 0x9c, 0x30, 0xde, 0x24, 0x0e, 0xb7, 0xb8, 0x2a, 0x1e, + 0x99, 0xfb, 0x2b, 0xc5, 0xda, 0xcd, 0x34, 0x31, 0xdc, 0x4d, 0xff, 0xeb, 0xe9, 0xcc, 0xf1, 0x61, + 0xba, 0x2b, 0xa0, 0xd7, 0xa7, 0xa1, 0xac, 0x3c, 0x34, 0x04, 0xd3, 0xe9, 0x1d, 0x17, 0x2f, 0x4d, + 0x81, 0x2b, 0xbf, 0x12, 0xef, 0xa0, 0x84, 0x9c, 0xfd, 0x8f, 0x0b, 0x46, 0x83, 0x7c, 0x12, 0xd7, + 0xa1, 0xe4, 0x44, 0x91, 0xb7, 0xed, 0x13, 0x57, 0xec, 0xd8, 0x0f, 0xe6, 0xed, 0x58, 0xa3, 0x19, + 0xe6, 0x25, 0xb3, 0x28, 0x6a, 0x62, 0x45, 0x03, 0x5d, 0xe7, 0x76, 0x6d, 0x7b, 0xf2, 0xa6, 0x36, + 0x18, 0x35, 0x90, 0x96, 0x6f, 0x7b, 0x04, 0x8b, 0xfa, 0xe8, 0x33, 0xdc, 0xf0, 0xf0, 0x86, 0x1f, + 0xdc, 0xf3, 0xaf, 0x05, 0x81, 0x8c, 0xb8, 0x30, 0x18, 0xc1, 0x19, 0x69, 0x6e, 0xa8, 0xaa, 0x63, + 0x93, 0xda, 0x60, 0x11, 0x32, 0xbf, 0x05, 0x4e, 0x51, 0xd2, 0xa6, 0x43, 0x74, 0x84, 0x08, 0x4c, + 0x89, 0x50, 0x63, 0xb2, 0x4c, 0x8c, 0x5d, 0xe6, 0x25, 0xcc, 0xac, 0x9d, 0x68, 0x80, 0x6f, 0x98, + 0x24, 0x70, 0x9a, 0xa6, 0xfd, 0xe3, 0x16, 0x30, 0xe7, 0xd0, 0x13, 0x90, 0x47, 0x3e, 0x61, 0xca, + 0x23, 0xb3, 0x79, 0x83, 0x9c, 0x23, 0x8a, 0xbc, 0xc4, 0x57, 0x56, 0x2d, 0x0c, 0xee, 0xef, 0x0b, + 0xa3, 0x8f, 0xfe, 0xf7, 0x0f, 0xfb, 0xff, 0x58, 0x9c, 0x89, 0x29, 0xff, 0x09, 0xf4, 0xad, 0x50, + 0x6a, 0x38, 0x6d, 0xa7, 0xc1, 0x73, 0xb1, 0xe4, 0xea, 0xe2, 0x8c, 0x4a, 0x0b, 0xcb, 0xa2, 0x06, + 0xd7, 0x2d, 0xc9, 0x90, 0x75, 0x25, 0x59, 0xdc, 0x57, 0x9f, 0xa4, 0x9a, 0x9c, 0xdb, 0x85, 0x09, + 0x83, 0xd8, 0x23, 0x55, 0x44, 0x7c, 0x2b, 0x3f, 0x62, 0x55, 0x88, 0xc5, 0x16, 0xcc, 0xf8, 0xda, + 0x7f, 0x7a, 0xa0, 0xc8, 0xcb, 0xe5, 0x07, 0xfb, 0x1d, 0xa2, 0xec, 0xf4, 0xd1, 0xfc, 0x4e, 0x53, + 0x64, 0x70, 0x37, 0x65, 0xfb, 0x47, 0x2d, 0x78, 0x4c, 0x47, 0xd4, 0x5c, 0x5b, 0xfa, 0x69, 0xf7, + 0x2b, 0x50, 0x0a, 0xda, 0x24, 0x74, 0xe2, 0x20, 0x14, 0xa7, 0xc6, 0x15, 0x39, 0xe8, 0xb7, 0x44, + 0xf9, 0xa1, 0x88, 0x64, 0x2e, 0xa9, 0xcb, 0x72, 0xac, 0x6a, 0xd2, 0xdb, 0x27, 0x1b, 0x8c, 0x48, + 0x38, 0x31, 0x31, 0x1e, 0xc0, 0x1e, 0xba, 0x23, 0x2c, 0x20, 0xf6, 0x57, 0x2d, 0xbe, 0xb0, 0xf4, + 0xae, 0xa3, 0xb7, 0x61, 0xba, 0xe5, 0xc4, 0x8d, 0x9d, 0x95, 0xfb, 0xed, 0x90, 0xbf, 0x95, 0xc8, + 0x71, 0x7a, 0xa6, 0xdf, 0x38, 0x69, 0x1f, 0x99, 0xd8, 0x52, 0xae, 0xa5, 0x88, 0xe1, 0x2e, 0xf2, + 0x68, 0x13, 0xc6, 0x58, 0x19, 0xf3, 0xcf, 0x8b, 0x7a, 0x89, 0x06, 0x79, 0xad, 0x29, 0x5b, 0x81, + 0xb5, 0x84, 0x0e, 0xd6, 0x89, 0xda, 0x3f, 0x55, 0xe4, 0xbb, 0x9d, 0x89, 0xf2, 0x4f, 0xc3, 0x68, + 0x3b, 0x70, 0x97, 0xab, 0x15, 0x2c, 0x66, 0x41, 0x1d, 0x23, 0x35, 0x5e, 0x8c, 0x25, 0x1c, 0x5d, + 0x81, 0x92, 0xf8, 0x29, 0xdf, 0xb6, 0x18, 0x6f, 0x16, 0x78, 0x11, 0x56, 0x50, 0xf4, 0x02, 0x40, + 0x3b, 0x0c, 0xf6, 0x3c, 0x97, 0xc5, 0x8d, 0x28, 0x9a, 0x66, 0x3e, 0x35, 0x05, 0xc1, 0x1a, 0x16, + 0x7a, 0x0d, 0x26, 0x3a, 0x7e, 0xc4, 0xc5, 0x11, 0x2d, 0x4a, 0xac, 0x32, 0x40, 0xb9, 0xad, 0x03, + 0xb1, 0x89, 0x8b, 0x16, 0x61, 0x24, 0x76, 0x98, 0xd9, 0xca, 0x70, 0xbe, 0xbd, 0xed, 0x06, 0xc5, + 0xd0, 0xd3, 0x7e, 0xd0, 0x0a, 0x58, 0x54, 0x44, 0x9f, 0x96, 0xae, 0xb2, 0x9c, 0xb1, 0x0b, 0x43, + 0xf7, 0xc1, 0x0e, 0x01, 0xcd, 0x51, 0x56, 0x18, 0xd0, 0x1b, 0xb4, 0xd0, 0xc7, 0x00, 0xc8, 0xfd, + 0x98, 0x84, 0xbe, 0xd3, 0x54, 0x56, 0x61, 0x4a, 0x2e, 0xa8, 0x04, 0xeb, 0x41, 0x7c, 0x3b, 0x22, + 0x2b, 0x0a, 0x03, 0x6b, 0xd8, 0xf6, 0x6f, 0x94, 0x01, 0x12, 0xb9, 0x1d, 0xbd, 0xd3, 0xc5, 0xb8, + 0x9e, 0xed, 0x2d, 0xe9, 0x1f, 0x1f, 0xd7, 0x42, 0xdf, 0x65, 0xc1, 0x98, 0xd3, 0x6c, 0x06, 0x0d, + 0x87, 0xc7, 0xf1, 0x2d, 0xf4, 0x66, 0x9c, 0xa2, 0xfd, 0xc5, 0xa4, 0x06, 0xef, 0xc2, 0x8b, 0x72, + 0x85, 0x6a, 0x90, 0xbe, 0xbd, 0xd0, 0x1b, 0x46, 0x1f, 0x91, 0x57, 0xc5, 0xa2, 0x31, 0x94, 0xea, + 0xaa, 0x58, 0x66, 0x67, 0x84, 0x7e, 0x4b, 0xbc, 0x6d, 0xdc, 0x12, 0x87, 0xf2, 0x7d, 0x01, 0x0d, + 0xf1, 0xb5, 0xdf, 0x05, 0x11, 0xd5, 0xf4, 0xb8, 0x00, 0xc3, 0xf9, 0x8e, 0x77, 0xda, 0x3d, 0xa9, + 0x4f, 0x4c, 0x80, 0xcf, 0xc3, 0x94, 0x6b, 0x0a, 0x01, 0x62, 0x25, 0x3e, 0x95, 0x47, 0x37, 0x25, + 0x33, 0x24, 0xc7, 0x7e, 0x0a, 0x80, 0xd3, 0x84, 0x51, 0x8d, 0x87, 0x89, 0xa8, 0xfa, 0x5b, 0x81, + 0x70, 0xb6, 0xb0, 0x73, 0xe7, 0x72, 0x3f, 0x8a, 0x49, 0x8b, 0x62, 0x26, 0xa7, 0xfb, 0xba, 0xa8, + 0x8b, 0x15, 0x15, 0xf4, 0x06, 0x8c, 0x30, 0xcf, 0xab, 0x68, 0xb6, 0x94, 0xaf, 0x2b, 0x36, 0xe3, + 0x9e, 0x25, 0x1b, 0x92, 0xfd, 0x8d, 0xb0, 0xa0, 0x80, 0xae, 0x4b, 0xbf, 0xc6, 0xa8, 0xea, 0xdf, + 0x8e, 0x08, 0xf3, 0x6b, 0x2c, 0x2f, 0x7d, 0x30, 0x71, 0x59, 0xe4, 0xe5, 0x99, 0xc9, 0xc1, 0x8c, + 0x9a, 0x54, 0x8a, 0x12, 0xff, 0x65, 0xce, 0xb1, 0x59, 0xc8, 0xef, 0x9e, 0x99, 0x97, 0x2c, 0x19, + 0xce, 0x3b, 0x26, 0x09, 0x9c, 0xa6, 0x49, 0x25, 0x52, 0xbe, 0xeb, 0x85, 0xbb, 0x46, 0x3f, 0xde, + 0xc1, 0x2f, 0xe2, 0xec, 0x34, 0xe2, 0x25, 0x58, 0xd4, 0x3f, 0x51, 0xf1, 0x60, 0xce, 0x87, 0xe9, + 0xf4, 0x16, 0x7d, 0xa4, 0xe2, 0xc8, 0xef, 0x0f, 0xc1, 0xa4, 0xb9, 0xa4, 0xd0, 0x55, 0x28, 0x0b, + 0x22, 0x2a, 0x4f, 0x80, 0xda, 0x25, 0x6b, 0x12, 0x80, 0x13, 0x1c, 0x96, 0x1e, 0x82, 0x55, 0xd7, + 0xcc, 0x6c, 0x93, 0xf4, 0x10, 0x0a, 0x82, 0x35, 0x2c, 0x7a, 0xb1, 0xda, 0x0c, 0x82, 0x58, 0x1d, + 0x48, 0x6a, 0xdd, 0x2d, 0xb1, 0x52, 0x2c, 0xa0, 0xf4, 0x20, 0xda, 0x25, 0xa1, 0x4f, 0x9a, 0x66, + 0x44, 0x61, 0x75, 0x10, 0xdd, 0xd0, 0x81, 0xd8, 0xc4, 0xa5, 0xc7, 0x69, 0x10, 0xb1, 0x85, 0x2c, + 0xae, 0x6f, 0x89, 0xd9, 0x72, 0x9d, 0xbb, 0x56, 0x4b, 0x38, 0xfa, 0x14, 0x3c, 0xa6, 0xa2, 0x26, + 0x61, 0xfe, 0x0e, 0x21, 0x5b, 0x1c, 0x31, 0xb4, 0x2d, 0x8f, 0x2d, 0x67, 0xa3, 0xe1, 0xbc, 0xfa, + 0xe8, 0x75, 0x98, 0x14, 0x22, 0xbe, 0xa4, 0x38, 0x6a, 0x9a, 0xc6, 0xdc, 0x30, 0xa0, 0x38, 0x85, + 0x2d, 0x63, 0x22, 0x33, 0x29, 0x5b, 0x52, 0x28, 0x75, 0xc7, 0x44, 0xd6, 0xe1, 0xb8, 0xab, 0x06, + 0x5a, 0x84, 0x29, 0x2e, 0x83, 0x79, 0xfe, 0x36, 0x9f, 0x13, 0xe1, 0x4d, 0xa5, 0xb6, 0xd4, 0x2d, + 0x13, 0x8c, 0xd3, 0xf8, 0xe8, 0x55, 0x18, 0x77, 0xc2, 0xc6, 0x8e, 0x17, 0x93, 0x46, 0xdc, 0x09, + 0xb9, 0x9b, 0x95, 0x66, 0x5b, 0xb4, 0xa8, 0xc1, 0xb0, 0x81, 0x69, 0xbf, 0x03, 0xa7, 0x32, 0x62, + 0x2e, 0xd0, 0x85, 0xe3, 0xb4, 0x3d, 0xf9, 0x4d, 0x29, 0x03, 0xe4, 0xc5, 0x5a, 0x55, 0x7e, 0x8d, + 0x86, 0x45, 0x57, 0x27, 0x8b, 0xcd, 0xa0, 0xa5, 0x18, 0x54, 0xab, 0x73, 0x55, 0x02, 0x70, 0x82, + 0x63, 0xff, 0xcf, 0x02, 0x4c, 0x65, 0xbc, 0xad, 0xb0, 0x34, 0x77, 0xa9, 0x4b, 0x4a, 0x92, 0xd5, + 0xce, 0x0c, 0xb1, 0x5d, 0x38, 0x42, 0x88, 0xed, 0x62, 0xbf, 0x10, 0xdb, 0x43, 0xef, 0x26, 0xc4, + 0xb6, 0x39, 0x62, 0xc3, 0x03, 0x8d, 0x58, 0x46, 0x58, 0xee, 0x91, 0x23, 0x86, 0xe5, 0x36, 0x06, + 0x7d, 0x74, 0x80, 0x41, 0xff, 0x81, 0x02, 0x4c, 0xa7, 0x6d, 0x20, 0x4f, 0x40, 0x6f, 0xfb, 0x86, + 0xa1, 0xb7, 0xcd, 0x4e, 0x1a, 0x99, 0xb6, 0xcc, 0xcc, 0xd3, 0xe1, 0xe2, 0x94, 0x0e, 0xf7, 0xc3, + 0x03, 0x51, 0xeb, 0xad, 0xcf, 0xfd, 0xbb, 0x05, 0x38, 0x93, 0xae, 0xb2, 0xdc, 0x74, 0xbc, 0xd6, + 0x09, 0x8c, 0xcd, 0x2d, 0x63, 0x6c, 0x9e, 0x1b, 0xe4, 0x6b, 0x58, 0xd7, 0x72, 0x07, 0xe8, 0x6e, + 0x6a, 0x80, 0xae, 0x0e, 0x4e, 0xb2, 0xf7, 0x28, 0x7d, 0xa5, 0x08, 0x17, 0x33, 0xeb, 0x25, 0x6a, + 0xcf, 0x55, 0x43, 0xed, 0xf9, 0x42, 0x4a, 0xed, 0x69, 0xf7, 0xae, 0x7d, 0x3c, 0x7a, 0x50, 0xe1, + 0x21, 0xcb, 0x02, 0x08, 0x3c, 0xa4, 0x0e, 0xd4, 0xf0, 0x90, 0x55, 0x84, 0xb0, 0x49, 0xf7, 0xeb, + 0x49, 0xf7, 0xf9, 0x6f, 0x2d, 0x38, 0x97, 0x39, 0x37, 0x27, 0xa0, 0xeb, 0x5a, 0x37, 0x75, 0x5d, + 0x4f, 0x0f, 0xbc, 0x5a, 0x73, 0x94, 0x5f, 0xbf, 0x36, 0x94, 0xf3, 0x2d, 0xec, 0x26, 0x7f, 0x0b, + 0xc6, 0x9c, 0x46, 0x83, 0x44, 0xd1, 0x5a, 0xe0, 0xaa, 0x28, 0xc2, 0xcf, 0xb1, 0x7b, 0x56, 0x52, + 0x7c, 0x78, 0x30, 0x3f, 0x97, 0x26, 0x91, 0x80, 0xb1, 0x4e, 0x01, 0x7d, 0x06, 0x4a, 0x91, 0x38, + 0x37, 0xc5, 0xdc, 0xbf, 0x38, 0xe0, 0xe0, 0x38, 0x9b, 0xa4, 0x69, 0x86, 0x39, 0x52, 0x9a, 0x0a, + 0x45, 0xd2, 0x0c, 0x89, 0x52, 0x38, 0xd6, 0x90, 0x28, 0x2f, 0x00, 0xec, 0xa9, 0xcb, 0x40, 0x5a, + 0xff, 0xa0, 0x5d, 0x13, 0x34, 0x2c, 0xf4, 0x4d, 0x30, 0x1d, 0xf1, 0x38, 0x80, 0xcb, 0x4d, 0x27, + 0x62, 0x6e, 0x2e, 0x62, 0x15, 0xb2, 0x50, 0x4a, 0xf5, 0x14, 0x0c, 0x77, 0x61, 0xa3, 0x55, 0xd9, + 0x2a, 0x0b, 0x5a, 0xc8, 0x17, 0xe6, 0xe5, 0xa4, 0x45, 0x91, 0x64, 0xf7, 0x74, 0x7a, 0xf8, 0xd9, + 0xc0, 0x6b, 0x35, 0xd1, 0x67, 0x00, 0xe8, 0xf2, 0x11, 0x7a, 0x88, 0xd1, 0x7c, 0xe6, 0x49, 0xb9, + 0x8a, 0x9b, 0x69, 0x95, 0xcb, 0x7c, 0x53, 0x2b, 0x8a, 0x08, 0xd6, 0x08, 0xda, 0x3f, 0x30, 0x04, + 0x8f, 0xf7, 0xe0, 0x91, 0x68, 0xd1, 0x7c, 0x87, 0x7d, 0x26, 0x7d, 0xb9, 0x9e, 0xcb, 0xac, 0x6c, + 0xdc, 0xb6, 0x53, 0x4b, 0xb1, 0xf0, 0xae, 0x97, 0xe2, 0xf7, 0x5a, 0x9a, 0xda, 0x83, 0xdb, 0x6a, + 0x7e, 0xe2, 0x88, 0xbc, 0xff, 0x18, 0xf5, 0x20, 0x5b, 0x19, 0xca, 0x84, 0x17, 0x06, 0xee, 0xce, + 0xc0, 0xda, 0x85, 0x93, 0xd5, 0x12, 0x7f, 0xc1, 0x82, 0x27, 0x32, 0xfb, 0x6b, 0x58, 0xe4, 0x5c, + 0x85, 0x72, 0x83, 0x16, 0x6a, 0xae, 0x88, 0x89, 0x8f, 0xb6, 0x04, 0xe0, 0x04, 0xc7, 0x30, 0xbc, + 0x29, 0xf4, 0x35, 0xbc, 0xf9, 0x65, 0x0b, 0xba, 0xf6, 0xc7, 0x09, 0x30, 0xea, 0xaa, 0xc9, 0xa8, + 0x3f, 0x38, 0xc8, 0x5c, 0xe6, 0xf0, 0xe8, 0x3f, 0x9a, 0x82, 0xb3, 0x39, 0xae, 0x38, 0x7b, 0x30, + 0xb3, 0xdd, 0x20, 0xa6, 0x93, 0xa7, 0xf8, 0x98, 0x4c, 0x7f, 0xd8, 0x9e, 0x1e, 0xa1, 0x2c, 0x63, + 0xe6, 0x4c, 0x17, 0x0a, 0xee, 0x6e, 0x02, 0x7d, 0xc1, 0x82, 0xd3, 0xce, 0xbd, 0xa8, 0x2b, 0xc5, + 0xbe, 0x58, 0x33, 0x2f, 0x65, 0x2a, 0x41, 0xfa, 0xa4, 0xe4, 0xe7, 0x29, 0x44, 0xb3, 0xb0, 0x70, + 0x66, 0x5b, 0x08, 0x8b, 0xb8, 0xf2, 0x54, 0x9c, 0xef, 0xe1, 0x86, 0x9c, 0xe5, 0x33, 0xc5, 0x4f, + 0x10, 0x09, 0xc1, 0x8a, 0x0e, 0xfa, 0x1c, 0x94, 0xb7, 0xa5, 0x23, 0x63, 0xc6, 0x09, 0x95, 0x0c, + 0x64, 0x6f, 0xf7, 0x4e, 0xfe, 0x92, 0xa9, 0x90, 0x70, 0x42, 0x14, 0xbd, 0x0e, 0x45, 0x7f, 0x2b, + 0xea, 0x95, 0x85, 0x33, 0x65, 0xb2, 0xc6, 0x9d, 0xfd, 0xd7, 0x57, 0xeb, 0x98, 0x56, 0x44, 0xd7, + 0xa1, 0x18, 0x6e, 0xba, 0x42, 0x83, 0x97, 0xc9, 0xc3, 0xf1, 0x52, 0x25, 0xa7, 0x57, 0x8c, 0x12, + 0x5e, 0xaa, 0x60, 0x4a, 0x02, 0xd5, 0x60, 0x98, 0xf9, 0xaf, 0x88, 0xf3, 0x20, 0x53, 0xf2, 0xed, + 0xe1, 0x07, 0xc6, 0x23, 0x02, 0x30, 0x04, 0xcc, 0x09, 0xa1, 0x0d, 0x18, 0x69, 0xb0, 0x8c, 0x8d, + 0x22, 0x1e, 0xd9, 0x47, 0x32, 0x75, 0x75, 0x3d, 0x52, 0x59, 0x0a, 0xd5, 0x15, 0xc3, 0xc0, 0x82, + 0x16, 0xa3, 0x4a, 0xda, 0x3b, 0x5b, 0x91, 0xc8, 0x30, 0x9c, 0x4d, 0xb5, 0x47, 0x86, 0x56, 0x41, + 0x95, 0x61, 0x60, 0x41, 0x0b, 0x7d, 0x0c, 0x0a, 0x5b, 0x0d, 0xe1, 0x9b, 0x92, 0xa9, 0xb4, 0x33, + 0xe3, 0x35, 0x2c, 0x8d, 0x3c, 0x38, 0x98, 0x2f, 0xac, 0x2e, 0xe3, 0xc2, 0x56, 0x03, 0xad, 0xc3, + 0xe8, 0x16, 0xf7, 0xf0, 0x16, 0x7a, 0xb9, 0xa7, 0xb2, 0x9d, 0xcf, 0xbb, 0x9c, 0xc0, 0xb9, 0x5b, + 0x86, 0x00, 0x60, 0x49, 0x84, 0x85, 0x69, 0x57, 0x9e, 0xea, 0x22, 0x74, 0xd7, 0xc2, 0xd1, 0xa2, + 0x0b, 0xf0, 0xf3, 0x39, 0xf1, 0x77, 0xc7, 0x1a, 0x45, 0xba, 0xaa, 0x1d, 0x99, 0xe6, 0x5d, 0x84, + 0x62, 0xc9, 0x5c, 0xd5, 0x7d, 0x32, 0xe0, 0xf3, 0x55, 0xad, 0x90, 0x70, 0x42, 0x14, 0xed, 0xc2, + 0xc4, 0x5e, 0xd4, 0xde, 0x21, 0x72, 0x4b, 0xb3, 0xc8, 0x2c, 0x39, 0x47, 0xd8, 0x1d, 0x81, 0xe8, + 0x85, 0x71, 0xc7, 0x69, 0x76, 0x71, 0x21, 0xf6, 0xfc, 0x7d, 0x47, 0x27, 0x86, 0x4d, 0xda, 0x74, + 0xf8, 0xdf, 0xee, 0x04, 0x9b, 0xfb, 0x31, 0x11, 0x11, 0xb7, 0x32, 0x87, 0xff, 0x4d, 0x8e, 0xd2, + 0x3d, 0xfc, 0x02, 0x80, 0x25, 0x11, 0x74, 0x47, 0x0c, 0x0f, 0xe3, 0x9e, 0xd3, 0xf9, 0x61, 0x31, + 0x17, 0x25, 0x52, 0xce, 0xa0, 0x30, 0x6e, 0x99, 0x90, 0x62, 0x5c, 0xb2, 0xbd, 0x13, 0xc4, 0x81, + 0x9f, 0xe2, 0xd0, 0x33, 0xf9, 0x5c, 0xb2, 0x96, 0x81, 0xdf, 0xcd, 0x25, 0xb3, 0xb0, 0x70, 0x66, + 0x5b, 0xc8, 0x85, 0xc9, 0x76, 0x10, 0xc6, 0xf7, 0x82, 0x50, 0xae, 0x2f, 0xd4, 0x43, 0xaf, 0x60, + 0x60, 0x8a, 0x16, 0x59, 0x30, 0x3b, 0x13, 0x82, 0x53, 0x34, 0xd1, 0x27, 0x61, 0x34, 0x6a, 0x38, + 0x4d, 0x52, 0xbd, 0x35, 0x7b, 0x2a, 0xff, 0xf8, 0xa9, 0x73, 0x94, 0x9c, 0xd5, 0xc5, 0x63, 0xba, + 0x73, 0x14, 0x2c, 0xc9, 0xa1, 0x55, 0x18, 0x66, 0x69, 0xb8, 0x58, 0x78, 0xb8, 0x9c, 0xe8, 0x9e, + 0x5d, 0x06, 0xc4, 0x9c, 0x37, 0xb1, 0x62, 0xcc, 0xab, 0xd3, 0x3d, 0x20, 0xc4, 0xeb, 0x20, 0x9a, + 0x3d, 0x93, 0xbf, 0x07, 0x84, 0x54, 0x7e, 0xab, 0xde, 0x6b, 0x0f, 0x28, 0x24, 0x9c, 0x10, 0xa5, + 0x9c, 0x99, 0x72, 0xd3, 0xb3, 0x3d, 0x2c, 0x5f, 0x72, 0x79, 0x29, 0xe3, 0xcc, 0x94, 0x93, 0x52, + 0x12, 0xf6, 0xef, 0x8e, 0x76, 0xcb, 0x2c, 0xec, 0x42, 0xf6, 0x1d, 0x56, 0xd7, 0x5b, 0xdd, 0x47, + 0x07, 0xd5, 0x0f, 0x1d, 0xa3, 0xb4, 0xfa, 0x05, 0x0b, 0xce, 0xb6, 0x33, 0x3f, 0x44, 0x08, 0x00, + 0x83, 0xa9, 0x99, 0xf8, 0xa7, 0xab, 0x50, 0x82, 0xd9, 0x70, 0x9c, 0xd3, 0x52, 0xfa, 0x46, 0x50, + 0x7c, 0xd7, 0x37, 0x82, 0x35, 0x28, 0x31, 0x21, 0xb3, 0x4f, 0x06, 0xe3, 0xf4, 0xc5, 0x88, 0x89, + 0x12, 0xcb, 0xa2, 0x22, 0x56, 0x24, 0xd0, 0xf7, 0x59, 0x70, 0x21, 0xdd, 0x75, 0x4c, 0x18, 0x58, + 0xc4, 0x1f, 0xe4, 0x77, 0xc1, 0x55, 0xf1, 0xfd, 0x17, 0x6a, 0xbd, 0x90, 0x0f, 0xfb, 0x21, 0xe0, + 0xde, 0x8d, 0xa1, 0x4a, 0xc6, 0x65, 0x74, 0xc4, 0x54, 0xc0, 0x0f, 0x70, 0x21, 0x7d, 0x09, 0xc6, + 0x5b, 0x41, 0xc7, 0x8f, 0x85, 0xa1, 0x8c, 0x78, 0xb4, 0x67, 0x8f, 0xd5, 0x6b, 0x5a, 0x39, 0x36, + 0xb0, 0x52, 0xd7, 0xd8, 0xd2, 0x43, 0x5f, 0x63, 0xdf, 0x82, 0x71, 0x5f, 0xb3, 0xec, 0x14, 0xf2, + 0xc0, 0xe5, 0xfc, 0xd8, 0xa1, 0xba, 0x1d, 0x28, 0xef, 0xa5, 0x5e, 0x82, 0x0d, 0x6a, 0x27, 0x7b, + 0x37, 0xfa, 0x49, 0x2b, 0x43, 0xa8, 0xe7, 0xb7, 0xe5, 0x8f, 0x9b, 0xb7, 0xe5, 0xcb, 0xe9, 0xdb, + 0x72, 0x97, 0xf2, 0xd5, 0xb8, 0x28, 0x0f, 0x9e, 0x1a, 0x65, 0xd0, 0x30, 0x81, 0x76, 0x13, 0x2e, + 0xf5, 0x3b, 0x96, 0x98, 0xc5, 0x94, 0xab, 0x9e, 0xda, 0x12, 0x8b, 0x29, 0xb7, 0x5a, 0xc1, 0x0c, + 0x32, 0x68, 0x1c, 0x19, 0xfb, 0x7f, 0x58, 0x50, 0xac, 0x05, 0xee, 0x09, 0x28, 0x93, 0x3f, 0x61, + 0x28, 0x93, 0x1f, 0xcf, 0x3e, 0x10, 0xdd, 0x5c, 0xd5, 0xf1, 0x4a, 0x4a, 0x75, 0x7c, 0x21, 0x8f, + 0x40, 0x6f, 0x45, 0xf1, 0x8f, 0x15, 0x61, 0xac, 0x16, 0xb8, 0xca, 0x5c, 0xf9, 0xd7, 0x1e, 0xc6, + 0x5c, 0x39, 0x37, 0xc0, 0xbf, 0x46, 0x99, 0x19, 0x5a, 0x49, 0x1f, 0xcb, 0xbf, 0x60, 0x56, 0xcb, + 0x77, 0x89, 0xb7, 0xbd, 0x13, 0x13, 0x37, 0xfd, 0x39, 0x27, 0x67, 0xb5, 0xfc, 0xdf, 0x2d, 0x98, + 0x4a, 0xb5, 0x8e, 0x9a, 0x30, 0xd1, 0xd4, 0x15, 0x93, 0x62, 0x9d, 0x3e, 0x94, 0x4e, 0x53, 0x58, + 0x7d, 0x6a, 0x45, 0xd8, 0x24, 0x8e, 0x16, 0x00, 0xd4, 0x4b, 0x9d, 0xd4, 0x80, 0x31, 0xa9, 0x5f, + 0x3d, 0xe5, 0x45, 0x58, 0xc3, 0x40, 0x2f, 0xc3, 0x58, 0x1c, 0xb4, 0x83, 0x66, 0xb0, 0xbd, 0x7f, + 0x83, 0xc8, 0xc8, 0x45, 0xca, 0x96, 0x6b, 0x23, 0x01, 0x61, 0x1d, 0xcf, 0xfe, 0x89, 0x22, 0xff, + 0x50, 0x3f, 0xf6, 0xde, 0x5f, 0x93, 0xef, 0xed, 0x35, 0xf9, 0x15, 0x0b, 0xa6, 0x69, 0xeb, 0xcc, + 0x5c, 0x44, 0x1e, 0xb6, 0x2a, 0x66, 0xb0, 0xd5, 0x23, 0x66, 0xf0, 0x65, 0xca, 0xbb, 0xdc, 0xa0, + 0x13, 0x0b, 0x0d, 0x9a, 0xc6, 0x9c, 0x68, 0x29, 0x16, 0x50, 0x81, 0x47, 0xc2, 0x50, 0xb8, 0xb8, + 0xe9, 0x78, 0x24, 0x0c, 0xb1, 0x80, 0xca, 0x90, 0xc2, 0x43, 0xd9, 0x21, 0x85, 0x79, 0x1c, 0x46, + 0x61, 0x58, 0x20, 0xc4, 0x1e, 0x2d, 0x0e, 0xa3, 0xb4, 0x38, 0x48, 0x70, 0xec, 0x9f, 0x29, 0xc2, + 0x78, 0x2d, 0x70, 0x93, 0xb7, 0xb2, 0x97, 0x8c, 0xb7, 0xb2, 0x4b, 0xa9, 0xb7, 0xb2, 0x69, 0x1d, + 0xf7, 0xfd, 0x97, 0xb1, 0xaf, 0xd5, 0xcb, 0xd8, 0xbf, 0xb0, 0xd8, 0xac, 0x55, 0xd6, 0xeb, 0xdc, + 0xfa, 0x08, 0x3d, 0x0f, 0x63, 0x8c, 0x21, 0x31, 0x9f, 0x4a, 0xf9, 0x80, 0xc4, 0x52, 0xe5, 0xac, + 0x27, 0xc5, 0x58, 0xc7, 0x41, 0x57, 0xa0, 0x14, 0x11, 0x27, 0x6c, 0xec, 0x28, 0x1e, 0x27, 0x5e, + 0x7b, 0x78, 0x19, 0x56, 0x50, 0xf4, 0x66, 0x12, 0x02, 0xb0, 0x98, 0xef, 0xa3, 0xa5, 0xf7, 0x87, + 0x6f, 0x91, 0xfc, 0xb8, 0x7f, 0xf6, 0x5d, 0x40, 0xdd, 0xf8, 0x03, 0xc4, 0xbe, 0x9a, 0x37, 0x63, + 0x5f, 0x95, 0xbb, 0xe2, 0x5e, 0xfd, 0x99, 0x05, 0x93, 0xb5, 0xc0, 0xa5, 0x5b, 0xf7, 0xeb, 0x69, + 0x9f, 0xea, 0xf1, 0x4f, 0x47, 0x7a, 0xc4, 0x3f, 0x7d, 0x12, 0x86, 0x6b, 0x81, 0x5b, 0xad, 0xf5, + 0xf2, 0x6d, 0xb6, 0xff, 0x9e, 0x05, 0xa3, 0xb5, 0xc0, 0x3d, 0x01, 0xe5, 0xfc, 0xc7, 0x4d, 0xe5, + 0xfc, 0x63, 0x39, 0xeb, 0x26, 0x47, 0x1f, 0xff, 0x77, 0x86, 0x60, 0x82, 0xf6, 0x33, 0xd8, 0x96, + 0x53, 0x69, 0x0c, 0x9b, 0x35, 0xc0, 0xb0, 0x51, 0x59, 0x38, 0x68, 0x36, 0x83, 0x7b, 0xe9, 0x69, + 0x5d, 0x65, 0xa5, 0x58, 0x40, 0xd1, 0xb3, 0x50, 0x6a, 0x87, 0x64, 0xcf, 0x0b, 0x84, 0x90, 0xa9, + 0x3d, 0x75, 0xd4, 0x44, 0x39, 0x56, 0x18, 0xf4, 0x72, 0x16, 0x79, 0x7e, 0x83, 0xd4, 0x49, 0x23, + 0xf0, 0x5d, 0xae, 0xbf, 0x2e, 0x8a, 0xb4, 0x01, 0x5a, 0x39, 0x36, 0xb0, 0xd0, 0x5d, 0x28, 0xb3, + 0xff, 0x8c, 0xed, 0x1c, 0x3d, 0x01, 0xa5, 0x48, 0x48, 0x26, 0x08, 0xe0, 0x84, 0x16, 0x7a, 0x01, + 0x20, 0x96, 0x11, 0xb2, 0x23, 0x11, 0xe7, 0x48, 0x09, 0xe4, 0x2a, 0x76, 0x76, 0x84, 0x35, 0x2c, + 0xf4, 0x0c, 0x94, 0x63, 0xc7, 0x6b, 0xde, 0xf4, 0x7c, 0x12, 0x31, 0xbd, 0x74, 0x51, 0xe6, 0x05, + 0x13, 0x85, 0x38, 0x81, 0x53, 0x81, 0x88, 0x05, 0x01, 0xe0, 0xe9, 0x6b, 0x4b, 0x0c, 0x9b, 0x09, + 0x44, 0x37, 0x55, 0x29, 0xd6, 0x30, 0xd0, 0x0e, 0x9c, 0xf7, 0x7c, 0x16, 0x62, 0x9f, 0xd4, 0x77, + 0xbd, 0xf6, 0xc6, 0xcd, 0xfa, 0x1d, 0x12, 0x7a, 0x5b, 0xfb, 0x4b, 0x4e, 0x63, 0x97, 0xf8, 0x32, + 0xb5, 0xe0, 0x07, 0x45, 0x17, 0xcf, 0x57, 0x7b, 0xe0, 0xe2, 0x9e, 0x94, 0xec, 0x57, 0xe1, 0x4c, + 0x2d, 0x70, 0x6b, 0x41, 0x18, 0xaf, 0x06, 0xe1, 0x3d, 0x27, 0x74, 0xe5, 0x4a, 0x99, 0x97, 0x59, + 0x48, 0x28, 0x2b, 0x1c, 0xe6, 0x8c, 0xc2, 0xc8, 0x85, 0xf5, 0x22, 0x13, 0xbe, 0x8e, 0xe8, 0x8c, + 0xd2, 0x60, 0x62, 0x80, 0xca, 0x37, 0x71, 0xcd, 0x89, 0x09, 0xba, 0xc5, 0xf2, 0xe8, 0x26, 0x27, + 0xa2, 0xa8, 0xfe, 0xb4, 0x96, 0x47, 0x37, 0x01, 0x66, 0x1e, 0xa1, 0x66, 0x7d, 0xfb, 0xaf, 0x0d, + 0x33, 0xe6, 0x98, 0xca, 0x59, 0x80, 0x3e, 0x0b, 0x93, 0x11, 0xb9, 0xe9, 0xf9, 0x9d, 0xfb, 0x52, + 0x27, 0xd0, 0xc3, 0x9d, 0xa8, 0xbe, 0xa2, 0x63, 0x72, 0xcd, 0xa2, 0x59, 0x86, 0x53, 0xd4, 0x50, + 0x0b, 0x26, 0xef, 0x79, 0xbe, 0x1b, 0xdc, 0x8b, 0x24, 0xfd, 0x52, 0xbe, 0x82, 0xf1, 0x2e, 0xc7, + 0x4c, 0xf5, 0xd1, 0x68, 0xee, 0xae, 0x41, 0x0c, 0xa7, 0x88, 0xd3, 0x05, 0x18, 0x76, 0xfc, 0xc5, + 0xe8, 0x76, 0x44, 0x42, 0x91, 0x11, 0x99, 0x2d, 0x40, 0x2c, 0x0b, 0x71, 0x02, 0xa7, 0x0b, 0x90, + 0xfd, 0xb9, 0x16, 0x06, 0x1d, 0x1e, 0xc7, 0x5e, 0x2c, 0x40, 0xac, 0x4a, 0xb1, 0x86, 0x41, 0x37, + 0x28, 0xfb, 0xb7, 0x1e, 0xf8, 0x38, 0x08, 0x62, 0xb9, 0xa5, 0x59, 0x0e, 0x4e, 0xad, 0x1c, 0x1b, + 0x58, 0x68, 0x15, 0x50, 0xd4, 0x69, 0xb7, 0x9b, 0xcc, 0x4e, 0xc1, 0x69, 0x32, 0x52, 0xfc, 0x8d, + 0xb8, 0xc8, 0xa3, 0x74, 0xd6, 0xbb, 0xa0, 0x38, 0xa3, 0x06, 0xe5, 0xd5, 0x5b, 0xa2, 0xab, 0xc3, + 0xac, 0xab, 0xfc, 0x31, 0xa2, 0xce, 0xfb, 0x29, 0x61, 0x68, 0x05, 0x46, 0xa3, 0xfd, 0xa8, 0x11, + 0x8b, 0x70, 0x63, 0x39, 0x69, 0x69, 0xea, 0x0c, 0x45, 0xcb, 0x8a, 0xc6, 0xab, 0x60, 0x59, 0x17, + 0x35, 0xe0, 0x94, 0xa0, 0xb8, 0xbc, 0xe3, 0xf8, 0x2a, 0xc9, 0x07, 0x37, 0xd7, 0x7c, 0xfe, 0xc1, + 0xc1, 0xfc, 0x29, 0xd1, 0xb2, 0x0e, 0x3e, 0x3c, 0x98, 0x3f, 0x5b, 0x0b, 0xdc, 0x0c, 0x08, 0xce, + 0xa2, 0x66, 0x7f, 0x2b, 0x93, 0x37, 0x58, 0x92, 0xde, 0xb8, 0x13, 0x12, 0xd4, 0x82, 0x89, 0x36, + 0x5b, 0xc6, 0x22, 0xfa, 0xbb, 0x58, 0x8b, 0x2f, 0x0d, 0xa8, 0x38, 0xb8, 0x47, 0xd9, 0xb4, 0x52, + 0xec, 0xb1, 0x1b, 0x59, 0x4d, 0x27, 0x87, 0x4d, 0xea, 0xf6, 0x57, 0xce, 0xb2, 0x13, 0xab, 0xce, + 0xb5, 0x01, 0xa3, 0xc2, 0x7a, 0x5b, 0x5c, 0x7d, 0xe6, 0xf2, 0xd5, 0x52, 0xc9, 0xb0, 0x09, 0x0b, + 0x70, 0x2c, 0xeb, 0xa2, 0xcf, 0xc0, 0x24, 0xbd, 0x49, 0x68, 0xd9, 0x2f, 0x4e, 0xe7, 0x7b, 0xd9, + 0x27, 0x49, 0x2f, 0xb4, 0xcc, 0x10, 0x7a, 0x65, 0x9c, 0x22, 0x86, 0xde, 0x64, 0x76, 0x06, 0x66, + 0x62, 0x8d, 0x3e, 0xa4, 0x75, 0x93, 0x02, 0x49, 0x56, 0x23, 0x92, 0x97, 0xb4, 0xc3, 0x7e, 0xb4, + 0x49, 0x3b, 0xd0, 0x4d, 0x98, 0x10, 0x99, 0x6a, 0xc5, 0xca, 0x2a, 0x1a, 0xda, 0xb2, 0x09, 0xac, + 0x03, 0x0f, 0xd3, 0x05, 0xd8, 0xac, 0x8c, 0xb6, 0xe1, 0x82, 0x96, 0x39, 0xe6, 0x5a, 0xe8, 0xb0, + 0x27, 0x6f, 0x8f, 0xb1, 0x3b, 0xed, 0x2c, 0x7d, 0xe2, 0xc1, 0xc1, 0xfc, 0x85, 0x8d, 0x5e, 0x88, + 0xb8, 0x37, 0x1d, 0x74, 0x0b, 0xce, 0x70, 0x1f, 0xd1, 0x0a, 0x71, 0xdc, 0xa6, 0xe7, 0xab, 0xc3, + 0x9a, 0x6f, 0xc9, 0x73, 0x0f, 0x0e, 0xe6, 0xcf, 0x2c, 0x66, 0x21, 0xe0, 0xec, 0x7a, 0xe8, 0xe3, + 0x50, 0x76, 0xfd, 0x48, 0x8c, 0xc1, 0x88, 0x91, 0x9c, 0xa7, 0x5c, 0x59, 0xaf, 0xab, 0xef, 0x4f, + 0xfe, 0xe0, 0xa4, 0x02, 0xda, 0xe6, 0x1a, 0x55, 0xa5, 0xc0, 0x18, 0xed, 0x8a, 0x6e, 0x93, 0x56, + 0x85, 0x19, 0x5e, 0x62, 0xfc, 0x29, 0x41, 0x19, 0x4f, 0x1b, 0x0e, 0x64, 0x06, 0x61, 0xf4, 0x06, + 0x20, 0x2a, 0xe1, 0x7b, 0x0d, 0xb2, 0xd8, 0x60, 0xa9, 0x05, 0x98, 0x02, 0xba, 0x64, 0xfa, 0x2d, + 0xd5, 0xbb, 0x30, 0x70, 0x46, 0x2d, 0x74, 0x9d, 0x1e, 0x39, 0x7a, 0xa9, 0xe0, 0x2a, 0x2a, 0x95, + 0x5a, 0x85, 0xb4, 0x43, 0xd2, 0x70, 0x62, 0xe2, 0x9a, 0x14, 0x71, 0xaa, 0x1e, 0x72, 0xe1, 0xbc, + 0xd3, 0x89, 0x03, 0xa6, 0xac, 0x36, 0x51, 0x37, 0x82, 0x5d, 0xe2, 0xb3, 0x77, 0xa2, 0xd2, 0xd2, + 0x25, 0x2a, 0x0d, 0x2c, 0xf6, 0xc0, 0xc3, 0x3d, 0xa9, 0x50, 0x29, 0x4e, 0xe5, 0x4e, 0x05, 0x33, + 0x68, 0x4f, 0x46, 0xfe, 0xd4, 0x97, 0x61, 0x6c, 0x27, 0x88, 0xe2, 0x75, 0x12, 0xdf, 0x0b, 0xc2, + 0x5d, 0x11, 0x7a, 0x31, 0x09, 0xd7, 0x9b, 0x80, 0xb0, 0x8e, 0x47, 0xaf, 0x69, 0xcc, 0x8a, 0xa1, + 0x5a, 0x61, 0x0f, 0xc8, 0xa5, 0x84, 0xc7, 0x5c, 0xe7, 0xc5, 0x58, 0xc2, 0x25, 0x6a, 0xb5, 0xb6, + 0xcc, 0x1e, 0x83, 0x53, 0xa8, 0xd5, 0xda, 0x32, 0x96, 0x70, 0xba, 0x5c, 0xa3, 0x1d, 0x27, 0x24, + 0xb5, 0x30, 0x68, 0x90, 0x48, 0x0b, 0x12, 0xfd, 0x38, 0x0f, 0x2c, 0x49, 0x97, 0x6b, 0x3d, 0x0b, + 0x01, 0x67, 0xd7, 0x43, 0xa4, 0x3b, 0x6b, 0xd2, 0x64, 0xbe, 0x16, 0xbf, 0x5b, 0xde, 0x18, 0x30, + 0x71, 0x92, 0x0f, 0xd3, 0x2a, 0x5f, 0x13, 0x0f, 0x25, 0x19, 0xcd, 0x4e, 0xb1, 0xb5, 0x3d, 0x78, + 0x1c, 0x4a, 0xf5, 0x2e, 0x52, 0x4d, 0x51, 0xc2, 0x5d, 0xb4, 0x8d, 0xb8, 0x4c, 0xd3, 0x7d, 0x93, + 0xe9, 0x5e, 0x85, 0x72, 0xd4, 0xd9, 0x74, 0x83, 0x96, 0xe3, 0xf9, 0xec, 0x31, 0x58, 0xbb, 0x2f, + 0xd4, 0x25, 0x00, 0x27, 0x38, 0x68, 0x15, 0x4a, 0x8e, 0x7c, 0xf4, 0x40, 0xf9, 0xe1, 0x3c, 0xd4, + 0x53, 0x07, 0xf7, 0x70, 0x97, 0xcf, 0x1c, 0xaa, 0x2e, 0x7a, 0x0d, 0x26, 0x84, 0x8f, 0xa3, 0x48, + 0x15, 0x78, 0xca, 0x74, 0x44, 0xa9, 0xeb, 0x40, 0x6c, 0xe2, 0xa2, 0xdb, 0x30, 0x16, 0x07, 0x4d, + 0xe6, 0x4d, 0x41, 0xc5, 0xb0, 0xb3, 0xf9, 0x21, 0xc1, 0x36, 0x14, 0x9a, 0xae, 0x6f, 0x54, 0x55, + 0xb1, 0x4e, 0x07, 0x6d, 0xf0, 0xf5, 0xce, 0x82, 0x25, 0x93, 0x68, 0xf6, 0xb1, 0xfc, 0x33, 0x49, + 0xc5, 0x54, 0x36, 0xb7, 0x83, 0xa8, 0x89, 0x75, 0x32, 0xe8, 0x1a, 0xcc, 0xb4, 0x43, 0x2f, 0x60, + 0x6b, 0x42, 0xbd, 0x77, 0xcd, 0x9a, 0x29, 0x5e, 0x6a, 0x69, 0x04, 0xdc, 0x5d, 0x87, 0xb9, 0xa8, + 0x8a, 0xc2, 0xd9, 0x73, 0x3c, 0x9b, 0x30, 0xbf, 0x7e, 0xf1, 0x32, 0xac, 0xa0, 0x68, 0x8d, 0x71, + 0x62, 0xae, 0x39, 0x98, 0x9d, 0xcb, 0x8f, 0x20, 0xa2, 0x6b, 0x18, 0xb8, 0x70, 0xa9, 0xfe, 0xe2, + 0x84, 0x02, 0x72, 0xb5, 0xb4, 0x73, 0x54, 0xa2, 0x8f, 0x66, 0xcf, 0xf7, 0x30, 0x25, 0x4b, 0x89, + 0xff, 0x89, 0x40, 0x60, 0x14, 0x47, 0x38, 0x45, 0x13, 0x7d, 0x13, 0x4c, 0x8b, 0x88, 0x65, 0xc9, + 0x30, 0x5d, 0x48, 0x6c, 0x54, 0x71, 0x0a, 0x86, 0xbb, 0xb0, 0x79, 0x10, 0x79, 0x67, 0xb3, 0x49, + 0x04, 0xeb, 0xbb, 0xe9, 0xf9, 0xbb, 0xd1, 0xec, 0x45, 0xc6, 0x1f, 0x44, 0x10, 0xf9, 0x34, 0x14, + 0x67, 0xd4, 0x40, 0x1b, 0x30, 0xdd, 0x0e, 0x09, 0x69, 0x31, 0x41, 0x5c, 0x9c, 0x67, 0xf3, 0xdc, + 0x43, 0x9b, 0xf6, 0xa4, 0x96, 0x82, 0x1d, 0x66, 0x94, 0xe1, 0x2e, 0x0a, 0xe8, 0x1e, 0x94, 0x82, + 0x3d, 0x12, 0xee, 0x10, 0xc7, 0x9d, 0xbd, 0xd4, 0xc3, 0x66, 0x5a, 0x1c, 0x6e, 0xb7, 0x04, 0x6e, + 0xea, 0x8d, 0x5c, 0x16, 0xf7, 0x7f, 0x23, 0x97, 0x8d, 0xa1, 0xef, 0xb7, 0xe0, 0x9c, 0x54, 0xab, + 0xd7, 0xdb, 0x74, 0xd4, 0x97, 0x03, 0x3f, 0x8a, 0x43, 0xee, 0x53, 0xfc, 0x44, 0xbe, 0x9f, 0xed, + 0x46, 0x4e, 0x25, 0xa5, 0xbc, 0x3c, 0x97, 0x87, 0x11, 0xe1, 0xfc, 0x16, 0xe7, 0xbe, 0x11, 0x66, + 0xba, 0x4e, 0xee, 0xa3, 0xe4, 0xb5, 0x98, 0xdb, 0x85, 0x09, 0x63, 0x74, 0x1e, 0xe9, 0xf3, 0xe8, + 0xbf, 0x19, 0x85, 0xb2, 0x7a, 0x3a, 0x43, 0x57, 0xcd, 0x17, 0xd1, 0x73, 0xe9, 0x17, 0xd1, 0x12, + 0xbd, 0x32, 0xeb, 0x8f, 0xa0, 0x1b, 0x19, 0x11, 0x9c, 0xf2, 0xf6, 0xe2, 0xe0, 0xae, 0xb9, 0x9a, + 0x26, 0xb4, 0x38, 0xf0, 0xd3, 0xea, 0x50, 0x4f, 0xe5, 0xea, 0x35, 0x98, 0xf1, 0x03, 0x26, 0x2e, + 0x12, 0x57, 0xca, 0x02, 0xec, 0xc8, 0x2f, 0xeb, 0x21, 0x11, 0x52, 0x08, 0xb8, 0xbb, 0x0e, 0x6d, + 0x90, 0x9f, 0xd9, 0x69, 0x6d, 0x2e, 0x3f, 0xd2, 0xb1, 0x80, 0xa2, 0x27, 0x61, 0xb8, 0x1d, 0xb8, + 0xd5, 0x9a, 0x10, 0x15, 0xb5, 0x1c, 0xa7, 0x6e, 0xb5, 0x86, 0x39, 0x0c, 0x2d, 0xc2, 0x08, 0xfb, + 0x11, 0xcd, 0x8e, 0xe7, 0xfb, 0xbe, 0xb3, 0x1a, 0x5a, 0xd6, 0x10, 0x56, 0x01, 0x8b, 0x8a, 0x4c, + 0xab, 0x44, 0xe5, 0x6b, 0xa6, 0x55, 0x1a, 0x7d, 0x48, 0xad, 0x92, 0x24, 0x80, 0x13, 0x5a, 0xe8, + 0x3e, 0x9c, 0x31, 0xee, 0x34, 0x7c, 0x89, 0x90, 0x48, 0xf8, 0xdf, 0x3e, 0xd9, 0xf3, 0x32, 0x23, + 0x9e, 0x62, 0x2f, 0x88, 0x4e, 0x9f, 0xa9, 0x66, 0x51, 0xc2, 0xd9, 0x0d, 0xa0, 0x26, 0xcc, 0x34, + 0xba, 0x5a, 0x2d, 0x0d, 0xde, 0xaa, 0x9a, 0xd0, 0xee, 0x16, 0xbb, 0x09, 0xa3, 0xd7, 0xa0, 0xf4, + 0x76, 0x10, 0x31, 0x36, 0x2b, 0xc4, 0x5b, 0xe9, 0xbc, 0x59, 0x7a, 0xf3, 0x56, 0x9d, 0x95, 0x1f, + 0x1e, 0xcc, 0x8f, 0xd5, 0x02, 0x57, 0xfe, 0xc5, 0xaa, 0x02, 0xfa, 0x6e, 0x0b, 0xe6, 0xba, 0x2f, + 0x4d, 0xaa, 0xd3, 0x13, 0x83, 0x77, 0xda, 0x16, 0x8d, 0xce, 0xad, 0xe4, 0x92, 0xc3, 0x3d, 0x9a, + 0xb2, 0x7f, 0x91, 0x3f, 0x9b, 0x8a, 0xc7, 0x15, 0x12, 0x75, 0x9a, 0x27, 0x91, 0x65, 0x71, 0xc5, + 0x78, 0xf7, 0x79, 0xe8, 0xa7, 0xf9, 0x5f, 0xb5, 0xd8, 0xd3, 0xfc, 0x06, 0x69, 0xb5, 0x9b, 0x4e, + 0x7c, 0x12, 0xbe, 0x7f, 0x6f, 0x42, 0x29, 0x16, 0xad, 0xf5, 0x4a, 0x0c, 0xa9, 0x75, 0x8a, 0x99, + 0x27, 0x28, 0x61, 0x53, 0x96, 0x62, 0x45, 0xc6, 0xfe, 0xa7, 0x7c, 0x06, 0x24, 0xe4, 0x04, 0xd4, + 0xeb, 0x15, 0x53, 0xbd, 0x3e, 0xdf, 0xe7, 0x0b, 0x72, 0xd4, 0xec, 0xff, 0xc4, 0xec, 0x37, 0x53, + 0xb2, 0xbc, 0xd7, 0x6d, 0x42, 0xec, 0x1f, 0xb4, 0xe0, 0x74, 0x96, 0x11, 0x25, 0xbd, 0x20, 0x70, + 0x15, 0x8f, 0xb2, 0x91, 0x51, 0x23, 0x78, 0x47, 0x94, 0x63, 0x85, 0x31, 0x70, 0xce, 0xa5, 0xa3, + 0xc5, 0x20, 0xbd, 0x05, 0x13, 0xb5, 0x90, 0x68, 0x07, 0xda, 0xeb, 0xdc, 0x99, 0x97, 0xf7, 0xe7, + 0xd9, 0x23, 0x3b, 0xf2, 0xda, 0x3f, 0x55, 0x80, 0xd3, 0xfc, 0x91, 0x7b, 0x71, 0x2f, 0xf0, 0xdc, + 0x5a, 0xe0, 0x8a, 0x7c, 0x59, 0x9f, 0x86, 0xf1, 0xb6, 0xa6, 0x97, 0xeb, 0x15, 0x4f, 0x4f, 0xd7, + 0xdf, 0x25, 0x9a, 0x04, 0xbd, 0x14, 0x1b, 0xb4, 0x90, 0x0b, 0xe3, 0x64, 0xcf, 0x6b, 0xa8, 0x97, + 0xd2, 0xc2, 0x91, 0x0f, 0x17, 0xd5, 0xca, 0x8a, 0x46, 0x07, 0x1b, 0x54, 0x1f, 0x41, 0x0a, 0x55, + 0xfb, 0x87, 0x2c, 0x78, 0x2c, 0x27, 0xfa, 0x1e, 0x6d, 0xee, 0x1e, 0x33, 0x27, 0x10, 0xd9, 0x18, + 0x55, 0x73, 0xdc, 0xc8, 0x00, 0x0b, 0x28, 0xfa, 0x24, 0x00, 0x37, 0x12, 0xa0, 0x37, 0xd4, 0x7e, + 0x61, 0xca, 0x8c, 0x08, 0x4b, 0x5a, 0xb0, 0x1c, 0x59, 0x1f, 0x6b, 0xb4, 0xec, 0x1f, 0x2f, 0xc2, + 0x30, 0xcf, 0x23, 0xbd, 0x0a, 0xa3, 0x3b, 0x3c, 0x8b, 0xc0, 0x20, 0x09, 0x0b, 0x12, 0xdd, 0x01, + 0x2f, 0xc0, 0xb2, 0x32, 0x5a, 0x83, 0x53, 0x3c, 0x0b, 0x43, 0xb3, 0x42, 0x9a, 0xce, 0xbe, 0x54, + 0x74, 0xf1, 0x0c, 0x86, 0x4a, 0xe1, 0x57, 0xed, 0x46, 0xc1, 0x59, 0xf5, 0xd0, 0xeb, 0x30, 0x49, + 0x2f, 0x1e, 0x41, 0x27, 0x96, 0x94, 0x78, 0xfe, 0x05, 0x75, 0xd3, 0xd9, 0x30, 0xa0, 0x38, 0x85, + 0x4d, 0xef, 0xbe, 0xed, 0x2e, 0x95, 0xde, 0x70, 0x72, 0xf7, 0x35, 0xd5, 0x78, 0x26, 0x2e, 0xb3, + 0x9e, 0xec, 0x30, 0x5b, 0xd1, 0x8d, 0x9d, 0x90, 0x44, 0x3b, 0x41, 0xd3, 0x65, 0x82, 0xd6, 0xb0, + 0x66, 0x3d, 0x99, 0x82, 0xe3, 0xae, 0x1a, 0x94, 0xca, 0x96, 0xe3, 0x35, 0x3b, 0x21, 0x49, 0xa8, + 0x8c, 0x98, 0x54, 0x56, 0x53, 0x70, 0xdc, 0x55, 0x83, 0xae, 0xa3, 0x33, 0xb5, 0x30, 0xa0, 0xcc, + 0x4b, 0x86, 0x14, 0x51, 0x26, 0xb1, 0xa3, 0xd2, 0xfb, 0xb1, 0x47, 0xf0, 0x2d, 0x61, 0x34, 0xc8, + 0x29, 0x18, 0xef, 0xe1, 0x75, 0xe1, 0xf7, 0x28, 0xa9, 0xa0, 0xe7, 0x61, 0x4c, 0xc4, 0xd6, 0x67, + 0x96, 0x9b, 0x7c, 0xea, 0xd8, 0xfb, 0x7d, 0x25, 0x29, 0xc6, 0x3a, 0x8e, 0xfd, 0x3d, 0x05, 0x38, + 0x95, 0x61, 0x7a, 0xcf, 0x59, 0xd5, 0xb6, 0x17, 0xc5, 0x2a, 0x4b, 0x9b, 0xc6, 0xaa, 0x78, 0x39, + 0x56, 0x18, 0x74, 0x3f, 0x70, 0x66, 0x98, 0x66, 0x80, 0xc2, 0xb4, 0x55, 0x40, 0x8f, 0x98, 0xef, + 0xec, 0x12, 0x0c, 0x75, 0x22, 0x22, 0xc3, 0xe6, 0x29, 0xfe, 0xcd, 0x9e, 0x75, 0x18, 0x84, 0x8a, + 0xc7, 0xdb, 0xea, 0x85, 0x44, 0x13, 0x8f, 0xf9, 0x1b, 0x09, 0x87, 0xd1, 0xce, 0xc5, 0xc4, 0x77, + 0xfc, 0x58, 0x08, 0xd1, 0x49, 0xfc, 0x27, 0x56, 0x8a, 0x05, 0xd4, 0xfe, 0x52, 0x11, 0xce, 0xe5, + 0x3a, 0xe3, 0xd0, 0xae, 0xb7, 0x02, 0xdf, 0x8b, 0x03, 0x65, 0x18, 0xc1, 0x63, 0x3e, 0x91, 0xf6, + 0xce, 0x9a, 0x28, 0xc7, 0x0a, 0x03, 0x5d, 0x86, 0x61, 0xa6, 0x74, 0xea, 0xca, 0x57, 0xb7, 0x54, + 0xe1, 0x41, 0x40, 0x38, 0x78, 0xe0, 0x5c, 0xa0, 0x4f, 0xc2, 0x50, 0x3b, 0x08, 0x9a, 0x69, 0xa6, + 0x45, 0xbb, 0x1b, 0x04, 0x4d, 0xcc, 0x80, 0xe8, 0x43, 0x62, 0xbc, 0x52, 0x96, 0x00, 0xd8, 0x71, + 0x83, 0x48, 0x1b, 0xb4, 0xa7, 0x61, 0x74, 0x97, 0xec, 0x87, 0x9e, 0xbf, 0x9d, 0xb6, 0x10, 0xb9, + 0xc1, 0x8b, 0xb1, 0x84, 0x9b, 0xa9, 0x87, 0x46, 0x8f, 0x3b, 0x89, 0x67, 0xa9, 0xef, 0x11, 0xf8, + 0xbd, 0x45, 0x98, 0xc2, 0x4b, 0x95, 0xf7, 0x27, 0xe2, 0x76, 0xf7, 0x44, 0x1c, 0x77, 0x12, 0xcf, + 0xfe, 0xb3, 0xf1, 0x73, 0x16, 0x4c, 0xb1, 0x08, 0xff, 0x22, 0x5a, 0x90, 0x17, 0xf8, 0x27, 0x20, + 0xe2, 0x3d, 0x09, 0xc3, 0x21, 0x6d, 0x34, 0x9d, 0xa8, 0x8e, 0xf5, 0x04, 0x73, 0x18, 0x3a, 0x0f, + 0x43, 0xac, 0x0b, 0x74, 0xf2, 0xc6, 0x79, 0x8e, 0x9f, 0x8a, 0x13, 0x3b, 0x98, 0x95, 0xb2, 0x10, + 0x18, 0x98, 0xb4, 0x9b, 0x1e, 0xef, 0x74, 0xf2, 0x24, 0xf8, 0xde, 0x08, 0x81, 0x91, 0xd9, 0xb5, + 0x77, 0x17, 0x02, 0x23, 0x9b, 0x64, 0xef, 0xeb, 0xd3, 0x1f, 0x16, 0xe0, 0x62, 0x66, 0xbd, 0x81, + 0x43, 0x60, 0xf4, 0xae, 0xfd, 0x28, 0x23, 0xc1, 0x17, 0x4f, 0xd0, 0xfe, 0x6e, 0x68, 0x50, 0x09, + 0x73, 0x78, 0x80, 0xc8, 0x14, 0x99, 0x43, 0xf6, 0x1e, 0x89, 0x4c, 0x91, 0xd9, 0xb7, 0x9c, 0xeb, + 0xdf, 0x9f, 0x17, 0x72, 0xbe, 0x85, 0x5d, 0x04, 0xaf, 0x50, 0x3e, 0xc3, 0x80, 0x91, 0x90, 0x98, + 0xc7, 0x39, 0x8f, 0xe1, 0x65, 0x58, 0x41, 0xd1, 0x22, 0x4c, 0xb5, 0x3c, 0x9f, 0x32, 0x9f, 0x7d, + 0x53, 0xf0, 0x53, 0x81, 0x83, 0xd6, 0x4c, 0x30, 0x4e, 0xe3, 0x23, 0x4f, 0x8b, 0x5a, 0x51, 0xc8, + 0x4f, 0xfd, 0x9c, 0xdb, 0xdb, 0x05, 0xf3, 0xb9, 0x54, 0x8d, 0x62, 0x46, 0x04, 0x8b, 0x35, 0xed, + 0xfe, 0x5f, 0x1c, 0xfc, 0xfe, 0x3f, 0x9e, 0x7d, 0xf7, 0x9f, 0x7b, 0x0d, 0x26, 0x1e, 0x5a, 0xe1, + 0x6b, 0x7f, 0xa5, 0x08, 0x8f, 0xf7, 0xd8, 0xf6, 0x9c, 0xd7, 0x1b, 0x73, 0xa0, 0xf1, 0xfa, 0xae, + 0x79, 0xa8, 0xc1, 0xe9, 0xad, 0x4e, 0xb3, 0xb9, 0xcf, 0x4c, 0xdc, 0x89, 0x2b, 0x31, 0x84, 0x4c, + 0x79, 0x5e, 0x66, 0x55, 0x5a, 0xcd, 0xc0, 0xc1, 0x99, 0x35, 0xa9, 0x40, 0x4f, 0x4f, 0x92, 0x7d, + 0x45, 0x2a, 0x25, 0xd0, 0x63, 0x1d, 0x88, 0x4d, 0x5c, 0x74, 0x0d, 0x66, 0x9c, 0x3d, 0xc7, 0xe3, + 0xa1, 0x3f, 0x25, 0x01, 0x2e, 0xd1, 0x2b, 0x3d, 0xdd, 0x62, 0x1a, 0x01, 0x77, 0xd7, 0x41, 0x6f, + 0x00, 0x0a, 0x44, 0xea, 0xfa, 0x6b, 0xc4, 0x17, 0xaf, 0x5a, 0x6c, 0xee, 0x8a, 0x09, 0x4b, 0xb8, + 0xd5, 0x85, 0x81, 0x33, 0x6a, 0xa5, 0xa2, 0x40, 0x8c, 0xe4, 0x47, 0x81, 0xe8, 0xcd, 0x17, 0xfb, + 0x26, 0x21, 0xf8, 0x2f, 0x16, 0x3d, 0xbe, 0xb8, 0x90, 0x6f, 0x06, 0x33, 0x7b, 0x8d, 0x59, 0x8d, + 0x71, 0x1d, 0x9e, 0x16, 0x90, 0xe1, 0x8c, 0x66, 0x35, 0x96, 0x00, 0xb1, 0x89, 0xcb, 0x17, 0x44, + 0x94, 0xf8, 0x01, 0x1a, 0x22, 0xbe, 0x88, 0xb8, 0xa2, 0x30, 0xd0, 0xa7, 0x60, 0xd4, 0xf5, 0xf6, + 0xbc, 0x28, 0x08, 0xc5, 0x4a, 0x3f, 0xe2, 0x73, 0x41, 0xc2, 0x07, 0x2b, 0x9c, 0x0c, 0x96, 0xf4, + 0xec, 0xef, 0x2d, 0xc0, 0x84, 0x6c, 0xf1, 0xcd, 0x4e, 0x10, 0x3b, 0x27, 0x70, 0x2c, 0x5f, 0x33, + 0x8e, 0xe5, 0x0f, 0xf5, 0x0a, 0x3b, 0xc3, 0xba, 0x94, 0x7b, 0x1c, 0xdf, 0x4a, 0x1d, 0xc7, 0x4f, + 0xf5, 0x27, 0xd5, 0xfb, 0x18, 0xfe, 0x67, 0x16, 0xcc, 0x18, 0xf8, 0x27, 0x70, 0x1a, 0xac, 0x9a, + 0xa7, 0xc1, 0x13, 0x7d, 0xbf, 0x21, 0xe7, 0x14, 0xf8, 0xce, 0x62, 0xaa, 0xef, 0x8c, 0xfb, 0xbf, + 0x0d, 0x43, 0x3b, 0x4e, 0xe8, 0xf6, 0x0a, 0xb3, 0xdd, 0x55, 0x69, 0xe1, 0xba, 0x13, 0x8a, 0x67, + 0xbd, 0x67, 0x55, 0xe6, 0x65, 0x27, 0xec, 0xff, 0xa4, 0xc7, 0x9a, 0x42, 0xaf, 0xc2, 0x48, 0xd4, + 0x08, 0xda, 0xca, 0x28, 0xfd, 0x12, 0xcf, 0xca, 0x4c, 0x4b, 0x0e, 0x0f, 0xe6, 0x91, 0xd9, 0x1c, + 0x2d, 0xc6, 0x02, 0x1f, 0x7d, 0x1a, 0x26, 0xd8, 0x2f, 0x65, 0x63, 0x53, 0xcc, 0x4f, 0xc9, 0x53, + 0xd7, 0x11, 0xb9, 0x01, 0x9a, 0x51, 0x84, 0x4d, 0x52, 0x73, 0xdb, 0x50, 0x56, 0x9f, 0xf5, 0x48, + 0xdf, 0xe3, 0xfe, 0x43, 0x11, 0x4e, 0x65, 0xac, 0x39, 0x14, 0x19, 0x33, 0xf1, 0xfc, 0x80, 0x4b, + 0xf5, 0x5d, 0xce, 0x45, 0xc4, 0x6e, 0x43, 0xae, 0x58, 0x5b, 0x03, 0x37, 0x7a, 0x3b, 0x22, 0xe9, + 0x46, 0x69, 0x51, 0xff, 0x46, 0x69, 0x63, 0x27, 0x36, 0xd4, 0xb4, 0x21, 0xd5, 0xd3, 0x47, 0x3a, + 0xa7, 0x7f, 0x52, 0x84, 0xd3, 0x59, 0x91, 0xb0, 0xd0, 0xb7, 0xa4, 0xd2, 0xb3, 0xbd, 0x34, 0x68, + 0x0c, 0x2d, 0x9e, 0xb3, 0x8d, 0xeb, 0x80, 0x97, 0x16, 0xcc, 0x84, 0x6d, 0x7d, 0x87, 0x59, 0xb4, + 0xc9, 0x7c, 0xdc, 0x43, 0x9e, 0x56, 0x4f, 0xb2, 0x8f, 0x8f, 0x0e, 0xdc, 0x01, 0x91, 0x8f, 0x2f, + 0x4a, 0xbd, 0xdf, 0xcb, 0xe2, 0xfe, 0xef, 0xf7, 0xb2, 0xe5, 0x39, 0x0f, 0xc6, 0xb4, 0xaf, 0x79, + 0xa4, 0x33, 0xbe, 0x4b, 0x4f, 0x2b, 0xad, 0xdf, 0x8f, 0x74, 0xd6, 0x7f, 0xc8, 0x82, 0x94, 0xc9, + 0xb5, 0x52, 0x8b, 0x59, 0xb9, 0x6a, 0xb1, 0x4b, 0x30, 0x14, 0x06, 0x4d, 0x92, 0xce, 0x86, 0x86, + 0x83, 0x26, 0xc1, 0x0c, 0x42, 0x31, 0xe2, 0x44, 0xd9, 0x31, 0xae, 0x5f, 0xe4, 0xc4, 0x15, 0xed, + 0x49, 0x18, 0x6e, 0x92, 0x3d, 0xd2, 0x4c, 0x27, 0xad, 0xb8, 0x49, 0x0b, 0x31, 0x87, 0xd9, 0x3f, + 0x37, 0x04, 0x17, 0x7a, 0x46, 0x89, 0xa0, 0xd7, 0xa1, 0x6d, 0x27, 0x26, 0xf7, 0x9c, 0xfd, 0x74, + 0x74, 0xf9, 0x6b, 0xbc, 0x18, 0x4b, 0x38, 0x73, 0x8a, 0xe1, 0x41, 0x62, 0x53, 0x4a, 0x44, 0x11, + 0x1b, 0x56, 0x40, 0x4d, 0xa5, 0x54, 0xf1, 0x38, 0x94, 0x52, 0x2f, 0x00, 0x44, 0x51, 0x93, 0x1b, + 0xbe, 0xb8, 0xc2, 0xdb, 0x26, 0x09, 0x26, 0x5c, 0xbf, 0x29, 0x20, 0x58, 0xc3, 0x42, 0x15, 0x98, + 0x6e, 0x87, 0x41, 0xcc, 0x75, 0xb2, 0x15, 0x6e, 0x1b, 0x36, 0x6c, 0x3a, 0xe8, 0xd7, 0x52, 0x70, + 0xdc, 0x55, 0x03, 0xbd, 0x0c, 0x63, 0xc2, 0x69, 0xbf, 0x16, 0x04, 0x4d, 0xa1, 0x06, 0x52, 0xe6, + 0x52, 0xf5, 0x04, 0x84, 0x75, 0x3c, 0xad, 0x1a, 0x53, 0xf4, 0x8e, 0x66, 0x56, 0xe3, 0xca, 0x5e, + 0x0d, 0x2f, 0x15, 0x15, 0xaf, 0x34, 0x50, 0x54, 0xbc, 0x44, 0x31, 0x56, 0x1e, 0xf8, 0x6d, 0x0b, + 0xfa, 0xaa, 0x92, 0x7e, 0x7a, 0x08, 0x4e, 0x89, 0x85, 0xf3, 0xa8, 0x97, 0xcb, 0xed, 0xee, 0xe5, + 0x72, 0x1c, 0xaa, 0xb3, 0xf7, 0xd7, 0xcc, 0x49, 0xaf, 0x99, 0xef, 0xb3, 0xc0, 0x14, 0xaf, 0xd0, + 0xff, 0x9f, 0x9b, 0x9e, 0xe3, 0xe5, 0x5c, 0x71, 0xcd, 0x95, 0x07, 0xc8, 0xbb, 0x4c, 0xd4, 0x61, + 0xff, 0x27, 0x0b, 0x9e, 0xe8, 0x4b, 0x11, 0xad, 0x40, 0x99, 0xc9, 0x80, 0xda, 0xed, 0xec, 0x29, + 0x65, 0x3b, 0x2a, 0x01, 0x39, 0x22, 0x69, 0x52, 0x13, 0xad, 0x74, 0xe5, 0x41, 0x79, 0x3a, 0x23, + 0x0f, 0xca, 0x19, 0x63, 0x78, 0x1e, 0x32, 0x11, 0xca, 0x1f, 0x14, 0x61, 0x84, 0xaf, 0xf8, 0x13, + 0xb8, 0x86, 0x3d, 0x03, 0x65, 0xaf, 0xd5, 0xea, 0xf0, 0x6c, 0x12, 0xc3, 0xdc, 0xb3, 0x92, 0x0e, + 0x4d, 0x55, 0x16, 0xe2, 0x04, 0x8e, 0x56, 0x85, 0x92, 0xb7, 0x47, 0x8c, 0x3e, 0xde, 0xf1, 0x85, + 0x8a, 0x13, 0x3b, 0x5c, 0xa6, 0x50, 0x47, 0x5b, 0xa2, 0x0e, 0x46, 0x9f, 0x05, 0x88, 0xe2, 0xd0, + 0xf3, 0xb7, 0x69, 0x99, 0x88, 0xde, 0xf8, 0xe1, 0x1e, 0xd4, 0xea, 0x0a, 0x99, 0xd3, 0x4c, 0xb6, + 0xb9, 0x02, 0x60, 0x8d, 0x22, 0x5a, 0x30, 0x0e, 0xd7, 0xb9, 0x94, 0x96, 0x14, 0x38, 0xd5, 0xe4, + 0xa8, 0x9d, 0x7b, 0x05, 0xca, 0x8a, 0x78, 0x3f, 0x95, 0xcf, 0xb8, 0x2e, 0x89, 0x7c, 0x02, 0xa6, + 0x52, 0x7d, 0x3b, 0x92, 0xc6, 0xe8, 0xe7, 0x2d, 0x98, 0xe2, 0x9d, 0x59, 0xf1, 0xf7, 0x04, 0x03, + 0x7e, 0x07, 0x4e, 0x37, 0x33, 0x18, 0xa1, 0x98, 0xfe, 0xc1, 0x19, 0xa7, 0xd2, 0x10, 0x65, 0x41, + 0x71, 0x66, 0x1b, 0xe8, 0x0a, 0x5d, 0xe4, 0x94, 0xd1, 0x39, 0x4d, 0xe1, 0x68, 0x39, 0xce, 0x17, + 0x38, 0x2f, 0xc3, 0x0a, 0x6a, 0xff, 0xb6, 0x05, 0x33, 0xbc, 0xe7, 0x37, 0xc8, 0xbe, 0x62, 0x07, + 0x5f, 0xcb, 0xbe, 0x8b, 0x3c, 0x46, 0x85, 0x9c, 0x3c, 0x46, 0xfa, 0xa7, 0x15, 0x7b, 0x7e, 0xda, + 0x4f, 0x59, 0x20, 0x56, 0xc8, 0x09, 0xdc, 0xfb, 0xbf, 0xd1, 0xbc, 0xf7, 0xcf, 0xe5, 0x6f, 0x82, + 0x9c, 0x0b, 0xff, 0x9f, 0x59, 0x30, 0xcd, 0x11, 0x92, 0x07, 0xea, 0xaf, 0xe9, 0x3c, 0x0c, 0x92, + 0xed, 0xf4, 0x06, 0xd9, 0xdf, 0x08, 0x6a, 0x4e, 0xbc, 0x93, 0xfd, 0x51, 0xc6, 0x64, 0x0d, 0xf5, + 0x9c, 0x2c, 0x57, 0x6e, 0xa0, 0x23, 0xa4, 0x50, 0x3e, 0x72, 0x98, 0x7f, 0xfb, 0xab, 0x16, 0x20, + 0xde, 0x8c, 0x21, 0x2b, 0x51, 0x09, 0x84, 0x95, 0x6a, 0x67, 0x4b, 0xc2, 0x9a, 0x14, 0x04, 0x6b, + 0x58, 0xc7, 0x32, 0x3c, 0x29, 0x2b, 0x83, 0x62, 0x7f, 0x2b, 0x83, 0x23, 0x8c, 0xe8, 0x1f, 0x0c, + 0x43, 0xda, 0x5d, 0x04, 0xdd, 0x81, 0xf1, 0x86, 0xd3, 0x76, 0x36, 0xbd, 0xa6, 0x17, 0x7b, 0x24, + 0xea, 0x65, 0x9e, 0xb4, 0xac, 0xe1, 0x89, 0x77, 0x61, 0xad, 0x04, 0x1b, 0x74, 0xd0, 0x02, 0x40, + 0x3b, 0xf4, 0xf6, 0xbc, 0x26, 0xd9, 0x66, 0xea, 0x09, 0xe6, 0xda, 0xcd, 0x6d, 0x6e, 0x64, 0x29, + 0xd6, 0x30, 0x32, 0x7c, 0x67, 0x8b, 0x8f, 0xd8, 0x77, 0x16, 0x4e, 0xcc, 0x77, 0x76, 0xe8, 0x48, + 0xbe, 0xb3, 0xa5, 0x23, 0xfb, 0xce, 0x0e, 0x0f, 0xe4, 0x3b, 0x8b, 0xe1, 0xac, 0x14, 0xf7, 0xe8, + 0xff, 0x55, 0xaf, 0x49, 0x84, 0x8c, 0xcf, 0xfd, 0xd1, 0xe7, 0x1e, 0x1c, 0xcc, 0x9f, 0xc5, 0x99, + 0x18, 0x38, 0xa7, 0x26, 0xfa, 0x24, 0xcc, 0x3a, 0xcd, 0x66, 0x70, 0x4f, 0x4d, 0xea, 0x4a, 0xd4, + 0x70, 0x9a, 0x5c, 0xef, 0x3f, 0xca, 0xa8, 0x9e, 0x7f, 0x70, 0x30, 0x3f, 0xbb, 0x98, 0x83, 0x83, + 0x73, 0x6b, 0xa3, 0x8f, 0x43, 0xb9, 0x1d, 0x06, 0x8d, 0x35, 0xcd, 0xa7, 0xed, 0x22, 0x1d, 0xc0, + 0x9a, 0x2c, 0x3c, 0x3c, 0x98, 0x9f, 0x50, 0x7f, 0xd8, 0x81, 0x9f, 0x54, 0xb0, 0x77, 0xe1, 0x54, + 0x9d, 0x84, 0x1e, 0x4b, 0x88, 0xec, 0x26, 0xfc, 0x63, 0x03, 0xca, 0x61, 0x8a, 0x63, 0x0e, 0x14, + 0xd7, 0x4e, 0x8b, 0x87, 0x2e, 0x39, 0x64, 0x42, 0xc8, 0xfe, 0xdf, 0x16, 0x8c, 0x0a, 0xf7, 0x8d, + 0x13, 0x90, 0xea, 0x16, 0x0d, 0xe5, 0xfa, 0x7c, 0xf6, 0xa9, 0xc2, 0x3a, 0x93, 0xab, 0x56, 0xaf, + 0xa6, 0xd4, 0xea, 0x4f, 0xf4, 0x22, 0xd2, 0x5b, 0xa1, 0xfe, 0xb7, 0x8a, 0x30, 0x69, 0xfa, 0xf9, + 0x9d, 0xc0, 0x10, 0xac, 0xc3, 0x68, 0x24, 0x1c, 0xd9, 0x0a, 0xf9, 0xe6, 0xdb, 0xe9, 0x49, 0x4c, + 0x4c, 0xbb, 0x84, 0xeb, 0x9a, 0x24, 0x92, 0xe9, 0x21, 0x57, 0x7c, 0x84, 0x1e, 0x72, 0xfd, 0x5c, + 0x2d, 0x87, 0x8e, 0xc3, 0xd5, 0xd2, 0xfe, 0x32, 0x3b, 0xd9, 0xf4, 0xf2, 0x13, 0x10, 0x7a, 0xae, + 0x99, 0x67, 0xa0, 0xdd, 0x63, 0x65, 0x89, 0x4e, 0xe5, 0x08, 0x3f, 0x3f, 0x6b, 0xc1, 0x85, 0x8c, + 0xaf, 0xd2, 0x24, 0xa1, 0x67, 0xa1, 0xe4, 0x74, 0x5c, 0x4f, 0xed, 0x65, 0xed, 0x89, 0x6d, 0x51, + 0x94, 0x63, 0x85, 0x81, 0x96, 0x61, 0x86, 0xdc, 0x6f, 0x7b, 0xfc, 0x75, 0x51, 0xb7, 0xbf, 0x2c, + 0xf2, 0x58, 0xdf, 0x2b, 0x69, 0x20, 0xee, 0xc6, 0x57, 0xe1, 0x27, 0x8a, 0xb9, 0xe1, 0x27, 0xfe, + 0xa1, 0x05, 0x63, 0xca, 0x95, 0xeb, 0x91, 0x8f, 0xf6, 0x37, 0x99, 0xa3, 0xfd, 0x78, 0x8f, 0xd1, + 0xce, 0x19, 0xe6, 0xdf, 0x2a, 0xa8, 0xfe, 0xd6, 0x82, 0x30, 0x1e, 0x40, 0xc2, 0x7a, 0x15, 0x4a, + 0xed, 0x30, 0x88, 0x83, 0x46, 0xd0, 0x14, 0x02, 0xd6, 0xf9, 0x24, 0x0e, 0x0b, 0x2f, 0x3f, 0xd4, + 0x7e, 0x63, 0x85, 0x4d, 0x65, 0x1b, 0xa7, 0xdd, 0x96, 0x00, 0x69, 0x96, 0xc5, 0xa2, 0x94, 0x26, + 0xc5, 0x58, 0xc7, 0x61, 0x03, 0x1e, 0x84, 0xb1, 0x90, 0x83, 0x92, 0x01, 0x0f, 0xc2, 0x18, 0x33, + 0x08, 0x72, 0x01, 0x62, 0x27, 0xdc, 0x26, 0x31, 0x2d, 0x13, 0xa1, 0xa2, 0xf2, 0xf9, 0x4d, 0x27, + 0xf6, 0x9a, 0x0b, 0x9e, 0x1f, 0x47, 0x71, 0xb8, 0x50, 0xf5, 0xe3, 0x5b, 0x21, 0xbf, 0xe2, 0x69, + 0xb1, 0x58, 0x14, 0x2d, 0xac, 0xd1, 0x95, 0x6e, 0xcb, 0xac, 0x8d, 0x61, 0xf3, 0x7d, 0x7f, 0x5d, + 0x94, 0x63, 0x85, 0x61, 0xbf, 0xc2, 0x4e, 0x1f, 0x36, 0xa6, 0x47, 0x0b, 0x5e, 0xf2, 0x8b, 0x65, + 0x35, 0x1b, 0xec, 0x71, 0xaf, 0xa2, 0x87, 0x48, 0xe9, 0xcd, 0xec, 0x69, 0xc3, 0xba, 0x0b, 0x53, + 0x12, 0x47, 0x05, 0x7d, 0x73, 0x97, 0xcd, 0xc6, 0x73, 0x7d, 0x4e, 0x8d, 0x23, 0x58, 0x69, 0xb0, + 0x94, 0x05, 0x2c, 0xa0, 0x7b, 0xb5, 0x26, 0xf6, 0x85, 0x96, 0xb2, 0x40, 0x00, 0x70, 0x82, 0x83, + 0xae, 0x8a, 0x0b, 0x3c, 0x57, 0x7d, 0x3f, 0x9e, 0xba, 0xc0, 0xcb, 0xcf, 0xd7, 0x94, 0xe5, 0xcf, + 0xc3, 0x98, 0x4a, 0xd8, 0x59, 0xe3, 0x79, 0x20, 0xc5, 0xb2, 0x59, 0x49, 0x8a, 0xb1, 0x8e, 0x83, + 0x36, 0x60, 0x2a, 0xe2, 0xaa, 0x24, 0x15, 0x1f, 0x95, 0xab, 0xe4, 0x3e, 0x2c, 0x0d, 0x5d, 0xea, + 0x26, 0xf8, 0x90, 0x15, 0x71, 0x6e, 0x23, 0x5d, 0x85, 0xd3, 0x24, 0xd0, 0xeb, 0x30, 0xd9, 0x0c, + 0x1c, 0x77, 0xc9, 0x69, 0x3a, 0x7e, 0x83, 0x7d, 0x6f, 0xc9, 0xcc, 0xfb, 0x76, 0xd3, 0x80, 0xe2, + 0x14, 0x36, 0x15, 0x96, 0xf4, 0x12, 0x11, 0xd3, 0xd7, 0xf1, 0xb7, 0x49, 0x24, 0xd2, 0x2f, 0x32, + 0x61, 0xe9, 0x66, 0x0e, 0x0e, 0xce, 0xad, 0x8d, 0x5e, 0x85, 0x71, 0xf9, 0xf9, 0x9a, 0x67, 0x7d, + 0x62, 0xdb, 0xaf, 0xc1, 0xb0, 0x81, 0x89, 0xee, 0xc1, 0x19, 0xf9, 0x7f, 0x23, 0x74, 0xb6, 0xb6, + 0xbc, 0x86, 0x70, 0x37, 0xe5, 0x8e, 0x77, 0x8b, 0xd2, 0x3b, 0x6c, 0x25, 0x0b, 0xe9, 0xf0, 0x60, + 0xfe, 0x92, 0x18, 0xb5, 0x4c, 0x38, 0x9b, 0xc4, 0x6c, 0xfa, 0x68, 0x0d, 0x4e, 0xed, 0x10, 0xa7, + 0x19, 0xef, 0x2c, 0xef, 0x90, 0xc6, 0xae, 0xdc, 0x44, 0xcc, 0x5f, 0x5f, 0xb3, 0x88, 0xbf, 0xde, + 0x8d, 0x82, 0xb3, 0xea, 0xa1, 0xb7, 0x60, 0xb6, 0xdd, 0xd9, 0x6c, 0x7a, 0xd1, 0xce, 0x7a, 0x10, + 0x33, 0x6b, 0x17, 0x95, 0xff, 0x53, 0x38, 0xf6, 0xab, 0x88, 0x08, 0xb5, 0x1c, 0x3c, 0x9c, 0x4b, + 0x01, 0xbd, 0x03, 0x67, 0x52, 0x8b, 0x41, 0xb8, 0x36, 0x4f, 0xe6, 0x47, 0x48, 0xaf, 0x67, 0x55, + 0x10, 0x51, 0x02, 0xb2, 0x40, 0x38, 0xbb, 0x09, 0xf4, 0x12, 0x94, 0xbc, 0xf6, 0xaa, 0xd3, 0xf2, + 0x9a, 0xfb, 0x2c, 0xc4, 0x7b, 0x99, 0x85, 0x3d, 0x2f, 0x55, 0x6b, 0xbc, 0xec, 0x50, 0xfb, 0x8d, + 0x15, 0x26, 0xbd, 0x22, 0x68, 0x81, 0x2c, 0xa3, 0xd9, 0xe9, 0xc4, 0x98, 0x57, 0x8b, 0x76, 0x19, + 0x61, 0x03, 0xeb, 0xdd, 0xd9, 0x48, 0xbd, 0x4d, 0x2b, 0x6b, 0x32, 0x23, 0xfa, 0x1c, 0x8c, 0xeb, + 0x2b, 0x56, 0x9c, 0x7f, 0x97, 0xb3, 0x45, 0x2a, 0x6d, 0x65, 0x73, 0x89, 0x53, 0xad, 0x5e, 0x1d, + 0x86, 0x0d, 0x8a, 0x36, 0x81, 0xec, 0xb1, 0x44, 0x37, 0xa1, 0xd4, 0x68, 0x7a, 0xc4, 0x8f, 0xab, + 0xb5, 0x5e, 0x31, 0x98, 0x96, 0x05, 0x8e, 0x98, 0x1c, 0x11, 0xbe, 0x9a, 0x97, 0x61, 0x45, 0xc1, + 0xfe, 0x95, 0x02, 0xcc, 0xf7, 0x89, 0x85, 0x9e, 0x52, 0xe5, 0x5b, 0x03, 0xa9, 0xf2, 0x17, 0x65, + 0xe6, 0xd4, 0xf5, 0x94, 0xca, 0x22, 0x95, 0x15, 0x35, 0x51, 0x5c, 0xa4, 0xf1, 0x07, 0x36, 0xad, + 0xd6, 0x5f, 0x03, 0x86, 0xfa, 0x3a, 0x07, 0x18, 0xaf, 0x80, 0xc3, 0x83, 0xdf, 0x93, 0x72, 0x5f, + 0x74, 0xec, 0x2f, 0x17, 0xe0, 0x8c, 0x1a, 0xc2, 0xaf, 0xdf, 0x81, 0xbb, 0xdd, 0x3d, 0x70, 0xc7, + 0xf0, 0x1e, 0x66, 0xdf, 0x82, 0x11, 0x1e, 0x54, 0x6a, 0x00, 0xf9, 0xec, 0x49, 0x33, 0xfe, 0xa2, + 0x12, 0x09, 0x8c, 0x18, 0x8c, 0xdf, 0x6d, 0xc1, 0xd4, 0xc6, 0x72, 0xad, 0x1e, 0x34, 0x76, 0x49, + 0xbc, 0xc8, 0xe5, 0x69, 0x2c, 0x64, 0x2d, 0xeb, 0x21, 0x65, 0xa8, 0x2c, 0xe9, 0xec, 0x12, 0x0c, + 0xed, 0x04, 0x51, 0x9c, 0x7e, 0x2c, 0xbf, 0x1e, 0x44, 0x31, 0x66, 0x10, 0xfb, 0x77, 0x2c, 0x18, + 0x66, 0xb9, 0xc2, 0xfb, 0x65, 0xab, 0x1f, 0xe4, 0xbb, 0xd0, 0xcb, 0x30, 0x42, 0xb6, 0xb6, 0x48, + 0x23, 0x16, 0xb3, 0x2a, 0xbd, 0x9b, 0x47, 0x56, 0x58, 0x29, 0x15, 0x30, 0x58, 0x63, 0xfc, 0x2f, + 0x16, 0xc8, 0xe8, 0x2e, 0x94, 0x63, 0xaf, 0x45, 0x16, 0x5d, 0x57, 0x3c, 0x37, 0x3e, 0x84, 0x87, + 0xf6, 0x86, 0x24, 0x80, 0x13, 0x5a, 0xf6, 0x97, 0x0a, 0x00, 0x49, 0xb4, 0x8f, 0x7e, 0x9f, 0xb8, + 0xd4, 0xf5, 0x10, 0x75, 0x39, 0xe3, 0x21, 0x0a, 0x25, 0x04, 0x33, 0x5e, 0xa1, 0xd4, 0x30, 0x15, + 0x07, 0x1a, 0xa6, 0xa1, 0xa3, 0x0c, 0xd3, 0x32, 0xcc, 0x24, 0xd1, 0x4a, 0xcc, 0x60, 0x4d, 0xec, + 0x0e, 0xb5, 0x91, 0x06, 0xe2, 0x6e, 0x7c, 0x9b, 0xc0, 0x25, 0x15, 0xb4, 0x41, 0x9c, 0x35, 0xcc, + 0x9a, 0x55, 0x7f, 0xd8, 0xeb, 0x33, 0x4e, 0xc9, 0x4b, 0x5b, 0x21, 0xf7, 0xa5, 0xed, 0x47, 0x2d, + 0x38, 0x9d, 0x6e, 0x87, 0xb9, 0x17, 0x7e, 0xd1, 0x82, 0x33, 0xec, 0xbd, 0x91, 0xb5, 0xda, 0xfd, + 0xba, 0xf9, 0x52, 0xcf, 0x40, 0x14, 0x39, 0x3d, 0x4e, 0xdc, 0xe8, 0xd7, 0xb2, 0x48, 0xe3, 0xec, + 0x16, 0xed, 0xff, 0x58, 0x80, 0xd9, 0xbc, 0x08, 0x16, 0xcc, 0xd8, 0xdd, 0xb9, 0x5f, 0xdf, 0x25, + 0xf7, 0x84, 0x49, 0x71, 0x62, 0xec, 0xce, 0x8b, 0xb1, 0x84, 0xa7, 0xc3, 0x5b, 0x17, 0x06, 0x0b, + 0x6f, 0x8d, 0x76, 0x60, 0xe6, 0xde, 0x0e, 0xf1, 0x6f, 0xfb, 0x91, 0x13, 0x7b, 0xd1, 0x96, 0xc7, + 0x1e, 0x0a, 0xf9, 0xba, 0xf9, 0x98, 0x34, 0xfc, 0xbd, 0x9b, 0x46, 0x38, 0x3c, 0x98, 0xbf, 0x60, + 0x14, 0x24, 0x5d, 0xe6, 0x8c, 0x04, 0x77, 0x13, 0xed, 0x8e, 0x0e, 0x3e, 0xf4, 0x08, 0xa3, 0x83, + 0xdb, 0x5f, 0xb4, 0xe0, 0x5c, 0x6e, 0xf6, 0x3e, 0x74, 0x05, 0x4a, 0x4e, 0xdb, 0xe3, 0xba, 0x56, + 0xc1, 0x46, 0x99, 0xce, 0xa0, 0x56, 0xe5, 0x9a, 0x56, 0x05, 0x55, 0x59, 0x85, 0x0b, 0xb9, 0x59, + 0x85, 0xfb, 0x26, 0x09, 0xb6, 0xbf, 0xcb, 0x02, 0xe1, 0xa8, 0x37, 0x00, 0xef, 0xfe, 0xb4, 0x4c, + 0xca, 0x6e, 0x64, 0x10, 0xb9, 0x94, 0xef, 0xb9, 0x28, 0xf2, 0x86, 0x28, 0x59, 0xc9, 0xc8, 0x16, + 0x62, 0xd0, 0xb2, 0x5d, 0x10, 0xd0, 0x0a, 0x61, 0x9a, 0xca, 0xfe, 0xbd, 0x79, 0x01, 0xc0, 0x65, + 0xb8, 0x5a, 0x6a, 0x66, 0x75, 0x32, 0x57, 0x14, 0x04, 0x6b, 0x58, 0xf6, 0xbf, 0x2b, 0xc0, 0x98, + 0xcc, 0x58, 0xd1, 0xf1, 0x07, 0xd1, 0x27, 0x1c, 0x29, 0x85, 0x1d, 0xcb, 0x65, 0x4e, 0x09, 0xd7, + 0x12, 0x35, 0x4c, 0x92, 0xcb, 0x5c, 0x02, 0x70, 0x82, 0x43, 0x77, 0x51, 0xd4, 0xd9, 0x64, 0xe8, + 0x29, 0xb7, 0xb2, 0x3a, 0x2f, 0xc6, 0x12, 0x8e, 0x3e, 0x09, 0xd3, 0xbc, 0x5e, 0x18, 0xb4, 0x9d, + 0x6d, 0xae, 0xc4, 0x1e, 0x56, 0xfe, 0xe0, 0xd3, 0x6b, 0x29, 0xd8, 0xe1, 0xc1, 0xfc, 0xe9, 0x74, + 0x19, 0x7b, 0x9d, 0xe9, 0xa2, 0xc2, 0xcc, 0x43, 0x78, 0x23, 0x74, 0xf7, 0x77, 0x59, 0x95, 0x24, + 0x20, 0xac, 0xe3, 0xd9, 0x9f, 0x03, 0xd4, 0x9d, 0xbb, 0x03, 0xbd, 0xc1, 0x6d, 0x02, 0xbd, 0x90, + 0xb8, 0xbd, 0x5e, 0x6b, 0x74, 0xaf, 0x67, 0xe9, 0x11, 0xc2, 0x6b, 0x61, 0x55, 0xdf, 0xfe, 0xab, + 0x45, 0x98, 0x4e, 0xfb, 0xc0, 0xa2, 0xeb, 0x30, 0xc2, 0x45, 0x0f, 0x41, 0xbe, 0x87, 0x31, 0x80, + 0xe6, 0x39, 0xcb, 0x98, 0xb0, 0x90, 0x5e, 0x44, 0x7d, 0xf4, 0x16, 0x8c, 0xb9, 0xc1, 0x3d, 0xff, + 0x9e, 0x13, 0xba, 0x8b, 0xb5, 0xaa, 0x58, 0xce, 0x99, 0xb7, 0xa5, 0x4a, 0x82, 0xa6, 0x7b, 0xe3, + 0xb2, 0x87, 0xaf, 0x04, 0x84, 0x75, 0x72, 0x68, 0x83, 0x85, 0x1a, 0xde, 0xf2, 0xb6, 0xd7, 0x9c, + 0x76, 0x2f, 0x03, 0xf1, 0x65, 0x89, 0xa4, 0x51, 0x9e, 0x10, 0xf1, 0x88, 0x39, 0x00, 0x27, 0x84, + 0xd0, 0xb7, 0xc0, 0xa9, 0x28, 0x47, 0x27, 0x9b, 0x97, 0xca, 0xa9, 0x97, 0x9a, 0x72, 0xe9, 0x31, + 0x7a, 0x8f, 0xcd, 0xd2, 0xde, 0x66, 0x35, 0x63, 0xff, 0xea, 0x29, 0x30, 0x36, 0xb1, 0x91, 0xd9, + 0xcf, 0x3a, 0xa6, 0xcc, 0x7e, 0x18, 0x4a, 0xa4, 0xd5, 0x8e, 0xf7, 0x2b, 0x5e, 0xd8, 0x2b, 0x35, + 0xec, 0x8a, 0xc0, 0xe9, 0xa6, 0x29, 0x21, 0x58, 0xd1, 0xc9, 0x4e, 0xbf, 0x58, 0xfc, 0x1a, 0xa6, + 0x5f, 0x1c, 0x3a, 0xc1, 0xf4, 0x8b, 0xeb, 0x30, 0xba, 0xed, 0xc5, 0x98, 0xb4, 0x03, 0x21, 0xf4, + 0x67, 0xae, 0xc3, 0x6b, 0x1c, 0xa5, 0x3b, 0xd1, 0x97, 0x00, 0x60, 0x49, 0x04, 0xbd, 0xa1, 0x76, + 0xe0, 0x48, 0xfe, 0x9d, 0xb9, 0xfb, 0xd5, 0x3a, 0x73, 0x0f, 0x8a, 0x24, 0x8b, 0xa3, 0x0f, 0x9b, + 0x64, 0x71, 0x55, 0xa6, 0x46, 0x2c, 0xe5, 0x7b, 0x73, 0xb0, 0xcc, 0x87, 0x7d, 0x12, 0x22, 0xde, + 0xd1, 0xd3, 0x49, 0x96, 0xf3, 0x39, 0x81, 0xca, 0x14, 0x39, 0x60, 0x12, 0xc9, 0xef, 0xb2, 0xe0, + 0x4c, 0x3b, 0x2b, 0xb3, 0xaa, 0x78, 0xe0, 0x7d, 0x79, 0xe0, 0xd4, 0xb1, 0x46, 0x83, 0x4c, 0x51, + 0x93, 0x89, 0x86, 0xb3, 0x9b, 0xa3, 0x03, 0x1d, 0x6e, 0xba, 0x22, 0x0b, 0xe2, 0x93, 0x39, 0xd9, + 0x28, 0x7b, 0xe4, 0xa0, 0xdc, 0xc8, 0xc8, 0x7c, 0xf8, 0xc1, 0xbc, 0xcc, 0x87, 0x03, 0xe7, 0x3b, + 0x7c, 0x43, 0xe5, 0xa1, 0x9c, 0xc8, 0x5f, 0x4a, 0x3c, 0xcb, 0x64, 0xdf, 0xec, 0x93, 0x6f, 0xa8, + 0xec, 0x93, 0x3d, 0xe2, 0x54, 0xf2, 0xdc, 0x92, 0x7d, 0x73, 0x4e, 0x6a, 0x79, 0x23, 0xa7, 0x8e, + 0x27, 0x6f, 0xa4, 0x71, 0xd4, 0xf0, 0xd4, 0x85, 0xcf, 0xf4, 0x39, 0x6a, 0x0c, 0xba, 0xbd, 0x0f, + 0x1b, 0x9e, 0x23, 0x73, 0xe6, 0xa1, 0x72, 0x64, 0xde, 0xd1, 0x73, 0x4e, 0xa2, 0x3e, 0x49, 0x15, + 0x29, 0xd2, 0x80, 0x99, 0x26, 0xef, 0xe8, 0x07, 0xe0, 0xa9, 0x7c, 0xba, 0xea, 0x9c, 0xeb, 0xa6, + 0x9b, 0x79, 0x04, 0x76, 0x65, 0xb0, 0x3c, 0x7d, 0x32, 0x19, 0x2c, 0xcf, 0x1c, 0x7b, 0x06, 0xcb, + 0xb3, 0x27, 0x90, 0xc1, 0xf2, 0xb1, 0x13, 0xcc, 0x60, 0x79, 0x87, 0x59, 0x45, 0xf0, 0x70, 0x27, + 0x22, 0xae, 0x66, 0x76, 0x0c, 0xc7, 0xac, 0x98, 0x28, 0xfc, 0xe3, 0x14, 0x08, 0x27, 0xa4, 0x32, + 0x32, 0x63, 0xce, 0x3e, 0x82, 0xcc, 0x98, 0xeb, 0x49, 0x66, 0xcc, 0x73, 0xf9, 0x53, 0x9d, 0x61, + 0xba, 0x9e, 0x93, 0x0f, 0xf3, 0x8e, 0x9e, 0xc7, 0xf2, 0xf1, 0x1e, 0xaa, 0xf8, 0x2c, 0xc5, 0x63, + 0x8f, 0xec, 0x95, 0xaf, 0xf3, 0xec, 0x95, 0xe7, 0xf3, 0x39, 0x79, 0xfa, 0xb8, 0x33, 0x73, 0x56, + 0x7e, 0x4f, 0x01, 0x2e, 0xf6, 0xde, 0x17, 0x89, 0xd6, 0xb3, 0x96, 0xbc, 0x08, 0xa6, 0xb4, 0x9e, + 0xfc, 0x6e, 0x95, 0x60, 0x0d, 0x1c, 0x09, 0xeb, 0x1a, 0xcc, 0x28, 0xdb, 0xf4, 0xa6, 0xd7, 0xd8, + 0xd7, 0xd2, 0xf4, 0x2b, 0x7f, 0xde, 0x7a, 0x1a, 0x01, 0x77, 0xd7, 0x41, 0x8b, 0x30, 0x65, 0x14, + 0x56, 0x2b, 0xe2, 0x0e, 0xa5, 0xd4, 0xac, 0x75, 0x13, 0x8c, 0xd3, 0xf8, 0xf6, 0x4f, 0x5a, 0xf0, + 0x58, 0x4e, 0x72, 0xa8, 0x81, 0x03, 0x3d, 0x6d, 0xc1, 0x54, 0xdb, 0xac, 0xda, 0x27, 0x1e, 0x9c, + 0x91, 0x82, 0x4a, 0xf5, 0x35, 0x05, 0xc0, 0x69, 0xa2, 0xf6, 0x9f, 0x5a, 0x70, 0xa1, 0xa7, 0xe5, + 0x17, 0xc2, 0x70, 0x76, 0xbb, 0x15, 0x39, 0xcb, 0x21, 0x71, 0x89, 0x1f, 0x7b, 0x4e, 0xb3, 0xde, + 0x26, 0x0d, 0x4d, 0x6f, 0xcd, 0x4c, 0xa8, 0xae, 0xad, 0xd5, 0x17, 0xbb, 0x31, 0x70, 0x4e, 0x4d, + 0xb4, 0x0a, 0xa8, 0x1b, 0x22, 0x66, 0x98, 0xc5, 0x8c, 0xed, 0xa6, 0x87, 0x33, 0x6a, 0xa0, 0x57, + 0x60, 0x42, 0x59, 0x94, 0x69, 0x33, 0xce, 0x18, 0x30, 0xd6, 0x01, 0xd8, 0xc4, 0x5b, 0xba, 0xf2, + 0xeb, 0xbf, 0x77, 0xf1, 0x03, 0xbf, 0xf9, 0x7b, 0x17, 0x3f, 0xf0, 0xdb, 0xbf, 0x77, 0xf1, 0x03, + 0xdf, 0xf6, 0xe0, 0xa2, 0xf5, 0xeb, 0x0f, 0x2e, 0x5a, 0xbf, 0xf9, 0xe0, 0xa2, 0xf5, 0xdb, 0x0f, + 0x2e, 0x5a, 0xbf, 0xfb, 0xe0, 0xa2, 0xf5, 0xa5, 0xdf, 0xbf, 0xf8, 0x81, 0x4f, 0x17, 0xf6, 0x9e, + 0xff, 0x7f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x5c, 0x2b, 0xc8, 0x61, 0xd8, 0xfd, 0x00, 0x00, } func (m *AWSElasticBlockStoreVolumeSource) Marshal() (dAtA []byte, err error) { @@ -7889,6 +7895,16 @@ func (m *ConfigMap) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.Immutable != nil { + i-- + if *m.Immutable { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x20 + } if len(m.BinaryData) > 0 { keysForBinaryData := make([]string, 0, len(m.BinaryData)) for k := range m.BinaryData { @@ -9132,6 +9148,13 @@ func (m *EndpointPort) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.AppProtocol != nil { + i -= len(*m.AppProtocol) + copy(dAtA[i:], *m.AppProtocol) + i = encodeVarintGenerated(dAtA, i, uint64(len(*m.AppProtocol))) + i-- + dAtA[i] = 0x22 + } i -= len(m.Protocol) copy(dAtA[i:], m.Protocol) i = encodeVarintGenerated(dAtA, i, uint64(len(m.Protocol))) @@ -14500,6 +14523,13 @@ func (m *PodSecurityContext) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.FSGroupChangePolicy != nil { + i -= len(*m.FSGroupChangePolicy) + copy(dAtA[i:], *m.FSGroupChangePolicy) + i = encodeVarintGenerated(dAtA, i, uint64(len(*m.FSGroupChangePolicy))) + i-- + dAtA[i] = 0x4a + } if m.WindowsOptions != nil { { size, err := m.WindowsOptions.MarshalToSizedBuffer(dAtA[:i]) @@ -16797,6 +16827,16 @@ func (m *Secret) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.Immutable != nil { + i-- + if *m.Immutable { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x28 + } if len(m.StringData) > 0 { keysForStringData := make([]string, 0, len(m.StringData)) for k := range m.StringData { @@ -17575,6 +17615,13 @@ func (m *ServicePort) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.AppProtocol != nil { + i -= len(*m.AppProtocol) + copy(dAtA[i:], *m.AppProtocol) + i = encodeVarintGenerated(dAtA, i, uint64(len(*m.AppProtocol))) + i-- + dAtA[i] = 0x32 + } i = encodeVarintGenerated(dAtA, i, uint64(m.NodePort)) i-- dAtA[i] = 0x28 @@ -19458,6 +19505,9 @@ func (m *ConfigMap) Size() (n int) { n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize)) } } + if m.Immutable != nil { + n += 2 + } return n } @@ -19895,6 +19945,10 @@ func (m *EndpointPort) Size() (n int) { n += 1 + sovGenerated(uint64(m.Port)) l = len(m.Protocol) n += 1 + l + sovGenerated(uint64(l)) + if m.AppProtocol != nil { + l = len(*m.AppProtocol) + n += 1 + l + sovGenerated(uint64(l)) + } return n } @@ -21877,6 +21931,10 @@ func (m *PodSecurityContext) Size() (n int) { l = m.WindowsOptions.Size() n += 1 + l + sovGenerated(uint64(l)) } + if m.FSGroupChangePolicy != nil { + l = len(*m.FSGroupChangePolicy) + n += 1 + l + sovGenerated(uint64(l)) + } return n } @@ -22696,6 +22754,9 @@ func (m *Secret) Size() (n int) { n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize)) } } + if m.Immutable != nil { + n += 2 + } return n } @@ -22961,6 +23022,10 @@ func (m *ServicePort) Size() (n int) { l = m.TargetPort.Size() n += 1 + l + sovGenerated(uint64(l)) n += 1 + sovGenerated(uint64(m.NodePort)) + if m.AppProtocol != nil { + l = len(*m.AppProtocol) + n += 1 + l + sovGenerated(uint64(l)) + } return n } @@ -23801,6 +23866,7 @@ func (this *ConfigMap) String() string { `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Data:` + mapStringForData + `,`, `BinaryData:` + mapStringForBinaryData + `,`, + `Immutable:` + valueToStringGenerated(this.Immutable) + `,`, `}`, }, "") return s @@ -24127,6 +24193,7 @@ func (this *EndpointPort) String() string { `Name:` + fmt.Sprintf("%v", this.Name) + `,`, `Port:` + fmt.Sprintf("%v", this.Port) + `,`, `Protocol:` + fmt.Sprintf("%v", this.Protocol) + `,`, + `AppProtocol:` + valueToStringGenerated(this.AppProtocol) + `,`, `}`, }, "") return s @@ -25629,6 +25696,7 @@ func (this *PodSecurityContext) String() string { `RunAsGroup:` + valueToStringGenerated(this.RunAsGroup) + `,`, `Sysctls:` + repeatedStringForSysctls + `,`, `WindowsOptions:` + strings.Replace(this.WindowsOptions.String(), "WindowsSecurityContextOptions", "WindowsSecurityContextOptions", 1) + `,`, + `FSGroupChangePolicy:` + valueToStringGenerated(this.FSGroupChangePolicy) + `,`, `}`, }, "") return s @@ -26301,6 +26369,7 @@ func (this *Secret) String() string { `Data:` + mapStringForData + `,`, `Type:` + fmt.Sprintf("%v", this.Type) + `,`, `StringData:` + mapStringForStringData + `,`, + `Immutable:` + valueToStringGenerated(this.Immutable) + `,`, `}`, }, "") return s @@ -26508,6 +26577,7 @@ func (this *ServicePort) String() string { `Port:` + fmt.Sprintf("%v", this.Port) + `,`, `TargetPort:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.TargetPort), "IntOrString", "intstr.IntOrString", 1), `&`, ``, 1) + `,`, `NodePort:` + fmt.Sprintf("%v", this.NodePort) + `,`, + `AppProtocol:` + valueToStringGenerated(this.AppProtocol) + `,`, `}`, }, "") return s @@ -30524,6 +30594,27 @@ func (m *ConfigMap) Unmarshal(dAtA []byte) error { } m.BinaryData[mapkey] = mapvalue iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Immutable", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Immutable = &b default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -34258,6 +34349,39 @@ func (m *EndpointPort) Unmarshal(dAtA []byte) error { } m.Protocol = Protocol(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AppProtocol", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.AppProtocol = &s + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -51715,6 +51839,39 @@ func (m *PodSecurityContext) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FSGroupChangePolicy", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := PodFSGroupChangePolicy(dAtA[iNdEx:postIndex]) + m.FSGroupChangePolicy = &s + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -59523,6 +59680,27 @@ func (m *Secret) Unmarshal(dAtA []byte) error { } m.StringData[mapkey] = mapvalue iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Immutable", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Immutable = &b default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -61603,6 +61781,39 @@ func (m *ServicePort) Unmarshal(dAtA []byte) error { break } } + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AppProtocol", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.AppProtocol = &s + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -66311,6 +66522,7 @@ func (m *WindowsSecurityContextOptions) Unmarshal(dAtA []byte) error { func skipGenerated(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -66342,10 +66554,8 @@ func skipGenerated(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -66366,55 +66576,30 @@ func skipGenerated(dAtA []byte) (n int, err error) { return 0, ErrInvalidLengthGenerated } iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - return iNdEx, nil case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipGenerated(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenerated + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenerated + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group") ) diff --git a/vendor/k8s.io/api/core/v1/generated.proto b/vendor/k8s.io/api/core/v1/generated.proto index c05e235100..d1cd8ebb4e 100644 --- a/vendor/k8s.io/api/core/v1/generated.proto +++ b/vendor/k8s.io/api/core/v1/generated.proto @@ -455,6 +455,14 @@ message ConfigMap { // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; + // Immutable, if set to true, ensures that data stored in the ConfigMap cannot + // be updated (only object metadata can be modified). + // If not set to true, the field can be modified at any time. + // Defaulted to nil. + // This is an alpha field enabled by ImmutableEphemeralVolumes feature gate. + // +optional + optional bool immutable = 4; + // Data contains the configuration data. // Each key must consist of alphanumeric characters, '-', '_' or '.'. // Values with non-UTF-8 byte sequences must use the BinaryData field. @@ -681,7 +689,6 @@ message Container { repeated VolumeMount volumeMounts = 9; // volumeDevices is the list of block devices to be used by the container. - // This is a beta feature. // +patchMergeKey=devicePath // +patchStrategy=merge // +optional @@ -707,7 +714,7 @@ message Container { // This can be used to provide different probe parameters at the beginning of a Pod's lifecycle, // when it might take a long time to load data or warm a cache, than during steady-state operation. // This cannot be updated. - // This is an alpha feature enabled by the StartupProbe feature flag. + // This is a beta feature enabled by the StartupProbe feature flag. // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes // +optional optional Probe startupProbe = 22; @@ -1034,6 +1041,16 @@ message EndpointPort { // Default is TCP. // +optional optional string protocol = 3; + + // The application protocol for this port. + // This field follows standard Kubernetes label syntax. + // Un-prefixed names are reserved for IANA standard service names (as per + // RFC-6335 and http://www.iana.org/assignments/service-names). + // Non-standard protocols should use prefixed names such as + // mycompany.com/my-custom-protocol. + // Field can be enabled with ServiceAppProtocol feature gate. + // +optional + optional string appProtocol = 4; } // EndpointSubset is a group of addresses with a common set of ports. The @@ -1258,7 +1275,6 @@ message EphemeralContainerCommon { repeated VolumeMount volumeMounts = 9; // volumeDevices is the list of block devices to be used by the container. - // This is a beta feature. // +patchMergeKey=devicePath // +patchStrategy=merge // +optional @@ -1913,7 +1929,6 @@ message LimitRange { // LimitRangeItem defines a min/max usage limit for any resource that matches on kind. message LimitRangeItem { // Type of resource that this limit applies to. - // +optional optional string type = 1; // Max usage constraints on this kind by resource name. @@ -2455,6 +2470,20 @@ message ObjectFieldSelector { } // ObjectReference contains enough information to let you inspect or modify the referred object. +// --- +// New uses of this type are discouraged because of difficulty describing its usage when embedded in APIs. +// 1. Ignored fields. It includes many fields which are not generally honored. For instance, ResourceVersion and FieldPath are both very rarely valid in actual usage. +// 2. Invalid usage help. It is impossible to add specific help for individual usage. In most embedded usages, there are particular +// restrictions like, "must refer only to types A and B" or "UID not honored" or "name must be restricted". +// Those cannot be well described when embedded. +// 3. Inconsistent validation. Because the usages are different, the validation rules are different by usage, which makes it hard for users to predict what will happen. +// 4. The fields are both imprecise and overly precise. Kind is not a precise mapping to a URL. This can produce ambiguity +// during interpretation and require a REST mapping. In most cases, the dependency is on the group,resource tuple +// and the version of the actual struct is irrelevant. +// 5. We cannot easily change it. Because this type is embedded in many locations, updates to this type +// will affect numerous schemas. Don't make new APIs embed an underspecified API type they do not control. +// Instead of using this type, create a locally provided and used type that is well-focused on your reference. +// For example, ServiceReferences for admission registration: https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533 . // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object message ObjectReference { // Kind of the referent. @@ -2605,15 +2634,18 @@ message PersistentVolumeClaimSpec { // volumeMode defines what type of volume is required by the claim. // Value of Filesystem is implied when not included in claim spec. - // This is a beta feature. // +optional optional string volumeMode = 6; - // This field requires the VolumeSnapshotDataSource alpha feature gate to be - // enabled and currently VolumeSnapshot is the only supported data source. - // If the provisioner can support VolumeSnapshot data source, it will create - // a new volume and data will be restored to the volume at the same time. - // If the provisioner does not support VolumeSnapshot data source, volume will + // This field can be used to specify either: + // * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot - Beta) + // * An existing PVC (PersistentVolumeClaim) + // * An existing custom resource/object that implements data population (Alpha) + // In order to use VolumeSnapshot object types, the appropriate feature gate + // must be enabled (VolumeSnapshotDataSource or AnyVolumeDataSource) + // If the provisioner or an external controller can support the specified data source, + // it will create a new volume based on the contents of the specified data source. + // If the specified data source is not supported, the volume will // not be created and the failure will be reported as an event. // In the future, we plan to support more data source types and the behavior // of the provisioner may change. @@ -2821,7 +2853,6 @@ message PersistentVolumeSpec { // volumeMode defines if a volume is intended to be used with a formatted filesystem // or to remain in raw block state. Value of Filesystem is implied when not included in spec. - // This is a beta feature. // +optional optional string volumeMode = 8; @@ -3247,6 +3278,15 @@ message PodSecurityContext { // sysctls (by the container runtime) might fail to launch. // +optional repeated Sysctl sysctls = 7; + + // fsGroupChangePolicy defines behavior of changing ownership and permission of the volume + // before being exposed inside Pod. This field will only apply to + // volume types which support fsGroup based ownership(and permissions). + // It will have no effect on ephemeral volume types such as: secret, configmaps + // and emptydir. + // Valid values are "OnRootMismatch" and "Always". If not specified defaults to "Always". + // +optional + optional string fsGroupChangePolicy = 9; } // Describes the class of pods that should avoid this node. @@ -3497,8 +3537,7 @@ message PodSpec { // TopologySpreadConstraints describes how a group of pods ought to spread across topology // domains. Scheduler will schedule pods in a way which abides by the constraints. - // This field is alpha-level and is only honored by clusters that enables the EvenPodsSpread - // feature. + // This field is only honored by clusters that enable the EvenPodsSpread feature. // All topologySpreadConstraints are ANDed. // +optional // +patchMergeKey=topologyKey @@ -4256,6 +4295,14 @@ message Secret { // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; + // Immutable, if set to true, ensures that data stored in the Secret cannot + // be updated (only object metadata can be modified). + // If not set to true, the field can be modified at any time. + // Defaulted to nil. + // This is an alpha field enabled by ImmutableEphemeralVolumes feature gate. + // +optional + optional bool immutable = 5; + // Data contains the secret data. Each key must consist of alphanumeric // characters, '-', '_' or '.'. The serialized form of the secret data is a // base64 encoded string, representing the arbitrary (possibly non-string) @@ -4581,6 +4628,16 @@ message ServicePort { // +optional optional string protocol = 2; + // The application protocol for this port. + // This field follows standard Kubernetes label syntax. + // Un-prefixed names are reserved for IANA standard service names (as per + // RFC-6335 and http://www.iana.org/assignments/service-names). + // Non-standard protocols should use prefixed names such as + // mycompany.com/my-custom-protocol. + // Field can be enabled with ServiceAppProtocol feature gate. + // +optional + optional string appProtocol = 6; + // The port that will be exposed by this service. optional int32 port = 3; @@ -4864,7 +4921,7 @@ message Taint { // Required. The taint key to be applied to a node. optional string key = 1; - // Required. The taint value corresponding to the taint key. + // The taint value corresponding to the taint key. // +optional optional string value = 2; @@ -5256,14 +5313,12 @@ message WeightedPodAffinityTerm { // WindowsSecurityContextOptions contain Windows-specific options and credentials. message WindowsSecurityContextOptions { // GMSACredentialSpecName is the name of the GMSA credential spec to use. - // This field is alpha-level and is only honored by servers that enable the WindowsGMSA feature flag. // +optional optional string gmsaCredentialSpecName = 1; // GMSACredentialSpec is where the GMSA admission webhook // (https://github.com/kubernetes-sigs/windows-gmsa) inlines the contents of the // GMSA credential spec named by the GMSACredentialSpecName field. - // This field is alpha-level and is only honored by servers that enable the WindowsGMSA feature flag. // +optional optional string gmsaCredentialSpec = 2; @@ -5271,7 +5326,6 @@ message WindowsSecurityContextOptions { // Defaults to the user specified in image metadata if unspecified. // May also be set in PodSecurityContext. If set in both SecurityContext and // PodSecurityContext, the value specified in SecurityContext takes precedence. - // This field is beta-level and may be disabled with the WindowsRunAsUserName feature flag. // +optional optional string runAsUserName = 3; } diff --git a/vendor/k8s.io/api/core/v1/resource.go b/vendor/k8s.io/api/core/v1/resource.go index bb80412546..5bc9cd5bf1 100644 --- a/vendor/k8s.io/api/core/v1/resource.go +++ b/vendor/k8s.io/api/core/v1/resource.go @@ -41,6 +41,14 @@ func (self *ResourceList) Memory() *resource.Quantity { return &resource.Quantity{Format: resource.BinarySI} } +// Returns the Storage limit if specified. +func (self *ResourceList) Storage() *resource.Quantity { + if val, ok := (*self)[ResourceStorage]; ok { + return &val + } + return &resource.Quantity{Format: resource.BinarySI} +} + func (self *ResourceList) Pods() *resource.Quantity { if val, ok := (*self)[ResourcePods]; ok { return &val diff --git a/vendor/k8s.io/api/core/v1/types.go b/vendor/k8s.io/api/core/v1/types.go index 47a40271e0..b61a86aba1 100644 --- a/vendor/k8s.io/api/core/v1/types.go +++ b/vendor/k8s.io/api/core/v1/types.go @@ -331,7 +331,6 @@ type PersistentVolumeSpec struct { MountOptions []string `json:"mountOptions,omitempty" protobuf:"bytes,7,opt,name=mountOptions"` // volumeMode defines if a volume is intended to be used with a formatted filesystem // or to remain in raw block state. Value of Filesystem is implied when not included in spec. - // This is a beta feature. // +optional VolumeMode *PersistentVolumeMode `json:"volumeMode,omitempty" protobuf:"bytes,8,opt,name=volumeMode,casttype=PersistentVolumeMode"` // NodeAffinity defines constraints that limit what nodes this volume can be accessed from. @@ -460,14 +459,17 @@ type PersistentVolumeClaimSpec struct { StorageClassName *string `json:"storageClassName,omitempty" protobuf:"bytes,5,opt,name=storageClassName"` // volumeMode defines what type of volume is required by the claim. // Value of Filesystem is implied when not included in claim spec. - // This is a beta feature. // +optional VolumeMode *PersistentVolumeMode `json:"volumeMode,omitempty" protobuf:"bytes,6,opt,name=volumeMode,casttype=PersistentVolumeMode"` - // This field requires the VolumeSnapshotDataSource alpha feature gate to be - // enabled and currently VolumeSnapshot is the only supported data source. - // If the provisioner can support VolumeSnapshot data source, it will create - // a new volume and data will be restored to the volume at the same time. - // If the provisioner does not support VolumeSnapshot data source, volume will + // This field can be used to specify either: + // * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot - Beta) + // * An existing PVC (PersistentVolumeClaim) + // * An existing custom resource/object that implements data population (Alpha) + // In order to use VolumeSnapshot object types, the appropriate feature gate + // must be enabled (VolumeSnapshotDataSource or AnyVolumeDataSource) + // If the provisioner or an external controller can support the specified data source, + // it will create a new volume based on the contents of the specified data source. + // If the specified data source is not supported, the volume will // not be created and the failure will be reported as an event. // In the future, we plan to support more data source types and the behavior // of the provisioner may change. @@ -887,9 +889,10 @@ type FlockerVolumeSource struct { type StorageMedium string const ( - StorageMediumDefault StorageMedium = "" // use whatever the default is for the node, assume anything we don't explicitly handle is this - StorageMediumMemory StorageMedium = "Memory" // use memory (e.g. tmpfs on linux) - StorageMediumHugePages StorageMedium = "HugePages" // use hugepages + StorageMediumDefault StorageMedium = "" // use whatever the default is for the node, assume anything we don't explicitly handle is this + StorageMediumMemory StorageMedium = "Memory" // use memory (e.g. tmpfs on linux) + StorageMediumHugePages StorageMedium = "HugePages" // use hugepages + StorageMediumHugePagesPrefix StorageMedium = "HugePages-" // prefix for full medium notation HugePages- ) // Protocol defines network protocols supported for things like container ports. @@ -2180,7 +2183,6 @@ type Container struct { // +patchStrategy=merge VolumeMounts []VolumeMount `json:"volumeMounts,omitempty" patchStrategy:"merge" patchMergeKey:"mountPath" protobuf:"bytes,9,rep,name=volumeMounts"` // volumeDevices is the list of block devices to be used by the container. - // This is a beta feature. // +patchMergeKey=devicePath // +patchStrategy=merge // +optional @@ -2203,7 +2205,7 @@ type Container struct { // This can be used to provide different probe parameters at the beginning of a Pod's lifecycle, // when it might take a long time to load data or warm a cache, than during steady-state operation. // This cannot be updated. - // This is an alpha feature enabled by the StartupProbe feature flag. + // This is a beta feature enabled by the StartupProbe feature flag. // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes // +optional StartupProbe *Probe `json:"startupProbe,omitempty" protobuf:"bytes,22,opt,name=startupProbe"` @@ -2750,7 +2752,7 @@ type PreferredSchedulingTerm struct { type Taint struct { // Required. The taint key to be applied to a node. Key string `json:"key" protobuf:"bytes,1,opt,name=key"` - // Required. The taint value corresponding to the taint key. + // The taint value corresponding to the taint key. // +optional Value string `json:"value,omitempty" protobuf:"bytes,2,opt,name=value"` // Required. The effect of the taint on pods @@ -3038,8 +3040,7 @@ type PodSpec struct { Overhead ResourceList `json:"overhead,omitempty" protobuf:"bytes,32,opt,name=overhead"` // TopologySpreadConstraints describes how a group of pods ought to spread across topology // domains. Scheduler will schedule pods in a way which abides by the constraints. - // This field is alpha-level and is only honored by clusters that enables the EvenPodsSpread - // feature. + // This field is only honored by clusters that enable the EvenPodsSpread feature. // All topologySpreadConstraints are ANDed. // +optional // +patchMergeKey=topologyKey @@ -3125,6 +3126,22 @@ type HostAlias struct { Hostnames []string `json:"hostnames,omitempty" protobuf:"bytes,2,rep,name=hostnames"` } +// PodFSGroupChangePolicy holds policies that will be used for applying fsGroup to a volume +// when volume is mounted. +type PodFSGroupChangePolicy string + +const ( + // FSGroupChangeOnRootMismatch indicates that volume's ownership and permissions will be changed + // only when permission and ownership of root directory does not match with expected + // permissions on the volume. This can help shorten the time it takes to change + // ownership and permissions of a volume. + FSGroupChangeOnRootMismatch PodFSGroupChangePolicy = "OnRootMismatch" + // FSGroupChangeAlways indicates that volume's ownership and permissions + // should always be changed whenever volume is mounted inside a Pod. This the default + // behavior. + FSGroupChangeAlways PodFSGroupChangePolicy = "Always" +) + // PodSecurityContext holds pod-level security attributes and common container settings. // Some fields are also present in container.securityContext. Field values of // container.securityContext take precedence over field values of PodSecurityContext. @@ -3183,6 +3200,14 @@ type PodSecurityContext struct { // sysctls (by the container runtime) might fail to launch. // +optional Sysctls []Sysctl `json:"sysctls,omitempty" protobuf:"bytes,7,rep,name=sysctls"` + // fsGroupChangePolicy defines behavior of changing ownership and permission of the volume + // before being exposed inside Pod. This field will only apply to + // volume types which support fsGroup based ownership(and permissions). + // It will have no effect on ephemeral volume types such as: secret, configmaps + // and emptydir. + // Valid values are "OnRootMismatch" and "Always". If not specified defaults to "Always". + // +optional + FSGroupChangePolicy *PodFSGroupChangePolicy `json:"fsGroupChangePolicy,omitempty" protobuf:"bytes,9,opt,name=fsGroupChangePolicy"` } // PodQOSClass defines the supported qos classes of Pods. @@ -3298,7 +3323,6 @@ type EphemeralContainerCommon struct { // +patchStrategy=merge VolumeMounts []VolumeMount `json:"volumeMounts,omitempty" patchStrategy:"merge" patchMergeKey:"mountPath" protobuf:"bytes,9,rep,name=volumeMounts"` // volumeDevices is the list of block devices to be used by the container. - // This is a beta feature. // +patchMergeKey=devicePath // +patchStrategy=merge // +optional @@ -3990,6 +4014,16 @@ type ServicePort struct { // +optional Protocol Protocol `json:"protocol,omitempty" protobuf:"bytes,2,opt,name=protocol,casttype=Protocol"` + // The application protocol for this port. + // This field follows standard Kubernetes label syntax. + // Un-prefixed names are reserved for IANA standard service names (as per + // RFC-6335 and http://www.iana.org/assignments/service-names). + // Non-standard protocols should use prefixed names such as + // mycompany.com/my-custom-protocol. + // Field can be enabled with ServiceAppProtocol feature gate. + // +optional + AppProtocol *string `json:"appProtocol,omitempty" protobuf:"bytes,6,opt,name=appProtocol"` + // The port that will be exposed by this service. Port int32 `json:"port" protobuf:"varint,3,opt,name=port"` @@ -4061,6 +4095,7 @@ type ServiceList struct { } // +genclient +// +genclient:method=CreateToken,verb=create,subresource=token,input=k8s.io/api/authentication/v1.TokenRequest,result=k8s.io/api/authentication/v1.TokenRequest // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // ServiceAccount binds together: @@ -4204,6 +4239,16 @@ type EndpointPort struct { // Default is TCP. // +optional Protocol Protocol `json:"protocol,omitempty" protobuf:"bytes,3,opt,name=protocol,casttype=Protocol"` + + // The application protocol for this port. + // This field follows standard Kubernetes label syntax. + // Un-prefixed names are reserved for IANA standard service names (as per + // RFC-6335 and http://www.iana.org/assignments/service-names). + // Non-standard protocols should use prefixed names such as + // mycompany.com/my-custom-protocol. + // Field can be enabled with ServiceAppProtocol feature gate. + // +optional + AppProtocol *string `json:"appProtocol,omitempty" protobuf:"bytes,4,opt,name=appProtocol"` } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object @@ -4981,6 +5026,20 @@ type ServiceProxyOptions struct { } // ObjectReference contains enough information to let you inspect or modify the referred object. +// --- +// New uses of this type are discouraged because of difficulty describing its usage when embedded in APIs. +// 1. Ignored fields. It includes many fields which are not generally honored. For instance, ResourceVersion and FieldPath are both very rarely valid in actual usage. +// 2. Invalid usage help. It is impossible to add specific help for individual usage. In most embedded usages, there are particular +// restrictions like, "must refer only to types A and B" or "UID not honored" or "name must be restricted". +// Those cannot be well described when embedded. +// 3. Inconsistent validation. Because the usages are different, the validation rules are different by usage, which makes it hard for users to predict what will happen. +// 4. The fields are both imprecise and overly precise. Kind is not a precise mapping to a URL. This can produce ambiguity +// during interpretation and require a REST mapping. In most cases, the dependency is on the group,resource tuple +// and the version of the actual struct is irrelevant. +// 5. We cannot easily change it. Because this type is embedded in many locations, updates to this type +// will affect numerous schemas. Don't make new APIs embed an underspecified API type they do not control. +// Instead of using this type, create a locally provided and used type that is well-focused on your reference. +// For example, ServiceReferences for admission registration: https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533 . // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object type ObjectReference struct { // Kind of the referent. @@ -5194,8 +5253,7 @@ const ( // LimitRangeItem defines a min/max usage limit for any resource that matches on kind. type LimitRangeItem struct { // Type of resource that this limit applies to. - // +optional - Type LimitType `json:"type,omitempty" protobuf:"bytes,1,opt,name=type,casttype=LimitType"` + Type LimitType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=LimitType"` // Max usage constraints on this kind by resource name. // +optional Max ResourceList `json:"max,omitempty" protobuf:"bytes,2,rep,name=max,casttype=ResourceList,castkey=ResourceName"` @@ -5424,6 +5482,14 @@ type Secret struct { // +optional metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + // Immutable, if set to true, ensures that data stored in the Secret cannot + // be updated (only object metadata can be modified). + // If not set to true, the field can be modified at any time. + // Defaulted to nil. + // This is an alpha field enabled by ImmutableEphemeralVolumes feature gate. + // +optional + Immutable *bool `json:"immutable,omitempty" protobuf:"varint,5,opt,name=immutable"` + // Data contains the secret data. Each key must consist of alphanumeric // characters, '-', '_' or '.'. The serialized form of the secret data is a // base64 encoded string, representing the arbitrary (possibly non-string) @@ -5557,6 +5623,14 @@ type ConfigMap struct { // +optional metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + // Immutable, if set to true, ensures that data stored in the ConfigMap cannot + // be updated (only object metadata can be modified). + // If not set to true, the field can be modified at any time. + // Defaulted to nil. + // This is an alpha field enabled by ImmutableEphemeralVolumes feature gate. + // +optional + Immutable *bool `json:"immutable,omitempty" protobuf:"varint,4,opt,name=immutable"` + // Data contains the configuration data. // Each key must consist of alphanumeric characters, '-', '_' or '.'. // Values with non-UTF-8 byte sequences must use the BinaryData field. @@ -5793,14 +5867,12 @@ type SELinuxOptions struct { // WindowsSecurityContextOptions contain Windows-specific options and credentials. type WindowsSecurityContextOptions struct { // GMSACredentialSpecName is the name of the GMSA credential spec to use. - // This field is alpha-level and is only honored by servers that enable the WindowsGMSA feature flag. // +optional GMSACredentialSpecName *string `json:"gmsaCredentialSpecName,omitempty" protobuf:"bytes,1,opt,name=gmsaCredentialSpecName"` // GMSACredentialSpec is where the GMSA admission webhook // (https://github.com/kubernetes-sigs/windows-gmsa) inlines the contents of the // GMSA credential spec named by the GMSACredentialSpecName field. - // This field is alpha-level and is only honored by servers that enable the WindowsGMSA feature flag. // +optional GMSACredentialSpec *string `json:"gmsaCredentialSpec,omitempty" protobuf:"bytes,2,opt,name=gmsaCredentialSpec"` @@ -5808,7 +5880,6 @@ type WindowsSecurityContextOptions struct { // Defaults to the user specified in image metadata if unspecified. // May also be set in PodSecurityContext. If set in both SecurityContext and // PodSecurityContext, the value specified in SecurityContext takes precedence. - // This field is beta-level and may be disabled with the WindowsRunAsUserName feature flag. // +optional RunAsUserName *string `json:"runAsUserName,omitempty" protobuf:"bytes,3,opt,name=runAsUserName"` } diff --git a/vendor/k8s.io/api/core/v1/types_swagger_doc_generated.go b/vendor/k8s.io/api/core/v1/types_swagger_doc_generated.go index 441d3e1088..331451fe25 100644 --- a/vendor/k8s.io/api/core/v1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/api/core/v1/types_swagger_doc_generated.go @@ -252,6 +252,7 @@ func (ComponentStatusList) SwaggerDoc() map[string]string { var map_ConfigMap = map[string]string{ "": "ConfigMap holds configuration data for pods to consume.", "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "immutable": "Immutable, if set to true, ensures that data stored in the ConfigMap cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil. This is an alpha field enabled by ImmutableEphemeralVolumes feature gate.", "data": "Data contains the configuration data. Each key must consist of alphanumeric characters, '-', '_' or '.'. Values with non-UTF-8 byte sequences must use the BinaryData field. The keys stored in Data must not overlap with the keys in the BinaryData field, this is enforced during validation process.", "binaryData": "BinaryData contains the binary data. Each key must consist of alphanumeric characters, '-', '_' or '.'. BinaryData can contain byte sequences that are not in the UTF-8 range. The keys stored in BinaryData must not overlap with the ones in the Data field, this is enforced during validation process. Using this field will require 1.10+ apiserver and kubelet.", } @@ -335,10 +336,10 @@ var map_Container = map[string]string{ "env": "List of environment variables to set in the container. Cannot be updated.", "resources": "Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/", "volumeMounts": "Pod volumes to mount into the container's filesystem. Cannot be updated.", - "volumeDevices": "volumeDevices is the list of block devices to be used by the container. This is a beta feature.", + "volumeDevices": "volumeDevices is the list of block devices to be used by the container.", "livenessProbe": "Periodic probe of container liveness. Container will be restarted if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes", "readinessProbe": "Periodic probe of container service readiness. Container will be removed from service endpoints if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes", - "startupProbe": "StartupProbe indicates that the Pod has successfully initialized. If specified, no other probes are executed until this completes successfully. If this probe fails, the Pod will be restarted, just as if the livenessProbe failed. This can be used to provide different probe parameters at the beginning of a Pod's lifecycle, when it might take a long time to load data or warm a cache, than during steady-state operation. This cannot be updated. This is an alpha feature enabled by the StartupProbe feature flag. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes", + "startupProbe": "StartupProbe indicates that the Pod has successfully initialized. If specified, no other probes are executed until this completes successfully. If this probe fails, the Pod will be restarted, just as if the livenessProbe failed. This can be used to provide different probe parameters at the beginning of a Pod's lifecycle, when it might take a long time to load data or warm a cache, than during steady-state operation. This cannot be updated. This is a beta feature enabled by the StartupProbe feature flag. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes", "lifecycle": "Actions that the management system should take in response to container lifecycle events. Cannot be updated.", "terminationMessagePath": "Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Will be truncated by the node if greater than 4096 bytes. The total message length across all containers will be limited to 12kb. Defaults to /dev/termination-log. Cannot be updated.", "terminationMessagePolicy": "Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated.", @@ -501,10 +502,11 @@ func (EndpointAddress) SwaggerDoc() map[string]string { } var map_EndpointPort = map[string]string{ - "": "EndpointPort is a tuple that describes a single port.", - "name": "The name of this port. This must match the 'name' field in the corresponding ServicePort. Must be a DNS_LABEL. Optional only if one port is defined.", - "port": "The port number of the endpoint.", - "protocol": "The IP protocol for this port. Must be UDP, TCP, or SCTP. Default is TCP.", + "": "EndpointPort is a tuple that describes a single port.", + "name": "The name of this port. This must match the 'name' field in the corresponding ServicePort. Must be a DNS_LABEL. Optional only if one port is defined.", + "port": "The port number of the endpoint.", + "protocol": "The IP protocol for this port. Must be UDP, TCP, or SCTP. Default is TCP.", + "appProtocol": "The application protocol for this port. This field follows standard Kubernetes label syntax. Un-prefixed names are reserved for IANA standard service names (as per RFC-6335 and http://www.iana.org/assignments/service-names). Non-standard protocols should use prefixed names such as mycompany.com/my-custom-protocol. Field can be enabled with ServiceAppProtocol feature gate.", } func (EndpointPort) SwaggerDoc() map[string]string { @@ -597,7 +599,7 @@ var map_EphemeralContainerCommon = map[string]string{ "env": "List of environment variables to set in the container. Cannot be updated.", "resources": "Resources are not allowed for ephemeral containers. Ephemeral containers use spare resources already allocated to the pod.", "volumeMounts": "Pod volumes to mount into the container's filesystem. Cannot be updated.", - "volumeDevices": "volumeDevices is the list of block devices to be used by the container. This is a beta feature.", + "volumeDevices": "volumeDevices is the list of block devices to be used by the container.", "livenessProbe": "Probes are not allowed for ephemeral containers.", "readinessProbe": "Probes are not allowed for ephemeral containers.", "startupProbe": "Probes are not allowed for ephemeral containers.", @@ -1298,8 +1300,8 @@ var map_PersistentVolumeClaimSpec = map[string]string{ "resources": "Resources represents the minimum resources the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources", "volumeName": "VolumeName is the binding reference to the PersistentVolume backing this claim.", "storageClassName": "Name of the StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1", - "volumeMode": "volumeMode defines what type of volume is required by the claim. Value of Filesystem is implied when not included in claim spec. This is a beta feature.", - "dataSource": "This field requires the VolumeSnapshotDataSource alpha feature gate to be enabled and currently VolumeSnapshot is the only supported data source. If the provisioner can support VolumeSnapshot data source, it will create a new volume and data will be restored to the volume at the same time. If the provisioner does not support VolumeSnapshot data source, volume will not be created and the failure will be reported as an event. In the future, we plan to support more data source types and the behavior of the provisioner may change.", + "volumeMode": "volumeMode defines what type of volume is required by the claim. Value of Filesystem is implied when not included in claim spec.", + "dataSource": "This field can be used to specify either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot - Beta) * An existing PVC (PersistentVolumeClaim) * An existing custom resource/object that implements data population (Alpha) In order to use VolumeSnapshot object types, the appropriate feature gate must be enabled (VolumeSnapshotDataSource or AnyVolumeDataSource) If the provisioner or an external controller can support the specified data source, it will create a new volume based on the contents of the specified data source. If the specified data source is not supported, the volume will not be created and the failure will be reported as an event. In the future, we plan to support more data source types and the behavior of the provisioner may change.", } func (PersistentVolumeClaimSpec) SwaggerDoc() map[string]string { @@ -1376,7 +1378,7 @@ var map_PersistentVolumeSpec = map[string]string{ "persistentVolumeReclaimPolicy": "What happens to a persistent volume when released from its claim. Valid options are Retain (default for manually created PersistentVolumes), Delete (default for dynamically provisioned PersistentVolumes), and Recycle (deprecated). Recycle must be supported by the volume plugin underlying this PersistentVolume. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#reclaiming", "storageClassName": "Name of StorageClass to which this persistent volume belongs. Empty value means that this volume does not belong to any StorageClass.", "mountOptions": "A list of mount options, e.g. [\"ro\", \"soft\"]. Not validated - mount will simply fail if one is invalid. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes/#mount-options", - "volumeMode": "volumeMode defines if a volume is intended to be used with a formatted filesystem or to remain in raw block state. Value of Filesystem is implied when not included in spec. This is a beta feature.", + "volumeMode": "volumeMode defines if a volume is intended to be used with a formatted filesystem or to remain in raw block state. Value of Filesystem is implied when not included in spec.", "nodeAffinity": "NodeAffinity defines constraints that limit what nodes this volume can be accessed from. This field influences the scheduling of pods that use this volume.", } @@ -1572,15 +1574,16 @@ func (PodReadinessGate) SwaggerDoc() map[string]string { } var map_PodSecurityContext = map[string]string{ - "": "PodSecurityContext holds pod-level security attributes and common container settings. Some fields are also present in container.securityContext. Field values of container.securityContext take precedence over field values of PodSecurityContext.", - "seLinuxOptions": "The SELinux context to be applied to all containers. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container.", - "windowsOptions": "The Windows specific settings applied to all containers. If unspecified, the options within a container's SecurityContext will be used. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.", - "runAsUser": "The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container.", - "runAsGroup": "The GID to run the entrypoint of the container process. Uses runtime default if unset. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container.", - "runAsNonRoot": "Indicates that the container must run as a non-root user. If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it does. If unset or false, no such validation will be performed. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.", - "supplementalGroups": "A list of groups applied to the first process run in each container, in addition to the container's primary GID. If unspecified, no groups will be added to any container.", - "fsGroup": "A special supplemental group that applies to all containers in a pod. Some volume types allow the Kubelet to change the ownership of that volume to be owned by the pod:\n\n1. The owning GID will be the FSGroup 2. The setgid bit is set (new files created in the volume will be owned by FSGroup) 3. The permission bits are OR'd with rw-rw ", - "sysctls": "Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) might fail to launch.", + "": "PodSecurityContext holds pod-level security attributes and common container settings. Some fields are also present in container.securityContext. Field values of container.securityContext take precedence over field values of PodSecurityContext.", + "seLinuxOptions": "The SELinux context to be applied to all containers. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container.", + "windowsOptions": "The Windows specific settings applied to all containers. If unspecified, the options within a container's SecurityContext will be used. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.", + "runAsUser": "The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container.", + "runAsGroup": "The GID to run the entrypoint of the container process. Uses runtime default if unset. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container.", + "runAsNonRoot": "Indicates that the container must run as a non-root user. If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it does. If unset or false, no such validation will be performed. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.", + "supplementalGroups": "A list of groups applied to the first process run in each container, in addition to the container's primary GID. If unspecified, no groups will be added to any container.", + "fsGroup": "A special supplemental group that applies to all containers in a pod. Some volume types allow the Kubelet to change the ownership of that volume to be owned by the pod:\n\n1. The owning GID will be the FSGroup 2. The setgid bit is set (new files created in the volume will be owned by FSGroup) 3. The permission bits are OR'd with rw-rw ", + "sysctls": "Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) might fail to launch.", + "fsGroupChangePolicy": "fsGroupChangePolicy defines behavior of changing ownership and permission of the volume before being exposed inside Pod. This field will only apply to volume types which support fsGroup based ownership(and permissions). It will have no effect on ephemeral volume types such as: secret, configmaps and emptydir. Valid values are \"OnRootMismatch\" and \"Always\". If not specified defaults to \"Always\".", } func (PodSecurityContext) SwaggerDoc() map[string]string { @@ -1631,7 +1634,7 @@ var map_PodSpec = map[string]string{ "enableServiceLinks": "EnableServiceLinks indicates whether information about services should be injected into pod's environment variables, matching the syntax of Docker links. Optional: Defaults to true.", "preemptionPolicy": "PreemptionPolicy is the Policy for preempting pods with lower priority. One of Never, PreemptLowerPriority. Defaults to PreemptLowerPriority if unset. This field is alpha-level and is only honored by servers that enable the NonPreemptingPriority feature.", "overhead": "Overhead represents the resource overhead associated with running a pod for a given RuntimeClass. This field will be autopopulated at admission time by the RuntimeClass admission controller. If the RuntimeClass admission controller is enabled, overhead must not be set in Pod create requests. The RuntimeClass admission controller will reject Pod create requests which have the overhead already set. If RuntimeClass is configured and selected in the PodSpec, Overhead will be set to the value defined in the corresponding RuntimeClass, otherwise it will remain unset and treated as zero. More info: https://git.k8s.io/enhancements/keps/sig-node/20190226-pod-overhead.md This field is alpha-level as of Kubernetes v1.16, and is only honored by servers that enable the PodOverhead feature.", - "topologySpreadConstraints": "TopologySpreadConstraints describes how a group of pods ought to spread across topology domains. Scheduler will schedule pods in a way which abides by the constraints. This field is alpha-level and is only honored by clusters that enables the EvenPodsSpread feature. All topologySpreadConstraints are ANDed.", + "topologySpreadConstraints": "TopologySpreadConstraints describes how a group of pods ought to spread across topology domains. Scheduler will schedule pods in a way which abides by the constraints. This field is only honored by clusters that enable the EvenPodsSpread feature. All topologySpreadConstraints are ANDed.", } func (PodSpec) SwaggerDoc() map[string]string { @@ -2015,6 +2018,7 @@ func (ScopedResourceSelectorRequirement) SwaggerDoc() map[string]string { var map_Secret = map[string]string{ "": "Secret holds secret data of a certain type. The total bytes of the values in the Data field must be less than MaxSecretSize bytes.", "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "immutable": "Immutable, if set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil. This is an alpha field enabled by ImmutableEphemeralVolumes feature gate.", "data": "Data contains the secret data. Each key must consist of alphanumeric characters, '-', '_' or '.'. The serialized form of the secret data is a base64 encoded string, representing the arbitrary (possibly non-string) data value here. Described in https://tools.ietf.org/html/rfc4648#section-4", "stringData": "stringData allows specifying non-binary secret data in string form. It is provided as a write-only convenience method. All keys and values are merged into the data field on write, overwriting any existing values. It is never output when reading from the API.", "type": "Used to facilitate programmatic handling of secret data.", @@ -2167,12 +2171,13 @@ func (ServiceList) SwaggerDoc() map[string]string { } var map_ServicePort = map[string]string{ - "": "ServicePort contains information on service's port.", - "name": "The name of this port within the service. This must be a DNS_LABEL. All ports within a ServiceSpec must have unique names. When considering the endpoints for a Service, this must match the 'name' field in the EndpointPort. Optional if only one ServicePort is defined on this service.", - "protocol": "The IP protocol for this port. Supports \"TCP\", \"UDP\", and \"SCTP\". Default is TCP.", - "port": "The port that will be exposed by this service.", - "targetPort": "Number or name of the port to access on the pods targeted by the service. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. If this is a string, it will be looked up as a named port in the target Pod's container ports. If this is not specified, the value of the 'port' field is used (an identity map). This field is ignored for services with clusterIP=None, and should be omitted or set equal to the 'port' field. More info: https://kubernetes.io/docs/concepts/services-networking/service/#defining-a-service", - "nodePort": "The port on each node on which this service is exposed when type=NodePort or LoadBalancer. Usually assigned by the system. If specified, it will be allocated to the service if unused or else creation of the service will fail. Default is to auto-allocate a port if the ServiceType of this Service requires one. More info: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport", + "": "ServicePort contains information on service's port.", + "name": "The name of this port within the service. This must be a DNS_LABEL. All ports within a ServiceSpec must have unique names. When considering the endpoints for a Service, this must match the 'name' field in the EndpointPort. Optional if only one ServicePort is defined on this service.", + "protocol": "The IP protocol for this port. Supports \"TCP\", \"UDP\", and \"SCTP\". Default is TCP.", + "appProtocol": "The application protocol for this port. This field follows standard Kubernetes label syntax. Un-prefixed names are reserved for IANA standard service names (as per RFC-6335 and http://www.iana.org/assignments/service-names). Non-standard protocols should use prefixed names such as mycompany.com/my-custom-protocol. Field can be enabled with ServiceAppProtocol feature gate.", + "port": "The port that will be exposed by this service.", + "targetPort": "Number or name of the port to access on the pods targeted by the service. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. If this is a string, it will be looked up as a named port in the target Pod's container ports. If this is not specified, the value of the 'port' field is used (an identity map). This field is ignored for services with clusterIP=None, and should be omitted or set equal to the 'port' field. More info: https://kubernetes.io/docs/concepts/services-networking/service/#defining-a-service", + "nodePort": "The port on each node on which this service is exposed when type=NodePort or LoadBalancer. Usually assigned by the system. If specified, it will be allocated to the service if unused or else creation of the service will fail. Default is to auto-allocate a port if the ServiceType of this Service requires one. More info: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport", } func (ServicePort) SwaggerDoc() map[string]string { @@ -2278,7 +2283,7 @@ func (TCPSocketAction) SwaggerDoc() map[string]string { var map_Taint = map[string]string{ "": "The node this Taint is attached to has the \"effect\" on any pod that does not tolerate the Taint.", "key": "Required. The taint key to be applied to a node.", - "value": "Required. The taint value corresponding to the taint key.", + "value": "The taint value corresponding to the taint key.", "effect": "Required. The effect of the taint on pods that do not tolerate the taint. Valid effects are NoSchedule, PreferNoSchedule and NoExecute.", "timeAdded": "TimeAdded represents the time at which the taint was added. It is only written for NoExecute taints.", } @@ -2456,9 +2461,9 @@ func (WeightedPodAffinityTerm) SwaggerDoc() map[string]string { var map_WindowsSecurityContextOptions = map[string]string{ "": "WindowsSecurityContextOptions contain Windows-specific options and credentials.", - "gmsaCredentialSpecName": "GMSACredentialSpecName is the name of the GMSA credential spec to use. This field is alpha-level and is only honored by servers that enable the WindowsGMSA feature flag.", - "gmsaCredentialSpec": "GMSACredentialSpec is where the GMSA admission webhook (https://github.com/kubernetes-sigs/windows-gmsa) inlines the contents of the GMSA credential spec named by the GMSACredentialSpecName field. This field is alpha-level and is only honored by servers that enable the WindowsGMSA feature flag.", - "runAsUserName": "The UserName in Windows to run the entrypoint of the container process. Defaults to the user specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. This field is beta-level and may be disabled with the WindowsRunAsUserName feature flag.", + "gmsaCredentialSpecName": "GMSACredentialSpecName is the name of the GMSA credential spec to use.", + "gmsaCredentialSpec": "GMSACredentialSpec is where the GMSA admission webhook (https://github.com/kubernetes-sigs/windows-gmsa) inlines the contents of the GMSA credential spec named by the GMSACredentialSpecName field.", + "runAsUserName": "The UserName in Windows to run the entrypoint of the container process. Defaults to the user specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.", } func (WindowsSecurityContextOptions) SwaggerDoc() map[string]string { diff --git a/vendor/k8s.io/api/core/v1/well_known_taints.go b/vendor/k8s.io/api/core/v1/well_known_taints.go index e390519280..e1a8f6291b 100644 --- a/vendor/k8s.io/api/core/v1/well_known_taints.go +++ b/vendor/k8s.io/api/core/v1/well_known_taints.go @@ -18,38 +18,31 @@ package v1 const ( // TaintNodeNotReady will be added when node is not ready - // and feature-gate for TaintBasedEvictions flag is enabled, // and removed when node becomes ready. TaintNodeNotReady = "node.kubernetes.io/not-ready" // TaintNodeUnreachable will be added when node becomes unreachable // (corresponding to NodeReady status ConditionUnknown) - // and feature-gate for TaintBasedEvictions flag is enabled, // and removed when node becomes reachable (NodeReady status ConditionTrue). TaintNodeUnreachable = "node.kubernetes.io/unreachable" // TaintNodeUnschedulable will be added when node becomes unschedulable - // and feature-gate for TaintNodesByCondition flag is enabled, // and removed when node becomes scheduable. TaintNodeUnschedulable = "node.kubernetes.io/unschedulable" // TaintNodeMemoryPressure will be added when node has memory pressure - // and feature-gate for TaintNodesByCondition flag is enabled, // and removed when node has enough memory. TaintNodeMemoryPressure = "node.kubernetes.io/memory-pressure" // TaintNodeDiskPressure will be added when node has disk pressure - // and feature-gate for TaintNodesByCondition flag is enabled, // and removed when node has enough disk. TaintNodeDiskPressure = "node.kubernetes.io/disk-pressure" // TaintNodeNetworkUnavailable will be added when node's network is unavailable - // and feature-gate for TaintNodesByCondition flag is enabled, // and removed when network becomes ready. TaintNodeNetworkUnavailable = "node.kubernetes.io/network-unavailable" // TaintNodePIDPressure will be added when node has pid pressure - // and feature-gate for TaintNodesByCondition flag is enabled, // and removed when node has enough disk. TaintNodePIDPressure = "node.kubernetes.io/pid-pressure" ) diff --git a/vendor/k8s.io/api/core/v1/zz_generated.deepcopy.go b/vendor/k8s.io/api/core/v1/zz_generated.deepcopy.go index ac4855abc4..23d964447e 100644 --- a/vendor/k8s.io/api/core/v1/zz_generated.deepcopy.go +++ b/vendor/k8s.io/api/core/v1/zz_generated.deepcopy.go @@ -519,6 +519,11 @@ func (in *ConfigMap) DeepCopyInto(out *ConfigMap) { *out = *in out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + if in.Immutable != nil { + in, out := &in.Immutable, &out.Immutable + *out = new(bool) + **out = **in + } if in.Data != nil { in, out := &in.Data, &out.Data *out = make(map[string]string, len(*in)) @@ -1091,6 +1096,11 @@ func (in *EndpointAddress) DeepCopy() *EndpointAddress { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *EndpointPort) DeepCopyInto(out *EndpointPort) { *out = *in + if in.AppProtocol != nil { + in, out := &in.AppProtocol, &out.AppProtocol + *out = new(string) + **out = **in + } return } @@ -1124,7 +1134,9 @@ func (in *EndpointSubset) DeepCopyInto(out *EndpointSubset) { if in.Ports != nil { in, out := &in.Ports, &out.Ports *out = make([]EndpointPort, len(*in)) - copy(*out, *in) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } } return } @@ -3677,6 +3689,11 @@ func (in *PodSecurityContext) DeepCopyInto(out *PodSecurityContext) { *out = make([]Sysctl, len(*in)) copy(*out, *in) } + if in.FSGroupChangePolicy != nil { + in, out := &in.FSGroupChangePolicy, &out.FSGroupChangePolicy + *out = new(PodFSGroupChangePolicy) + **out = **in + } return } @@ -4663,6 +4680,11 @@ func (in *Secret) DeepCopyInto(out *Secret) { *out = *in out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + if in.Immutable != nil { + in, out := &in.Immutable, &out.Immutable + *out = new(bool) + **out = **in + } if in.Data != nil { in, out := &in.Data, &out.Data *out = make(map[string][]byte, len(*in)) @@ -5112,6 +5134,11 @@ func (in *ServiceList) DeepCopyObject() runtime.Object { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ServicePort) DeepCopyInto(out *ServicePort) { *out = *in + if in.AppProtocol != nil { + in, out := &in.AppProtocol, &out.AppProtocol + *out = new(string) + **out = **in + } out.TargetPort = in.TargetPort return } @@ -5157,7 +5184,9 @@ func (in *ServiceSpec) DeepCopyInto(out *ServiceSpec) { if in.Ports != nil { in, out := &in.Ports, &out.Ports *out = make([]ServicePort, len(*in)) - copy(*out, *in) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } } if in.Selector != nil { in, out := &in.Selector, &out.Selector diff --git a/vendor/k8s.io/api/discovery/v1alpha1/generated.pb.go b/vendor/k8s.io/api/discovery/v1alpha1/generated.pb.go index fa4d3ac504..45c4382cf5 100644 --- a/vendor/k8s.io/api/discovery/v1alpha1/generated.pb.go +++ b/vendor/k8s.io/api/discovery/v1alpha1/generated.pb.go @@ -44,7 +44,7 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *Endpoint) Reset() { *m = Endpoint{} } func (*Endpoint) ProtoMessage() {} @@ -1621,6 +1621,7 @@ func (m *EndpointSliceList) Unmarshal(dAtA []byte) error { func skipGenerated(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -1652,10 +1653,8 @@ func skipGenerated(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -1676,55 +1675,30 @@ func skipGenerated(dAtA []byte) (n int, err error) { return 0, ErrInvalidLengthGenerated } iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - return iNdEx, nil case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipGenerated(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenerated + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenerated + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group") ) diff --git a/vendor/k8s.io/api/discovery/v1beta1/generated.pb.go b/vendor/k8s.io/api/discovery/v1beta1/generated.pb.go index 2283d12d65..ce0046c519 100644 --- a/vendor/k8s.io/api/discovery/v1beta1/generated.pb.go +++ b/vendor/k8s.io/api/discovery/v1beta1/generated.pb.go @@ -44,7 +44,7 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *Endpoint) Reset() { *m = Endpoint{} } func (*Endpoint) ProtoMessage() {} @@ -1621,6 +1621,7 @@ func (m *EndpointSliceList) Unmarshal(dAtA []byte) error { func skipGenerated(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -1652,10 +1653,8 @@ func skipGenerated(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -1676,55 +1675,30 @@ func skipGenerated(dAtA []byte) (n int, err error) { return 0, ErrInvalidLengthGenerated } iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - return iNdEx, nil case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipGenerated(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenerated + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenerated + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group") ) diff --git a/vendor/k8s.io/api/discovery/v1beta1/generated.proto b/vendor/k8s.io/api/discovery/v1beta1/generated.proto index cce6f970da..581ddf7b6f 100644 --- a/vendor/k8s.io/api/discovery/v1beta1/generated.proto +++ b/vendor/k8s.io/api/discovery/v1beta1/generated.proto @@ -107,8 +107,9 @@ message EndpointPort { // This field follows standard Kubernetes label syntax. // Un-prefixed names are reserved for IANA standard service names (as per // RFC-6335 and http://www.iana.org/assignments/service-names). - // Non-standard protocols should use prefixed names. - // Default is empty string. + // Non-standard protocols should use prefixed names such as + // mycompany.com/my-custom-protocol. + // +optional optional string appProtocol = 4; } diff --git a/vendor/k8s.io/api/discovery/v1beta1/types.go b/vendor/k8s.io/api/discovery/v1beta1/types.go index e3dc56539c..20fcde94ef 100644 --- a/vendor/k8s.io/api/discovery/v1beta1/types.go +++ b/vendor/k8s.io/api/discovery/v1beta1/types.go @@ -143,8 +143,9 @@ type EndpointPort struct { // This field follows standard Kubernetes label syntax. // Un-prefixed names are reserved for IANA standard service names (as per // RFC-6335 and http://www.iana.org/assignments/service-names). - // Non-standard protocols should use prefixed names. - // Default is empty string. + // Non-standard protocols should use prefixed names such as + // mycompany.com/my-custom-protocol. + // +optional AppProtocol *string `json:"appProtocol,omitempty" protobuf:"bytes,4,name=appProtocol"` } diff --git a/vendor/k8s.io/api/discovery/v1beta1/types_swagger_doc_generated.go b/vendor/k8s.io/api/discovery/v1beta1/types_swagger_doc_generated.go index 9dd3a03522..d67cc72146 100644 --- a/vendor/k8s.io/api/discovery/v1beta1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/api/discovery/v1beta1/types_swagger_doc_generated.go @@ -54,7 +54,7 @@ var map_EndpointPort = map[string]string{ "name": "The name of this port. All ports in an EndpointSlice must have a unique name. If the EndpointSlice is dervied from a Kubernetes service, this corresponds to the Service.ports[].name. Name must either be an empty string or pass DNS_LABEL validation: * must be no more than 63 characters long. * must consist of lower case alphanumeric characters or '-'. * must start and end with an alphanumeric character. Default is empty string.", "protocol": "The IP protocol for this port. Must be UDP, TCP, or SCTP. Default is TCP.", "port": "The port number of the endpoint. If this is not specified, ports are not restricted and must be interpreted in the context of the specific consumer.", - "appProtocol": "The application protocol for this port. This field follows standard Kubernetes label syntax. Un-prefixed names are reserved for IANA standard service names (as per RFC-6335 and http://www.iana.org/assignments/service-names). Non-standard protocols should use prefixed names. Default is empty string.", + "appProtocol": "The application protocol for this port. This field follows standard Kubernetes label syntax. Un-prefixed names are reserved for IANA standard service names (as per RFC-6335 and http://www.iana.org/assignments/service-names). Non-standard protocols should use prefixed names such as mycompany.com/my-custom-protocol.", } func (EndpointPort) SwaggerDoc() map[string]string { diff --git a/vendor/k8s.io/api/events/v1beta1/generated.pb.go b/vendor/k8s.io/api/events/v1beta1/generated.pb.go index 0e9a8e7830..923dee5e0e 100644 --- a/vendor/k8s.io/api/events/v1beta1/generated.pb.go +++ b/vendor/k8s.io/api/events/v1beta1/generated.pb.go @@ -42,7 +42,7 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *Event) Reset() { *m = Event{} } func (*Event) ProtoMessage() {} @@ -1365,6 +1365,7 @@ func (m *EventSeries) Unmarshal(dAtA []byte) error { func skipGenerated(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -1396,10 +1397,8 @@ func skipGenerated(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -1420,55 +1419,30 @@ func skipGenerated(dAtA []byte) (n int, err error) { return 0, ErrInvalidLengthGenerated } iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - return iNdEx, nil case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipGenerated(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenerated + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenerated + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group") ) diff --git a/vendor/k8s.io/api/extensions/v1beta1/generated.pb.go b/vendor/k8s.io/api/extensions/v1beta1/generated.pb.go index 65b47eabd5..bd37f432c4 100644 --- a/vendor/k8s.io/api/extensions/v1beta1/generated.pb.go +++ b/vendor/k8s.io/api/extensions/v1beta1/generated.pb.go @@ -47,7 +47,7 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *AllowedCSIDriver) Reset() { *m = AllowedCSIDriver{} } func (*AllowedCSIDriver) ProtoMessage() {} @@ -1309,38 +1309,10 @@ func (m *ReplicaSetStatus) XXX_DiscardUnknown() { var xxx_messageInfo_ReplicaSetStatus proto.InternalMessageInfo -func (m *ReplicationControllerDummy) Reset() { *m = ReplicationControllerDummy{} } -func (*ReplicationControllerDummy) ProtoMessage() {} -func (*ReplicationControllerDummy) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{45} -} -func (m *ReplicationControllerDummy) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ReplicationControllerDummy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ReplicationControllerDummy) XXX_Merge(src proto.Message) { - xxx_messageInfo_ReplicationControllerDummy.Merge(m, src) -} -func (m *ReplicationControllerDummy) XXX_Size() int { - return m.Size() -} -func (m *ReplicationControllerDummy) XXX_DiscardUnknown() { - xxx_messageInfo_ReplicationControllerDummy.DiscardUnknown(m) -} - -var xxx_messageInfo_ReplicationControllerDummy proto.InternalMessageInfo - func (m *RollbackConfig) Reset() { *m = RollbackConfig{} } func (*RollbackConfig) ProtoMessage() {} func (*RollbackConfig) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{46} + return fileDescriptor_cdc93917efc28165, []int{45} } func (m *RollbackConfig) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1368,7 +1340,7 @@ var xxx_messageInfo_RollbackConfig proto.InternalMessageInfo func (m *RollingUpdateDaemonSet) Reset() { *m = RollingUpdateDaemonSet{} } func (*RollingUpdateDaemonSet) ProtoMessage() {} func (*RollingUpdateDaemonSet) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{47} + return fileDescriptor_cdc93917efc28165, []int{46} } func (m *RollingUpdateDaemonSet) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1396,7 +1368,7 @@ var xxx_messageInfo_RollingUpdateDaemonSet proto.InternalMessageInfo func (m *RollingUpdateDeployment) Reset() { *m = RollingUpdateDeployment{} } func (*RollingUpdateDeployment) ProtoMessage() {} func (*RollingUpdateDeployment) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{48} + return fileDescriptor_cdc93917efc28165, []int{47} } func (m *RollingUpdateDeployment) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1424,7 +1396,7 @@ var xxx_messageInfo_RollingUpdateDeployment proto.InternalMessageInfo func (m *RunAsGroupStrategyOptions) Reset() { *m = RunAsGroupStrategyOptions{} } func (*RunAsGroupStrategyOptions) ProtoMessage() {} func (*RunAsGroupStrategyOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{49} + return fileDescriptor_cdc93917efc28165, []int{48} } func (m *RunAsGroupStrategyOptions) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1452,7 +1424,7 @@ var xxx_messageInfo_RunAsGroupStrategyOptions proto.InternalMessageInfo func (m *RunAsUserStrategyOptions) Reset() { *m = RunAsUserStrategyOptions{} } func (*RunAsUserStrategyOptions) ProtoMessage() {} func (*RunAsUserStrategyOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{50} + return fileDescriptor_cdc93917efc28165, []int{49} } func (m *RunAsUserStrategyOptions) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1480,7 +1452,7 @@ var xxx_messageInfo_RunAsUserStrategyOptions proto.InternalMessageInfo func (m *RuntimeClassStrategyOptions) Reset() { *m = RuntimeClassStrategyOptions{} } func (*RuntimeClassStrategyOptions) ProtoMessage() {} func (*RuntimeClassStrategyOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{51} + return fileDescriptor_cdc93917efc28165, []int{50} } func (m *RuntimeClassStrategyOptions) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1508,7 +1480,7 @@ var xxx_messageInfo_RuntimeClassStrategyOptions proto.InternalMessageInfo func (m *SELinuxStrategyOptions) Reset() { *m = SELinuxStrategyOptions{} } func (*SELinuxStrategyOptions) ProtoMessage() {} func (*SELinuxStrategyOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{52} + return fileDescriptor_cdc93917efc28165, []int{51} } func (m *SELinuxStrategyOptions) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1536,7 +1508,7 @@ var xxx_messageInfo_SELinuxStrategyOptions proto.InternalMessageInfo func (m *Scale) Reset() { *m = Scale{} } func (*Scale) ProtoMessage() {} func (*Scale) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{53} + return fileDescriptor_cdc93917efc28165, []int{52} } func (m *Scale) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1564,7 +1536,7 @@ var xxx_messageInfo_Scale proto.InternalMessageInfo func (m *ScaleSpec) Reset() { *m = ScaleSpec{} } func (*ScaleSpec) ProtoMessage() {} func (*ScaleSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{54} + return fileDescriptor_cdc93917efc28165, []int{53} } func (m *ScaleSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1592,7 +1564,7 @@ var xxx_messageInfo_ScaleSpec proto.InternalMessageInfo func (m *ScaleStatus) Reset() { *m = ScaleStatus{} } func (*ScaleStatus) ProtoMessage() {} func (*ScaleStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{55} + return fileDescriptor_cdc93917efc28165, []int{54} } func (m *ScaleStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1620,7 +1592,7 @@ var xxx_messageInfo_ScaleStatus proto.InternalMessageInfo func (m *SupplementalGroupsStrategyOptions) Reset() { *m = SupplementalGroupsStrategyOptions{} } func (*SupplementalGroupsStrategyOptions) ProtoMessage() {} func (*SupplementalGroupsStrategyOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{56} + return fileDescriptor_cdc93917efc28165, []int{55} } func (m *SupplementalGroupsStrategyOptions) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1692,7 +1664,6 @@ func init() { proto.RegisterType((*ReplicaSetList)(nil), "k8s.io.api.extensions.v1beta1.ReplicaSetList") proto.RegisterType((*ReplicaSetSpec)(nil), "k8s.io.api.extensions.v1beta1.ReplicaSetSpec") proto.RegisterType((*ReplicaSetStatus)(nil), "k8s.io.api.extensions.v1beta1.ReplicaSetStatus") - proto.RegisterType((*ReplicationControllerDummy)(nil), "k8s.io.api.extensions.v1beta1.ReplicationControllerDummy") proto.RegisterType((*RollbackConfig)(nil), "k8s.io.api.extensions.v1beta1.RollbackConfig") proto.RegisterType((*RollingUpdateDaemonSet)(nil), "k8s.io.api.extensions.v1beta1.RollingUpdateDaemonSet") proto.RegisterType((*RollingUpdateDeployment)(nil), "k8s.io.api.extensions.v1beta1.RollingUpdateDeployment") @@ -1712,238 +1683,241 @@ func init() { } var fileDescriptor_cdc93917efc28165 = []byte{ - // 3684 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x5b, 0x4f, 0x6c, 0x1b, 0x47, - 0x77, 0xf7, 0x92, 0x94, 0x48, 0x3d, 0xfd, 0x1f, 0xc9, 0x12, 0x3f, 0x3b, 0x16, 0xfd, 0x6d, 0x00, - 0xd7, 0x49, 0x6d, 0x32, 0x76, 0x6c, 0x7f, 0xae, 0x8d, 0x7e, 0x89, 0x28, 0x59, 0xb6, 0x52, 0xfd, - 0x61, 0x86, 0x92, 0x1b, 0x04, 0x4d, 0x9a, 0x15, 0x39, 0xa2, 0xd6, 0x5a, 0xee, 0x6e, 0x76, 0x87, - 0x8a, 0x08, 0xf4, 0xd0, 0x43, 0x51, 0xa0, 0x40, 0x8b, 0xf6, 0x92, 0xb6, 0xc7, 0x06, 0x05, 0x7a, - 0x6a, 0xd1, 0xde, 0xda, 0x43, 0x10, 0xa0, 0x40, 0x0a, 0x18, 0x45, 0x5a, 0xe4, 0xd6, 0x9c, 0x84, - 0x46, 0x39, 0x15, 0x3d, 0xf5, 0x56, 0xf8, 0x50, 0x14, 0x33, 0x3b, 0xfb, 0x7f, 0x57, 0x5c, 0x29, - 0xb6, 0xd0, 0x00, 0xbd, 0x89, 0xf3, 0xde, 0xfb, 0xbd, 0x37, 0x33, 0x6f, 0xde, 0x7b, 0x33, 0xfb, - 0x04, 0x2b, 0xfb, 0xf7, 0xed, 0xaa, 0x6a, 0xd4, 0xf6, 0x7b, 0x3b, 0xc4, 0xd2, 0x09, 0x25, 0x76, - 0xed, 0x80, 0xe8, 0x6d, 0xc3, 0xaa, 0x09, 0x82, 0x62, 0xaa, 0x35, 0x72, 0x48, 0x89, 0x6e, 0xab, - 0x86, 0x6e, 0xd7, 0x0e, 0x6e, 0xed, 0x10, 0xaa, 0xdc, 0xaa, 0x75, 0x88, 0x4e, 0x2c, 0x85, 0x92, - 0x76, 0xd5, 0xb4, 0x0c, 0x6a, 0xa0, 0x2b, 0x0e, 0x7b, 0x55, 0x31, 0xd5, 0xaa, 0xcf, 0x5e, 0x15, - 0xec, 0x97, 0x6e, 0x76, 0x54, 0xba, 0xd7, 0xdb, 0xa9, 0xb6, 0x8c, 0x6e, 0xad, 0x63, 0x74, 0x8c, - 0x1a, 0x97, 0xda, 0xe9, 0xed, 0xf2, 0x5f, 0xfc, 0x07, 0xff, 0xcb, 0x41, 0xbb, 0x24, 0x07, 0x94, - 0xb7, 0x0c, 0x8b, 0xd4, 0x0e, 0x62, 0x1a, 0x2f, 0xdd, 0xf1, 0x79, 0xba, 0x4a, 0x6b, 0x4f, 0xd5, - 0x89, 0xd5, 0xaf, 0x99, 0xfb, 0x1d, 0x36, 0x60, 0xd7, 0xba, 0x84, 0x2a, 0x49, 0x52, 0xb5, 0x34, - 0x29, 0xab, 0xa7, 0x53, 0xb5, 0x4b, 0x62, 0x02, 0xf7, 0x06, 0x09, 0xd8, 0xad, 0x3d, 0xd2, 0x55, - 0x62, 0x72, 0x6f, 0xa7, 0xc9, 0xf5, 0xa8, 0xaa, 0xd5, 0x54, 0x9d, 0xda, 0xd4, 0x8a, 0x0a, 0xc9, - 0x77, 0x60, 0x6a, 0x51, 0xd3, 0x8c, 0xcf, 0x48, 0x7b, 0xa9, 0xb9, 0xba, 0x6c, 0xa9, 0x07, 0xc4, - 0x42, 0x57, 0xa1, 0xa0, 0x2b, 0x5d, 0x52, 0x96, 0xae, 0x4a, 0xd7, 0x47, 0xea, 0x63, 0xcf, 0x8f, - 0x2a, 0x17, 0x8e, 0x8f, 0x2a, 0x85, 0x0d, 0xa5, 0x4b, 0x30, 0xa7, 0xc8, 0x0f, 0x61, 0x5a, 0x48, - 0xad, 0x68, 0xe4, 0xf0, 0xa9, 0xa1, 0xf5, 0xba, 0x04, 0x5d, 0x83, 0xe1, 0x36, 0x07, 0x10, 0x82, - 0x13, 0x42, 0x70, 0xd8, 0x81, 0xc5, 0x82, 0x2a, 0xdb, 0x30, 0x29, 0x84, 0x9f, 0x18, 0x36, 0x6d, - 0x28, 0x74, 0x0f, 0xdd, 0x06, 0x30, 0x15, 0xba, 0xd7, 0xb0, 0xc8, 0xae, 0x7a, 0x28, 0xc4, 0x91, - 0x10, 0x87, 0x86, 0x47, 0xc1, 0x01, 0x2e, 0x74, 0x03, 0x4a, 0x16, 0x51, 0xda, 0x9b, 0xba, 0xd6, - 0x2f, 0xe7, 0xae, 0x4a, 0xd7, 0x4b, 0xf5, 0x29, 0x21, 0x51, 0xc2, 0x62, 0x1c, 0x7b, 0x1c, 0xf2, - 0xe7, 0x39, 0x18, 0x59, 0x56, 0x48, 0xd7, 0xd0, 0x9b, 0x84, 0xa2, 0x4f, 0xa0, 0xc4, 0xb6, 0xab, - 0xad, 0x50, 0x85, 0x6b, 0x1b, 0xbd, 0xfd, 0x56, 0xd5, 0x77, 0x27, 0x6f, 0xf5, 0xaa, 0xe6, 0x7e, - 0x87, 0x0d, 0xd8, 0x55, 0xc6, 0x5d, 0x3d, 0xb8, 0x55, 0xdd, 0xdc, 0x79, 0x46, 0x5a, 0x74, 0x9d, - 0x50, 0xc5, 0xb7, 0xcf, 0x1f, 0xc3, 0x1e, 0x2a, 0xda, 0x80, 0x82, 0x6d, 0x92, 0x16, 0xb7, 0x6c, - 0xf4, 0xf6, 0x8d, 0xea, 0x89, 0xce, 0x5a, 0xf5, 0x2c, 0x6b, 0x9a, 0xa4, 0xe5, 0xaf, 0x38, 0xfb, - 0x85, 0x39, 0x0e, 0x7a, 0x0a, 0xc3, 0x36, 0x55, 0x68, 0xcf, 0x2e, 0xe7, 0x39, 0x62, 0x35, 0x33, - 0x22, 0x97, 0xf2, 0x37, 0xc3, 0xf9, 0x8d, 0x05, 0x9a, 0xfc, 0x1f, 0x39, 0x40, 0x1e, 0xef, 0x92, - 0xa1, 0xb7, 0x55, 0xaa, 0x1a, 0x3a, 0x7a, 0x00, 0x05, 0xda, 0x37, 0x5d, 0x17, 0xb8, 0xe6, 0x1a, - 0xb4, 0xd5, 0x37, 0xc9, 0x8b, 0xa3, 0xca, 0x5c, 0x5c, 0x82, 0x51, 0x30, 0x97, 0x41, 0x6b, 0x9e, - 0xa9, 0x39, 0x2e, 0x7d, 0x27, 0xac, 0xfa, 0xc5, 0x51, 0x25, 0xe1, 0xb0, 0x55, 0x3d, 0xa4, 0xb0, - 0x81, 0xe8, 0x00, 0x90, 0xa6, 0xd8, 0x74, 0xcb, 0x52, 0x74, 0xdb, 0xd1, 0xa4, 0x76, 0x89, 0x58, - 0x84, 0x37, 0xb3, 0x6d, 0x1a, 0x93, 0xa8, 0x5f, 0x12, 0x56, 0xa0, 0xb5, 0x18, 0x1a, 0x4e, 0xd0, - 0xc0, 0xbc, 0xd9, 0x22, 0x8a, 0x6d, 0xe8, 0xe5, 0x42, 0xd8, 0x9b, 0x31, 0x1f, 0xc5, 0x82, 0x8a, - 0xde, 0x80, 0x62, 0x97, 0xd8, 0xb6, 0xd2, 0x21, 0xe5, 0x21, 0xce, 0x38, 0x29, 0x18, 0x8b, 0xeb, - 0xce, 0x30, 0x76, 0xe9, 0xf2, 0x97, 0x12, 0x8c, 0x7b, 0x2b, 0xb7, 0xa6, 0xda, 0x14, 0xfd, 0x56, - 0xcc, 0x0f, 0xab, 0xd9, 0xa6, 0xc4, 0xa4, 0xb9, 0x17, 0x7a, 0x3e, 0xef, 0x8e, 0x04, 0x7c, 0x70, - 0x1d, 0x86, 0x54, 0x4a, 0xba, 0x6c, 0x1f, 0xf2, 0xd7, 0x47, 0x6f, 0x5f, 0xcf, 0xea, 0x32, 0xf5, - 0x71, 0x01, 0x3a, 0xb4, 0xca, 0xc4, 0xb1, 0x83, 0x22, 0xff, 0x69, 0x21, 0x60, 0x3e, 0x73, 0x4d, - 0xf4, 0x11, 0x94, 0x6c, 0xa2, 0x91, 0x16, 0x35, 0x2c, 0x61, 0xfe, 0xdb, 0x19, 0xcd, 0x57, 0x76, - 0x88, 0xd6, 0x14, 0xa2, 0xf5, 0x31, 0x66, 0xbf, 0xfb, 0x0b, 0x7b, 0x90, 0xe8, 0x7d, 0x28, 0x51, - 0xd2, 0x35, 0x35, 0x85, 0x12, 0x71, 0x8e, 0x5e, 0x0f, 0x4e, 0x81, 0x79, 0x0e, 0x03, 0x6b, 0x18, - 0xed, 0x2d, 0xc1, 0xc6, 0x8f, 0x8f, 0xb7, 0x24, 0xee, 0x28, 0xf6, 0x60, 0xd0, 0x01, 0x4c, 0xf4, - 0xcc, 0x36, 0xe3, 0xa4, 0x2c, 0x0a, 0x76, 0xfa, 0xc2, 0x93, 0xee, 0x65, 0x5d, 0x9b, 0xed, 0x90, - 0x74, 0x7d, 0x4e, 0xe8, 0x9a, 0x08, 0x8f, 0xe3, 0x88, 0x16, 0xb4, 0x08, 0x93, 0x5d, 0x55, 0x67, - 0x71, 0xa9, 0xdf, 0x24, 0x2d, 0x43, 0x6f, 0xdb, 0xdc, 0xad, 0x86, 0xea, 0xf3, 0x02, 0x60, 0x72, - 0x3d, 0x4c, 0xc6, 0x51, 0x7e, 0xf4, 0x1e, 0x20, 0x77, 0x1a, 0x8f, 0x9d, 0x20, 0xae, 0x1a, 0x3a, - 0xf7, 0xb9, 0xbc, 0xef, 0xdc, 0x5b, 0x31, 0x0e, 0x9c, 0x20, 0x85, 0xd6, 0x60, 0xd6, 0x22, 0x07, - 0x2a, 0x9b, 0xe3, 0x13, 0xd5, 0xa6, 0x86, 0xd5, 0x5f, 0x53, 0xbb, 0x2a, 0x2d, 0x0f, 0x73, 0x9b, - 0xca, 0xc7, 0x47, 0x95, 0x59, 0x9c, 0x40, 0xc7, 0x89, 0x52, 0xf2, 0x9f, 0x0d, 0xc3, 0x64, 0x24, - 0xde, 0xa0, 0xa7, 0x30, 0xd7, 0xea, 0x59, 0x16, 0xd1, 0xe9, 0x46, 0xaf, 0xbb, 0x43, 0xac, 0x66, - 0x6b, 0x8f, 0xb4, 0x7b, 0x1a, 0x69, 0x73, 0x47, 0x19, 0xaa, 0x2f, 0x08, 0x8b, 0xe7, 0x96, 0x12, - 0xb9, 0x70, 0x8a, 0x34, 0x5b, 0x05, 0x9d, 0x0f, 0xad, 0xab, 0xb6, 0xed, 0x61, 0xe6, 0x38, 0xa6, - 0xb7, 0x0a, 0x1b, 0x31, 0x0e, 0x9c, 0x20, 0xc5, 0x6c, 0x6c, 0x13, 0x5b, 0xb5, 0x48, 0x3b, 0x6a, - 0x63, 0x3e, 0x6c, 0xe3, 0x72, 0x22, 0x17, 0x4e, 0x91, 0x46, 0x77, 0x61, 0xd4, 0xd1, 0xc6, 0xf7, - 0x4f, 0x6c, 0xf4, 0x8c, 0x00, 0x1b, 0xdd, 0xf0, 0x49, 0x38, 0xc8, 0xc7, 0xa6, 0x66, 0xec, 0xd8, - 0xc4, 0x3a, 0x20, 0xed, 0xf4, 0x0d, 0xde, 0x8c, 0x71, 0xe0, 0x04, 0x29, 0x36, 0x35, 0xc7, 0x03, - 0x63, 0x53, 0x1b, 0x0e, 0x4f, 0x6d, 0x3b, 0x91, 0x0b, 0xa7, 0x48, 0x33, 0x3f, 0x76, 0x4c, 0x5e, - 0x3c, 0x50, 0x54, 0x4d, 0xd9, 0xd1, 0x48, 0xb9, 0x18, 0xf6, 0xe3, 0x8d, 0x30, 0x19, 0x47, 0xf9, - 0xd1, 0x63, 0x98, 0x76, 0x86, 0xb6, 0x75, 0xc5, 0x03, 0x29, 0x71, 0x90, 0x9f, 0x09, 0x90, 0xe9, - 0x8d, 0x28, 0x03, 0x8e, 0xcb, 0xa0, 0x07, 0x30, 0xd1, 0x32, 0x34, 0x8d, 0xfb, 0xe3, 0x92, 0xd1, - 0xd3, 0x69, 0x79, 0x84, 0xa3, 0x20, 0x76, 0x1e, 0x97, 0x42, 0x14, 0x1c, 0xe1, 0x44, 0x04, 0xa0, - 0xe5, 0x26, 0x1c, 0xbb, 0x0c, 0x3c, 0x3e, 0xde, 0xca, 0x1a, 0x03, 0xbc, 0x54, 0xe5, 0xd7, 0x00, - 0xde, 0x90, 0x8d, 0x03, 0xc0, 0xf2, 0x3f, 0x4b, 0x30, 0x9f, 0x12, 0x3a, 0xd0, 0x3b, 0xa1, 0x14, - 0xfb, 0xab, 0x91, 0x14, 0x7b, 0x39, 0x45, 0x2c, 0x90, 0x67, 0x75, 0x18, 0xb7, 0xd8, 0xac, 0xf4, - 0x8e, 0xc3, 0x22, 0x62, 0xe4, 0xdd, 0x01, 0xd3, 0xc0, 0x41, 0x19, 0x3f, 0xe6, 0x4f, 0x1f, 0x1f, - 0x55, 0xc6, 0x43, 0x34, 0x1c, 0x86, 0x97, 0xff, 0x3c, 0x07, 0xb0, 0x4c, 0x4c, 0xcd, 0xe8, 0x77, - 0x89, 0x7e, 0x1e, 0x35, 0xd4, 0x66, 0xa8, 0x86, 0xba, 0x39, 0x68, 0x7b, 0x3c, 0xd3, 0x52, 0x8b, - 0xa8, 0xdf, 0x8c, 0x14, 0x51, 0xb5, 0xec, 0x90, 0x27, 0x57, 0x51, 0xff, 0x96, 0x87, 0x19, 0x9f, - 0xd9, 0x2f, 0xa3, 0x1e, 0x86, 0xf6, 0xf8, 0x57, 0x22, 0x7b, 0x3c, 0x9f, 0x20, 0xf2, 0xca, 0xea, - 0xa8, 0x67, 0x30, 0xc1, 0xaa, 0x1c, 0x67, 0x2f, 0x79, 0x0d, 0x35, 0x7c, 0xea, 0x1a, 0xca, 0xcb, - 0x76, 0x6b, 0x21, 0x24, 0x1c, 0x41, 0x4e, 0xa9, 0xd9, 0x8a, 0x3f, 0xc5, 0x9a, 0xed, 0x2b, 0x09, - 0x26, 0xfc, 0x6d, 0x3a, 0x87, 0xa2, 0x6d, 0x23, 0x5c, 0xb4, 0xbd, 0x91, 0xd9, 0x45, 0x53, 0xaa, - 0xb6, 0xff, 0x66, 0x05, 0xbe, 0xc7, 0xc4, 0x0e, 0xf8, 0x8e, 0xd2, 0xda, 0x1f, 0x7c, 0xc7, 0x43, - 0x9f, 0x4b, 0x80, 0x44, 0x16, 0x58, 0xd4, 0x75, 0x83, 0x2a, 0x4e, 0xac, 0x74, 0xcc, 0x5a, 0xcd, - 0x6c, 0x96, 0xab, 0xb1, 0xba, 0x1d, 0xc3, 0x7a, 0xa4, 0x53, 0xab, 0xef, 0x6f, 0x72, 0x9c, 0x01, - 0x27, 0x18, 0x80, 0x14, 0x00, 0x4b, 0x60, 0x6e, 0x19, 0xe2, 0x20, 0xdf, 0xcc, 0x10, 0xf3, 0x98, - 0xc0, 0x92, 0xa1, 0xef, 0xaa, 0x1d, 0x3f, 0xec, 0x60, 0x0f, 0x08, 0x07, 0x40, 0x2f, 0x3d, 0x82, - 0xf9, 0x14, 0x6b, 0xd1, 0x14, 0xe4, 0xf7, 0x49, 0xdf, 0x59, 0x36, 0xcc, 0xfe, 0x44, 0xb3, 0x30, - 0x74, 0xa0, 0x68, 0x3d, 0x27, 0xfc, 0x8e, 0x60, 0xe7, 0xc7, 0x83, 0xdc, 0x7d, 0x49, 0xfe, 0x72, - 0x28, 0xe8, 0x3b, 0xbc, 0x62, 0xbe, 0xce, 0x2e, 0xad, 0xa6, 0xa6, 0xb6, 0x14, 0x5b, 0x14, 0x42, - 0x63, 0xce, 0x85, 0xd5, 0x19, 0xc3, 0x1e, 0x35, 0x54, 0x5b, 0xe7, 0x5e, 0x6d, 0x6d, 0x9d, 0x7f, - 0x39, 0xb5, 0xf5, 0x6f, 0x43, 0xc9, 0x76, 0xab, 0xea, 0x02, 0x87, 0xbc, 0x75, 0x8a, 0xf8, 0x2a, - 0x0a, 0x6a, 0x4f, 0x81, 0x57, 0x4a, 0x7b, 0xa0, 0x49, 0x45, 0xf4, 0xd0, 0x29, 0x8b, 0xe8, 0x97, - 0x5a, 0xf8, 0xb2, 0x78, 0x63, 0x2a, 0x3d, 0x9b, 0xb4, 0x79, 0x6c, 0x2b, 0xf9, 0xf1, 0xa6, 0xc1, - 0x47, 0xb1, 0xa0, 0xa2, 0x8f, 0x42, 0x2e, 0x5b, 0x3a, 0x8b, 0xcb, 0x4e, 0xa4, 0xbb, 0x2b, 0xda, - 0x86, 0x79, 0xd3, 0x32, 0x3a, 0x16, 0xb1, 0xed, 0x65, 0xa2, 0xb4, 0x35, 0x55, 0x27, 0xee, 0xfa, - 0x38, 0x15, 0xd1, 0xe5, 0xe3, 0xa3, 0xca, 0x7c, 0x23, 0x99, 0x05, 0xa7, 0xc9, 0xca, 0xcf, 0x0b, - 0x30, 0x15, 0xcd, 0x80, 0x29, 0x45, 0xaa, 0x74, 0xa6, 0x22, 0xf5, 0x46, 0xe0, 0x30, 0x38, 0x15, - 0x7c, 0xe0, 0x05, 0x27, 0x76, 0x20, 0x16, 0x61, 0x52, 0x44, 0x03, 0x97, 0x28, 0xca, 0x74, 0x6f, - 0xf7, 0xb7, 0xc3, 0x64, 0x1c, 0xe5, 0x47, 0x0f, 0x61, 0xdc, 0xe2, 0x75, 0xb7, 0x0b, 0xe0, 0xd4, - 0xae, 0x17, 0x05, 0xc0, 0x38, 0x0e, 0x12, 0x71, 0x98, 0x97, 0xd5, 0xad, 0x7e, 0x39, 0xea, 0x02, - 0x14, 0xc2, 0x75, 0xeb, 0x62, 0x94, 0x01, 0xc7, 0x65, 0xd0, 0x3a, 0xcc, 0xf4, 0xf4, 0x38, 0x94, - 0xe3, 0xca, 0x97, 0x05, 0xd4, 0xcc, 0x76, 0x9c, 0x05, 0x27, 0xc9, 0xa1, 0xdd, 0x50, 0x29, 0x3b, - 0xcc, 0xc3, 0xf3, 0xed, 0xcc, 0x07, 0x2f, 0x73, 0x2d, 0x9b, 0x50, 0x6e, 0x97, 0xb2, 0x96, 0xdb, - 0xf2, 0x3f, 0x4a, 0xc1, 0x24, 0xe4, 0x95, 0xc0, 0x83, 0x5e, 0x99, 0x62, 0x12, 0x81, 0xea, 0xc8, - 0x48, 0xae, 0x7e, 0xef, 0x9d, 0xaa, 0xfa, 0xf5, 0x93, 0xe7, 0xe0, 0xf2, 0xf7, 0x0b, 0x09, 0xe6, - 0x56, 0x9a, 0x8f, 0x2d, 0xa3, 0x67, 0xba, 0xe6, 0x6c, 0x9a, 0xce, 0xd2, 0xfc, 0x02, 0x0a, 0x56, - 0x4f, 0x73, 0xe7, 0xf1, 0xba, 0x3b, 0x0f, 0xdc, 0xd3, 0xd8, 0x3c, 0x66, 0x22, 0x52, 0xce, 0x24, - 0x98, 0x00, 0xda, 0x80, 0x61, 0x4b, 0xd1, 0x3b, 0xc4, 0x4d, 0xab, 0xd7, 0x06, 0x58, 0xbf, 0xba, - 0x8c, 0x19, 0x7b, 0xa0, 0xb0, 0xe1, 0xd2, 0x58, 0xa0, 0xc8, 0x7f, 0x24, 0xc1, 0xe4, 0x93, 0xad, - 0xad, 0xc6, 0xaa, 0xce, 0x4f, 0x34, 0x7f, 0x5b, 0xbd, 0x0a, 0x05, 0x53, 0xa1, 0x7b, 0xd1, 0x4c, - 0xcf, 0x68, 0x98, 0x53, 0xd0, 0x07, 0x50, 0x64, 0x91, 0x84, 0xe8, 0xed, 0x8c, 0xa5, 0xb6, 0x80, - 0xaf, 0x3b, 0x42, 0x7e, 0xf5, 0x24, 0x06, 0xb0, 0x0b, 0x27, 0xef, 0xc3, 0x6c, 0xc0, 0x1c, 0xb6, - 0x1e, 0x4f, 0x59, 0x76, 0x44, 0x4d, 0x18, 0x62, 0x9a, 0x59, 0x0e, 0xcc, 0x67, 0x78, 0xcc, 0x8c, - 0x4c, 0xc9, 0xaf, 0x74, 0xd8, 0x2f, 0x1b, 0x3b, 0x58, 0xf2, 0x3a, 0x8c, 0xf3, 0x07, 0x65, 0xc3, - 0xa2, 0x7c, 0x59, 0xd0, 0x15, 0xc8, 0x77, 0x55, 0x5d, 0xe4, 0xd9, 0x51, 0x21, 0x93, 0x67, 0x39, - 0x82, 0x8d, 0x73, 0xb2, 0x72, 0x28, 0x22, 0x8f, 0x4f, 0x56, 0x0e, 0x31, 0x1b, 0x97, 0x1f, 0x43, - 0x51, 0x2c, 0x77, 0x10, 0x28, 0x7f, 0x32, 0x50, 0x3e, 0x01, 0x68, 0x13, 0x8a, 0xab, 0x8d, 0xba, - 0x66, 0x38, 0x55, 0x57, 0x4b, 0x6d, 0x5b, 0xd1, 0xbd, 0x58, 0x5a, 0x5d, 0xc6, 0x98, 0x53, 0x90, - 0x0c, 0xc3, 0xe4, 0xb0, 0x45, 0x4c, 0xca, 0x3d, 0x62, 0xa4, 0x0e, 0x6c, 0x97, 0x1f, 0xf1, 0x11, - 0x2c, 0x28, 0xf2, 0x1f, 0xe7, 0xa0, 0x28, 0x96, 0xe3, 0x1c, 0x6e, 0x61, 0x6b, 0xa1, 0x5b, 0xd8, - 0x9b, 0xd9, 0x5c, 0x23, 0xf5, 0x0a, 0xb6, 0x15, 0xb9, 0x82, 0xdd, 0xc8, 0x88, 0x77, 0xf2, 0xfd, - 0xeb, 0xef, 0x24, 0x98, 0x08, 0x3b, 0x25, 0xba, 0x0b, 0xa3, 0x2c, 0xe1, 0xa8, 0x2d, 0xb2, 0xe1, - 0xd7, 0xb9, 0xde, 0x23, 0x4c, 0xd3, 0x27, 0xe1, 0x20, 0x1f, 0xea, 0x78, 0x62, 0xcc, 0x8f, 0xc4, - 0xa4, 0xd3, 0x97, 0xb4, 0x47, 0x55, 0xad, 0xea, 0x7c, 0x5a, 0xa9, 0xae, 0xea, 0x74, 0xd3, 0x6a, - 0x52, 0x4b, 0xd5, 0x3b, 0x31, 0x45, 0xdc, 0x29, 0x83, 0xc8, 0xf2, 0x3f, 0x48, 0x30, 0x2a, 0x4c, - 0x3e, 0x87, 0x5b, 0xc5, 0x6f, 0x84, 0x6f, 0x15, 0xd7, 0x32, 0x1e, 0xf0, 0xe4, 0x2b, 0xc5, 0x5f, - 0xf9, 0xa6, 0xb3, 0x23, 0xcd, 0xbc, 0x7a, 0xcf, 0xb0, 0x69, 0xd4, 0xab, 0xd9, 0x61, 0xc4, 0x9c, - 0x82, 0x7a, 0x30, 0xa5, 0x46, 0x62, 0x80, 0x58, 0xda, 0x5a, 0x36, 0x4b, 0x3c, 0xb1, 0x7a, 0x59, - 0xc0, 0x4f, 0x45, 0x29, 0x38, 0xa6, 0x42, 0x26, 0x10, 0xe3, 0x42, 0xef, 0x43, 0x61, 0x8f, 0x52, - 0x33, 0xe1, 0xbd, 0x7a, 0x40, 0xe4, 0xf1, 0x4d, 0x28, 0xf1, 0xd9, 0x6d, 0x6d, 0x35, 0x30, 0x87, - 0x92, 0xff, 0xc7, 0x5f, 0x8f, 0xa6, 0xe3, 0xe3, 0x5e, 0x3c, 0x95, 0xce, 0x12, 0x4f, 0x47, 0x93, - 0x62, 0x29, 0x7a, 0x02, 0x79, 0xaa, 0x65, 0xbd, 0x16, 0x0a, 0xc4, 0xad, 0xb5, 0xa6, 0x1f, 0x90, - 0xb6, 0xd6, 0x9a, 0x98, 0x41, 0xa0, 0x4d, 0x18, 0x62, 0xd9, 0x87, 0x1d, 0xc1, 0x7c, 0xf6, 0x23, - 0xcd, 0xe6, 0xef, 0x3b, 0x04, 0xfb, 0x65, 0x63, 0x07, 0x47, 0xfe, 0x14, 0xc6, 0x43, 0xe7, 0x14, - 0x7d, 0x02, 0x63, 0x9a, 0xa1, 0xb4, 0xeb, 0x8a, 0xa6, 0xe8, 0x2d, 0xe2, 0x7e, 0x1c, 0xb8, 0x96, - 0x74, 0xc3, 0x58, 0x0b, 0xf0, 0x89, 0x53, 0x3e, 0x2b, 0x94, 0x8c, 0x05, 0x69, 0x38, 0x84, 0x28, - 0x2b, 0x00, 0xfe, 0x1c, 0x51, 0x05, 0x86, 0x98, 0x9f, 0x39, 0xf9, 0x64, 0xa4, 0x3e, 0xc2, 0x2c, - 0x64, 0xee, 0x67, 0x63, 0x67, 0x1c, 0xdd, 0x06, 0xb0, 0x49, 0xcb, 0x22, 0x94, 0x07, 0x83, 0x5c, - 0xf8, 0x03, 0x63, 0xd3, 0xa3, 0xe0, 0x00, 0x97, 0xfc, 0x4f, 0x12, 0x8c, 0x6f, 0x10, 0xfa, 0x99, - 0x61, 0xed, 0x37, 0x0c, 0x4d, 0x6d, 0xf5, 0xcf, 0x21, 0xd8, 0xe2, 0x50, 0xb0, 0x7d, 0x6b, 0xc0, - 0xce, 0x84, 0xac, 0x4b, 0x0b, 0xb9, 0xf2, 0x57, 0x12, 0xcc, 0x87, 0x38, 0x1f, 0xf9, 0x47, 0x77, - 0x1b, 0x86, 0x4c, 0xc3, 0xa2, 0x6e, 0x22, 0x3e, 0x95, 0x42, 0x16, 0xc6, 0x02, 0xa9, 0x98, 0xc1, - 0x60, 0x07, 0x0d, 0xad, 0x41, 0x8e, 0x1a, 0xc2, 0x55, 0x4f, 0x87, 0x49, 0x88, 0x55, 0x07, 0x81, - 0x99, 0xdb, 0x32, 0x70, 0x8e, 0x1a, 0x6c, 0x23, 0xca, 0x21, 0xae, 0x60, 0xf0, 0x79, 0x45, 0x33, - 0xc0, 0x50, 0xd8, 0xb5, 0x8c, 0xee, 0x99, 0xe7, 0xe0, 0x6d, 0xc4, 0x8a, 0x65, 0x74, 0x31, 0xc7, - 0x92, 0xbf, 0x96, 0x60, 0x3a, 0xc4, 0x79, 0x0e, 0x81, 0xff, 0xfd, 0x70, 0xe0, 0xbf, 0x71, 0x9a, - 0x89, 0xa4, 0x84, 0xff, 0xaf, 0x73, 0x91, 0x69, 0xb0, 0x09, 0xa3, 0x5d, 0x18, 0x35, 0x8d, 0x76, - 0xf3, 0x25, 0x7c, 0x0e, 0x9c, 0x64, 0x79, 0xb3, 0xe1, 0x63, 0xe1, 0x20, 0x30, 0x3a, 0x84, 0x69, - 0x5d, 0xe9, 0x12, 0xdb, 0x54, 0x5a, 0xa4, 0xf9, 0x12, 0x1e, 0x48, 0x2e, 0xf2, 0xef, 0x0d, 0x51, - 0x44, 0x1c, 0x57, 0x82, 0xd6, 0xa1, 0xa8, 0x9a, 0xbc, 0x8e, 0x13, 0xb5, 0xcb, 0xc0, 0x2c, 0xea, - 0x54, 0x7d, 0x4e, 0x3c, 0x17, 0x3f, 0xb0, 0x8b, 0x21, 0xff, 0x75, 0xd4, 0x1b, 0x98, 0xff, 0xa1, - 0xc7, 0x50, 0xe2, 0x8d, 0x19, 0x2d, 0x43, 0x73, 0xbf, 0x0c, 0xb0, 0x9d, 0x6d, 0x88, 0xb1, 0x17, - 0x47, 0x95, 0xcb, 0x09, 0x8f, 0xbe, 0x2e, 0x19, 0x7b, 0xc2, 0x68, 0x03, 0x0a, 0xe6, 0x8f, 0xa9, - 0x60, 0x78, 0x92, 0xe3, 0x65, 0x0b, 0xc7, 0x91, 0x7f, 0x2f, 0x1f, 0x31, 0x97, 0xa7, 0xba, 0x67, - 0x2f, 0x6d, 0xd7, 0xbd, 0x8a, 0x29, 0x75, 0xe7, 0x77, 0xa0, 0x28, 0x32, 0xbc, 0x70, 0xe6, 0x5f, - 0x9c, 0xc6, 0x99, 0x83, 0x59, 0xcc, 0xbb, 0xb0, 0xb8, 0x83, 0x2e, 0x30, 0xfa, 0x18, 0x86, 0x89, - 0xa3, 0xc2, 0xc9, 0x8d, 0xf7, 0x4e, 0xa3, 0xc2, 0x8f, 0xab, 0x7e, 0xa1, 0x2a, 0xc6, 0x04, 0x2a, - 0x7a, 0x87, 0xad, 0x17, 0xe3, 0x65, 0x97, 0x40, 0xbb, 0x5c, 0xe0, 0xe9, 0xea, 0x8a, 0x33, 0x6d, - 0x6f, 0xf8, 0xc5, 0x51, 0x05, 0xfc, 0x9f, 0x38, 0x28, 0x21, 0xff, 0x8b, 0x04, 0xd3, 0x7c, 0x85, - 0x5a, 0x3d, 0x4b, 0xa5, 0xfd, 0x73, 0x4b, 0x4c, 0x4f, 0x43, 0x89, 0xe9, 0xce, 0x80, 0x65, 0x89, - 0x59, 0x98, 0x9a, 0x9c, 0xbe, 0x91, 0xe0, 0x62, 0x8c, 0xfb, 0x1c, 0xe2, 0xe2, 0x76, 0x38, 0x2e, - 0xbe, 0x75, 0xda, 0x09, 0xa5, 0xc4, 0xc6, 0xff, 0x9a, 0x4e, 0x98, 0x0e, 0x3f, 0x29, 0xb7, 0x01, - 0x4c, 0x4b, 0x3d, 0x50, 0x35, 0xd2, 0x11, 0x1f, 0xc1, 0x4b, 0x81, 0x16, 0x27, 0x8f, 0x82, 0x03, - 0x5c, 0xc8, 0x86, 0xb9, 0x36, 0xd9, 0x55, 0x7a, 0x1a, 0x5d, 0x6c, 0xb7, 0x97, 0x14, 0x53, 0xd9, - 0x51, 0x35, 0x95, 0xaa, 0xe2, 0xb9, 0x60, 0xa4, 0xfe, 0xd0, 0xf9, 0x38, 0x9d, 0xc4, 0xf1, 0xe2, - 0xa8, 0x72, 0x25, 0xe9, 0xeb, 0x90, 0xcb, 0xd2, 0xc7, 0x29, 0xd0, 0xa8, 0x0f, 0x65, 0x8b, 0x7c, - 0xda, 0x53, 0x2d, 0xd2, 0x5e, 0xb6, 0x0c, 0x33, 0xa4, 0x36, 0xcf, 0xd5, 0xfe, 0xfa, 0xf1, 0x51, - 0xa5, 0x8c, 0x53, 0x78, 0x06, 0x2b, 0x4e, 0x85, 0x47, 0xcf, 0x60, 0x46, 0x11, 0xcd, 0x68, 0x41, - 0xad, 0xce, 0x29, 0xb9, 0x7f, 0x7c, 0x54, 0x99, 0x59, 0x8c, 0x93, 0x07, 0x2b, 0x4c, 0x02, 0x45, - 0x35, 0x28, 0x1e, 0xf0, 0xbe, 0x35, 0xbb, 0x3c, 0xc4, 0xf1, 0x59, 0x22, 0x28, 0x3a, 0xad, 0x6c, - 0x0c, 0x73, 0x78, 0xa5, 0xc9, 0x4f, 0x9f, 0xcb, 0xc5, 0x2e, 0x94, 0xac, 0x96, 0x14, 0x27, 0x9e, - 0xbf, 0x18, 0x97, 0xfc, 0xa8, 0xf5, 0xc4, 0x27, 0xe1, 0x20, 0x1f, 0xfa, 0x08, 0x46, 0xf6, 0xc4, - 0xab, 0x84, 0x5d, 0x2e, 0x66, 0x4a, 0xc2, 0xa1, 0x57, 0x8c, 0xfa, 0xb4, 0x50, 0x31, 0xe2, 0x0e, - 0xdb, 0xd8, 0x47, 0x44, 0x6f, 0x40, 0x91, 0xff, 0x58, 0x5d, 0xe6, 0xcf, 0x71, 0x25, 0x3f, 0xb6, - 0x3d, 0x71, 0x86, 0xb1, 0x4b, 0x77, 0x59, 0x57, 0x1b, 0x4b, 0xfc, 0x59, 0x38, 0xc2, 0xba, 0xda, - 0x58, 0xc2, 0x2e, 0x1d, 0x7d, 0x02, 0x45, 0x9b, 0xac, 0xa9, 0x7a, 0xef, 0xb0, 0x0c, 0x99, 0x3e, - 0x2a, 0x37, 0x1f, 0x71, 0xee, 0xc8, 0xc3, 0x98, 0xaf, 0x41, 0xd0, 0xb1, 0x0b, 0x8b, 0xf6, 0x60, - 0xc4, 0xea, 0xe9, 0x8b, 0xf6, 0xb6, 0x4d, 0xac, 0xf2, 0x28, 0xd7, 0x31, 0x28, 0x9c, 0x63, 0x97, - 0x3f, 0xaa, 0xc5, 0x5b, 0x21, 0x8f, 0x03, 0xfb, 0xe0, 0x68, 0x0f, 0x80, 0xff, 0xe0, 0x6f, 0x70, - 0xe5, 0x39, 0xae, 0xea, 0x7e, 0x16, 0x55, 0x49, 0x4f, 0x7d, 0xe2, 0x1d, 0xde, 0x23, 0xe3, 0x00, - 0x36, 0xfa, 0x43, 0x09, 0x90, 0xdd, 0x33, 0x4d, 0x8d, 0x74, 0x89, 0x4e, 0x15, 0x8d, 0x8f, 0xda, - 0xe5, 0x31, 0xae, 0xf2, 0xdd, 0x41, 0x2b, 0x18, 0x13, 0x8c, 0xaa, 0xf6, 0x9e, 0xd7, 0xe3, 0xac, - 0x38, 0x41, 0x2f, 0xdb, 0xc4, 0x5d, 0x31, 0xeb, 0xf1, 0x4c, 0x9b, 0x98, 0xfc, 0xba, 0xe9, 0x6f, - 0xa2, 0xa0, 0x63, 0x17, 0x16, 0x3d, 0x85, 0x39, 0xb7, 0xc1, 0x12, 0x1b, 0x06, 0x5d, 0x51, 0x35, - 0x62, 0xf7, 0x6d, 0x4a, 0xba, 0xe5, 0x09, 0xee, 0x60, 0x5e, 0x97, 0x09, 0x4e, 0xe4, 0xc2, 0x29, - 0xd2, 0xa8, 0x0b, 0x15, 0x37, 0x38, 0xb1, 0x93, 0xeb, 0x45, 0xc7, 0x47, 0x76, 0x4b, 0xd1, 0x9c, - 0x2f, 0x0e, 0x93, 0x5c, 0xc1, 0xeb, 0xc7, 0x47, 0x95, 0xca, 0xf2, 0xc9, 0xac, 0x78, 0x10, 0x16, - 0xfa, 0x00, 0xca, 0x4a, 0x9a, 0x9e, 0x29, 0xae, 0xe7, 0x35, 0x16, 0xf1, 0x52, 0x15, 0xa4, 0x4a, - 0x23, 0x0a, 0x53, 0x4a, 0xb8, 0xd5, 0xd5, 0x2e, 0x4f, 0x67, 0x7a, 0xf2, 0x8c, 0x74, 0xc8, 0xfa, - 0xcf, 0x1e, 0x11, 0x82, 0x8d, 0x63, 0x1a, 0xd0, 0xef, 0x00, 0x52, 0xa2, 0xdd, 0xb9, 0x76, 0x19, - 0x65, 0x4a, 0x74, 0xb1, 0xb6, 0x5e, 0xdf, 0xed, 0x62, 0x24, 0x1b, 0x27, 0xe8, 0x61, 0x05, 0xba, - 0x12, 0xe9, 0x28, 0xb6, 0xcb, 0xf3, 0x5c, 0x79, 0x2d, 0x9b, 0x72, 0x4f, 0x2e, 0xf0, 0x61, 0x25, - 0x8a, 0x88, 0xe3, 0x4a, 0xd0, 0x1a, 0xcc, 0x8a, 0xc1, 0x6d, 0xdd, 0x56, 0x76, 0x49, 0xb3, 0x6f, - 0xb7, 0xa8, 0x66, 0x97, 0x67, 0x78, 0x7c, 0xe7, 0x1f, 0xf7, 0x16, 0x13, 0xe8, 0x38, 0x51, 0x0a, - 0xbd, 0x0b, 0x53, 0xbb, 0x86, 0xb5, 0xa3, 0xb6, 0xdb, 0x44, 0x77, 0x91, 0x66, 0x39, 0xd2, 0x2c, - 0xdb, 0x87, 0x95, 0x08, 0x0d, 0xc7, 0xb8, 0x91, 0x0d, 0x17, 0x05, 0x72, 0xc3, 0x32, 0x5a, 0xeb, - 0x46, 0x4f, 0xa7, 0x4e, 0xd9, 0x77, 0xd1, 0x4b, 0xa3, 0x17, 0x17, 0x93, 0x18, 0x5e, 0x1c, 0x55, - 0xae, 0x26, 0x57, 0xf9, 0x3e, 0x13, 0x4e, 0xc6, 0x46, 0x26, 0x8c, 0x89, 0x3e, 0xf1, 0x25, 0x4d, - 0xb1, 0xed, 0x72, 0x99, 0x1f, 0xfd, 0x07, 0x83, 0x03, 0x9e, 0x27, 0x12, 0x3d, 0xff, 0x53, 0xc7, - 0x47, 0x95, 0xb1, 0x20, 0x03, 0x0e, 0x69, 0xe0, 0x7d, 0x41, 0xe2, 0x6b, 0xd4, 0xf9, 0xf4, 0x56, - 0x9f, 0xae, 0x2f, 0xc8, 0x37, 0xed, 0xa5, 0xf5, 0x05, 0x05, 0x20, 0x4f, 0x7e, 0x97, 0xfe, 0xcf, - 0x1c, 0xcc, 0xf8, 0xcc, 0x99, 0xfb, 0x82, 0x12, 0x44, 0xfe, 0xbf, 0xbf, 0x3a, 0x5b, 0xaf, 0x8e, - 0xbf, 0x74, 0xff, 0xf7, 0x7a, 0x75, 0x7c, 0xdb, 0x52, 0x6e, 0x0f, 0x7f, 0x9b, 0x0b, 0x4e, 0xe0, - 0x94, 0x0d, 0x23, 0x2f, 0xa1, 0xc5, 0xf8, 0x27, 0xd7, 0x73, 0x22, 0x7f, 0x93, 0x87, 0xa9, 0xe8, - 0x69, 0x0c, 0xf5, 0x15, 0x48, 0x03, 0xfb, 0x0a, 0x1a, 0x30, 0xbb, 0xdb, 0xd3, 0xb4, 0x3e, 0x9f, - 0x43, 0xa0, 0xb9, 0xc0, 0xf9, 0x2e, 0xf8, 0x9a, 0x90, 0x9c, 0x5d, 0x49, 0xe0, 0xc1, 0x89, 0x92, - 0xf1, 0x36, 0x83, 0xc2, 0x8f, 0x6d, 0x33, 0x18, 0x3a, 0x43, 0x9b, 0x41, 0x72, 0xa7, 0x46, 0xfe, - 0x4c, 0x9d, 0x1a, 0x67, 0xe9, 0x31, 0x48, 0x08, 0x62, 0x03, 0xfb, 0x65, 0x5f, 0x83, 0x4b, 0x42, - 0x8c, 0xf2, 0xde, 0x01, 0x9d, 0x5a, 0x86, 0xa6, 0x11, 0x6b, 0xb9, 0xd7, 0xed, 0xf6, 0xe5, 0x5f, - 0xc2, 0x44, 0xb8, 0x2b, 0xc6, 0xd9, 0x69, 0xa7, 0x31, 0x47, 0x7c, 0x9d, 0x0d, 0xec, 0xb4, 0x33, - 0x8e, 0x3d, 0x0e, 0xf9, 0xf7, 0x25, 0x98, 0x4b, 0xee, 0x7e, 0x45, 0x1a, 0x4c, 0x74, 0x95, 0xc3, - 0x60, 0x47, 0xb2, 0x74, 0xc6, 0x77, 0x33, 0xde, 0x0e, 0xb1, 0x1e, 0xc2, 0xc2, 0x11, 0x6c, 0xf9, - 0x07, 0x09, 0xe6, 0x53, 0x1a, 0x11, 0xce, 0xd7, 0x12, 0xf4, 0x21, 0x94, 0xba, 0xca, 0x61, 0xb3, - 0x67, 0x75, 0xc8, 0x99, 0x5f, 0x0a, 0xf9, 0x71, 0x5f, 0x17, 0x28, 0xd8, 0xc3, 0x93, 0xff, 0x52, - 0x82, 0x9f, 0xa5, 0x5e, 0xa4, 0xd0, 0xbd, 0x50, 0xcf, 0x84, 0x1c, 0xe9, 0x99, 0x40, 0x71, 0xc1, - 0x57, 0xd4, 0x32, 0xf1, 0x85, 0x04, 0xe5, 0xb4, 0x9b, 0x25, 0xba, 0x1b, 0x32, 0xf2, 0xe7, 0x11, - 0x23, 0xa7, 0x63, 0x72, 0xaf, 0xc8, 0xc6, 0x7f, 0x95, 0xe0, 0xf2, 0x09, 0x15, 0x9a, 0x77, 0x81, - 0x21, 0xed, 0x20, 0x17, 0x7f, 0xd4, 0x16, 0x5f, 0xc4, 0xfc, 0x0b, 0x4c, 0x02, 0x0f, 0x4e, 0x95, - 0x46, 0xdb, 0x30, 0x2f, 0x6e, 0x4f, 0x51, 0x9a, 0x28, 0x3e, 0x78, 0x6b, 0xd9, 0x72, 0x32, 0x0b, - 0x4e, 0x93, 0x95, 0xff, 0x46, 0x82, 0xb9, 0xe4, 0x27, 0x03, 0xf4, 0x76, 0x68, 0xc9, 0x2b, 0x91, - 0x25, 0x9f, 0x8c, 0x48, 0x89, 0x05, 0xff, 0x18, 0x26, 0xc4, 0xc3, 0x82, 0x80, 0x11, 0xce, 0x2c, - 0x27, 0xe5, 0x17, 0x01, 0xe1, 0x96, 0xb7, 0xfc, 0x98, 0x84, 0xc7, 0x70, 0x04, 0x4d, 0xfe, 0x83, - 0x1c, 0x0c, 0x35, 0x5b, 0x8a, 0x46, 0xce, 0xa1, 0xba, 0x7d, 0x2f, 0x54, 0xdd, 0x0e, 0xfa, 0xa7, - 0x2d, 0x6e, 0x55, 0x6a, 0x61, 0x8b, 0x23, 0x85, 0xed, 0x9b, 0x99, 0xd0, 0x4e, 0xae, 0x69, 0x7f, - 0x0d, 0x46, 0x3c, 0xa5, 0xa7, 0x4b, 0xb5, 0xf2, 0x5f, 0xe4, 0x60, 0x34, 0xa0, 0xe2, 0x94, 0x89, - 0x7a, 0x37, 0x54, 0x9d, 0xe4, 0x33, 0x3c, 0xe3, 0x04, 0x74, 0x55, 0xdd, 0x7a, 0xc4, 0x69, 0x3a, - 0xf6, 0xdb, 0x4c, 0xe3, 0x65, 0xca, 0x2f, 0x61, 0x82, 0x2a, 0x56, 0x87, 0x50, 0xef, 0xb3, 0x46, - 0x9e, 0xfb, 0xa2, 0xd7, 0xfd, 0xbe, 0x15, 0xa2, 0xe2, 0x08, 0xf7, 0xa5, 0x87, 0x30, 0x1e, 0x52, - 0x76, 0xaa, 0x9e, 0xe1, 0xbf, 0x97, 0xe0, 0xe7, 0x03, 0x9f, 0x82, 0x50, 0x3d, 0x74, 0x48, 0xaa, - 0x91, 0x43, 0xb2, 0x90, 0x0e, 0xf0, 0xea, 0x7a, 0xcf, 0xea, 0x37, 0x9f, 0x7f, 0xbf, 0x70, 0xe1, - 0xdb, 0xef, 0x17, 0x2e, 0x7c, 0xf7, 0xfd, 0xc2, 0x85, 0xdf, 0x3d, 0x5e, 0x90, 0x9e, 0x1f, 0x2f, - 0x48, 0xdf, 0x1e, 0x2f, 0x48, 0xdf, 0x1d, 0x2f, 0x48, 0xff, 0x7e, 0xbc, 0x20, 0xfd, 0xc9, 0x0f, - 0x0b, 0x17, 0x3e, 0x2c, 0x0a, 0xb8, 0xff, 0x0d, 0x00, 0x00, 0xff, 0xff, 0xa0, 0x62, 0xda, 0xf9, - 0x07, 0x3e, 0x00, 0x00, + // 3743 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x5b, 0x4d, 0x6c, 0x1c, 0xc7, + 0x72, 0xd6, 0xec, 0x2e, 0xb9, 0xcb, 0xe2, 0x7f, 0x93, 0x22, 0xf7, 0x49, 0x4f, 0x5c, 0xbd, 0x31, + 0xa0, 0xc8, 0x8e, 0xb4, 0x6b, 0xc9, 0x92, 0x9e, 0x22, 0x21, 0xef, 0x99, 0x4b, 0x8a, 0x12, 0x5f, + 0xf8, 0xb3, 0xee, 0x25, 0x65, 0xc3, 0x88, 0x1d, 0x0f, 0x77, 0x9b, 0xcb, 0x11, 0x67, 0x67, 0xc6, + 0xd3, 0xb3, 0x34, 0x17, 0xc8, 0x21, 0x87, 0x20, 0x80, 0x81, 0x00, 0xc9, 0xc5, 0x49, 0x8e, 0x31, + 0x02, 0xe4, 0x94, 0x20, 0xc7, 0xe4, 0x60, 0x18, 0x09, 0xe2, 0x00, 0x42, 0xe0, 0x04, 0xbe, 0xc5, + 0x27, 0x22, 0xa6, 0x4f, 0x41, 0x4e, 0xb9, 0x05, 0x3a, 0x05, 0xdd, 0xd3, 0xf3, 0x3f, 0xc3, 0x1d, + 0xd2, 0x12, 0x11, 0x03, 0xef, 0x24, 0x6e, 0x57, 0xd5, 0x57, 0xd5, 0xdd, 0xd5, 0x55, 0xd5, 0x3d, + 0x25, 0x58, 0xd9, 0xbf, 0x4f, 0xab, 0xaa, 0x51, 0xdb, 0xef, 0xed, 0x10, 0x4b, 0x27, 0x36, 0xa1, + 0xb5, 0x03, 0xa2, 0xb7, 0x0d, 0xab, 0x26, 0x08, 0x8a, 0xa9, 0xd6, 0xc8, 0xa1, 0x4d, 0x74, 0xaa, + 0x1a, 0x3a, 0xad, 0x1d, 0xdc, 0xda, 0x21, 0xb6, 0x72, 0xab, 0xd6, 0x21, 0x3a, 0xb1, 0x14, 0x9b, + 0xb4, 0xab, 0xa6, 0x65, 0xd8, 0x06, 0xba, 0xe2, 0xb0, 0x57, 0x15, 0x53, 0xad, 0xfa, 0xec, 0x55, + 0xc1, 0x7e, 0xe9, 0x66, 0x47, 0xb5, 0xf7, 0x7a, 0x3b, 0xd5, 0x96, 0xd1, 0xad, 0x75, 0x8c, 0x8e, + 0x51, 0xe3, 0x52, 0x3b, 0xbd, 0x5d, 0xfe, 0x8b, 0xff, 0xe0, 0x7f, 0x39, 0x68, 0x97, 0xe4, 0x80, + 0xf2, 0x96, 0x61, 0x91, 0xda, 0x41, 0x4c, 0xe3, 0xa5, 0x3b, 0x3e, 0x4f, 0x57, 0x69, 0xed, 0xa9, + 0x3a, 0xb1, 0xfa, 0x35, 0x73, 0xbf, 0xc3, 0x06, 0x68, 0xad, 0x4b, 0x6c, 0x25, 0x49, 0xaa, 0x96, + 0x26, 0x65, 0xf5, 0x74, 0x5b, 0xed, 0x92, 0x98, 0xc0, 0xbd, 0x41, 0x02, 0xb4, 0xb5, 0x47, 0xba, + 0x4a, 0x4c, 0xee, 0xad, 0x34, 0xb9, 0x9e, 0xad, 0x6a, 0x35, 0x55, 0xb7, 0xa9, 0x6d, 0x45, 0x85, + 0xe4, 0x3b, 0x30, 0xb5, 0xa8, 0x69, 0xc6, 0x27, 0xa4, 0xbd, 0xd4, 0x5c, 0x5d, 0xb6, 0xd4, 0x03, + 0x62, 0xa1, 0xab, 0x50, 0xd0, 0x95, 0x2e, 0x29, 0x4b, 0x57, 0xa5, 0xeb, 0x23, 0xf5, 0xb1, 0xe7, + 0x47, 0x95, 0x0b, 0xc7, 0x47, 0x95, 0xc2, 0x86, 0xd2, 0x25, 0x98, 0x53, 0xe4, 0x87, 0x30, 0x2d, + 0xa4, 0x56, 0x34, 0x72, 0xf8, 0xd4, 0xd0, 0x7a, 0x5d, 0x82, 0xae, 0xc1, 0x70, 0x9b, 0x03, 0x08, + 0xc1, 0x09, 0x21, 0x38, 0xec, 0xc0, 0x62, 0x41, 0x95, 0x29, 0x4c, 0x0a, 0xe1, 0x27, 0x06, 0xb5, + 0x1b, 0x8a, 0xbd, 0x87, 0x6e, 0x03, 0x98, 0x8a, 0xbd, 0xd7, 0xb0, 0xc8, 0xae, 0x7a, 0x28, 0xc4, + 0x91, 0x10, 0x87, 0x86, 0x47, 0xc1, 0x01, 0x2e, 0x74, 0x03, 0x4a, 0x16, 0x51, 0xda, 0x9b, 0xba, + 0xd6, 0x2f, 0xe7, 0xae, 0x4a, 0xd7, 0x4b, 0xf5, 0x29, 0x21, 0x51, 0xc2, 0x62, 0x1c, 0x7b, 0x1c, + 0xf2, 0x67, 0x39, 0x18, 0x59, 0x56, 0x48, 0xd7, 0xd0, 0x9b, 0xc4, 0x46, 0x1f, 0x41, 0x89, 0x6d, + 0x57, 0x5b, 0xb1, 0x15, 0xae, 0x6d, 0xf4, 0xf6, 0x9b, 0x55, 0xdf, 0x9d, 0xbc, 0xd5, 0xab, 0x9a, + 0xfb, 0x1d, 0x36, 0x40, 0xab, 0x8c, 0xbb, 0x7a, 0x70, 0xab, 0xba, 0xb9, 0xf3, 0x8c, 0xb4, 0xec, + 0x75, 0x62, 0x2b, 0xbe, 0x7d, 0xfe, 0x18, 0xf6, 0x50, 0xd1, 0x06, 0x14, 0xa8, 0x49, 0x5a, 0xdc, + 0xb2, 0xd1, 0xdb, 0x37, 0xaa, 0x27, 0x3a, 0x6b, 0xd5, 0xb3, 0xac, 0x69, 0x92, 0x96, 0xbf, 0xe2, + 0xec, 0x17, 0xe6, 0x38, 0xe8, 0x29, 0x0c, 0x53, 0x5b, 0xb1, 0x7b, 0xb4, 0x9c, 0xe7, 0x88, 0xd5, + 0xcc, 0x88, 0x5c, 0xca, 0xdf, 0x0c, 0xe7, 0x37, 0x16, 0x68, 0xf2, 0x7f, 0xe5, 0x00, 0x79, 0xbc, + 0x4b, 0x86, 0xde, 0x56, 0x6d, 0xd5, 0xd0, 0xd1, 0x03, 0x28, 0xd8, 0x7d, 0xd3, 0x75, 0x81, 0x6b, + 0xae, 0x41, 0x5b, 0x7d, 0x93, 0xbc, 0x38, 0xaa, 0xcc, 0xc5, 0x25, 0x18, 0x05, 0x73, 0x19, 0xb4, + 0xe6, 0x99, 0x9a, 0xe3, 0xd2, 0x77, 0xc2, 0xaa, 0x5f, 0x1c, 0x55, 0x12, 0x0e, 0x5b, 0xd5, 0x43, + 0x0a, 0x1b, 0x88, 0x0e, 0x00, 0x69, 0x0a, 0xb5, 0xb7, 0x2c, 0x45, 0xa7, 0x8e, 0x26, 0xb5, 0x4b, + 0xc4, 0x22, 0xbc, 0x91, 0x6d, 0xd3, 0x98, 0x44, 0xfd, 0x92, 0xb0, 0x02, 0xad, 0xc5, 0xd0, 0x70, + 0x82, 0x06, 0xe6, 0xcd, 0x16, 0x51, 0xa8, 0xa1, 0x97, 0x0b, 0x61, 0x6f, 0xc6, 0x7c, 0x14, 0x0b, + 0x2a, 0x7a, 0x1d, 0x8a, 0x5d, 0x42, 0xa9, 0xd2, 0x21, 0xe5, 0x21, 0xce, 0x38, 0x29, 0x18, 0x8b, + 0xeb, 0xce, 0x30, 0x76, 0xe9, 0xf2, 0x17, 0x12, 0x8c, 0x7b, 0x2b, 0xb7, 0xa6, 0x52, 0x1b, 0xfd, + 0x6e, 0xcc, 0x0f, 0xab, 0xd9, 0xa6, 0xc4, 0xa4, 0xb9, 0x17, 0x7a, 0x3e, 0xef, 0x8e, 0x04, 0x7c, + 0x70, 0x1d, 0x86, 0x54, 0x9b, 0x74, 0xd9, 0x3e, 0xe4, 0xaf, 0x8f, 0xde, 0xbe, 0x9e, 0xd5, 0x65, + 0xea, 0xe3, 0x02, 0x74, 0x68, 0x95, 0x89, 0x63, 0x07, 0x45, 0xfe, 0xb3, 0x42, 0xc0, 0x7c, 0xe6, + 0x9a, 0xe8, 0x03, 0x28, 0x51, 0xa2, 0x91, 0x96, 0x6d, 0x58, 0xc2, 0xfc, 0xb7, 0x32, 0x9a, 0xaf, + 0xec, 0x10, 0xad, 0x29, 0x44, 0xeb, 0x63, 0xcc, 0x7e, 0xf7, 0x17, 0xf6, 0x20, 0xd1, 0x3b, 0x50, + 0xb2, 0x49, 0xd7, 0xd4, 0x14, 0x9b, 0x88, 0x73, 0xf4, 0x5a, 0x70, 0x0a, 0xcc, 0x73, 0x18, 0x58, + 0xc3, 0x68, 0x6f, 0x09, 0x36, 0x7e, 0x7c, 0xbc, 0x25, 0x71, 0x47, 0xb1, 0x07, 0x83, 0x0e, 0x60, + 0xa2, 0x67, 0xb6, 0x19, 0xa7, 0xcd, 0xa2, 0x60, 0xa7, 0x2f, 0x3c, 0xe9, 0x5e, 0xd6, 0xb5, 0xd9, + 0x0e, 0x49, 0xd7, 0xe7, 0x84, 0xae, 0x89, 0xf0, 0x38, 0x8e, 0x68, 0x41, 0x8b, 0x30, 0xd9, 0x55, + 0x75, 0x16, 0x97, 0xfa, 0x4d, 0xd2, 0x32, 0xf4, 0x36, 0xe5, 0x6e, 0x35, 0x54, 0x9f, 0x17, 0x00, + 0x93, 0xeb, 0x61, 0x32, 0x8e, 0xf2, 0xa3, 0x5f, 0x01, 0x72, 0xa7, 0xf1, 0xd8, 0x09, 0xe2, 0xaa, + 0xa1, 0x73, 0x9f, 0xcb, 0xfb, 0xce, 0xbd, 0x15, 0xe3, 0xc0, 0x09, 0x52, 0x68, 0x0d, 0x66, 0x2d, + 0x72, 0xa0, 0xb2, 0x39, 0x3e, 0x51, 0xa9, 0x6d, 0x58, 0xfd, 0x35, 0xb5, 0xab, 0xda, 0xe5, 0x61, + 0x6e, 0x53, 0xf9, 0xf8, 0xa8, 0x32, 0x8b, 0x13, 0xe8, 0x38, 0x51, 0x4a, 0xfe, 0xf3, 0x61, 0x98, + 0x8c, 0xc4, 0x1b, 0xf4, 0x14, 0xe6, 0x5a, 0x3d, 0xcb, 0x22, 0xba, 0xbd, 0xd1, 0xeb, 0xee, 0x10, + 0xab, 0xd9, 0xda, 0x23, 0xed, 0x9e, 0x46, 0xda, 0xdc, 0x51, 0x86, 0xea, 0x0b, 0xc2, 0xe2, 0xb9, + 0xa5, 0x44, 0x2e, 0x9c, 0x22, 0xcd, 0x56, 0x41, 0xe7, 0x43, 0xeb, 0x2a, 0xa5, 0x1e, 0x66, 0x8e, + 0x63, 0x7a, 0xab, 0xb0, 0x11, 0xe3, 0xc0, 0x09, 0x52, 0xcc, 0xc6, 0x36, 0xa1, 0xaa, 0x45, 0xda, + 0x51, 0x1b, 0xf3, 0x61, 0x1b, 0x97, 0x13, 0xb9, 0x70, 0x8a, 0x34, 0xba, 0x0b, 0xa3, 0x8e, 0x36, + 0xbe, 0x7f, 0x62, 0xa3, 0x67, 0x04, 0xd8, 0xe8, 0x86, 0x4f, 0xc2, 0x41, 0x3e, 0x36, 0x35, 0x63, + 0x87, 0x12, 0xeb, 0x80, 0xb4, 0xd3, 0x37, 0x78, 0x33, 0xc6, 0x81, 0x13, 0xa4, 0xd8, 0xd4, 0x1c, + 0x0f, 0x8c, 0x4d, 0x6d, 0x38, 0x3c, 0xb5, 0xed, 0x44, 0x2e, 0x9c, 0x22, 0xcd, 0xfc, 0xd8, 0x31, + 0x79, 0xf1, 0x40, 0x51, 0x35, 0x65, 0x47, 0x23, 0xe5, 0x62, 0xd8, 0x8f, 0x37, 0xc2, 0x64, 0x1c, + 0xe5, 0x47, 0x8f, 0x61, 0xda, 0x19, 0xda, 0xd6, 0x15, 0x0f, 0xa4, 0xc4, 0x41, 0x7e, 0x22, 0x40, + 0xa6, 0x37, 0xa2, 0x0c, 0x38, 0x2e, 0x83, 0x1e, 0xc0, 0x44, 0xcb, 0xd0, 0x34, 0xee, 0x8f, 0x4b, + 0x46, 0x4f, 0xb7, 0xcb, 0x23, 0x1c, 0x05, 0xb1, 0xf3, 0xb8, 0x14, 0xa2, 0xe0, 0x08, 0x27, 0x22, + 0x00, 0x2d, 0x37, 0xe1, 0xd0, 0x32, 0xf0, 0xf8, 0x78, 0x2b, 0x6b, 0x0c, 0xf0, 0x52, 0x95, 0x5f, + 0x03, 0x78, 0x43, 0x14, 0x07, 0x80, 0xe5, 0x7f, 0x95, 0x60, 0x3e, 0x25, 0x74, 0xa0, 0x5f, 0x86, + 0x52, 0xec, 0x6f, 0x46, 0x52, 0xec, 0xe5, 0x14, 0xb1, 0x40, 0x9e, 0xd5, 0x61, 0xdc, 0x62, 0xb3, + 0xd2, 0x3b, 0x0e, 0x8b, 0x88, 0x91, 0x77, 0x07, 0x4c, 0x03, 0x07, 0x65, 0xfc, 0x98, 0x3f, 0x7d, + 0x7c, 0x54, 0x19, 0x0f, 0xd1, 0x70, 0x18, 0x5e, 0xfe, 0x8b, 0x1c, 0xc0, 0x32, 0x31, 0x35, 0xa3, + 0xdf, 0x25, 0xfa, 0x79, 0xd4, 0x50, 0x9b, 0xa1, 0x1a, 0xea, 0xe6, 0xa0, 0xed, 0xf1, 0x4c, 0x4b, + 0x2d, 0xa2, 0xde, 0x8d, 0x14, 0x51, 0xb5, 0xec, 0x90, 0x27, 0x57, 0x51, 0xff, 0x91, 0x87, 0x19, + 0x9f, 0xd9, 0x2f, 0xa3, 0x1e, 0x86, 0xf6, 0xf8, 0x37, 0x22, 0x7b, 0x3c, 0x9f, 0x20, 0xf2, 0xca, + 0xea, 0xa8, 0x67, 0x30, 0xc1, 0xaa, 0x1c, 0x67, 0x2f, 0x79, 0x0d, 0x35, 0x7c, 0xea, 0x1a, 0xca, + 0xcb, 0x76, 0x6b, 0x21, 0x24, 0x1c, 0x41, 0x4e, 0xa9, 0xd9, 0x8a, 0x3f, 0xc6, 0x9a, 0xed, 0x4b, + 0x09, 0x26, 0xfc, 0x6d, 0x3a, 0x87, 0xa2, 0x6d, 0x23, 0x5c, 0xb4, 0xbd, 0x9e, 0xd9, 0x45, 0x53, + 0xaa, 0xb6, 0xff, 0x65, 0x05, 0xbe, 0xc7, 0xc4, 0x0e, 0xf8, 0x8e, 0xd2, 0xda, 0x1f, 0x7c, 0xc7, + 0x43, 0x9f, 0x49, 0x80, 0x44, 0x16, 0x58, 0xd4, 0x75, 0xc3, 0x56, 0x9c, 0x58, 0xe9, 0x98, 0xb5, + 0x9a, 0xd9, 0x2c, 0x57, 0x63, 0x75, 0x3b, 0x86, 0xf5, 0x48, 0xb7, 0xad, 0xbe, 0xbf, 0xc9, 0x71, + 0x06, 0x9c, 0x60, 0x00, 0x52, 0x00, 0x2c, 0x81, 0xb9, 0x65, 0x88, 0x83, 0x7c, 0x33, 0x43, 0xcc, + 0x63, 0x02, 0x4b, 0x86, 0xbe, 0xab, 0x76, 0xfc, 0xb0, 0x83, 0x3d, 0x20, 0x1c, 0x00, 0xbd, 0xf4, + 0x08, 0xe6, 0x53, 0xac, 0x45, 0x53, 0x90, 0xdf, 0x27, 0x7d, 0x67, 0xd9, 0x30, 0xfb, 0x13, 0xcd, + 0xc2, 0xd0, 0x81, 0xa2, 0xf5, 0x9c, 0xf0, 0x3b, 0x82, 0x9d, 0x1f, 0x0f, 0x72, 0xf7, 0x25, 0xf9, + 0x8b, 0xa1, 0xa0, 0xef, 0xf0, 0x8a, 0xf9, 0x3a, 0xbb, 0xb4, 0x9a, 0x9a, 0xda, 0x52, 0xa8, 0x28, + 0x84, 0xc6, 0x9c, 0x0b, 0xab, 0x33, 0x86, 0x3d, 0x6a, 0xa8, 0xb6, 0xce, 0xbd, 0xda, 0xda, 0x3a, + 0xff, 0x72, 0x6a, 0xeb, 0xdf, 0x83, 0x12, 0x75, 0xab, 0xea, 0x02, 0x87, 0xbc, 0x75, 0x8a, 0xf8, + 0x2a, 0x0a, 0x6a, 0x4f, 0x81, 0x57, 0x4a, 0x7b, 0xa0, 0x49, 0x45, 0xf4, 0xd0, 0x29, 0x8b, 0xe8, + 0x97, 0x5a, 0xf8, 0xb2, 0x78, 0x63, 0x2a, 0x3d, 0x4a, 0xda, 0x3c, 0xb6, 0x95, 0xfc, 0x78, 0xd3, + 0xe0, 0xa3, 0x58, 0x50, 0xd1, 0x07, 0x21, 0x97, 0x2d, 0x9d, 0xc5, 0x65, 0x27, 0xd2, 0xdd, 0x15, + 0x6d, 0xc3, 0xbc, 0x69, 0x19, 0x1d, 0x8b, 0x50, 0xba, 0x4c, 0x94, 0xb6, 0xa6, 0xea, 0xc4, 0x5d, + 0x1f, 0xa7, 0x22, 0xba, 0x7c, 0x7c, 0x54, 0x99, 0x6f, 0x24, 0xb3, 0xe0, 0x34, 0x59, 0xf9, 0x79, + 0x01, 0xa6, 0xa2, 0x19, 0x30, 0xa5, 0x48, 0x95, 0xce, 0x54, 0xa4, 0xde, 0x08, 0x1c, 0x06, 0xa7, + 0x82, 0x0f, 0xbc, 0xe0, 0xc4, 0x0e, 0xc4, 0x22, 0x4c, 0x8a, 0x68, 0xe0, 0x12, 0x45, 0x99, 0xee, + 0xed, 0xfe, 0x76, 0x98, 0x8c, 0xa3, 0xfc, 0xe8, 0x21, 0x8c, 0x5b, 0xbc, 0xee, 0x76, 0x01, 0x9c, + 0xda, 0xf5, 0xa2, 0x00, 0x18, 0xc7, 0x41, 0x22, 0x0e, 0xf3, 0xb2, 0xba, 0xd5, 0x2f, 0x47, 0x5d, + 0x80, 0x42, 0xb8, 0x6e, 0x5d, 0x8c, 0x32, 0xe0, 0xb8, 0x0c, 0x5a, 0x87, 0x99, 0x9e, 0x1e, 0x87, + 0x72, 0x5c, 0xf9, 0xb2, 0x80, 0x9a, 0xd9, 0x8e, 0xb3, 0xe0, 0x24, 0x39, 0xb4, 0x1b, 0x2a, 0x65, + 0x87, 0x79, 0x78, 0xbe, 0x9d, 0xf9, 0xe0, 0x65, 0xae, 0x65, 0x13, 0xca, 0xed, 0x52, 0xd6, 0x72, + 0x5b, 0xfe, 0x27, 0x29, 0x98, 0x84, 0xbc, 0x12, 0x78, 0xd0, 0x2b, 0x53, 0x4c, 0x22, 0x50, 0x1d, + 0x19, 0xc9, 0xd5, 0xef, 0xbd, 0x53, 0x55, 0xbf, 0x7e, 0xf2, 0x1c, 0x5c, 0xfe, 0x7e, 0x2e, 0xc1, + 0xdc, 0x4a, 0xf3, 0xb1, 0x65, 0xf4, 0x4c, 0xd7, 0x9c, 0x4d, 0xd3, 0x59, 0x9a, 0x9f, 0x43, 0xc1, + 0xea, 0x69, 0xee, 0x3c, 0x5e, 0x73, 0xe7, 0x81, 0x7b, 0x1a, 0x9b, 0xc7, 0x4c, 0x44, 0xca, 0x99, + 0x04, 0x13, 0x40, 0x1b, 0x30, 0x6c, 0x29, 0x7a, 0x87, 0xb8, 0x69, 0xf5, 0xda, 0x00, 0xeb, 0x57, + 0x97, 0x31, 0x63, 0x0f, 0x14, 0x36, 0x5c, 0x1a, 0x0b, 0x14, 0xf9, 0x9f, 0x25, 0x98, 0x7c, 0xb2, + 0xb5, 0xd5, 0x58, 0xd5, 0xf9, 0x89, 0xe6, 0x6f, 0xab, 0x57, 0xa1, 0x60, 0x2a, 0xf6, 0x5e, 0x34, + 0xd3, 0x33, 0x1a, 0xe6, 0x14, 0x74, 0x07, 0x4a, 0xec, 0x5f, 0x66, 0x17, 0x3f, 0x52, 0x23, 0x3c, + 0x10, 0x96, 0x1a, 0x62, 0xec, 0x45, 0xe0, 0x6f, 0xec, 0x71, 0xa2, 0xf7, 0xa0, 0xc8, 0xe2, 0x0f, + 0xd1, 0xdb, 0x19, 0x0b, 0x74, 0x61, 0x54, 0xdd, 0x11, 0xf2, 0x6b, 0x2e, 0x31, 0x80, 0x5d, 0x38, + 0x79, 0x1f, 0x66, 0x03, 0x93, 0x60, 0xab, 0xf8, 0x94, 0xe5, 0x54, 0xd4, 0x84, 0x21, 0xa6, 0x9d, + 0x65, 0xce, 0x7c, 0x86, 0x27, 0xd0, 0xc8, 0x42, 0xf8, 0xf5, 0x11, 0xfb, 0x45, 0xb1, 0x83, 0x25, + 0xaf, 0xc3, 0x38, 0x7f, 0x86, 0x36, 0x2c, 0x9b, 0x2f, 0x26, 0xba, 0x02, 0xf9, 0xae, 0xaa, 0x8b, + 0xec, 0x3c, 0x2a, 0x64, 0xf2, 0x2c, 0xb3, 0xb0, 0x71, 0x4e, 0x56, 0x0e, 0x45, 0xbc, 0xf2, 0xc9, + 0xca, 0x21, 0x66, 0xe3, 0xf2, 0x63, 0x28, 0x8a, 0x4d, 0x0a, 0x02, 0xe5, 0x4f, 0x06, 0xca, 0x27, + 0x00, 0x6d, 0x42, 0x71, 0xb5, 0x51, 0xd7, 0x0c, 0xa7, 0x56, 0x6b, 0xa9, 0x6d, 0x2b, 0xba, 0x83, + 0x4b, 0xab, 0xcb, 0x18, 0x73, 0x0a, 0x92, 0x61, 0x98, 0x1c, 0xb6, 0x88, 0x69, 0x73, 0x3f, 0x1a, + 0xa9, 0x03, 0xf3, 0x8d, 0x47, 0x7c, 0x04, 0x0b, 0x8a, 0xfc, 0x27, 0x39, 0x28, 0x8a, 0xe5, 0x38, + 0x87, 0xbb, 0xdb, 0x5a, 0xe8, 0xee, 0xf6, 0x46, 0x36, 0xd7, 0x48, 0xbd, 0xb8, 0x6d, 0x45, 0x2e, + 0x6e, 0x37, 0x32, 0xe2, 0x9d, 0x7c, 0x6b, 0xfb, 0x34, 0x07, 0x13, 0x61, 0xa7, 0x44, 0x77, 0x61, + 0x94, 0xa5, 0x29, 0xb5, 0x45, 0x36, 0xfc, 0xea, 0xd8, 0x7b, 0xba, 0x69, 0xfa, 0x24, 0x1c, 0xe4, + 0x43, 0x1d, 0x4f, 0x8c, 0xf9, 0x91, 0x98, 0x74, 0xfa, 0x92, 0xf6, 0x6c, 0x55, 0xab, 0x3a, 0x1f, + 0x64, 0xaa, 0xab, 0xba, 0xbd, 0x69, 0x35, 0x6d, 0x4b, 0xd5, 0x3b, 0x31, 0x45, 0xdc, 0x29, 0x83, + 0xc8, 0xe8, 0x5d, 0x96, 0x32, 0xa9, 0xd1, 0xb3, 0x5a, 0x24, 0xa9, 0xf4, 0x75, 0xcb, 0x36, 0x76, + 0x40, 0xdb, 0x6b, 0x46, 0x4b, 0xd1, 0x9c, 0xcd, 0xc1, 0x64, 0x97, 0x58, 0x44, 0x6f, 0x11, 0xb7, + 0xdc, 0x74, 0x20, 0xb0, 0x07, 0x26, 0xff, 0x83, 0x04, 0xa3, 0x62, 0x2d, 0xce, 0xe1, 0x92, 0xf3, + 0x3b, 0xe1, 0x4b, 0xce, 0xb5, 0x8c, 0x91, 0x23, 0xf9, 0x86, 0xf3, 0xd7, 0xbe, 0xe9, 0x2c, 0x56, + 0xb0, 0xe3, 0xb2, 0x67, 0x50, 0x3b, 0x7a, 0x5c, 0xd8, 0x29, 0xc7, 0x9c, 0x82, 0x7a, 0x30, 0xa5, + 0x46, 0x82, 0x8b, 0xd8, 0xb3, 0x5a, 0x36, 0x4b, 0x3c, 0xb1, 0x7a, 0x59, 0xc0, 0x4f, 0x45, 0x29, + 0x38, 0xa6, 0x42, 0x26, 0x10, 0xe3, 0x42, 0xef, 0x40, 0x61, 0xcf, 0xb6, 0xcd, 0x84, 0xe7, 0xf3, + 0x01, 0x21, 0xcd, 0x37, 0xa1, 0xc4, 0x67, 0xb7, 0xb5, 0xd5, 0xc0, 0x1c, 0x4a, 0xfe, 0xc7, 0x9c, + 0xb7, 0x1e, 0xfc, 0xce, 0xf1, 0xb6, 0x37, 0xdb, 0x25, 0x4d, 0xa1, 0x94, 0x3b, 0xb6, 0x73, 0x3f, + 0x9e, 0x0d, 0x18, 0xee, 0xd1, 0x70, 0x8c, 0x1b, 0x6d, 0xf9, 0xa1, 0x5e, 0x3a, 0x4b, 0xa8, 0x1f, + 0x4d, 0x0a, 0xf3, 0xe8, 0x09, 0xe4, 0x6d, 0x2d, 0xeb, 0x3d, 0x57, 0x20, 0x6e, 0xad, 0x35, 0xfd, + 0x58, 0xb9, 0xb5, 0xd6, 0xc4, 0x0c, 0x02, 0x6d, 0xc2, 0x10, 0x4b, 0xa7, 0x2c, 0x3a, 0xe4, 0xb3, + 0x47, 0x1b, 0xb6, 0x82, 0xbe, 0x4b, 0xb1, 0x5f, 0x14, 0x3b, 0x38, 0xf2, 0xc7, 0x30, 0x1e, 0x0a, + 0x21, 0xe8, 0x23, 0x18, 0xd3, 0x0c, 0xa5, 0x5d, 0x57, 0x34, 0x45, 0x6f, 0x11, 0xf7, 0x6b, 0xc7, + 0xb5, 0xa4, 0xb3, 0xb7, 0x16, 0xe0, 0x13, 0x01, 0x68, 0x56, 0x28, 0x19, 0x0b, 0xd2, 0x70, 0x08, + 0x51, 0x56, 0x00, 0xfc, 0x39, 0xa2, 0x0a, 0x0c, 0x31, 0x4f, 0x75, 0x52, 0xdd, 0x48, 0x7d, 0x84, + 0x59, 0xc8, 0x1c, 0x98, 0x62, 0x67, 0x1c, 0xdd, 0x06, 0xa0, 0xa4, 0x65, 0x11, 0x9b, 0x6f, 0x67, + 0x2e, 0xfc, 0xc5, 0xb4, 0xe9, 0x51, 0x70, 0x80, 0x4b, 0xfe, 0x17, 0x09, 0xc6, 0x37, 0x88, 0xfd, + 0x89, 0x61, 0xed, 0x37, 0x0c, 0x4d, 0x6d, 0xf5, 0xcf, 0x21, 0x0f, 0xe0, 0x50, 0x1e, 0x78, 0x73, + 0xc0, 0xce, 0x84, 0xac, 0x4b, 0xcb, 0x06, 0xf2, 0x97, 0x12, 0xcc, 0x87, 0x38, 0x1f, 0xf9, 0x87, + 0x7f, 0x1b, 0x86, 0x4c, 0xc3, 0xb2, 0xdd, 0x1a, 0xe1, 0x54, 0x0a, 0x59, 0x84, 0x0d, 0x54, 0x09, + 0x0c, 0x06, 0x3b, 0x68, 0x68, 0x0d, 0x72, 0xb6, 0x21, 0x5c, 0xf5, 0x74, 0x98, 0x84, 0x58, 0x75, + 0x10, 0x98, 0xb9, 0x2d, 0x03, 0xe7, 0x6c, 0x83, 0x6d, 0x44, 0x39, 0xc4, 0x15, 0x0c, 0x5f, 0xaf, + 0x68, 0x06, 0x18, 0x0a, 0xbb, 0x96, 0xd1, 0x3d, 0xf3, 0x1c, 0xbc, 0x8d, 0x58, 0xb1, 0x8c, 0x2e, + 0xe6, 0x58, 0xf2, 0x57, 0x12, 0x4c, 0x87, 0x38, 0xcf, 0x21, 0x75, 0xbc, 0x13, 0x4e, 0x1d, 0x37, + 0x4e, 0x33, 0x91, 0x94, 0x04, 0xf2, 0x55, 0x2e, 0x32, 0x0d, 0x36, 0x61, 0xb4, 0x0b, 0xa3, 0xa6, + 0xd1, 0x6e, 0xbe, 0x84, 0xef, 0x9b, 0x93, 0x2c, 0xa5, 0x37, 0x7c, 0x2c, 0x1c, 0x04, 0x46, 0x87, + 0x30, 0xad, 0x2b, 0x5d, 0x42, 0x4d, 0xa5, 0x45, 0x9a, 0x2f, 0xe1, 0xc5, 0xe7, 0x22, 0xff, 0x80, + 0x12, 0x45, 0xc4, 0x71, 0x25, 0x68, 0x1d, 0x8a, 0xaa, 0xc9, 0x4b, 0x4c, 0x51, 0x4b, 0x0c, 0xcc, + 0xc3, 0x4e, 0x41, 0xea, 0xc4, 0x73, 0xf1, 0x03, 0xbb, 0x18, 0xf2, 0xdf, 0x44, 0xbd, 0x81, 0x57, + 0x2c, 0x8f, 0xa1, 0xc4, 0x3b, 0x4d, 0x5a, 0x86, 0xe6, 0x7e, 0xea, 0xe0, 0x97, 0x0b, 0x31, 0xf6, + 0xe2, 0xa8, 0x72, 0x39, 0xe1, 0x15, 0xdb, 0x25, 0x63, 0x4f, 0x18, 0x6d, 0x40, 0xc1, 0xfc, 0x21, + 0xc5, 0x15, 0x4f, 0x93, 0xbc, 0xa2, 0xe2, 0x38, 0xf2, 0x1f, 0xe6, 0x23, 0xe6, 0xf2, 0x64, 0xf9, + 0xec, 0xa5, 0xed, 0xba, 0x57, 0xcc, 0xa5, 0xee, 0xfc, 0x0e, 0x14, 0x45, 0xaa, 0x15, 0xce, 0xfc, + 0xf3, 0xd3, 0x38, 0x73, 0x30, 0x8b, 0x79, 0x77, 0x29, 0x77, 0xd0, 0x05, 0x46, 0x1f, 0xc2, 0x30, + 0x71, 0x54, 0x38, 0xb9, 0xf1, 0xde, 0x69, 0x54, 0xf8, 0x71, 0xd5, 0xaf, 0xa1, 0xc5, 0x98, 0x40, + 0x45, 0xbf, 0x64, 0xeb, 0xc5, 0x78, 0x59, 0xc9, 0x49, 0xcb, 0x05, 0x9e, 0xae, 0xae, 0x38, 0xd3, + 0xf6, 0x86, 0x5f, 0x1c, 0x55, 0xc0, 0xff, 0x89, 0x83, 0x12, 0xf2, 0xbf, 0x49, 0x30, 0xcd, 0x57, + 0xa8, 0xd5, 0xb3, 0x54, 0xbb, 0x7f, 0x6e, 0x89, 0xe9, 0x69, 0x28, 0x31, 0xdd, 0x19, 0xb0, 0x2c, + 0x31, 0x0b, 0x53, 0x93, 0xd3, 0xd7, 0x12, 0x5c, 0x8c, 0x71, 0x9f, 0x43, 0x5c, 0xdc, 0x0e, 0xc7, + 0xc5, 0x37, 0x4f, 0x3b, 0xa1, 0x94, 0xd8, 0xf8, 0x3f, 0xd3, 0x09, 0xd3, 0xe1, 0x27, 0xe5, 0x36, + 0x80, 0x69, 0xa9, 0x07, 0xaa, 0x46, 0x3a, 0xe2, 0xab, 0x7e, 0x29, 0xd0, 0xb3, 0xe5, 0x51, 0x70, + 0x80, 0x0b, 0x51, 0x98, 0x6b, 0x93, 0x5d, 0xa5, 0xa7, 0xd9, 0x8b, 0xed, 0xf6, 0x92, 0x62, 0x2a, + 0x3b, 0xaa, 0xa6, 0xda, 0xaa, 0x78, 0xff, 0x18, 0xa9, 0x3f, 0x74, 0xbe, 0xb6, 0x27, 0x71, 0xbc, + 0x38, 0xaa, 0x5c, 0x49, 0xfa, 0xdc, 0xe5, 0xb2, 0xf4, 0x71, 0x0a, 0x34, 0xea, 0x43, 0xd9, 0x22, + 0x1f, 0xf7, 0x54, 0x8b, 0xb4, 0x97, 0x2d, 0xc3, 0x0c, 0xa9, 0xcd, 0x73, 0xb5, 0xbf, 0x7d, 0x7c, + 0x54, 0x29, 0xe3, 0x14, 0x9e, 0xc1, 0x8a, 0x53, 0xe1, 0xd1, 0x33, 0x98, 0x51, 0x44, 0x77, 0x5d, + 0x50, 0xab, 0x73, 0x4a, 0xee, 0x1f, 0x1f, 0x55, 0x66, 0x16, 0xe3, 0xe4, 0xc1, 0x0a, 0x93, 0x40, + 0x51, 0x0d, 0x8a, 0x07, 0xbc, 0x11, 0x8f, 0x96, 0x87, 0x38, 0x3e, 0x4b, 0x04, 0x45, 0xa7, 0x37, + 0x8f, 0x61, 0x0e, 0xaf, 0x34, 0xf9, 0xe9, 0x73, 0xb9, 0xd8, 0x5d, 0x97, 0xd5, 0x92, 0xe2, 0xc4, + 0xf3, 0x27, 0xf0, 0x92, 0x1f, 0xb5, 0x9e, 0xf8, 0x24, 0x1c, 0xe4, 0x43, 0x1f, 0xc0, 0xc8, 0x9e, + 0x78, 0x30, 0xa1, 0xe5, 0x62, 0xa6, 0x24, 0x1c, 0x7a, 0x60, 0xa9, 0x4f, 0x0b, 0x15, 0x23, 0xee, + 0x30, 0xc5, 0x3e, 0x22, 0x7a, 0x1d, 0x8a, 0xfc, 0xc7, 0xea, 0x32, 0x7f, 0x5f, 0x2c, 0xf9, 0xb1, + 0xed, 0x89, 0x33, 0x8c, 0x5d, 0xba, 0xcb, 0xba, 0xda, 0x58, 0xe2, 0xef, 0xdc, 0x11, 0xd6, 0xd5, + 0xc6, 0x12, 0x76, 0xe9, 0xe8, 0x23, 0x28, 0x52, 0xb2, 0xa6, 0xea, 0xbd, 0xc3, 0x32, 0x64, 0xfa, + 0x4a, 0xde, 0x7c, 0xc4, 0xb9, 0x23, 0x2f, 0x7d, 0xbe, 0x06, 0x41, 0xc7, 0x2e, 0x2c, 0xda, 0x83, + 0x11, 0xab, 0xa7, 0x2f, 0xd2, 0x6d, 0x4a, 0xac, 0xf2, 0x28, 0xd7, 0x31, 0x28, 0x9c, 0x63, 0x97, + 0x3f, 0xaa, 0xc5, 0x5b, 0x21, 0x8f, 0x03, 0xfb, 0xe0, 0x68, 0x0f, 0x80, 0xff, 0xe0, 0x8f, 0x8a, + 0xe5, 0x39, 0xae, 0xea, 0x7e, 0x16, 0x55, 0x49, 0x6f, 0x97, 0xe2, 0xc3, 0x82, 0x47, 0xc6, 0x01, + 0x6c, 0xf4, 0xc7, 0x12, 0x20, 0xda, 0x33, 0x4d, 0x8d, 0x74, 0x89, 0x6e, 0x2b, 0x1a, 0x1f, 0xa5, + 0xe5, 0x31, 0xae, 0xf2, 0xed, 0x41, 0x2b, 0x18, 0x13, 0x8c, 0xaa, 0xf6, 0xbe, 0x17, 0xc4, 0x59, + 0x71, 0x82, 0x5e, 0xb6, 0x89, 0xbb, 0x62, 0xd6, 0xe3, 0x99, 0x36, 0x31, 0xf9, 0xb9, 0xd6, 0xdf, + 0x44, 0x41, 0xc7, 0x2e, 0x2c, 0x7a, 0x0a, 0x73, 0x6e, 0xc7, 0x28, 0x36, 0x0c, 0x7b, 0x45, 0xd5, + 0x08, 0xed, 0x53, 0x9b, 0x74, 0xcb, 0x13, 0xdc, 0xc1, 0xbc, 0xb6, 0x19, 0x9c, 0xc8, 0x85, 0x53, + 0xa4, 0x51, 0x17, 0x2a, 0x6e, 0x70, 0x62, 0x27, 0xd7, 0x8b, 0x8e, 0x8f, 0x68, 0x4b, 0xd1, 0x9c, + 0x4f, 0x28, 0x93, 0x5c, 0xc1, 0x6b, 0xc7, 0x47, 0x95, 0xca, 0xf2, 0xc9, 0xac, 0x78, 0x10, 0x16, + 0x7a, 0x0f, 0xca, 0x4a, 0x9a, 0x9e, 0x29, 0xae, 0xe7, 0xa7, 0x2c, 0xe2, 0xa5, 0x2a, 0x48, 0x95, + 0x46, 0x36, 0x4c, 0x29, 0xe1, 0xde, 0x5d, 0x5a, 0x9e, 0xce, 0xf4, 0x1a, 0x1b, 0x69, 0xf9, 0xf5, + 0x1f, 0x4e, 0x22, 0x04, 0x8a, 0x63, 0x1a, 0xd0, 0xef, 0x03, 0x52, 0xa2, 0xed, 0xc6, 0xb4, 0x8c, + 0x32, 0x25, 0xba, 0x58, 0x9f, 0xb2, 0xef, 0x76, 0x31, 0x12, 0xc5, 0x09, 0x7a, 0x58, 0x81, 0xae, + 0x44, 0x5a, 0xa4, 0x69, 0x79, 0x9e, 0x2b, 0xaf, 0x65, 0x53, 0xee, 0xc9, 0x05, 0xbe, 0x14, 0x45, + 0x11, 0x71, 0x5c, 0x09, 0x5a, 0x83, 0x59, 0x31, 0xb8, 0xad, 0x53, 0x65, 0x97, 0x34, 0xfb, 0xb4, + 0x65, 0x6b, 0xb4, 0x3c, 0xc3, 0xe3, 0x3b, 0xff, 0x5a, 0xb9, 0x98, 0x40, 0xc7, 0x89, 0x52, 0xe8, + 0x6d, 0x98, 0xda, 0x35, 0xac, 0x1d, 0xb5, 0xdd, 0x26, 0xba, 0x8b, 0x34, 0xcb, 0x91, 0xf8, 0x3b, + 0xd0, 0x4a, 0x84, 0x86, 0x63, 0xdc, 0x88, 0xc2, 0x45, 0x81, 0xdc, 0xb0, 0x8c, 0xd6, 0xba, 0xd1, + 0xd3, 0x6d, 0xa7, 0xec, 0xbb, 0xe8, 0xa5, 0xd1, 0x8b, 0x8b, 0x49, 0x0c, 0x2f, 0x8e, 0x2a, 0x57, + 0x93, 0xab, 0x7c, 0x9f, 0x09, 0x27, 0x63, 0x23, 0x13, 0xc6, 0x44, 0xe3, 0x3b, 0x7f, 0x90, 0x2a, + 0x97, 0xf9, 0xd1, 0x7f, 0x30, 0x38, 0xe0, 0x79, 0x22, 0xd1, 0xf3, 0x3f, 0x75, 0x7c, 0x54, 0x19, + 0x0b, 0x32, 0xe0, 0x90, 0x06, 0xde, 0xe8, 0x24, 0x3e, 0xaf, 0x9d, 0x4f, 0xb3, 0xf8, 0xe9, 0x1a, + 0x9d, 0x7c, 0xd3, 0x5e, 0x5a, 0xa3, 0x53, 0x00, 0xf2, 0xe4, 0x27, 0xf3, 0xff, 0xce, 0xc1, 0x8c, + 0xcf, 0x9c, 0xb9, 0xd1, 0x29, 0x41, 0xe4, 0xd7, 0x0d, 0xe3, 0xd9, 0x9a, 0x8f, 0xfc, 0xa5, 0xfb, + 0xff, 0xd7, 0x7c, 0xe4, 0xdb, 0x96, 0x72, 0x7b, 0xf8, 0xbb, 0x5c, 0x70, 0x02, 0xa7, 0xec, 0x80, + 0x79, 0x09, 0x3d, 0xd3, 0x3f, 0xba, 0x26, 0x1a, 0xf9, 0xeb, 0x3c, 0x4c, 0x45, 0x4f, 0x63, 0xa8, + 0x51, 0x42, 0x1a, 0xd8, 0x28, 0xd1, 0x80, 0xd9, 0xdd, 0x9e, 0xa6, 0xf5, 0xf9, 0x1c, 0x02, 0xdd, + 0x12, 0xce, 0x27, 0xcb, 0x9f, 0x0a, 0xc9, 0xd9, 0x95, 0x04, 0x1e, 0x9c, 0x28, 0x19, 0xef, 0x9b, + 0x28, 0xfc, 0xd0, 0xbe, 0x89, 0xa1, 0x33, 0xf4, 0x4d, 0x24, 0xb7, 0x9e, 0xe4, 0xcf, 0xd4, 0x7a, + 0x72, 0x96, 0xa6, 0x89, 0x84, 0x20, 0x36, 0xb0, 0x01, 0xf8, 0x17, 0x30, 0x11, 0x6e, 0xe4, 0x71, + 0xf6, 0xd2, 0xe9, 0x25, 0x12, 0x9f, 0x86, 0x03, 0x7b, 0xe9, 0x8c, 0x63, 0x8f, 0x43, 0xfe, 0x23, + 0x09, 0xe6, 0x92, 0x1b, 0x76, 0x91, 0x06, 0x13, 0x5d, 0xe5, 0x30, 0xd8, 0x44, 0x2d, 0x9d, 0xf1, + 0x65, 0x8c, 0x77, 0x70, 0xac, 0x87, 0xb0, 0x70, 0x04, 0x5b, 0xfe, 0x5e, 0x82, 0xf9, 0x94, 0xde, + 0x89, 0xf3, 0xb5, 0x04, 0xbd, 0x0f, 0xa5, 0xae, 0x72, 0xd8, 0xec, 0x59, 0x1d, 0x72, 0xe6, 0xb7, + 0x40, 0x7e, 0xa0, 0xd7, 0x05, 0x0a, 0xf6, 0xf0, 0xe4, 0xbf, 0x92, 0xe0, 0x27, 0xa9, 0x57, 0x25, + 0x74, 0x2f, 0xd4, 0xe6, 0x21, 0x47, 0xda, 0x3c, 0x50, 0x5c, 0xf0, 0x15, 0x75, 0x79, 0x7c, 0x2e, + 0x41, 0x39, 0xed, 0xee, 0x88, 0xee, 0x86, 0x8c, 0xfc, 0x59, 0xc4, 0xc8, 0xe9, 0x98, 0xdc, 0x2b, + 0xb2, 0xf1, 0xdf, 0x25, 0xb8, 0x7c, 0x42, 0x0d, 0xe6, 0x5d, 0x51, 0x48, 0x3b, 0xc8, 0xc5, 0x9f, + 0xad, 0xc5, 0x37, 0x2f, 0xff, 0x8a, 0x92, 0xc0, 0x83, 0x53, 0xa5, 0xd1, 0x36, 0xcc, 0x8b, 0xfb, + 0x51, 0x94, 0x26, 0xca, 0x0b, 0xde, 0x0d, 0xb7, 0x9c, 0xcc, 0x82, 0xd3, 0x64, 0xe5, 0xbf, 0x95, + 0x60, 0x2e, 0xf9, 0x51, 0x00, 0xbd, 0x15, 0x5a, 0xf2, 0x4a, 0x64, 0xc9, 0x27, 0x23, 0x52, 0x62, + 0xc1, 0x3f, 0x84, 0x09, 0xf1, 0x74, 0x20, 0x60, 0x84, 0x33, 0xcb, 0x49, 0x19, 0x44, 0x40, 0xb8, + 0x05, 0x2c, 0x3f, 0x26, 0xe1, 0x31, 0x1c, 0x41, 0x93, 0x3f, 0xcd, 0xc1, 0x50, 0xb3, 0xa5, 0x68, + 0xe4, 0x1c, 0xea, 0xd7, 0x5f, 0x85, 0xea, 0xd7, 0x41, 0xff, 0xcf, 0x8c, 0x5b, 0x95, 0x5a, 0xba, + 0xe2, 0x48, 0xe9, 0xfa, 0x46, 0x26, 0xb4, 0x93, 0xab, 0xd6, 0xdf, 0x82, 0x11, 0x4f, 0xe9, 0xe9, + 0x92, 0xa9, 0xfc, 0x97, 0x39, 0x18, 0x0d, 0xa8, 0x38, 0x65, 0x2a, 0xde, 0x0d, 0xd5, 0x1f, 0xf9, + 0x0c, 0x0f, 0x35, 0x01, 0x5d, 0x55, 0xb7, 0xe2, 0x70, 0xfa, 0xa4, 0xfd, 0xce, 0xd8, 0x78, 0x21, + 0xf2, 0x0b, 0x98, 0xb0, 0x15, 0xab, 0x43, 0x6c, 0xef, 0xc3, 0x85, 0xd3, 0xc7, 0xe5, 0x35, 0xec, + 0x6f, 0x85, 0xa8, 0x38, 0xc2, 0x7d, 0xe9, 0x21, 0x8c, 0x87, 0x94, 0x9d, 0xaa, 0xcd, 0xf9, 0xef, + 0x25, 0xf8, 0xd9, 0xc0, 0xc7, 0x1e, 0x54, 0x0f, 0x1d, 0x92, 0x6a, 0xe4, 0x90, 0x2c, 0xa4, 0x03, + 0xbc, 0xba, 0x76, 0xb9, 0xfa, 0xcd, 0xe7, 0xdf, 0x2d, 0x5c, 0xf8, 0xe6, 0xbb, 0x85, 0x0b, 0xdf, + 0x7e, 0xb7, 0x70, 0xe1, 0x0f, 0x8e, 0x17, 0xa4, 0xe7, 0xc7, 0x0b, 0xd2, 0x37, 0xc7, 0x0b, 0xd2, + 0xb7, 0xc7, 0x0b, 0xd2, 0x7f, 0x1e, 0x2f, 0x48, 0x7f, 0xfa, 0xfd, 0xc2, 0x85, 0xf7, 0x8b, 0x02, + 0xee, 0xff, 0x02, 0x00, 0x00, 0xff, 0xff, 0x98, 0xf4, 0xad, 0x8a, 0xba, 0x3e, 0x00, 0x00, } func (m *AllowedCSIDriver) Marshal() (dAtA []byte, err error) { @@ -2843,6 +2817,13 @@ func (m *HTTPIngressPath) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.PathType != nil { + i -= len(*m.PathType) + copy(dAtA[i:], *m.PathType) + i = encodeVarintGenerated(dAtA, i, uint64(len(*m.PathType))) + i-- + dAtA[i] = 0x1a + } { size, err := m.Backend.MarshalToSizedBuffer(dAtA[:i]) if err != nil { @@ -3066,6 +3047,18 @@ func (m *IngressBackend) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.Resource != nil { + { + size, err := m.Resource.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } { size, err := m.ServicePort.MarshalToSizedBuffer(dAtA[:i]) if err != nil { @@ -3224,6 +3217,13 @@ func (m *IngressSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.IngressClassName != nil { + i -= len(*m.IngressClassName) + copy(dAtA[i:], *m.IngressClassName) + i = encodeVarintGenerated(dAtA, i, uint64(len(*m.IngressClassName))) + i-- + dAtA[i] = 0x22 + } if len(m.Rules) > 0 { for iNdEx := len(m.Rules) - 1; iNdEx >= 0; iNdEx-- { { @@ -4332,29 +4332,6 @@ func (m *ReplicaSetStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *ReplicationControllerDummy) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ReplicationControllerDummy) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ReplicationControllerDummy) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - func (m *RollbackConfig) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -5133,6 +5110,10 @@ func (m *HTTPIngressPath) Size() (n int) { n += 1 + l + sovGenerated(uint64(l)) l = m.Backend.Size() n += 1 + l + sovGenerated(uint64(l)) + if m.PathType != nil { + l = len(*m.PathType) + n += 1 + l + sovGenerated(uint64(l)) + } return n } @@ -5215,6 +5196,10 @@ func (m *IngressBackend) Size() (n int) { n += 1 + l + sovGenerated(uint64(l)) l = m.ServicePort.Size() n += 1 + l + sovGenerated(uint64(l)) + if m.Resource != nil { + l = m.Resource.Size() + n += 1 + l + sovGenerated(uint64(l)) + } return n } @@ -5283,6 +5268,10 @@ func (m *IngressSpec) Size() (n int) { n += 1 + l + sovGenerated(uint64(l)) } } + if m.IngressClassName != nil { + l = len(*m.IngressClassName) + n += 1 + l + sovGenerated(uint64(l)) + } return n } @@ -5675,15 +5664,6 @@ func (m *ReplicaSetStatus) Size() (n int) { return n } -func (m *ReplicationControllerDummy) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - func (m *RollbackConfig) Size() (n int) { if m == nil { return 0 @@ -6122,6 +6102,7 @@ func (this *HTTPIngressPath) String() string { s := strings.Join([]string{`&HTTPIngressPath{`, `Path:` + fmt.Sprintf("%v", this.Path) + `,`, `Backend:` + strings.Replace(strings.Replace(this.Backend.String(), "IngressBackend", "IngressBackend", 1), `&`, ``, 1) + `,`, + `PathType:` + valueToStringGenerated(this.PathType) + `,`, `}`, }, "") return s @@ -6193,6 +6174,7 @@ func (this *IngressBackend) String() string { s := strings.Join([]string{`&IngressBackend{`, `ServiceName:` + fmt.Sprintf("%v", this.ServiceName) + `,`, `ServicePort:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ServicePort), "IntOrString", "intstr.IntOrString", 1), `&`, ``, 1) + `,`, + `Resource:` + strings.Replace(fmt.Sprintf("%v", this.Resource), "TypedLocalObjectReference", "v11.TypedLocalObjectReference", 1) + `,`, `}`, }, "") return s @@ -6252,6 +6234,7 @@ func (this *IngressSpec) String() string { `Backend:` + strings.Replace(this.Backend.String(), "IngressBackend", "IngressBackend", 1) + `,`, `TLS:` + repeatedStringForTLS + `,`, `Rules:` + repeatedStringForRules + `,`, + `IngressClassName:` + valueToStringGenerated(this.IngressClassName) + `,`, `}`, }, "") return s @@ -6547,15 +6530,6 @@ func (this *ReplicaSetStatus) String() string { }, "") return s } -func (this *ReplicationControllerDummy) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ReplicationControllerDummy{`, - `}`, - }, "") - return s -} func (this *RollbackConfig) String() string { if this == nil { return "nil" @@ -9672,6 +9646,39 @@ func (m *HTTPIngressPath) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PathType", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := PathType(dAtA[iNdEx:postIndex]) + m.PathType = &s + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -10328,6 +10335,42 @@ func (m *IngressBackend) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Resource", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Resource == nil { + m.Resource = &v11.TypedLocalObjectReference{} + } + if err := m.Resource.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -10812,6 +10855,39 @@ func (m *IngressSpec) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field IngressClassName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.IngressClassName = &s + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -13816,59 +13892,6 @@ func (m *ReplicaSetStatus) Unmarshal(dAtA []byte) error { } return nil } -func (m *ReplicationControllerDummy) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ReplicationControllerDummy: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ReplicationControllerDummy: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func (m *RollbackConfig) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -15209,6 +15232,7 @@ func (m *SupplementalGroupsStrategyOptions) Unmarshal(dAtA []byte) error { func skipGenerated(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -15240,10 +15264,8 @@ func skipGenerated(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -15264,55 +15286,30 @@ func skipGenerated(dAtA []byte) (n int, err error) { return 0, ErrInvalidLengthGenerated } iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - return iNdEx, nil case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipGenerated(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenerated + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenerated + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group") ) diff --git a/vendor/k8s.io/api/extensions/v1beta1/generated.proto b/vendor/k8s.io/api/extensions/v1beta1/generated.proto index 6c90cb3c45..ef8367e0b2 100644 --- a/vendor/k8s.io/api/extensions/v1beta1/generated.proto +++ b/vendor/k8s.io/api/extensions/v1beta1/generated.proto @@ -408,19 +408,33 @@ message FSGroupStrategyOptions { repeated IDRange ranges = 2; } -// HTTPIngressPath associates a path regex with a backend. Incoming urls matching -// the path are forwarded to the backend. +// HTTPIngressPath associates a path with a backend. Incoming urls matching the +// path are forwarded to the backend. message HTTPIngressPath { - // Path is an extended POSIX regex as defined by IEEE Std 1003.1, - // (i.e this follows the egrep/unix syntax, not the perl syntax) - // matched against the path of an incoming request. Currently it can - // contain characters disallowed from the conventional "path" - // part of a URL as defined by RFC 3986. Paths must begin with - // a '/'. If unspecified, the path defaults to a catch all sending - // traffic to the backend. + // Path is matched against the path of an incoming request. Currently it can + // contain characters disallowed from the conventional "path" part of a URL + // as defined by RFC 3986. Paths must begin with a '/'. When unspecified, + // all paths from incoming requests are matched. // +optional optional string path = 1; + // PathType determines the interpretation of the Path matching. PathType can + // be one of the following values: + // * Exact: Matches the URL path exactly. + // * Prefix: Matches based on a URL path prefix split by '/'. Matching is + // done on a path element by element basis. A path element refers is the + // list of labels in the path split by the '/' separator. A request is a + // match for path p if every p is an element-wise prefix of p of the + // request path. Note that if the last element of the path is a substring + // of the last element in request path, it is not a match (e.g. /foo/bar + // matches /foo/bar/baz, but does not match /foo/barbaz). + // * ImplementationSpecific: Interpretation of the Path matching is up to + // the IngressClass. Implementations can treat this as a separate PathType + // or treat it identically to Prefix or Exact path types. + // Implementations are required to support all path types. + // Defaults to ImplementationSpecific. + optional string pathType = 3; + // Backend defines the referenced service endpoint to which the traffic // will be forwarded to. optional IngressBackend backend = 2; @@ -458,16 +472,16 @@ message IDRange { } // DEPRECATED 1.9 - This group version of IPBlock is deprecated by networking/v1/IPBlock. -// IPBlock describes a particular CIDR (Ex. "192.168.1.1/24") that is allowed to the pods -// matched by a NetworkPolicySpec's podSelector. The except entry describes CIDRs that should -// not be included within this rule. +// IPBlock describes a particular CIDR (Ex. "192.168.1.1/24","2001:db9::/64") that is allowed +// to the pods matched by a NetworkPolicySpec's podSelector. The except entry describes CIDRs +// that should not be included within this rule. message IPBlock { // CIDR is a string representing the IP Block - // Valid examples are "192.168.1.1/24" + // Valid examples are "192.168.1.1/24" or "2001:db9::/64" optional string cidr = 1; // Except is a slice of CIDRs that should not be included within an IP Block - // Valid examples are "192.168.1.1/24" + // Valid examples are "192.168.1.1/24" or "2001:db9::/64" // Except values will be rejected if they are outside the CIDR range // +optional repeated string except = 2; @@ -498,10 +512,18 @@ message Ingress { // IngressBackend describes all endpoints for a given service and port. message IngressBackend { // Specifies the name of the referenced service. + // +optional optional string serviceName = 1; // Specifies the port of the referenced service. + // +optional optional k8s.io.apimachinery.pkg.util.intstr.IntOrString servicePort = 2; + + // Resource is an ObjectRef to another Kubernetes resource in the namespace + // of the Ingress object. If resource is specified, serviceName and servicePort + // must not be specified. + // +optional + optional k8s.io.api.core.v1.TypedLocalObjectReference resource = 3; } // IngressList is a collection of Ingress. @@ -519,18 +541,28 @@ message IngressList { // the related backend services. Incoming requests are first evaluated for a host // match, then routed to the backend associated with the matching IngressRuleValue. message IngressRule { - // Host is the fully qualified domain name of a network host, as defined - // by RFC 3986. Note the following deviations from the "host" part of the - // URI as defined in the RFC: - // 1. IPs are not allowed. Currently an IngressRuleValue can only apply to the - // IP in the Spec of the parent Ingress. + // Host is the fully qualified domain name of a network host, as defined by RFC 3986. + // Note the following deviations from the "host" part of the + // URI as defined in RFC 3986: + // 1. IPs are not allowed. Currently an IngressRuleValue can only apply to + // the IP in the Spec of the parent Ingress. // 2. The `:` delimiter is not respected because ports are not allowed. // Currently the port of an Ingress is implicitly :80 for http and // :443 for https. // Both these may change in the future. - // Incoming requests are matched against the host before the IngressRuleValue. - // If the host is unspecified, the Ingress routes all traffic based on the - // specified IngressRuleValue. + // Incoming requests are matched against the host before the + // IngressRuleValue. If the host is unspecified, the Ingress routes all + // traffic based on the specified IngressRuleValue. + // + // Host can be "precise" which is a domain name without the terminating dot of + // a network host (e.g. "foo.bar.com") or "wildcard", which is a domain name + // prefixed with a single wildcard label (e.g. "*.foo.com"). + // The wildcard character '*' must appear by itself as the first DNS label and + // matches only a single label. You cannot have a wildcard label by itself (e.g. Host == "*"). + // Requests will be matched against the Host field in the following way: + // 1. If Host is precise, the request matches this rule if the http host header is equal to Host. + // 2. If Host is a wildcard, then the request matches this rule if the http host header + // is to equal to the suffix (removing the first label) of the wildcard rule. // +optional optional string host = 1; @@ -554,6 +586,19 @@ message IngressRuleValue { // IngressSpec describes the Ingress the user wishes to exist. message IngressSpec { + // IngressClassName is the name of the IngressClass cluster resource. The + // associated IngressClass defines which controller will implement the + // resource. This replaces the deprecated `kubernetes.io/ingress.class` + // annotation. For backwards compatibility, when that annotation is set, it + // must be given precedence over this field. The controller may emit a + // warning if the field and annotation have different values. + // Implementations of this API should ignore Ingresses without a class + // specified. An IngressClass resource may be marked as default, which can + // be used to set a default value for this field. For more information, + // refer to the IngressClass documentation. + // +optional + optional string ingressClassName = 4; + // A default backend capable of servicing requests that don't match any // rule. At least one of 'backend' or 'rules' must be specified. This field // is optional to allow the loadbalancer controller or defaulting logic to @@ -1025,10 +1070,6 @@ message ReplicaSetStatus { repeated ReplicaSetCondition conditions = 6; } -// Dummy definition -message ReplicationControllerDummy { -} - // DEPRECATED. message RollbackConfig { // The revision to rollback to. If set to 0, rollback to the last revision. diff --git a/vendor/k8s.io/api/extensions/v1beta1/register.go b/vendor/k8s.io/api/extensions/v1beta1/register.go index 7625f67813..c69eff0bc4 100644 --- a/vendor/k8s.io/api/extensions/v1beta1/register.go +++ b/vendor/k8s.io/api/extensions/v1beta1/register.go @@ -47,7 +47,6 @@ func addKnownTypes(scheme *runtime.Scheme) error { &Deployment{}, &DeploymentList{}, &DeploymentRollback{}, - &ReplicationControllerDummy{}, &Scale{}, &DaemonSetList{}, &DaemonSet{}, diff --git a/vendor/k8s.io/api/extensions/v1beta1/types.go b/vendor/k8s.io/api/extensions/v1beta1/types.go index eb255341f4..8934c06137 100644 --- a/vendor/k8s.io/api/extensions/v1beta1/types.go +++ b/vendor/k8s.io/api/extensions/v1beta1/types.go @@ -67,13 +67,6 @@ type Scale struct { Status ScaleStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` } -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// Dummy definition -type ReplicationControllerDummy struct { - metav1.TypeMeta `json:",inline"` -} - // +genclient // +genclient:method=GetScale,verb=get,subresource=scale,result=Scale // +genclient:method=UpdateScale,verb=update,subresource=scale,input=Scale,result=Scale @@ -576,6 +569,19 @@ type IngressList struct { // IngressSpec describes the Ingress the user wishes to exist. type IngressSpec struct { + // IngressClassName is the name of the IngressClass cluster resource. The + // associated IngressClass defines which controller will implement the + // resource. This replaces the deprecated `kubernetes.io/ingress.class` + // annotation. For backwards compatibility, when that annotation is set, it + // must be given precedence over this field. The controller may emit a + // warning if the field and annotation have different values. + // Implementations of this API should ignore Ingresses without a class + // specified. An IngressClass resource may be marked as default, which can + // be used to set a default value for this field. For more information, + // refer to the IngressClass documentation. + // +optional + IngressClassName *string `json:"ingressClassName,omitempty" protobuf:"bytes,4,opt,name=ingressClassName"` + // A default backend capable of servicing requests that don't match any // rule. At least one of 'backend' or 'rules' must be specified. This field // is optional to allow the loadbalancer controller or defaulting logic to @@ -627,18 +633,28 @@ type IngressStatus struct { // the related backend services. Incoming requests are first evaluated for a host // match, then routed to the backend associated with the matching IngressRuleValue. type IngressRule struct { - // Host is the fully qualified domain name of a network host, as defined - // by RFC 3986. Note the following deviations from the "host" part of the - // URI as defined in the RFC: - // 1. IPs are not allowed. Currently an IngressRuleValue can only apply to the - // IP in the Spec of the parent Ingress. + // Host is the fully qualified domain name of a network host, as defined by RFC 3986. + // Note the following deviations from the "host" part of the + // URI as defined in RFC 3986: + // 1. IPs are not allowed. Currently an IngressRuleValue can only apply to + // the IP in the Spec of the parent Ingress. // 2. The `:` delimiter is not respected because ports are not allowed. // Currently the port of an Ingress is implicitly :80 for http and // :443 for https. // Both these may change in the future. - // Incoming requests are matched against the host before the IngressRuleValue. - // If the host is unspecified, the Ingress routes all traffic based on the - // specified IngressRuleValue. + // Incoming requests are matched against the host before the + // IngressRuleValue. If the host is unspecified, the Ingress routes all + // traffic based on the specified IngressRuleValue. + // + // Host can be "precise" which is a domain name without the terminating dot of + // a network host (e.g. "foo.bar.com") or "wildcard", which is a domain name + // prefixed with a single wildcard label (e.g. "*.foo.com"). + // The wildcard character '*' must appear by itself as the first DNS label and + // matches only a single label. You cannot have a wildcard label by itself (e.g. Host == "*"). + // Requests will be matched against the Host field in the following way: + // 1. If Host is precise, the request matches this rule if the http host header is equal to Host. + // 2. If Host is a wildcard, then the request matches this rule if the http host header + // is to equal to the suffix (removing the first label) of the wildcard rule. // +optional Host string `json:"host,omitempty" protobuf:"bytes,1,opt,name=host"` // IngressRuleValue represents a rule to route requests for this IngressRule. @@ -677,19 +693,63 @@ type HTTPIngressRuleValue struct { // options usable by a loadbalancer, like http keep-alive. } -// HTTPIngressPath associates a path regex with a backend. Incoming urls matching -// the path are forwarded to the backend. +// PathType represents the type of path referred to by a HTTPIngressPath. +type PathType string + +const ( + // PathTypeExact matches the URL path exactly and with case sensitivity. + PathTypeExact = PathType("Exact") + + // PathTypePrefix matches based on a URL path prefix split by '/'. Matching + // is case sensitive and done on a path element by element basis. A path + // element refers to the list of labels in the path split by the '/' + // separator. A request is a match for path p if every p is an element-wise + // prefix of p of the request path. Note that if the last element of the + // path is a substring of the last element in request path, it is not a + // match (e.g. /foo/bar matches /foo/bar/baz, but does not match + // /foo/barbaz). If multiple matching paths exist in an Ingress spec, the + // longest matching path is given priority. + // Examples: + // - /foo/bar does not match requests to /foo/barbaz + // - /foo/bar matches request to /foo/bar and /foo/bar/baz + // - /foo and /foo/ both match requests to /foo and /foo/. If both paths are + // present in an Ingress spec, the longest matching path (/foo/) is given + // priority. + PathTypePrefix = PathType("Prefix") + + // PathTypeImplementationSpecific matching is up to the IngressClass. + // Implementations can treat this as a separate PathType or treat it + // identically to Prefix or Exact path types. + PathTypeImplementationSpecific = PathType("ImplementationSpecific") +) + +// HTTPIngressPath associates a path with a backend. Incoming urls matching the +// path are forwarded to the backend. type HTTPIngressPath struct { - // Path is an extended POSIX regex as defined by IEEE Std 1003.1, - // (i.e this follows the egrep/unix syntax, not the perl syntax) - // matched against the path of an incoming request. Currently it can - // contain characters disallowed from the conventional "path" - // part of a URL as defined by RFC 3986. Paths must begin with - // a '/'. If unspecified, the path defaults to a catch all sending - // traffic to the backend. + // Path is matched against the path of an incoming request. Currently it can + // contain characters disallowed from the conventional "path" part of a URL + // as defined by RFC 3986. Paths must begin with a '/'. When unspecified, + // all paths from incoming requests are matched. // +optional Path string `json:"path,omitempty" protobuf:"bytes,1,opt,name=path"` + // PathType determines the interpretation of the Path matching. PathType can + // be one of the following values: + // * Exact: Matches the URL path exactly. + // * Prefix: Matches based on a URL path prefix split by '/'. Matching is + // done on a path element by element basis. A path element refers is the + // list of labels in the path split by the '/' separator. A request is a + // match for path p if every p is an element-wise prefix of p of the + // request path. Note that if the last element of the path is a substring + // of the last element in request path, it is not a match (e.g. /foo/bar + // matches /foo/bar/baz, but does not match /foo/barbaz). + // * ImplementationSpecific: Interpretation of the Path matching is up to + // the IngressClass. Implementations can treat this as a separate PathType + // or treat it identically to Prefix or Exact path types. + // Implementations are required to support all path types. + // Defaults to ImplementationSpecific. + PathType *PathType `json:"pathType,omitempty" protobuf:"bytes,3,opt,name=pathType"` + // Backend defines the referenced service endpoint to which the traffic // will be forwarded to. Backend IngressBackend `json:"backend" protobuf:"bytes,2,opt,name=backend"` @@ -698,10 +758,18 @@ type HTTPIngressPath struct { // IngressBackend describes all endpoints for a given service and port. type IngressBackend struct { // Specifies the name of the referenced service. - ServiceName string `json:"serviceName" protobuf:"bytes,1,opt,name=serviceName"` + // +optional + ServiceName string `json:"serviceName,omitempty" protobuf:"bytes,1,opt,name=serviceName"` // Specifies the port of the referenced service. - ServicePort intstr.IntOrString `json:"servicePort" protobuf:"bytes,2,opt,name=servicePort"` + // +optional + ServicePort intstr.IntOrString `json:"servicePort,omitempty" protobuf:"bytes,2,opt,name=servicePort"` + + // Resource is an ObjectRef to another Kubernetes resource in the namespace + // of the Ingress object. If resource is specified, serviceName and servicePort + // must not be specified. + // +optional + Resource *v1.TypedLocalObjectReference `json:"resource,omitempty" protobuf:"bytes,3,opt,name=resource"` } // +genclient @@ -1341,15 +1409,15 @@ type NetworkPolicyPort struct { } // DEPRECATED 1.9 - This group version of IPBlock is deprecated by networking/v1/IPBlock. -// IPBlock describes a particular CIDR (Ex. "192.168.1.1/24") that is allowed to the pods -// matched by a NetworkPolicySpec's podSelector. The except entry describes CIDRs that should -// not be included within this rule. +// IPBlock describes a particular CIDR (Ex. "192.168.1.1/24","2001:db9::/64") that is allowed +// to the pods matched by a NetworkPolicySpec's podSelector. The except entry describes CIDRs +// that should not be included within this rule. type IPBlock struct { // CIDR is a string representing the IP Block - // Valid examples are "192.168.1.1/24" + // Valid examples are "192.168.1.1/24" or "2001:db9::/64" CIDR string `json:"cidr" protobuf:"bytes,1,name=cidr"` // Except is a slice of CIDRs that should not be included within an IP Block - // Valid examples are "192.168.1.1/24" + // Valid examples are "192.168.1.1/24" or "2001:db9::/64" // Except values will be rejected if they are outside the CIDR range // +optional Except []string `json:"except,omitempty" protobuf:"bytes,2,rep,name=except"` diff --git a/vendor/k8s.io/api/extensions/v1beta1/types_swagger_doc_generated.go b/vendor/k8s.io/api/extensions/v1beta1/types_swagger_doc_generated.go index a7eb2ec907..9ccad92485 100644 --- a/vendor/k8s.io/api/extensions/v1beta1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/api/extensions/v1beta1/types_swagger_doc_generated.go @@ -230,9 +230,10 @@ func (FSGroupStrategyOptions) SwaggerDoc() map[string]string { } var map_HTTPIngressPath = map[string]string{ - "": "HTTPIngressPath associates a path regex with a backend. Incoming urls matching the path are forwarded to the backend.", - "path": "Path is an extended POSIX regex as defined by IEEE Std 1003.1, (i.e this follows the egrep/unix syntax, not the perl syntax) matched against the path of an incoming request. Currently it can contain characters disallowed from the conventional \"path\" part of a URL as defined by RFC 3986. Paths must begin with a '/'. If unspecified, the path defaults to a catch all sending traffic to the backend.", - "backend": "Backend defines the referenced service endpoint to which the traffic will be forwarded to.", + "": "HTTPIngressPath associates a path with a backend. Incoming urls matching the path are forwarded to the backend.", + "path": "Path is matched against the path of an incoming request. Currently it can contain characters disallowed from the conventional \"path\" part of a URL as defined by RFC 3986. Paths must begin with a '/'. When unspecified, all paths from incoming requests are matched.", + "pathType": "PathType determines the interpretation of the Path matching. PathType can be one of the following values: * Exact: Matches the URL path exactly. * Prefix: Matches based on a URL path prefix split by '/'. Matching is\n done on a path element by element basis. A path element refers is the\n list of labels in the path split by the '/' separator. A request is a\n match for path p if every p is an element-wise prefix of p of the\n request path. Note that if the last element of the path is a substring\n of the last element in request path, it is not a match (e.g. /foo/bar\n matches /foo/bar/baz, but does not match /foo/barbaz).\n* ImplementationSpecific: Interpretation of the Path matching is up to\n the IngressClass. Implementations can treat this as a separate PathType\n or treat it identically to Prefix or Exact path types.\nImplementations are required to support all path types. Defaults to ImplementationSpecific.", + "backend": "Backend defines the referenced service endpoint to which the traffic will be forwarded to.", } func (HTTPIngressPath) SwaggerDoc() map[string]string { @@ -269,9 +270,9 @@ func (IDRange) SwaggerDoc() map[string]string { } var map_IPBlock = map[string]string{ - "": "DEPRECATED 1.9 - This group version of IPBlock is deprecated by networking/v1/IPBlock. IPBlock describes a particular CIDR (Ex. \"192.168.1.1/24\") that is allowed to the pods matched by a NetworkPolicySpec's podSelector. The except entry describes CIDRs that should not be included within this rule.", - "cidr": "CIDR is a string representing the IP Block Valid examples are \"192.168.1.1/24\"", - "except": "Except is a slice of CIDRs that should not be included within an IP Block Valid examples are \"192.168.1.1/24\" Except values will be rejected if they are outside the CIDR range", + "": "DEPRECATED 1.9 - This group version of IPBlock is deprecated by networking/v1/IPBlock. IPBlock describes a particular CIDR (Ex. \"192.168.1.1/24\",\"2001:db9::/64\") that is allowed to the pods matched by a NetworkPolicySpec's podSelector. The except entry describes CIDRs that should not be included within this rule.", + "cidr": "CIDR is a string representing the IP Block Valid examples are \"192.168.1.1/24\" or \"2001:db9::/64\"", + "except": "Except is a slice of CIDRs that should not be included within an IP Block Valid examples are \"192.168.1.1/24\" or \"2001:db9::/64\" Except values will be rejected if they are outside the CIDR range", } func (IPBlock) SwaggerDoc() map[string]string { @@ -293,6 +294,7 @@ var map_IngressBackend = map[string]string{ "": "IngressBackend describes all endpoints for a given service and port.", "serviceName": "Specifies the name of the referenced service.", "servicePort": "Specifies the port of the referenced service.", + "resource": "Resource is an ObjectRef to another Kubernetes resource in the namespace of the Ingress object. If resource is specified, serviceName and servicePort must not be specified.", } func (IngressBackend) SwaggerDoc() map[string]string { @@ -311,7 +313,7 @@ func (IngressList) SwaggerDoc() map[string]string { var map_IngressRule = map[string]string{ "": "IngressRule represents the rules mapping the paths under a specified host to the related backend services. Incoming requests are first evaluated for a host match, then routed to the backend associated with the matching IngressRuleValue.", - "host": "Host is the fully qualified domain name of a network host, as defined by RFC 3986. Note the following deviations from the \"host\" part of the URI as defined in the RFC: 1. IPs are not allowed. Currently an IngressRuleValue can only apply to the\n\t IP in the Spec of the parent Ingress.\n2. The `:` delimiter is not respected because ports are not allowed.\n\t Currently the port of an Ingress is implicitly :80 for http and\n\t :443 for https.\nBoth these may change in the future. Incoming requests are matched against the host before the IngressRuleValue. If the host is unspecified, the Ingress routes all traffic based on the specified IngressRuleValue.", + "host": "Host is the fully qualified domain name of a network host, as defined by RFC 3986. Note the following deviations from the \"host\" part of the URI as defined in RFC 3986: 1. IPs are not allowed. Currently an IngressRuleValue can only apply to\n the IP in the Spec of the parent Ingress.\n2. The `:` delimiter is not respected because ports are not allowed.\n\t Currently the port of an Ingress is implicitly :80 for http and\n\t :443 for https.\nBoth these may change in the future. Incoming requests are matched against the host before the IngressRuleValue. If the host is unspecified, the Ingress routes all traffic based on the specified IngressRuleValue.\n\nHost can be \"precise\" which is a domain name without the terminating dot of a network host (e.g. \"foo.bar.com\") or \"wildcard\", which is a domain name prefixed with a single wildcard label (e.g. \"*.foo.com\"). The wildcard character '*' must appear by itself as the first DNS label and matches only a single label. You cannot have a wildcard label by itself (e.g. Host == \"*\"). Requests will be matched against the Host field in the following way: 1. If Host is precise, the request matches this rule if the http host header is equal to Host. 2. If Host is a wildcard, then the request matches this rule if the http host header is to equal to the suffix (removing the first label) of the wildcard rule.", } func (IngressRule) SwaggerDoc() map[string]string { @@ -327,10 +329,11 @@ func (IngressRuleValue) SwaggerDoc() map[string]string { } var map_IngressSpec = map[string]string{ - "": "IngressSpec describes the Ingress the user wishes to exist.", - "backend": "A default backend capable of servicing requests that don't match any rule. At least one of 'backend' or 'rules' must be specified. This field is optional to allow the loadbalancer controller or defaulting logic to specify a global default.", - "tls": "TLS configuration. Currently the Ingress only supports a single TLS port, 443. If multiple members of this list specify different hosts, they will be multiplexed on the same port according to the hostname specified through the SNI TLS extension, if the ingress controller fulfilling the ingress supports SNI.", - "rules": "A list of host rules used to configure the Ingress. If unspecified, or no rule matches, all traffic is sent to the default backend.", + "": "IngressSpec describes the Ingress the user wishes to exist.", + "ingressClassName": "IngressClassName is the name of the IngressClass cluster resource. The associated IngressClass defines which controller will implement the resource. This replaces the deprecated `kubernetes.io/ingress.class` annotation. For backwards compatibility, when that annotation is set, it must be given precedence over this field. The controller may emit a warning if the field and annotation have different values. Implementations of this API should ignore Ingresses without a class specified. An IngressClass resource may be marked as default, which can be used to set a default value for this field. For more information, refer to the IngressClass documentation.", + "backend": "A default backend capable of servicing requests that don't match any rule. At least one of 'backend' or 'rules' must be specified. This field is optional to allow the loadbalancer controller or defaulting logic to specify a global default.", + "tls": "TLS configuration. Currently the Ingress only supports a single TLS port, 443. If multiple members of this list specify different hosts, they will be multiplexed on the same port according to the hostname specified through the SNI TLS extension, if the ingress controller fulfilling the ingress supports SNI.", + "rules": "A list of host rules used to configure the Ingress. If unspecified, or no rule matches, all traffic is sent to the default backend.", } func (IngressSpec) SwaggerDoc() map[string]string { @@ -541,14 +544,6 @@ func (ReplicaSetStatus) SwaggerDoc() map[string]string { return map_ReplicaSetStatus } -var map_ReplicationControllerDummy = map[string]string{ - "": "Dummy definition", -} - -func (ReplicationControllerDummy) SwaggerDoc() map[string]string { - return map_ReplicationControllerDummy -} - var map_RollbackConfig = map[string]string{ "": "DEPRECATED.", "revision": "The revision to rollback to. If set to 0, rollback to the last revision.", diff --git a/vendor/k8s.io/api/extensions/v1beta1/zz_generated.deepcopy.go b/vendor/k8s.io/api/extensions/v1beta1/zz_generated.deepcopy.go index cb61017966..913f485145 100644 --- a/vendor/k8s.io/api/extensions/v1beta1/zz_generated.deepcopy.go +++ b/vendor/k8s.io/api/extensions/v1beta1/zz_generated.deepcopy.go @@ -458,7 +458,12 @@ func (in *FSGroupStrategyOptions) DeepCopy() *FSGroupStrategyOptions { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *HTTPIngressPath) DeepCopyInto(out *HTTPIngressPath) { *out = *in - out.Backend = in.Backend + if in.PathType != nil { + in, out := &in.PathType, &out.PathType + *out = new(PathType) + **out = **in + } + in.Backend.DeepCopyInto(&out.Backend) return } @@ -478,7 +483,9 @@ func (in *HTTPIngressRuleValue) DeepCopyInto(out *HTTPIngressRuleValue) { if in.Paths != nil { in, out := &in.Paths, &out.Paths *out = make([]HTTPIngressPath, len(*in)) - copy(*out, *in) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } } return } @@ -578,6 +585,11 @@ func (in *Ingress) DeepCopyObject() runtime.Object { func (in *IngressBackend) DeepCopyInto(out *IngressBackend) { *out = *in out.ServicePort = in.ServicePort + if in.Resource != nil { + in, out := &in.Resource, &out.Resource + *out = new(corev1.TypedLocalObjectReference) + (*in).DeepCopyInto(*out) + } return } @@ -665,10 +677,15 @@ func (in *IngressRuleValue) DeepCopy() *IngressRuleValue { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *IngressSpec) DeepCopyInto(out *IngressSpec) { *out = *in + if in.IngressClassName != nil { + in, out := &in.IngressClassName, &out.IngressClassName + *out = new(string) + **out = **in + } if in.Backend != nil { in, out := &in.Backend, &out.Backend *out = new(IngressBackend) - **out = **in + (*in).DeepCopyInto(*out) } if in.TLS != nil { in, out := &in.TLS, &out.TLS @@ -1231,31 +1248,6 @@ func (in *ReplicaSetStatus) DeepCopy() *ReplicaSetStatus { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ReplicationControllerDummy) DeepCopyInto(out *ReplicationControllerDummy) { - *out = *in - out.TypeMeta = in.TypeMeta - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReplicationControllerDummy. -func (in *ReplicationControllerDummy) DeepCopy() *ReplicationControllerDummy { - if in == nil { - return nil - } - out := new(ReplicationControllerDummy) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ReplicationControllerDummy) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *RollbackConfig) DeepCopyInto(out *RollbackConfig) { *out = *in diff --git a/vendor/k8s.io/api/flowcontrol/v1alpha1/generated.pb.go b/vendor/k8s.io/api/flowcontrol/v1alpha1/generated.pb.go index d44ec3c91a..86c8612049 100644 --- a/vendor/k8s.io/api/flowcontrol/v1alpha1/generated.pb.go +++ b/vendor/k8s.io/api/flowcontrol/v1alpha1/generated.pb.go @@ -41,7 +41,7 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *FlowDistinguisherMethod) Reset() { *m = FlowDistinguisherMethod{} } func (*FlowDistinguisherMethod) ProtoMessage() {} @@ -5350,6 +5350,7 @@ func (m *UserSubject) Unmarshal(dAtA []byte) error { func skipGenerated(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -5381,10 +5382,8 @@ func skipGenerated(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -5405,55 +5404,30 @@ func skipGenerated(dAtA []byte) (n int, err error) { return 0, ErrInvalidLengthGenerated } iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - return iNdEx, nil case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipGenerated(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenerated + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenerated + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group") ) diff --git a/vendor/k8s.io/api/flowcontrol/v1alpha1/generated.proto b/vendor/k8s.io/api/flowcontrol/v1alpha1/generated.proto index 6134b5e699..b8054528f5 100644 --- a/vendor/k8s.io/api/flowcontrol/v1alpha1/generated.proto +++ b/vendor/k8s.io/api/flowcontrol/v1alpha1/generated.proto @@ -84,7 +84,7 @@ message FlowSchemaList { optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; // `items` is a list of FlowSchemas. - // +listType=set + // +listType=atomic repeated FlowSchema items = 2; } @@ -97,8 +97,8 @@ message FlowSchemaSpec { // `matchingPrecedence` is used to choose among the FlowSchemas that match a given request. The chosen // FlowSchema is among those with the numerically lowest (which we take to be logically highest) - // MatchingPrecedence. Each MatchingPrecedence value must be non-negative. - // Note that if the precedence is not specified or zero, it will be set to 1000 as default. + // MatchingPrecedence. Each MatchingPrecedence value must be ranged in [1,10000]. + // Note that if the precedence is not specified, it will be set to 1000 as default. // +optional optional int32 matchingPrecedence = 2; @@ -110,7 +110,7 @@ message FlowSchemaSpec { // `rules` describes which requests will match this flow schema. This FlowSchema matches a request if and only if // at least one member of rules matches the request. // if it is an empty slice, there will be no requests matching the FlowSchema. - // +listType=set + // +listType=atomic // +optional repeated PolicyRulesWithSubjects rules = 4; } @@ -210,20 +210,20 @@ message PolicyRulesWithSubjects { // subjects is the list of normal user, serviceaccount, or group that this rule cares about. // There must be at least one member in this slice. // A slice that includes both the system:authenticated and system:unauthenticated user groups matches every request. - // +listType=set + // +listType=atomic // Required. repeated Subject subjects = 1; // `resourceRules` is a slice of ResourcePolicyRules that identify matching requests according to their verb and the // target resource. // At least one of `resourceRules` and `nonResourceRules` has to be non-empty. - // +listType=set + // +listType=atomic // +optional repeated ResourcePolicyRule resourceRules = 2; // `nonResourceRules` is a list of NonResourcePolicyRules that identify matching requests according to their verb // and the target non-resource URL. - // +listType=set + // +listType=atomic // +optional repeated NonResourcePolicyRule nonResourceRules = 3; } @@ -275,7 +275,7 @@ message PriorityLevelConfigurationList { optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; // `items` is a list of request-priorities. - // +listType=set + // +listType=atomic repeated PriorityLevelConfiguration items = 2; } diff --git a/vendor/k8s.io/api/flowcontrol/v1alpha1/types.go b/vendor/k8s.io/api/flowcontrol/v1alpha1/types.go index 41073bdcb1..16bcf819ea 100644 --- a/vendor/k8s.io/api/flowcontrol/v1alpha1/types.go +++ b/vendor/k8s.io/api/flowcontrol/v1alpha1/types.go @@ -33,7 +33,10 @@ const ( // System preset priority level names const ( - PriorityLevelConfigurationNameExempt = "exempt" + PriorityLevelConfigurationNameExempt = "exempt" + PriorityLevelConfigurationNameCatchAll = "catch-all" + FlowSchemaNameExempt = "exempt" + FlowSchemaNameCatchAll = "catch-all" ) // Conditions @@ -43,6 +46,11 @@ const ( PriorityLevelConfigurationConditionConcurrencyShared = "ConcurrencyShared" ) +// Constants used by api validation. +const ( + FlowSchemaMaxMatchingPrecedence int32 = 10000 +) + // +genclient // +genclient:nonNamespaced // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object @@ -76,7 +84,7 @@ type FlowSchemaList struct { metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // `items` is a list of FlowSchemas. - // +listType=set + // +listType=atomic Items []FlowSchema `json:"items" protobuf:"bytes,2,rep,name=items"` } @@ -88,8 +96,8 @@ type FlowSchemaSpec struct { PriorityLevelConfiguration PriorityLevelConfigurationReference `json:"priorityLevelConfiguration" protobuf:"bytes,1,opt,name=priorityLevelConfiguration"` // `matchingPrecedence` is used to choose among the FlowSchemas that match a given request. The chosen // FlowSchema is among those with the numerically lowest (which we take to be logically highest) - // MatchingPrecedence. Each MatchingPrecedence value must be non-negative. - // Note that if the precedence is not specified or zero, it will be set to 1000 as default. + // MatchingPrecedence. Each MatchingPrecedence value must be ranged in [1,10000]. + // Note that if the precedence is not specified, it will be set to 1000 as default. // +optional MatchingPrecedence int32 `json:"matchingPrecedence" protobuf:"varint,2,opt,name=matchingPrecedence"` // `distinguisherMethod` defines how to compute the flow distinguisher for requests that match this schema. @@ -99,7 +107,7 @@ type FlowSchemaSpec struct { // `rules` describes which requests will match this flow schema. This FlowSchema matches a request if and only if // at least one member of rules matches the request. // if it is an empty slice, there will be no requests matching the FlowSchema. - // +listType=set + // +listType=atomic // +optional Rules []PolicyRulesWithSubjects `json:"rules,omitempty" protobuf:"bytes,4,rep,name=rules"` } @@ -144,18 +152,18 @@ type PolicyRulesWithSubjects struct { // subjects is the list of normal user, serviceaccount, or group that this rule cares about. // There must be at least one member in this slice. // A slice that includes both the system:authenticated and system:unauthenticated user groups matches every request. - // +listType=set + // +listType=atomic // Required. Subjects []Subject `json:"subjects" protobuf:"bytes,1,rep,name=subjects"` // `resourceRules` is a slice of ResourcePolicyRules that identify matching requests according to their verb and the // target resource. // At least one of `resourceRules` and `nonResourceRules` has to be non-empty. - // +listType=set + // +listType=atomic // +optional ResourceRules []ResourcePolicyRule `json:"resourceRules,omitempty" protobuf:"bytes,2,opt,name=resourceRules"` // `nonResourceRules` is a list of NonResourcePolicyRules that identify matching requests according to their verb // and the target non-resource URL. - // +listType=set + // +listType=atomic // +optional NonResourceRules []NonResourcePolicyRule `json:"nonResourceRules,omitempty" protobuf:"bytes,3,opt,name=nonResourceRules"` } @@ -342,7 +350,7 @@ type PriorityLevelConfigurationList struct { // +optional metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // `items` is a list of request-priorities. - // +listType=set + // +listType=atomic Items []PriorityLevelConfiguration `json:"items" protobuf:"bytes,2,rep,name=items"` } diff --git a/vendor/k8s.io/api/flowcontrol/v1alpha1/types_swagger_doc_generated.go b/vendor/k8s.io/api/flowcontrol/v1alpha1/types_swagger_doc_generated.go index 08380a1b1c..ffbee2e3a9 100644 --- a/vendor/k8s.io/api/flowcontrol/v1alpha1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/api/flowcontrol/v1alpha1/types_swagger_doc_generated.go @@ -73,7 +73,7 @@ func (FlowSchemaList) SwaggerDoc() map[string]string { var map_FlowSchemaSpec = map[string]string{ "": "FlowSchemaSpec describes how the FlowSchema's specification looks like.", "priorityLevelConfiguration": "`priorityLevelConfiguration` should reference a PriorityLevelConfiguration in the cluster. If the reference cannot be resolved, the FlowSchema will be ignored and marked as invalid in its status. Required.", - "matchingPrecedence": "`matchingPrecedence` is used to choose among the FlowSchemas that match a given request. The chosen FlowSchema is among those with the numerically lowest (which we take to be logically highest) MatchingPrecedence. Each MatchingPrecedence value must be non-negative. Note that if the precedence is not specified or zero, it will be set to 1000 as default.", + "matchingPrecedence": "`matchingPrecedence` is used to choose among the FlowSchemas that match a given request. The chosen FlowSchema is among those with the numerically lowest (which we take to be logically highest) MatchingPrecedence. Each MatchingPrecedence value must be ranged in [1,10000]. Note that if the precedence is not specified, it will be set to 1000 as default.", "distinguisherMethod": "`distinguisherMethod` defines how to compute the flow distinguisher for requests that match this schema. `nil` specifies that the distinguisher is disabled and thus will always be the empty string.", "rules": "`rules` describes which requests will match this flow schema. This FlowSchema matches a request if and only if at least one member of rules matches the request. if it is an empty slice, there will be no requests matching the FlowSchema.", } diff --git a/vendor/k8s.io/api/networking/v1/generated.pb.go b/vendor/k8s.io/api/networking/v1/generated.pb.go index c9b22fc794..1ff2339ba4 100644 --- a/vendor/k8s.io/api/networking/v1/generated.pb.go +++ b/vendor/k8s.io/api/networking/v1/generated.pb.go @@ -46,7 +46,7 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *IPBlock) Reset() { *m = IPBlock{} } func (*IPBlock) ProtoMessage() {} @@ -2119,6 +2119,7 @@ func (m *NetworkPolicySpec) Unmarshal(dAtA []byte) error { func skipGenerated(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -2150,10 +2151,8 @@ func skipGenerated(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -2174,55 +2173,30 @@ func skipGenerated(dAtA []byte) (n int, err error) { return 0, ErrInvalidLengthGenerated } iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - return iNdEx, nil case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipGenerated(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenerated + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenerated + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group") ) diff --git a/vendor/k8s.io/api/networking/v1/generated.proto b/vendor/k8s.io/api/networking/v1/generated.proto index 3cb7380452..f2aa96900c 100644 --- a/vendor/k8s.io/api/networking/v1/generated.proto +++ b/vendor/k8s.io/api/networking/v1/generated.proto @@ -30,16 +30,16 @@ import "k8s.io/apimachinery/pkg/util/intstr/generated.proto"; // Package-wide variables from generator "generated". option go_package = "v1"; -// IPBlock describes a particular CIDR (Ex. "192.168.1.1/24") that is allowed to the pods -// matched by a NetworkPolicySpec's podSelector. The except entry describes CIDRs that should -// not be included within this rule. +// IPBlock describes a particular CIDR (Ex. "192.168.1.1/24","2001:db9::/64") that is allowed +// to the pods matched by a NetworkPolicySpec's podSelector. The except entry describes CIDRs +// that should not be included within this rule. message IPBlock { // CIDR is a string representing the IP Block - // Valid examples are "192.168.1.1/24" + // Valid examples are "192.168.1.1/24" or "2001:db9::/64" optional string cidr = 1; // Except is a slice of CIDRs that should not be included within an IP Block - // Valid examples are "192.168.1.1/24" + // Valid examples are "192.168.1.1/24" or "2001:db9::/64" // Except values will be rejected if they are outside the CIDR range // +optional repeated string except = 2; diff --git a/vendor/k8s.io/api/networking/v1/types.go b/vendor/k8s.io/api/networking/v1/types.go index 38a640f0b9..73580a50cf 100644 --- a/vendor/k8s.io/api/networking/v1/types.go +++ b/vendor/k8s.io/api/networking/v1/types.go @@ -147,15 +147,15 @@ type NetworkPolicyPort struct { Port *intstr.IntOrString `json:"port,omitempty" protobuf:"bytes,2,opt,name=port"` } -// IPBlock describes a particular CIDR (Ex. "192.168.1.1/24") that is allowed to the pods -// matched by a NetworkPolicySpec's podSelector. The except entry describes CIDRs that should -// not be included within this rule. +// IPBlock describes a particular CIDR (Ex. "192.168.1.1/24","2001:db9::/64") that is allowed +// to the pods matched by a NetworkPolicySpec's podSelector. The except entry describes CIDRs +// that should not be included within this rule. type IPBlock struct { // CIDR is a string representing the IP Block - // Valid examples are "192.168.1.1/24" + // Valid examples are "192.168.1.1/24" or "2001:db9::/64" CIDR string `json:"cidr" protobuf:"bytes,1,name=cidr"` // Except is a slice of CIDRs that should not be included within an IP Block - // Valid examples are "192.168.1.1/24" + // Valid examples are "192.168.1.1/24" or "2001:db9::/64" // Except values will be rejected if they are outside the CIDR range // +optional Except []string `json:"except,omitempty" protobuf:"bytes,2,rep,name=except"` diff --git a/vendor/k8s.io/api/networking/v1/types_swagger_doc_generated.go b/vendor/k8s.io/api/networking/v1/types_swagger_doc_generated.go index 188b72a1ca..b404e5b116 100644 --- a/vendor/k8s.io/api/networking/v1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/api/networking/v1/types_swagger_doc_generated.go @@ -28,9 +28,9 @@ package v1 // AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT. var map_IPBlock = map[string]string{ - "": "IPBlock describes a particular CIDR (Ex. \"192.168.1.1/24\") that is allowed to the pods matched by a NetworkPolicySpec's podSelector. The except entry describes CIDRs that should not be included within this rule.", - "cidr": "CIDR is a string representing the IP Block Valid examples are \"192.168.1.1/24\"", - "except": "Except is a slice of CIDRs that should not be included within an IP Block Valid examples are \"192.168.1.1/24\" Except values will be rejected if they are outside the CIDR range", + "": "IPBlock describes a particular CIDR (Ex. \"192.168.1.1/24\",\"2001:db9::/64\") that is allowed to the pods matched by a NetworkPolicySpec's podSelector. The except entry describes CIDRs that should not be included within this rule.", + "cidr": "CIDR is a string representing the IP Block Valid examples are \"192.168.1.1/24\" or \"2001:db9::/64\"", + "except": "Except is a slice of CIDRs that should not be included within an IP Block Valid examples are \"192.168.1.1/24\" or \"2001:db9::/64\" Except values will be rejected if they are outside the CIDR range", } func (IPBlock) SwaggerDoc() map[string]string { diff --git a/vendor/k8s.io/api/networking/v1beta1/generated.pb.go b/vendor/k8s.io/api/networking/v1beta1/generated.pb.go index 8ed5600903..6f51df864b 100644 --- a/vendor/k8s.io/api/networking/v1beta1/generated.pb.go +++ b/vendor/k8s.io/api/networking/v1beta1/generated.pb.go @@ -25,6 +25,7 @@ import ( io "io" proto "github.com/gogo/protobuf/proto" + v11 "k8s.io/api/core/v1" math "math" math_bits "math/bits" @@ -41,7 +42,7 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *HTTPIngressPath) Reset() { *m = HTTPIngressPath{} } func (*HTTPIngressPath) ProtoMessage() {} @@ -155,10 +156,94 @@ func (m *IngressBackend) XXX_DiscardUnknown() { var xxx_messageInfo_IngressBackend proto.InternalMessageInfo +func (m *IngressClass) Reset() { *m = IngressClass{} } +func (*IngressClass) ProtoMessage() {} +func (*IngressClass) Descriptor() ([]byte, []int) { + return fileDescriptor_5bea11de0ceb8f53, []int{4} +} +func (m *IngressClass) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *IngressClass) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *IngressClass) XXX_Merge(src proto.Message) { + xxx_messageInfo_IngressClass.Merge(m, src) +} +func (m *IngressClass) XXX_Size() int { + return m.Size() +} +func (m *IngressClass) XXX_DiscardUnknown() { + xxx_messageInfo_IngressClass.DiscardUnknown(m) +} + +var xxx_messageInfo_IngressClass proto.InternalMessageInfo + +func (m *IngressClassList) Reset() { *m = IngressClassList{} } +func (*IngressClassList) ProtoMessage() {} +func (*IngressClassList) Descriptor() ([]byte, []int) { + return fileDescriptor_5bea11de0ceb8f53, []int{5} +} +func (m *IngressClassList) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *IngressClassList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *IngressClassList) XXX_Merge(src proto.Message) { + xxx_messageInfo_IngressClassList.Merge(m, src) +} +func (m *IngressClassList) XXX_Size() int { + return m.Size() +} +func (m *IngressClassList) XXX_DiscardUnknown() { + xxx_messageInfo_IngressClassList.DiscardUnknown(m) +} + +var xxx_messageInfo_IngressClassList proto.InternalMessageInfo + +func (m *IngressClassSpec) Reset() { *m = IngressClassSpec{} } +func (*IngressClassSpec) ProtoMessage() {} +func (*IngressClassSpec) Descriptor() ([]byte, []int) { + return fileDescriptor_5bea11de0ceb8f53, []int{6} +} +func (m *IngressClassSpec) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *IngressClassSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *IngressClassSpec) XXX_Merge(src proto.Message) { + xxx_messageInfo_IngressClassSpec.Merge(m, src) +} +func (m *IngressClassSpec) XXX_Size() int { + return m.Size() +} +func (m *IngressClassSpec) XXX_DiscardUnknown() { + xxx_messageInfo_IngressClassSpec.DiscardUnknown(m) +} + +var xxx_messageInfo_IngressClassSpec proto.InternalMessageInfo + func (m *IngressList) Reset() { *m = IngressList{} } func (*IngressList) ProtoMessage() {} func (*IngressList) Descriptor() ([]byte, []int) { - return fileDescriptor_5bea11de0ceb8f53, []int{4} + return fileDescriptor_5bea11de0ceb8f53, []int{7} } func (m *IngressList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -186,7 +271,7 @@ var xxx_messageInfo_IngressList proto.InternalMessageInfo func (m *IngressRule) Reset() { *m = IngressRule{} } func (*IngressRule) ProtoMessage() {} func (*IngressRule) Descriptor() ([]byte, []int) { - return fileDescriptor_5bea11de0ceb8f53, []int{5} + return fileDescriptor_5bea11de0ceb8f53, []int{8} } func (m *IngressRule) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -214,7 +299,7 @@ var xxx_messageInfo_IngressRule proto.InternalMessageInfo func (m *IngressRuleValue) Reset() { *m = IngressRuleValue{} } func (*IngressRuleValue) ProtoMessage() {} func (*IngressRuleValue) Descriptor() ([]byte, []int) { - return fileDescriptor_5bea11de0ceb8f53, []int{6} + return fileDescriptor_5bea11de0ceb8f53, []int{9} } func (m *IngressRuleValue) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -242,7 +327,7 @@ var xxx_messageInfo_IngressRuleValue proto.InternalMessageInfo func (m *IngressSpec) Reset() { *m = IngressSpec{} } func (*IngressSpec) ProtoMessage() {} func (*IngressSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_5bea11de0ceb8f53, []int{7} + return fileDescriptor_5bea11de0ceb8f53, []int{10} } func (m *IngressSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -270,7 +355,7 @@ var xxx_messageInfo_IngressSpec proto.InternalMessageInfo func (m *IngressStatus) Reset() { *m = IngressStatus{} } func (*IngressStatus) ProtoMessage() {} func (*IngressStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_5bea11de0ceb8f53, []int{8} + return fileDescriptor_5bea11de0ceb8f53, []int{11} } func (m *IngressStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -298,7 +383,7 @@ var xxx_messageInfo_IngressStatus proto.InternalMessageInfo func (m *IngressTLS) Reset() { *m = IngressTLS{} } func (*IngressTLS) ProtoMessage() {} func (*IngressTLS) Descriptor() ([]byte, []int) { - return fileDescriptor_5bea11de0ceb8f53, []int{9} + return fileDescriptor_5bea11de0ceb8f53, []int{12} } func (m *IngressTLS) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -328,6 +413,9 @@ func init() { proto.RegisterType((*HTTPIngressRuleValue)(nil), "k8s.io.api.networking.v1beta1.HTTPIngressRuleValue") proto.RegisterType((*Ingress)(nil), "k8s.io.api.networking.v1beta1.Ingress") proto.RegisterType((*IngressBackend)(nil), "k8s.io.api.networking.v1beta1.IngressBackend") + proto.RegisterType((*IngressClass)(nil), "k8s.io.api.networking.v1beta1.IngressClass") + proto.RegisterType((*IngressClassList)(nil), "k8s.io.api.networking.v1beta1.IngressClassList") + proto.RegisterType((*IngressClassSpec)(nil), "k8s.io.api.networking.v1beta1.IngressClassSpec") proto.RegisterType((*IngressList)(nil), "k8s.io.api.networking.v1beta1.IngressList") proto.RegisterType((*IngressRule)(nil), "k8s.io.api.networking.v1beta1.IngressRule") proto.RegisterType((*IngressRuleValue)(nil), "k8s.io.api.networking.v1beta1.IngressRuleValue") @@ -341,58 +429,69 @@ func init() { } var fileDescriptor_5bea11de0ceb8f53 = []byte{ - // 812 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x55, 0xcf, 0x6e, 0xfb, 0x44, - 0x10, 0x8e, 0xf3, 0xa7, 0x69, 0xd7, 0xfd, 0xa7, 0xa5, 0x87, 0xa8, 0x12, 0x6e, 0xe4, 0x03, 0x2a, - 0x88, 0xae, 0x69, 0x0a, 0x88, 0xb3, 0x0f, 0xa8, 0x15, 0x81, 0x86, 0x75, 0x84, 0x10, 0xe2, 0xd0, - 0x8d, 0xb3, 0x38, 0x26, 0x89, 0x6d, 0x76, 0xd7, 0x41, 0xdc, 0x78, 0x01, 0x04, 0x4f, 0xc1, 0x99, - 0x23, 0x8f, 0xd0, 0x63, 0x8f, 0x3d, 0x55, 0x34, 0xbc, 0x07, 0x42, 0xbb, 0xde, 0xda, 0x4e, 0xd2, - 0xfe, 0x6a, 0xfd, 0x6e, 0xde, 0x9d, 0xf9, 0xbe, 0xd9, 0x99, 0xf9, 0x66, 0x0c, 0x3e, 0x9f, 0x7e, - 0xc6, 0x51, 0x18, 0x3b, 0xd3, 0x74, 0x44, 0x59, 0x44, 0x05, 0xe5, 0xce, 0x82, 0x46, 0xe3, 0x98, - 0x39, 0xda, 0x40, 0x92, 0xd0, 0x89, 0xa8, 0xf8, 0x39, 0x66, 0xd3, 0x30, 0x0a, 0x9c, 0xc5, 0xf9, - 0x88, 0x0a, 0x72, 0xee, 0x04, 0x34, 0xa2, 0x8c, 0x08, 0x3a, 0x46, 0x09, 0x8b, 0x45, 0x0c, 0xdf, - 0xcd, 0xdc, 0x11, 0x49, 0x42, 0x54, 0xb8, 0x23, 0xed, 0x7e, 0x7c, 0x16, 0x84, 0x62, 0x92, 0x8e, - 0x90, 0x1f, 0xcf, 0x9d, 0x20, 0x0e, 0x62, 0x47, 0xa1, 0x46, 0xe9, 0x0f, 0xea, 0xa4, 0x0e, 0xea, - 0x2b, 0x63, 0x3b, 0xb6, 0x4b, 0xc1, 0xfd, 0x98, 0x51, 0x67, 0xb1, 0x11, 0xf1, 0xf8, 0xe3, 0xc2, - 0x67, 0x4e, 0xfc, 0x49, 0x18, 0x51, 0xf6, 0x8b, 0x93, 0x4c, 0x03, 0x79, 0xc1, 0x9d, 0x39, 0x15, - 0xe4, 0x39, 0x94, 0xf3, 0x12, 0x8a, 0xa5, 0x91, 0x08, 0xe7, 0x74, 0x03, 0xf0, 0xe9, 0x6b, 0x00, - 0xee, 0x4f, 0xe8, 0x9c, 0x6c, 0xe0, 0x2e, 0x5e, 0xc2, 0xa5, 0x22, 0x9c, 0x39, 0x61, 0x24, 0xb8, - 0x60, 0xeb, 0x20, 0xfb, 0x37, 0x03, 0x1c, 0x5c, 0x0e, 0x87, 0x83, 0xab, 0x28, 0x60, 0x94, 0xf3, - 0x01, 0x11, 0x13, 0xd8, 0x05, 0xcd, 0x84, 0x88, 0x49, 0xc7, 0xe8, 0x1a, 0xa7, 0x3b, 0xee, 0xee, - 0xed, 0xc3, 0x49, 0x6d, 0xf9, 0x70, 0xd2, 0x94, 0x36, 0xac, 0x2c, 0xf0, 0x5b, 0xd0, 0x1e, 0x11, - 0x7f, 0x4a, 0xa3, 0x71, 0xa7, 0xde, 0x35, 0x4e, 0xcd, 0xde, 0x19, 0x7a, 0x63, 0x37, 0x90, 0xa6, - 0x77, 0x33, 0x90, 0x7b, 0xa0, 0x39, 0xdb, 0xfa, 0x02, 0x3f, 0xd1, 0xd9, 0x53, 0x70, 0x54, 0x7a, - 0x0e, 0x4e, 0x67, 0xf4, 0x1b, 0x32, 0x4b, 0x29, 0xf4, 0x40, 0x4b, 0x46, 0xe6, 0x1d, 0xa3, 0xdb, - 0x38, 0x35, 0x7b, 0xe8, 0x95, 0x78, 0x6b, 0x29, 0xb9, 0x7b, 0x3a, 0x60, 0x4b, 0x9e, 0x38, 0xce, - 0xb8, 0xec, 0xdf, 0xeb, 0xa0, 0xad, 0xbd, 0xe0, 0x0d, 0xd8, 0x96, 0x1d, 0x1c, 0x13, 0x41, 0x54, - 0xe2, 0x66, 0xef, 0xa3, 0x52, 0x8c, 0xbc, 0xa0, 0x28, 0x99, 0x06, 0xf2, 0x82, 0x23, 0xe9, 0x8d, - 0x16, 0xe7, 0xe8, 0x7a, 0xf4, 0x23, 0xf5, 0xc5, 0x97, 0x54, 0x10, 0x17, 0xea, 0x28, 0xa0, 0xb8, - 0xc3, 0x39, 0x2b, 0xec, 0x83, 0x26, 0x4f, 0xa8, 0xaf, 0x2b, 0xf6, 0x41, 0xb5, 0x8a, 0x79, 0x09, - 0xf5, 0x8b, 0x16, 0xc8, 0x13, 0x56, 0x2c, 0x70, 0x08, 0xb6, 0xb8, 0x20, 0x22, 0xe5, 0x9d, 0x86, - 0xe2, 0xfb, 0xb0, 0x22, 0x9f, 0xc2, 0xb8, 0xfb, 0x9a, 0x71, 0x2b, 0x3b, 0x63, 0xcd, 0x65, 0xff, - 0x65, 0x80, 0xfd, 0xd5, 0x5e, 0xc1, 0x4f, 0x80, 0xc9, 0x29, 0x5b, 0x84, 0x3e, 0xfd, 0x8a, 0xcc, - 0xa9, 0x16, 0xc5, 0x3b, 0x1a, 0x6f, 0x7a, 0x85, 0x09, 0x97, 0xfd, 0x60, 0x90, 0xc3, 0x06, 0x31, - 0x13, 0x3a, 0xe9, 0x97, 0x4b, 0x2a, 0x35, 0x8a, 0x32, 0x8d, 0xa2, 0xab, 0x48, 0x5c, 0x33, 0x4f, - 0xb0, 0x30, 0x0a, 0x36, 0x02, 0x49, 0x32, 0x5c, 0x66, 0xb6, 0xff, 0x36, 0x80, 0xa9, 0x9f, 0xdc, - 0x0f, 0xb9, 0x80, 0xdf, 0x6f, 0x34, 0x12, 0x55, 0x6b, 0xa4, 0x44, 0xab, 0x36, 0x1e, 0xea, 0x98, - 0xdb, 0x4f, 0x37, 0xa5, 0x26, 0x7e, 0x01, 0x5a, 0xa1, 0xa0, 0x73, 0xde, 0xa9, 0x2b, 0x1d, 0xbe, - 0x57, 0x51, 0xf7, 0xb9, 0xfe, 0xae, 0x24, 0x18, 0x67, 0x1c, 0xf6, 0x9f, 0xc5, 0xd3, 0xa5, 0xd2, - 0xe5, 0xe0, 0x4d, 0x62, 0x2e, 0xd6, 0x07, 0xef, 0x32, 0xe6, 0x02, 0x2b, 0x0b, 0x4c, 0xc1, 0x61, - 0xb8, 0x36, 0x1a, 0xba, 0xb4, 0x4e, 0xb5, 0x97, 0xe4, 0x30, 0xb7, 0xa3, 0xe9, 0x0f, 0xd7, 0x2d, - 0x78, 0x23, 0x84, 0x4d, 0xc1, 0x86, 0x17, 0xfc, 0x1a, 0x34, 0x27, 0x42, 0x24, 0xba, 0xc6, 0x17, - 0xd5, 0x07, 0xb2, 0x78, 0xc2, 0xb6, 0xca, 0x6e, 0x38, 0x1c, 0x60, 0x45, 0x65, 0xff, 0x57, 0xd4, - 0xc3, 0xcb, 0x34, 0x9e, 0xaf, 0x19, 0xe3, 0x6d, 0xd6, 0x8c, 0xf9, 0xdc, 0x8a, 0x81, 0x97, 0xa0, - 0x21, 0x66, 0x4f, 0x0d, 0x7c, 0xbf, 0x1a, 0xe3, 0xb0, 0xef, 0xb9, 0xa6, 0x2e, 0x58, 0x63, 0xd8, - 0xf7, 0xb0, 0xa4, 0x80, 0xd7, 0xa0, 0xc5, 0xd2, 0x19, 0x95, 0x23, 0xd8, 0xa8, 0x3e, 0xd2, 0x32, - 0xff, 0x42, 0x10, 0xf2, 0xc4, 0x71, 0xc6, 0x63, 0xff, 0x04, 0xf6, 0x56, 0xe6, 0x14, 0xde, 0x80, - 0xdd, 0x59, 0x4c, 0xc6, 0x2e, 0x99, 0x91, 0xc8, 0xa7, 0x4c, 0x97, 0x61, 0x45, 0x75, 0xf2, 0x6f, - 0xa5, 0xe4, 0x5b, 0xf2, 0xd3, 0x53, 0x7e, 0xa4, 0x83, 0xec, 0x96, 0x6d, 0x78, 0x85, 0xd1, 0x26, - 0x00, 0x14, 0x39, 0xc2, 0x13, 0xd0, 0x92, 0x3a, 0xcb, 0xd6, 0xec, 0x8e, 0xbb, 0x23, 0x5f, 0x28, - 0xe5, 0xc7, 0x71, 0x76, 0x0f, 0x7b, 0x00, 0x70, 0xea, 0x33, 0x2a, 0xd4, 0x32, 0xa8, 0x2b, 0xa1, - 0xe6, 0x6b, 0xcf, 0xcb, 0x2d, 0xb8, 0xe4, 0xe5, 0x9e, 0xdd, 0x3e, 0x5a, 0xb5, 0xbb, 0x47, 0xab, - 0x76, 0xff, 0x68, 0xd5, 0x7e, 0x5d, 0x5a, 0xc6, 0xed, 0xd2, 0x32, 0xee, 0x96, 0x96, 0x71, 0xbf, - 0xb4, 0x8c, 0x7f, 0x96, 0x96, 0xf1, 0xc7, 0xbf, 0x56, 0xed, 0xbb, 0xb6, 0x2e, 0xd3, 0xff, 0x01, - 0x00, 0x00, 0xff, 0xff, 0xdb, 0x8a, 0xe4, 0xd8, 0x21, 0x08, 0x00, 0x00, + // 990 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0x4f, 0x6f, 0xe3, 0x44, + 0x14, 0xaf, 0x93, 0x66, 0x9b, 0x4e, 0xb2, 0xdd, 0x6a, 0xe8, 0x21, 0xaa, 0x84, 0x5b, 0xf9, 0x80, + 0xca, 0x9f, 0xda, 0x34, 0xbb, 0x20, 0x8e, 0xc8, 0x2b, 0xa1, 0x56, 0x04, 0x1a, 0x26, 0x16, 0x20, + 0x04, 0xd2, 0x4e, 0x9c, 0xb7, 0x8e, 0x89, 0x63, 0x9b, 0x99, 0x71, 0xd0, 0xde, 0xb8, 0x72, 0x82, + 0x2f, 0x01, 0x9f, 0x81, 0x23, 0x82, 0x4b, 0x8f, 0x7b, 0xdc, 0x53, 0x45, 0xc3, 0xb7, 0xe0, 0x84, + 0x66, 0x3c, 0xb5, 0x9d, 0xa4, 0xa5, 0x59, 0x0e, 0x7b, 0x8a, 0x67, 0xde, 0x7b, 0xbf, 0x37, 0xef, + 0xf7, 0x7e, 0x33, 0x2f, 0xe8, 0xa3, 0xc9, 0x07, 0xdc, 0x0e, 0x13, 0x67, 0x92, 0x0d, 0x81, 0xc5, + 0x20, 0x80, 0x3b, 0x33, 0x88, 0x47, 0x09, 0x73, 0xb4, 0x81, 0xa6, 0xa1, 0x13, 0x83, 0xf8, 0x3e, + 0x61, 0x93, 0x30, 0x0e, 0x9c, 0xd9, 0xc9, 0x10, 0x04, 0x3d, 0x71, 0x02, 0x88, 0x81, 0x51, 0x01, + 0x23, 0x3b, 0x65, 0x89, 0x48, 0xf0, 0xeb, 0xb9, 0xbb, 0x4d, 0xd3, 0xd0, 0x2e, 0xdd, 0x6d, 0xed, + 0xbe, 0x7f, 0x1c, 0x84, 0x62, 0x9c, 0x0d, 0x6d, 0x3f, 0x99, 0x3a, 0x41, 0x12, 0x24, 0x8e, 0x8a, + 0x1a, 0x66, 0x4f, 0xd5, 0x4a, 0x2d, 0xd4, 0x57, 0x8e, 0xb6, 0x6f, 0x55, 0x92, 0xfb, 0x09, 0x03, + 0x67, 0xb6, 0x92, 0x71, 0xff, 0x51, 0xe9, 0x33, 0xa5, 0xfe, 0x38, 0x8c, 0x81, 0x3d, 0x73, 0xd2, + 0x49, 0x20, 0x37, 0xb8, 0x33, 0x05, 0x41, 0x6f, 0x8a, 0x72, 0x6e, 0x8b, 0x62, 0x59, 0x2c, 0xc2, + 0x29, 0xac, 0x04, 0xbc, 0x7f, 0x57, 0x00, 0xf7, 0xc7, 0x30, 0xa5, 0x2b, 0x71, 0x0f, 0x6f, 0x8b, + 0xcb, 0x44, 0x18, 0x39, 0x61, 0x2c, 0xb8, 0x60, 0xcb, 0x41, 0xd6, 0x9f, 0x06, 0x7a, 0x70, 0xea, + 0x79, 0xfd, 0xb3, 0x38, 0x60, 0xc0, 0x79, 0x9f, 0x8a, 0x31, 0x3e, 0x44, 0x9b, 0x29, 0x15, 0xe3, + 0x8e, 0x71, 0x68, 0x1c, 0x6d, 0xbb, 0xed, 0x8b, 0xcb, 0x83, 0x8d, 0xf9, 0xe5, 0xc1, 0xa6, 0xb4, + 0x11, 0x65, 0xc1, 0x8f, 0x50, 0x53, 0xfe, 0x7a, 0xcf, 0x52, 0xe8, 0xd4, 0x95, 0x57, 0x67, 0x7e, + 0x79, 0xd0, 0xec, 0xeb, 0xbd, 0x7f, 0x2a, 0xdf, 0xa4, 0xf0, 0xc4, 0x5f, 0xa2, 0xad, 0x21, 0xf5, + 0x27, 0x10, 0x8f, 0x3a, 0xb5, 0x43, 0xe3, 0xa8, 0xd5, 0x3d, 0xb6, 0xff, 0xb3, 0x87, 0xb6, 0x3e, + 0x94, 0x9b, 0x07, 0xb9, 0x0f, 0xf4, 0x49, 0xb6, 0xf4, 0x06, 0xb9, 0x86, 0xb3, 0x26, 0x68, 0xaf, + 0x52, 0x04, 0xc9, 0x22, 0xf8, 0x9c, 0x46, 0x19, 0xe0, 0x01, 0x6a, 0xc8, 0xec, 0xbc, 0x63, 0x1c, + 0xd6, 0x8f, 0x5a, 0x5d, 0xfb, 0x8e, 0x7c, 0x4b, 0x44, 0xb8, 0xf7, 0x75, 0xc2, 0x86, 0x5c, 0x71, + 0x92, 0x63, 0x59, 0x3f, 0xd5, 0xd0, 0x96, 0xf6, 0xc2, 0x4f, 0x50, 0x53, 0xf6, 0x7d, 0x44, 0x05, + 0x55, 0x74, 0xb5, 0xba, 0xef, 0x56, 0x72, 0x14, 0x6d, 0xb0, 0xd3, 0x49, 0x20, 0x37, 0xb8, 0x2d, + 0xbd, 0xed, 0xd9, 0x89, 0x7d, 0x3e, 0xfc, 0x16, 0x7c, 0xf1, 0x09, 0x08, 0xea, 0x62, 0x9d, 0x05, + 0x95, 0x7b, 0xa4, 0x40, 0xc5, 0x3d, 0xb4, 0xc9, 0x53, 0xf0, 0x35, 0x63, 0x6f, 0xad, 0xc7, 0xd8, + 0x20, 0x05, 0xbf, 0x6c, 0x9c, 0x5c, 0x11, 0x85, 0x82, 0x3d, 0x74, 0x8f, 0x0b, 0x2a, 0x32, 0xae, + 0xda, 0xd6, 0xea, 0xbe, 0xb3, 0x26, 0x9e, 0x8a, 0x71, 0x77, 0x34, 0xe2, 0xbd, 0x7c, 0x4d, 0x34, + 0x96, 0xf5, 0x63, 0x0d, 0xed, 0x2c, 0xf6, 0x0a, 0xbf, 0x87, 0x5a, 0x1c, 0xd8, 0x2c, 0xf4, 0xe1, + 0x53, 0x3a, 0x05, 0x2d, 0xa5, 0xd7, 0x74, 0x7c, 0x6b, 0x50, 0x9a, 0x48, 0xd5, 0x0f, 0x07, 0x45, + 0x58, 0x3f, 0x61, 0x42, 0x17, 0x7d, 0x3b, 0xa5, 0x52, 0xd9, 0x76, 0xae, 0x6c, 0xfb, 0x2c, 0x16, + 0xe7, 0x6c, 0x20, 0x58, 0x18, 0x07, 0x2b, 0x89, 0x24, 0x18, 0xa9, 0x22, 0xe3, 0x2f, 0x50, 0x93, + 0x01, 0x4f, 0x32, 0xe6, 0x83, 0xa6, 0x62, 0x41, 0x8c, 0xf2, 0x09, 0x90, 0x6d, 0x92, 0xba, 0x1d, + 0xf5, 0x12, 0x9f, 0x46, 0x79, 0x73, 0x08, 0x3c, 0x05, 0x06, 0xb1, 0x0f, 0x6e, 0x5b, 0x0a, 0x9e, + 0x68, 0x08, 0x52, 0x80, 0xc9, 0x0b, 0xd5, 0xd6, 0x5c, 0x3c, 0x8e, 0xe8, 0x2b, 0x91, 0xc8, 0x67, + 0x0b, 0x12, 0x71, 0xd6, 0x6b, 0xa9, 0x3a, 0xdc, 0x6d, 0x3a, 0xb1, 0xfe, 0x30, 0xd0, 0x6e, 0xd5, + 0xb1, 0x17, 0x72, 0x81, 0xbf, 0x5e, 0xa9, 0xc4, 0x5e, 0xaf, 0x12, 0x19, 0xad, 0xea, 0xd8, 0xd5, + 0xa9, 0x9a, 0xd7, 0x3b, 0x95, 0x2a, 0xfa, 0xa8, 0x11, 0x0a, 0x98, 0xf2, 0x4e, 0x4d, 0xdd, 0xd5, + 0xb7, 0x5f, 0xa2, 0x8c, 0xf2, 0xa2, 0x9e, 0x49, 0x04, 0x92, 0x03, 0x59, 0xbf, 0x2c, 0x15, 0x21, + 0xeb, 0xc3, 0x5d, 0x84, 0xfc, 0x24, 0x16, 0x2c, 0x89, 0x22, 0x60, 0x5a, 0x97, 0x05, 0xbd, 0x8f, + 0x0b, 0x0b, 0xa9, 0x78, 0xe1, 0x6f, 0x10, 0x4a, 0x29, 0xa3, 0x53, 0x10, 0xc0, 0xf8, 0x4d, 0x6f, + 0xd7, 0xdd, 0x72, 0xd9, 0x91, 0xf0, 0xfd, 0x02, 0x84, 0x54, 0x00, 0xad, 0xdf, 0x0c, 0xd4, 0xd2, + 0xe7, 0x7c, 0x05, 0x3c, 0x7f, 0xbc, 0xc8, 0xf3, 0x1b, 0x6b, 0xbe, 0xc1, 0x37, 0x53, 0xfc, 0x6b, + 0x79, 0x74, 0xf9, 0xea, 0xca, 0xd1, 0x31, 0x4e, 0xb8, 0x58, 0x1e, 0x1d, 0xa7, 0x09, 0x17, 0x44, + 0x59, 0x70, 0x86, 0x76, 0xc3, 0xa5, 0x67, 0xfa, 0xe5, 0x84, 0x5b, 0x84, 0xb9, 0x1d, 0x0d, 0xbf, + 0xbb, 0x6c, 0x21, 0x2b, 0x29, 0x2c, 0x40, 0x2b, 0x5e, 0xf2, 0xde, 0x8c, 0x85, 0x48, 0x35, 0xc7, + 0x0f, 0xd7, 0x1f, 0x0e, 0xe5, 0x11, 0x9a, 0xaa, 0x3a, 0xcf, 0xeb, 0x13, 0x05, 0x65, 0xfd, 0x5e, + 0x2b, 0xf8, 0x50, 0x6a, 0xfb, 0xb0, 0xa8, 0x56, 0x29, 0x50, 0xbd, 0x85, 0x9b, 0x8a, 0x9b, 0xbd, + 0xca, 0xc1, 0x0b, 0x1b, 0x59, 0xf1, 0xc6, 0x5e, 0x39, 0x34, 0x8d, 0xff, 0x33, 0x34, 0x5b, 0x37, + 0x0d, 0x4c, 0x7c, 0x8a, 0xea, 0x22, 0xba, 0x96, 0xc0, 0x9b, 0xeb, 0x21, 0x7a, 0xbd, 0x81, 0xdb, + 0xd2, 0x94, 0xd7, 0xbd, 0xde, 0x80, 0x48, 0x08, 0x7c, 0x8e, 0x1a, 0x2c, 0x8b, 0x40, 0x0e, 0x94, + 0xfa, 0xfa, 0x03, 0x4a, 0x32, 0x58, 0x4a, 0x4a, 0xae, 0x38, 0xc9, 0x71, 0xac, 0xef, 0xd0, 0xfd, + 0x85, 0xa9, 0x83, 0x9f, 0xa0, 0x76, 0x94, 0xd0, 0x91, 0x4b, 0x23, 0x1a, 0xfb, 0xfa, 0xce, 0x2e, + 0xe9, 0xf6, 0xfa, 0xfe, 0xf5, 0x2a, 0x7e, 0x7a, 0x66, 0xed, 0xe9, 0x24, 0xed, 0xaa, 0x8d, 0x2c, + 0x20, 0x5a, 0x14, 0xa1, 0xb2, 0x46, 0x7c, 0x80, 0x1a, 0x52, 0xa9, 0xf9, 0x9f, 0x86, 0x6d, 0x77, + 0x5b, 0x9e, 0x50, 0x0a, 0x98, 0x93, 0x7c, 0x5f, 0x3e, 0x21, 0x1c, 0x7c, 0x06, 0x42, 0xb5, 0xb3, + 0xb6, 0xf8, 0x84, 0x0c, 0x0a, 0x0b, 0xa9, 0x78, 0xb9, 0xc7, 0x17, 0x57, 0xe6, 0xc6, 0xf3, 0x2b, + 0x73, 0xe3, 0xc5, 0x95, 0xb9, 0xf1, 0xc3, 0xdc, 0x34, 0x2e, 0xe6, 0xa6, 0xf1, 0x7c, 0x6e, 0x1a, + 0x2f, 0xe6, 0xa6, 0xf1, 0xd7, 0xdc, 0x34, 0x7e, 0xfe, 0xdb, 0xdc, 0xf8, 0x6a, 0x4b, 0xd3, 0xf4, + 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x6e, 0x54, 0x4d, 0x9d, 0x25, 0x0b, 0x00, 0x00, } func (m *HTTPIngressPath) Marshal() (dAtA []byte, err error) { @@ -415,6 +514,13 @@ func (m *HTTPIngressPath) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.PathType != nil { + i -= len(*m.PathType) + copy(dAtA[i:], *m.PathType) + i = encodeVarintGenerated(dAtA, i, uint64(len(*m.PathType))) + i-- + dAtA[i] = 0x1a + } { size, err := m.Backend.MarshalToSizedBuffer(dAtA[:i]) if err != nil { @@ -543,6 +649,18 @@ func (m *IngressBackend) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.Resource != nil { + { + size, err := m.Resource.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } { size, err := m.ServicePort.MarshalToSizedBuffer(dAtA[:i]) if err != nil { @@ -561,6 +679,136 @@ func (m *IngressBackend) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *IngressClass) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *IngressClass) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *IngressClass) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *IngressClassList) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *IngressClassList) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *IngressClassList) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Items) > 0 { + for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + { + size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *IngressClassSpec) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *IngressClassSpec) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *IngressClassSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Parameters != nil { + { + size, err := m.Parameters.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + i -= len(m.Controller) + copy(dAtA[i:], m.Controller) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Controller))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + func (m *IngressList) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -701,6 +949,13 @@ func (m *IngressSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.IngressClassName != nil { + i -= len(*m.IngressClassName) + copy(dAtA[i:], *m.IngressClassName) + i = encodeVarintGenerated(dAtA, i, uint64(len(*m.IngressClassName))) + i-- + dAtA[i] = 0x22 + } if len(m.Rules) > 0 { for iNdEx := len(m.Rules) - 1; iNdEx >= 0; iNdEx-- { { @@ -835,6 +1090,10 @@ func (m *HTTPIngressPath) Size() (n int) { n += 1 + l + sovGenerated(uint64(l)) l = m.Backend.Size() n += 1 + l + sovGenerated(uint64(l)) + if m.PathType != nil { + l = len(*m.PathType) + n += 1 + l + sovGenerated(uint64(l)) + } return n } @@ -878,6 +1137,55 @@ func (m *IngressBackend) Size() (n int) { n += 1 + l + sovGenerated(uint64(l)) l = m.ServicePort.Size() n += 1 + l + sovGenerated(uint64(l)) + if m.Resource != nil { + l = m.Resource.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + return n +} + +func (m *IngressClass) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ObjectMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = m.Spec.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *IngressClassList) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ListMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Items) > 0 { + for _, e := range m.Items { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *IngressClassSpec) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Controller) + n += 1 + l + sovGenerated(uint64(l)) + if m.Parameters != nil { + l = m.Parameters.Size() + n += 1 + l + sovGenerated(uint64(l)) + } return n } @@ -946,6 +1254,10 @@ func (m *IngressSpec) Size() (n int) { n += 1 + l + sovGenerated(uint64(l)) } } + if m.IngressClassName != nil { + l = len(*m.IngressClassName) + n += 1 + l + sovGenerated(uint64(l)) + } return n } @@ -990,6 +1302,7 @@ func (this *HTTPIngressPath) String() string { s := strings.Join([]string{`&HTTPIngressPath{`, `Path:` + fmt.Sprintf("%v", this.Path) + `,`, `Backend:` + strings.Replace(strings.Replace(this.Backend.String(), "IngressBackend", "IngressBackend", 1), `&`, ``, 1) + `,`, + `PathType:` + valueToStringGenerated(this.PathType) + `,`, `}`, }, "") return s @@ -1028,46 +1341,85 @@ func (this *IngressBackend) String() string { s := strings.Join([]string{`&IngressBackend{`, `ServiceName:` + fmt.Sprintf("%v", this.ServiceName) + `,`, `ServicePort:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ServicePort), "IntOrString", "intstr.IntOrString", 1), `&`, ``, 1) + `,`, + `Resource:` + strings.Replace(fmt.Sprintf("%v", this.Resource), "TypedLocalObjectReference", "v11.TypedLocalObjectReference", 1) + `,`, `}`, }, "") return s } -func (this *IngressList) String() string { +func (this *IngressClass) String() string { if this == nil { return "nil" } - repeatedStringForItems := "[]Ingress{" + s := strings.Join([]string{`&IngressClass{`, + `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "IngressClassSpec", "IngressClassSpec", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *IngressClassList) String() string { + if this == nil { + return "nil" + } + repeatedStringForItems := "[]IngressClass{" for _, f := range this.Items { - repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "Ingress", "Ingress", 1), `&`, ``, 1) + "," + repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "IngressClass", "IngressClass", 1), `&`, ``, 1) + "," } repeatedStringForItems += "}" - s := strings.Join([]string{`&IngressList{`, + s := strings.Join([]string{`&IngressClassList{`, `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, `Items:` + repeatedStringForItems + `,`, `}`, }, "") return s } -func (this *IngressRule) String() string { +func (this *IngressClassSpec) String() string { if this == nil { return "nil" } - s := strings.Join([]string{`&IngressRule{`, - `Host:` + fmt.Sprintf("%v", this.Host) + `,`, - `IngressRuleValue:` + strings.Replace(strings.Replace(this.IngressRuleValue.String(), "IngressRuleValue", "IngressRuleValue", 1), `&`, ``, 1) + `,`, + s := strings.Join([]string{`&IngressClassSpec{`, + `Controller:` + fmt.Sprintf("%v", this.Controller) + `,`, + `Parameters:` + strings.Replace(fmt.Sprintf("%v", this.Parameters), "TypedLocalObjectReference", "v11.TypedLocalObjectReference", 1) + `,`, `}`, }, "") return s } -func (this *IngressRuleValue) String() string { +func (this *IngressList) String() string { if this == nil { return "nil" } - s := strings.Join([]string{`&IngressRuleValue{`, - `HTTP:` + strings.Replace(this.HTTP.String(), "HTTPIngressRuleValue", "HTTPIngressRuleValue", 1) + `,`, - `}`, - }, "") - return s + repeatedStringForItems := "[]Ingress{" + for _, f := range this.Items { + repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "Ingress", "Ingress", 1), `&`, ``, 1) + "," + } + repeatedStringForItems += "}" + s := strings.Join([]string{`&IngressList{`, + `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, + `Items:` + repeatedStringForItems + `,`, + `}`, + }, "") + return s +} +func (this *IngressRule) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&IngressRule{`, + `Host:` + fmt.Sprintf("%v", this.Host) + `,`, + `IngressRuleValue:` + strings.Replace(strings.Replace(this.IngressRuleValue.String(), "IngressRuleValue", "IngressRuleValue", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *IngressRuleValue) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&IngressRuleValue{`, + `HTTP:` + strings.Replace(this.HTTP.String(), "HTTPIngressRuleValue", "HTTPIngressRuleValue", 1) + `,`, + `}`, + }, "") + return s } func (this *IngressSpec) String() string { if this == nil { @@ -1087,6 +1439,7 @@ func (this *IngressSpec) String() string { `Backend:` + strings.Replace(this.Backend.String(), "IngressBackend", "IngressBackend", 1) + `,`, `TLS:` + repeatedStringForTLS + `,`, `Rules:` + repeatedStringForRules + `,`, + `IngressClassName:` + valueToStringGenerated(this.IngressClassName) + `,`, `}`, }, "") return s @@ -1105,22 +1458,412 @@ func (this *IngressTLS) String() string { if this == nil { return "nil" } - s := strings.Join([]string{`&IngressTLS{`, - `Hosts:` + fmt.Sprintf("%v", this.Hosts) + `,`, - `SecretName:` + fmt.Sprintf("%v", this.SecretName) + `,`, - `}`, - }, "") - return s -} -func valueToStringGenerated(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" + s := strings.Join([]string{`&IngressTLS{`, + `Hosts:` + fmt.Sprintf("%v", this.Hosts) + `,`, + `SecretName:` + fmt.Sprintf("%v", this.SecretName) + `,`, + `}`, + }, "") + return s +} +func valueToStringGenerated(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *HTTPIngressPath) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: HTTPIngressPath: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: HTTPIngressPath: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Path", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Path = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Backend", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Backend.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PathType", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := PathType(dAtA[iNdEx:postIndex]) + m.PathType = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *HTTPIngressRuleValue) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: HTTPIngressRuleValue: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: HTTPIngressRuleValue: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Paths", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Paths = append(m.Paths, HTTPIngressPath{}) + if err := m.Paths[len(m.Paths)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Ingress) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Ingress: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Ingress: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) + return nil } -func (m *HTTPIngressPath) Unmarshal(dAtA []byte) error { +func (m *IngressBackend) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1143,15 +1886,15 @@ func (m *HTTPIngressPath) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: HTTPIngressPath: wiretype end group for non-group") + return fmt.Errorf("proto: IngressBackend: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: HTTPIngressPath: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: IngressBackend: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Path", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ServiceName", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -1179,11 +1922,11 @@ func (m *HTTPIngressPath) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Path = string(dAtA[iNdEx:postIndex]) + m.ServiceName = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Backend", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ServicePort", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -1210,7 +1953,43 @@ func (m *HTTPIngressPath) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Backend.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.ServicePort.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Resource", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Resource == nil { + m.Resource = &v11.TypedLocalObjectReference{} + } + if err := m.Resource.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -1238,7 +2017,7 @@ func (m *HTTPIngressPath) Unmarshal(dAtA []byte) error { } return nil } -func (m *HTTPIngressRuleValue) Unmarshal(dAtA []byte) error { +func (m *IngressClass) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1261,15 +2040,15 @@ func (m *HTTPIngressRuleValue) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: HTTPIngressRuleValue: wiretype end group for non-group") + return fmt.Errorf("proto: IngressClass: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: HTTPIngressRuleValue: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: IngressClass: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Paths", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -1296,8 +2075,40 @@ func (m *HTTPIngressRuleValue) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Paths = append(m.Paths, HTTPIngressPath{}) - if err := m.Paths[len(m.Paths)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -1325,7 +2136,7 @@ func (m *HTTPIngressRuleValue) Unmarshal(dAtA []byte) error { } return nil } -func (m *Ingress) Unmarshal(dAtA []byte) error { +func (m *IngressClassList) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1348,15 +2159,15 @@ func (m *Ingress) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Ingress: wiretype end group for non-group") + return fmt.Errorf("proto: IngressClassList: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Ingress: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: IngressClassList: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -1383,46 +2194,13 @@ func (m *Ingress) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -1449,7 +2227,8 @@ func (m *Ingress) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Items = append(m.Items, IngressClass{}) + if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -1477,7 +2256,7 @@ func (m *Ingress) Unmarshal(dAtA []byte) error { } return nil } -func (m *IngressBackend) Unmarshal(dAtA []byte) error { +func (m *IngressClassSpec) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1500,15 +2279,15 @@ func (m *IngressBackend) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: IngressBackend: wiretype end group for non-group") + return fmt.Errorf("proto: IngressClassSpec: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: IngressBackend: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: IngressClassSpec: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ServiceName", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Controller", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -1536,11 +2315,11 @@ func (m *IngressBackend) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.ServiceName = string(dAtA[iNdEx:postIndex]) + m.Controller = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ServicePort", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Parameters", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -1567,7 +2346,10 @@ func (m *IngressBackend) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.ServicePort.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if m.Parameters == nil { + m.Parameters = &v11.TypedLocalObjectReference{} + } + if err := m.Parameters.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -2055,6 +2837,39 @@ func (m *IngressSpec) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field IngressClassName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.IngressClassName = &s + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -2285,6 +3100,7 @@ func (m *IngressTLS) Unmarshal(dAtA []byte) error { func skipGenerated(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -2316,10 +3132,8 @@ func skipGenerated(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -2340,55 +3154,30 @@ func skipGenerated(dAtA []byte) (n int, err error) { return 0, ErrInvalidLengthGenerated } iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - return iNdEx, nil case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipGenerated(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenerated + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenerated + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group") ) diff --git a/vendor/k8s.io/api/networking/v1beta1/generated.proto b/vendor/k8s.io/api/networking/v1beta1/generated.proto index a72545c813..68bede81fb 100644 --- a/vendor/k8s.io/api/networking/v1beta1/generated.proto +++ b/vendor/k8s.io/api/networking/v1beta1/generated.proto @@ -30,19 +30,33 @@ import "k8s.io/apimachinery/pkg/util/intstr/generated.proto"; // Package-wide variables from generator "generated". option go_package = "v1beta1"; -// HTTPIngressPath associates a path regex with a backend. Incoming urls matching -// the path are forwarded to the backend. +// HTTPIngressPath associates a path with a backend. Incoming urls matching the +// path are forwarded to the backend. message HTTPIngressPath { - // Path is an extended POSIX regex as defined by IEEE Std 1003.1, - // (i.e this follows the egrep/unix syntax, not the perl syntax) - // matched against the path of an incoming request. Currently it can - // contain characters disallowed from the conventional "path" - // part of a URL as defined by RFC 3986. Paths must begin with - // a '/'. If unspecified, the path defaults to a catch all sending - // traffic to the backend. + // Path is matched against the path of an incoming request. Currently it can + // contain characters disallowed from the conventional "path" part of a URL + // as defined by RFC 3986. Paths must begin with a '/'. When unspecified, + // all paths from incoming requests are matched. // +optional optional string path = 1; + // PathType determines the interpretation of the Path matching. PathType can + // be one of the following values: + // * Exact: Matches the URL path exactly. + // * Prefix: Matches based on a URL path prefix split by '/'. Matching is + // done on a path element by element basis. A path element refers is the + // list of labels in the path split by the '/' separator. A request is a + // match for path p if every p is an element-wise prefix of p of the + // request path. Note that if the last element of the path is a substring + // of the last element in request path, it is not a match (e.g. /foo/bar + // matches /foo/bar/baz, but does not match /foo/barbaz). + // * ImplementationSpecific: Interpretation of the Path matching is up to + // the IngressClass. Implementations can treat this as a separate PathType + // or treat it identically to Prefix or Exact path types. + // Implementations are required to support all path types. + // Defaults to ImplementationSpecific. + optional string pathType = 3; + // Backend defines the referenced service endpoint to which the traffic // will be forwarded to. optional IngressBackend backend = 2; @@ -82,10 +96,63 @@ message Ingress { // IngressBackend describes all endpoints for a given service and port. message IngressBackend { // Specifies the name of the referenced service. + // +optional optional string serviceName = 1; // Specifies the port of the referenced service. + // +optional optional k8s.io.apimachinery.pkg.util.intstr.IntOrString servicePort = 2; + + // Resource is an ObjectRef to another Kubernetes resource in the namespace + // of the Ingress object. If resource is specified, serviceName and servicePort + // must not be specified. + // +optional + optional k8s.io.api.core.v1.TypedLocalObjectReference resource = 3; +} + +// IngressClass represents the class of the Ingress, referenced by the Ingress +// Spec. The `ingressclass.kubernetes.io/is-default-class` annotation can be +// used to indicate that an IngressClass should be considered default. When a +// single IngressClass resource has this annotation set to true, new Ingress +// resources without a class specified will be assigned this default class. +message IngressClass { + // Standard object's metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; + + // Spec is the desired state of the IngressClass. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + // +optional + optional IngressClassSpec spec = 2; +} + +// IngressClassList is a collection of IngressClasses. +message IngressClassList { + // Standard list metadata. + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; + + // Items is the list of IngressClasses. + // +listType=set + repeated IngressClass items = 2; +} + +// IngressClassSpec provides information about the class of an Ingress. +message IngressClassSpec { + // Controller refers to the name of the controller that should handle this + // class. This allows for different "flavors" that are controlled by the + // same controller. For example, you may have different Parameters for the + // same implementing controller. This should be specified as a + // domain-prefixed path no more than 250 characters in length, e.g. + // "acme.io/ingress-controller". This field is immutable. + optional string controller = 1; + + // Parameters is a link to a custom resource containing additional + // configuration for the controller. This is optional if the controller does + // not require extra parameters. + // +optional + optional k8s.io.api.core.v1.TypedLocalObjectReference parameters = 2; } // IngressList is a collection of Ingress. @@ -103,18 +170,28 @@ message IngressList { // the related backend services. Incoming requests are first evaluated for a host // match, then routed to the backend associated with the matching IngressRuleValue. message IngressRule { - // Host is the fully qualified domain name of a network host, as defined - // by RFC 3986. Note the following deviations from the "host" part of the - // URI as defined in the RFC: - // 1. IPs are not allowed. Currently an IngressRuleValue can only apply to the - // IP in the Spec of the parent Ingress. + // Host is the fully qualified domain name of a network host, as defined by RFC 3986. + // Note the following deviations from the "host" part of the + // URI as defined in RFC 3986: + // 1. IPs are not allowed. Currently an IngressRuleValue can only apply to + // the IP in the Spec of the parent Ingress. // 2. The `:` delimiter is not respected because ports are not allowed. // Currently the port of an Ingress is implicitly :80 for http and // :443 for https. // Both these may change in the future. - // Incoming requests are matched against the host before the IngressRuleValue. - // If the host is unspecified, the Ingress routes all traffic based on the - // specified IngressRuleValue. + // Incoming requests are matched against the host before the + // IngressRuleValue. If the host is unspecified, the Ingress routes all + // traffic based on the specified IngressRuleValue. + // + // Host can be "precise" which is a domain name without the terminating dot of + // a network host (e.g. "foo.bar.com") or "wildcard", which is a domain name + // prefixed with a single wildcard label (e.g. "*.foo.com"). + // The wildcard character '*' must appear by itself as the first DNS label and + // matches only a single label. You cannot have a wildcard label by itself (e.g. Host == "*"). + // Requests will be matched against the Host field in the following way: + // 1. If Host is precise, the request matches this rule if the http host header is equal to Host. + // 2. If Host is a wildcard, then the request matches this rule if the http host header + // is to equal to the suffix (removing the first label) of the wildcard rule. // +optional optional string host = 1; @@ -138,6 +215,19 @@ message IngressRuleValue { // IngressSpec describes the Ingress the user wishes to exist. message IngressSpec { + // IngressClassName is the name of the IngressClass cluster resource. The + // associated IngressClass defines which controller will implement the + // resource. This replaces the deprecated `kubernetes.io/ingress.class` + // annotation. For backwards compatibility, when that annotation is set, it + // must be given precedence over this field. The controller may emit a + // warning if the field and annotation have different values. + // Implementations of this API should ignore Ingresses without a class + // specified. An IngressClass resource may be marked as default, which can + // be used to set a default value for this field. For more information, + // refer to the IngressClass documentation. + // +optional + optional string ingressClassName = 4; + // A default backend capable of servicing requests that don't match any // rule. At least one of 'backend' or 'rules' must be specified. This field // is optional to allow the loadbalancer controller or defaulting logic to @@ -175,11 +265,11 @@ message IngressTLS { // +optional repeated string hosts = 1; - // SecretName is the name of the secret used to terminate SSL traffic on 443. - // Field is left optional to allow SSL routing based on SNI hostname alone. - // If the SNI host in a listener conflicts with the "Host" header field used - // by an IngressRule, the SNI host is used for termination and value of the - // Host header is used for routing. + // SecretName is the name of the secret used to terminate TLS traffic on + // port 443. Field is left optional to allow TLS routing based on SNI + // hostname alone. If the SNI host in a listener conflicts with the "Host" + // header field used by an IngressRule, the SNI host is used for termination + // and value of the Host header is used for routing. // +optional optional string secretName = 2; } diff --git a/vendor/k8s.io/api/networking/v1beta1/register.go b/vendor/k8s.io/api/networking/v1beta1/register.go index c046c49012..04234953e6 100644 --- a/vendor/k8s.io/api/networking/v1beta1/register.go +++ b/vendor/k8s.io/api/networking/v1beta1/register.go @@ -49,6 +49,8 @@ func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, &Ingress{}, &IngressList{}, + &IngressClass{}, + &IngressClassList{}, ) // Add the watch version that applies metav1.AddToGroupVersion(scheme, SchemeGroupVersion) diff --git a/vendor/k8s.io/api/networking/v1beta1/types.go b/vendor/k8s.io/api/networking/v1beta1/types.go index 37277bf816..46f530bfae 100644 --- a/vendor/k8s.io/api/networking/v1beta1/types.go +++ b/vendor/k8s.io/api/networking/v1beta1/types.go @@ -63,6 +63,19 @@ type IngressList struct { // IngressSpec describes the Ingress the user wishes to exist. type IngressSpec struct { + // IngressClassName is the name of the IngressClass cluster resource. The + // associated IngressClass defines which controller will implement the + // resource. This replaces the deprecated `kubernetes.io/ingress.class` + // annotation. For backwards compatibility, when that annotation is set, it + // must be given precedence over this field. The controller may emit a + // warning if the field and annotation have different values. + // Implementations of this API should ignore Ingresses without a class + // specified. An IngressClass resource may be marked as default, which can + // be used to set a default value for this field. For more information, + // refer to the IngressClass documentation. + // +optional + IngressClassName *string `json:"ingressClassName,omitempty" protobuf:"bytes,4,opt,name=ingressClassName"` + // A default backend capable of servicing requests that don't match any // rule. At least one of 'backend' or 'rules' must be specified. This field // is optional to allow the loadbalancer controller or defaulting logic to @@ -93,11 +106,11 @@ type IngressTLS struct { // Ingress, if left unspecified. // +optional Hosts []string `json:"hosts,omitempty" protobuf:"bytes,1,rep,name=hosts"` - // SecretName is the name of the secret used to terminate SSL traffic on 443. - // Field is left optional to allow SSL routing based on SNI hostname alone. - // If the SNI host in a listener conflicts with the "Host" header field used - // by an IngressRule, the SNI host is used for termination and value of the - // Host header is used for routing. + // SecretName is the name of the secret used to terminate TLS traffic on + // port 443. Field is left optional to allow TLS routing based on SNI + // hostname alone. If the SNI host in a listener conflicts with the "Host" + // header field used by an IngressRule, the SNI host is used for termination + // and value of the Host header is used for routing. // +optional SecretName string `json:"secretName,omitempty" protobuf:"bytes,2,opt,name=secretName"` // TODO: Consider specifying different modes of termination, protocols etc. @@ -114,18 +127,28 @@ type IngressStatus struct { // the related backend services. Incoming requests are first evaluated for a host // match, then routed to the backend associated with the matching IngressRuleValue. type IngressRule struct { - // Host is the fully qualified domain name of a network host, as defined - // by RFC 3986. Note the following deviations from the "host" part of the - // URI as defined in the RFC: - // 1. IPs are not allowed. Currently an IngressRuleValue can only apply to the - // IP in the Spec of the parent Ingress. + // Host is the fully qualified domain name of a network host, as defined by RFC 3986. + // Note the following deviations from the "host" part of the + // URI as defined in RFC 3986: + // 1. IPs are not allowed. Currently an IngressRuleValue can only apply to + // the IP in the Spec of the parent Ingress. // 2. The `:` delimiter is not respected because ports are not allowed. // Currently the port of an Ingress is implicitly :80 for http and // :443 for https. // Both these may change in the future. - // Incoming requests are matched against the host before the IngressRuleValue. - // If the host is unspecified, the Ingress routes all traffic based on the - // specified IngressRuleValue. + // Incoming requests are matched against the host before the + // IngressRuleValue. If the host is unspecified, the Ingress routes all + // traffic based on the specified IngressRuleValue. + // + // Host can be "precise" which is a domain name without the terminating dot of + // a network host (e.g. "foo.bar.com") or "wildcard", which is a domain name + // prefixed with a single wildcard label (e.g. "*.foo.com"). + // The wildcard character '*' must appear by itself as the first DNS label and + // matches only a single label. You cannot have a wildcard label by itself (e.g. Host == "*"). + // Requests will be matched against the Host field in the following way: + // 1. If Host is precise, the request matches this rule if the http host header is equal to Host. + // 2. If Host is a wildcard, then the request matches this rule if the http host header + // is to equal to the suffix (removing the first label) of the wildcard rule. // +optional Host string `json:"host,omitempty" protobuf:"bytes,1,opt,name=host"` // IngressRuleValue represents a rule to route requests for this IngressRule. @@ -164,19 +187,63 @@ type HTTPIngressRuleValue struct { // options usable by a loadbalancer, like http keep-alive. } -// HTTPIngressPath associates a path regex with a backend. Incoming urls matching -// the path are forwarded to the backend. +// PathType represents the type of path referred to by a HTTPIngressPath. +type PathType string + +const ( + // PathTypeExact matches the URL path exactly and with case sensitivity. + PathTypeExact = PathType("Exact") + + // PathTypePrefix matches based on a URL path prefix split by '/'. Matching + // is case sensitive and done on a path element by element basis. A path + // element refers to the list of labels in the path split by the '/' + // separator. A request is a match for path p if every p is an element-wise + // prefix of p of the request path. Note that if the last element of the + // path is a substring of the last element in request path, it is not a + // match (e.g. /foo/bar matches /foo/bar/baz, but does not match + // /foo/barbaz). If multiple matching paths exist in an Ingress spec, the + // longest matching path is given priority. + // Examples: + // - /foo/bar does not match requests to /foo/barbaz + // - /foo/bar matches request to /foo/bar and /foo/bar/baz + // - /foo and /foo/ both match requests to /foo and /foo/. If both paths are + // present in an Ingress spec, the longest matching path (/foo/) is given + // priority. + PathTypePrefix = PathType("Prefix") + + // PathTypeImplementationSpecific matching is up to the IngressClass. + // Implementations can treat this as a separate PathType or treat it + // identically to Prefix or Exact path types. + PathTypeImplementationSpecific = PathType("ImplementationSpecific") +) + +// HTTPIngressPath associates a path with a backend. Incoming urls matching the +// path are forwarded to the backend. type HTTPIngressPath struct { - // Path is an extended POSIX regex as defined by IEEE Std 1003.1, - // (i.e this follows the egrep/unix syntax, not the perl syntax) - // matched against the path of an incoming request. Currently it can - // contain characters disallowed from the conventional "path" - // part of a URL as defined by RFC 3986. Paths must begin with - // a '/'. If unspecified, the path defaults to a catch all sending - // traffic to the backend. + // Path is matched against the path of an incoming request. Currently it can + // contain characters disallowed from the conventional "path" part of a URL + // as defined by RFC 3986. Paths must begin with a '/'. When unspecified, + // all paths from incoming requests are matched. // +optional Path string `json:"path,omitempty" protobuf:"bytes,1,opt,name=path"` + // PathType determines the interpretation of the Path matching. PathType can + // be one of the following values: + // * Exact: Matches the URL path exactly. + // * Prefix: Matches based on a URL path prefix split by '/'. Matching is + // done on a path element by element basis. A path element refers is the + // list of labels in the path split by the '/' separator. A request is a + // match for path p if every p is an element-wise prefix of p of the + // request path. Note that if the last element of the path is a substring + // of the last element in request path, it is not a match (e.g. /foo/bar + // matches /foo/bar/baz, but does not match /foo/barbaz). + // * ImplementationSpecific: Interpretation of the Path matching is up to + // the IngressClass. Implementations can treat this as a separate PathType + // or treat it identically to Prefix or Exact path types. + // Implementations are required to support all path types. + // Defaults to ImplementationSpecific. + PathType *PathType `json:"pathType,omitempty" protobuf:"bytes,3,opt,name=pathType"` + // Backend defines the referenced service endpoint to which the traffic // will be forwarded to. Backend IngressBackend `json:"backend" protobuf:"bytes,2,opt,name=backend"` @@ -185,8 +252,69 @@ type HTTPIngressPath struct { // IngressBackend describes all endpoints for a given service and port. type IngressBackend struct { // Specifies the name of the referenced service. - ServiceName string `json:"serviceName" protobuf:"bytes,1,opt,name=serviceName"` + // +optional + ServiceName string `json:"serviceName,omitempty" protobuf:"bytes,1,opt,name=serviceName"` // Specifies the port of the referenced service. - ServicePort intstr.IntOrString `json:"servicePort" protobuf:"bytes,2,opt,name=servicePort"` + // +optional + ServicePort intstr.IntOrString `json:"servicePort,omitempty" protobuf:"bytes,2,opt,name=servicePort"` + + // Resource is an ObjectRef to another Kubernetes resource in the namespace + // of the Ingress object. If resource is specified, serviceName and servicePort + // must not be specified. + // +optional + Resource *v1.TypedLocalObjectReference `json:"resource,omitempty" protobuf:"bytes,3,opt,name=resource"` +} + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// IngressClass represents the class of the Ingress, referenced by the Ingress +// Spec. The `ingressclass.kubernetes.io/is-default-class` annotation can be +// used to indicate that an IngressClass should be considered default. When a +// single IngressClass resource has this annotation set to true, new Ingress +// resources without a class specified will be assigned this default class. +type IngressClass struct { + metav1.TypeMeta `json:",inline"` + // Standard object's metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + // +optional + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // Spec is the desired state of the IngressClass. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + // +optional + Spec IngressClassSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` +} + +// IngressClassSpec provides information about the class of an Ingress. +type IngressClassSpec struct { + // Controller refers to the name of the controller that should handle this + // class. This allows for different "flavors" that are controlled by the + // same controller. For example, you may have different Parameters for the + // same implementing controller. This should be specified as a + // domain-prefixed path no more than 250 characters in length, e.g. + // "acme.io/ingress-controller". This field is immutable. + Controller string `json:"controller,omitempty" protobuf:"bytes,1,opt,name=controller"` + + // Parameters is a link to a custom resource containing additional + // configuration for the controller. This is optional if the controller does + // not require extra parameters. + // +optional + Parameters *v1.TypedLocalObjectReference `json:"parameters,omitempty" protobuf:"bytes,2,opt,name=parameters"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// IngressClassList is a collection of IngressClasses. +type IngressClassList struct { + metav1.TypeMeta `json:",inline"` + // Standard list metadata. + // +optional + metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // Items is the list of IngressClasses. + // +listType=set + Items []IngressClass `json:"items" protobuf:"bytes,2,rep,name=items"` } diff --git a/vendor/k8s.io/api/networking/v1beta1/types_swagger_doc_generated.go b/vendor/k8s.io/api/networking/v1beta1/types_swagger_doc_generated.go index 4ae5e32d01..c774249d8e 100644 --- a/vendor/k8s.io/api/networking/v1beta1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/api/networking/v1beta1/types_swagger_doc_generated.go @@ -28,9 +28,10 @@ package v1beta1 // AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT. var map_HTTPIngressPath = map[string]string{ - "": "HTTPIngressPath associates a path regex with a backend. Incoming urls matching the path are forwarded to the backend.", - "path": "Path is an extended POSIX regex as defined by IEEE Std 1003.1, (i.e this follows the egrep/unix syntax, not the perl syntax) matched against the path of an incoming request. Currently it can contain characters disallowed from the conventional \"path\" part of a URL as defined by RFC 3986. Paths must begin with a '/'. If unspecified, the path defaults to a catch all sending traffic to the backend.", - "backend": "Backend defines the referenced service endpoint to which the traffic will be forwarded to.", + "": "HTTPIngressPath associates a path with a backend. Incoming urls matching the path are forwarded to the backend.", + "path": "Path is matched against the path of an incoming request. Currently it can contain characters disallowed from the conventional \"path\" part of a URL as defined by RFC 3986. Paths must begin with a '/'. When unspecified, all paths from incoming requests are matched.", + "pathType": "PathType determines the interpretation of the Path matching. PathType can be one of the following values: * Exact: Matches the URL path exactly. * Prefix: Matches based on a URL path prefix split by '/'. Matching is\n done on a path element by element basis. A path element refers is the\n list of labels in the path split by the '/' separator. A request is a\n match for path p if every p is an element-wise prefix of p of the\n request path. Note that if the last element of the path is a substring\n of the last element in request path, it is not a match (e.g. /foo/bar\n matches /foo/bar/baz, but does not match /foo/barbaz).\n* ImplementationSpecific: Interpretation of the Path matching is up to\n the IngressClass. Implementations can treat this as a separate PathType\n or treat it identically to Prefix or Exact path types.\nImplementations are required to support all path types. Defaults to ImplementationSpecific.", + "backend": "Backend defines the referenced service endpoint to which the traffic will be forwarded to.", } func (HTTPIngressPath) SwaggerDoc() map[string]string { @@ -61,12 +62,43 @@ var map_IngressBackend = map[string]string{ "": "IngressBackend describes all endpoints for a given service and port.", "serviceName": "Specifies the name of the referenced service.", "servicePort": "Specifies the port of the referenced service.", + "resource": "Resource is an ObjectRef to another Kubernetes resource in the namespace of the Ingress object. If resource is specified, serviceName and servicePort must not be specified.", } func (IngressBackend) SwaggerDoc() map[string]string { return map_IngressBackend } +var map_IngressClass = map[string]string{ + "": "IngressClass represents the class of the Ingress, referenced by the Ingress Spec. The `ingressclass.kubernetes.io/is-default-class` annotation can be used to indicate that an IngressClass should be considered default. When a single IngressClass resource has this annotation set to true, new Ingress resources without a class specified will be assigned this default class.", + "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "spec": "Spec is the desired state of the IngressClass. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", +} + +func (IngressClass) SwaggerDoc() map[string]string { + return map_IngressClass +} + +var map_IngressClassList = map[string]string{ + "": "IngressClassList is a collection of IngressClasses.", + "metadata": "Standard list metadata.", + "items": "Items is the list of IngressClasses.", +} + +func (IngressClassList) SwaggerDoc() map[string]string { + return map_IngressClassList +} + +var map_IngressClassSpec = map[string]string{ + "": "IngressClassSpec provides information about the class of an Ingress.", + "controller": "Controller refers to the name of the controller that should handle this class. This allows for different \"flavors\" that are controlled by the same controller. For example, you may have different Parameters for the same implementing controller. This should be specified as a domain-prefixed path no more than 250 characters in length, e.g. \"acme.io/ingress-controller\". This field is immutable.", + "parameters": "Parameters is a link to a custom resource containing additional configuration for the controller. This is optional if the controller does not require extra parameters.", +} + +func (IngressClassSpec) SwaggerDoc() map[string]string { + return map_IngressClassSpec +} + var map_IngressList = map[string]string{ "": "IngressList is a collection of Ingress.", "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", @@ -79,7 +111,7 @@ func (IngressList) SwaggerDoc() map[string]string { var map_IngressRule = map[string]string{ "": "IngressRule represents the rules mapping the paths under a specified host to the related backend services. Incoming requests are first evaluated for a host match, then routed to the backend associated with the matching IngressRuleValue.", - "host": "Host is the fully qualified domain name of a network host, as defined by RFC 3986. Note the following deviations from the \"host\" part of the URI as defined in the RFC: 1. IPs are not allowed. Currently an IngressRuleValue can only apply to the\n\t IP in the Spec of the parent Ingress.\n2. The `:` delimiter is not respected because ports are not allowed.\n\t Currently the port of an Ingress is implicitly :80 for http and\n\t :443 for https.\nBoth these may change in the future. Incoming requests are matched against the host before the IngressRuleValue. If the host is unspecified, the Ingress routes all traffic based on the specified IngressRuleValue.", + "host": "Host is the fully qualified domain name of a network host, as defined by RFC 3986. Note the following deviations from the \"host\" part of the URI as defined in RFC 3986: 1. IPs are not allowed. Currently an IngressRuleValue can only apply to\n the IP in the Spec of the parent Ingress.\n2. The `:` delimiter is not respected because ports are not allowed.\n\t Currently the port of an Ingress is implicitly :80 for http and\n\t :443 for https.\nBoth these may change in the future. Incoming requests are matched against the host before the IngressRuleValue. If the host is unspecified, the Ingress routes all traffic based on the specified IngressRuleValue.\n\nHost can be \"precise\" which is a domain name without the terminating dot of a network host (e.g. \"foo.bar.com\") or \"wildcard\", which is a domain name prefixed with a single wildcard label (e.g. \"*.foo.com\"). The wildcard character '*' must appear by itself as the first DNS label and matches only a single label. You cannot have a wildcard label by itself (e.g. Host == \"*\"). Requests will be matched against the Host field in the following way: 1. If Host is precise, the request matches this rule if the http host header is equal to Host. 2. If Host is a wildcard, then the request matches this rule if the http host header is to equal to the suffix (removing the first label) of the wildcard rule.", } func (IngressRule) SwaggerDoc() map[string]string { @@ -95,10 +127,11 @@ func (IngressRuleValue) SwaggerDoc() map[string]string { } var map_IngressSpec = map[string]string{ - "": "IngressSpec describes the Ingress the user wishes to exist.", - "backend": "A default backend capable of servicing requests that don't match any rule. At least one of 'backend' or 'rules' must be specified. This field is optional to allow the loadbalancer controller or defaulting logic to specify a global default.", - "tls": "TLS configuration. Currently the Ingress only supports a single TLS port, 443. If multiple members of this list specify different hosts, they will be multiplexed on the same port according to the hostname specified through the SNI TLS extension, if the ingress controller fulfilling the ingress supports SNI.", - "rules": "A list of host rules used to configure the Ingress. If unspecified, or no rule matches, all traffic is sent to the default backend.", + "": "IngressSpec describes the Ingress the user wishes to exist.", + "ingressClassName": "IngressClassName is the name of the IngressClass cluster resource. The associated IngressClass defines which controller will implement the resource. This replaces the deprecated `kubernetes.io/ingress.class` annotation. For backwards compatibility, when that annotation is set, it must be given precedence over this field. The controller may emit a warning if the field and annotation have different values. Implementations of this API should ignore Ingresses without a class specified. An IngressClass resource may be marked as default, which can be used to set a default value for this field. For more information, refer to the IngressClass documentation.", + "backend": "A default backend capable of servicing requests that don't match any rule. At least one of 'backend' or 'rules' must be specified. This field is optional to allow the loadbalancer controller or defaulting logic to specify a global default.", + "tls": "TLS configuration. Currently the Ingress only supports a single TLS port, 443. If multiple members of this list specify different hosts, they will be multiplexed on the same port according to the hostname specified through the SNI TLS extension, if the ingress controller fulfilling the ingress supports SNI.", + "rules": "A list of host rules used to configure the Ingress. If unspecified, or no rule matches, all traffic is sent to the default backend.", } func (IngressSpec) SwaggerDoc() map[string]string { @@ -117,7 +150,7 @@ func (IngressStatus) SwaggerDoc() map[string]string { var map_IngressTLS = map[string]string{ "": "IngressTLS describes the transport layer security associated with an Ingress.", "hosts": "Hosts are a list of hosts included in the TLS certificate. The values in this list must match the name/s used in the tlsSecret. Defaults to the wildcard host setting for the loadbalancer controller fulfilling this Ingress, if left unspecified.", - "secretName": "SecretName is the name of the secret used to terminate SSL traffic on 443. Field is left optional to allow SSL routing based on SNI hostname alone. If the SNI host in a listener conflicts with the \"Host\" header field used by an IngressRule, the SNI host is used for termination and value of the Host header is used for routing.", + "secretName": "SecretName is the name of the secret used to terminate TLS traffic on port 443. Field is left optional to allow TLS routing based on SNI hostname alone. If the SNI host in a listener conflicts with the \"Host\" header field used by an IngressRule, the SNI host is used for termination and value of the Host header is used for routing.", } func (IngressTLS) SwaggerDoc() map[string]string { diff --git a/vendor/k8s.io/api/networking/v1beta1/well_known_annotations.go b/vendor/k8s.io/api/networking/v1beta1/well_known_annotations.go new file mode 100644 index 0000000000..1629b5d5aa --- /dev/null +++ b/vendor/k8s.io/api/networking/v1beta1/well_known_annotations.go @@ -0,0 +1,32 @@ +/* +Copyright 2020 The Kubernetes 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. +*/ + +package v1beta1 + +const ( + // AnnotationIsDefaultIngressClass can be used to indicate that an + // IngressClass should be considered default. When a single IngressClass + // resource has this annotation set to true, new Ingress resources without a + // class specified will be assigned this default class. + AnnotationIsDefaultIngressClass = "ingressclass.kubernetes.io/is-default-class" + + // AnnotationIngressClass indicates the class of an Ingress to be used when + // determining which controller should implement the Ingress. Use of this + // annotation is deprecated. The Ingress class field should be used instead + // of this annotation. + // +deprecated + AnnotationIngressClass = "kubernetes.io/ingress.class" +) diff --git a/vendor/k8s.io/api/networking/v1beta1/zz_generated.deepcopy.go b/vendor/k8s.io/api/networking/v1beta1/zz_generated.deepcopy.go index 16ac936aea..d55ccde683 100644 --- a/vendor/k8s.io/api/networking/v1beta1/zz_generated.deepcopy.go +++ b/vendor/k8s.io/api/networking/v1beta1/zz_generated.deepcopy.go @@ -21,13 +21,19 @@ limitations under the License. package v1beta1 import ( + v1 "k8s.io/api/core/v1" runtime "k8s.io/apimachinery/pkg/runtime" ) // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *HTTPIngressPath) DeepCopyInto(out *HTTPIngressPath) { *out = *in - out.Backend = in.Backend + if in.PathType != nil { + in, out := &in.PathType, &out.PathType + *out = new(PathType) + **out = **in + } + in.Backend.DeepCopyInto(&out.Backend) return } @@ -47,7 +53,9 @@ func (in *HTTPIngressRuleValue) DeepCopyInto(out *HTTPIngressRuleValue) { if in.Paths != nil { in, out := &in.Paths, &out.Paths *out = make([]HTTPIngressPath, len(*in)) - copy(*out, *in) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } } return } @@ -94,6 +102,11 @@ func (in *Ingress) DeepCopyObject() runtime.Object { func (in *IngressBackend) DeepCopyInto(out *IngressBackend) { *out = *in out.ServicePort = in.ServicePort + if in.Resource != nil { + in, out := &in.Resource, &out.Resource + *out = new(v1.TypedLocalObjectReference) + (*in).DeepCopyInto(*out) + } return } @@ -107,6 +120,87 @@ func (in *IngressBackend) DeepCopy() *IngressBackend { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *IngressClass) DeepCopyInto(out *IngressClass) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IngressClass. +func (in *IngressClass) DeepCopy() *IngressClass { + if in == nil { + return nil + } + out := new(IngressClass) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *IngressClass) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *IngressClassList) DeepCopyInto(out *IngressClassList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]IngressClass, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IngressClassList. +func (in *IngressClassList) DeepCopy() *IngressClassList { + if in == nil { + return nil + } + out := new(IngressClassList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *IngressClassList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *IngressClassSpec) DeepCopyInto(out *IngressClassSpec) { + *out = *in + if in.Parameters != nil { + in, out := &in.Parameters, &out.Parameters + *out = new(v1.TypedLocalObjectReference) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IngressClassSpec. +func (in *IngressClassSpec) DeepCopy() *IngressClassSpec { + if in == nil { + return nil + } + out := new(IngressClassSpec) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *IngressList) DeepCopyInto(out *IngressList) { *out = *in @@ -181,10 +275,15 @@ func (in *IngressRuleValue) DeepCopy() *IngressRuleValue { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *IngressSpec) DeepCopyInto(out *IngressSpec) { *out = *in + if in.IngressClassName != nil { + in, out := &in.IngressClassName, &out.IngressClassName + *out = new(string) + **out = **in + } if in.Backend != nil { in, out := &in.Backend, &out.Backend *out = new(IngressBackend) - **out = **in + (*in).DeepCopyInto(*out) } if in.TLS != nil { in, out := &in.TLS, &out.TLS diff --git a/vendor/k8s.io/api/node/v1alpha1/generated.pb.go b/vendor/k8s.io/api/node/v1alpha1/generated.pb.go index 34f4dd6dec..e6658a96fb 100644 --- a/vendor/k8s.io/api/node/v1alpha1/generated.pb.go +++ b/vendor/k8s.io/api/node/v1alpha1/generated.pb.go @@ -46,7 +46,7 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *Overhead) Reset() { *m = Overhead{} } func (*Overhead) ProtoMessage() {} @@ -1500,6 +1500,7 @@ func (m *Scheduling) Unmarshal(dAtA []byte) error { func skipGenerated(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -1531,10 +1532,8 @@ func skipGenerated(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -1555,55 +1554,30 @@ func skipGenerated(dAtA []byte) (n int, err error) { return 0, ErrInvalidLengthGenerated } iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - return iNdEx, nil case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipGenerated(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenerated + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenerated + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group") ) diff --git a/vendor/k8s.io/api/node/v1beta1/generated.pb.go b/vendor/k8s.io/api/node/v1beta1/generated.pb.go index 63992f4362..b85cbd295e 100644 --- a/vendor/k8s.io/api/node/v1beta1/generated.pb.go +++ b/vendor/k8s.io/api/node/v1beta1/generated.pb.go @@ -46,7 +46,7 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *Overhead) Reset() { *m = Overhead{} } func (*Overhead) ProtoMessage() {} @@ -1329,6 +1329,7 @@ func (m *Scheduling) Unmarshal(dAtA []byte) error { func skipGenerated(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -1360,10 +1361,8 @@ func skipGenerated(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -1384,55 +1383,30 @@ func skipGenerated(dAtA []byte) (n int, err error) { return 0, ErrInvalidLengthGenerated } iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - return iNdEx, nil case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipGenerated(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenerated + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenerated + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group") ) diff --git a/vendor/k8s.io/api/policy/v1beta1/generated.pb.go b/vendor/k8s.io/api/policy/v1beta1/generated.pb.go index 5b57f699c3..40ec7ef7fb 100644 --- a/vendor/k8s.io/api/policy/v1beta1/generated.pb.go +++ b/vendor/k8s.io/api/policy/v1beta1/generated.pb.go @@ -47,7 +47,7 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *AllowedCSIDriver) Reset() { *m = AllowedCSIDriver{} } func (*AllowedCSIDriver) ProtoMessage() {} @@ -609,125 +609,125 @@ func init() { } var fileDescriptor_014060e454a820dc = []byte{ - // 1883 bytes of a gzipped FileDescriptorProto + // 1878 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x58, 0xdd, 0x6e, 0x1b, 0xc7, - 0x15, 0xd6, 0x9a, 0xfa, 0xa1, 0x46, 0x3f, 0x16, 0x47, 0x3f, 0x5e, 0x2b, 0x35, 0xd7, 0xd9, 0x00, + 0x15, 0xd6, 0x9a, 0xfa, 0xa1, 0x46, 0x3f, 0x16, 0x47, 0x3f, 0x5e, 0x2b, 0x0d, 0xd7, 0xd9, 0x00, 0x85, 0x9b, 0x26, 0xcb, 0x58, 0x76, 0x5c, 0xa3, 0x69, 0x8b, 0x68, 0x45, 0xc9, 0x56, 0x60, 0x59, 0xec, 0xd0, 0x0e, 0xda, 0xc2, 0x2d, 0x3a, 0xe4, 0x8e, 0xa8, 0x8d, 0x96, 0xbb, 0xdb, 0x99, 0x59, 0x46, 0xbc, 0xeb, 0x45, 0x2f, 0x7a, 0xd9, 0x17, 0x08, 0xfa, 0x00, 0x45, 0xaf, 0xfa, 0x12, 0x0e, - 0x50, 0x04, 0xb9, 0x0c, 0x7a, 0x41, 0xd4, 0x2c, 0xfa, 0x12, 0xbe, 0x0a, 0x76, 0x38, 0xbb, 0xe4, - 0xfe, 0x91, 0x76, 0x00, 0xfb, 0x8e, 0x3b, 0xe7, 0xfb, 0xbe, 0x33, 0x73, 0xe6, 0xcc, 0x99, 0xc3, - 0x01, 0xe6, 0xc5, 0x7d, 0x66, 0xd8, 0x5e, 0xed, 0x22, 0x68, 0x11, 0xea, 0x12, 0x4e, 0x58, 0xad, - 0x47, 0x5c, 0xcb, 0xa3, 0x35, 0x69, 0xc0, 0xbe, 0x5d, 0xf3, 0x3d, 0xc7, 0x6e, 0xf7, 0x6b, 0xbd, - 0xdb, 0x2d, 0xc2, 0xf1, 0xed, 0x5a, 0x87, 0xb8, 0x84, 0x62, 0x4e, 0x2c, 0xc3, 0xa7, 0x1e, 0xf7, - 0xe0, 0xf5, 0x11, 0xd4, 0xc0, 0xbe, 0x6d, 0x8c, 0xa0, 0x86, 0x84, 0xee, 0x7e, 0xd8, 0xb1, 0xf9, - 0x79, 0xd0, 0x32, 0xda, 0x5e, 0xb7, 0xd6, 0xf1, 0x3a, 0x5e, 0x4d, 0x30, 0x5a, 0xc1, 0x99, 0xf8, - 0x12, 0x1f, 0xe2, 0xd7, 0x48, 0x69, 0x57, 0x9f, 0x70, 0xda, 0xf6, 0x28, 0xa9, 0xf5, 0x32, 0xde, - 0x76, 0xef, 0x8e, 0x31, 0x5d, 0xdc, 0x3e, 0xb7, 0x5d, 0x42, 0xfb, 0x35, 0xff, 0xa2, 0x13, 0x0e, - 0xb0, 0x5a, 0x97, 0x70, 0x9c, 0xc7, 0xaa, 0x15, 0xb1, 0x68, 0xe0, 0x72, 0xbb, 0x4b, 0x32, 0x84, - 0x7b, 0xb3, 0x08, 0xac, 0x7d, 0x4e, 0xba, 0x38, 0xc3, 0xbb, 0x53, 0xc4, 0x0b, 0xb8, 0xed, 0xd4, - 0x6c, 0x97, 0x33, 0x4e, 0xd3, 0x24, 0xfd, 0x2e, 0xd8, 0xd8, 0x77, 0x1c, 0xef, 0x4b, 0x62, 0x1d, - 0x34, 0x8f, 0xeb, 0xd4, 0xee, 0x11, 0x0a, 0x6f, 0x82, 0x79, 0x17, 0x77, 0x89, 0xaa, 0xdc, 0x54, - 0x6e, 0x2d, 0x9b, 0xab, 0xcf, 0x07, 0xda, 0xdc, 0x70, 0xa0, 0xcd, 0x3f, 0xc6, 0x5d, 0x82, 0x84, - 0x45, 0xff, 0x04, 0x54, 0x24, 0xeb, 0xc8, 0x21, 0x97, 0x9f, 0x7b, 0x4e, 0xd0, 0x25, 0xf0, 0xc7, - 0x60, 0xd1, 0x12, 0x02, 0x92, 0xb8, 0x2e, 0x89, 0x8b, 0x23, 0x59, 0x24, 0xad, 0x3a, 0x03, 0x57, - 0x25, 0xf9, 0xa1, 0xc7, 0x78, 0x03, 0xf3, 0x73, 0xb8, 0x07, 0x80, 0x8f, 0xf9, 0x79, 0x83, 0x92, - 0x33, 0xfb, 0x52, 0xd2, 0xa1, 0xa4, 0x83, 0x46, 0x6c, 0x41, 0x13, 0x28, 0xf8, 0x01, 0x28, 0x53, - 0x82, 0xad, 0x53, 0xd7, 0xe9, 0xab, 0x57, 0x6e, 0x2a, 0xb7, 0xca, 0xe6, 0x86, 0x64, 0x94, 0x91, - 0x1c, 0x47, 0x31, 0x42, 0xff, 0x8f, 0x02, 0xca, 0x87, 0x3d, 0xbb, 0xcd, 0x6d, 0xcf, 0x85, 0x7f, - 0x04, 0xe5, 0x70, 0xb7, 0x2c, 0xcc, 0xb1, 0x70, 0xb6, 0xb2, 0xf7, 0x91, 0x31, 0xce, 0xa4, 0x38, - 0x78, 0x86, 0x7f, 0xd1, 0x09, 0x07, 0x98, 0x11, 0xa2, 0x8d, 0xde, 0x6d, 0xe3, 0xb4, 0xf5, 0x05, - 0x69, 0xf3, 0x13, 0xc2, 0xf1, 0x78, 0x7a, 0xe3, 0x31, 0x14, 0xab, 0x42, 0x07, 0xac, 0x59, 0xc4, - 0x21, 0x9c, 0x9c, 0xfa, 0xa1, 0x47, 0x26, 0x66, 0xb8, 0xb2, 0x77, 0xe7, 0xd5, 0xdc, 0xd4, 0x27, - 0xa9, 0x66, 0x65, 0x38, 0xd0, 0xd6, 0x12, 0x43, 0x28, 0x29, 0xae, 0x7f, 0xa5, 0x80, 0x9d, 0xa3, - 0xe6, 0x03, 0xea, 0x05, 0x7e, 0x93, 0x87, 0xbb, 0xdb, 0xe9, 0x4b, 0x13, 0xfc, 0x19, 0x98, 0xa7, - 0x81, 0x13, 0xed, 0xe5, 0x7b, 0xd1, 0x5e, 0xa2, 0xc0, 0x21, 0x2f, 0x07, 0xda, 0x66, 0x8a, 0xf5, - 0xa4, 0xef, 0x13, 0x24, 0x08, 0xf0, 0x33, 0xb0, 0x48, 0xb1, 0xdb, 0x21, 0xe1, 0xd4, 0x4b, 0xb7, - 0x56, 0xf6, 0x74, 0xa3, 0xf0, 0xac, 0x19, 0xc7, 0x75, 0x14, 0x42, 0xc7, 0x3b, 0x2e, 0x3e, 0x19, - 0x92, 0x0a, 0xfa, 0x09, 0x58, 0x13, 0x5b, 0xed, 0x51, 0x2e, 0x2c, 0xf0, 0x06, 0x28, 0x75, 0x6d, - 0x57, 0x4c, 0x6a, 0xc1, 0x5c, 0x91, 0xac, 0xd2, 0x89, 0xed, 0xa2, 0x70, 0x5c, 0x98, 0xf1, 0xa5, - 0x88, 0xd9, 0xa4, 0x19, 0x5f, 0xa2, 0x70, 0x5c, 0x7f, 0x00, 0x96, 0xa4, 0xc7, 0x49, 0xa1, 0xd2, - 0x74, 0xa1, 0x52, 0x8e, 0xd0, 0x3f, 0xae, 0x80, 0xcd, 0x86, 0x67, 0xd5, 0x6d, 0x46, 0x03, 0x11, - 0x2f, 0x33, 0xb0, 0x3a, 0x84, 0xbf, 0x85, 0xfc, 0x78, 0x02, 0xe6, 0x99, 0x4f, 0xda, 0x32, 0x2d, - 0xf6, 0xa6, 0xc4, 0x36, 0x67, 0x7e, 0x4d, 0x9f, 0xb4, 0xc7, 0xc7, 0x32, 0xfc, 0x42, 0x42, 0x0d, - 0x3e, 0x03, 0x8b, 0x8c, 0x63, 0x1e, 0x30, 0xb5, 0x24, 0x74, 0xef, 0xbe, 0xa6, 0xae, 0xe0, 0x8e, - 0x77, 0x71, 0xf4, 0x8d, 0xa4, 0xa6, 0xfe, 0x6f, 0x05, 0x5c, 0xcb, 0x61, 0x3d, 0xb2, 0x19, 0x87, - 0xcf, 0x32, 0x11, 0x33, 0x5e, 0x2d, 0x62, 0x21, 0x5b, 0xc4, 0x2b, 0x3e, 0xbc, 0xd1, 0xc8, 0x44, - 0xb4, 0x9a, 0x60, 0xc1, 0xe6, 0xa4, 0x1b, 0xa5, 0xa2, 0xf1, 0x7a, 0xcb, 0x32, 0xd7, 0xa4, 0xf4, - 0xc2, 0x71, 0x28, 0x82, 0x46, 0x5a, 0xfa, 0x37, 0x57, 0x72, 0x97, 0x13, 0x86, 0x13, 0x9e, 0x81, - 0xd5, 0xae, 0xed, 0xee, 0xf7, 0xb0, 0xed, 0xe0, 0x96, 0x3c, 0x3d, 0xd3, 0x92, 0x20, 0xac, 0xb0, - 0xc6, 0xa8, 0xc2, 0x1a, 0xc7, 0x2e, 0x3f, 0xa5, 0x4d, 0x4e, 0x6d, 0xb7, 0x63, 0x6e, 0x0c, 0x07, - 0xda, 0xea, 0xc9, 0x84, 0x12, 0x4a, 0xe8, 0xc2, 0xdf, 0x83, 0x32, 0x23, 0x0e, 0x69, 0x73, 0x8f, - 0xbe, 0x5e, 0x85, 0x78, 0x84, 0x5b, 0xc4, 0x69, 0x4a, 0xaa, 0xb9, 0x1a, 0xc6, 0x2d, 0xfa, 0x42, - 0xb1, 0x24, 0x74, 0xc0, 0x7a, 0x17, 0x5f, 0x3e, 0x75, 0x71, 0xbc, 0x90, 0xd2, 0x0f, 0x5c, 0x08, - 0x1c, 0x0e, 0xb4, 0xf5, 0x93, 0x84, 0x16, 0x4a, 0x69, 0xeb, 0xff, 0x9f, 0x07, 0xd7, 0x0b, 0xb3, - 0x0a, 0x7e, 0x06, 0xa0, 0xd7, 0x62, 0x84, 0xf6, 0x88, 0xf5, 0x60, 0x74, 0x07, 0xd9, 0x5e, 0x74, - 0x70, 0x77, 0xe5, 0x06, 0xc1, 0xd3, 0x0c, 0x02, 0xe5, 0xb0, 0xe0, 0x5f, 0x14, 0xb0, 0x66, 0x8d, - 0xdc, 0x10, 0xab, 0xe1, 0x59, 0x51, 0x62, 0x3c, 0xf8, 0x21, 0xf9, 0x6e, 0xd4, 0x27, 0x95, 0x0e, - 0x5d, 0x4e, 0xfb, 0xe6, 0xb6, 0x9c, 0xd0, 0x5a, 0xc2, 0x86, 0x92, 0x4e, 0xe1, 0x09, 0x80, 0x56, - 0x2c, 0xc9, 0xe4, 0x9d, 0x26, 0x42, 0xbc, 0x60, 0xde, 0x90, 0x0a, 0xdb, 0x09, 0xbf, 0x11, 0x08, - 0xe5, 0x10, 0xe1, 0xaf, 0xc0, 0x7a, 0x3b, 0xa0, 0x94, 0xb8, 0xfc, 0x21, 0xc1, 0x0e, 0x3f, 0xef, - 0xab, 0xf3, 0x42, 0x6a, 0x47, 0x4a, 0xad, 0x1f, 0x24, 0xac, 0x28, 0x85, 0x0e, 0xf9, 0x16, 0x61, - 0x36, 0x25, 0x56, 0xc4, 0x5f, 0x48, 0xf2, 0xeb, 0x09, 0x2b, 0x4a, 0xa1, 0xe1, 0x7d, 0xb0, 0x4a, - 0x2e, 0x7d, 0xd2, 0x8e, 0x62, 0xba, 0x28, 0xd8, 0x5b, 0x92, 0xbd, 0x7a, 0x38, 0x61, 0x43, 0x09, - 0xe4, 0xae, 0x03, 0x60, 0x36, 0x88, 0x70, 0x03, 0x94, 0x2e, 0x48, 0x7f, 0x74, 0xf3, 0xa0, 0xf0, - 0x27, 0xfc, 0x14, 0x2c, 0xf4, 0xb0, 0x13, 0x10, 0x99, 0xeb, 0xef, 0xbf, 0x5a, 0xae, 0x3f, 0xb1, - 0xbb, 0x04, 0x8d, 0x88, 0x3f, 0xbf, 0x72, 0x5f, 0xd1, 0xbf, 0x56, 0x40, 0xa5, 0xe1, 0x59, 0x4d, - 0xd2, 0x0e, 0xa8, 0xcd, 0xfb, 0x0d, 0xb1, 0xcf, 0x6f, 0xa1, 0x66, 0xa3, 0x44, 0xcd, 0xfe, 0x68, - 0x7a, 0xae, 0x25, 0x67, 0x57, 0x54, 0xb1, 0xf5, 0xe7, 0x0a, 0xd8, 0xce, 0xa0, 0xdf, 0x42, 0x45, - 0xfd, 0x75, 0xb2, 0xa2, 0x7e, 0xf0, 0x3a, 0x8b, 0x29, 0xa8, 0xa7, 0x5f, 0x57, 0x72, 0x96, 0x22, - 0xaa, 0x69, 0xd8, 0xdd, 0x51, 0xbb, 0x67, 0x3b, 0xa4, 0x43, 0x2c, 0xb1, 0x98, 0xf2, 0x44, 0x77, - 0x17, 0x5b, 0xd0, 0x04, 0x0a, 0x32, 0xb0, 0x63, 0x91, 0x33, 0x1c, 0x38, 0x7c, 0xdf, 0xb2, 0x0e, - 0xb0, 0x8f, 0x5b, 0xb6, 0x63, 0x73, 0x5b, 0xb6, 0x23, 0xcb, 0xe6, 0x27, 0xc3, 0x81, 0xb6, 0x53, - 0xcf, 0x45, 0xbc, 0x1c, 0x68, 0x37, 0xb2, 0xdd, 0xbc, 0x11, 0x43, 0xfa, 0xa8, 0x40, 0x1a, 0xf6, - 0x81, 0x4a, 0xc9, 0x9f, 0x82, 0xf0, 0x50, 0xd4, 0xa9, 0xe7, 0x27, 0xdc, 0x96, 0x84, 0xdb, 0x5f, - 0x0e, 0x07, 0x9a, 0x8a, 0x0a, 0x30, 0xb3, 0x1d, 0x17, 0xca, 0xc3, 0x2f, 0xc0, 0x26, 0x96, 0x7d, - 0xf8, 0xa4, 0xd7, 0x79, 0xe1, 0xf5, 0xfe, 0x70, 0xa0, 0x6d, 0xee, 0x67, 0xcd, 0xb3, 0x1d, 0xe6, - 0x89, 0xc2, 0x1a, 0x58, 0xea, 0x89, 0x96, 0x9d, 0xa9, 0x0b, 0x42, 0x7f, 0x7b, 0x38, 0xd0, 0x96, - 0x46, 0x5d, 0x7c, 0xa8, 0xb9, 0x78, 0xd4, 0x14, 0x8d, 0x60, 0x84, 0x82, 0x1f, 0x83, 0x95, 0x73, - 0x8f, 0xf1, 0xc7, 0x84, 0x7f, 0xe9, 0xd1, 0x0b, 0x51, 0x18, 0xca, 0xe6, 0xa6, 0xdc, 0xc1, 0x95, - 0x87, 0x63, 0x13, 0x9a, 0xc4, 0xc1, 0xdf, 0x82, 0xe5, 0x73, 0xd9, 0xf6, 0x31, 0x75, 0x49, 0x24, - 0xda, 0xad, 0x29, 0x89, 0x96, 0x68, 0x11, 0xcd, 0x8a, 0x94, 0x5f, 0x8e, 0x86, 0x19, 0x1a, 0xab, - 0xc1, 0x9f, 0x80, 0x25, 0xf1, 0x71, 0x5c, 0x57, 0xcb, 0x62, 0x36, 0x57, 0x25, 0x7c, 0xe9, 0xe1, - 0x68, 0x18, 0x45, 0xf6, 0x08, 0x7a, 0xdc, 0x38, 0x50, 0x97, 0xb3, 0xd0, 0xe3, 0xc6, 0x01, 0x8a, - 0xec, 0xf0, 0x19, 0x58, 0x62, 0xe4, 0x91, 0xed, 0x06, 0x97, 0x2a, 0x10, 0x47, 0xee, 0xf6, 0x94, - 0xe9, 0x36, 0x0f, 0x05, 0x32, 0xd5, 0x70, 0x8f, 0xd5, 0xa5, 0x1d, 0x45, 0x92, 0xd0, 0x02, 0xcb, - 0x34, 0x70, 0xf7, 0xd9, 0x53, 0x46, 0xa8, 0xba, 0x92, 0xb9, 0xed, 0xd3, 0xfa, 0x28, 0xc2, 0xa6, - 0x3d, 0xc4, 0x91, 0x89, 0x11, 0x68, 0x2c, 0x0c, 0x2d, 0x00, 0xc4, 0x87, 0xe8, 0xeb, 0xd5, 0x9d, - 0x99, 0x7d, 0x20, 0x8a, 0xc1, 0x69, 0x3f, 0xeb, 0xe1, 0xf1, 0x1c, 0x9b, 0xd1, 0x84, 0x2e, 0xfc, - 0xab, 0x02, 0x20, 0x0b, 0x7c, 0xdf, 0x21, 0x5d, 0xe2, 0x72, 0xec, 0x88, 0x51, 0xa6, 0xae, 0x0a, - 0x77, 0xbf, 0x98, 0x16, 0xb5, 0x0c, 0x29, 0xed, 0x36, 0x6e, 0x06, 0xb2, 0x50, 0x94, 0xe3, 0x33, - 0xdc, 0xb4, 0x33, 0xb9, 0xda, 0xb5, 0x99, 0x9b, 0x96, 0xff, 0x2f, 0x69, 0xbc, 0x69, 0xd2, 0x8e, - 0x22, 0x49, 0xf8, 0x39, 0xd8, 0x89, 0xfe, 0x43, 0x22, 0xcf, 0xe3, 0x47, 0xb6, 0x43, 0x58, 0x9f, - 0x71, 0xd2, 0x55, 0xd7, 0x45, 0x32, 0x55, 0x25, 0x73, 0x07, 0xe5, 0xa2, 0x50, 0x01, 0x1b, 0x76, - 0x81, 0x16, 0x15, 0xa1, 0xf0, 0x84, 0xc6, 0x55, 0xf0, 0x90, 0xb5, 0xb1, 0x33, 0xea, 0x8d, 0xae, - 0x0a, 0x07, 0xef, 0x0d, 0x07, 0x9a, 0x56, 0x9f, 0x0e, 0x45, 0xb3, 0xb4, 0xe0, 0x6f, 0x80, 0x8a, - 0x8b, 0xfc, 0x6c, 0x08, 0x3f, 0x3f, 0x0a, 0x2b, 0x5b, 0xa1, 0x83, 0x42, 0x36, 0xf4, 0xc1, 0x06, - 0x4e, 0xfe, 0x9b, 0x67, 0x6a, 0x45, 0x9c, 0xf5, 0xf7, 0xa7, 0xec, 0x43, 0xea, 0x01, 0xc0, 0x54, - 0x65, 0x18, 0x37, 0x52, 0x06, 0x86, 0x32, 0xea, 0xf0, 0x12, 0x40, 0x9c, 0x7e, 0x7c, 0x60, 0x2a, - 0x9c, 0x79, 0x91, 0x65, 0x5e, 0x2c, 0xc6, 0xa9, 0x96, 0x31, 0x31, 0x94, 0xe3, 0x03, 0x72, 0x50, - 0xc1, 0xa9, 0xc7, 0x12, 0xa6, 0x5e, 0x13, 0x8e, 0x7f, 0x3a, 0xdb, 0x71, 0xcc, 0x31, 0xaf, 0x4b, - 0xbf, 0x95, 0xb4, 0x85, 0xa1, 0xac, 0x03, 0xf8, 0x08, 0x6c, 0xc9, 0xc1, 0xa7, 0x2e, 0xc3, 0x67, - 0xa4, 0xd9, 0x67, 0x6d, 0xee, 0x30, 0x75, 0x53, 0xd4, 0x6e, 0x75, 0x38, 0xd0, 0xb6, 0xf6, 0x73, - 0xec, 0x28, 0x97, 0x05, 0x3f, 0x05, 0x1b, 0x67, 0x1e, 0x6d, 0xd9, 0x96, 0x45, 0xdc, 0x48, 0x69, - 0x4b, 0x28, 0x6d, 0x85, 0xf1, 0x3f, 0x4a, 0xd9, 0x50, 0x06, 0x0d, 0x19, 0xd8, 0x96, 0xca, 0x0d, - 0xea, 0xb5, 0x4f, 0xbc, 0xc0, 0xe5, 0xe1, 0x75, 0xc1, 0xd4, 0xed, 0xf8, 0x8a, 0xdc, 0xde, 0xcf, - 0x03, 0xbc, 0x1c, 0x68, 0x37, 0x73, 0xae, 0xab, 0x04, 0x08, 0xe5, 0x6b, 0x43, 0x07, 0xac, 0xca, - 0xe7, 0xaf, 0x03, 0x07, 0x33, 0xa6, 0xaa, 0xe2, 0xa8, 0xdf, 0x9b, 0x5e, 0xd8, 0x62, 0x78, 0xfa, - 0xbc, 0x8b, 0xff, 0x65, 0x93, 0x00, 0x94, 0x50, 0xd7, 0xff, 0xae, 0x80, 0xeb, 0x85, 0x85, 0x11, - 0xde, 0x4b, 0xbc, 0xa9, 0xe8, 0xa9, 0x37, 0x15, 0x98, 0x25, 0xbe, 0x81, 0x27, 0x95, 0xaf, 0x14, - 0xa0, 0x16, 0xdd, 0x10, 0xf0, 0xe3, 0xc4, 0x04, 0xdf, 0x4d, 0x4d, 0xb0, 0x92, 0xe1, 0xbd, 0x81, - 0xf9, 0x7d, 0xa3, 0x80, 0x77, 0xa6, 0xec, 0x40, 0x5c, 0x90, 0x88, 0x35, 0x89, 0x7a, 0x8c, 0xc3, - 0xa3, 0xac, 0x88, 0x3c, 0x1a, 0x17, 0xa4, 0x1c, 0x0c, 0x2a, 0x64, 0xc3, 0xa7, 0xe0, 0x9a, 0xac, - 0x86, 0x69, 0x9b, 0xe8, 0xdc, 0x97, 0xcd, 0x77, 0x86, 0x03, 0xed, 0x5a, 0x3d, 0x1f, 0x82, 0x8a, - 0xb8, 0xfa, 0x3f, 0x15, 0xb0, 0x93, 0x7f, 0xe5, 0xc3, 0x3b, 0x89, 0x70, 0x6b, 0xa9, 0x70, 0x5f, - 0x4d, 0xb1, 0x64, 0xb0, 0xff, 0x00, 0xd6, 0x65, 0x63, 0x90, 0x7c, 0x22, 0x4c, 0x04, 0x3d, 0x3c, - 0x22, 0x61, 0x4f, 0x2f, 0x25, 0xa2, 0xf4, 0x15, 0xff, 0xc6, 0x93, 0x63, 0x28, 0xa5, 0xa6, 0xff, - 0x4b, 0x01, 0xef, 0xce, 0xbc, 0x6c, 0xa1, 0x99, 0x98, 0xba, 0x91, 0x9a, 0x7a, 0xb5, 0x58, 0xe0, - 0xcd, 0xbc, 0x14, 0x9a, 0x1f, 0x3e, 0x7f, 0x51, 0x9d, 0xfb, 0xf6, 0x45, 0x75, 0xee, 0xbb, 0x17, - 0xd5, 0xb9, 0x3f, 0x0f, 0xab, 0xca, 0xf3, 0x61, 0x55, 0xf9, 0x76, 0x58, 0x55, 0xbe, 0x1b, 0x56, - 0x95, 0xff, 0x0e, 0xab, 0xca, 0xdf, 0xfe, 0x57, 0x9d, 0xfb, 0xdd, 0x92, 0x94, 0xfb, 0x3e, 0x00, - 0x00, 0xff, 0xff, 0x48, 0x23, 0x7b, 0x0e, 0x44, 0x18, 0x00, 0x00, + 0x50, 0x04, 0xb9, 0x0c, 0x7a, 0x41, 0xd4, 0xec, 0x5b, 0xf8, 0xaa, 0xd8, 0xe1, 0xec, 0x92, 0xfb, + 0x47, 0x5a, 0x01, 0xec, 0x3b, 0xee, 0x9c, 0xef, 0xfb, 0xce, 0xcc, 0x99, 0x33, 0x67, 0x0e, 0x07, + 0x98, 0x17, 0x0f, 0x98, 0x61, 0x7b, 0xb5, 0x8b, 0xa0, 0x45, 0xa8, 0x4b, 0x38, 0x61, 0xb5, 0x1e, + 0x71, 0x2d, 0x8f, 0xd6, 0xa4, 0x01, 0xfb, 0x76, 0xcd, 0xf7, 0x1c, 0xbb, 0xdd, 0xaf, 0xf5, 0xee, + 0xb4, 0x08, 0xc7, 0x77, 0x6a, 0x1d, 0xe2, 0x12, 0x8a, 0x39, 0xb1, 0x0c, 0x9f, 0x7a, 0xdc, 0x83, + 0x37, 0x47, 0x50, 0x03, 0xfb, 0xb6, 0x31, 0x82, 0x1a, 0x12, 0xba, 0xfb, 0x51, 0xc7, 0xe6, 0xe7, + 0x41, 0xcb, 0x68, 0x7b, 0xdd, 0x5a, 0xc7, 0xeb, 0x78, 0x35, 0xc1, 0x68, 0x05, 0x67, 0xe2, 0x4b, + 0x7c, 0x88, 0x5f, 0x23, 0xa5, 0x5d, 0x7d, 0xc2, 0x69, 0xdb, 0xa3, 0xa4, 0xd6, 0xcb, 0x78, 0xdb, + 0xbd, 0x37, 0xc6, 0x74, 0x71, 0xfb, 0xdc, 0x76, 0x09, 0xed, 0xd7, 0xfc, 0x8b, 0x4e, 0x38, 0xc0, + 0x6a, 0x5d, 0xc2, 0x71, 0x1e, 0xab, 0x56, 0xc4, 0xa2, 0x81, 0xcb, 0xed, 0x2e, 0xc9, 0x10, 0xee, + 0xcf, 0x22, 0xb0, 0xf6, 0x39, 0xe9, 0xe2, 0x0c, 0xef, 0x6e, 0x11, 0x2f, 0xe0, 0xb6, 0x53, 0xb3, + 0x5d, 0xce, 0x38, 0x4d, 0x93, 0xf4, 0x7b, 0x60, 0x63, 0xdf, 0x71, 0xbc, 0xaf, 0x88, 0x75, 0xd0, + 0x3c, 0xae, 0x53, 0xbb, 0x47, 0x28, 0xbc, 0x05, 0xe6, 0x5d, 0xdc, 0x25, 0xaa, 0x72, 0x4b, 0xb9, + 0xbd, 0x6c, 0xae, 0xbe, 0x18, 0x68, 0x73, 0xc3, 0x81, 0x36, 0xff, 0x04, 0x77, 0x09, 0x12, 0x16, + 0xfd, 0x53, 0x50, 0x91, 0xac, 0x23, 0x87, 0x5c, 0x7e, 0xe1, 0x39, 0x41, 0x97, 0xc0, 0x1f, 0x83, + 0x45, 0x4b, 0x08, 0x48, 0xe2, 0xba, 0x24, 0x2e, 0x8e, 0x64, 0x91, 0xb4, 0xea, 0x0c, 0x5c, 0x97, + 0xe4, 0x47, 0x1e, 0xe3, 0x0d, 0xcc, 0xcf, 0xe1, 0x1e, 0x00, 0x3e, 0xe6, 0xe7, 0x0d, 0x4a, 0xce, + 0xec, 0x4b, 0x49, 0x87, 0x92, 0x0e, 0x1a, 0xb1, 0x05, 0x4d, 0xa0, 0xe0, 0x87, 0xa0, 0x4c, 0x09, + 0xb6, 0x4e, 0x5d, 0xa7, 0xaf, 0x5e, 0xbb, 0xa5, 0xdc, 0x2e, 0x9b, 0x1b, 0x92, 0x51, 0x46, 0x72, + 0x1c, 0xc5, 0x08, 0xfd, 0x3f, 0x0a, 0x28, 0x1f, 0xf6, 0xec, 0x36, 0xb7, 0x3d, 0x17, 0xfe, 0x11, + 0x94, 0xc3, 0xdd, 0xb2, 0x30, 0xc7, 0xc2, 0xd9, 0xca, 0xde, 0xc7, 0xc6, 0x38, 0x93, 0xe2, 0xe0, + 0x19, 0xfe, 0x45, 0x27, 0x1c, 0x60, 0x46, 0x88, 0x36, 0x7a, 0x77, 0x8c, 0xd3, 0xd6, 0x97, 0xa4, + 0xcd, 0x4f, 0x08, 0xc7, 0xe3, 0xe9, 0x8d, 0xc7, 0x50, 0xac, 0x0a, 0x1d, 0xb0, 0x66, 0x11, 0x87, + 0x70, 0x72, 0xea, 0x87, 0x1e, 0x99, 0x98, 0xe1, 0xca, 0xde, 0xdd, 0xd7, 0x73, 0x53, 0x9f, 0xa4, + 0x9a, 0x95, 0xe1, 0x40, 0x5b, 0x4b, 0x0c, 0xa1, 0xa4, 0xb8, 0xfe, 0xb5, 0x02, 0x76, 0x8e, 0x9a, + 0x0f, 0xa9, 0x17, 0xf8, 0x4d, 0x1e, 0xee, 0x6e, 0xa7, 0x2f, 0x4d, 0xf0, 0x67, 0x60, 0x9e, 0x06, + 0x4e, 0xb4, 0x97, 0xef, 0x47, 0x7b, 0x89, 0x02, 0x87, 0xbc, 0x1a, 0x68, 0x9b, 0x29, 0xd6, 0xd3, + 0xbe, 0x4f, 0x90, 0x20, 0xc0, 0xcf, 0xc1, 0x22, 0xc5, 0x6e, 0x87, 0x84, 0x53, 0x2f, 0xdd, 0x5e, + 0xd9, 0xd3, 0x8d, 0xc2, 0xb3, 0x66, 0x1c, 0xd7, 0x51, 0x08, 0x1d, 0xef, 0xb8, 0xf8, 0x64, 0x48, + 0x2a, 0xe8, 0x27, 0x60, 0x4d, 0x6c, 0xb5, 0x47, 0xb9, 0xb0, 0xc0, 0x77, 0x41, 0xa9, 0x6b, 0xbb, + 0x62, 0x52, 0x0b, 0xe6, 0x8a, 0x64, 0x95, 0x4e, 0x6c, 0x17, 0x85, 0xe3, 0xc2, 0x8c, 0x2f, 0x45, + 0xcc, 0x26, 0xcd, 0xf8, 0x12, 0x85, 0xe3, 0xfa, 0x43, 0xb0, 0x24, 0x3d, 0x4e, 0x0a, 0x95, 0xa6, + 0x0b, 0x95, 0x72, 0x84, 0xfe, 0x71, 0x0d, 0x6c, 0x36, 0x3c, 0xab, 0x6e, 0x33, 0x1a, 0x88, 0x78, + 0x99, 0x81, 0xd5, 0x21, 0xfc, 0x2d, 0xe4, 0xc7, 0x53, 0x30, 0xcf, 0x7c, 0xd2, 0x96, 0x69, 0xb1, + 0x37, 0x25, 0xb6, 0x39, 0xf3, 0x6b, 0xfa, 0xa4, 0x3d, 0x3e, 0x96, 0xe1, 0x17, 0x12, 0x6a, 0xf0, + 0x39, 0x58, 0x64, 0x1c, 0xf3, 0x80, 0xa9, 0x25, 0xa1, 0x7b, 0xef, 0x8a, 0xba, 0x82, 0x3b, 0xde, + 0xc5, 0xd1, 0x37, 0x92, 0x9a, 0xfa, 0xbf, 0x15, 0x70, 0x23, 0x87, 0xf5, 0xd8, 0x66, 0x1c, 0x3e, + 0xcf, 0x44, 0xcc, 0x78, 0xbd, 0x88, 0x85, 0x6c, 0x11, 0xaf, 0xf8, 0xf0, 0x46, 0x23, 0x13, 0xd1, + 0x6a, 0x82, 0x05, 0x9b, 0x93, 0x6e, 0x94, 0x8a, 0xc6, 0xd5, 0x96, 0x65, 0xae, 0x49, 0xe9, 0x85, + 0xe3, 0x50, 0x04, 0x8d, 0xb4, 0xf4, 0x6f, 0xaf, 0xe5, 0x2e, 0x27, 0x0c, 0x27, 0x3c, 0x03, 0xab, + 0x5d, 0xdb, 0xdd, 0xef, 0x61, 0xdb, 0xc1, 0x2d, 0x79, 0x7a, 0xa6, 0x25, 0x41, 0x58, 0x61, 0x8d, + 0x51, 0x85, 0x35, 0x8e, 0x5d, 0x7e, 0x4a, 0x9b, 0x9c, 0xda, 0x6e, 0xc7, 0xdc, 0x18, 0x0e, 0xb4, + 0xd5, 0x93, 0x09, 0x25, 0x94, 0xd0, 0x85, 0xbf, 0x07, 0x65, 0x46, 0x1c, 0xd2, 0xe6, 0x1e, 0xbd, + 0x5a, 0x85, 0x78, 0x8c, 0x5b, 0xc4, 0x69, 0x4a, 0xaa, 0xb9, 0x1a, 0xc6, 0x2d, 0xfa, 0x42, 0xb1, + 0x24, 0x74, 0xc0, 0x7a, 0x17, 0x5f, 0x3e, 0x73, 0x71, 0xbc, 0x90, 0xd2, 0x0f, 0x5c, 0x08, 0x1c, + 0x0e, 0xb4, 0xf5, 0x93, 0x84, 0x16, 0x4a, 0x69, 0xeb, 0xc3, 0x79, 0x70, 0xb3, 0x30, 0xab, 0xe0, + 0xe7, 0x00, 0x7a, 0x2d, 0x46, 0x68, 0x8f, 0x58, 0x0f, 0x47, 0x77, 0x90, 0xed, 0x45, 0x07, 0x77, + 0x57, 0x6e, 0x10, 0x3c, 0xcd, 0x20, 0x50, 0x0e, 0x0b, 0xfe, 0x45, 0x01, 0x6b, 0xd6, 0xc8, 0x0d, + 0xb1, 0x1a, 0x9e, 0x15, 0x25, 0xc6, 0xc3, 0x1f, 0x92, 0xef, 0x46, 0x7d, 0x52, 0xe9, 0xd0, 0xe5, + 0xb4, 0x6f, 0x6e, 0xcb, 0x09, 0xad, 0x25, 0x6c, 0x28, 0xe9, 0x34, 0x5c, 0x92, 0x15, 0x4b, 0x32, + 0x79, 0xa7, 0x89, 0x10, 0x2f, 0x8c, 0x97, 0x54, 0xcf, 0x20, 0x50, 0x0e, 0x0b, 0xfe, 0x0a, 0xac, + 0xb7, 0x03, 0x4a, 0x89, 0xcb, 0x1f, 0x11, 0xec, 0xf0, 0xf3, 0xbe, 0x3a, 0x2f, 0x74, 0x76, 0xa4, + 0xce, 0xfa, 0x41, 0xc2, 0x8a, 0x52, 0xe8, 0x90, 0x6f, 0x11, 0x66, 0x53, 0x62, 0x45, 0xfc, 0x85, + 0x24, 0xbf, 0x9e, 0xb0, 0xa2, 0x14, 0x1a, 0x3e, 0x00, 0xab, 0xe4, 0xd2, 0x27, 0xed, 0x28, 0xa0, + 0x8b, 0x82, 0xbd, 0x25, 0xd9, 0xab, 0x87, 0x13, 0x36, 0x94, 0x40, 0xee, 0x3a, 0x00, 0x66, 0x23, + 0x08, 0x37, 0x40, 0xe9, 0x82, 0xf4, 0x47, 0xd7, 0x0e, 0x0a, 0x7f, 0xc2, 0xcf, 0xc0, 0x42, 0x0f, + 0x3b, 0x01, 0x91, 0x89, 0xfe, 0xc1, 0xeb, 0x25, 0xfa, 0x53, 0xbb, 0x4b, 0xd0, 0x88, 0xf8, 0xf3, + 0x6b, 0x0f, 0x14, 0xfd, 0x1b, 0x05, 0x54, 0x1a, 0x9e, 0xd5, 0x24, 0xed, 0x80, 0xda, 0xbc, 0xdf, + 0x10, 0x9b, 0xfc, 0x16, 0x0a, 0x36, 0x4a, 0x14, 0xec, 0x8f, 0xa7, 0x27, 0x5a, 0x72, 0x76, 0x45, + 0xe5, 0x5a, 0x7f, 0xa1, 0x80, 0xed, 0x0c, 0xfa, 0x2d, 0x94, 0xd3, 0x5f, 0x27, 0xcb, 0xe9, 0x87, + 0x57, 0x59, 0x4c, 0x41, 0x31, 0xfd, 0xa6, 0x92, 0xb3, 0x14, 0x51, 0x4a, 0xc3, 0xd6, 0x8e, 0xda, + 0x3d, 0xdb, 0x21, 0x1d, 0x62, 0x89, 0xc5, 0x94, 0x27, 0x5a, 0xbb, 0xd8, 0x82, 0x26, 0x50, 0x90, + 0x81, 0x1d, 0x8b, 0x9c, 0xe1, 0xc0, 0xe1, 0xfb, 0x96, 0x75, 0x80, 0x7d, 0xdc, 0xb2, 0x1d, 0x9b, + 0xdb, 0xb2, 0x17, 0x59, 0x36, 0x3f, 0x1d, 0x0e, 0xb4, 0x9d, 0x7a, 0x2e, 0xe2, 0xd5, 0x40, 0x7b, + 0x37, 0xdb, 0xca, 0x1b, 0x31, 0xa4, 0x8f, 0x0a, 0xa4, 0x61, 0x1f, 0xa8, 0x94, 0xfc, 0x29, 0x08, + 0x0f, 0x45, 0x9d, 0x7a, 0x7e, 0xc2, 0x6d, 0x49, 0xb8, 0xfd, 0xe5, 0x70, 0xa0, 0xa9, 0xa8, 0x00, + 0x33, 0xdb, 0x71, 0xa1, 0x3c, 0xfc, 0x12, 0x6c, 0x62, 0xd9, 0x84, 0x4f, 0x7a, 0x9d, 0x17, 0x5e, + 0x1f, 0x0c, 0x07, 0xda, 0xe6, 0x7e, 0xd6, 0x3c, 0xdb, 0x61, 0x9e, 0x28, 0xac, 0x81, 0xa5, 0x9e, + 0xe8, 0xd7, 0x99, 0xba, 0x20, 0xf4, 0xb7, 0x87, 0x03, 0x6d, 0x69, 0xd4, 0xc2, 0x87, 0x9a, 0x8b, + 0x47, 0x4d, 0xd1, 0x05, 0x46, 0x28, 0xf8, 0x09, 0x58, 0x39, 0xf7, 0x18, 0x7f, 0x42, 0xf8, 0x57, + 0x1e, 0xbd, 0x10, 0x85, 0xa1, 0x6c, 0x6e, 0xca, 0x1d, 0x5c, 0x79, 0x34, 0x36, 0xa1, 0x49, 0x1c, + 0xfc, 0x2d, 0x58, 0x3e, 0x97, 0x3d, 0x1f, 0x53, 0x97, 0x44, 0xa2, 0xdd, 0x9e, 0x92, 0x68, 0x89, + 0xfe, 0xd0, 0xac, 0x48, 0xf9, 0xe5, 0x68, 0x98, 0xa1, 0xb1, 0x1a, 0xfc, 0x09, 0x58, 0x12, 0x1f, + 0xc7, 0x75, 0xb5, 0x2c, 0x66, 0x73, 0x5d, 0xc2, 0x97, 0x1e, 0x8d, 0x86, 0x51, 0x64, 0x8f, 0xa0, + 0xc7, 0x8d, 0x03, 0x75, 0x39, 0x0b, 0x3d, 0x6e, 0x1c, 0xa0, 0xc8, 0x0e, 0x9f, 0x83, 0x25, 0x46, + 0x1e, 0xdb, 0x6e, 0x70, 0xa9, 0x02, 0x71, 0xe4, 0xee, 0x4c, 0x99, 0x6e, 0xf3, 0x50, 0x20, 0x53, + 0xdd, 0xf6, 0x58, 0x5d, 0xda, 0x51, 0x24, 0x09, 0x2d, 0xb0, 0x4c, 0x03, 0x77, 0x9f, 0x3d, 0x63, + 0x84, 0xaa, 0x2b, 0x99, 0xab, 0x3e, 0xad, 0x8f, 0x22, 0x6c, 0xda, 0x43, 0x1c, 0x99, 0x18, 0x81, + 0xc6, 0xc2, 0xd0, 0x02, 0x40, 0x7c, 0x88, 0xa6, 0x5e, 0xdd, 0x99, 0xd9, 0x04, 0xa2, 0x18, 0x9c, + 0xf6, 0xb3, 0x1e, 0x1e, 0xcf, 0xb1, 0x19, 0x4d, 0xe8, 0xc2, 0xbf, 0x2a, 0x00, 0xb2, 0xc0, 0xf7, + 0x1d, 0xd2, 0x25, 0x2e, 0xc7, 0x8e, 0x18, 0x65, 0xea, 0xaa, 0x70, 0xf7, 0x8b, 0x69, 0x51, 0xcb, + 0x90, 0xd2, 0x6e, 0xe3, 0x6b, 0x33, 0x0b, 0x45, 0x39, 0x3e, 0xc3, 0x4d, 0x3b, 0x93, 0xab, 0x5d, + 0x9b, 0xb9, 0x69, 0xf9, 0x7f, 0x91, 0xc6, 0x9b, 0x26, 0xed, 0x28, 0x92, 0x84, 0x5f, 0x80, 0x9d, + 0xe8, 0x0f, 0x24, 0xf2, 0x3c, 0x7e, 0x64, 0x3b, 0x84, 0xf5, 0x19, 0x27, 0x5d, 0x75, 0x5d, 0x24, + 0x53, 0x55, 0x32, 0x77, 0x50, 0x2e, 0x0a, 0x15, 0xb0, 0x61, 0x17, 0x68, 0x51, 0x11, 0x0a, 0x4f, + 0x68, 0x5c, 0x05, 0x0f, 0x59, 0x1b, 0x3b, 0xa3, 0xc6, 0xe8, 0xba, 0x70, 0xf0, 0xfe, 0x70, 0xa0, + 0x69, 0xf5, 0xe9, 0x50, 0x34, 0x4b, 0x0b, 0xfe, 0x06, 0xa8, 0xb8, 0xc8, 0xcf, 0x86, 0xf0, 0xf3, + 0xa3, 0xb0, 0xb2, 0x15, 0x3a, 0x28, 0x64, 0x43, 0x1f, 0x6c, 0xe0, 0xe4, 0x5f, 0x79, 0xa6, 0x56, + 0xc4, 0x59, 0xff, 0x60, 0xca, 0x3e, 0xa4, 0xfe, 0xfd, 0x9b, 0xaa, 0x0c, 0xe3, 0x46, 0xca, 0xc0, + 0x50, 0x46, 0x1d, 0x5e, 0x02, 0x88, 0xd3, 0x2f, 0x0f, 0x4c, 0x85, 0x33, 0x2f, 0xb2, 0xcc, 0x73, + 0xc5, 0x38, 0xd5, 0x32, 0x26, 0x86, 0x72, 0x7c, 0x40, 0x0e, 0x2a, 0x38, 0xf5, 0x52, 0xc2, 0xd4, + 0x1b, 0xc2, 0xf1, 0x4f, 0x67, 0x3b, 0x8e, 0x39, 0xe6, 0x4d, 0xe9, 0xb7, 0x92, 0xb6, 0x30, 0x94, + 0x75, 0x00, 0x1f, 0x83, 0x2d, 0x39, 0xf8, 0xcc, 0x65, 0xf8, 0x8c, 0x34, 0xfb, 0xac, 0xcd, 0x1d, + 0xa6, 0x6e, 0x8a, 0xda, 0xad, 0x0e, 0x07, 0xda, 0xd6, 0x7e, 0x8e, 0x1d, 0xe5, 0xb2, 0xe0, 0x67, + 0x60, 0xe3, 0xcc, 0xa3, 0x2d, 0xdb, 0xb2, 0x88, 0x1b, 0x29, 0x6d, 0x09, 0xa5, 0xad, 0x30, 0xfe, + 0x47, 0x29, 0x1b, 0xca, 0xa0, 0x21, 0x03, 0xdb, 0x52, 0xb9, 0x41, 0xbd, 0xf6, 0x89, 0x17, 0xb8, + 0x3c, 0xbc, 0x2e, 0x98, 0xba, 0x1d, 0x5f, 0x91, 0xdb, 0xfb, 0x79, 0x80, 0x57, 0x03, 0xed, 0x56, + 0xce, 0x75, 0x95, 0x00, 0xa1, 0x7c, 0x6d, 0xe8, 0x80, 0x55, 0xf9, 0xf6, 0x75, 0xe0, 0x60, 0xc6, + 0x54, 0x55, 0x1c, 0xf5, 0xfb, 0xd3, 0x0b, 0x5b, 0x0c, 0x4f, 0x9f, 0x77, 0xf1, 0xa7, 0x6c, 0x12, + 0x80, 0x12, 0xea, 0xfa, 0xdf, 0x15, 0x70, 0xb3, 0xb0, 0x30, 0xc2, 0xfb, 0x89, 0x07, 0x15, 0x3d, + 0xf5, 0xa0, 0x02, 0xb3, 0xc4, 0x37, 0xf0, 0x9e, 0xf2, 0xb5, 0x02, 0xd4, 0xa2, 0x1b, 0x02, 0x7e, + 0x92, 0x98, 0xe0, 0x7b, 0xa9, 0x09, 0x56, 0x32, 0xbc, 0x37, 0x30, 0xbf, 0x6f, 0x15, 0xf0, 0xce, + 0x94, 0x1d, 0x88, 0x0b, 0x12, 0xb1, 0x26, 0x51, 0x4f, 0x70, 0x78, 0x94, 0x15, 0x91, 0x47, 0xe3, + 0x82, 0x94, 0x83, 0x41, 0x85, 0x6c, 0xf8, 0x0c, 0xdc, 0x90, 0xd5, 0x30, 0x6d, 0x13, 0x9d, 0xfb, + 0xb2, 0xf9, 0xce, 0x70, 0xa0, 0xdd, 0xa8, 0xe7, 0x43, 0x50, 0x11, 0x57, 0xff, 0xa7, 0x02, 0x76, + 0xf2, 0xaf, 0x7c, 0x78, 0x37, 0x11, 0x6e, 0x2d, 0x15, 0xee, 0xeb, 0x29, 0x96, 0x0c, 0xf6, 0x1f, + 0xc0, 0xba, 0x6c, 0x0c, 0x92, 0xef, 0x83, 0x89, 0xa0, 0x87, 0x47, 0x24, 0xec, 0xe9, 0xa5, 0x44, + 0x94, 0xbe, 0xe2, 0xaf, 0x78, 0x72, 0x0c, 0xa5, 0xd4, 0xf4, 0x7f, 0x29, 0xe0, 0xbd, 0x99, 0x97, + 0x2d, 0x34, 0x13, 0x53, 0x37, 0x52, 0x53, 0xaf, 0x16, 0x0b, 0xbc, 0x99, 0x67, 0x42, 0xf3, 0xa3, + 0x17, 0x2f, 0xab, 0x73, 0xdf, 0xbd, 0xac, 0xce, 0x7d, 0xff, 0xb2, 0x3a, 0xf7, 0xe7, 0x61, 0x55, + 0x79, 0x31, 0xac, 0x2a, 0xdf, 0x0d, 0xab, 0xca, 0xf7, 0xc3, 0xaa, 0xf2, 0xdf, 0x61, 0x55, 0xf9, + 0xdb, 0xff, 0xaa, 0x73, 0xbf, 0x5b, 0x92, 0x72, 0xff, 0x0f, 0x00, 0x00, 0xff, 0xff, 0x5d, 0xe0, + 0x55, 0x1c, 0x41, 0x18, 0x00, 0x00, } func (m *AllowedCSIDriver) Marshal() (dAtA []byte, err error) { @@ -1155,7 +1155,7 @@ func (m *PodDisruptionBudgetStatus) MarshalToSizedBuffer(dAtA []byte) (int, erro i = encodeVarintGenerated(dAtA, i, uint64(m.CurrentHealthy)) i-- dAtA[i] = 0x20 - i = encodeVarintGenerated(dAtA, i, uint64(m.PodDisruptionsAllowed)) + i = encodeVarintGenerated(dAtA, i, uint64(m.DisruptionsAllowed)) i-- dAtA[i] = 0x18 if len(m.DisruptedPods) > 0 { @@ -1940,7 +1940,7 @@ func (m *PodDisruptionBudgetStatus) Size() (n int) { n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize)) } } - n += 1 + sovGenerated(uint64(m.PodDisruptionsAllowed)) + n += 1 + sovGenerated(uint64(m.DisruptionsAllowed)) n += 1 + sovGenerated(uint64(m.CurrentHealthy)) n += 1 + sovGenerated(uint64(m.DesiredHealthy)) n += 1 + sovGenerated(uint64(m.ExpectedPods)) @@ -2307,7 +2307,7 @@ func (this *PodDisruptionBudgetStatus) String() string { s := strings.Join([]string{`&PodDisruptionBudgetStatus{`, `ObservedGeneration:` + fmt.Sprintf("%v", this.ObservedGeneration) + `,`, `DisruptedPods:` + mapStringForDisruptedPods + `,`, - `PodDisruptionsAllowed:` + fmt.Sprintf("%v", this.PodDisruptionsAllowed) + `,`, + `DisruptionsAllowed:` + fmt.Sprintf("%v", this.DisruptionsAllowed) + `,`, `CurrentHealthy:` + fmt.Sprintf("%v", this.CurrentHealthy) + `,`, `DesiredHealthy:` + fmt.Sprintf("%v", this.DesiredHealthy) + `,`, `ExpectedPods:` + fmt.Sprintf("%v", this.ExpectedPods) + `,`, @@ -3783,9 +3783,9 @@ func (m *PodDisruptionBudgetStatus) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 3: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field PodDisruptionsAllowed", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field DisruptionsAllowed", wireType) } - m.PodDisruptionsAllowed = 0 + m.DisruptionsAllowed = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -3795,7 +3795,7 @@ func (m *PodDisruptionBudgetStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.PodDisruptionsAllowed |= int32(b&0x7F) << shift + m.DisruptionsAllowed |= int32(b&0x7F) << shift if b < 0x80 { break } @@ -5478,6 +5478,7 @@ func (m *SupplementalGroupsStrategyOptions) Unmarshal(dAtA []byte) error { func skipGenerated(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -5509,10 +5510,8 @@ func skipGenerated(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -5533,55 +5532,30 @@ func skipGenerated(dAtA []byte) (n int, err error) { return 0, ErrInvalidLengthGenerated } iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - return iNdEx, nil case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipGenerated(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenerated + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenerated + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group") ) diff --git a/vendor/k8s.io/api/policy/v1beta1/generated.proto b/vendor/k8s.io/api/policy/v1beta1/generated.proto index 9679dafc51..d044837403 100644 --- a/vendor/k8s.io/api/policy/v1beta1/generated.proto +++ b/vendor/k8s.io/api/policy/v1beta1/generated.proto @@ -150,7 +150,7 @@ message PodDisruptionBudgetSpec { // PodDisruptionBudgetStatus represents information about the status of a // PodDisruptionBudget. Status may trail the actual state of a system. message PodDisruptionBudgetStatus { - // Most recent generation observed when updating this PDB status. PodDisruptionsAllowed and other + // Most recent generation observed when updating this PDB status. DisruptionsAllowed and other // status information is valid only if observedGeneration equals to PDB's object generation. // +optional optional int64 observedGeneration = 1; diff --git a/vendor/k8s.io/api/policy/v1beta1/types.go b/vendor/k8s.io/api/policy/v1beta1/types.go index d8e417ab26..e6a59763ad 100644 --- a/vendor/k8s.io/api/policy/v1beta1/types.go +++ b/vendor/k8s.io/api/policy/v1beta1/types.go @@ -47,7 +47,7 @@ type PodDisruptionBudgetSpec struct { // PodDisruptionBudgetStatus represents information about the status of a // PodDisruptionBudget. Status may trail the actual state of a system. type PodDisruptionBudgetStatus struct { - // Most recent generation observed when updating this PDB status. PodDisruptionsAllowed and other + // Most recent generation observed when updating this PDB status. DisruptionsAllowed and other // status information is valid only if observedGeneration equals to PDB's object generation. // +optional ObservedGeneration int64 `json:"observedGeneration,omitempty" protobuf:"varint,1,opt,name=observedGeneration"` @@ -67,7 +67,7 @@ type PodDisruptionBudgetStatus struct { DisruptedPods map[string]metav1.Time `json:"disruptedPods,omitempty" protobuf:"bytes,2,rep,name=disruptedPods"` // Number of pod disruptions that are currently allowed. - PodDisruptionsAllowed int32 `json:"disruptionsAllowed" protobuf:"varint,3,opt,name=disruptionsAllowed"` + DisruptionsAllowed int32 `json:"disruptionsAllowed" protobuf:"varint,3,opt,name=disruptionsAllowed"` // current number of healthy pods CurrentHealthy int32 `json:"currentHealthy" protobuf:"varint,4,opt,name=currentHealthy"` diff --git a/vendor/k8s.io/api/policy/v1beta1/types_swagger_doc_generated.go b/vendor/k8s.io/api/policy/v1beta1/types_swagger_doc_generated.go index 40a951c417..70f667c672 100644 --- a/vendor/k8s.io/api/policy/v1beta1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/api/policy/v1beta1/types_swagger_doc_generated.go @@ -126,7 +126,7 @@ func (PodDisruptionBudgetSpec) SwaggerDoc() map[string]string { var map_PodDisruptionBudgetStatus = map[string]string{ "": "PodDisruptionBudgetStatus represents information about the status of a PodDisruptionBudget. Status may trail the actual state of a system.", - "observedGeneration": "Most recent generation observed when updating this PDB status. PodDisruptionsAllowed and other status information is valid only if observedGeneration equals to PDB's object generation.", + "observedGeneration": "Most recent generation observed when updating this PDB status. DisruptionsAllowed and other status information is valid only if observedGeneration equals to PDB's object generation.", "disruptedPods": "DisruptedPods contains information about pods whose eviction was processed by the API server eviction subresource handler but has not yet been observed by the PodDisruptionBudget controller. A pod will be in this map from the time when the API server processed the eviction request to the time when the pod is seen by PDB controller as having been marked for deletion (or after a timeout). The key in the map is the name of the pod and the value is the time when the API server processed the eviction request. If the deletion didn't occur and a pod is still there it will be removed from the list automatically by PodDisruptionBudget controller after some time. If everything goes smooth this map should be empty for the most of the time. Large number of entries in the map may indicate problems with pod deletions.", "disruptionsAllowed": "Number of pod disruptions that are currently allowed.", "currentHealthy": "current number of healthy pods", diff --git a/vendor/k8s.io/api/rbac/v1/generated.pb.go b/vendor/k8s.io/api/rbac/v1/generated.pb.go index 9bb48fc312..ba6872d624 100644 --- a/vendor/k8s.io/api/rbac/v1/generated.pb.go +++ b/vendor/k8s.io/api/rbac/v1/generated.pb.go @@ -42,7 +42,7 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *AggregationRule) Reset() { *m = AggregationRule{} } func (*AggregationRule) ProtoMessage() {} @@ -3183,6 +3183,7 @@ func (m *Subject) Unmarshal(dAtA []byte) error { func skipGenerated(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -3214,10 +3215,8 @@ func skipGenerated(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -3238,55 +3237,30 @@ func skipGenerated(dAtA []byte) (n int, err error) { return 0, ErrInvalidLengthGenerated } iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - return iNdEx, nil case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipGenerated(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenerated + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenerated + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group") ) diff --git a/vendor/k8s.io/api/rbac/v1alpha1/generated.pb.go b/vendor/k8s.io/api/rbac/v1alpha1/generated.pb.go index 1933624772..3b12526da9 100644 --- a/vendor/k8s.io/api/rbac/v1alpha1/generated.pb.go +++ b/vendor/k8s.io/api/rbac/v1alpha1/generated.pb.go @@ -42,7 +42,7 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *AggregationRule) Reset() { *m = AggregationRule{} } func (*AggregationRule) ProtoMessage() {} @@ -3184,6 +3184,7 @@ func (m *Subject) Unmarshal(dAtA []byte) error { func skipGenerated(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -3215,10 +3216,8 @@ func skipGenerated(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -3239,55 +3238,30 @@ func skipGenerated(dAtA []byte) (n int, err error) { return 0, ErrInvalidLengthGenerated } iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - return iNdEx, nil case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipGenerated(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenerated + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenerated + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group") ) diff --git a/vendor/k8s.io/api/rbac/v1alpha1/generated.proto b/vendor/k8s.io/api/rbac/v1alpha1/generated.proto index 5c50a87eed..895ab62365 100644 --- a/vendor/k8s.io/api/rbac/v1alpha1/generated.proto +++ b/vendor/k8s.io/api/rbac/v1alpha1/generated.proto @@ -113,7 +113,6 @@ message PolicyRule { repeated string resourceNames = 5; // NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path - // This name is intentionally different than the internal type so that the DefaultConvert works nicely and because the ordering may be different. // Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding. // Rules can either apply to API resources (such as "pods" or "secrets") or non-resource URL paths (such as "/api"), but not both. // +optional diff --git a/vendor/k8s.io/api/rbac/v1alpha1/types.go b/vendor/k8s.io/api/rbac/v1alpha1/types.go index a5d3e38f65..ba91ab32ab 100644 --- a/vendor/k8s.io/api/rbac/v1alpha1/types.go +++ b/vendor/k8s.io/api/rbac/v1alpha1/types.go @@ -62,7 +62,6 @@ type PolicyRule struct { ResourceNames []string `json:"resourceNames,omitempty" protobuf:"bytes,5,rep,name=resourceNames"` // NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path - // This name is intentionally different than the internal type so that the DefaultConvert works nicely and because the ordering may be different. // Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding. // Rules can either apply to API resources (such as "pods" or "secrets") or non-resource URL paths (such as "/api"), but not both. // +optional diff --git a/vendor/k8s.io/api/rbac/v1alpha1/types_swagger_doc_generated.go b/vendor/k8s.io/api/rbac/v1alpha1/types_swagger_doc_generated.go index 8238de21d6..eab08c5d76 100644 --- a/vendor/k8s.io/api/rbac/v1alpha1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/api/rbac/v1alpha1/types_swagger_doc_generated.go @@ -84,7 +84,7 @@ var map_PolicyRule = map[string]string{ "apiGroups": "APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of the enumerated resources in any API group will be allowed.", "resources": "Resources is a list of resources this rule applies to. ResourceAll represents all resources.", "resourceNames": "ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.", - "nonResourceURLs": "NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path This name is intentionally different than the internal type so that the DefaultConvert works nicely and because the ordering may be different. Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding. Rules can either apply to API resources (such as \"pods\" or \"secrets\") or non-resource URL paths (such as \"/api\"), but not both.", + "nonResourceURLs": "NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding. Rules can either apply to API resources (such as \"pods\" or \"secrets\") or non-resource URL paths (such as \"/api\"), but not both.", } func (PolicyRule) SwaggerDoc() map[string]string { diff --git a/vendor/k8s.io/api/rbac/v1beta1/generated.pb.go b/vendor/k8s.io/api/rbac/v1beta1/generated.pb.go index 6c80f52f93..53d36320e4 100644 --- a/vendor/k8s.io/api/rbac/v1beta1/generated.pb.go +++ b/vendor/k8s.io/api/rbac/v1beta1/generated.pb.go @@ -42,7 +42,7 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *AggregationRule) Reset() { *m = AggregationRule{} } func (*AggregationRule) ProtoMessage() {} @@ -3183,6 +3183,7 @@ func (m *Subject) Unmarshal(dAtA []byte) error { func skipGenerated(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -3214,10 +3215,8 @@ func skipGenerated(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -3238,55 +3237,30 @@ func skipGenerated(dAtA []byte) (n int, err error) { return 0, ErrInvalidLengthGenerated } iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - return iNdEx, nil case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipGenerated(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenerated + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenerated + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group") ) diff --git a/vendor/k8s.io/api/scheduling/v1/generated.pb.go b/vendor/k8s.io/api/scheduling/v1/generated.pb.go index 7e9764f122..efc3102efe 100644 --- a/vendor/k8s.io/api/scheduling/v1/generated.pb.go +++ b/vendor/k8s.io/api/scheduling/v1/generated.pb.go @@ -43,7 +43,7 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *PriorityClass) Reset() { *m = PriorityClass{} } func (*PriorityClass) ProtoMessage() {} @@ -652,6 +652,7 @@ func (m *PriorityClassList) Unmarshal(dAtA []byte) error { func skipGenerated(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -683,10 +684,8 @@ func skipGenerated(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -707,55 +706,30 @@ func skipGenerated(dAtA []byte) (n int, err error) { return 0, ErrInvalidLengthGenerated } iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - return iNdEx, nil case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipGenerated(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenerated + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenerated + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group") ) diff --git a/vendor/k8s.io/api/scheduling/v1alpha1/generated.pb.go b/vendor/k8s.io/api/scheduling/v1alpha1/generated.pb.go index 05bff0ff47..8a62104dbe 100644 --- a/vendor/k8s.io/api/scheduling/v1alpha1/generated.pb.go +++ b/vendor/k8s.io/api/scheduling/v1alpha1/generated.pb.go @@ -43,7 +43,7 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *PriorityClass) Reset() { *m = PriorityClass{} } func (*PriorityClass) ProtoMessage() {} @@ -652,6 +652,7 @@ func (m *PriorityClassList) Unmarshal(dAtA []byte) error { func skipGenerated(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -683,10 +684,8 @@ func skipGenerated(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -707,55 +706,30 @@ func skipGenerated(dAtA []byte) (n int, err error) { return 0, ErrInvalidLengthGenerated } iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - return iNdEx, nil case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipGenerated(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenerated + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenerated + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group") ) diff --git a/vendor/k8s.io/api/scheduling/v1beta1/generated.pb.go b/vendor/k8s.io/api/scheduling/v1beta1/generated.pb.go index 198fcd0293..b89af56b3b 100644 --- a/vendor/k8s.io/api/scheduling/v1beta1/generated.pb.go +++ b/vendor/k8s.io/api/scheduling/v1beta1/generated.pb.go @@ -43,7 +43,7 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *PriorityClass) Reset() { *m = PriorityClass{} } func (*PriorityClass) ProtoMessage() {} @@ -652,6 +652,7 @@ func (m *PriorityClassList) Unmarshal(dAtA []byte) error { func skipGenerated(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -683,10 +684,8 @@ func skipGenerated(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -707,55 +706,30 @@ func skipGenerated(dAtA []byte) (n int, err error) { return 0, ErrInvalidLengthGenerated } iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - return iNdEx, nil case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipGenerated(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenerated + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenerated + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group") ) diff --git a/vendor/k8s.io/api/settings/v1alpha1/generated.pb.go b/vendor/k8s.io/api/settings/v1alpha1/generated.pb.go index 7469f74a44..7ed066d31c 100644 --- a/vendor/k8s.io/api/settings/v1alpha1/generated.pb.go +++ b/vendor/k8s.io/api/settings/v1alpha1/generated.pb.go @@ -42,7 +42,7 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *PodPreset) Reset() { *m = PodPreset{} } func (*PodPreset) ProtoMessage() {} @@ -970,6 +970,7 @@ func (m *PodPresetSpec) Unmarshal(dAtA []byte) error { func skipGenerated(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -1001,10 +1002,8 @@ func skipGenerated(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -1025,55 +1024,30 @@ func skipGenerated(dAtA []byte) (n int, err error) { return 0, ErrInvalidLengthGenerated } iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - return iNdEx, nil case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipGenerated(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenerated + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenerated + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group") ) diff --git a/vendor/k8s.io/api/storage/v1/generated.pb.go b/vendor/k8s.io/api/storage/v1/generated.pb.go index 3d09ee7e44..9e57369106 100644 --- a/vendor/k8s.io/api/storage/v1/generated.pb.go +++ b/vendor/k8s.io/api/storage/v1/generated.pb.go @@ -44,12 +44,96 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +func (m *CSIDriver) Reset() { *m = CSIDriver{} } +func (*CSIDriver) ProtoMessage() {} +func (*CSIDriver) Descriptor() ([]byte, []int) { + return fileDescriptor_3b530c1983504d8d, []int{0} +} +func (m *CSIDriver) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CSIDriver) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *CSIDriver) XXX_Merge(src proto.Message) { + xxx_messageInfo_CSIDriver.Merge(m, src) +} +func (m *CSIDriver) XXX_Size() int { + return m.Size() +} +func (m *CSIDriver) XXX_DiscardUnknown() { + xxx_messageInfo_CSIDriver.DiscardUnknown(m) +} + +var xxx_messageInfo_CSIDriver proto.InternalMessageInfo + +func (m *CSIDriverList) Reset() { *m = CSIDriverList{} } +func (*CSIDriverList) ProtoMessage() {} +func (*CSIDriverList) Descriptor() ([]byte, []int) { + return fileDescriptor_3b530c1983504d8d, []int{1} +} +func (m *CSIDriverList) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CSIDriverList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *CSIDriverList) XXX_Merge(src proto.Message) { + xxx_messageInfo_CSIDriverList.Merge(m, src) +} +func (m *CSIDriverList) XXX_Size() int { + return m.Size() +} +func (m *CSIDriverList) XXX_DiscardUnknown() { + xxx_messageInfo_CSIDriverList.DiscardUnknown(m) +} + +var xxx_messageInfo_CSIDriverList proto.InternalMessageInfo + +func (m *CSIDriverSpec) Reset() { *m = CSIDriverSpec{} } +func (*CSIDriverSpec) ProtoMessage() {} +func (*CSIDriverSpec) Descriptor() ([]byte, []int) { + return fileDescriptor_3b530c1983504d8d, []int{2} +} +func (m *CSIDriverSpec) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CSIDriverSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *CSIDriverSpec) XXX_Merge(src proto.Message) { + xxx_messageInfo_CSIDriverSpec.Merge(m, src) +} +func (m *CSIDriverSpec) XXX_Size() int { + return m.Size() +} +func (m *CSIDriverSpec) XXX_DiscardUnknown() { + xxx_messageInfo_CSIDriverSpec.DiscardUnknown(m) +} + +var xxx_messageInfo_CSIDriverSpec proto.InternalMessageInfo func (m *CSINode) Reset() { *m = CSINode{} } func (*CSINode) ProtoMessage() {} func (*CSINode) Descriptor() ([]byte, []int) { - return fileDescriptor_3b530c1983504d8d, []int{0} + return fileDescriptor_3b530c1983504d8d, []int{3} } func (m *CSINode) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -77,7 +161,7 @@ var xxx_messageInfo_CSINode proto.InternalMessageInfo func (m *CSINodeDriver) Reset() { *m = CSINodeDriver{} } func (*CSINodeDriver) ProtoMessage() {} func (*CSINodeDriver) Descriptor() ([]byte, []int) { - return fileDescriptor_3b530c1983504d8d, []int{1} + return fileDescriptor_3b530c1983504d8d, []int{4} } func (m *CSINodeDriver) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -105,7 +189,7 @@ var xxx_messageInfo_CSINodeDriver proto.InternalMessageInfo func (m *CSINodeList) Reset() { *m = CSINodeList{} } func (*CSINodeList) ProtoMessage() {} func (*CSINodeList) Descriptor() ([]byte, []int) { - return fileDescriptor_3b530c1983504d8d, []int{2} + return fileDescriptor_3b530c1983504d8d, []int{5} } func (m *CSINodeList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -133,7 +217,7 @@ var xxx_messageInfo_CSINodeList proto.InternalMessageInfo func (m *CSINodeSpec) Reset() { *m = CSINodeSpec{} } func (*CSINodeSpec) ProtoMessage() {} func (*CSINodeSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_3b530c1983504d8d, []int{3} + return fileDescriptor_3b530c1983504d8d, []int{6} } func (m *CSINodeSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -161,7 +245,7 @@ var xxx_messageInfo_CSINodeSpec proto.InternalMessageInfo func (m *StorageClass) Reset() { *m = StorageClass{} } func (*StorageClass) ProtoMessage() {} func (*StorageClass) Descriptor() ([]byte, []int) { - return fileDescriptor_3b530c1983504d8d, []int{4} + return fileDescriptor_3b530c1983504d8d, []int{7} } func (m *StorageClass) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -189,7 +273,7 @@ var xxx_messageInfo_StorageClass proto.InternalMessageInfo func (m *StorageClassList) Reset() { *m = StorageClassList{} } func (*StorageClassList) ProtoMessage() {} func (*StorageClassList) Descriptor() ([]byte, []int) { - return fileDescriptor_3b530c1983504d8d, []int{5} + return fileDescriptor_3b530c1983504d8d, []int{8} } func (m *StorageClassList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -217,7 +301,7 @@ var xxx_messageInfo_StorageClassList proto.InternalMessageInfo func (m *VolumeAttachment) Reset() { *m = VolumeAttachment{} } func (*VolumeAttachment) ProtoMessage() {} func (*VolumeAttachment) Descriptor() ([]byte, []int) { - return fileDescriptor_3b530c1983504d8d, []int{6} + return fileDescriptor_3b530c1983504d8d, []int{9} } func (m *VolumeAttachment) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -245,7 +329,7 @@ var xxx_messageInfo_VolumeAttachment proto.InternalMessageInfo func (m *VolumeAttachmentList) Reset() { *m = VolumeAttachmentList{} } func (*VolumeAttachmentList) ProtoMessage() {} func (*VolumeAttachmentList) Descriptor() ([]byte, []int) { - return fileDescriptor_3b530c1983504d8d, []int{7} + return fileDescriptor_3b530c1983504d8d, []int{10} } func (m *VolumeAttachmentList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -273,7 +357,7 @@ var xxx_messageInfo_VolumeAttachmentList proto.InternalMessageInfo func (m *VolumeAttachmentSource) Reset() { *m = VolumeAttachmentSource{} } func (*VolumeAttachmentSource) ProtoMessage() {} func (*VolumeAttachmentSource) Descriptor() ([]byte, []int) { - return fileDescriptor_3b530c1983504d8d, []int{8} + return fileDescriptor_3b530c1983504d8d, []int{11} } func (m *VolumeAttachmentSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -301,7 +385,7 @@ var xxx_messageInfo_VolumeAttachmentSource proto.InternalMessageInfo func (m *VolumeAttachmentSpec) Reset() { *m = VolumeAttachmentSpec{} } func (*VolumeAttachmentSpec) ProtoMessage() {} func (*VolumeAttachmentSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_3b530c1983504d8d, []int{9} + return fileDescriptor_3b530c1983504d8d, []int{12} } func (m *VolumeAttachmentSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -329,7 +413,7 @@ var xxx_messageInfo_VolumeAttachmentSpec proto.InternalMessageInfo func (m *VolumeAttachmentStatus) Reset() { *m = VolumeAttachmentStatus{} } func (*VolumeAttachmentStatus) ProtoMessage() {} func (*VolumeAttachmentStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_3b530c1983504d8d, []int{10} + return fileDescriptor_3b530c1983504d8d, []int{13} } func (m *VolumeAttachmentStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -357,7 +441,7 @@ var xxx_messageInfo_VolumeAttachmentStatus proto.InternalMessageInfo func (m *VolumeError) Reset() { *m = VolumeError{} } func (*VolumeError) ProtoMessage() {} func (*VolumeError) Descriptor() ([]byte, []int) { - return fileDescriptor_3b530c1983504d8d, []int{11} + return fileDescriptor_3b530c1983504d8d, []int{14} } func (m *VolumeError) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -385,7 +469,7 @@ var xxx_messageInfo_VolumeError proto.InternalMessageInfo func (m *VolumeNodeResources) Reset() { *m = VolumeNodeResources{} } func (*VolumeNodeResources) ProtoMessage() {} func (*VolumeNodeResources) Descriptor() ([]byte, []int) { - return fileDescriptor_3b530c1983504d8d, []int{12} + return fileDescriptor_3b530c1983504d8d, []int{15} } func (m *VolumeNodeResources) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -411,6 +495,9 @@ func (m *VolumeNodeResources) XXX_DiscardUnknown() { var xxx_messageInfo_VolumeNodeResources proto.InternalMessageInfo func init() { + proto.RegisterType((*CSIDriver)(nil), "k8s.io.api.storage.v1.CSIDriver") + proto.RegisterType((*CSIDriverList)(nil), "k8s.io.api.storage.v1.CSIDriverList") + proto.RegisterType((*CSIDriverSpec)(nil), "k8s.io.api.storage.v1.CSIDriverSpec") proto.RegisterType((*CSINode)(nil), "k8s.io.api.storage.v1.CSINode") proto.RegisterType((*CSINodeDriver)(nil), "k8s.io.api.storage.v1.CSINodeDriver") proto.RegisterType((*CSINodeList)(nil), "k8s.io.api.storage.v1.CSINodeList") @@ -433,83 +520,233 @@ func init() { } var fileDescriptor_3b530c1983504d8d = []byte{ - // 1212 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x57, 0x41, 0x6f, 0xe3, 0x44, - 0x14, 0xae, 0x9b, 0xa4, 0x4d, 0x27, 0x2d, 0x9b, 0xce, 0x16, 0x08, 0x39, 0x24, 0x95, 0x41, 0x10, - 0x0a, 0xeb, 0x6c, 0x97, 0x65, 0xb5, 0x42, 0x02, 0x29, 0x6e, 0x23, 0x51, 0xd1, 0xb4, 0xd5, 0xb4, - 0xac, 0x10, 0x02, 0xc4, 0xd4, 0x1e, 0x52, 0x6f, 0x62, 0x8f, 0xf1, 0x4c, 0x02, 0xb9, 0x71, 0xe2, - 0x86, 0x04, 0x57, 0x7e, 0x05, 0x5c, 0x39, 0x72, 0x2a, 0xb7, 0x15, 0xa7, 0x3d, 0x45, 0xd4, 0x9c, - 0xe1, 0x07, 0xf4, 0x84, 0x66, 0x3c, 0x8d, 0x9d, 0xc4, 0x29, 0xe9, 0xa5, 0xb7, 0xcc, 0x9b, 0xf7, - 0x7d, 0xef, 0xbd, 0xf9, 0xde, 0xbc, 0x71, 0xc0, 0x07, 0x9d, 0xc7, 0xcc, 0x70, 0x68, 0xbd, 0xd3, - 0x3b, 0x25, 0x81, 0x47, 0x38, 0x61, 0xf5, 0x3e, 0xf1, 0x6c, 0x1a, 0xd4, 0xd5, 0x06, 0xf6, 0x9d, - 0x3a, 0xe3, 0x34, 0xc0, 0x6d, 0x52, 0xef, 0x6f, 0xd7, 0xdb, 0xc4, 0x23, 0x01, 0xe6, 0xc4, 0x36, - 0xfc, 0x80, 0x72, 0x0a, 0x5f, 0x8c, 0xdc, 0x0c, 0xec, 0x3b, 0x86, 0x72, 0x33, 0xfa, 0xdb, 0xe5, - 0x7b, 0x6d, 0x87, 0x9f, 0xf5, 0x4e, 0x0d, 0x8b, 0xba, 0xf5, 0x36, 0x6d, 0xd3, 0xba, 0xf4, 0x3e, - 0xed, 0x7d, 0x25, 0x57, 0x72, 0x21, 0x7f, 0x45, 0x2c, 0x65, 0x3d, 0x11, 0xcc, 0xa2, 0x41, 0x5a, - 0xa4, 0xf2, 0xc3, 0xd8, 0xc7, 0xc5, 0xd6, 0x99, 0xe3, 0x91, 0x60, 0x50, 0xf7, 0x3b, 0x6d, 0x61, - 0x60, 0x75, 0x97, 0x70, 0x9c, 0x86, 0xaa, 0xcf, 0x42, 0x05, 0x3d, 0x8f, 0x3b, 0x2e, 0x99, 0x02, - 0x3c, 0xfa, 0x3f, 0x00, 0xb3, 0xce, 0x88, 0x8b, 0x27, 0x71, 0xfa, 0xaf, 0x1a, 0x58, 0xde, 0x39, - 0xde, 0x3b, 0xa0, 0x36, 0x81, 0x5f, 0x82, 0xbc, 0xc8, 0xc7, 0xc6, 0x1c, 0x97, 0xb4, 0x4d, 0xad, - 0x56, 0x78, 0x70, 0xdf, 0x88, 0xcf, 0x69, 0x44, 0x6b, 0xf8, 0x9d, 0xb6, 0x30, 0x30, 0x43, 0x78, - 0x1b, 0xfd, 0x6d, 0xe3, 0xf0, 0xf4, 0x29, 0xb1, 0x78, 0x8b, 0x70, 0x6c, 0xc2, 0xf3, 0x61, 0x75, - 0x21, 0x1c, 0x56, 0x41, 0x6c, 0x43, 0x23, 0x56, 0xb8, 0x0b, 0xb2, 0xcc, 0x27, 0x56, 0x69, 0x51, - 0xb2, 0xeb, 0x46, 0xaa, 0x0a, 0x86, 0xca, 0xe7, 0xd8, 0x27, 0x96, 0xb9, 0xaa, 0xf8, 0xb2, 0x62, - 0x85, 0x24, 0x5a, 0xff, 0x57, 0x03, 0x6b, 0xca, 0x67, 0x37, 0x70, 0xfa, 0x24, 0x80, 0x9b, 0x20, - 0xeb, 0x61, 0x97, 0xc8, 0xac, 0x57, 0x62, 0xcc, 0x01, 0x76, 0x09, 0x92, 0x3b, 0xf0, 0x75, 0xb0, - 0xe4, 0x51, 0x9b, 0xec, 0xed, 0xca, 0xd8, 0x2b, 0xe6, 0x0b, 0xca, 0x67, 0xe9, 0x40, 0x5a, 0x91, - 0xda, 0x85, 0x0f, 0xc1, 0x2a, 0xa7, 0x3e, 0xed, 0xd2, 0xf6, 0xe0, 0x23, 0x32, 0x60, 0xa5, 0xcc, - 0x66, 0xa6, 0xb6, 0x62, 0x16, 0xc3, 0x61, 0x75, 0xf5, 0x24, 0x61, 0x47, 0x63, 0x5e, 0xf0, 0x73, - 0x50, 0xc0, 0xdd, 0x2e, 0xb5, 0x30, 0xc7, 0xa7, 0x5d, 0x52, 0xca, 0xca, 0xf2, 0xb6, 0x66, 0x94, - 0xf7, 0x84, 0x76, 0x7b, 0x2e, 0x11, 0x71, 0x11, 0x61, 0xb4, 0x17, 0x58, 0x84, 0x99, 0x77, 0xc2, - 0x61, 0xb5, 0xd0, 0x88, 0x29, 0x50, 0x92, 0x4f, 0xff, 0x45, 0x03, 0x05, 0x55, 0xf0, 0xbe, 0xc3, - 0x38, 0xfc, 0x6c, 0x4a, 0x28, 0x63, 0x3e, 0xa1, 0x04, 0x5a, 0xca, 0x54, 0x54, 0xe5, 0xe7, 0xaf, - 0x2c, 0x09, 0x91, 0x76, 0x40, 0xce, 0xe1, 0xc4, 0x65, 0xa5, 0xc5, 0xcd, 0x4c, 0xad, 0xf0, 0xa0, - 0x72, 0xbd, 0x4a, 0xe6, 0x9a, 0xa2, 0xca, 0xed, 0x09, 0x10, 0x8a, 0xb0, 0xfa, 0x17, 0xa3, 0x8c, - 0x85, 0x70, 0xf0, 0x10, 0x2c, 0xdb, 0x52, 0x2a, 0x56, 0xd2, 0x24, 0xeb, 0x6b, 0xd7, 0xb3, 0x46, - 0xba, 0x9a, 0x77, 0x14, 0xf7, 0x72, 0xb4, 0x66, 0xe8, 0x8a, 0x45, 0xff, 0x61, 0x09, 0xac, 0x1e, - 0x47, 0xb0, 0x9d, 0x2e, 0x66, 0xec, 0x16, 0x9a, 0xf7, 0x5d, 0x50, 0xf0, 0x03, 0xda, 0x77, 0x98, - 0x43, 0x3d, 0x12, 0xa8, 0x3e, 0xba, 0xab, 0x20, 0x85, 0xa3, 0x78, 0x0b, 0x25, 0xfd, 0x60, 0x1b, - 0x00, 0x1f, 0x07, 0xd8, 0x25, 0x5c, 0x54, 0x9f, 0x91, 0xd5, 0xbf, 0x33, 0xa3, 0xfa, 0x64, 0x45, - 0xc6, 0xd1, 0x08, 0xd5, 0xf4, 0x78, 0x30, 0x88, 0xb3, 0x8b, 0x37, 0x50, 0x82, 0x1a, 0x76, 0xc0, - 0x5a, 0x40, 0xac, 0x2e, 0x76, 0xdc, 0x23, 0xda, 0x75, 0xac, 0x81, 0x6c, 0xc3, 0x15, 0xb3, 0x19, - 0x0e, 0xab, 0x6b, 0x28, 0xb9, 0x71, 0x39, 0xac, 0xde, 0x9f, 0x9e, 0x5c, 0xc6, 0x11, 0x09, 0x98, - 0xc3, 0x38, 0xf1, 0x78, 0xd4, 0xa1, 0x63, 0x18, 0x34, 0xce, 0x2d, 0xee, 0x89, 0x4b, 0x7b, 0x1e, - 0x3f, 0xf4, 0xb9, 0x43, 0x3d, 0x56, 0xca, 0xc5, 0xf7, 0xa4, 0x95, 0xb0, 0xa3, 0x31, 0x2f, 0xb8, - 0x0f, 0x36, 0x44, 0x5f, 0x7f, 0x13, 0x05, 0x68, 0x7e, 0xeb, 0x63, 0x4f, 0x9c, 0x52, 0x69, 0x69, - 0x53, 0xab, 0xe5, 0xcd, 0x52, 0x38, 0xac, 0x6e, 0x34, 0x52, 0xf6, 0x51, 0x2a, 0x0a, 0x7e, 0x02, - 0xd6, 0xfb, 0xd2, 0x64, 0x3a, 0x9e, 0xed, 0x78, 0xed, 0x16, 0xb5, 0x49, 0x69, 0x59, 0x16, 0xbd, - 0x15, 0x0e, 0xab, 0xeb, 0x4f, 0x26, 0x37, 0x2f, 0xd3, 0x8c, 0x68, 0x9a, 0x04, 0x7e, 0x0d, 0xd6, - 0x65, 0x44, 0x62, 0xab, 0x4b, 0xef, 0x10, 0x56, 0xca, 0x4b, 0xe9, 0x6a, 0x49, 0xe9, 0xc4, 0xd1, - 0x09, 0xdd, 0xae, 0x46, 0xc3, 0x31, 0xe9, 0x12, 0x8b, 0xd3, 0xe0, 0x84, 0x04, 0xae, 0xf9, 0x8a, - 0xd2, 0x6b, 0xbd, 0x31, 0x49, 0x85, 0xa6, 0xd9, 0xcb, 0xef, 0x83, 0x3b, 0x13, 0x82, 0xc3, 0x22, - 0xc8, 0x74, 0xc8, 0x20, 0x1a, 0x6a, 0x48, 0xfc, 0x84, 0x1b, 0x20, 0xd7, 0xc7, 0xdd, 0x1e, 0x89, - 0x9a, 0x0f, 0x45, 0x8b, 0xf7, 0x16, 0x1f, 0x6b, 0xfa, 0x6f, 0x1a, 0x28, 0x26, 0xbb, 0xe7, 0x16, - 0xe6, 0xc4, 0x87, 0xe3, 0x73, 0xe2, 0xd5, 0x39, 0x7a, 0x7a, 0xc6, 0xb0, 0xf8, 0x79, 0x11, 0x14, - 0x23, 0x5d, 0x1a, 0x9c, 0x63, 0xeb, 0xcc, 0x25, 0x1e, 0xbf, 0x85, 0x0b, 0xdd, 0x1a, 0x7b, 0x8d, - 0xde, 0xba, 0x76, 0x5c, 0xc7, 0x89, 0xcd, 0x7a, 0x96, 0xe0, 0xc7, 0x60, 0x89, 0x71, 0xcc, 0x7b, - 0xe2, 0x92, 0x0b, 0xc2, 0x7b, 0xf3, 0x12, 0x4a, 0x50, 0xfc, 0x22, 0x45, 0x6b, 0xa4, 0xc8, 0xf4, - 0xdf, 0x35, 0xb0, 0x31, 0x09, 0xb9, 0x05, 0x75, 0xf7, 0xc7, 0xd5, 0x7d, 0x63, 0xce, 0x62, 0x66, - 0x28, 0xfc, 0xa7, 0x06, 0x5e, 0x9a, 0xaa, 0x5b, 0xbe, 0x7d, 0x62, 0x26, 0xf8, 0x13, 0x93, 0xe7, - 0x20, 0x7e, 0xcb, 0xe5, 0x4c, 0x38, 0x4a, 0xd9, 0x47, 0xa9, 0x28, 0xf8, 0x14, 0x14, 0x1d, 0xaf, - 0xeb, 0x78, 0x24, 0xb2, 0x1d, 0xc7, 0xfa, 0xa6, 0x5e, 0xdc, 0x49, 0x66, 0x29, 0xee, 0x46, 0x38, - 0xac, 0x16, 0xf7, 0x26, 0x58, 0xd0, 0x14, 0xaf, 0xfe, 0x47, 0x8a, 0x32, 0xf2, 0xb5, 0x7b, 0x1b, - 0xe4, 0xb1, 0xb4, 0x90, 0x40, 0x95, 0x31, 0x3a, 0xe9, 0x86, 0xb2, 0xa3, 0x91, 0x87, 0xec, 0x1b, - 0x79, 0x14, 0x2a, 0xd1, 0xb9, 0xfb, 0x46, 0x82, 0x12, 0x7d, 0x23, 0xd7, 0x48, 0x91, 0x89, 0x24, - 0xc4, 0x37, 0x8d, 0x3c, 0xcb, 0xcc, 0x78, 0x12, 0x07, 0xca, 0x8e, 0x46, 0x1e, 0xfa, 0x3f, 0x99, - 0x14, 0x81, 0x64, 0x03, 0x26, 0xaa, 0xb1, 0x65, 0x35, 0xf9, 0xa9, 0x6a, 0xec, 0x51, 0x35, 0x36, - 0xfc, 0x49, 0x03, 0x10, 0x8f, 0x28, 0x5a, 0x57, 0x0d, 0x1a, 0x75, 0x51, 0xf3, 0x46, 0x57, 0xc2, - 0x68, 0x4c, 0xf1, 0x44, 0x2f, 0x61, 0x59, 0xc5, 0x87, 0xd3, 0x0e, 0x28, 0x25, 0x38, 0xb4, 0x41, - 0x21, 0xb2, 0x36, 0x83, 0x80, 0x06, 0xea, 0x7a, 0xea, 0xd7, 0xe6, 0x22, 0x3d, 0xcd, 0x8a, 0xfc, - 0x2c, 0x8b, 0xa1, 0x97, 0xc3, 0x6a, 0x21, 0xb1, 0x8f, 0x92, 0xb4, 0x22, 0x8a, 0x4d, 0xe2, 0x28, - 0xd9, 0x9b, 0x45, 0xd9, 0x25, 0xb3, 0xa3, 0x24, 0x68, 0xcb, 0x4d, 0xf0, 0xf2, 0x8c, 0x63, 0xb9, - 0xd1, 0x7b, 0xf1, 0xbd, 0x06, 0x92, 0x31, 0xe0, 0x3e, 0xc8, 0x8a, 0xbf, 0x09, 0x6a, 0x90, 0x6c, - 0xcd, 0x37, 0x48, 0x4e, 0x1c, 0x97, 0xc4, 0xa3, 0x50, 0xac, 0x90, 0x64, 0x81, 0x6f, 0x82, 0x65, - 0x97, 0x30, 0x86, 0xdb, 0x2a, 0x72, 0xfc, 0x21, 0xd7, 0x8a, 0xcc, 0xe8, 0x6a, 0x5f, 0x7f, 0x04, - 0xee, 0xa6, 0x7c, 0x10, 0xc3, 0x2a, 0xc8, 0x59, 0xe2, 0xcb, 0x41, 0x26, 0x94, 0x33, 0x57, 0xc4, - 0x44, 0xd9, 0x11, 0x06, 0x14, 0xd9, 0xcd, 0xda, 0xf9, 0x45, 0x65, 0xe1, 0xd9, 0x45, 0x65, 0xe1, - 0xf9, 0x45, 0x65, 0xe1, 0xbb, 0xb0, 0xa2, 0x9d, 0x87, 0x15, 0xed, 0x59, 0x58, 0xd1, 0x9e, 0x87, - 0x15, 0xed, 0xaf, 0xb0, 0xa2, 0xfd, 0xf8, 0x77, 0x65, 0xe1, 0xd3, 0xc5, 0xfe, 0xf6, 0x7f, 0x01, - 0x00, 0x00, 0xff, 0xff, 0x5c, 0x59, 0x23, 0xb9, 0x2c, 0x0e, 0x00, 0x00, + // 1336 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x57, 0x4f, 0x6f, 0x1b, 0x45, + 0x14, 0xcf, 0xc6, 0xf9, 0x3b, 0x4e, 0x5a, 0x67, 0x1a, 0xc0, 0xe4, 0xe0, 0x8d, 0x96, 0x0a, 0x42, + 0xa1, 0xeb, 0xa6, 0x94, 0xaa, 0xaa, 0x04, 0x52, 0x36, 0x31, 0x22, 0x22, 0x4e, 0xa2, 0x49, 0xa9, + 0x10, 0x02, 0xc4, 0x64, 0xf7, 0xd5, 0xd9, 0xc6, 0xbb, 0xb3, 0xdd, 0x1d, 0x1b, 0x7c, 0xe3, 0xc4, + 0x0d, 0x09, 0xae, 0x7c, 0x0a, 0x90, 0xe0, 0xc2, 0x91, 0x53, 0xb9, 0x55, 0x9c, 0x7a, 0xb2, 0xe8, + 0x72, 0x05, 0x3e, 0x40, 0x4e, 0x68, 0x66, 0xc7, 0xde, 0xb5, 0xbd, 0x4e, 0xd3, 0x8b, 0x6f, 0x9e, + 0xf7, 0xde, 0xef, 0xf7, 0xde, 0x9b, 0xf7, 0x67, 0xd6, 0xe8, 0xfd, 0xd3, 0x3b, 0x91, 0xe9, 0xb2, + 0xea, 0x69, 0xeb, 0x18, 0x42, 0x1f, 0x38, 0x44, 0xd5, 0x36, 0xf8, 0x0e, 0x0b, 0xab, 0x4a, 0x41, + 0x03, 0xb7, 0x1a, 0x71, 0x16, 0xd2, 0x06, 0x54, 0xdb, 0x9b, 0xd5, 0x06, 0xf8, 0x10, 0x52, 0x0e, + 0x8e, 0x19, 0x84, 0x8c, 0x33, 0xfc, 0x52, 0x62, 0x66, 0xd2, 0xc0, 0x35, 0x95, 0x99, 0xd9, 0xde, + 0x5c, 0xbb, 0xde, 0x70, 0xf9, 0x49, 0xeb, 0xd8, 0xb4, 0x99, 0x57, 0x6d, 0xb0, 0x06, 0xab, 0x4a, + 0xeb, 0xe3, 0xd6, 0x03, 0x79, 0x92, 0x07, 0xf9, 0x2b, 0x61, 0x59, 0x33, 0x32, 0xce, 0x6c, 0x16, + 0xe6, 0x79, 0x5a, 0xbb, 0x95, 0xda, 0x78, 0xd4, 0x3e, 0x71, 0x7d, 0x08, 0x3b, 0xd5, 0xe0, 0xb4, + 0x21, 0x04, 0x51, 0xd5, 0x03, 0x4e, 0xf3, 0x50, 0xd5, 0x71, 0xa8, 0xb0, 0xe5, 0x73, 0xd7, 0x83, + 0x11, 0xc0, 0xed, 0xe7, 0x01, 0x22, 0xfb, 0x04, 0x3c, 0x3a, 0x8c, 0x33, 0x7e, 0xd5, 0xd0, 0xe2, + 0xf6, 0xd1, 0xee, 0x4e, 0xe8, 0xb6, 0x21, 0xc4, 0x5f, 0xa2, 0x05, 0x11, 0x91, 0x43, 0x39, 0x2d, + 0x6b, 0xeb, 0xda, 0x46, 0xf1, 0xe6, 0x0d, 0x33, 0xbd, 0xa9, 0x3e, 0xb1, 0x19, 0x9c, 0x36, 0x84, + 0x20, 0x32, 0x85, 0xb5, 0xd9, 0xde, 0x34, 0x0f, 0x8e, 0x1f, 0x82, 0xcd, 0xeb, 0xc0, 0xa9, 0x85, + 0x1f, 0x77, 0xf5, 0xa9, 0xb8, 0xab, 0xa3, 0x54, 0x46, 0xfa, 0xac, 0xf8, 0x03, 0x34, 0x13, 0x05, + 0x60, 0x97, 0xa7, 0x25, 0xfb, 0x55, 0x33, 0xb7, 0x0e, 0x66, 0x3f, 0xa2, 0xa3, 0x00, 0x6c, 0x6b, + 0x49, 0x31, 0xce, 0x88, 0x13, 0x91, 0x78, 0xe3, 0x17, 0x0d, 0x2d, 0xf7, 0xad, 0xf6, 0xdc, 0x88, + 0xe3, 0xcf, 0x46, 0x62, 0x37, 0x2f, 0x16, 0xbb, 0x40, 0xcb, 0xc8, 0x4b, 0xca, 0xcf, 0x42, 0x4f, + 0x92, 0x89, 0xbb, 0x86, 0x66, 0x5d, 0x0e, 0x5e, 0x54, 0x9e, 0x5e, 0x2f, 0x6c, 0x14, 0x6f, 0xae, + 0x3f, 0x2f, 0x70, 0x6b, 0x59, 0x91, 0xcd, 0xee, 0x0a, 0x18, 0x49, 0xd0, 0xc6, 0x3f, 0xd9, 0xb0, + 0x45, 0x3a, 0xf8, 0x2e, 0xba, 0x44, 0x39, 0xa7, 0xf6, 0x09, 0x81, 0x47, 0x2d, 0x37, 0x04, 0x47, + 0x06, 0xbf, 0x60, 0xe1, 0xb8, 0xab, 0x5f, 0xda, 0x1a, 0xd0, 0x90, 0x21, 0x4b, 0x81, 0x0d, 0x98, + 0xb3, 0xeb, 0x3f, 0x60, 0x07, 0x7e, 0x9d, 0xb5, 0x7c, 0x2e, 0xaf, 0x55, 0x61, 0x0f, 0x07, 0x34, + 0x64, 0xc8, 0x12, 0xdb, 0x68, 0xb5, 0xcd, 0x9a, 0x2d, 0x0f, 0xf6, 0xdc, 0x07, 0x60, 0x77, 0xec, + 0x26, 0xd4, 0x99, 0x03, 0x51, 0xb9, 0xb0, 0x5e, 0xd8, 0x58, 0xb4, 0xaa, 0x71, 0x57, 0x5f, 0xbd, + 0x9f, 0xa3, 0x3f, 0xeb, 0xea, 0x57, 0x72, 0xe4, 0x24, 0x97, 0xcc, 0xf8, 0x59, 0x43, 0xf3, 0xdb, + 0x47, 0xbb, 0xfb, 0xcc, 0x81, 0x09, 0xf4, 0xd6, 0xce, 0x40, 0x6f, 0x19, 0xe3, 0x4b, 0x24, 0xe2, + 0x19, 0xdb, 0x59, 0xff, 0x25, 0x25, 0x12, 0x36, 0x6a, 0x2a, 0xd6, 0xd1, 0x8c, 0x4f, 0x3d, 0x90, + 0x51, 0x2f, 0xa6, 0x98, 0x7d, 0xea, 0x01, 0x91, 0x1a, 0xfc, 0x3a, 0x9a, 0xf3, 0x99, 0x03, 0xbb, + 0x3b, 0xd2, 0xf7, 0xa2, 0x75, 0x49, 0xd9, 0xcc, 0xed, 0x4b, 0x29, 0x51, 0x5a, 0x7c, 0x0b, 0x2d, + 0x71, 0x16, 0xb0, 0x26, 0x6b, 0x74, 0x3e, 0x82, 0x4e, 0xef, 0xb2, 0x4b, 0x71, 0x57, 0x5f, 0xba, + 0x97, 0x91, 0x93, 0x01, 0x2b, 0xfc, 0x39, 0x2a, 0xd2, 0x66, 0x93, 0xd9, 0x94, 0xd3, 0xe3, 0x26, + 0x94, 0x67, 0x64, 0x7a, 0xd7, 0xc6, 0xa4, 0x97, 0x14, 0x47, 0xf8, 0x25, 0x10, 0xb1, 0x56, 0x68, + 0x43, 0x64, 0x5d, 0x8e, 0xbb, 0x7a, 0x71, 0x2b, 0xa5, 0x20, 0x59, 0x3e, 0xe3, 0x27, 0x0d, 0x15, + 0x55, 0xc2, 0x13, 0x18, 0xa4, 0xed, 0xc1, 0x41, 0xaa, 0x9c, 0x5f, 0xa5, 0x31, 0x63, 0xf4, 0x45, + 0x3f, 0x62, 0x39, 0x43, 0x07, 0x68, 0xde, 0x91, 0xa5, 0x8a, 0xca, 0x9a, 0x64, 0xbd, 0x7a, 0x3e, + 0xab, 0x1a, 0xd1, 0xcb, 0x8a, 0x7b, 0x3e, 0x39, 0x47, 0xa4, 0xc7, 0x62, 0x7c, 0x37, 0x87, 0x96, + 0x8e, 0x12, 0xd8, 0x76, 0x93, 0x46, 0xd1, 0x04, 0x9a, 0xf7, 0x5d, 0x54, 0x0c, 0x42, 0xd6, 0x76, + 0x23, 0x97, 0xf9, 0x10, 0xaa, 0x3e, 0xba, 0xa2, 0x20, 0xc5, 0xc3, 0x54, 0x45, 0xb2, 0x76, 0xb8, + 0x81, 0x50, 0x40, 0x43, 0xea, 0x01, 0x17, 0xd9, 0x17, 0x64, 0xf6, 0xef, 0x8c, 0xc9, 0x3e, 0x9b, + 0x91, 0x79, 0xd8, 0x47, 0xd5, 0x7c, 0x1e, 0x76, 0xd2, 0xe8, 0x52, 0x05, 0xc9, 0x50, 0xe3, 0x53, + 0xb4, 0x1c, 0x82, 0xdd, 0xa4, 0xae, 0x77, 0xc8, 0x9a, 0xae, 0xdd, 0x91, 0x6d, 0xb8, 0x68, 0xd5, + 0xe2, 0xae, 0xbe, 0x4c, 0xb2, 0x8a, 0xb3, 0xae, 0x7e, 0x63, 0xf4, 0x5d, 0x34, 0x0f, 0x21, 0x8c, + 0xdc, 0x88, 0x83, 0xcf, 0x93, 0x0e, 0x1d, 0xc0, 0x90, 0x41, 0x6e, 0x31, 0x27, 0x9e, 0xd8, 0x52, + 0x07, 0x01, 0x77, 0x99, 0x1f, 0x95, 0x67, 0xd3, 0x39, 0xa9, 0x67, 0xe4, 0x64, 0xc0, 0x0a, 0xef, + 0xa1, 0x55, 0xd1, 0xd7, 0x5f, 0x25, 0x0e, 0x6a, 0x5f, 0x07, 0xd4, 0x17, 0xb7, 0x54, 0x9e, 0x93, + 0x4b, 0xb1, 0x2c, 0x56, 0xda, 0x56, 0x8e, 0x9e, 0xe4, 0xa2, 0xf0, 0x27, 0x68, 0x25, 0xd9, 0x69, + 0x96, 0xeb, 0x3b, 0xae, 0xdf, 0x10, 0x1b, 0xad, 0x3c, 0x2f, 0x93, 0xbe, 0x16, 0x77, 0xf5, 0x95, + 0xfb, 0xc3, 0xca, 0xb3, 0x3c, 0x21, 0x19, 0x25, 0xc1, 0x8f, 0xd0, 0x8a, 0xf4, 0x08, 0x8e, 0x1a, + 0x7a, 0x17, 0xa2, 0xf2, 0x82, 0x2c, 0xdd, 0x46, 0xb6, 0x74, 0xe2, 0xea, 0x44, 0xdd, 0x7a, 0xab, + 0xe1, 0x08, 0x9a, 0x60, 0x73, 0x16, 0xde, 0x83, 0xd0, 0xb3, 0x5e, 0x55, 0xf5, 0x5a, 0xd9, 0x1a, + 0xa6, 0x22, 0xa3, 0xec, 0x6b, 0xef, 0xa1, 0xcb, 0x43, 0x05, 0xc7, 0x25, 0x54, 0x38, 0x85, 0x4e, + 0xb2, 0xd4, 0x88, 0xf8, 0x89, 0x57, 0xd1, 0x6c, 0x9b, 0x36, 0x5b, 0x90, 0x34, 0x1f, 0x49, 0x0e, + 0x77, 0xa7, 0xef, 0x68, 0xc6, 0x6f, 0x1a, 0x2a, 0x65, 0xbb, 0x67, 0x02, 0x7b, 0xe2, 0xc3, 0xc1, + 0x3d, 0xf1, 0xda, 0x05, 0x7a, 0x7a, 0xcc, 0xb2, 0xf8, 0x71, 0x1a, 0x95, 0x92, 0xba, 0x24, 0xcf, + 0xa9, 0x07, 0x3e, 0x9f, 0xc0, 0x40, 0xd7, 0x07, 0x5e, 0xa3, 0xb7, 0xce, 0x5d, 0xd7, 0x69, 0x60, + 0xe3, 0x9e, 0x25, 0xfc, 0x31, 0x9a, 0x8b, 0x38, 0xe5, 0x2d, 0x31, 0xe4, 0x82, 0xf0, 0xfa, 0x45, + 0x09, 0x25, 0x28, 0x7d, 0x91, 0x92, 0x33, 0x51, 0x64, 0xc6, 0xef, 0x1a, 0x5a, 0x1d, 0x86, 0x4c, + 0xa0, 0xba, 0x7b, 0x83, 0xd5, 0x7d, 0xe3, 0x82, 0xc9, 0x8c, 0xa9, 0xf0, 0x9f, 0x1a, 0x7a, 0x79, + 0x24, 0x6f, 0xf9, 0xf6, 0x89, 0x9d, 0x10, 0x0c, 0x6d, 0x9e, 0xfd, 0xf4, 0x2d, 0x97, 0x3b, 0xe1, + 0x30, 0x47, 0x4f, 0x72, 0x51, 0xf8, 0x21, 0x2a, 0xb9, 0x7e, 0xd3, 0xf5, 0x21, 0x91, 0x1d, 0xa5, + 0xf5, 0xcd, 0x1d, 0xdc, 0x61, 0x66, 0x59, 0xdc, 0xd5, 0xb8, 0xab, 0x97, 0x76, 0x87, 0x58, 0xc8, + 0x08, 0xaf, 0xf1, 0x47, 0x4e, 0x65, 0xe4, 0x6b, 0xf7, 0x36, 0x5a, 0x48, 0xbe, 0x03, 0x21, 0x54, + 0x69, 0xf4, 0x6f, 0x7a, 0x4b, 0xc9, 0x49, 0xdf, 0x42, 0xf6, 0x8d, 0xbc, 0x0a, 0x15, 0xe8, 0x85, + 0xfb, 0x46, 0x82, 0x32, 0x7d, 0x23, 0xcf, 0x44, 0x91, 0x89, 0x20, 0xc4, 0x37, 0x8d, 0xbc, 0xcb, + 0xc2, 0x60, 0x10, 0xfb, 0x4a, 0x4e, 0xfa, 0x16, 0xc6, 0xbf, 0x85, 0x9c, 0x02, 0xc9, 0x06, 0xcc, + 0x64, 0xd3, 0xfb, 0xf2, 0x1d, 0xce, 0xc6, 0xe9, 0x67, 0xe3, 0xe0, 0x1f, 0x34, 0x84, 0x69, 0x9f, + 0xa2, 0xde, 0x6b, 0xd0, 0xa4, 0x8b, 0x6a, 0x2f, 0x34, 0x12, 0xe6, 0xd6, 0x08, 0x4f, 0xf2, 0x12, + 0xae, 0x29, 0xff, 0x78, 0xd4, 0x80, 0xe4, 0x38, 0xc7, 0x0e, 0x2a, 0x26, 0xd2, 0x5a, 0x18, 0xb2, + 0x50, 0x8d, 0xa7, 0x71, 0x6e, 0x2c, 0xd2, 0xd2, 0xaa, 0xc8, 0xcf, 0xb2, 0x14, 0x7a, 0xd6, 0xd5, + 0x8b, 0x19, 0x3d, 0xc9, 0xd2, 0x0a, 0x2f, 0x0e, 0xa4, 0x5e, 0x66, 0x5e, 0xcc, 0xcb, 0x0e, 0x8c, + 0xf7, 0x92, 0xa1, 0x5d, 0xab, 0xa1, 0x57, 0xc6, 0x5c, 0xcb, 0x0b, 0xbd, 0x17, 0xdf, 0x6a, 0x28, + 0xeb, 0x03, 0xef, 0xa1, 0x19, 0xf1, 0x27, 0x54, 0x2d, 0x92, 0x6b, 0x17, 0x5b, 0x24, 0xf7, 0x5c, + 0x0f, 0xd2, 0x55, 0x28, 0x4e, 0x44, 0xb2, 0xe0, 0x37, 0xd1, 0xbc, 0x07, 0x51, 0x44, 0x1b, 0xca, + 0x73, 0xfa, 0x21, 0x57, 0x4f, 0xc4, 0xa4, 0xa7, 0x37, 0x6e, 0xa3, 0x2b, 0x39, 0x1f, 0xc4, 0x58, + 0x47, 0xb3, 0xb6, 0xfc, 0xbf, 0x24, 0x02, 0x9a, 0xb5, 0x16, 0xc5, 0x46, 0xd9, 0x96, 0x7f, 0x93, + 0x12, 0xb9, 0xb5, 0xf1, 0xf8, 0x59, 0x65, 0xea, 0xc9, 0xb3, 0xca, 0xd4, 0xd3, 0x67, 0x95, 0xa9, + 0x6f, 0xe2, 0x8a, 0xf6, 0x38, 0xae, 0x68, 0x4f, 0xe2, 0x8a, 0xf6, 0x34, 0xae, 0x68, 0x7f, 0xc5, + 0x15, 0xed, 0xfb, 0xbf, 0x2b, 0x53, 0x9f, 0x4e, 0xb7, 0x37, 0xff, 0x0f, 0x00, 0x00, 0xff, 0xff, + 0x9b, 0x74, 0xdf, 0x56, 0x8a, 0x10, 0x00, 0x00, +} + +func (m *CSIDriver) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *CSIDriver) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CSIDriver) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *CSIDriverList) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *CSIDriverList) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CSIDriverList) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Items) > 0 { + for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + { + size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *CSIDriverSpec) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *CSIDriverSpec) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CSIDriverSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.VolumeLifecycleModes) > 0 { + for iNdEx := len(m.VolumeLifecycleModes) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.VolumeLifecycleModes[iNdEx]) + copy(dAtA[i:], m.VolumeLifecycleModes[iNdEx]) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.VolumeLifecycleModes[iNdEx]))) + i-- + dAtA[i] = 0x1a + } + } + if m.PodInfoOnMount != nil { + i-- + if *m.PodInfoOnMount { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x10 + } + if m.AttachRequired != nil { + i-- + if *m.AttachRequired { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil } func (m *CSINode) Marshal() (dAtA []byte, err error) { @@ -1190,6 +1427,57 @@ func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } +func (m *CSIDriver) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ObjectMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = m.Spec.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *CSIDriverList) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ListMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Items) > 0 { + for _, e := range m.Items { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *CSIDriverSpec) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.AttachRequired != nil { + n += 2 + } + if m.PodInfoOnMount != nil { + n += 2 + } + if len(m.VolumeLifecycleModes) > 0 { + for _, s := range m.VolumeLifecycleModes { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + func (m *CSINode) Size() (n int) { if m == nil { return 0 @@ -1440,6 +1728,45 @@ func sovGenerated(x uint64) (n int) { func sozGenerated(x uint64) (n int) { return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } +func (this *CSIDriver) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CSIDriver{`, + `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "CSIDriverSpec", "CSIDriverSpec", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *CSIDriverList) String() string { + if this == nil { + return "nil" + } + repeatedStringForItems := "[]CSIDriver{" + for _, f := range this.Items { + repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "CSIDriver", "CSIDriver", 1), `&`, ``, 1) + "," + } + repeatedStringForItems += "}" + s := strings.Join([]string{`&CSIDriverList{`, + `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, + `Items:` + repeatedStringForItems + `,`, + `}`, + }, "") + return s +} +func (this *CSIDriverSpec) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CSIDriverSpec{`, + `AttachRequired:` + valueToStringGenerated(this.AttachRequired) + `,`, + `PodInfoOnMount:` + valueToStringGenerated(this.PodInfoOnMount) + `,`, + `VolumeLifecycleModes:` + fmt.Sprintf("%v", this.VolumeLifecycleModes) + `,`, + `}`, + }, "") + return s +} func (this *CSINode) String() string { if this == nil { return "nil" @@ -1607,44 +1934,410 @@ func (this *VolumeAttachmentStatus) String() string { for _, k := range keysForAttachmentMetadata { mapStringForAttachmentMetadata += fmt.Sprintf("%v: %v,", k, this.AttachmentMetadata[k]) } - mapStringForAttachmentMetadata += "}" - s := strings.Join([]string{`&VolumeAttachmentStatus{`, - `Attached:` + fmt.Sprintf("%v", this.Attached) + `,`, - `AttachmentMetadata:` + mapStringForAttachmentMetadata + `,`, - `AttachError:` + strings.Replace(this.AttachError.String(), "VolumeError", "VolumeError", 1) + `,`, - `DetachError:` + strings.Replace(this.DetachError.String(), "VolumeError", "VolumeError", 1) + `,`, - `}`, - }, "") - return s -} -func (this *VolumeError) String() string { - if this == nil { - return "nil" + mapStringForAttachmentMetadata += "}" + s := strings.Join([]string{`&VolumeAttachmentStatus{`, + `Attached:` + fmt.Sprintf("%v", this.Attached) + `,`, + `AttachmentMetadata:` + mapStringForAttachmentMetadata + `,`, + `AttachError:` + strings.Replace(this.AttachError.String(), "VolumeError", "VolumeError", 1) + `,`, + `DetachError:` + strings.Replace(this.DetachError.String(), "VolumeError", "VolumeError", 1) + `,`, + `}`, + }, "") + return s +} +func (this *VolumeError) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&VolumeError{`, + `Time:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Time), "Time", "v1.Time", 1), `&`, ``, 1) + `,`, + `Message:` + fmt.Sprintf("%v", this.Message) + `,`, + `}`, + }, "") + return s +} +func (this *VolumeNodeResources) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&VolumeNodeResources{`, + `Count:` + valueToStringGenerated(this.Count) + `,`, + `}`, + }, "") + return s +} +func valueToStringGenerated(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *CSIDriver) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: CSIDriver: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CSIDriver: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CSIDriverList) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: CSIDriverList: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CSIDriverList: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Items = append(m.Items, CSIDriver{}) + if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF } - s := strings.Join([]string{`&VolumeError{`, - `Time:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Time), "Time", "v1.Time", 1), `&`, ``, 1) + `,`, - `Message:` + fmt.Sprintf("%v", this.Message) + `,`, - `}`, - }, "") - return s + return nil } -func (this *VolumeNodeResources) String() string { - if this == nil { - return "nil" +func (m *CSIDriverSpec) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: CSIDriverSpec: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CSIDriverSpec: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field AttachRequired", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.AttachRequired = &b + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PodInfoOnMount", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.PodInfoOnMount = &b + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field VolumeLifecycleModes", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.VolumeLifecycleModes = append(m.VolumeLifecycleModes, VolumeLifecycleMode(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } } - s := strings.Join([]string{`&VolumeNodeResources{`, - `Count:` + valueToStringGenerated(this.Count) + `,`, - `}`, - }, "") - return s -} -func valueToStringGenerated(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" + + if iNdEx > l { + return io.ErrUnexpectedEOF } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) + return nil } func (m *CSINode) Unmarshal(dAtA []byte) error { l := len(dAtA) @@ -3685,6 +4378,7 @@ func (m *VolumeNodeResources) Unmarshal(dAtA []byte) error { func skipGenerated(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -3716,10 +4410,8 @@ func skipGenerated(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -3740,55 +4432,30 @@ func skipGenerated(dAtA []byte) (n int, err error) { return 0, ErrInvalidLengthGenerated } iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - return iNdEx, nil case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipGenerated(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenerated + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenerated + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group") ) diff --git a/vendor/k8s.io/api/storage/v1/generated.proto b/vendor/k8s.io/api/storage/v1/generated.proto index e5004c8424..cb3c42c7fe 100644 --- a/vendor/k8s.io/api/storage/v1/generated.proto +++ b/vendor/k8s.io/api/storage/v1/generated.proto @@ -29,6 +29,97 @@ import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; // Package-wide variables from generator "generated". option go_package = "v1"; +// CSIDriver captures information about a Container Storage Interface (CSI) +// volume driver deployed on the cluster. +// Kubernetes attach detach controller uses this object to determine whether attach is required. +// Kubelet uses this object to determine whether pod information needs to be passed on mount. +// CSIDriver objects are non-namespaced. +message CSIDriver { + // Standard object metadata. + // metadata.Name indicates the name of the CSI driver that this object + // refers to; it MUST be the same name returned by the CSI GetPluginName() + // call for that driver. + // The driver name must be 63 characters or less, beginning and ending with + // an alphanumeric character ([a-z0-9A-Z]) with dashes (-), dots (.), and + // alphanumerics between. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; + + // Specification of the CSI Driver. + optional CSIDriverSpec spec = 2; +} + +// CSIDriverList is a collection of CSIDriver objects. +message CSIDriverList { + // Standard list metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; + + // items is the list of CSIDriver + repeated CSIDriver items = 2; +} + +// CSIDriverSpec is the specification of a CSIDriver. +message CSIDriverSpec { + // attachRequired indicates this CSI volume driver requires an attach + // operation (because it implements the CSI ControllerPublishVolume() + // method), and that the Kubernetes attach detach controller should call + // the attach volume interface which checks the volumeattachment status + // and waits until the volume is attached before proceeding to mounting. + // The CSI external-attacher coordinates with CSI volume driver and updates + // the volumeattachment status when the attach operation is complete. + // If the CSIDriverRegistry feature gate is enabled and the value is + // specified to false, the attach operation will be skipped. + // Otherwise the attach operation will be called. + // +optional + optional bool attachRequired = 1; + + // If set to true, podInfoOnMount indicates this CSI volume driver + // requires additional pod information (like podName, podUID, etc.) during + // mount operations. + // If set to false, pod information will not be passed on mount. + // Default is false. + // The CSI driver specifies podInfoOnMount as part of driver deployment. + // If true, Kubelet will pass pod information as VolumeContext in the CSI + // NodePublishVolume() calls. + // The CSI driver is responsible for parsing and validating the information + // passed in as VolumeContext. + // The following VolumeConext will be passed if podInfoOnMount is set to true. + // This list might grow, but the prefix will be used. + // "csi.storage.k8s.io/pod.name": pod.Name + // "csi.storage.k8s.io/pod.namespace": pod.Namespace + // "csi.storage.k8s.io/pod.uid": string(pod.UID) + // "csi.storage.k8s.io/ephemeral": "true" iff the volume is an ephemeral inline volume + // defined by a CSIVolumeSource, otherwise "false" + // + // "csi.storage.k8s.io/ephemeral" is a new feature in Kubernetes 1.16. It is only + // required for drivers which support both the "Persistent" and "Ephemeral" VolumeLifecycleMode. + // Other drivers can leave pod info disabled and/or ignore this field. + // As Kubernetes 1.15 doesn't support this field, drivers can only support one mode when + // deployed on such a cluster and the deployment determines which mode that is, for example + // via a command line parameter of the driver. + // +optional + optional bool podInfoOnMount = 2; + + // volumeLifecycleModes defines what kind of volumes this CSI volume driver supports. + // The default if the list is empty is "Persistent", which is the usage + // defined by the CSI specification and implemented in Kubernetes via the usual + // PV/PVC mechanism. + // The other mode is "Ephemeral". In this mode, volumes are defined inline + // inside the pod spec with CSIVolumeSource and their lifecycle is tied to + // the lifecycle of that pod. A driver has to be aware of this + // because it is only going to get a NodePublishVolume call for such a volume. + // For more information about implementing this mode, see + // https://kubernetes-csi.github.io/docs/ephemeral-local-volumes.html + // A driver can support one or more of these modes and + // more modes may be added in the future. + // This field is beta. + // +optional + // +listType=set + repeated string volumeLifecycleModes = 3; +} + // CSINode holds information about all CSI drivers installed on a node. // CSI drivers do not need to create the CSINode object directly. As long as // they use the node-driver-registrar sidecar container, the kubelet will diff --git a/vendor/k8s.io/api/storage/v1/register.go b/vendor/k8s.io/api/storage/v1/register.go index 67493fd0fa..1a2f83d1b8 100644 --- a/vendor/k8s.io/api/storage/v1/register.go +++ b/vendor/k8s.io/api/storage/v1/register.go @@ -52,6 +52,9 @@ func addKnownTypes(scheme *runtime.Scheme) error { &CSINode{}, &CSINodeList{}, + + &CSIDriver{}, + &CSIDriverList{}, ) metav1.AddToGroupVersion(scheme, SchemeGroupVersion) diff --git a/vendor/k8s.io/api/storage/v1/types.go b/vendor/k8s.io/api/storage/v1/types.go index 86cb78b640..556427bb20 100644 --- a/vendor/k8s.io/api/storage/v1/types.go +++ b/vendor/k8s.io/api/storage/v1/types.go @@ -221,6 +221,132 @@ type VolumeError struct { // +genclient:nonNamespaced // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// CSIDriver captures information about a Container Storage Interface (CSI) +// volume driver deployed on the cluster. +// Kubernetes attach detach controller uses this object to determine whether attach is required. +// Kubelet uses this object to determine whether pod information needs to be passed on mount. +// CSIDriver objects are non-namespaced. +type CSIDriver struct { + metav1.TypeMeta `json:",inline"` + + // Standard object metadata. + // metadata.Name indicates the name of the CSI driver that this object + // refers to; it MUST be the same name returned by the CSI GetPluginName() + // call for that driver. + // The driver name must be 63 characters or less, beginning and ending with + // an alphanumeric character ([a-z0-9A-Z]) with dashes (-), dots (.), and + // alphanumerics between. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // Specification of the CSI Driver. + Spec CSIDriverSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// CSIDriverList is a collection of CSIDriver objects. +type CSIDriverList struct { + metav1.TypeMeta `json:",inline"` + + // Standard list metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + // +optional + metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // items is the list of CSIDriver + Items []CSIDriver `json:"items" protobuf:"bytes,2,rep,name=items"` +} + +// CSIDriverSpec is the specification of a CSIDriver. +type CSIDriverSpec struct { + // attachRequired indicates this CSI volume driver requires an attach + // operation (because it implements the CSI ControllerPublishVolume() + // method), and that the Kubernetes attach detach controller should call + // the attach volume interface which checks the volumeattachment status + // and waits until the volume is attached before proceeding to mounting. + // The CSI external-attacher coordinates with CSI volume driver and updates + // the volumeattachment status when the attach operation is complete. + // If the CSIDriverRegistry feature gate is enabled and the value is + // specified to false, the attach operation will be skipped. + // Otherwise the attach operation will be called. + // +optional + AttachRequired *bool `json:"attachRequired,omitempty" protobuf:"varint,1,opt,name=attachRequired"` + + // If set to true, podInfoOnMount indicates this CSI volume driver + // requires additional pod information (like podName, podUID, etc.) during + // mount operations. + // If set to false, pod information will not be passed on mount. + // Default is false. + // The CSI driver specifies podInfoOnMount as part of driver deployment. + // If true, Kubelet will pass pod information as VolumeContext in the CSI + // NodePublishVolume() calls. + // The CSI driver is responsible for parsing and validating the information + // passed in as VolumeContext. + // The following VolumeConext will be passed if podInfoOnMount is set to true. + // This list might grow, but the prefix will be used. + // "csi.storage.k8s.io/pod.name": pod.Name + // "csi.storage.k8s.io/pod.namespace": pod.Namespace + // "csi.storage.k8s.io/pod.uid": string(pod.UID) + // "csi.storage.k8s.io/ephemeral": "true" iff the volume is an ephemeral inline volume + // defined by a CSIVolumeSource, otherwise "false" + // + // "csi.storage.k8s.io/ephemeral" is a new feature in Kubernetes 1.16. It is only + // required for drivers which support both the "Persistent" and "Ephemeral" VolumeLifecycleMode. + // Other drivers can leave pod info disabled and/or ignore this field. + // As Kubernetes 1.15 doesn't support this field, drivers can only support one mode when + // deployed on such a cluster and the deployment determines which mode that is, for example + // via a command line parameter of the driver. + // +optional + PodInfoOnMount *bool `json:"podInfoOnMount,omitempty" protobuf:"bytes,2,opt,name=podInfoOnMount"` + + // volumeLifecycleModes defines what kind of volumes this CSI volume driver supports. + // The default if the list is empty is "Persistent", which is the usage + // defined by the CSI specification and implemented in Kubernetes via the usual + // PV/PVC mechanism. + // The other mode is "Ephemeral". In this mode, volumes are defined inline + // inside the pod spec with CSIVolumeSource and their lifecycle is tied to + // the lifecycle of that pod. A driver has to be aware of this + // because it is only going to get a NodePublishVolume call for such a volume. + // For more information about implementing this mode, see + // https://kubernetes-csi.github.io/docs/ephemeral-local-volumes.html + // A driver can support one or more of these modes and + // more modes may be added in the future. + // This field is beta. + // +optional + // +listType=set + VolumeLifecycleModes []VolumeLifecycleMode `json:"volumeLifecycleModes,omitempty" protobuf:"bytes,3,opt,name=volumeLifecycleModes"` +} + +// VolumeLifecycleMode is an enumeration of possible usage modes for a volume +// provided by a CSI driver. More modes may be added in the future. +type VolumeLifecycleMode string + +const ( + // VolumeLifecyclePersistent explicitly confirms that the driver implements + // the full CSI spec. It is the default when CSIDriverSpec.VolumeLifecycleModes is not + // set. Such volumes are managed in Kubernetes via the persistent volume + // claim mechanism and have a lifecycle that is independent of the pods which + // use them. + VolumeLifecyclePersistent VolumeLifecycleMode = "Persistent" + + // VolumeLifecycleEphemeral indicates that the driver can be used for + // ephemeral inline volumes. Such volumes are specified inside the pod + // spec with a CSIVolumeSource and, as far as Kubernetes is concerned, have + // a lifecycle that is tied to the lifecycle of the pod. For example, such + // a volume might contain data that gets created specifically for that pod, + // like secrets. + // But how the volume actually gets created and managed is entirely up to + // the driver. It might also use reference counting to share the same volume + // instance among different pods if the CSIVolumeSource of those pods is + // identical. + VolumeLifecycleEphemeral VolumeLifecycleMode = "Ephemeral" +) + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + // CSINode holds information about all CSI drivers installed on a node. // CSI drivers do not need to create the CSINode object directly. As long as // they use the node-driver-registrar sidecar container, the kubelet will diff --git a/vendor/k8s.io/api/storage/v1/types_swagger_doc_generated.go b/vendor/k8s.io/api/storage/v1/types_swagger_doc_generated.go index d6e3a16293..0e524a28cd 100644 --- a/vendor/k8s.io/api/storage/v1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/api/storage/v1/types_swagger_doc_generated.go @@ -27,6 +27,37 @@ package v1 // Those methods can be generated by using hack/update-generated-swagger-docs.sh // AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT. +var map_CSIDriver = map[string]string{ + "": "CSIDriver captures information about a Container Storage Interface (CSI) volume driver deployed on the cluster. Kubernetes attach detach controller uses this object to determine whether attach is required. Kubelet uses this object to determine whether pod information needs to be passed on mount. CSIDriver objects are non-namespaced.", + "metadata": "Standard object metadata. metadata.Name indicates the name of the CSI driver that this object refers to; it MUST be the same name returned by the CSI GetPluginName() call for that driver. The driver name must be 63 characters or less, beginning and ending with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), dots (.), and alphanumerics between. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "spec": "Specification of the CSI Driver.", +} + +func (CSIDriver) SwaggerDoc() map[string]string { + return map_CSIDriver +} + +var map_CSIDriverList = map[string]string{ + "": "CSIDriverList is a collection of CSIDriver objects.", + "metadata": "Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "items": "items is the list of CSIDriver", +} + +func (CSIDriverList) SwaggerDoc() map[string]string { + return map_CSIDriverList +} + +var map_CSIDriverSpec = map[string]string{ + "": "CSIDriverSpec is the specification of a CSIDriver.", + "attachRequired": "attachRequired indicates this CSI volume driver requires an attach operation (because it implements the CSI ControllerPublishVolume() method), and that the Kubernetes attach detach controller should call the attach volume interface which checks the volumeattachment status and waits until the volume is attached before proceeding to mounting. The CSI external-attacher coordinates with CSI volume driver and updates the volumeattachment status when the attach operation is complete. If the CSIDriverRegistry feature gate is enabled and the value is specified to false, the attach operation will be skipped. Otherwise the attach operation will be called.", + "podInfoOnMount": "If set to true, podInfoOnMount indicates this CSI volume driver requires additional pod information (like podName, podUID, etc.) during mount operations. If set to false, pod information will not be passed on mount. Default is false. The CSI driver specifies podInfoOnMount as part of driver deployment. If true, Kubelet will pass pod information as VolumeContext in the CSI NodePublishVolume() calls. The CSI driver is responsible for parsing and validating the information passed in as VolumeContext. The following VolumeConext will be passed if podInfoOnMount is set to true. This list might grow, but the prefix will be used. \"csi.storage.k8s.io/pod.name\": pod.Name \"csi.storage.k8s.io/pod.namespace\": pod.Namespace \"csi.storage.k8s.io/pod.uid\": string(pod.UID) \"csi.storage.k8s.io/ephemeral\": \"true\" iff the volume is an ephemeral inline volume\n defined by a CSIVolumeSource, otherwise \"false\"\n\n\"csi.storage.k8s.io/ephemeral\" is a new feature in Kubernetes 1.16. It is only required for drivers which support both the \"Persistent\" and \"Ephemeral\" VolumeLifecycleMode. Other drivers can leave pod info disabled and/or ignore this field. As Kubernetes 1.15 doesn't support this field, drivers can only support one mode when deployed on such a cluster and the deployment determines which mode that is, for example via a command line parameter of the driver.", + "volumeLifecycleModes": "volumeLifecycleModes defines what kind of volumes this CSI volume driver supports. The default if the list is empty is \"Persistent\", which is the usage defined by the CSI specification and implemented in Kubernetes via the usual PV/PVC mechanism. The other mode is \"Ephemeral\". In this mode, volumes are defined inline inside the pod spec with CSIVolumeSource and their lifecycle is tied to the lifecycle of that pod. A driver has to be aware of this because it is only going to get a NodePublishVolume call for such a volume. For more information about implementing this mode, see https://kubernetes-csi.github.io/docs/ephemeral-local-volumes.html A driver can support one or more of these modes and more modes may be added in the future. This field is beta.", +} + +func (CSIDriverSpec) SwaggerDoc() map[string]string { + return map_CSIDriverSpec +} + var map_CSINode = map[string]string{ "": "CSINode holds information about all CSI drivers installed on a node. CSI drivers do not need to create the CSINode object directly. As long as they use the node-driver-registrar sidecar container, the kubelet will automatically populate the CSINode object for the CSI driver as part of kubelet plugin registration. CSINode has the same name as a node. If the object is missing, it means either there are no CSI Drivers available on the node, or the Kubelet version is low enough that it doesn't create this object. CSINode has an OwnerReference that points to the corresponding node object.", "metadata": "metadata.name must be the Kubernetes node name.", diff --git a/vendor/k8s.io/api/storage/v1/zz_generated.deepcopy.go b/vendor/k8s.io/api/storage/v1/zz_generated.deepcopy.go index 76255a0af7..efaa40aa79 100644 --- a/vendor/k8s.io/api/storage/v1/zz_generated.deepcopy.go +++ b/vendor/k8s.io/api/storage/v1/zz_generated.deepcopy.go @@ -25,6 +25,97 @@ import ( runtime "k8s.io/apimachinery/pkg/runtime" ) +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *CSIDriver) DeepCopyInto(out *CSIDriver) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CSIDriver. +func (in *CSIDriver) DeepCopy() *CSIDriver { + if in == nil { + return nil + } + out := new(CSIDriver) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *CSIDriver) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *CSIDriverList) DeepCopyInto(out *CSIDriverList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]CSIDriver, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CSIDriverList. +func (in *CSIDriverList) DeepCopy() *CSIDriverList { + if in == nil { + return nil + } + out := new(CSIDriverList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *CSIDriverList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *CSIDriverSpec) DeepCopyInto(out *CSIDriverSpec) { + *out = *in + if in.AttachRequired != nil { + in, out := &in.AttachRequired, &out.AttachRequired + *out = new(bool) + **out = **in + } + if in.PodInfoOnMount != nil { + in, out := &in.PodInfoOnMount, &out.PodInfoOnMount + *out = new(bool) + **out = **in + } + if in.VolumeLifecycleModes != nil { + in, out := &in.VolumeLifecycleModes, &out.VolumeLifecycleModes + *out = make([]VolumeLifecycleMode, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CSIDriverSpec. +func (in *CSIDriverSpec) DeepCopy() *CSIDriverSpec { + if in == nil { + return nil + } + out := new(CSIDriverSpec) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *CSINode) DeepCopyInto(out *CSINode) { *out = *in diff --git a/vendor/k8s.io/api/storage/v1alpha1/generated.pb.go b/vendor/k8s.io/api/storage/v1alpha1/generated.pb.go index 423243521c..1f9db7ae08 100644 --- a/vendor/k8s.io/api/storage/v1alpha1/generated.pb.go +++ b/vendor/k8s.io/api/storage/v1alpha1/generated.pb.go @@ -43,7 +43,7 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *VolumeAttachment) Reset() { *m = VolumeAttachment{} } func (*VolumeAttachment) ProtoMessage() {} @@ -1730,6 +1730,7 @@ func (m *VolumeError) Unmarshal(dAtA []byte) error { func skipGenerated(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -1761,10 +1762,8 @@ func skipGenerated(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -1785,55 +1784,30 @@ func skipGenerated(dAtA []byte) (n int, err error) { return 0, ErrInvalidLengthGenerated } iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - return iNdEx, nil case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipGenerated(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenerated + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenerated + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group") ) diff --git a/vendor/k8s.io/api/storage/v1beta1/generated.pb.go b/vendor/k8s.io/api/storage/v1beta1/generated.pb.go index cd35af34f8..af4ce59f24 100644 --- a/vendor/k8s.io/api/storage/v1beta1/generated.pb.go +++ b/vendor/k8s.io/api/storage/v1beta1/generated.pb.go @@ -44,7 +44,7 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *CSIDriver) Reset() { *m = CSIDriver{} } func (*CSIDriver) ProtoMessage() {} @@ -4378,6 +4378,7 @@ func (m *VolumeNodeResources) Unmarshal(dAtA []byte) error { func skipGenerated(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -4409,10 +4410,8 @@ func skipGenerated(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -4433,55 +4432,30 @@ func skipGenerated(dAtA []byte) (n int, err error) { return 0, ErrInvalidLengthGenerated } iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - return iNdEx, nil case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipGenerated(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenerated + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenerated + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group") ) diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/.import-restrictions b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/.import-restrictions new file mode 100644 index 0000000000..7408dd1212 --- /dev/null +++ b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/.import-restrictions @@ -0,0 +1,5 @@ +inverseRules: + # Allow use of this package in all k8s.io packages. + - selectorRegexp: k8s[.]io + allowedPrefixes: + - '' diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/generated.pb.go b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/generated.pb.go index 5099b4144b..9d268f2841 100644 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/generated.pb.go +++ b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/generated.pb.go @@ -46,7 +46,7 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *ConversionRequest) Reset() { *m = ConversionRequest{} } func (*ConversionRequest) ProtoMessage() {} @@ -8905,6 +8905,7 @@ func (m *WebhookConversion) Unmarshal(dAtA []byte) error { func skipGenerated(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -8936,10 +8937,8 @@ func skipGenerated(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -8960,55 +8959,30 @@ func skipGenerated(dAtA []byte) (n int, err error) { return 0, ErrInvalidLengthGenerated } iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - return iNdEx, nil case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipGenerated(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenerated + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenerated + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group") ) diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/generated.proto b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/generated.proto index de4229cd86..ad7f405b38 100644 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/generated.proto +++ b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/generated.proto @@ -238,6 +238,7 @@ message CustomResourceDefinitionStatus { // acceptedNames are the names that are actually being used to serve discovery. // They may be different than the names in spec. + // +optional optional CustomResourceDefinitionNames acceptedNames = 2; // storedVersions lists all versions of CustomResources that were ever persisted. Tracking these @@ -246,6 +247,7 @@ message CustomResourceDefinitionStatus { // no old objects are left in storage), and then remove the rest of the // versions from this list. // Versions may not be removed from `spec.versions` while they exist in this list. + // +optional repeated string storedVersions = 3; } @@ -491,6 +493,9 @@ message JSONSchemaProps { // extension set to "map". Also, the values specified for this attribute must // be a scalar typed field of the child structure (no nesting is supported). // + // The properties specified must either be required or have a default value, + // to ensure those properties are present for all list items. + // // +optional repeated string xKubernetesListMapKeys = 41; diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/types.go b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/types.go index d0c41c6c46..542af7297c 100644 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/types.go +++ b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/types.go @@ -322,6 +322,7 @@ type CustomResourceDefinitionStatus struct { // acceptedNames are the names that are actually being used to serve discovery. // They may be different than the names in spec. + // +optional AcceptedNames CustomResourceDefinitionNames `json:"acceptedNames" protobuf:"bytes,2,opt,name=acceptedNames"` // storedVersions lists all versions of CustomResources that were ever persisted. Tracking these @@ -330,6 +331,7 @@ type CustomResourceDefinitionStatus struct { // no old objects are left in storage), and then remove the rest of the // versions from this list. // Versions may not be removed from `spec.versions` while they exist in this list. + // +optional StoredVersions []string `json:"storedVersions" protobuf:"bytes,3,rep,name=storedVersions"` } diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/types_jsonschema.go b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/types_jsonschema.go index cd60312617..4433e2446f 100644 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/types_jsonschema.go +++ b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/types_jsonschema.go @@ -126,6 +126,9 @@ type JSONSchemaProps struct { // extension set to "map". Also, the values specified for this attribute must // be a scalar typed field of the child structure (no nesting is supported). // + // The properties specified must either be required or have a default value, + // to ensure those properties are present for all list items. + // // +optional XListMapKeys []string `json:"x-kubernetes-list-map-keys,omitempty" protobuf:"bytes,41,rep,name=xKubernetesListMapKeys"` diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/.import-restrictions b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/.import-restrictions new file mode 100644 index 0000000000..7408dd1212 --- /dev/null +++ b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/.import-restrictions @@ -0,0 +1,5 @@ +inverseRules: + # Allow use of this package in all k8s.io packages. + - selectorRegexp: k8s[.]io + allowedPrefixes: + - '' diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/generated.pb.go b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/generated.pb.go index 6e11dcc9f5..c5a76f5e39 100644 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/generated.pb.go +++ b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/generated.pb.go @@ -46,7 +46,7 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *ConversionRequest) Reset() { *m = ConversionRequest{} } func (*ConversionRequest) ProtoMessage() {} @@ -8942,6 +8942,7 @@ func (m *WebhookClientConfig) Unmarshal(dAtA []byte) error { func skipGenerated(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -8973,10 +8974,8 @@ func skipGenerated(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -8997,55 +8996,30 @@ func skipGenerated(dAtA []byte) (n int, err error) { return 0, ErrInvalidLengthGenerated } iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - return iNdEx, nil case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipGenerated(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenerated + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenerated + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group") ) diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/generated.proto b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/generated.proto index 705ca07995..1a89f29299 100644 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/generated.proto +++ b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/generated.proto @@ -284,6 +284,7 @@ message CustomResourceDefinitionStatus { // acceptedNames are the names that are actually being used to serve discovery. // They may be different than the names in spec. + // +optional optional CustomResourceDefinitionNames acceptedNames = 2; // storedVersions lists all versions of CustomResources that were ever persisted. Tracking these @@ -292,6 +293,7 @@ message CustomResourceDefinitionStatus { // no old objects are left in storage), and then remove the rest of the // versions from this list. // Versions may not be removed from `spec.versions` while they exist in this list. + // +optional repeated string storedVersions = 3; } @@ -543,6 +545,9 @@ message JSONSchemaProps { // extension set to "map". Also, the values specified for this attribute must // be a scalar typed field of the child structure (no nesting is supported). // + // The properties specified must either be required or have a default value, + // to ensure those properties are present for all list items. + // // +optional repeated string xKubernetesListMapKeys = 41; diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/types.go b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/types.go index f6c260b686..9d3d995f49 100644 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/types.go +++ b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/types.go @@ -354,6 +354,7 @@ type CustomResourceDefinitionStatus struct { // acceptedNames are the names that are actually being used to serve discovery. // They may be different than the names in spec. + // +optional AcceptedNames CustomResourceDefinitionNames `json:"acceptedNames" protobuf:"bytes,2,opt,name=acceptedNames"` // storedVersions lists all versions of CustomResources that were ever persisted. Tracking these @@ -362,6 +363,7 @@ type CustomResourceDefinitionStatus struct { // no old objects are left in storage), and then remove the rest of the // versions from this list. // Versions may not be removed from `spec.versions` while they exist in this list. + // +optional StoredVersions []string `json:"storedVersions" protobuf:"bytes,3,rep,name=storedVersions"` } diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/types_jsonschema.go b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/types_jsonschema.go index b51a324996..1837723a08 100644 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/types_jsonschema.go +++ b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/types_jsonschema.go @@ -126,6 +126,9 @@ type JSONSchemaProps struct { // extension set to "map". Also, the values specified for this attribute must // be a scalar typed field of the child structure (no nesting is supported). // + // The properties specified must either be required or have a default value, + // to ensure those properties are present for all list items. + // // +optional XListMapKeys []string `json:"x-kubernetes-list-map-keys,omitempty" protobuf:"bytes,41,rep,name=xKubernetesListMapKeys"` diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/clientset.go b/vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/clientset.go index de6ad042ec..74aca8f569 100644 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/clientset.go +++ b/vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/clientset.go @@ -67,7 +67,7 @@ func NewForConfig(c *rest.Config) (*Clientset, error) { configShallowCopy := *c if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 { if configShallowCopy.Burst <= 0 { - return nil, fmt.Errorf("Burst is required to be greater than 0 when RateLimiter is not set and QPS is set to greater than 0") + return nil, fmt.Errorf("burst is required to be greater than 0 when RateLimiter is not set and QPS is set to greater than 0") } configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst) } diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1/customresourcedefinition.go b/vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1/customresourcedefinition.go index e3fa436973..5569b12d9c 100644 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1/customresourcedefinition.go +++ b/vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1/customresourcedefinition.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" "time" v1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" @@ -37,15 +38,15 @@ type CustomResourceDefinitionsGetter interface { // CustomResourceDefinitionInterface has methods to work with CustomResourceDefinition resources. type CustomResourceDefinitionInterface interface { - Create(*v1.CustomResourceDefinition) (*v1.CustomResourceDefinition, error) - Update(*v1.CustomResourceDefinition) (*v1.CustomResourceDefinition, error) - UpdateStatus(*v1.CustomResourceDefinition) (*v1.CustomResourceDefinition, error) - Delete(name string, options *metav1.DeleteOptions) error - DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error - Get(name string, options metav1.GetOptions) (*v1.CustomResourceDefinition, error) - List(opts metav1.ListOptions) (*v1.CustomResourceDefinitionList, error) - Watch(opts metav1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.CustomResourceDefinition, err error) + Create(ctx context.Context, customResourceDefinition *v1.CustomResourceDefinition, opts metav1.CreateOptions) (*v1.CustomResourceDefinition, error) + Update(ctx context.Context, customResourceDefinition *v1.CustomResourceDefinition, opts metav1.UpdateOptions) (*v1.CustomResourceDefinition, error) + UpdateStatus(ctx context.Context, customResourceDefinition *v1.CustomResourceDefinition, opts metav1.UpdateOptions) (*v1.CustomResourceDefinition, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.CustomResourceDefinition, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.CustomResourceDefinitionList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.CustomResourceDefinition, err error) CustomResourceDefinitionExpansion } @@ -62,19 +63,19 @@ func newCustomResourceDefinitions(c *ApiextensionsV1Client) *customResourceDefin } // Get takes name of the customResourceDefinition, and returns the corresponding customResourceDefinition object, and an error if there is any. -func (c *customResourceDefinitions) Get(name string, options metav1.GetOptions) (result *v1.CustomResourceDefinition, err error) { +func (c *customResourceDefinitions) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.CustomResourceDefinition, err error) { result = &v1.CustomResourceDefinition{} err = c.client.Get(). Resource("customresourcedefinitions"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of CustomResourceDefinitions that match those selectors. -func (c *customResourceDefinitions) List(opts metav1.ListOptions) (result *v1.CustomResourceDefinitionList, err error) { +func (c *customResourceDefinitions) List(ctx context.Context, opts metav1.ListOptions) (result *v1.CustomResourceDefinitionList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -84,13 +85,13 @@ func (c *customResourceDefinitions) List(opts metav1.ListOptions) (result *v1.Cu Resource("customresourcedefinitions"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested customResourceDefinitions. -func (c *customResourceDefinitions) Watch(opts metav1.ListOptions) (watch.Interface, error) { +func (c *customResourceDefinitions) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -100,81 +101,84 @@ func (c *customResourceDefinitions) Watch(opts metav1.ListOptions) (watch.Interf Resource("customresourcedefinitions"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a customResourceDefinition and creates it. Returns the server's representation of the customResourceDefinition, and an error, if there is any. -func (c *customResourceDefinitions) Create(customResourceDefinition *v1.CustomResourceDefinition) (result *v1.CustomResourceDefinition, err error) { +func (c *customResourceDefinitions) Create(ctx context.Context, customResourceDefinition *v1.CustomResourceDefinition, opts metav1.CreateOptions) (result *v1.CustomResourceDefinition, err error) { result = &v1.CustomResourceDefinition{} err = c.client.Post(). Resource("customresourcedefinitions"). + VersionedParams(&opts, scheme.ParameterCodec). Body(customResourceDefinition). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a customResourceDefinition and updates it. Returns the server's representation of the customResourceDefinition, and an error, if there is any. -func (c *customResourceDefinitions) Update(customResourceDefinition *v1.CustomResourceDefinition) (result *v1.CustomResourceDefinition, err error) { +func (c *customResourceDefinitions) Update(ctx context.Context, customResourceDefinition *v1.CustomResourceDefinition, opts metav1.UpdateOptions) (result *v1.CustomResourceDefinition, err error) { result = &v1.CustomResourceDefinition{} err = c.client.Put(). Resource("customresourcedefinitions"). Name(customResourceDefinition.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(customResourceDefinition). - Do(). + Do(ctx). Into(result) return } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *customResourceDefinitions) UpdateStatus(customResourceDefinition *v1.CustomResourceDefinition) (result *v1.CustomResourceDefinition, err error) { +func (c *customResourceDefinitions) UpdateStatus(ctx context.Context, customResourceDefinition *v1.CustomResourceDefinition, opts metav1.UpdateOptions) (result *v1.CustomResourceDefinition, err error) { result = &v1.CustomResourceDefinition{} err = c.client.Put(). Resource("customresourcedefinitions"). Name(customResourceDefinition.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(customResourceDefinition). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the customResourceDefinition and deletes it. Returns an error if one occurs. -func (c *customResourceDefinitions) Delete(name string, options *metav1.DeleteOptions) error { +func (c *customResourceDefinitions) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { return c.client.Delete(). Resource("customresourcedefinitions"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *customResourceDefinitions) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error { +func (c *customResourceDefinitions) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Resource("customresourcedefinitions"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched customResourceDefinition. -func (c *customResourceDefinitions) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.CustomResourceDefinition, err error) { +func (c *customResourceDefinitions) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.CustomResourceDefinition, err error) { result = &v1.CustomResourceDefinition{} err = c.client.Patch(pt). Resource("customresourcedefinitions"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1/fake/fake_customresourcedefinition.go b/vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1/fake/fake_customresourcedefinition.go index cb41040050..b3edf00660 100644 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1/fake/fake_customresourcedefinition.go +++ b/vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1/fake/fake_customresourcedefinition.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" @@ -38,7 +40,7 @@ var customresourcedefinitionsResource = schema.GroupVersionResource{Group: "apie var customresourcedefinitionsKind = schema.GroupVersionKind{Group: "apiextensions.k8s.io", Version: "v1", Kind: "CustomResourceDefinition"} // Get takes name of the customResourceDefinition, and returns the corresponding customResourceDefinition object, and an error if there is any. -func (c *FakeCustomResourceDefinitions) Get(name string, options v1.GetOptions) (result *apiextensionsv1.CustomResourceDefinition, err error) { +func (c *FakeCustomResourceDefinitions) Get(ctx context.Context, name string, options v1.GetOptions) (result *apiextensionsv1.CustomResourceDefinition, err error) { obj, err := c.Fake. Invokes(testing.NewRootGetAction(customresourcedefinitionsResource, name), &apiextensionsv1.CustomResourceDefinition{}) if obj == nil { @@ -48,7 +50,7 @@ func (c *FakeCustomResourceDefinitions) Get(name string, options v1.GetOptions) } // List takes label and field selectors, and returns the list of CustomResourceDefinitions that match those selectors. -func (c *FakeCustomResourceDefinitions) List(opts v1.ListOptions) (result *apiextensionsv1.CustomResourceDefinitionList, err error) { +func (c *FakeCustomResourceDefinitions) List(ctx context.Context, opts v1.ListOptions) (result *apiextensionsv1.CustomResourceDefinitionList, err error) { obj, err := c.Fake. Invokes(testing.NewRootListAction(customresourcedefinitionsResource, customresourcedefinitionsKind, opts), &apiextensionsv1.CustomResourceDefinitionList{}) if obj == nil { @@ -69,13 +71,13 @@ func (c *FakeCustomResourceDefinitions) List(opts v1.ListOptions) (result *apiex } // Watch returns a watch.Interface that watches the requested customResourceDefinitions. -func (c *FakeCustomResourceDefinitions) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeCustomResourceDefinitions) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewRootWatchAction(customresourcedefinitionsResource, opts)) } // Create takes the representation of a customResourceDefinition and creates it. Returns the server's representation of the customResourceDefinition, and an error, if there is any. -func (c *FakeCustomResourceDefinitions) Create(customResourceDefinition *apiextensionsv1.CustomResourceDefinition) (result *apiextensionsv1.CustomResourceDefinition, err error) { +func (c *FakeCustomResourceDefinitions) Create(ctx context.Context, customResourceDefinition *apiextensionsv1.CustomResourceDefinition, opts v1.CreateOptions) (result *apiextensionsv1.CustomResourceDefinition, err error) { obj, err := c.Fake. Invokes(testing.NewRootCreateAction(customresourcedefinitionsResource, customResourceDefinition), &apiextensionsv1.CustomResourceDefinition{}) if obj == nil { @@ -85,7 +87,7 @@ func (c *FakeCustomResourceDefinitions) Create(customResourceDefinition *apiexte } // Update takes the representation of a customResourceDefinition and updates it. Returns the server's representation of the customResourceDefinition, and an error, if there is any. -func (c *FakeCustomResourceDefinitions) Update(customResourceDefinition *apiextensionsv1.CustomResourceDefinition) (result *apiextensionsv1.CustomResourceDefinition, err error) { +func (c *FakeCustomResourceDefinitions) Update(ctx context.Context, customResourceDefinition *apiextensionsv1.CustomResourceDefinition, opts v1.UpdateOptions) (result *apiextensionsv1.CustomResourceDefinition, err error) { obj, err := c.Fake. Invokes(testing.NewRootUpdateAction(customresourcedefinitionsResource, customResourceDefinition), &apiextensionsv1.CustomResourceDefinition{}) if obj == nil { @@ -96,7 +98,7 @@ func (c *FakeCustomResourceDefinitions) Update(customResourceDefinition *apiexte // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeCustomResourceDefinitions) UpdateStatus(customResourceDefinition *apiextensionsv1.CustomResourceDefinition) (*apiextensionsv1.CustomResourceDefinition, error) { +func (c *FakeCustomResourceDefinitions) UpdateStatus(ctx context.Context, customResourceDefinition *apiextensionsv1.CustomResourceDefinition, opts v1.UpdateOptions) (*apiextensionsv1.CustomResourceDefinition, error) { obj, err := c.Fake. Invokes(testing.NewRootUpdateSubresourceAction(customresourcedefinitionsResource, "status", customResourceDefinition), &apiextensionsv1.CustomResourceDefinition{}) if obj == nil { @@ -106,22 +108,22 @@ func (c *FakeCustomResourceDefinitions) UpdateStatus(customResourceDefinition *a } // Delete takes name of the customResourceDefinition and deletes it. Returns an error if one occurs. -func (c *FakeCustomResourceDefinitions) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeCustomResourceDefinitions) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewRootDeleteAction(customresourcedefinitionsResource, name), &apiextensionsv1.CustomResourceDefinition{}) return err } // DeleteCollection deletes a collection of objects. -func (c *FakeCustomResourceDefinitions) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewRootDeleteCollectionAction(customresourcedefinitionsResource, listOptions) +func (c *FakeCustomResourceDefinitions) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(customresourcedefinitionsResource, listOpts) _, err := c.Fake.Invokes(action, &apiextensionsv1.CustomResourceDefinitionList{}) return err } // Patch applies the patch and returns the patched customResourceDefinition. -func (c *FakeCustomResourceDefinitions) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *apiextensionsv1.CustomResourceDefinition, err error) { +func (c *FakeCustomResourceDefinitions) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *apiextensionsv1.CustomResourceDefinition, err error) { obj, err := c.Fake. Invokes(testing.NewRootPatchSubresourceAction(customresourcedefinitionsResource, name, pt, data, subresources...), &apiextensionsv1.CustomResourceDefinition{}) if obj == nil { diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1/customresourcedefinition.go b/vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1/customresourcedefinition.go index c925313a7c..2d16ca7097 100644 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1/customresourcedefinition.go +++ b/vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1/customresourcedefinition.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" "time" v1beta1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1" @@ -37,15 +38,15 @@ type CustomResourceDefinitionsGetter interface { // CustomResourceDefinitionInterface has methods to work with CustomResourceDefinition resources. type CustomResourceDefinitionInterface interface { - Create(*v1beta1.CustomResourceDefinition) (*v1beta1.CustomResourceDefinition, error) - Update(*v1beta1.CustomResourceDefinition) (*v1beta1.CustomResourceDefinition, error) - UpdateStatus(*v1beta1.CustomResourceDefinition) (*v1beta1.CustomResourceDefinition, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*v1beta1.CustomResourceDefinition, error) - List(opts v1.ListOptions) (*v1beta1.CustomResourceDefinitionList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.CustomResourceDefinition, err error) + Create(ctx context.Context, customResourceDefinition *v1beta1.CustomResourceDefinition, opts v1.CreateOptions) (*v1beta1.CustomResourceDefinition, error) + Update(ctx context.Context, customResourceDefinition *v1beta1.CustomResourceDefinition, opts v1.UpdateOptions) (*v1beta1.CustomResourceDefinition, error) + UpdateStatus(ctx context.Context, customResourceDefinition *v1beta1.CustomResourceDefinition, opts v1.UpdateOptions) (*v1beta1.CustomResourceDefinition, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.CustomResourceDefinition, error) + List(ctx context.Context, opts v1.ListOptions) (*v1beta1.CustomResourceDefinitionList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.CustomResourceDefinition, err error) CustomResourceDefinitionExpansion } @@ -62,19 +63,19 @@ func newCustomResourceDefinitions(c *ApiextensionsV1beta1Client) *customResource } // Get takes name of the customResourceDefinition, and returns the corresponding customResourceDefinition object, and an error if there is any. -func (c *customResourceDefinitions) Get(name string, options v1.GetOptions) (result *v1beta1.CustomResourceDefinition, err error) { +func (c *customResourceDefinitions) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.CustomResourceDefinition, err error) { result = &v1beta1.CustomResourceDefinition{} err = c.client.Get(). Resource("customresourcedefinitions"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of CustomResourceDefinitions that match those selectors. -func (c *customResourceDefinitions) List(opts v1.ListOptions) (result *v1beta1.CustomResourceDefinitionList, err error) { +func (c *customResourceDefinitions) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.CustomResourceDefinitionList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -84,13 +85,13 @@ func (c *customResourceDefinitions) List(opts v1.ListOptions) (result *v1beta1.C Resource("customresourcedefinitions"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested customResourceDefinitions. -func (c *customResourceDefinitions) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *customResourceDefinitions) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -100,81 +101,84 @@ func (c *customResourceDefinitions) Watch(opts v1.ListOptions) (watch.Interface, Resource("customresourcedefinitions"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a customResourceDefinition and creates it. Returns the server's representation of the customResourceDefinition, and an error, if there is any. -func (c *customResourceDefinitions) Create(customResourceDefinition *v1beta1.CustomResourceDefinition) (result *v1beta1.CustomResourceDefinition, err error) { +func (c *customResourceDefinitions) Create(ctx context.Context, customResourceDefinition *v1beta1.CustomResourceDefinition, opts v1.CreateOptions) (result *v1beta1.CustomResourceDefinition, err error) { result = &v1beta1.CustomResourceDefinition{} err = c.client.Post(). Resource("customresourcedefinitions"). + VersionedParams(&opts, scheme.ParameterCodec). Body(customResourceDefinition). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a customResourceDefinition and updates it. Returns the server's representation of the customResourceDefinition, and an error, if there is any. -func (c *customResourceDefinitions) Update(customResourceDefinition *v1beta1.CustomResourceDefinition) (result *v1beta1.CustomResourceDefinition, err error) { +func (c *customResourceDefinitions) Update(ctx context.Context, customResourceDefinition *v1beta1.CustomResourceDefinition, opts v1.UpdateOptions) (result *v1beta1.CustomResourceDefinition, err error) { result = &v1beta1.CustomResourceDefinition{} err = c.client.Put(). Resource("customresourcedefinitions"). Name(customResourceDefinition.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(customResourceDefinition). - Do(). + Do(ctx). Into(result) return } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *customResourceDefinitions) UpdateStatus(customResourceDefinition *v1beta1.CustomResourceDefinition) (result *v1beta1.CustomResourceDefinition, err error) { +func (c *customResourceDefinitions) UpdateStatus(ctx context.Context, customResourceDefinition *v1beta1.CustomResourceDefinition, opts v1.UpdateOptions) (result *v1beta1.CustomResourceDefinition, err error) { result = &v1beta1.CustomResourceDefinition{} err = c.client.Put(). Resource("customresourcedefinitions"). Name(customResourceDefinition.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(customResourceDefinition). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the customResourceDefinition and deletes it. Returns an error if one occurs. -func (c *customResourceDefinitions) Delete(name string, options *v1.DeleteOptions) error { +func (c *customResourceDefinitions) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). Resource("customresourcedefinitions"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *customResourceDefinitions) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *customResourceDefinitions) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Resource("customresourcedefinitions"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched customResourceDefinition. -func (c *customResourceDefinitions) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.CustomResourceDefinition, err error) { +func (c *customResourceDefinitions) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.CustomResourceDefinition, err error) { result = &v1beta1.CustomResourceDefinition{} err = c.client.Patch(pt). Resource("customresourcedefinitions"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1/fake/fake_customresourcedefinition.go b/vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1/fake/fake_customresourcedefinition.go index bd5ffe4c3c..4fb1893844 100644 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1/fake/fake_customresourcedefinition.go +++ b/vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1/fake/fake_customresourcedefinition.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + v1beta1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" @@ -38,7 +40,7 @@ var customresourcedefinitionsResource = schema.GroupVersionResource{Group: "apie var customresourcedefinitionsKind = schema.GroupVersionKind{Group: "apiextensions.k8s.io", Version: "v1beta1", Kind: "CustomResourceDefinition"} // Get takes name of the customResourceDefinition, and returns the corresponding customResourceDefinition object, and an error if there is any. -func (c *FakeCustomResourceDefinitions) Get(name string, options v1.GetOptions) (result *v1beta1.CustomResourceDefinition, err error) { +func (c *FakeCustomResourceDefinitions) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.CustomResourceDefinition, err error) { obj, err := c.Fake. Invokes(testing.NewRootGetAction(customresourcedefinitionsResource, name), &v1beta1.CustomResourceDefinition{}) if obj == nil { @@ -48,7 +50,7 @@ func (c *FakeCustomResourceDefinitions) Get(name string, options v1.GetOptions) } // List takes label and field selectors, and returns the list of CustomResourceDefinitions that match those selectors. -func (c *FakeCustomResourceDefinitions) List(opts v1.ListOptions) (result *v1beta1.CustomResourceDefinitionList, err error) { +func (c *FakeCustomResourceDefinitions) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.CustomResourceDefinitionList, err error) { obj, err := c.Fake. Invokes(testing.NewRootListAction(customresourcedefinitionsResource, customresourcedefinitionsKind, opts), &v1beta1.CustomResourceDefinitionList{}) if obj == nil { @@ -69,13 +71,13 @@ func (c *FakeCustomResourceDefinitions) List(opts v1.ListOptions) (result *v1bet } // Watch returns a watch.Interface that watches the requested customResourceDefinitions. -func (c *FakeCustomResourceDefinitions) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeCustomResourceDefinitions) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewRootWatchAction(customresourcedefinitionsResource, opts)) } // Create takes the representation of a customResourceDefinition and creates it. Returns the server's representation of the customResourceDefinition, and an error, if there is any. -func (c *FakeCustomResourceDefinitions) Create(customResourceDefinition *v1beta1.CustomResourceDefinition) (result *v1beta1.CustomResourceDefinition, err error) { +func (c *FakeCustomResourceDefinitions) Create(ctx context.Context, customResourceDefinition *v1beta1.CustomResourceDefinition, opts v1.CreateOptions) (result *v1beta1.CustomResourceDefinition, err error) { obj, err := c.Fake. Invokes(testing.NewRootCreateAction(customresourcedefinitionsResource, customResourceDefinition), &v1beta1.CustomResourceDefinition{}) if obj == nil { @@ -85,7 +87,7 @@ func (c *FakeCustomResourceDefinitions) Create(customResourceDefinition *v1beta1 } // Update takes the representation of a customResourceDefinition and updates it. Returns the server's representation of the customResourceDefinition, and an error, if there is any. -func (c *FakeCustomResourceDefinitions) Update(customResourceDefinition *v1beta1.CustomResourceDefinition) (result *v1beta1.CustomResourceDefinition, err error) { +func (c *FakeCustomResourceDefinitions) Update(ctx context.Context, customResourceDefinition *v1beta1.CustomResourceDefinition, opts v1.UpdateOptions) (result *v1beta1.CustomResourceDefinition, err error) { obj, err := c.Fake. Invokes(testing.NewRootUpdateAction(customresourcedefinitionsResource, customResourceDefinition), &v1beta1.CustomResourceDefinition{}) if obj == nil { @@ -96,7 +98,7 @@ func (c *FakeCustomResourceDefinitions) Update(customResourceDefinition *v1beta1 // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeCustomResourceDefinitions) UpdateStatus(customResourceDefinition *v1beta1.CustomResourceDefinition) (*v1beta1.CustomResourceDefinition, error) { +func (c *FakeCustomResourceDefinitions) UpdateStatus(ctx context.Context, customResourceDefinition *v1beta1.CustomResourceDefinition, opts v1.UpdateOptions) (*v1beta1.CustomResourceDefinition, error) { obj, err := c.Fake. Invokes(testing.NewRootUpdateSubresourceAction(customresourcedefinitionsResource, "status", customResourceDefinition), &v1beta1.CustomResourceDefinition{}) if obj == nil { @@ -106,22 +108,22 @@ func (c *FakeCustomResourceDefinitions) UpdateStatus(customResourceDefinition *v } // Delete takes name of the customResourceDefinition and deletes it. Returns an error if one occurs. -func (c *FakeCustomResourceDefinitions) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeCustomResourceDefinitions) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewRootDeleteAction(customresourcedefinitionsResource, name), &v1beta1.CustomResourceDefinition{}) return err } // DeleteCollection deletes a collection of objects. -func (c *FakeCustomResourceDefinitions) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewRootDeleteCollectionAction(customresourcedefinitionsResource, listOptions) +func (c *FakeCustomResourceDefinitions) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(customresourcedefinitionsResource, listOpts) _, err := c.Fake.Invokes(action, &v1beta1.CustomResourceDefinitionList{}) return err } // Patch applies the patch and returns the patched customResourceDefinition. -func (c *FakeCustomResourceDefinitions) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.CustomResourceDefinition, err error) { +func (c *FakeCustomResourceDefinitions) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.CustomResourceDefinition, err error) { obj, err := c.Fake. Invokes(testing.NewRootPatchSubresourceAction(customresourcedefinitionsResource, name, pt, data, subresources...), &v1beta1.CustomResourceDefinition{}) if obj == nil { diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/client/informers/externalversions/apiextensions/v1/customresourcedefinition.go b/vendor/k8s.io/apiextensions-apiserver/pkg/client/informers/externalversions/apiextensions/v1/customresourcedefinition.go index 7e15a96174..7d1b571112 100644 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/client/informers/externalversions/apiextensions/v1/customresourcedefinition.go +++ b/vendor/k8s.io/apiextensions-apiserver/pkg/client/informers/externalversions/apiextensions/v1/customresourcedefinition.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" time "time" apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" @@ -60,13 +61,13 @@ func NewFilteredCustomResourceDefinitionInformer(client clientset.Interface, res if tweakListOptions != nil { tweakListOptions(&options) } - return client.ApiextensionsV1().CustomResourceDefinitions().List(options) + return client.ApiextensionsV1().CustomResourceDefinitions().List(context.TODO(), options) }, WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.ApiextensionsV1().CustomResourceDefinitions().Watch(options) + return client.ApiextensionsV1().CustomResourceDefinitions().Watch(context.TODO(), options) }, }, &apiextensionsv1.CustomResourceDefinition{}, diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/client/informers/externalversions/apiextensions/v1beta1/customresourcedefinition.go b/vendor/k8s.io/apiextensions-apiserver/pkg/client/informers/externalversions/apiextensions/v1beta1/customresourcedefinition.go index 05e8c42179..489c87ae90 100644 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/client/informers/externalversions/apiextensions/v1beta1/customresourcedefinition.go +++ b/vendor/k8s.io/apiextensions-apiserver/pkg/client/informers/externalversions/apiextensions/v1beta1/customresourcedefinition.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" time "time" apiextensionsv1beta1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1" @@ -60,13 +61,13 @@ func NewFilteredCustomResourceDefinitionInformer(client clientset.Interface, res if tweakListOptions != nil { tweakListOptions(&options) } - return client.ApiextensionsV1beta1().CustomResourceDefinitions().List(options) + return client.ApiextensionsV1beta1().CustomResourceDefinitions().List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.ApiextensionsV1beta1().CustomResourceDefinitions().Watch(options) + return client.ApiextensionsV1beta1().CustomResourceDefinitions().Watch(context.TODO(), options) }, }, &apiextensionsv1beta1.CustomResourceDefinition{}, diff --git a/vendor/k8s.io/apimachinery/pkg/api/resource/generated.pb.go b/vendor/k8s.io/apimachinery/pkg/api/resource/generated.pb.go index 9fca2e165d..2e09f4face 100644 --- a/vendor/k8s.io/apimachinery/pkg/api/resource/generated.pb.go +++ b/vendor/k8s.io/apimachinery/pkg/api/resource/generated.pb.go @@ -36,7 +36,7 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *Quantity) Reset() { *m = Quantity{} } func (*Quantity) ProtoMessage() {} diff --git a/vendor/k8s.io/apimachinery/pkg/api/resource/math.go b/vendor/k8s.io/apimachinery/pkg/api/resource/math.go index 7f63175d3e..8ffcb9f09a 100644 --- a/vendor/k8s.io/apimachinery/pkg/api/resource/math.go +++ b/vendor/k8s.io/apimachinery/pkg/api/resource/math.go @@ -37,12 +37,8 @@ var ( big1024 = big.NewInt(1024) // Commonly needed inf.Dec values-- treat as read only! - decZero = inf.NewDec(0, 0) - decOne = inf.NewDec(1, 0) - decMinusOne = inf.NewDec(-1, 0) - decThousand = inf.NewDec(1000, 0) - dec1024 = inf.NewDec(1024, 0) - decMinus1024 = inf.NewDec(-1024, 0) + decZero = inf.NewDec(0, 0) + decOne = inf.NewDec(1, 0) // Largest (in magnitude) number allowed. maxAllowed = infDecAmount{inf.NewDec((1<<63)-1, 0)} // == max int64 diff --git a/vendor/k8s.io/apimachinery/pkg/api/resource/quantity.go b/vendor/k8s.io/apimachinery/pkg/api/resource/quantity.go index 516d041daf..d95e03aa92 100644 --- a/vendor/k8s.io/apimachinery/pkg/api/resource/quantity.go +++ b/vendor/k8s.io/apimachinery/pkg/api/resource/quantity.go @@ -634,6 +634,11 @@ func (q Quantity) MarshalJSON() ([]byte, error) { return result, nil } +// ToUnstructured implements the value.UnstructuredConverter interface. +func (q Quantity) ToUnstructured() interface{} { + return q.String() +} + // UnmarshalJSON implements the json.Unmarshaller interface. // TODO: Remove support for leading/trailing whitespace func (q *Quantity) UnmarshalJSON(value []byte) error { diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/internalversion/register.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/internalversion/register.go index b56140de5f..ceb6452781 100644 --- a/vendor/k8s.io/apimachinery/pkg/apis/meta/internalversion/register.go +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/internalversion/register.go @@ -47,19 +47,6 @@ func addToGroupVersion(scheme *runtime.Scheme) error { if err := scheme.AddIgnoredConversionType(&metav1.TypeMeta{}, &metav1.TypeMeta{}); err != nil { return err } - err := scheme.AddConversionFuncs( - metav1.Convert_string_To_labels_Selector, - metav1.Convert_labels_Selector_To_string, - - metav1.Convert_string_To_fields_Selector, - metav1.Convert_fields_Selector_To_string, - - metav1.Convert_Map_string_To_string_To_v1_LabelSelector, - metav1.Convert_v1_LabelSelector_To_Map_string_To_string, - ) - if err != nil { - return err - } // ListOptions is the only options struct which needs conversion (it exposes labels and fields // as selectors for convenience). The other types have only a single representation today. scheme.AddKnownTypes(SchemeGroupVersion, @@ -71,8 +58,8 @@ func addToGroupVersion(scheme *runtime.Scheme) error { &metav1.UpdateOptions{}, ) scheme.AddKnownTypes(SchemeGroupVersion, - &metav1beta1.Table{}, - &metav1beta1.TableOptions{}, + &metav1.Table{}, + &metav1.TableOptions{}, &metav1beta1.PartialObjectMetadata{}, &metav1beta1.PartialObjectMetadataList{}, ) @@ -87,6 +74,7 @@ func addToGroupVersion(scheme *runtime.Scheme) error { &metav1.DeleteOptions{}, &metav1.CreateOptions{}, &metav1.UpdateOptions{}) + metav1.AddToGroupVersion(scheme, metav1.SchemeGroupVersion) return nil } @@ -95,5 +83,4 @@ func addToGroupVersion(scheme *runtime.Scheme) error { // the logic for conversion private. func init() { localSchemeBuilder.Register(addToGroupVersion) - localSchemeBuilder.Register(metav1.RegisterConversions) } diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/conversion.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/conversion.go index 285a41a422..b937398cd3 100644 --- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/conversion.go +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/conversion.go @@ -26,69 +26,10 @@ import ( "k8s.io/apimachinery/pkg/conversion" "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" - "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/intstr" ) -func AddConversionFuncs(scheme *runtime.Scheme) error { - return scheme.AddConversionFuncs( - Convert_v1_TypeMeta_To_v1_TypeMeta, - - Convert_v1_ListMeta_To_v1_ListMeta, - - Convert_v1_DeleteOptions_To_v1_DeleteOptions, - - Convert_intstr_IntOrString_To_intstr_IntOrString, - Convert_Pointer_intstr_IntOrString_To_intstr_IntOrString, - Convert_intstr_IntOrString_To_Pointer_intstr_IntOrString, - - Convert_Pointer_v1_Duration_To_v1_Duration, - Convert_v1_Duration_To_Pointer_v1_Duration, - - Convert_Slice_string_To_v1_Time, - Convert_Slice_string_To_Pointer_v1_Time, - - Convert_v1_Time_To_v1_Time, - Convert_v1_MicroTime_To_v1_MicroTime, - - Convert_resource_Quantity_To_resource_Quantity, - - Convert_string_To_labels_Selector, - Convert_labels_Selector_To_string, - - Convert_string_To_fields_Selector, - Convert_fields_Selector_To_string, - - Convert_Pointer_bool_To_bool, - Convert_bool_To_Pointer_bool, - - Convert_Pointer_string_To_string, - Convert_string_To_Pointer_string, - - Convert_Pointer_int64_To_int, - Convert_int_To_Pointer_int64, - - Convert_Pointer_int32_To_int32, - Convert_int32_To_Pointer_int32, - - Convert_Pointer_int64_To_int64, - Convert_int64_To_Pointer_int64, - - Convert_Pointer_float64_To_float64, - Convert_float64_To_Pointer_float64, - - Convert_Map_string_To_string_To_v1_LabelSelector, - Convert_v1_LabelSelector_To_Map_string_To_string, - - Convert_Slice_string_To_Slice_int32, - - Convert_Slice_string_To_Pointer_v1_DeletionPropagation, - - Convert_Slice_string_To_v1_IncludeObjectPolicy, - ) -} - func Convert_Pointer_float64_To_float64(in **float64, out *float64, s conversion.Scope) error { if *in == nil { *out = 0 diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/duration.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/duration.go index babe8a8b53..a22b07878f 100644 --- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/duration.go +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/duration.go @@ -49,6 +49,11 @@ func (d Duration) MarshalJSON() ([]byte, error) { return json.Marshal(d.Duration.String()) } +// ToUnstructured implements the value.UnstructuredConverter interface. +func (d Duration) ToUnstructured() interface{} { + return d.Duration.String() +} + // OpenAPISchemaType is used by the kube-openapi generator when constructing // the OpenAPI spec of this type. // diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.pb.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.pb.go index 31b1d955ec..3288c56491 100644 --- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.pb.go +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.pb.go @@ -47,7 +47,7 @@ var _ = time.Kitchen // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *APIGroup) Reset() { *m = APIGroup{} } func (*APIGroup) ProtoMessage() {} @@ -11004,6 +11004,7 @@ func (m *WatchEvent) Unmarshal(dAtA []byte) error { func skipGenerated(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -11035,10 +11036,8 @@ func skipGenerated(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -11059,55 +11058,30 @@ func skipGenerated(dAtA []byte) (n int, err error) { return 0, ErrInvalidLengthGenerated } iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - return iNdEx, nil case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipGenerated(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenerated + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenerated + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group") ) diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/register.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/register.go index a7b8aa34f9..c1a077178b 100644 --- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/register.go +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/register.go @@ -53,15 +53,6 @@ var scheme = runtime.NewScheme() // ParameterCodec knows about query parameters used with the meta v1 API spec. var ParameterCodec = runtime.NewParameterCodec(scheme) -func addEventConversionFuncs(scheme *runtime.Scheme) error { - return scheme.AddConversionFuncs( - Convert_v1_WatchEvent_To_watch_Event, - Convert_v1_InternalEvent_To_v1_WatchEvent, - Convert_watch_Event_To_v1_WatchEvent, - Convert_v1_WatchEvent_To_v1_InternalEvent, - ) -} - var optionsTypes = []runtime.Object{ &ListOptions{}, &ExportOptions{}, @@ -90,10 +81,8 @@ func AddToGroupVersion(scheme *runtime.Scheme, groupVersion schema.GroupVersion) &APIResourceList{}, ) - utilruntime.Must(addEventConversionFuncs(scheme)) - // register manually. This usually goes through the SchemeBuilder, which we cannot use here. - utilruntime.Must(AddConversionFuncs(scheme)) + utilruntime.Must(RegisterConversions(scheme)) utilruntime.Must(RegisterDefaults(scheme)) } @@ -106,9 +95,7 @@ func AddMetaToScheme(scheme *runtime.Scheme) error { &PartialObjectMetadataList{}, ) - return scheme.AddConversionFuncs( - Convert_Slice_string_To_v1_IncludeObjectPolicy, - ) + return nil } func init() { diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/time.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/time.go index fe510ed9e6..4a1d89cfce 100644 --- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/time.go +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/time.go @@ -153,6 +153,16 @@ func (t Time) MarshalJSON() ([]byte, error) { return buf, nil } +// ToUnstructured implements the value.UnstructuredConverter interface. +func (t Time) ToUnstructured() interface{} { + if t.IsZero() { + return nil + } + buf := make([]byte, 0, len(time.RFC3339)) + buf = t.UTC().AppendFormat(buf, time.RFC3339) + return string(buf) +} + // OpenAPISchemaType is used by the kube-openapi generator when constructing // the OpenAPI spec of this type. // diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types.go index bf125b62a7..e7aaead8c3 100644 --- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types.go +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types.go @@ -873,6 +873,9 @@ const ( // FieldManagerConflict is used to report when another client claims to manage this field, // It should only be returned for a request using server-side apply. CauseTypeFieldManagerConflict CauseType = "FieldManagerConflict" + // CauseTypeResourceVersionTooLarge is used to report that the requested resource version + // is newer than the data observed by the API server, so the request cannot be served. + CauseTypeResourceVersionTooLarge CauseType = "ResourceVersionTooLarge" ) // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/validation/validation.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/validation/validation.go index 2743793dde..fcd491f4c0 100644 --- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/validation/validation.go +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/validation/validation.go @@ -178,7 +178,7 @@ func ValidateManagedFields(fieldsList []metav1.ManagedFieldsEntry, fldPath *fiel default: allErrs = append(allErrs, field.Invalid(fldPath.Child("operation"), fields.Operation, "must be `Apply` or `Update`")) } - if fields.FieldsType != "FieldsV1" { + if len(fields.FieldsType) > 0 && fields.FieldsType != "FieldsV1" { allErrs = append(allErrs, field.Invalid(fldPath.Child("fieldsType"), fields.FieldsType, "must be `FieldsV1`")) } } diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1/generated.pb.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1/generated.pb.go index 5fae30ae81..cd5fc9026c 100644 --- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1/generated.pb.go +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1/generated.pb.go @@ -42,7 +42,7 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *PartialObjectMetadataList) Reset() { *m = PartialObjectMetadataList{} } func (*PartialObjectMetadataList) ProtoMessage() {} @@ -81,28 +81,27 @@ func init() { } var fileDescriptor_90ec10f86b91f9a8 = []byte{ - // 321 bytes of a gzipped FileDescriptorProto + // 317 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x91, 0x41, 0x4b, 0xf3, 0x30, - 0x18, 0xc7, 0x9b, 0xf7, 0x65, 0x38, 0x3a, 0x04, 0xd9, 0x69, 0xee, 0x90, 0x0d, 0x4f, 0xf3, 0xb0, - 0x84, 0x0d, 0x11, 0xc1, 0xdb, 0x6e, 0x82, 0xa2, 0xec, 0x28, 0x1e, 0x4c, 0xbb, 0xc7, 0x2e, 0xd6, - 0x34, 0x25, 0x79, 0x3a, 0xf0, 0xe6, 0x47, 0xf0, 0x63, 0xed, 0xb8, 0xe3, 0x40, 0x18, 0xae, 0x7e, - 0x11, 0x49, 0x57, 0x45, 0xa6, 0x62, 0x6f, 0x79, 0xfe, 0xe1, 0xf7, 0xcb, 0x3f, 0x89, 0x3f, 0x8e, - 0x4f, 0x2c, 0x93, 0x9a, 0xc7, 0x59, 0x00, 0x26, 0x01, 0x04, 0xcb, 0x67, 0x90, 0x4c, 0xb4, 0xe1, - 0xe5, 0x86, 0x48, 0xa5, 0x12, 0xe1, 0x54, 0x26, 0x60, 0x1e, 0x79, 0x1a, 0x47, 0x2e, 0xb0, 0x5c, - 0x01, 0x0a, 0x3e, 0x1b, 0x04, 0x80, 0x62, 0xc0, 0x23, 0x48, 0xc0, 0x08, 0x84, 0x09, 0x4b, 0x8d, - 0x46, 0xdd, 0x3c, 0xdc, 0xa0, 0xec, 0x2b, 0xca, 0xd2, 0x38, 0x72, 0x81, 0x65, 0x0e, 0x65, 0x25, - 0xda, 0xee, 0x47, 0x12, 0xa7, 0x59, 0xc0, 0x42, 0xad, 0x78, 0xa4, 0x23, 0xcd, 0x0b, 0x43, 0x90, - 0xdd, 0x15, 0x53, 0x31, 0x14, 0xab, 0x8d, 0xb9, 0x7d, 0x54, 0xa5, 0xd4, 0x76, 0x9f, 0xf6, 0xaf, - 0x57, 0x31, 0x59, 0x82, 0x52, 0xc1, 0x37, 0xe0, 0xf8, 0x2f, 0xc0, 0x86, 0x53, 0x50, 0x62, 0x9b, - 0x3b, 0x78, 0x21, 0xfe, 0xfe, 0x95, 0x30, 0x28, 0xc5, 0xc3, 0x65, 0x70, 0x0f, 0x21, 0x5e, 0x00, - 0x8a, 0x89, 0x40, 0x71, 0x2e, 0x2d, 0x36, 0x6f, 0xfc, 0xba, 0x2a, 0xe7, 0xd6, 0xbf, 0x2e, 0xe9, - 0x35, 0x86, 0x8c, 0x55, 0x79, 0x29, 0xe6, 0x68, 0x67, 0x1a, 0xed, 0xcd, 0x57, 0x1d, 0x2f, 0x5f, - 0x75, 0xea, 0x1f, 0xc9, 0xf8, 0xd3, 0xd8, 0xbc, 0xf5, 0x6b, 0x12, 0x41, 0xd9, 0x16, 0xe9, 0xfe, - 0xef, 0x35, 0x86, 0xa7, 0xd5, 0xd4, 0x3f, 0xb6, 0x1d, 0xed, 0x96, 0xe7, 0xd4, 0xce, 0x9c, 0x71, - 0xbc, 0x11, 0x8f, 0xfa, 0xf3, 0x35, 0xf5, 0x16, 0x6b, 0xea, 0x2d, 0xd7, 0xd4, 0x7b, 0xca, 0x29, - 0x99, 0xe7, 0x94, 0x2c, 0x72, 0x4a, 0x96, 0x39, 0x25, 0xaf, 0x39, 0x25, 0xcf, 0x6f, 0xd4, 0xbb, - 0xde, 0x29, 0xbf, 0xf6, 0x3d, 0x00, 0x00, 0xff, 0xff, 0xc6, 0x7e, 0x00, 0x08, 0x5a, 0x02, 0x00, - 0x00, + 0x1c, 0xc6, 0x9b, 0xf7, 0x65, 0x38, 0x3a, 0x04, 0xd9, 0x69, 0xee, 0x90, 0x0d, 0x4f, 0xf3, 0xb0, + 0x84, 0x0d, 0x11, 0xc1, 0xdb, 0x6e, 0x82, 0xa2, 0xec, 0x28, 0x1e, 0x4c, 0xbb, 0xbf, 0x5d, 0xac, + 0x69, 0x4a, 0xf2, 0xef, 0xc0, 0x9b, 0x1f, 0xc1, 0x8f, 0xb5, 0xe3, 0x8e, 0x03, 0x61, 0xb8, 0xf8, + 0x45, 0x24, 0x5d, 0x15, 0x19, 0x0a, 0xbb, 0xf5, 0x79, 0xca, 0xef, 0x97, 0x27, 0x24, 0x1c, 0xa7, + 0x67, 0x96, 0x49, 0xcd, 0xd3, 0x22, 0x02, 0x93, 0x01, 0x82, 0xe5, 0x33, 0xc8, 0x26, 0xda, 0xf0, + 0xea, 0x87, 0xc8, 0xa5, 0x12, 0xf1, 0x54, 0x66, 0x60, 0x9e, 0x79, 0x9e, 0x26, 0xbe, 0xb0, 0x5c, + 0x01, 0x0a, 0x3e, 0x1b, 0x44, 0x80, 0x62, 0xc0, 0x13, 0xc8, 0xc0, 0x08, 0x84, 0x09, 0xcb, 0x8d, + 0x46, 0xdd, 0x3c, 0xde, 0xa0, 0xec, 0x27, 0xca, 0xf2, 0x34, 0xf1, 0x85, 0x65, 0x1e, 0x65, 0x15, + 0xda, 0xee, 0x27, 0x12, 0xa7, 0x45, 0xc4, 0x62, 0xad, 0x78, 0xa2, 0x13, 0xcd, 0x4b, 0x43, 0x54, + 0x3c, 0x94, 0xa9, 0x0c, 0xe5, 0xd7, 0xc6, 0xdc, 0x3e, 0xd9, 0x65, 0xd4, 0xf6, 0x9e, 0xf6, 0xe9, + 0x5f, 0x94, 0x29, 0x32, 0x94, 0x0a, 0xb8, 0x8d, 0xa7, 0xa0, 0xc4, 0x36, 0x77, 0xf4, 0x46, 0xc2, + 0xc3, 0x1b, 0x61, 0x50, 0x8a, 0xa7, 0xeb, 0xe8, 0x11, 0x62, 0xbc, 0x02, 0x14, 0x13, 0x81, 0xe2, + 0x52, 0x5a, 0x6c, 0xde, 0x85, 0x75, 0x55, 0xe5, 0xd6, 0xbf, 0x2e, 0xe9, 0x35, 0x86, 0x8c, 0xed, + 0x72, 0x71, 0xe6, 0x69, 0x6f, 0x1a, 0x1d, 0xcc, 0x57, 0x9d, 0xc0, 0xad, 0x3a, 0xf5, 0xaf, 0x66, + 0xfc, 0x6d, 0x6c, 0xde, 0x87, 0x35, 0x89, 0xa0, 0x6c, 0x8b, 0x74, 0xff, 0xf7, 0x1a, 0xc3, 0xf3, + 0xdd, 0xd4, 0xbf, 0xae, 0x1d, 0xed, 0x57, 0xe7, 0xd4, 0x2e, 0xbc, 0x71, 0xbc, 0x11, 0x8f, 0xfa, + 0xf3, 0x35, 0x0d, 0x16, 0x6b, 0x1a, 0x2c, 0xd7, 0x34, 0x78, 0x71, 0x94, 0xcc, 0x1d, 0x25, 0x0b, + 0x47, 0xc9, 0xd2, 0x51, 0xf2, 0xee, 0x28, 0x79, 0xfd, 0xa0, 0xc1, 0xed, 0x5e, 0xf5, 0x52, 0x9f, + 0x01, 0x00, 0x00, 0xff, 0xff, 0xf7, 0x82, 0x5b, 0x80, 0x29, 0x02, 0x00, 0x00, } func (m *PartialObjectMetadataList) Marshal() (dAtA []byte, err error) { @@ -333,6 +332,7 @@ func (m *PartialObjectMetadataList) Unmarshal(dAtA []byte) error { func skipGenerated(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -364,10 +364,8 @@ func skipGenerated(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -388,55 +386,30 @@ func skipGenerated(dAtA []byte) (n int, err error) { return 0, ErrInvalidLengthGenerated } iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - return iNdEx, nil case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipGenerated(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenerated + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenerated + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group") ) diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1/generated.proto b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1/generated.proto index 19606666f8..59ce743766 100644 --- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1/generated.proto +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1/generated.proto @@ -22,7 +22,6 @@ syntax = 'proto2'; package k8s.io.apimachinery.pkg.apis.meta.v1beta1; import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; -import "k8s.io/apimachinery/pkg/runtime/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; // Package-wide variables from generator "generated". diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1/register.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1/register.go index 4b4acd72f1..8d11399fbe 100644 --- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1/register.go +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1/register.go @@ -19,7 +19,6 @@ package v1beta1 import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" - utilruntime "k8s.io/apimachinery/pkg/util/runtime" ) // GroupName is the group name for this API. @@ -33,12 +32,6 @@ func Kind(kind string) schema.GroupKind { return SchemeGroupVersion.WithKind(kind).GroupKind() } -// scheme is the registry for the common types that adhere to the meta v1beta1 API spec. -var scheme = runtime.NewScheme() - -// ParameterCodec knows about query parameters used with the meta v1beta1 API spec. -var ParameterCodec = runtime.NewParameterCodec(scheme) - // AddMetaToScheme registers base meta types into schemas. func AddMetaToScheme(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, @@ -48,14 +41,5 @@ func AddMetaToScheme(scheme *runtime.Scheme) error { &PartialObjectMetadataList{}, ) - return scheme.AddConversionFuncs( - Convert_Slice_string_To_v1beta1_IncludeObjectPolicy, - ) -} - -func init() { - utilruntime.Must(AddMetaToScheme(scheme)) - - // register manually. This usually goes through the SchemeBuilder, which we cannot use here. - utilruntime.Must(RegisterDefaults(scheme)) + return nil } diff --git a/vendor/k8s.io/apimachinery/pkg/conversion/converter.go b/vendor/k8s.io/apimachinery/pkg/conversion/converter.go index bc615dc3ac..2d7c8bd1e2 100644 --- a/vendor/k8s.io/apimachinery/pkg/conversion/converter.go +++ b/vendor/k8s.io/apimachinery/pkg/conversion/converter.go @@ -54,7 +54,8 @@ type Converter struct { generatedConversionFuncs ConversionFuncs // Set of conversions that should be treated as a no-op - ignoredConversions map[typePair]struct{} + ignoredConversions map[typePair]struct{} + ignoredUntypedConversions map[typePair]struct{} // This is a map from a source field type and name, to a list of destination // field type and name. @@ -83,17 +84,23 @@ type Converter struct { // NewConverter creates a new Converter object. func NewConverter(nameFn NameFunc) *Converter { c := &Converter{ - conversionFuncs: NewConversionFuncs(), - generatedConversionFuncs: NewConversionFuncs(), - ignoredConversions: make(map[typePair]struct{}), - nameFunc: nameFn, - structFieldDests: make(map[typeNamePair][]typeNamePair), - structFieldSources: make(map[typeNamePair][]typeNamePair), + conversionFuncs: NewConversionFuncs(), + generatedConversionFuncs: NewConversionFuncs(), + ignoredConversions: make(map[typePair]struct{}), + ignoredUntypedConversions: make(map[typePair]struct{}), + nameFunc: nameFn, + structFieldDests: make(map[typeNamePair][]typeNamePair), + structFieldSources: make(map[typeNamePair][]typeNamePair), inputFieldMappingFuncs: make(map[reflect.Type]FieldMappingFunc), inputDefaultFlags: make(map[reflect.Type]FieldMatchingFlags), } - c.RegisterConversionFunc(Convert_Slice_byte_To_Slice_byte) + c.RegisterUntypedConversionFunc( + (*[]byte)(nil), (*[]byte)(nil), + func(a, b interface{}, s Scope) error { + return Convert_Slice_byte_To_Slice_byte(a.(*[]byte), b.(*[]byte), s) + }, + ) return c } @@ -131,10 +138,6 @@ type Scope interface { // parameters, you'll run out of stack space before anything useful happens. Convert(src, dest interface{}, flags FieldMatchingFlags) error - // DefaultConvert performs the default conversion, without calling a conversion func - // on the current stack frame. This makes it safe to call from a conversion func. - DefaultConvert(src, dest interface{}, flags FieldMatchingFlags) error - // SrcTags and DestTags contain the struct tags that src and dest had, respectively. // If the enclosing object was not a struct, then these will contain no tags, of course. SrcTag() reflect.StructTag @@ -153,31 +156,14 @@ type FieldMappingFunc func(key string, sourceTag, destTag reflect.StructTag) (so func NewConversionFuncs() ConversionFuncs { return ConversionFuncs{ - fns: make(map[typePair]reflect.Value), untyped: make(map[typePair]ConversionFunc), } } type ConversionFuncs struct { - fns map[typePair]reflect.Value untyped map[typePair]ConversionFunc } -// Add adds the provided conversion functions to the lookup table - they must have the signature -// `func(type1, type2, Scope) error`. Functions are added in the order passed and will override -// previously registered pairs. -func (c ConversionFuncs) Add(fns ...interface{}) error { - for _, fn := range fns { - fv := reflect.ValueOf(fn) - ft := fv.Type() - if err := verifyConversionFunctionSignature(ft); err != nil { - return err - } - c.fns[typePair{ft.In(0).Elem(), ft.In(1).Elem()}] = fv - } - return nil -} - // AddUntyped adds the provided conversion function to the lookup table for the types that are // supplied as a and b. a and b must be pointers or an error is returned. This method overwrites // previously defined functions. @@ -197,12 +183,6 @@ func (c ConversionFuncs) AddUntyped(a, b interface{}, fn ConversionFunc) error { // both other and c, with other conversions taking precedence. func (c ConversionFuncs) Merge(other ConversionFuncs) ConversionFuncs { merged := NewConversionFuncs() - for k, v := range c.fns { - merged.fns[k] = v - } - for k, v := range other.fns { - merged.fns[k] = v - } for k, v := range c.untyped { merged.untyped[k] = v } @@ -290,12 +270,6 @@ func (s *scope) Convert(src, dest interface{}, flags FieldMatchingFlags) error { return s.converter.Convert(src, dest, flags, s.meta) } -// DefaultConvert continues a conversion, performing a default conversion (no conversion func) -// for the current stack frame. -func (s *scope) DefaultConvert(src, dest interface{}, flags FieldMatchingFlags) error { - return s.converter.DefaultConvert(src, dest, flags, s.meta) -} - // SrcTag returns the tag of the struct containing the current source item, if any. func (s *scope) SrcTag() reflect.StructTag { return s.srcStack.top().tag @@ -360,29 +334,6 @@ func verifyConversionFunctionSignature(ft reflect.Type) error { return nil } -// RegisterConversionFunc registers a conversion func with the -// Converter. conversionFunc must take three parameters: a pointer to the input -// type, a pointer to the output type, and a conversion.Scope (which should be -// used if recursive conversion calls are desired). It must return an error. -// -// Example: -// c.RegisterConversionFunc( -// func(in *Pod, out *v1.Pod, s Scope) error { -// // conversion logic... -// return nil -// }) -// DEPRECATED: Will be removed in favor of RegisterUntypedConversionFunc -func (c *Converter) RegisterConversionFunc(conversionFunc interface{}) error { - return c.conversionFuncs.Add(conversionFunc) -} - -// Similar to RegisterConversionFunc, but registers conversion function that were -// automatically generated. -// DEPRECATED: Will be removed in favor of RegisterGeneratedUntypedConversionFunc -func (c *Converter) RegisterGeneratedConversionFunc(conversionFunc interface{}) error { - return c.generatedConversionFuncs.Add(conversionFunc) -} - // RegisterUntypedConversionFunc registers a function that converts between a and b by passing objects of those // types to the provided function. The function *must* accept objects of a and b - this machinery will not enforce // any other guarantee. @@ -409,6 +360,7 @@ func (c *Converter) RegisterIgnoredConversion(from, to interface{}) error { return fmt.Errorf("expected pointer arg for 'to' param 1, got: %v", typeTo) } c.ignoredConversions[typePair{typeFrom.Elem(), typeTo.Elem()}] = struct{}{} + c.ignoredUntypedConversions[typePair{typeFrom, typeTo}] = struct{}{} return nil } @@ -470,18 +422,6 @@ func (c *Converter) Convert(src, dest interface{}, flags FieldMatchingFlags, met return c.doConversion(src, dest, flags, meta, c.convert) } -// DefaultConvert will translate src to dest if it knows how. Both must be pointers. -// No conversion func is used. If the default copying mechanism -// doesn't work on this type pair, an error will be returned. -// Read the comments on the various FieldMatchingFlags constants to understand -// what the 'flags' parameter does. -// 'meta' is given to allow you to pass information to conversion functions, -// it is not used by DefaultConvert() other than storing it in the scope. -// Not safe for objects with cyclic references! -func (c *Converter) DefaultConvert(src, dest interface{}, flags FieldMatchingFlags, meta *Meta) error { - return c.doConversion(src, dest, flags, meta, c.defaultConvert) -} - type conversionFunc func(sv, dv reflect.Value, scope *scope) error func (c *Converter) doConversion(src, dest interface{}, flags FieldMatchingFlags, meta *Meta, f conversionFunc) error { @@ -491,6 +431,11 @@ func (c *Converter) doConversion(src, dest interface{}, flags FieldMatchingFlags flags: flags, meta: meta, } + + // ignore conversions of this type + if _, ok := c.ignoredUntypedConversions[pair]; ok { + return nil + } if fn, ok := c.conversionFuncs.untyped[pair]; ok { return fn(src, dest, scope) } @@ -517,33 +462,20 @@ func (c *Converter) doConversion(src, dest interface{}, flags FieldMatchingFlags return f(sv, dv, scope) } -// callCustom calls 'custom' with sv & dv. custom must be a conversion function. -func (c *Converter) callCustom(sv, dv, custom reflect.Value, scope *scope) error { - if !sv.CanAddr() { - sv2 := reflect.New(sv.Type()) - sv2.Elem().Set(sv) - sv = sv2 - } else { - sv = sv.Addr() - } +// callUntyped calls predefined conversion func. +func (c *Converter) callUntyped(sv, dv reflect.Value, f ConversionFunc, scope *scope) error { if !dv.CanAddr() { - if !dv.CanSet() { - return scope.errorf("can't addr or set dest.") - } - dvOrig := dv - dv := reflect.New(dvOrig.Type()) - defer func() { dvOrig.Set(dv) }() - } else { - dv = dv.Addr() + return scope.errorf("cant addr dest") } - args := []reflect.Value{sv, dv, reflect.ValueOf(scope)} - ret := custom.Call(args)[0].Interface() - // This convolution is necessary because nil interfaces won't convert - // to errors. - if ret == nil { - return nil + var svPointer reflect.Value + if sv.CanAddr() { + svPointer = sv.Addr() + } else { + svPointer = reflect.New(sv.Type()) + svPointer.Elem().Set(sv) } - return ret.(error) + dvPointer := dv.Addr() + return f(svPointer.Interface(), dvPointer.Interface(), scope) } // convert recursively copies sv into dv, calling an appropriate conversion function if @@ -561,27 +493,14 @@ func (c *Converter) convert(sv, dv reflect.Value, scope *scope) error { } // Convert sv to dv. - if fv, ok := c.conversionFuncs.fns[pair]; ok { - if c.Debug != nil { - c.Debug.Logf("Calling custom conversion of '%v' to '%v'", st, dt) - } - return c.callCustom(sv, dv, fv, scope) + pair = typePair{reflect.PtrTo(sv.Type()), reflect.PtrTo(dv.Type())} + if f, ok := c.conversionFuncs.untyped[pair]; ok { + return c.callUntyped(sv, dv, f, scope) } - if fv, ok := c.generatedConversionFuncs.fns[pair]; ok { - if c.Debug != nil { - c.Debug.Logf("Calling generated conversion of '%v' to '%v'", st, dt) - } - return c.callCustom(sv, dv, fv, scope) + if f, ok := c.generatedConversionFuncs.untyped[pair]; ok { + return c.callUntyped(sv, dv, f, scope) } - return c.defaultConvert(sv, dv, scope) -} - -// defaultConvert recursively copies sv into dv. no conversion function is called -// for the current stack frame (but conversion functions may be called for nested objects) -func (c *Converter) defaultConvert(sv, dv reflect.Value, scope *scope) error { - dt, st := dv.Type(), sv.Type() - if !dv.CanSet() { return scope.errorf("Cannot set dest. (Tried to deep copy something with unexported fields?)") } diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/conversion.go b/vendor/k8s.io/apimachinery/pkg/runtime/conversion.go index 0947dce735..d04d701f37 100644 --- a/vendor/k8s.io/apimachinery/pkg/runtime/conversion.go +++ b/vendor/k8s.io/apimachinery/pkg/runtime/conversion.go @@ -53,14 +53,6 @@ func JSONKeyMapper(key string, sourceTag, destTag reflect.StructTag) (string, st return key, key } -// DefaultStringConversions are helpers for converting []string and string to real values. -var DefaultStringConversions = []interface{}{ - Convert_Slice_string_To_string, - Convert_Slice_string_To_int, - Convert_Slice_string_To_bool, - Convert_Slice_string_To_int64, -} - func Convert_Slice_string_To_string(in *[]string, out *string, s conversion.Scope) error { if len(*in) == 0 { *out = "" @@ -178,3 +170,27 @@ func Convert_Slice_string_To_Pointer_int64(in *[]string, out **int64, s conversi *out = &i return nil } + +func RegisterStringConversions(s *Scheme) error { + if err := s.AddConversionFunc((*[]string)(nil), (*string)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_Slice_string_To_string(a.(*[]string), b.(*string), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*[]string)(nil), (*int)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_Slice_string_To_int(a.(*[]string), b.(*int), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*[]string)(nil), (*bool)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_Slice_string_To_bool(a.(*[]string), b.(*bool), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*[]string)(nil), (*int64)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_Slice_string_To_int64(a.(*[]string), b.(*int64), scope) + }); err != nil { + return err + } + return nil +} diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/converter.go b/vendor/k8s.io/apimachinery/pkg/runtime/converter.go index b3e8a53b33..918d0831d9 100644 --- a/vendor/k8s.io/apimachinery/pkg/runtime/converter.go +++ b/vendor/k8s.io/apimachinery/pkg/runtime/converter.go @@ -17,7 +17,6 @@ limitations under the License. package runtime import ( - "bytes" encodingjson "encoding/json" "fmt" "math" @@ -32,6 +31,7 @@ import ( "k8s.io/apimachinery/pkg/conversion" "k8s.io/apimachinery/pkg/util/json" utilruntime "k8s.io/apimachinery/pkg/util/runtime" + "sigs.k8s.io/structured-merge-diff/v3/value" "k8s.io/klog" ) @@ -68,13 +68,8 @@ func newFieldsCache() *fieldsCache { } var ( - marshalerType = reflect.TypeOf(new(encodingjson.Marshaler)).Elem() - unmarshalerType = reflect.TypeOf(new(encodingjson.Unmarshaler)).Elem() mapStringInterfaceType = reflect.TypeOf(map[string]interface{}{}) stringType = reflect.TypeOf(string("")) - int64Type = reflect.TypeOf(int64(0)) - float64Type = reflect.TypeOf(float64(0)) - boolType = reflect.TypeOf(bool(false)) fieldCache = newFieldsCache() // DefaultUnstructuredConverter performs unstructured to Go typed object conversions. @@ -208,13 +203,9 @@ func fromUnstructured(sv, dv reflect.Value) error { } // Check if the object has a custom JSON marshaller/unmarshaller. - if reflect.PtrTo(dt).Implements(unmarshalerType) { - data, err := json.Marshal(sv.Interface()) - if err != nil { - return fmt.Errorf("error encoding %s to json: %v", st.String(), err) - } - unmarshaler := dv.Addr().Interface().(encodingjson.Unmarshaler) - return unmarshaler.UnmarshalJSON(data) + entry := value.TypeReflectEntryOf(dv.Type()) + if entry.CanConvertFromUnstructured() { + return entry.FromUnstructured(sv, dv) } switch dt.Kind() { @@ -256,6 +247,7 @@ func fieldInfoFromField(structType reflect.Type, field int) *fieldInfo { for i := range items { if items[i] == "omitempty" { info.omitempty = true + break } } } @@ -483,112 +475,28 @@ func toUnstructuredViaJSON(obj interface{}, u *map[string]interface{}) error { return json.Unmarshal(data, u) } -var ( - nullBytes = []byte("null") - trueBytes = []byte("true") - falseBytes = []byte("false") -) - -func getMarshaler(v reflect.Value) (encodingjson.Marshaler, bool) { - // Check value receivers if v is not a pointer and pointer receivers if v is a pointer - if v.Type().Implements(marshalerType) { - return v.Interface().(encodingjson.Marshaler), true - } - // Check pointer receivers if v is not a pointer - if v.Kind() != reflect.Ptr && v.CanAddr() { - v = v.Addr() - if v.Type().Implements(marshalerType) { - return v.Interface().(encodingjson.Marshaler), true - } - } - return nil, false -} - func toUnstructured(sv, dv reflect.Value) error { - // Check if the object has a custom JSON marshaller/unmarshaller. - if marshaler, ok := getMarshaler(sv); ok { - if sv.Kind() == reflect.Ptr && sv.IsNil() { - // We're done - we don't need to store anything. - return nil - } - - data, err := marshaler.MarshalJSON() + // Check if the object has a custom string converter. + entry := value.TypeReflectEntryOf(sv.Type()) + if entry.CanConvertToUnstructured() { + v, err := entry.ToUnstructured(sv) if err != nil { return err } - switch { - case len(data) == 0: - return fmt.Errorf("error decoding from json: empty value") - - case bytes.Equal(data, nullBytes): - // We're done - we don't need to store anything. - - case bytes.Equal(data, trueBytes): - dv.Set(reflect.ValueOf(true)) - - case bytes.Equal(data, falseBytes): - dv.Set(reflect.ValueOf(false)) - - case data[0] == '"': - var result string - err := json.Unmarshal(data, &result) - if err != nil { - return fmt.Errorf("error decoding string from json: %v", err) - } - dv.Set(reflect.ValueOf(result)) - - case data[0] == '{': - result := make(map[string]interface{}) - err := json.Unmarshal(data, &result) - if err != nil { - return fmt.Errorf("error decoding object from json: %v", err) - } - dv.Set(reflect.ValueOf(result)) - - case data[0] == '[': - result := make([]interface{}, 0) - err := json.Unmarshal(data, &result) - if err != nil { - return fmt.Errorf("error decoding array from json: %v", err) - } - dv.Set(reflect.ValueOf(result)) - - default: - var ( - resultInt int64 - resultFloat float64 - err error - ) - if err = json.Unmarshal(data, &resultInt); err == nil { - dv.Set(reflect.ValueOf(resultInt)) - } else if err = json.Unmarshal(data, &resultFloat); err == nil { - dv.Set(reflect.ValueOf(resultFloat)) - } else { - return fmt.Errorf("error decoding number from json: %v", err) - } + if v != nil { + dv.Set(reflect.ValueOf(v)) } - return nil } - - st, dt := sv.Type(), dv.Type() + st := sv.Type() switch st.Kind() { case reflect.String: - if dt.Kind() == reflect.Interface && dv.NumMethod() == 0 { - dv.Set(reflect.New(stringType)) - } dv.Set(reflect.ValueOf(sv.String())) return nil case reflect.Bool: - if dt.Kind() == reflect.Interface && dv.NumMethod() == 0 { - dv.Set(reflect.New(boolType)) - } dv.Set(reflect.ValueOf(sv.Bool())) return nil case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - if dt.Kind() == reflect.Interface && dv.NumMethod() == 0 { - dv.Set(reflect.New(int64Type)) - } dv.Set(reflect.ValueOf(sv.Int())) return nil case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: @@ -596,15 +504,9 @@ func toUnstructured(sv, dv reflect.Value) error { if uVal > math.MaxInt64 { return fmt.Errorf("unsigned value %d does not fit into int64 (overflow)", uVal) } - if dt.Kind() == reflect.Interface && dv.NumMethod() == 0 { - dv.Set(reflect.New(int64Type)) - } dv.Set(reflect.ValueOf(int64(uVal))) return nil case reflect.Float32, reflect.Float64: - if dt.Kind() == reflect.Interface && dv.NumMethod() == 0 { - dv.Set(reflect.New(float64Type)) - } dv.Set(reflect.ValueOf(sv.Float())) return nil case reflect.Map: diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/embedded.go b/vendor/k8s.io/apimachinery/pkg/runtime/embedded.go index db11eb8bcf..7251e65f6e 100644 --- a/vendor/k8s.io/apimachinery/pkg/runtime/embedded.go +++ b/vendor/k8s.io/apimachinery/pkg/runtime/embedded.go @@ -134,9 +134,16 @@ func Convert_runtime_RawExtension_To_runtime_Object(in *RawExtension, out *Objec return nil } -func DefaultEmbeddedConversions() []interface{} { - return []interface{}{ - Convert_runtime_Object_To_runtime_RawExtension, - Convert_runtime_RawExtension_To_runtime_Object, +func RegisterEmbeddedConversions(s *Scheme) error { + if err := s.AddConversionFunc((*Object)(nil), (*RawExtension)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_runtime_Object_To_runtime_RawExtension(a.(*Object), b.(*RawExtension), scope) + }); err != nil { + return err } + if err := s.AddConversionFunc((*RawExtension)(nil), (*Object)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_runtime_RawExtension_To_runtime_Object(a.(*RawExtension), b.(*Object), scope) + }); err != nil { + return err + } + return nil } diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/generated.pb.go b/vendor/k8s.io/apimachinery/pkg/runtime/generated.pb.go index af2f076b88..0719718173 100644 --- a/vendor/k8s.io/apimachinery/pkg/runtime/generated.pb.go +++ b/vendor/k8s.io/apimachinery/pkg/runtime/generated.pb.go @@ -40,7 +40,7 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *RawExtension) Reset() { *m = RawExtension{} } func (*RawExtension) ProtoMessage() {} @@ -772,6 +772,7 @@ func (m *Unknown) Unmarshal(dAtA []byte) error { func skipGenerated(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -803,10 +804,8 @@ func skipGenerated(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -827,55 +826,30 @@ func skipGenerated(dAtA []byte) (n int, err error) { return 0, ErrInvalidLengthGenerated } iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - return iNdEx, nil case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipGenerated(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenerated + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenerated + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group") ) diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/schema/generated.pb.go b/vendor/k8s.io/apimachinery/pkg/runtime/schema/generated.pb.go index a7276649f4..29d3ac45be 100644 --- a/vendor/k8s.io/apimachinery/pkg/runtime/schema/generated.pb.go +++ b/vendor/k8s.io/apimachinery/pkg/runtime/schema/generated.pb.go @@ -36,7 +36,7 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func init() { proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/runtime/schema/generated.proto", fileDescriptor_0462724132518e0d) diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/scheme.go b/vendor/k8s.io/apimachinery/pkg/runtime/scheme.go index fd37e293ab..4b739ec38f 100644 --- a/vendor/k8s.io/apimachinery/pkg/runtime/scheme.go +++ b/vendor/k8s.io/apimachinery/pkg/runtime/scheme.go @@ -102,10 +102,10 @@ func NewScheme() *Scheme { } s.converter = conversion.NewConverter(s.nameFunc) - utilruntime.Must(s.AddConversionFuncs(DefaultEmbeddedConversions()...)) + // Enable couple default conversions by default. + utilruntime.Must(RegisterEmbeddedConversions(s)) + utilruntime.Must(RegisterStringConversions(s)) - // Enable map[string][]string conversions by default - utilruntime.Must(s.AddConversionFuncs(DefaultStringConversions...)) utilruntime.Must(s.RegisterInputDefaults(&map[string][]string{}, JSONKeyMapper, conversion.AllowDifferentFieldTypeNames|conversion.IgnoreMissingFields)) utilruntime.Must(s.RegisterInputDefaults(&url.Values{}, JSONKeyMapper, conversion.AllowDifferentFieldTypeNames|conversion.IgnoreMissingFields)) return s @@ -308,45 +308,6 @@ func (s *Scheme) AddIgnoredConversionType(from, to interface{}) error { return s.converter.RegisterIgnoredConversion(from, to) } -// AddConversionFuncs adds functions to the list of conversion functions. The given -// functions should know how to convert between two of your API objects, or their -// sub-objects. We deduce how to call these functions from the types of their two -// parameters; see the comment for Converter.Register. -// -// Note that, if you need to copy sub-objects that didn't change, you can use the -// conversion.Scope object that will be passed to your conversion function. -// Additionally, all conversions started by Scheme will set the SrcVersion and -// DestVersion fields on the Meta object. Example: -// -// s.AddConversionFuncs( -// func(in *InternalObject, out *ExternalObject, scope conversion.Scope) error { -// // You can depend on Meta() being non-nil, and this being set to -// // the source version, e.g., "" -// s.Meta().SrcVersion -// // You can depend on this being set to the destination version, -// // e.g., "v1". -// s.Meta().DestVersion -// // Call scope.Convert to copy sub-fields. -// s.Convert(&in.SubFieldThatMoved, &out.NewLocation.NewName, 0) -// return nil -// }, -// ) -// -// (For more detail about conversion functions, see Converter.Register's comment.) -// -// Also note that the default behavior, if you don't add a conversion function, is to -// sanely copy fields that have the same names and same type names. It's OK if the -// destination type has extra fields, but it must not remove any. So you only need to -// add conversion functions for things with changed/removed fields. -func (s *Scheme) AddConversionFuncs(conversionFuncs ...interface{}) error { - for _, f := range conversionFuncs { - if err := s.converter.RegisterConversionFunc(f); err != nil { - return err - } - } - return nil -} - // AddConversionFunc registers a function that converts between a and b by passing objects of those // types to the provided function. The function *must* accept objects of a and b - this machinery will not enforce // any other guarantee. diff --git a/vendor/k8s.io/apimachinery/pkg/util/clock/clock.go b/vendor/k8s.io/apimachinery/pkg/util/clock/clock.go index 1689e62e82..6cf13d83d1 100644 --- a/vendor/k8s.io/apimachinery/pkg/util/clock/clock.go +++ b/vendor/k8s.io/apimachinery/pkg/util/clock/clock.go @@ -52,23 +52,26 @@ func (RealClock) Since(ts time.Time) time.Duration { return time.Since(ts) } -// Same as time.After(d). +// After is the same as time.After(d). func (RealClock) After(d time.Duration) <-chan time.Time { return time.After(d) } +// NewTimer returns a new Timer. func (RealClock) NewTimer(d time.Duration) Timer { return &realTimer{ timer: time.NewTimer(d), } } +// NewTicker returns a new Ticker. func (RealClock) NewTicker(d time.Duration) Ticker { return &realTicker{ ticker: time.NewTicker(d), } } +// Sleep pauses the RealClock for duration d. func (RealClock) Sleep(d time.Duration) { time.Sleep(d) } @@ -94,12 +97,14 @@ type fakeClockWaiter struct { destChan chan time.Time } +// NewFakePassiveClock returns a new FakePassiveClock. func NewFakePassiveClock(t time.Time) *FakePassiveClock { return &FakePassiveClock{ time: t, } } +// NewFakeClock returns a new FakeClock func NewFakeClock(t time.Time) *FakeClock { return &FakeClock{ FakePassiveClock: *NewFakePassiveClock(t), @@ -120,14 +125,14 @@ func (f *FakePassiveClock) Since(ts time.Time) time.Duration { return f.time.Sub(ts) } -// Sets the time. +// SetTime sets the time on the FakePassiveClock. func (f *FakePassiveClock) SetTime(t time.Time) { f.lock.Lock() defer f.lock.Unlock() f.time = t } -// Fake version of time.After(d). +// After is the Fake version of time.After(d). func (f *FakeClock) After(d time.Duration) <-chan time.Time { f.lock.Lock() defer f.lock.Unlock() @@ -140,7 +145,7 @@ func (f *FakeClock) After(d time.Duration) <-chan time.Time { return ch } -// Fake version of time.NewTimer(d). +// NewTimer is the Fake version of time.NewTimer(d). func (f *FakeClock) NewTimer(d time.Duration) Timer { f.lock.Lock() defer f.lock.Unlock() @@ -157,6 +162,7 @@ func (f *FakeClock) NewTimer(d time.Duration) Timer { return timer } +// NewTicker returns a new Ticker. func (f *FakeClock) NewTicker(d time.Duration) Ticker { f.lock.Lock() defer f.lock.Unlock() @@ -174,14 +180,14 @@ func (f *FakeClock) NewTicker(d time.Duration) Ticker { } } -// Move clock by Duration, notify anyone that's called After, Tick, or NewTimer +// Step moves clock by Duration, notifies anyone that's called After, Tick, or NewTimer func (f *FakeClock) Step(d time.Duration) { f.lock.Lock() defer f.lock.Unlock() f.setTimeLocked(f.time.Add(d)) } -// Sets the time. +// SetTime sets the time on a FakeClock. func (f *FakeClock) SetTime(t time.Time) { f.lock.Lock() defer f.lock.Unlock() @@ -219,7 +225,7 @@ func (f *FakeClock) setTimeLocked(t time.Time) { f.waiters = newWaiters } -// Returns true if After has been called on f but not yet satisfied (so you can +// HasWaiters returns true if After has been called on f but not yet satisfied (so you can // write race-free tests). func (f *FakeClock) HasWaiters() bool { f.lock.RLock() @@ -227,6 +233,7 @@ func (f *FakeClock) HasWaiters() bool { return len(f.waiters) > 0 } +// Sleep pauses the FakeClock for duration d. func (f *FakeClock) Sleep(d time.Duration) { f.Step(d) } @@ -248,24 +255,25 @@ func (i *IntervalClock) Since(ts time.Time) time.Duration { return i.Time.Sub(ts) } -// Unimplemented, will panic. +// After is currently unimplemented, will panic. // TODO: make interval clock use FakeClock so this can be implemented. func (*IntervalClock) After(d time.Duration) <-chan time.Time { panic("IntervalClock doesn't implement After") } -// Unimplemented, will panic. +// NewTimer is currently unimplemented, will panic. // TODO: make interval clock use FakeClock so this can be implemented. func (*IntervalClock) NewTimer(d time.Duration) Timer { panic("IntervalClock doesn't implement NewTimer") } -// Unimplemented, will panic. +// NewTicker is currently unimplemented, will panic. // TODO: make interval clock use FakeClock so this can be implemented. func (*IntervalClock) NewTicker(d time.Duration) Ticker { panic("IntervalClock doesn't implement NewTicker") } +// Sleep is currently unimplemented; will panic. func (*IntervalClock) Sleep(d time.Duration) { panic("IntervalClock doesn't implement Sleep") } @@ -355,6 +363,7 @@ func (f *fakeTimer) Reset(d time.Duration) bool { return false } +// Ticker defines the Ticker interface type Ticker interface { C() <-chan time.Time Stop() diff --git a/vendor/k8s.io/apimachinery/pkg/util/errors/errors.go b/vendor/k8s.io/apimachinery/pkg/util/errors/errors.go index 62a73f34eb..5bafc218e2 100644 --- a/vendor/k8s.io/apimachinery/pkg/util/errors/errors.go +++ b/vendor/k8s.io/apimachinery/pkg/util/errors/errors.go @@ -28,9 +28,14 @@ type MessageCountMap map[string]int // Aggregate represents an object that contains multiple errors, but does not // necessarily have singular semantic meaning. +// The aggregate can be used with `errors.Is()` to check for the occurrence of +// a specific error type. +// Errors.As() is not supported, because the caller presumably cares about a +// specific error of potentially multiple that match the given type. type Aggregate interface { error Errors() []error + Is(error) bool } // NewAggregate converts a slice of errors into an Aggregate interface, which @@ -71,16 +76,17 @@ func (agg aggregate) Error() string { } seenerrs := sets.NewString() result := "" - agg.visit(func(err error) { + agg.visit(func(err error) bool { msg := err.Error() if seenerrs.Has(msg) { - return + return false } seenerrs.Insert(msg) if len(seenerrs) > 1 { result += ", " } result += msg + return false }) if len(seenerrs) == 1 { return result @@ -88,19 +94,33 @@ func (agg aggregate) Error() string { return "[" + result + "]" } -func (agg aggregate) visit(f func(err error)) { +func (agg aggregate) Is(target error) bool { + return agg.visit(func(err error) bool { + return errors.Is(err, target) + }) +} + +func (agg aggregate) visit(f func(err error) bool) bool { for _, err := range agg { switch err := err.(type) { case aggregate: - err.visit(f) + if match := err.visit(f); match { + return match + } case Aggregate: for _, nestedErr := range err.Errors() { - f(nestedErr) + if match := f(nestedErr); match { + return match + } } default: - f(err) + if match := f(err); match { + return match + } } } + + return false } // Errors is part of the Aggregate interface. diff --git a/vendor/k8s.io/apimachinery/pkg/util/intstr/generated.pb.go b/vendor/k8s.io/apimachinery/pkg/util/intstr/generated.pb.go index 64cbc77033..ec1cb70f29 100644 --- a/vendor/k8s.io/apimachinery/pkg/util/intstr/generated.pb.go +++ b/vendor/k8s.io/apimachinery/pkg/util/intstr/generated.pb.go @@ -38,7 +38,7 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *IntOrString) Reset() { *m = IntOrString{} } func (*IntOrString) ProtoMessage() {} @@ -289,6 +289,7 @@ func (m *IntOrString) Unmarshal(dAtA []byte) error { func skipGenerated(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -320,10 +321,8 @@ func skipGenerated(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -344,55 +343,30 @@ func skipGenerated(dAtA []byte) (n int, err error) { return 0, ErrInvalidLengthGenerated } iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - return iNdEx, nil case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipGenerated(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenerated + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenerated + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group") ) diff --git a/vendor/k8s.io/apimachinery/pkg/util/intstr/intstr.go b/vendor/k8s.io/apimachinery/pkg/util/intstr/intstr.go index 2df6295553..cb974dcf7c 100644 --- a/vendor/k8s.io/apimachinery/pkg/util/intstr/intstr.go +++ b/vendor/k8s.io/apimachinery/pkg/util/intstr/intstr.go @@ -97,7 +97,8 @@ func (intstr *IntOrString) String() string { } // IntValue returns the IntVal if type Int, or if -// it is a String, will attempt a conversion to int. +// it is a String, will attempt a conversion to int, +// returning 0 if a parsing error occurs. func (intstr *IntOrString) IntValue() int { if intstr.Type == String { i, _ := strconv.Atoi(intstr.StrVal) diff --git a/vendor/k8s.io/apimachinery/pkg/util/net/http.go b/vendor/k8s.io/apimachinery/pkg/util/net/http.go index bd79d6c4a0..7b64e68157 100644 --- a/vendor/k8s.io/apimachinery/pkg/util/net/http.go +++ b/vendor/k8s.io/apimachinery/pkg/util/net/http.go @@ -212,13 +212,17 @@ func GetHTTPClient(req *http.Request) string { return "unknown" } -// SourceIPs splits the comma separated X-Forwarded-For header or returns the X-Real-Ip header or req.RemoteAddr, -// in that order, ignoring invalid IPs. It returns nil if all of these are empty or invalid. +// SourceIPs splits the comma separated X-Forwarded-For header and joins it with +// the X-Real-Ip header and/or req.RemoteAddr, ignoring invalid IPs. +// The X-Real-Ip is omitted if it's already present in the X-Forwarded-For chain. +// The req.RemoteAddr is always the last IP in the returned list. +// It returns nil if all of these are empty or invalid. func SourceIPs(req *http.Request) []net.IP { + var srcIPs []net.IP + hdr := req.Header // First check the X-Forwarded-For header for requests via proxy. hdrForwardedFor := hdr.Get("X-Forwarded-For") - forwardedForIPs := []net.IP{} if hdrForwardedFor != "" { // X-Forwarded-For can be a csv of IPs in case of multiple proxies. // Use the first valid one. @@ -226,38 +230,49 @@ func SourceIPs(req *http.Request) []net.IP { for _, part := range parts { ip := net.ParseIP(strings.TrimSpace(part)) if ip != nil { - forwardedForIPs = append(forwardedForIPs, ip) + srcIPs = append(srcIPs, ip) } } } - if len(forwardedForIPs) > 0 { - return forwardedForIPs - } // Try the X-Real-Ip header. hdrRealIp := hdr.Get("X-Real-Ip") if hdrRealIp != "" { ip := net.ParseIP(hdrRealIp) - if ip != nil { - return []net.IP{ip} + // Only append the X-Real-Ip if it's not already contained in the X-Forwarded-For chain. + if ip != nil && !containsIP(srcIPs, ip) { + srcIPs = append(srcIPs, ip) } } - // Fallback to Remote Address in request, which will give the correct client IP when there is no proxy. + // Always include the request Remote Address as it cannot be easily spoofed. + var remoteIP net.IP // Remote Address in Go's HTTP server is in the form host:port so we need to split that first. host, _, err := net.SplitHostPort(req.RemoteAddr) if err == nil { - if remoteIP := net.ParseIP(host); remoteIP != nil { - return []net.IP{remoteIP} - } + remoteIP = net.ParseIP(host) } - // Fallback if Remote Address was just IP. - if remoteIP := net.ParseIP(req.RemoteAddr); remoteIP != nil { - return []net.IP{remoteIP} + if remoteIP == nil { + remoteIP = net.ParseIP(req.RemoteAddr) } - return nil + // Don't duplicate remote IP if it's already the last address in the chain. + if remoteIP != nil && (len(srcIPs) == 0 || !remoteIP.Equal(srcIPs[len(srcIPs)-1])) { + srcIPs = append(srcIPs, remoteIP) + } + + return srcIPs +} + +// Checks whether the given IP address is contained in the list of IPs. +func containsIP(ips []net.IP, ip net.IP) bool { + for _, v := range ips { + if v.Equal(ip) { + return true + } + } + return false } // Extracts and returns the clients IP from the given request. @@ -431,7 +446,7 @@ redirectLoop: // Only follow redirects to the same host. Otherwise, propagate the redirect response back. if requireSameHostRedirects && location.Hostname() != originalLocation.Hostname() { - break redirectLoop + return nil, nil, fmt.Errorf("hostname mismatch: expected %s, found %s", originalLocation.Hostname(), location.Hostname()) } // Reset the connection. diff --git a/vendor/k8s.io/apimachinery/pkg/util/validation/validation.go b/vendor/k8s.io/apimachinery/pkg/util/validation/validation.go index 8e1907c2a6..915231f2e7 100644 --- a/vendor/k8s.io/apimachinery/pkg/util/validation/validation.go +++ b/vendor/k8s.io/apimachinery/pkg/util/validation/validation.go @@ -109,6 +109,44 @@ func IsFullyQualifiedDomainName(fldPath *field.Path, name string) field.ErrorLis return allErrors } +// Allowed characters in an HTTP Path as defined by RFC 3986. A HTTP path may +// contain: +// * unreserved characters (alphanumeric, '-', '.', '_', '~') +// * percent-encoded octets +// * sub-delims ("!", "$", "&", "'", "(", ")", "*", "+", ",", ";", "=") +// * a colon character (":") +const httpPathFmt string = `[A-Za-z0-9/\-._~%!$&'()*+,;=:]+` + +var httpPathRegexp = regexp.MustCompile("^" + httpPathFmt + "$") + +// IsDomainPrefixedPath checks if the given string is a domain-prefixed path +// (e.g. acme.io/foo). All characters before the first "/" must be a valid +// subdomain as defined by RFC 1123. All characters trailing the first "/" must +// be valid HTTP Path characters as defined by RFC 3986. +func IsDomainPrefixedPath(fldPath *field.Path, dpPath string) field.ErrorList { + var allErrs field.ErrorList + if len(dpPath) == 0 { + return append(allErrs, field.Required(fldPath, "")) + } + + segments := strings.SplitN(dpPath, "/", 2) + if len(segments) != 2 || len(segments[0]) == 0 || len(segments[1]) == 0 { + return append(allErrs, field.Invalid(fldPath, dpPath, "must be a domain-prefixed path (such as \"acme.io/foo\")")) + } + + host := segments[0] + for _, err := range IsDNS1123Subdomain(host) { + allErrs = append(allErrs, field.Invalid(fldPath, host, err)) + } + + path := segments[1] + if !httpPathRegexp.MatchString(path) { + return append(allErrs, field.Invalid(fldPath, path, RegexError("Invalid path", httpPathFmt))) + } + + return allErrs +} + const labelValueFmt string = "(" + qualifiedNameFmt + ")?" const labelValueErrMsg string = "a valid label must be an empty string or consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character" diff --git a/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go b/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go index 386c3e7ea0..d759d912be 100644 --- a/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go +++ b/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go @@ -19,10 +19,12 @@ package wait import ( "context" "errors" + "math" "math/rand" "sync" "time" + "k8s.io/apimachinery/pkg/util/clock" "k8s.io/apimachinery/pkg/util/runtime" ) @@ -128,9 +130,15 @@ func NonSlidingUntilWithContext(ctx context.Context, f func(context.Context), pe // Close stopCh to stop. f may not be invoked if stop channel is already // closed. Pass NeverStop to if you don't want it stop. func JitterUntil(f func(), period time.Duration, jitterFactor float64, sliding bool, stopCh <-chan struct{}) { - var t *time.Timer - var sawTimeout bool + BackoffUntil(f, NewJitteredBackoffManager(period, jitterFactor, &clock.RealClock{}), sliding, stopCh) +} +// BackoffUntil loops until stop channel is closed, run f every duration given by BackoffManager. +// +// If sliding is true, the period is computed after f runs. If it is false then +// period includes the runtime for f. +func BackoffUntil(f func(), backoff BackoffManager, sliding bool, stopCh <-chan struct{}) { + var t clock.Timer for { select { case <-stopCh: @@ -138,13 +146,8 @@ func JitterUntil(f func(), period time.Duration, jitterFactor float64, sliding b default: } - jitteredPeriod := period - if jitterFactor > 0.0 { - jitteredPeriod = Jitter(period, jitterFactor) - } - if !sliding { - t = resetOrReuseTimer(t, jitteredPeriod, sawTimeout) + t = backoff.Backoff() } func() { @@ -153,7 +156,7 @@ func JitterUntil(f func(), period time.Duration, jitterFactor float64, sliding b }() if sliding { - t = resetOrReuseTimer(t, jitteredPeriod, sawTimeout) + t = backoff.Backoff() } // NOTE: b/c there is no priority selection in golang @@ -164,8 +167,7 @@ func JitterUntil(f func(), period time.Duration, jitterFactor float64, sliding b select { case <-stopCh: return - case <-t.C: - sawTimeout = true + case <-t.C(): } } } @@ -203,6 +205,12 @@ var ErrWaitTimeout = errors.New("timed out waiting for the condition") // if the loop should be aborted. type ConditionFunc func() (done bool, err error) +// runConditionWithCrashProtection runs a ConditionFunc with crash protection +func runConditionWithCrashProtection(condition ConditionFunc) (bool, error) { + defer runtime.HandleCrash() + return condition() +} + // Backoff holds parameters applied to a Backoff function. type Backoff struct { // The initial duration. @@ -277,6 +285,105 @@ func contextForChannel(parentCh <-chan struct{}) (context.Context, context.Cance return ctx, cancel } +// BackoffManager manages backoff with a particular scheme based on its underlying implementation. It provides +// an interface to return a timer for backoff, and caller shall backoff until Timer.C() drains. If the second Backoff() +// is called before the timer from the first Backoff() call finishes, the first timer will NOT be drained and result in +// undetermined behavior. +// The BackoffManager is supposed to be called in a single-threaded environment. +type BackoffManager interface { + Backoff() clock.Timer +} + +type exponentialBackoffManagerImpl struct { + backoff *Backoff + backoffTimer clock.Timer + lastBackoffStart time.Time + initialBackoff time.Duration + backoffResetDuration time.Duration + clock clock.Clock +} + +// NewExponentialBackoffManager returns a manager for managing exponential backoff. Each backoff is jittered and +// backoff will not exceed the given max. If the backoff is not called within resetDuration, the backoff is reset. +// This backoff manager is used to reduce load during upstream unhealthiness. +func NewExponentialBackoffManager(initBackoff, maxBackoff, resetDuration time.Duration, backoffFactor, jitter float64, c clock.Clock) BackoffManager { + return &exponentialBackoffManagerImpl{ + backoff: &Backoff{ + Duration: initBackoff, + Factor: backoffFactor, + Jitter: jitter, + + // the current impl of wait.Backoff returns Backoff.Duration once steps are used up, which is not + // what we ideally need here, we set it to max int and assume we will never use up the steps + Steps: math.MaxInt32, + Cap: maxBackoff, + }, + backoffTimer: nil, + initialBackoff: initBackoff, + lastBackoffStart: c.Now(), + backoffResetDuration: resetDuration, + clock: c, + } +} + +func (b *exponentialBackoffManagerImpl) getNextBackoff() time.Duration { + if b.clock.Now().Sub(b.lastBackoffStart) > b.backoffResetDuration { + b.backoff.Steps = math.MaxInt32 + b.backoff.Duration = b.initialBackoff + } + b.lastBackoffStart = b.clock.Now() + return b.backoff.Step() +} + +// Backoff implements BackoffManager.Backoff, it returns a timer so caller can block on the timer for exponential backoff. +// The returned timer must be drained before calling Backoff() the second time +func (b *exponentialBackoffManagerImpl) Backoff() clock.Timer { + if b.backoffTimer == nil { + b.backoffTimer = b.clock.NewTimer(b.getNextBackoff()) + } else { + b.backoffTimer.Reset(b.getNextBackoff()) + } + return b.backoffTimer +} + +type jitteredBackoffManagerImpl struct { + clock clock.Clock + duration time.Duration + jitter float64 + backoffTimer clock.Timer +} + +// NewJitteredBackoffManager returns a BackoffManager that backoffs with given duration plus given jitter. If the jitter +// is negative, backoff will not be jittered. +func NewJitteredBackoffManager(duration time.Duration, jitter float64, c clock.Clock) BackoffManager { + return &jitteredBackoffManagerImpl{ + clock: c, + duration: duration, + jitter: jitter, + backoffTimer: nil, + } +} + +func (j *jitteredBackoffManagerImpl) getNextBackoff() time.Duration { + jitteredPeriod := j.duration + if j.jitter > 0.0 { + jitteredPeriod = Jitter(j.duration, j.jitter) + } + return jitteredPeriod +} + +// Backoff implements BackoffManager.Backoff, it returns a timer so caller can block on the timer for jittered backoff. +// The returned timer must be drained before calling Backoff() the second time +func (j *jitteredBackoffManagerImpl) Backoff() clock.Timer { + backoff := j.getNextBackoff() + if j.backoffTimer == nil { + j.backoffTimer = j.clock.NewTimer(backoff) + } else { + j.backoffTimer.Reset(backoff) + } + return j.backoffTimer +} + // ExponentialBackoff repeats a condition check with exponential backoff. // // It repeatedly checks the condition and then sleeps, using `backoff.Step()` @@ -289,7 +396,7 @@ func contextForChannel(parentCh <-chan struct{}) (context.Context, context.Cance // In all other cases, ErrWaitTimeout is returned. func ExponentialBackoff(backoff Backoff, condition ConditionFunc) error { for backoff.Steps > 0 { - if ok, err := condition(); err != nil || ok { + if ok, err := runConditionWithCrashProtection(condition); err != nil || ok { return err } if backoff.Steps == 1 { @@ -335,7 +442,7 @@ func PollImmediate(interval, timeout time.Duration, condition ConditionFunc) err } func pollImmediateInternal(wait WaitFunc, condition ConditionFunc) error { - done, err := condition() + done, err := runConditionWithCrashProtection(condition) if err != nil { return err } @@ -364,7 +471,7 @@ func PollInfinite(interval time.Duration, condition ConditionFunc) error { // Some intervals may be missed if the condition takes too long or the time // window is too short. func PollImmediateInfinite(interval time.Duration, condition ConditionFunc) error { - done, err := condition() + done, err := runConditionWithCrashProtection(condition) if err != nil { return err } @@ -431,7 +538,7 @@ func WaitFor(wait WaitFunc, fn ConditionFunc, done <-chan struct{}) error { for { select { case _, open := <-c: - ok, err := fn() + ok, err := runConditionWithCrashProtection(fn) if err != nil { return err } @@ -497,16 +604,3 @@ func poller(interval, timeout time.Duration) WaitFunc { return ch }) } - -// resetOrReuseTimer avoids allocating a new timer if one is already in use. -// Not safe for multiple threads. -func resetOrReuseTimer(t *time.Timer, d time.Duration, sawTimeout bool) *time.Timer { - if t == nil { - return time.NewTimer(d) - } - if !t.Stop() && !sawTimeout { - <-t.C - } - t.Reset(d) - return t -} diff --git a/vendor/k8s.io/apimachinery/pkg/watch/watch.go b/vendor/k8s.io/apimachinery/pkg/watch/watch.go index 3945be3ae6..988aba3ed6 100644 --- a/vendor/k8s.io/apimachinery/pkg/watch/watch.go +++ b/vendor/k8s.io/apimachinery/pkg/watch/watch.go @@ -90,7 +90,7 @@ func (w emptyWatch) ResultChan() <-chan Event { // FakeWatcher lets you test anything that consumes a watch.Interface; threadsafe. type FakeWatcher struct { result chan Event - Stopped bool + stopped bool sync.Mutex } @@ -110,24 +110,24 @@ func NewFakeWithChanSize(size int, blocking bool) *FakeWatcher { func (f *FakeWatcher) Stop() { f.Lock() defer f.Unlock() - if !f.Stopped { + if !f.stopped { klog.V(4).Infof("Stopping fake watcher.") close(f.result) - f.Stopped = true + f.stopped = true } } func (f *FakeWatcher) IsStopped() bool { f.Lock() defer f.Unlock() - return f.Stopped + return f.stopped } // Reset prepares the watcher to be reused. func (f *FakeWatcher) Reset() { f.Lock() defer f.Unlock() - f.Stopped = false + f.stopped = false f.result = make(chan Event) } diff --git a/vendor/k8s.io/client-go/discovery/discovery_client.go b/vendor/k8s.io/client-go/discovery/discovery_client.go index 5d89457cca..dc12f9a296 100644 --- a/vendor/k8s.io/client-go/discovery/discovery_client.go +++ b/vendor/k8s.io/client-go/discovery/discovery_client.go @@ -17,6 +17,7 @@ limitations under the License. package discovery import ( + "context" "encoding/json" "fmt" "net/url" @@ -155,7 +156,7 @@ func apiVersionsToAPIGroup(apiVersions *metav1.APIVersions) (apiGroup metav1.API func (d *DiscoveryClient) ServerGroups() (apiGroupList *metav1.APIGroupList, err error) { // Get the groupVersions exposed at /api v := &metav1.APIVersions{} - err = d.restClient.Get().AbsPath(d.LegacyPrefix).Do().Into(v) + err = d.restClient.Get().AbsPath(d.LegacyPrefix).Do(context.TODO()).Into(v) apiGroup := metav1.APIGroup{} if err == nil && len(v.Versions) != 0 { apiGroup = apiVersionsToAPIGroup(v) @@ -166,7 +167,7 @@ func (d *DiscoveryClient) ServerGroups() (apiGroupList *metav1.APIGroupList, err // Get the groupVersions exposed at /apis apiGroupList = &metav1.APIGroupList{} - err = d.restClient.Get().AbsPath("/apis").Do().Into(apiGroupList) + err = d.restClient.Get().AbsPath("/apis").Do(context.TODO()).Into(apiGroupList) if err != nil && !errors.IsNotFound(err) && !errors.IsForbidden(err) { return nil, err } @@ -196,7 +197,7 @@ func (d *DiscoveryClient) ServerResourcesForGroupVersion(groupVersion string) (r resources = &metav1.APIResourceList{ GroupVersion: groupVersion, } - err = d.restClient.Get().AbsPath(url.String()).Do().Into(resources) + err = d.restClient.Get().AbsPath(url.String()).Do(context.TODO()).Into(resources) if err != nil { // ignore 403 or 404 error to be compatible with an v1.0 server. if groupVersion == "v1" && (errors.IsNotFound(err) || errors.IsForbidden(err)) { @@ -405,7 +406,7 @@ func ServerPreferredNamespacedResources(d DiscoveryInterface) ([]*metav1.APIReso // ServerVersion retrieves and parses the server's version (git version). func (d *DiscoveryClient) ServerVersion() (*version.Info, error) { - body, err := d.restClient.Get().AbsPath("/version").Do().Raw() + body, err := d.restClient.Get().AbsPath("/version").Do(context.TODO()).Raw() if err != nil { return nil, err } @@ -419,12 +420,12 @@ func (d *DiscoveryClient) ServerVersion() (*version.Info, error) { // OpenAPISchema fetches the open api schema using a rest client and parses the proto. func (d *DiscoveryClient) OpenAPISchema() (*openapi_v2.Document, error) { - data, err := d.restClient.Get().AbsPath("/openapi/v2").SetHeader("Accept", mimePb).Do().Raw() + data, err := d.restClient.Get().AbsPath("/openapi/v2").SetHeader("Accept", mimePb).Do(context.TODO()).Raw() if err != nil { if errors.IsForbidden(err) || errors.IsNotFound(err) || errors.IsNotAcceptable(err) { // single endpoint not found/registered in old server, try to fetch old endpoint // TODO: remove this when kubectl/client-go don't work with 1.9 server - data, err = d.restClient.Get().AbsPath("/swagger-2.0.0.pb-v1").Do().Raw() + data, err = d.restClient.Get().AbsPath("/swagger-2.0.0.pb-v1").Do(context.TODO()).Raw() if err != nil { return nil, err } diff --git a/vendor/k8s.io/client-go/dynamic/fake/simple.go b/vendor/k8s.io/client-go/dynamic/fake/simple.go index 819b8d9c90..b2c5f6f343 100644 --- a/vendor/k8s.io/client-go/dynamic/fake/simple.go +++ b/vendor/k8s.io/client-go/dynamic/fake/simple.go @@ -17,6 +17,7 @@ limitations under the License. package fake import ( + "context" "strings" "k8s.io/apimachinery/pkg/api/meta" @@ -86,7 +87,7 @@ func (c *dynamicResourceClient) Namespace(ns string) dynamic.ResourceInterface { return &ret } -func (c *dynamicResourceClient) Create(obj *unstructured.Unstructured, opts metav1.CreateOptions, subresources ...string) (*unstructured.Unstructured, error) { +func (c *dynamicResourceClient) Create(ctx context.Context, obj *unstructured.Unstructured, opts metav1.CreateOptions, subresources ...string) (*unstructured.Unstructured, error) { var uncastRet runtime.Object var err error switch { @@ -132,7 +133,7 @@ func (c *dynamicResourceClient) Create(obj *unstructured.Unstructured, opts meta return ret, err } -func (c *dynamicResourceClient) Update(obj *unstructured.Unstructured, opts metav1.UpdateOptions, subresources ...string) (*unstructured.Unstructured, error) { +func (c *dynamicResourceClient) Update(ctx context.Context, obj *unstructured.Unstructured, opts metav1.UpdateOptions, subresources ...string) (*unstructured.Unstructured, error) { var uncastRet runtime.Object var err error switch { @@ -168,7 +169,7 @@ func (c *dynamicResourceClient) Update(obj *unstructured.Unstructured, opts meta return ret, err } -func (c *dynamicResourceClient) UpdateStatus(obj *unstructured.Unstructured, opts metav1.UpdateOptions) (*unstructured.Unstructured, error) { +func (c *dynamicResourceClient) UpdateStatus(ctx context.Context, obj *unstructured.Unstructured, opts metav1.UpdateOptions) (*unstructured.Unstructured, error) { var uncastRet runtime.Object var err error switch { @@ -196,7 +197,7 @@ func (c *dynamicResourceClient) UpdateStatus(obj *unstructured.Unstructured, opt return ret, err } -func (c *dynamicResourceClient) Delete(name string, opts *metav1.DeleteOptions, subresources ...string) error { +func (c *dynamicResourceClient) Delete(ctx context.Context, name string, opts metav1.DeleteOptions, subresources ...string) error { var err error switch { case len(c.namespace) == 0 && len(subresources) == 0: @@ -219,7 +220,7 @@ func (c *dynamicResourceClient) Delete(name string, opts *metav1.DeleteOptions, return err } -func (c *dynamicResourceClient) DeleteCollection(opts *metav1.DeleteOptions, listOptions metav1.ListOptions) error { +func (c *dynamicResourceClient) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOptions metav1.ListOptions) error { var err error switch { case len(c.namespace) == 0: @@ -235,7 +236,7 @@ func (c *dynamicResourceClient) DeleteCollection(opts *metav1.DeleteOptions, lis return err } -func (c *dynamicResourceClient) Get(name string, opts metav1.GetOptions, subresources ...string) (*unstructured.Unstructured, error) { +func (c *dynamicResourceClient) Get(ctx context.Context, name string, opts metav1.GetOptions, subresources ...string) (*unstructured.Unstructured, error) { var uncastRet runtime.Object var err error switch { @@ -270,7 +271,7 @@ func (c *dynamicResourceClient) Get(name string, opts metav1.GetOptions, subreso return ret, err } -func (c *dynamicResourceClient) List(opts metav1.ListOptions) (*unstructured.UnstructuredList, error) { +func (c *dynamicResourceClient) List(ctx context.Context, opts metav1.ListOptions) (*unstructured.UnstructuredList, error) { var obj runtime.Object var err error switch { @@ -317,7 +318,7 @@ func (c *dynamicResourceClient) List(opts metav1.ListOptions) (*unstructured.Uns return list, nil } -func (c *dynamicResourceClient) Watch(opts metav1.ListOptions) (watch.Interface, error) { +func (c *dynamicResourceClient) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { switch { case len(c.namespace) == 0: return c.client.Fake. @@ -333,7 +334,7 @@ func (c *dynamicResourceClient) Watch(opts metav1.ListOptions) (watch.Interface, } // TODO: opts are currently ignored. -func (c *dynamicResourceClient) Patch(name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (*unstructured.Unstructured, error) { +func (c *dynamicResourceClient) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (*unstructured.Unstructured, error) { var uncastRet runtime.Object var err error switch { diff --git a/vendor/k8s.io/client-go/dynamic/interface.go b/vendor/k8s.io/client-go/dynamic/interface.go index 70756a4f58..b08067c341 100644 --- a/vendor/k8s.io/client-go/dynamic/interface.go +++ b/vendor/k8s.io/client-go/dynamic/interface.go @@ -17,6 +17,8 @@ limitations under the License. package dynamic import ( + "context" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/runtime/schema" @@ -29,15 +31,15 @@ type Interface interface { } type ResourceInterface interface { - Create(obj *unstructured.Unstructured, options metav1.CreateOptions, subresources ...string) (*unstructured.Unstructured, error) - Update(obj *unstructured.Unstructured, options metav1.UpdateOptions, subresources ...string) (*unstructured.Unstructured, error) - UpdateStatus(obj *unstructured.Unstructured, options metav1.UpdateOptions) (*unstructured.Unstructured, error) - Delete(name string, options *metav1.DeleteOptions, subresources ...string) error - DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error - Get(name string, options metav1.GetOptions, subresources ...string) (*unstructured.Unstructured, error) - List(opts metav1.ListOptions) (*unstructured.UnstructuredList, error) - Watch(opts metav1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, options metav1.PatchOptions, subresources ...string) (*unstructured.Unstructured, error) + Create(ctx context.Context, obj *unstructured.Unstructured, options metav1.CreateOptions, subresources ...string) (*unstructured.Unstructured, error) + Update(ctx context.Context, obj *unstructured.Unstructured, options metav1.UpdateOptions, subresources ...string) (*unstructured.Unstructured, error) + UpdateStatus(ctx context.Context, obj *unstructured.Unstructured, options metav1.UpdateOptions) (*unstructured.Unstructured, error) + Delete(ctx context.Context, name string, options metav1.DeleteOptions, subresources ...string) error + DeleteCollection(ctx context.Context, options metav1.DeleteOptions, listOptions metav1.ListOptions) error + Get(ctx context.Context, name string, options metav1.GetOptions, subresources ...string) (*unstructured.Unstructured, error) + List(ctx context.Context, opts metav1.ListOptions) (*unstructured.UnstructuredList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, options metav1.PatchOptions, subresources ...string) (*unstructured.Unstructured, error) } type NamespaceableResourceInterface interface { diff --git a/vendor/k8s.io/client-go/dynamic/simple.go b/vendor/k8s.io/client-go/dynamic/simple.go index 8a026788ae..9ae320d301 100644 --- a/vendor/k8s.io/client-go/dynamic/simple.go +++ b/vendor/k8s.io/client-go/dynamic/simple.go @@ -17,6 +17,7 @@ limitations under the License. package dynamic import ( + "context" "fmt" "k8s.io/apimachinery/pkg/api/meta" @@ -89,7 +90,7 @@ func (c *dynamicResourceClient) Namespace(ns string) ResourceInterface { return &ret } -func (c *dynamicResourceClient) Create(obj *unstructured.Unstructured, opts metav1.CreateOptions, subresources ...string) (*unstructured.Unstructured, error) { +func (c *dynamicResourceClient) Create(ctx context.Context, obj *unstructured.Unstructured, opts metav1.CreateOptions, subresources ...string) (*unstructured.Unstructured, error) { outBytes, err := runtime.Encode(unstructured.UnstructuredJSONScheme, obj) if err != nil { return nil, err @@ -111,7 +112,7 @@ func (c *dynamicResourceClient) Create(obj *unstructured.Unstructured, opts meta AbsPath(append(c.makeURLSegments(name), subresources...)...). Body(outBytes). SpecificallyVersionedParams(&opts, dynamicParameterCodec, versionV1). - Do() + Do(ctx) if err := result.Error(); err != nil { return nil, err } @@ -127,7 +128,7 @@ func (c *dynamicResourceClient) Create(obj *unstructured.Unstructured, opts meta return uncastObj.(*unstructured.Unstructured), nil } -func (c *dynamicResourceClient) Update(obj *unstructured.Unstructured, opts metav1.UpdateOptions, subresources ...string) (*unstructured.Unstructured, error) { +func (c *dynamicResourceClient) Update(ctx context.Context, obj *unstructured.Unstructured, opts metav1.UpdateOptions, subresources ...string) (*unstructured.Unstructured, error) { accessor, err := meta.Accessor(obj) if err != nil { return nil, err @@ -146,7 +147,7 @@ func (c *dynamicResourceClient) Update(obj *unstructured.Unstructured, opts meta AbsPath(append(c.makeURLSegments(name), subresources...)...). Body(outBytes). SpecificallyVersionedParams(&opts, dynamicParameterCodec, versionV1). - Do() + Do(ctx) if err := result.Error(); err != nil { return nil, err } @@ -162,7 +163,7 @@ func (c *dynamicResourceClient) Update(obj *unstructured.Unstructured, opts meta return uncastObj.(*unstructured.Unstructured), nil } -func (c *dynamicResourceClient) UpdateStatus(obj *unstructured.Unstructured, opts metav1.UpdateOptions) (*unstructured.Unstructured, error) { +func (c *dynamicResourceClient) UpdateStatus(ctx context.Context, obj *unstructured.Unstructured, opts metav1.UpdateOptions) (*unstructured.Unstructured, error) { accessor, err := meta.Accessor(obj) if err != nil { return nil, err @@ -182,7 +183,7 @@ func (c *dynamicResourceClient) UpdateStatus(obj *unstructured.Unstructured, opt AbsPath(append(c.makeURLSegments(name), "status")...). Body(outBytes). SpecificallyVersionedParams(&opts, dynamicParameterCodec, versionV1). - Do() + Do(ctx) if err := result.Error(); err != nil { return nil, err } @@ -198,14 +199,11 @@ func (c *dynamicResourceClient) UpdateStatus(obj *unstructured.Unstructured, opt return uncastObj.(*unstructured.Unstructured), nil } -func (c *dynamicResourceClient) Delete(name string, opts *metav1.DeleteOptions, subresources ...string) error { +func (c *dynamicResourceClient) Delete(ctx context.Context, name string, opts metav1.DeleteOptions, subresources ...string) error { if len(name) == 0 { return fmt.Errorf("name is required") } - if opts == nil { - opts = &metav1.DeleteOptions{} - } - deleteOptionsByte, err := runtime.Encode(deleteOptionsCodec.LegacyCodec(schema.GroupVersion{Version: "v1"}), opts) + deleteOptionsByte, err := runtime.Encode(deleteOptionsCodec.LegacyCodec(schema.GroupVersion{Version: "v1"}), &opts) if err != nil { return err } @@ -214,15 +212,12 @@ func (c *dynamicResourceClient) Delete(name string, opts *metav1.DeleteOptions, Delete(). AbsPath(append(c.makeURLSegments(name), subresources...)...). Body(deleteOptionsByte). - Do() + Do(ctx) return result.Error() } -func (c *dynamicResourceClient) DeleteCollection(opts *metav1.DeleteOptions, listOptions metav1.ListOptions) error { - if opts == nil { - opts = &metav1.DeleteOptions{} - } - deleteOptionsByte, err := runtime.Encode(deleteOptionsCodec.LegacyCodec(schema.GroupVersion{Version: "v1"}), opts) +func (c *dynamicResourceClient) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOptions metav1.ListOptions) error { + deleteOptionsByte, err := runtime.Encode(deleteOptionsCodec.LegacyCodec(schema.GroupVersion{Version: "v1"}), &opts) if err != nil { return err } @@ -232,15 +227,15 @@ func (c *dynamicResourceClient) DeleteCollection(opts *metav1.DeleteOptions, lis AbsPath(c.makeURLSegments("")...). Body(deleteOptionsByte). SpecificallyVersionedParams(&listOptions, dynamicParameterCodec, versionV1). - Do() + Do(ctx) return result.Error() } -func (c *dynamicResourceClient) Get(name string, opts metav1.GetOptions, subresources ...string) (*unstructured.Unstructured, error) { +func (c *dynamicResourceClient) Get(ctx context.Context, name string, opts metav1.GetOptions, subresources ...string) (*unstructured.Unstructured, error) { if len(name) == 0 { return nil, fmt.Errorf("name is required") } - result := c.client.client.Get().AbsPath(append(c.makeURLSegments(name), subresources...)...).SpecificallyVersionedParams(&opts, dynamicParameterCodec, versionV1).Do() + result := c.client.client.Get().AbsPath(append(c.makeURLSegments(name), subresources...)...).SpecificallyVersionedParams(&opts, dynamicParameterCodec, versionV1).Do(ctx) if err := result.Error(); err != nil { return nil, err } @@ -255,8 +250,8 @@ func (c *dynamicResourceClient) Get(name string, opts metav1.GetOptions, subreso return uncastObj.(*unstructured.Unstructured), nil } -func (c *dynamicResourceClient) List(opts metav1.ListOptions) (*unstructured.UnstructuredList, error) { - result := c.client.client.Get().AbsPath(c.makeURLSegments("")...).SpecificallyVersionedParams(&opts, dynamicParameterCodec, versionV1).Do() +func (c *dynamicResourceClient) List(ctx context.Context, opts metav1.ListOptions) (*unstructured.UnstructuredList, error) { + result := c.client.client.Get().AbsPath(c.makeURLSegments("")...).SpecificallyVersionedParams(&opts, dynamicParameterCodec, versionV1).Do(ctx) if err := result.Error(); err != nil { return nil, err } @@ -279,14 +274,14 @@ func (c *dynamicResourceClient) List(opts metav1.ListOptions) (*unstructured.Uns return list, nil } -func (c *dynamicResourceClient) Watch(opts metav1.ListOptions) (watch.Interface, error) { +func (c *dynamicResourceClient) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { opts.Watch = true return c.client.client.Get().AbsPath(c.makeURLSegments("")...). SpecificallyVersionedParams(&opts, dynamicParameterCodec, versionV1). - Watch() + Watch(ctx) } -func (c *dynamicResourceClient) Patch(name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (*unstructured.Unstructured, error) { +func (c *dynamicResourceClient) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (*unstructured.Unstructured, error) { if len(name) == 0 { return nil, fmt.Errorf("name is required") } @@ -295,7 +290,7 @@ func (c *dynamicResourceClient) Patch(name string, pt types.PatchType, data []by AbsPath(append(c.makeURLSegments(name), subresources...)...). Body(data). SpecificallyVersionedParams(&opts, dynamicParameterCodec, versionV1). - Do() + Do(ctx) if err := result.Error(); err != nil { return nil, err } diff --git a/vendor/k8s.io/client-go/informers/admissionregistration/v1/mutatingwebhookconfiguration.go b/vendor/k8s.io/client-go/informers/admissionregistration/v1/mutatingwebhookconfiguration.go index 4fadd9a216..b768f6f7f3 100644 --- a/vendor/k8s.io/client-go/informers/admissionregistration/v1/mutatingwebhookconfiguration.go +++ b/vendor/k8s.io/client-go/informers/admissionregistration/v1/mutatingwebhookconfiguration.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" time "time" admissionregistrationv1 "k8s.io/api/admissionregistration/v1" @@ -60,13 +61,13 @@ func NewFilteredMutatingWebhookConfigurationInformer(client kubernetes.Interface if tweakListOptions != nil { tweakListOptions(&options) } - return client.AdmissionregistrationV1().MutatingWebhookConfigurations().List(options) + return client.AdmissionregistrationV1().MutatingWebhookConfigurations().List(context.TODO(), options) }, WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.AdmissionregistrationV1().MutatingWebhookConfigurations().Watch(options) + return client.AdmissionregistrationV1().MutatingWebhookConfigurations().Watch(context.TODO(), options) }, }, &admissionregistrationv1.MutatingWebhookConfiguration{}, diff --git a/vendor/k8s.io/client-go/informers/admissionregistration/v1/validatingwebhookconfiguration.go b/vendor/k8s.io/client-go/informers/admissionregistration/v1/validatingwebhookconfiguration.go index 1c648e6081..8ddcdf2d90 100644 --- a/vendor/k8s.io/client-go/informers/admissionregistration/v1/validatingwebhookconfiguration.go +++ b/vendor/k8s.io/client-go/informers/admissionregistration/v1/validatingwebhookconfiguration.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" time "time" admissionregistrationv1 "k8s.io/api/admissionregistration/v1" @@ -60,13 +61,13 @@ func NewFilteredValidatingWebhookConfigurationInformer(client kubernetes.Interfa if tweakListOptions != nil { tweakListOptions(&options) } - return client.AdmissionregistrationV1().ValidatingWebhookConfigurations().List(options) + return client.AdmissionregistrationV1().ValidatingWebhookConfigurations().List(context.TODO(), options) }, WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.AdmissionregistrationV1().ValidatingWebhookConfigurations().Watch(options) + return client.AdmissionregistrationV1().ValidatingWebhookConfigurations().Watch(context.TODO(), options) }, }, &admissionregistrationv1.ValidatingWebhookConfiguration{}, diff --git a/vendor/k8s.io/client-go/informers/admissionregistration/v1beta1/mutatingwebhookconfiguration.go b/vendor/k8s.io/client-go/informers/admissionregistration/v1beta1/mutatingwebhookconfiguration.go index a06c406c2c..12c8ec1fbd 100644 --- a/vendor/k8s.io/client-go/informers/admissionregistration/v1beta1/mutatingwebhookconfiguration.go +++ b/vendor/k8s.io/client-go/informers/admissionregistration/v1beta1/mutatingwebhookconfiguration.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" time "time" admissionregistrationv1beta1 "k8s.io/api/admissionregistration/v1beta1" @@ -60,13 +61,13 @@ func NewFilteredMutatingWebhookConfigurationInformer(client kubernetes.Interface if tweakListOptions != nil { tweakListOptions(&options) } - return client.AdmissionregistrationV1beta1().MutatingWebhookConfigurations().List(options) + return client.AdmissionregistrationV1beta1().MutatingWebhookConfigurations().List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.AdmissionregistrationV1beta1().MutatingWebhookConfigurations().Watch(options) + return client.AdmissionregistrationV1beta1().MutatingWebhookConfigurations().Watch(context.TODO(), options) }, }, &admissionregistrationv1beta1.MutatingWebhookConfiguration{}, diff --git a/vendor/k8s.io/client-go/informers/admissionregistration/v1beta1/validatingwebhookconfiguration.go b/vendor/k8s.io/client-go/informers/admissionregistration/v1beta1/validatingwebhookconfiguration.go index 3b7fafd29c..05eb05097f 100644 --- a/vendor/k8s.io/client-go/informers/admissionregistration/v1beta1/validatingwebhookconfiguration.go +++ b/vendor/k8s.io/client-go/informers/admissionregistration/v1beta1/validatingwebhookconfiguration.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" time "time" admissionregistrationv1beta1 "k8s.io/api/admissionregistration/v1beta1" @@ -60,13 +61,13 @@ func NewFilteredValidatingWebhookConfigurationInformer(client kubernetes.Interfa if tweakListOptions != nil { tweakListOptions(&options) } - return client.AdmissionregistrationV1beta1().ValidatingWebhookConfigurations().List(options) + return client.AdmissionregistrationV1beta1().ValidatingWebhookConfigurations().List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.AdmissionregistrationV1beta1().ValidatingWebhookConfigurations().Watch(options) + return client.AdmissionregistrationV1beta1().ValidatingWebhookConfigurations().Watch(context.TODO(), options) }, }, &admissionregistrationv1beta1.ValidatingWebhookConfiguration{}, diff --git a/vendor/k8s.io/client-go/informers/apps/v1/controllerrevision.go b/vendor/k8s.io/client-go/informers/apps/v1/controllerrevision.go index 2f69e0df01..31e2b74d0f 100644 --- a/vendor/k8s.io/client-go/informers/apps/v1/controllerrevision.go +++ b/vendor/k8s.io/client-go/informers/apps/v1/controllerrevision.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" time "time" appsv1 "k8s.io/api/apps/v1" @@ -61,13 +62,13 @@ func NewFilteredControllerRevisionInformer(client kubernetes.Interface, namespac if tweakListOptions != nil { tweakListOptions(&options) } - return client.AppsV1().ControllerRevisions(namespace).List(options) + return client.AppsV1().ControllerRevisions(namespace).List(context.TODO(), options) }, WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.AppsV1().ControllerRevisions(namespace).Watch(options) + return client.AppsV1().ControllerRevisions(namespace).Watch(context.TODO(), options) }, }, &appsv1.ControllerRevision{}, diff --git a/vendor/k8s.io/client-go/informers/apps/v1/daemonset.go b/vendor/k8s.io/client-go/informers/apps/v1/daemonset.go index db649ccbf2..da7fe9509b 100644 --- a/vendor/k8s.io/client-go/informers/apps/v1/daemonset.go +++ b/vendor/k8s.io/client-go/informers/apps/v1/daemonset.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" time "time" appsv1 "k8s.io/api/apps/v1" @@ -61,13 +62,13 @@ func NewFilteredDaemonSetInformer(client kubernetes.Interface, namespace string, if tweakListOptions != nil { tweakListOptions(&options) } - return client.AppsV1().DaemonSets(namespace).List(options) + return client.AppsV1().DaemonSets(namespace).List(context.TODO(), options) }, WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.AppsV1().DaemonSets(namespace).Watch(options) + return client.AppsV1().DaemonSets(namespace).Watch(context.TODO(), options) }, }, &appsv1.DaemonSet{}, diff --git a/vendor/k8s.io/client-go/informers/apps/v1/deployment.go b/vendor/k8s.io/client-go/informers/apps/v1/deployment.go index 71cd002733..bd639bb3d9 100644 --- a/vendor/k8s.io/client-go/informers/apps/v1/deployment.go +++ b/vendor/k8s.io/client-go/informers/apps/v1/deployment.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" time "time" appsv1 "k8s.io/api/apps/v1" @@ -61,13 +62,13 @@ func NewFilteredDeploymentInformer(client kubernetes.Interface, namespace string if tweakListOptions != nil { tweakListOptions(&options) } - return client.AppsV1().Deployments(namespace).List(options) + return client.AppsV1().Deployments(namespace).List(context.TODO(), options) }, WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.AppsV1().Deployments(namespace).Watch(options) + return client.AppsV1().Deployments(namespace).Watch(context.TODO(), options) }, }, &appsv1.Deployment{}, diff --git a/vendor/k8s.io/client-go/informers/apps/v1/replicaset.go b/vendor/k8s.io/client-go/informers/apps/v1/replicaset.go index 6ee7a0537e..6d81a471a4 100644 --- a/vendor/k8s.io/client-go/informers/apps/v1/replicaset.go +++ b/vendor/k8s.io/client-go/informers/apps/v1/replicaset.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" time "time" appsv1 "k8s.io/api/apps/v1" @@ -61,13 +62,13 @@ func NewFilteredReplicaSetInformer(client kubernetes.Interface, namespace string if tweakListOptions != nil { tweakListOptions(&options) } - return client.AppsV1().ReplicaSets(namespace).List(options) + return client.AppsV1().ReplicaSets(namespace).List(context.TODO(), options) }, WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.AppsV1().ReplicaSets(namespace).Watch(options) + return client.AppsV1().ReplicaSets(namespace).Watch(context.TODO(), options) }, }, &appsv1.ReplicaSet{}, diff --git a/vendor/k8s.io/client-go/informers/apps/v1/statefulset.go b/vendor/k8s.io/client-go/informers/apps/v1/statefulset.go index 385e653660..c99bbb73ed 100644 --- a/vendor/k8s.io/client-go/informers/apps/v1/statefulset.go +++ b/vendor/k8s.io/client-go/informers/apps/v1/statefulset.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" time "time" appsv1 "k8s.io/api/apps/v1" @@ -61,13 +62,13 @@ func NewFilteredStatefulSetInformer(client kubernetes.Interface, namespace strin if tweakListOptions != nil { tweakListOptions(&options) } - return client.AppsV1().StatefulSets(namespace).List(options) + return client.AppsV1().StatefulSets(namespace).List(context.TODO(), options) }, WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.AppsV1().StatefulSets(namespace).Watch(options) + return client.AppsV1().StatefulSets(namespace).Watch(context.TODO(), options) }, }, &appsv1.StatefulSet{}, diff --git a/vendor/k8s.io/client-go/informers/apps/v1beta1/controllerrevision.go b/vendor/k8s.io/client-go/informers/apps/v1beta1/controllerrevision.go index c7d3e30e04..cb36bd7fd8 100644 --- a/vendor/k8s.io/client-go/informers/apps/v1beta1/controllerrevision.go +++ b/vendor/k8s.io/client-go/informers/apps/v1beta1/controllerrevision.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" time "time" appsv1beta1 "k8s.io/api/apps/v1beta1" @@ -61,13 +62,13 @@ func NewFilteredControllerRevisionInformer(client kubernetes.Interface, namespac if tweakListOptions != nil { tweakListOptions(&options) } - return client.AppsV1beta1().ControllerRevisions(namespace).List(options) + return client.AppsV1beta1().ControllerRevisions(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.AppsV1beta1().ControllerRevisions(namespace).Watch(options) + return client.AppsV1beta1().ControllerRevisions(namespace).Watch(context.TODO(), options) }, }, &appsv1beta1.ControllerRevision{}, diff --git a/vendor/k8s.io/client-go/informers/apps/v1beta1/deployment.go b/vendor/k8s.io/client-go/informers/apps/v1beta1/deployment.go index 03bafca6ba..e02a13c2f4 100644 --- a/vendor/k8s.io/client-go/informers/apps/v1beta1/deployment.go +++ b/vendor/k8s.io/client-go/informers/apps/v1beta1/deployment.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" time "time" appsv1beta1 "k8s.io/api/apps/v1beta1" @@ -61,13 +62,13 @@ func NewFilteredDeploymentInformer(client kubernetes.Interface, namespace string if tweakListOptions != nil { tweakListOptions(&options) } - return client.AppsV1beta1().Deployments(namespace).List(options) + return client.AppsV1beta1().Deployments(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.AppsV1beta1().Deployments(namespace).Watch(options) + return client.AppsV1beta1().Deployments(namespace).Watch(context.TODO(), options) }, }, &appsv1beta1.Deployment{}, diff --git a/vendor/k8s.io/client-go/informers/apps/v1beta1/statefulset.go b/vendor/k8s.io/client-go/informers/apps/v1beta1/statefulset.go index e4d1b46fa6..b845cc99c9 100644 --- a/vendor/k8s.io/client-go/informers/apps/v1beta1/statefulset.go +++ b/vendor/k8s.io/client-go/informers/apps/v1beta1/statefulset.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" time "time" appsv1beta1 "k8s.io/api/apps/v1beta1" @@ -61,13 +62,13 @@ func NewFilteredStatefulSetInformer(client kubernetes.Interface, namespace strin if tweakListOptions != nil { tweakListOptions(&options) } - return client.AppsV1beta1().StatefulSets(namespace).List(options) + return client.AppsV1beta1().StatefulSets(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.AppsV1beta1().StatefulSets(namespace).Watch(options) + return client.AppsV1beta1().StatefulSets(namespace).Watch(context.TODO(), options) }, }, &appsv1beta1.StatefulSet{}, diff --git a/vendor/k8s.io/client-go/informers/apps/v1beta2/controllerrevision.go b/vendor/k8s.io/client-go/informers/apps/v1beta2/controllerrevision.go index 975e81077e..4d0e91320b 100644 --- a/vendor/k8s.io/client-go/informers/apps/v1beta2/controllerrevision.go +++ b/vendor/k8s.io/client-go/informers/apps/v1beta2/controllerrevision.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta2 import ( + "context" time "time" appsv1beta2 "k8s.io/api/apps/v1beta2" @@ -61,13 +62,13 @@ func NewFilteredControllerRevisionInformer(client kubernetes.Interface, namespac if tweakListOptions != nil { tweakListOptions(&options) } - return client.AppsV1beta2().ControllerRevisions(namespace).List(options) + return client.AppsV1beta2().ControllerRevisions(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.AppsV1beta2().ControllerRevisions(namespace).Watch(options) + return client.AppsV1beta2().ControllerRevisions(namespace).Watch(context.TODO(), options) }, }, &appsv1beta2.ControllerRevision{}, diff --git a/vendor/k8s.io/client-go/informers/apps/v1beta2/daemonset.go b/vendor/k8s.io/client-go/informers/apps/v1beta2/daemonset.go index 99f17fa6c4..280e2fe465 100644 --- a/vendor/k8s.io/client-go/informers/apps/v1beta2/daemonset.go +++ b/vendor/k8s.io/client-go/informers/apps/v1beta2/daemonset.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta2 import ( + "context" time "time" appsv1beta2 "k8s.io/api/apps/v1beta2" @@ -61,13 +62,13 @@ func NewFilteredDaemonSetInformer(client kubernetes.Interface, namespace string, if tweakListOptions != nil { tweakListOptions(&options) } - return client.AppsV1beta2().DaemonSets(namespace).List(options) + return client.AppsV1beta2().DaemonSets(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.AppsV1beta2().DaemonSets(namespace).Watch(options) + return client.AppsV1beta2().DaemonSets(namespace).Watch(context.TODO(), options) }, }, &appsv1beta2.DaemonSet{}, diff --git a/vendor/k8s.io/client-go/informers/apps/v1beta2/deployment.go b/vendor/k8s.io/client-go/informers/apps/v1beta2/deployment.go index b25da82bde..67bdb79720 100644 --- a/vendor/k8s.io/client-go/informers/apps/v1beta2/deployment.go +++ b/vendor/k8s.io/client-go/informers/apps/v1beta2/deployment.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta2 import ( + "context" time "time" appsv1beta2 "k8s.io/api/apps/v1beta2" @@ -61,13 +62,13 @@ func NewFilteredDeploymentInformer(client kubernetes.Interface, namespace string if tweakListOptions != nil { tweakListOptions(&options) } - return client.AppsV1beta2().Deployments(namespace).List(options) + return client.AppsV1beta2().Deployments(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.AppsV1beta2().Deployments(namespace).Watch(options) + return client.AppsV1beta2().Deployments(namespace).Watch(context.TODO(), options) }, }, &appsv1beta2.Deployment{}, diff --git a/vendor/k8s.io/client-go/informers/apps/v1beta2/replicaset.go b/vendor/k8s.io/client-go/informers/apps/v1beta2/replicaset.go index 6ce7fcfd0d..85d12bb65d 100644 --- a/vendor/k8s.io/client-go/informers/apps/v1beta2/replicaset.go +++ b/vendor/k8s.io/client-go/informers/apps/v1beta2/replicaset.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta2 import ( + "context" time "time" appsv1beta2 "k8s.io/api/apps/v1beta2" @@ -61,13 +62,13 @@ func NewFilteredReplicaSetInformer(client kubernetes.Interface, namespace string if tweakListOptions != nil { tweakListOptions(&options) } - return client.AppsV1beta2().ReplicaSets(namespace).List(options) + return client.AppsV1beta2().ReplicaSets(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.AppsV1beta2().ReplicaSets(namespace).Watch(options) + return client.AppsV1beta2().ReplicaSets(namespace).Watch(context.TODO(), options) }, }, &appsv1beta2.ReplicaSet{}, diff --git a/vendor/k8s.io/client-go/informers/apps/v1beta2/statefulset.go b/vendor/k8s.io/client-go/informers/apps/v1beta2/statefulset.go index e77bb2f8fd..2fab6f7b2b 100644 --- a/vendor/k8s.io/client-go/informers/apps/v1beta2/statefulset.go +++ b/vendor/k8s.io/client-go/informers/apps/v1beta2/statefulset.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta2 import ( + "context" time "time" appsv1beta2 "k8s.io/api/apps/v1beta2" @@ -61,13 +62,13 @@ func NewFilteredStatefulSetInformer(client kubernetes.Interface, namespace strin if tweakListOptions != nil { tweakListOptions(&options) } - return client.AppsV1beta2().StatefulSets(namespace).List(options) + return client.AppsV1beta2().StatefulSets(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.AppsV1beta2().StatefulSets(namespace).Watch(options) + return client.AppsV1beta2().StatefulSets(namespace).Watch(context.TODO(), options) }, }, &appsv1beta2.StatefulSet{}, diff --git a/vendor/k8s.io/client-go/informers/auditregistration/v1alpha1/auditsink.go b/vendor/k8s.io/client-go/informers/auditregistration/v1alpha1/auditsink.go index 69778ad2cf..ef178c3aa8 100644 --- a/vendor/k8s.io/client-go/informers/auditregistration/v1alpha1/auditsink.go +++ b/vendor/k8s.io/client-go/informers/auditregistration/v1alpha1/auditsink.go @@ -19,6 +19,7 @@ limitations under the License. package v1alpha1 import ( + "context" time "time" auditregistrationv1alpha1 "k8s.io/api/auditregistration/v1alpha1" @@ -60,13 +61,13 @@ func NewFilteredAuditSinkInformer(client kubernetes.Interface, resyncPeriod time if tweakListOptions != nil { tweakListOptions(&options) } - return client.AuditregistrationV1alpha1().AuditSinks().List(options) + return client.AuditregistrationV1alpha1().AuditSinks().List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.AuditregistrationV1alpha1().AuditSinks().Watch(options) + return client.AuditregistrationV1alpha1().AuditSinks().Watch(context.TODO(), options) }, }, &auditregistrationv1alpha1.AuditSink{}, diff --git a/vendor/k8s.io/client-go/informers/autoscaling/v1/horizontalpodautoscaler.go b/vendor/k8s.io/client-go/informers/autoscaling/v1/horizontalpodautoscaler.go index 205e4ecd79..44f041e906 100644 --- a/vendor/k8s.io/client-go/informers/autoscaling/v1/horizontalpodautoscaler.go +++ b/vendor/k8s.io/client-go/informers/autoscaling/v1/horizontalpodautoscaler.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" time "time" autoscalingv1 "k8s.io/api/autoscaling/v1" @@ -61,13 +62,13 @@ func NewFilteredHorizontalPodAutoscalerInformer(client kubernetes.Interface, nam if tweakListOptions != nil { tweakListOptions(&options) } - return client.AutoscalingV1().HorizontalPodAutoscalers(namespace).List(options) + return client.AutoscalingV1().HorizontalPodAutoscalers(namespace).List(context.TODO(), options) }, WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.AutoscalingV1().HorizontalPodAutoscalers(namespace).Watch(options) + return client.AutoscalingV1().HorizontalPodAutoscalers(namespace).Watch(context.TODO(), options) }, }, &autoscalingv1.HorizontalPodAutoscaler{}, diff --git a/vendor/k8s.io/client-go/informers/autoscaling/v2beta1/horizontalpodautoscaler.go b/vendor/k8s.io/client-go/informers/autoscaling/v2beta1/horizontalpodautoscaler.go index 4627c5a0b5..6385a2a190 100644 --- a/vendor/k8s.io/client-go/informers/autoscaling/v2beta1/horizontalpodautoscaler.go +++ b/vendor/k8s.io/client-go/informers/autoscaling/v2beta1/horizontalpodautoscaler.go @@ -19,6 +19,7 @@ limitations under the License. package v2beta1 import ( + "context" time "time" autoscalingv2beta1 "k8s.io/api/autoscaling/v2beta1" @@ -61,13 +62,13 @@ func NewFilteredHorizontalPodAutoscalerInformer(client kubernetes.Interface, nam if tweakListOptions != nil { tweakListOptions(&options) } - return client.AutoscalingV2beta1().HorizontalPodAutoscalers(namespace).List(options) + return client.AutoscalingV2beta1().HorizontalPodAutoscalers(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.AutoscalingV2beta1().HorizontalPodAutoscalers(namespace).Watch(options) + return client.AutoscalingV2beta1().HorizontalPodAutoscalers(namespace).Watch(context.TODO(), options) }, }, &autoscalingv2beta1.HorizontalPodAutoscaler{}, diff --git a/vendor/k8s.io/client-go/informers/autoscaling/v2beta2/horizontalpodautoscaler.go b/vendor/k8s.io/client-go/informers/autoscaling/v2beta2/horizontalpodautoscaler.go index b4863f9b74..f1ac3f0737 100644 --- a/vendor/k8s.io/client-go/informers/autoscaling/v2beta2/horizontalpodautoscaler.go +++ b/vendor/k8s.io/client-go/informers/autoscaling/v2beta2/horizontalpodautoscaler.go @@ -19,6 +19,7 @@ limitations under the License. package v2beta2 import ( + "context" time "time" autoscalingv2beta2 "k8s.io/api/autoscaling/v2beta2" @@ -61,13 +62,13 @@ func NewFilteredHorizontalPodAutoscalerInformer(client kubernetes.Interface, nam if tweakListOptions != nil { tweakListOptions(&options) } - return client.AutoscalingV2beta2().HorizontalPodAutoscalers(namespace).List(options) + return client.AutoscalingV2beta2().HorizontalPodAutoscalers(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.AutoscalingV2beta2().HorizontalPodAutoscalers(namespace).Watch(options) + return client.AutoscalingV2beta2().HorizontalPodAutoscalers(namespace).Watch(context.TODO(), options) }, }, &autoscalingv2beta2.HorizontalPodAutoscaler{}, diff --git a/vendor/k8s.io/client-go/informers/batch/v1/job.go b/vendor/k8s.io/client-go/informers/batch/v1/job.go index 30d41104ad..4992f52286 100644 --- a/vendor/k8s.io/client-go/informers/batch/v1/job.go +++ b/vendor/k8s.io/client-go/informers/batch/v1/job.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" time "time" batchv1 "k8s.io/api/batch/v1" @@ -61,13 +62,13 @@ func NewFilteredJobInformer(client kubernetes.Interface, namespace string, resyn if tweakListOptions != nil { tweakListOptions(&options) } - return client.BatchV1().Jobs(namespace).List(options) + return client.BatchV1().Jobs(namespace).List(context.TODO(), options) }, WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.BatchV1().Jobs(namespace).Watch(options) + return client.BatchV1().Jobs(namespace).Watch(context.TODO(), options) }, }, &batchv1.Job{}, diff --git a/vendor/k8s.io/client-go/informers/batch/v1beta1/cronjob.go b/vendor/k8s.io/client-go/informers/batch/v1beta1/cronjob.go index 0b7598e0f8..820c93eaaa 100644 --- a/vendor/k8s.io/client-go/informers/batch/v1beta1/cronjob.go +++ b/vendor/k8s.io/client-go/informers/batch/v1beta1/cronjob.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" time "time" batchv1beta1 "k8s.io/api/batch/v1beta1" @@ -61,13 +62,13 @@ func NewFilteredCronJobInformer(client kubernetes.Interface, namespace string, r if tweakListOptions != nil { tweakListOptions(&options) } - return client.BatchV1beta1().CronJobs(namespace).List(options) + return client.BatchV1beta1().CronJobs(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.BatchV1beta1().CronJobs(namespace).Watch(options) + return client.BatchV1beta1().CronJobs(namespace).Watch(context.TODO(), options) }, }, &batchv1beta1.CronJob{}, diff --git a/vendor/k8s.io/client-go/informers/batch/v2alpha1/cronjob.go b/vendor/k8s.io/client-go/informers/batch/v2alpha1/cronjob.go index 20cf7d498d..5f5b870d4b 100644 --- a/vendor/k8s.io/client-go/informers/batch/v2alpha1/cronjob.go +++ b/vendor/k8s.io/client-go/informers/batch/v2alpha1/cronjob.go @@ -19,6 +19,7 @@ limitations under the License. package v2alpha1 import ( + "context" time "time" batchv2alpha1 "k8s.io/api/batch/v2alpha1" @@ -61,13 +62,13 @@ func NewFilteredCronJobInformer(client kubernetes.Interface, namespace string, r if tweakListOptions != nil { tweakListOptions(&options) } - return client.BatchV2alpha1().CronJobs(namespace).List(options) + return client.BatchV2alpha1().CronJobs(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.BatchV2alpha1().CronJobs(namespace).Watch(options) + return client.BatchV2alpha1().CronJobs(namespace).Watch(context.TODO(), options) }, }, &batchv2alpha1.CronJob{}, diff --git a/vendor/k8s.io/client-go/informers/certificates/v1beta1/certificatesigningrequest.go b/vendor/k8s.io/client-go/informers/certificates/v1beta1/certificatesigningrequest.go index 6472d20e29..4e167ab8b1 100644 --- a/vendor/k8s.io/client-go/informers/certificates/v1beta1/certificatesigningrequest.go +++ b/vendor/k8s.io/client-go/informers/certificates/v1beta1/certificatesigningrequest.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" time "time" certificatesv1beta1 "k8s.io/api/certificates/v1beta1" @@ -60,13 +61,13 @@ func NewFilteredCertificateSigningRequestInformer(client kubernetes.Interface, r if tweakListOptions != nil { tweakListOptions(&options) } - return client.CertificatesV1beta1().CertificateSigningRequests().List(options) + return client.CertificatesV1beta1().CertificateSigningRequests().List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.CertificatesV1beta1().CertificateSigningRequests().Watch(options) + return client.CertificatesV1beta1().CertificateSigningRequests().Watch(context.TODO(), options) }, }, &certificatesv1beta1.CertificateSigningRequest{}, diff --git a/vendor/k8s.io/client-go/informers/coordination/v1/lease.go b/vendor/k8s.io/client-go/informers/coordination/v1/lease.go index b8a3de471c..e538923a86 100644 --- a/vendor/k8s.io/client-go/informers/coordination/v1/lease.go +++ b/vendor/k8s.io/client-go/informers/coordination/v1/lease.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" time "time" coordinationv1 "k8s.io/api/coordination/v1" @@ -61,13 +62,13 @@ func NewFilteredLeaseInformer(client kubernetes.Interface, namespace string, res if tweakListOptions != nil { tweakListOptions(&options) } - return client.CoordinationV1().Leases(namespace).List(options) + return client.CoordinationV1().Leases(namespace).List(context.TODO(), options) }, WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.CoordinationV1().Leases(namespace).Watch(options) + return client.CoordinationV1().Leases(namespace).Watch(context.TODO(), options) }, }, &coordinationv1.Lease{}, diff --git a/vendor/k8s.io/client-go/informers/coordination/v1beta1/lease.go b/vendor/k8s.io/client-go/informers/coordination/v1beta1/lease.go index bb59be13e1..5a6959c0ba 100644 --- a/vendor/k8s.io/client-go/informers/coordination/v1beta1/lease.go +++ b/vendor/k8s.io/client-go/informers/coordination/v1beta1/lease.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" time "time" coordinationv1beta1 "k8s.io/api/coordination/v1beta1" @@ -61,13 +62,13 @@ func NewFilteredLeaseInformer(client kubernetes.Interface, namespace string, res if tweakListOptions != nil { tweakListOptions(&options) } - return client.CoordinationV1beta1().Leases(namespace).List(options) + return client.CoordinationV1beta1().Leases(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.CoordinationV1beta1().Leases(namespace).Watch(options) + return client.CoordinationV1beta1().Leases(namespace).Watch(context.TODO(), options) }, }, &coordinationv1beta1.Lease{}, diff --git a/vendor/k8s.io/client-go/informers/core/v1/componentstatus.go b/vendor/k8s.io/client-go/informers/core/v1/componentstatus.go index a5ae6fc496..ccdee535bc 100644 --- a/vendor/k8s.io/client-go/informers/core/v1/componentstatus.go +++ b/vendor/k8s.io/client-go/informers/core/v1/componentstatus.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" time "time" corev1 "k8s.io/api/core/v1" @@ -60,13 +61,13 @@ func NewFilteredComponentStatusInformer(client kubernetes.Interface, resyncPerio if tweakListOptions != nil { tweakListOptions(&options) } - return client.CoreV1().ComponentStatuses().List(options) + return client.CoreV1().ComponentStatuses().List(context.TODO(), options) }, WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.CoreV1().ComponentStatuses().Watch(options) + return client.CoreV1().ComponentStatuses().Watch(context.TODO(), options) }, }, &corev1.ComponentStatus{}, diff --git a/vendor/k8s.io/client-go/informers/core/v1/configmap.go b/vendor/k8s.io/client-go/informers/core/v1/configmap.go index 48cb1a48e4..6253581784 100644 --- a/vendor/k8s.io/client-go/informers/core/v1/configmap.go +++ b/vendor/k8s.io/client-go/informers/core/v1/configmap.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" time "time" corev1 "k8s.io/api/core/v1" @@ -61,13 +62,13 @@ func NewFilteredConfigMapInformer(client kubernetes.Interface, namespace string, if tweakListOptions != nil { tweakListOptions(&options) } - return client.CoreV1().ConfigMaps(namespace).List(options) + return client.CoreV1().ConfigMaps(namespace).List(context.TODO(), options) }, WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.CoreV1().ConfigMaps(namespace).Watch(options) + return client.CoreV1().ConfigMaps(namespace).Watch(context.TODO(), options) }, }, &corev1.ConfigMap{}, diff --git a/vendor/k8s.io/client-go/informers/core/v1/endpoints.go b/vendor/k8s.io/client-go/informers/core/v1/endpoints.go index 77fa8cf8a0..cd0f25b7f7 100644 --- a/vendor/k8s.io/client-go/informers/core/v1/endpoints.go +++ b/vendor/k8s.io/client-go/informers/core/v1/endpoints.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" time "time" corev1 "k8s.io/api/core/v1" @@ -61,13 +62,13 @@ func NewFilteredEndpointsInformer(client kubernetes.Interface, namespace string, if tweakListOptions != nil { tweakListOptions(&options) } - return client.CoreV1().Endpoints(namespace).List(options) + return client.CoreV1().Endpoints(namespace).List(context.TODO(), options) }, WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.CoreV1().Endpoints(namespace).Watch(options) + return client.CoreV1().Endpoints(namespace).Watch(context.TODO(), options) }, }, &corev1.Endpoints{}, diff --git a/vendor/k8s.io/client-go/informers/core/v1/event.go b/vendor/k8s.io/client-go/informers/core/v1/event.go index 52f4911c1d..8825e9b7a4 100644 --- a/vendor/k8s.io/client-go/informers/core/v1/event.go +++ b/vendor/k8s.io/client-go/informers/core/v1/event.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" time "time" corev1 "k8s.io/api/core/v1" @@ -61,13 +62,13 @@ func NewFilteredEventInformer(client kubernetes.Interface, namespace string, res if tweakListOptions != nil { tweakListOptions(&options) } - return client.CoreV1().Events(namespace).List(options) + return client.CoreV1().Events(namespace).List(context.TODO(), options) }, WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.CoreV1().Events(namespace).Watch(options) + return client.CoreV1().Events(namespace).Watch(context.TODO(), options) }, }, &corev1.Event{}, diff --git a/vendor/k8s.io/client-go/informers/core/v1/limitrange.go b/vendor/k8s.io/client-go/informers/core/v1/limitrange.go index 7499e1869d..4cbfda1f7a 100644 --- a/vendor/k8s.io/client-go/informers/core/v1/limitrange.go +++ b/vendor/k8s.io/client-go/informers/core/v1/limitrange.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" time "time" corev1 "k8s.io/api/core/v1" @@ -61,13 +62,13 @@ func NewFilteredLimitRangeInformer(client kubernetes.Interface, namespace string if tweakListOptions != nil { tweakListOptions(&options) } - return client.CoreV1().LimitRanges(namespace).List(options) + return client.CoreV1().LimitRanges(namespace).List(context.TODO(), options) }, WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.CoreV1().LimitRanges(namespace).Watch(options) + return client.CoreV1().LimitRanges(namespace).Watch(context.TODO(), options) }, }, &corev1.LimitRange{}, diff --git a/vendor/k8s.io/client-go/informers/core/v1/namespace.go b/vendor/k8s.io/client-go/informers/core/v1/namespace.go index 57a073355a..506f930a7d 100644 --- a/vendor/k8s.io/client-go/informers/core/v1/namespace.go +++ b/vendor/k8s.io/client-go/informers/core/v1/namespace.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" time "time" corev1 "k8s.io/api/core/v1" @@ -60,13 +61,13 @@ func NewFilteredNamespaceInformer(client kubernetes.Interface, resyncPeriod time if tweakListOptions != nil { tweakListOptions(&options) } - return client.CoreV1().Namespaces().List(options) + return client.CoreV1().Namespaces().List(context.TODO(), options) }, WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.CoreV1().Namespaces().Watch(options) + return client.CoreV1().Namespaces().Watch(context.TODO(), options) }, }, &corev1.Namespace{}, diff --git a/vendor/k8s.io/client-go/informers/core/v1/node.go b/vendor/k8s.io/client-go/informers/core/v1/node.go index d9b85f83c2..9939fc2cb6 100644 --- a/vendor/k8s.io/client-go/informers/core/v1/node.go +++ b/vendor/k8s.io/client-go/informers/core/v1/node.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" time "time" corev1 "k8s.io/api/core/v1" @@ -60,13 +61,13 @@ func NewFilteredNodeInformer(client kubernetes.Interface, resyncPeriod time.Dura if tweakListOptions != nil { tweakListOptions(&options) } - return client.CoreV1().Nodes().List(options) + return client.CoreV1().Nodes().List(context.TODO(), options) }, WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.CoreV1().Nodes().Watch(options) + return client.CoreV1().Nodes().Watch(context.TODO(), options) }, }, &corev1.Node{}, diff --git a/vendor/k8s.io/client-go/informers/core/v1/persistentvolume.go b/vendor/k8s.io/client-go/informers/core/v1/persistentvolume.go index a50bcfc663..c82445997c 100644 --- a/vendor/k8s.io/client-go/informers/core/v1/persistentvolume.go +++ b/vendor/k8s.io/client-go/informers/core/v1/persistentvolume.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" time "time" corev1 "k8s.io/api/core/v1" @@ -60,13 +61,13 @@ func NewFilteredPersistentVolumeInformer(client kubernetes.Interface, resyncPeri if tweakListOptions != nil { tweakListOptions(&options) } - return client.CoreV1().PersistentVolumes().List(options) + return client.CoreV1().PersistentVolumes().List(context.TODO(), options) }, WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.CoreV1().PersistentVolumes().Watch(options) + return client.CoreV1().PersistentVolumes().Watch(context.TODO(), options) }, }, &corev1.PersistentVolume{}, diff --git a/vendor/k8s.io/client-go/informers/core/v1/persistentvolumeclaim.go b/vendor/k8s.io/client-go/informers/core/v1/persistentvolumeclaim.go index 3fb5e5f6cc..7a7df1cff8 100644 --- a/vendor/k8s.io/client-go/informers/core/v1/persistentvolumeclaim.go +++ b/vendor/k8s.io/client-go/informers/core/v1/persistentvolumeclaim.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" time "time" corev1 "k8s.io/api/core/v1" @@ -61,13 +62,13 @@ func NewFilteredPersistentVolumeClaimInformer(client kubernetes.Interface, names if tweakListOptions != nil { tweakListOptions(&options) } - return client.CoreV1().PersistentVolumeClaims(namespace).List(options) + return client.CoreV1().PersistentVolumeClaims(namespace).List(context.TODO(), options) }, WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.CoreV1().PersistentVolumeClaims(namespace).Watch(options) + return client.CoreV1().PersistentVolumeClaims(namespace).Watch(context.TODO(), options) }, }, &corev1.PersistentVolumeClaim{}, diff --git a/vendor/k8s.io/client-go/informers/core/v1/pod.go b/vendor/k8s.io/client-go/informers/core/v1/pod.go index 57aadd9458..5c713a9b6f 100644 --- a/vendor/k8s.io/client-go/informers/core/v1/pod.go +++ b/vendor/k8s.io/client-go/informers/core/v1/pod.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" time "time" corev1 "k8s.io/api/core/v1" @@ -61,13 +62,13 @@ func NewFilteredPodInformer(client kubernetes.Interface, namespace string, resyn if tweakListOptions != nil { tweakListOptions(&options) } - return client.CoreV1().Pods(namespace).List(options) + return client.CoreV1().Pods(namespace).List(context.TODO(), options) }, WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.CoreV1().Pods(namespace).Watch(options) + return client.CoreV1().Pods(namespace).Watch(context.TODO(), options) }, }, &corev1.Pod{}, diff --git a/vendor/k8s.io/client-go/informers/core/v1/podtemplate.go b/vendor/k8s.io/client-go/informers/core/v1/podtemplate.go index ff47094fb8..2a16e910db 100644 --- a/vendor/k8s.io/client-go/informers/core/v1/podtemplate.go +++ b/vendor/k8s.io/client-go/informers/core/v1/podtemplate.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" time "time" corev1 "k8s.io/api/core/v1" @@ -61,13 +62,13 @@ func NewFilteredPodTemplateInformer(client kubernetes.Interface, namespace strin if tweakListOptions != nil { tweakListOptions(&options) } - return client.CoreV1().PodTemplates(namespace).List(options) + return client.CoreV1().PodTemplates(namespace).List(context.TODO(), options) }, WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.CoreV1().PodTemplates(namespace).Watch(options) + return client.CoreV1().PodTemplates(namespace).Watch(context.TODO(), options) }, }, &corev1.PodTemplate{}, diff --git a/vendor/k8s.io/client-go/informers/core/v1/replicationcontroller.go b/vendor/k8s.io/client-go/informers/core/v1/replicationcontroller.go index 903fe3fbad..930beb4cd5 100644 --- a/vendor/k8s.io/client-go/informers/core/v1/replicationcontroller.go +++ b/vendor/k8s.io/client-go/informers/core/v1/replicationcontroller.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" time "time" corev1 "k8s.io/api/core/v1" @@ -61,13 +62,13 @@ func NewFilteredReplicationControllerInformer(client kubernetes.Interface, names if tweakListOptions != nil { tweakListOptions(&options) } - return client.CoreV1().ReplicationControllers(namespace).List(options) + return client.CoreV1().ReplicationControllers(namespace).List(context.TODO(), options) }, WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.CoreV1().ReplicationControllers(namespace).Watch(options) + return client.CoreV1().ReplicationControllers(namespace).Watch(context.TODO(), options) }, }, &corev1.ReplicationController{}, diff --git a/vendor/k8s.io/client-go/informers/core/v1/resourcequota.go b/vendor/k8s.io/client-go/informers/core/v1/resourcequota.go index 27ae53ccb4..619262a612 100644 --- a/vendor/k8s.io/client-go/informers/core/v1/resourcequota.go +++ b/vendor/k8s.io/client-go/informers/core/v1/resourcequota.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" time "time" corev1 "k8s.io/api/core/v1" @@ -61,13 +62,13 @@ func NewFilteredResourceQuotaInformer(client kubernetes.Interface, namespace str if tweakListOptions != nil { tweakListOptions(&options) } - return client.CoreV1().ResourceQuotas(namespace).List(options) + return client.CoreV1().ResourceQuotas(namespace).List(context.TODO(), options) }, WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.CoreV1().ResourceQuotas(namespace).Watch(options) + return client.CoreV1().ResourceQuotas(namespace).Watch(context.TODO(), options) }, }, &corev1.ResourceQuota{}, diff --git a/vendor/k8s.io/client-go/informers/core/v1/secret.go b/vendor/k8s.io/client-go/informers/core/v1/secret.go index e13776b2b1..a6be070693 100644 --- a/vendor/k8s.io/client-go/informers/core/v1/secret.go +++ b/vendor/k8s.io/client-go/informers/core/v1/secret.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" time "time" corev1 "k8s.io/api/core/v1" @@ -61,13 +62,13 @@ func NewFilteredSecretInformer(client kubernetes.Interface, namespace string, re if tweakListOptions != nil { tweakListOptions(&options) } - return client.CoreV1().Secrets(namespace).List(options) + return client.CoreV1().Secrets(namespace).List(context.TODO(), options) }, WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.CoreV1().Secrets(namespace).Watch(options) + return client.CoreV1().Secrets(namespace).Watch(context.TODO(), options) }, }, &corev1.Secret{}, diff --git a/vendor/k8s.io/client-go/informers/core/v1/service.go b/vendor/k8s.io/client-go/informers/core/v1/service.go index 1c758668c4..3d9ecc6e95 100644 --- a/vendor/k8s.io/client-go/informers/core/v1/service.go +++ b/vendor/k8s.io/client-go/informers/core/v1/service.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" time "time" corev1 "k8s.io/api/core/v1" @@ -61,13 +62,13 @@ func NewFilteredServiceInformer(client kubernetes.Interface, namespace string, r if tweakListOptions != nil { tweakListOptions(&options) } - return client.CoreV1().Services(namespace).List(options) + return client.CoreV1().Services(namespace).List(context.TODO(), options) }, WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.CoreV1().Services(namespace).Watch(options) + return client.CoreV1().Services(namespace).Watch(context.TODO(), options) }, }, &corev1.Service{}, diff --git a/vendor/k8s.io/client-go/informers/core/v1/serviceaccount.go b/vendor/k8s.io/client-go/informers/core/v1/serviceaccount.go index c701b8f1e6..44371c9fa4 100644 --- a/vendor/k8s.io/client-go/informers/core/v1/serviceaccount.go +++ b/vendor/k8s.io/client-go/informers/core/v1/serviceaccount.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" time "time" corev1 "k8s.io/api/core/v1" @@ -61,13 +62,13 @@ func NewFilteredServiceAccountInformer(client kubernetes.Interface, namespace st if tweakListOptions != nil { tweakListOptions(&options) } - return client.CoreV1().ServiceAccounts(namespace).List(options) + return client.CoreV1().ServiceAccounts(namespace).List(context.TODO(), options) }, WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.CoreV1().ServiceAccounts(namespace).Watch(options) + return client.CoreV1().ServiceAccounts(namespace).Watch(context.TODO(), options) }, }, &corev1.ServiceAccount{}, diff --git a/vendor/k8s.io/client-go/informers/discovery/v1alpha1/endpointslice.go b/vendor/k8s.io/client-go/informers/discovery/v1alpha1/endpointslice.go index a545ce1551..c5e383c0b2 100644 --- a/vendor/k8s.io/client-go/informers/discovery/v1alpha1/endpointslice.go +++ b/vendor/k8s.io/client-go/informers/discovery/v1alpha1/endpointslice.go @@ -19,6 +19,7 @@ limitations under the License. package v1alpha1 import ( + "context" time "time" discoveryv1alpha1 "k8s.io/api/discovery/v1alpha1" @@ -61,13 +62,13 @@ func NewFilteredEndpointSliceInformer(client kubernetes.Interface, namespace str if tweakListOptions != nil { tweakListOptions(&options) } - return client.DiscoveryV1alpha1().EndpointSlices(namespace).List(options) + return client.DiscoveryV1alpha1().EndpointSlices(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.DiscoveryV1alpha1().EndpointSlices(namespace).Watch(options) + return client.DiscoveryV1alpha1().EndpointSlices(namespace).Watch(context.TODO(), options) }, }, &discoveryv1alpha1.EndpointSlice{}, diff --git a/vendor/k8s.io/client-go/informers/discovery/v1beta1/endpointslice.go b/vendor/k8s.io/client-go/informers/discovery/v1beta1/endpointslice.go index f658866c2a..69ae38a91a 100644 --- a/vendor/k8s.io/client-go/informers/discovery/v1beta1/endpointslice.go +++ b/vendor/k8s.io/client-go/informers/discovery/v1beta1/endpointslice.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" time "time" discoveryv1beta1 "k8s.io/api/discovery/v1beta1" @@ -61,13 +62,13 @@ func NewFilteredEndpointSliceInformer(client kubernetes.Interface, namespace str if tweakListOptions != nil { tweakListOptions(&options) } - return client.DiscoveryV1beta1().EndpointSlices(namespace).List(options) + return client.DiscoveryV1beta1().EndpointSlices(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.DiscoveryV1beta1().EndpointSlices(namespace).Watch(options) + return client.DiscoveryV1beta1().EndpointSlices(namespace).Watch(context.TODO(), options) }, }, &discoveryv1beta1.EndpointSlice{}, diff --git a/vendor/k8s.io/client-go/informers/events/v1beta1/event.go b/vendor/k8s.io/client-go/informers/events/v1beta1/event.go index 0ac6fa2827..025f6a5cf3 100644 --- a/vendor/k8s.io/client-go/informers/events/v1beta1/event.go +++ b/vendor/k8s.io/client-go/informers/events/v1beta1/event.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" time "time" eventsv1beta1 "k8s.io/api/events/v1beta1" @@ -61,13 +62,13 @@ func NewFilteredEventInformer(client kubernetes.Interface, namespace string, res if tweakListOptions != nil { tweakListOptions(&options) } - return client.EventsV1beta1().Events(namespace).List(options) + return client.EventsV1beta1().Events(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.EventsV1beta1().Events(namespace).Watch(options) + return client.EventsV1beta1().Events(namespace).Watch(context.TODO(), options) }, }, &eventsv1beta1.Event{}, diff --git a/vendor/k8s.io/client-go/informers/extensions/v1beta1/daemonset.go b/vendor/k8s.io/client-go/informers/extensions/v1beta1/daemonset.go index 80e84eba80..050080a598 100644 --- a/vendor/k8s.io/client-go/informers/extensions/v1beta1/daemonset.go +++ b/vendor/k8s.io/client-go/informers/extensions/v1beta1/daemonset.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" time "time" extensionsv1beta1 "k8s.io/api/extensions/v1beta1" @@ -61,13 +62,13 @@ func NewFilteredDaemonSetInformer(client kubernetes.Interface, namespace string, if tweakListOptions != nil { tweakListOptions(&options) } - return client.ExtensionsV1beta1().DaemonSets(namespace).List(options) + return client.ExtensionsV1beta1().DaemonSets(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.ExtensionsV1beta1().DaemonSets(namespace).Watch(options) + return client.ExtensionsV1beta1().DaemonSets(namespace).Watch(context.TODO(), options) }, }, &extensionsv1beta1.DaemonSet{}, diff --git a/vendor/k8s.io/client-go/informers/extensions/v1beta1/deployment.go b/vendor/k8s.io/client-go/informers/extensions/v1beta1/deployment.go index cef4b8150f..1b16c5cc91 100644 --- a/vendor/k8s.io/client-go/informers/extensions/v1beta1/deployment.go +++ b/vendor/k8s.io/client-go/informers/extensions/v1beta1/deployment.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" time "time" extensionsv1beta1 "k8s.io/api/extensions/v1beta1" @@ -61,13 +62,13 @@ func NewFilteredDeploymentInformer(client kubernetes.Interface, namespace string if tweakListOptions != nil { tweakListOptions(&options) } - return client.ExtensionsV1beta1().Deployments(namespace).List(options) + return client.ExtensionsV1beta1().Deployments(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.ExtensionsV1beta1().Deployments(namespace).Watch(options) + return client.ExtensionsV1beta1().Deployments(namespace).Watch(context.TODO(), options) }, }, &extensionsv1beta1.Deployment{}, diff --git a/vendor/k8s.io/client-go/informers/extensions/v1beta1/ingress.go b/vendor/k8s.io/client-go/informers/extensions/v1beta1/ingress.go index 72a88f3138..f01a887617 100644 --- a/vendor/k8s.io/client-go/informers/extensions/v1beta1/ingress.go +++ b/vendor/k8s.io/client-go/informers/extensions/v1beta1/ingress.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" time "time" extensionsv1beta1 "k8s.io/api/extensions/v1beta1" @@ -61,13 +62,13 @@ func NewFilteredIngressInformer(client kubernetes.Interface, namespace string, r if tweakListOptions != nil { tweakListOptions(&options) } - return client.ExtensionsV1beta1().Ingresses(namespace).List(options) + return client.ExtensionsV1beta1().Ingresses(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.ExtensionsV1beta1().Ingresses(namespace).Watch(options) + return client.ExtensionsV1beta1().Ingresses(namespace).Watch(context.TODO(), options) }, }, &extensionsv1beta1.Ingress{}, diff --git a/vendor/k8s.io/client-go/informers/extensions/v1beta1/networkpolicy.go b/vendor/k8s.io/client-go/informers/extensions/v1beta1/networkpolicy.go index 92f4f04007..4a924619fb 100644 --- a/vendor/k8s.io/client-go/informers/extensions/v1beta1/networkpolicy.go +++ b/vendor/k8s.io/client-go/informers/extensions/v1beta1/networkpolicy.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" time "time" extensionsv1beta1 "k8s.io/api/extensions/v1beta1" @@ -61,13 +62,13 @@ func NewFilteredNetworkPolicyInformer(client kubernetes.Interface, namespace str if tweakListOptions != nil { tweakListOptions(&options) } - return client.ExtensionsV1beta1().NetworkPolicies(namespace).List(options) + return client.ExtensionsV1beta1().NetworkPolicies(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.ExtensionsV1beta1().NetworkPolicies(namespace).Watch(options) + return client.ExtensionsV1beta1().NetworkPolicies(namespace).Watch(context.TODO(), options) }, }, &extensionsv1beta1.NetworkPolicy{}, diff --git a/vendor/k8s.io/client-go/informers/extensions/v1beta1/podsecuritypolicy.go b/vendor/k8s.io/client-go/informers/extensions/v1beta1/podsecuritypolicy.go index 6f91e54582..11be2751cc 100644 --- a/vendor/k8s.io/client-go/informers/extensions/v1beta1/podsecuritypolicy.go +++ b/vendor/k8s.io/client-go/informers/extensions/v1beta1/podsecuritypolicy.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" time "time" extensionsv1beta1 "k8s.io/api/extensions/v1beta1" @@ -60,13 +61,13 @@ func NewFilteredPodSecurityPolicyInformer(client kubernetes.Interface, resyncPer if tweakListOptions != nil { tweakListOptions(&options) } - return client.ExtensionsV1beta1().PodSecurityPolicies().List(options) + return client.ExtensionsV1beta1().PodSecurityPolicies().List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.ExtensionsV1beta1().PodSecurityPolicies().Watch(options) + return client.ExtensionsV1beta1().PodSecurityPolicies().Watch(context.TODO(), options) }, }, &extensionsv1beta1.PodSecurityPolicy{}, diff --git a/vendor/k8s.io/client-go/informers/extensions/v1beta1/replicaset.go b/vendor/k8s.io/client-go/informers/extensions/v1beta1/replicaset.go index e8847aa2cf..f7e224bcfb 100644 --- a/vendor/k8s.io/client-go/informers/extensions/v1beta1/replicaset.go +++ b/vendor/k8s.io/client-go/informers/extensions/v1beta1/replicaset.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" time "time" extensionsv1beta1 "k8s.io/api/extensions/v1beta1" @@ -61,13 +62,13 @@ func NewFilteredReplicaSetInformer(client kubernetes.Interface, namespace string if tweakListOptions != nil { tweakListOptions(&options) } - return client.ExtensionsV1beta1().ReplicaSets(namespace).List(options) + return client.ExtensionsV1beta1().ReplicaSets(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.ExtensionsV1beta1().ReplicaSets(namespace).Watch(options) + return client.ExtensionsV1beta1().ReplicaSets(namespace).Watch(context.TODO(), options) }, }, &extensionsv1beta1.ReplicaSet{}, diff --git a/vendor/k8s.io/client-go/informers/flowcontrol/v1alpha1/flowschema.go b/vendor/k8s.io/client-go/informers/flowcontrol/v1alpha1/flowschema.go index af1d874c72..9a4a904481 100644 --- a/vendor/k8s.io/client-go/informers/flowcontrol/v1alpha1/flowschema.go +++ b/vendor/k8s.io/client-go/informers/flowcontrol/v1alpha1/flowschema.go @@ -19,6 +19,7 @@ limitations under the License. package v1alpha1 import ( + "context" time "time" flowcontrolv1alpha1 "k8s.io/api/flowcontrol/v1alpha1" @@ -60,13 +61,13 @@ func NewFilteredFlowSchemaInformer(client kubernetes.Interface, resyncPeriod tim if tweakListOptions != nil { tweakListOptions(&options) } - return client.FlowcontrolV1alpha1().FlowSchemas().List(options) + return client.FlowcontrolV1alpha1().FlowSchemas().List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.FlowcontrolV1alpha1().FlowSchemas().Watch(options) + return client.FlowcontrolV1alpha1().FlowSchemas().Watch(context.TODO(), options) }, }, &flowcontrolv1alpha1.FlowSchema{}, diff --git a/vendor/k8s.io/client-go/informers/flowcontrol/v1alpha1/prioritylevelconfiguration.go b/vendor/k8s.io/client-go/informers/flowcontrol/v1alpha1/prioritylevelconfiguration.go index c145b7d411..b81f5c9c36 100644 --- a/vendor/k8s.io/client-go/informers/flowcontrol/v1alpha1/prioritylevelconfiguration.go +++ b/vendor/k8s.io/client-go/informers/flowcontrol/v1alpha1/prioritylevelconfiguration.go @@ -19,6 +19,7 @@ limitations under the License. package v1alpha1 import ( + "context" time "time" flowcontrolv1alpha1 "k8s.io/api/flowcontrol/v1alpha1" @@ -60,13 +61,13 @@ func NewFilteredPriorityLevelConfigurationInformer(client kubernetes.Interface, if tweakListOptions != nil { tweakListOptions(&options) } - return client.FlowcontrolV1alpha1().PriorityLevelConfigurations().List(options) + return client.FlowcontrolV1alpha1().PriorityLevelConfigurations().List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.FlowcontrolV1alpha1().PriorityLevelConfigurations().Watch(options) + return client.FlowcontrolV1alpha1().PriorityLevelConfigurations().Watch(context.TODO(), options) }, }, &flowcontrolv1alpha1.PriorityLevelConfiguration{}, diff --git a/vendor/k8s.io/client-go/informers/generic.go b/vendor/k8s.io/client-go/informers/generic.go index 8e6df2461a..5bc555da65 100644 --- a/vendor/k8s.io/client-go/informers/generic.go +++ b/vendor/k8s.io/client-go/informers/generic.go @@ -244,6 +244,8 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource // Group=networking.k8s.io, Version=v1beta1 case networkingv1beta1.SchemeGroupVersion.WithResource("ingresses"): return &genericInformer{resource: resource.GroupResource(), informer: f.Networking().V1beta1().Ingresses().Informer()}, nil + case networkingv1beta1.SchemeGroupVersion.WithResource("ingressclasses"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Networking().V1beta1().IngressClasses().Informer()}, nil // Group=node.k8s.io, Version=v1alpha1 case nodev1alpha1.SchemeGroupVersion.WithResource("runtimeclasses"): @@ -306,6 +308,8 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource return &genericInformer{resource: resource.GroupResource(), informer: f.Settings().V1alpha1().PodPresets().Informer()}, nil // Group=storage.k8s.io, Version=v1 + case storagev1.SchemeGroupVersion.WithResource("csidrivers"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Storage().V1().CSIDrivers().Informer()}, nil case storagev1.SchemeGroupVersion.WithResource("csinodes"): return &genericInformer{resource: resource.GroupResource(), informer: f.Storage().V1().CSINodes().Informer()}, nil case storagev1.SchemeGroupVersion.WithResource("storageclasses"): diff --git a/vendor/k8s.io/client-go/informers/networking/v1/networkpolicy.go b/vendor/k8s.io/client-go/informers/networking/v1/networkpolicy.go index c2255c0dfd..a75c9ac21f 100644 --- a/vendor/k8s.io/client-go/informers/networking/v1/networkpolicy.go +++ b/vendor/k8s.io/client-go/informers/networking/v1/networkpolicy.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" time "time" networkingv1 "k8s.io/api/networking/v1" @@ -61,13 +62,13 @@ func NewFilteredNetworkPolicyInformer(client kubernetes.Interface, namespace str if tweakListOptions != nil { tweakListOptions(&options) } - return client.NetworkingV1().NetworkPolicies(namespace).List(options) + return client.NetworkingV1().NetworkPolicies(namespace).List(context.TODO(), options) }, WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.NetworkingV1().NetworkPolicies(namespace).Watch(options) + return client.NetworkingV1().NetworkPolicies(namespace).Watch(context.TODO(), options) }, }, &networkingv1.NetworkPolicy{}, diff --git a/vendor/k8s.io/client-go/informers/networking/v1beta1/ingress.go b/vendor/k8s.io/client-go/informers/networking/v1beta1/ingress.go index 8abd00e17b..8800d6c9cd 100644 --- a/vendor/k8s.io/client-go/informers/networking/v1beta1/ingress.go +++ b/vendor/k8s.io/client-go/informers/networking/v1beta1/ingress.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" time "time" networkingv1beta1 "k8s.io/api/networking/v1beta1" @@ -61,13 +62,13 @@ func NewFilteredIngressInformer(client kubernetes.Interface, namespace string, r if tweakListOptions != nil { tweakListOptions(&options) } - return client.NetworkingV1beta1().Ingresses(namespace).List(options) + return client.NetworkingV1beta1().Ingresses(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.NetworkingV1beta1().Ingresses(namespace).Watch(options) + return client.NetworkingV1beta1().Ingresses(namespace).Watch(context.TODO(), options) }, }, &networkingv1beta1.Ingress{}, diff --git a/vendor/k8s.io/client-go/informers/networking/v1beta1/ingressclass.go b/vendor/k8s.io/client-go/informers/networking/v1beta1/ingressclass.go new file mode 100644 index 0000000000..17864299bc --- /dev/null +++ b/vendor/k8s.io/client-go/informers/networking/v1beta1/ingressclass.go @@ -0,0 +1,89 @@ +/* +Copyright The Kubernetes 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 v1beta1 + +import ( + "context" + time "time" + + networkingv1beta1 "k8s.io/api/networking/v1beta1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + watch "k8s.io/apimachinery/pkg/watch" + internalinterfaces "k8s.io/client-go/informers/internalinterfaces" + kubernetes "k8s.io/client-go/kubernetes" + v1beta1 "k8s.io/client-go/listers/networking/v1beta1" + cache "k8s.io/client-go/tools/cache" +) + +// IngressClassInformer provides access to a shared informer and lister for +// IngressClasses. +type IngressClassInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1beta1.IngressClassLister +} + +type ingressClassInformer struct { + factory internalinterfaces.SharedInformerFactory + tweakListOptions internalinterfaces.TweakListOptionsFunc +} + +// NewIngressClassInformer constructs a new informer for IngressClass 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 NewIngressClassInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { + return NewFilteredIngressClassInformer(client, resyncPeriod, indexers, nil) +} + +// NewFilteredIngressClassInformer constructs a new informer for IngressClass 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 NewFilteredIngressClassInformer(client kubernetes.Interface, 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.NetworkingV1beta1().IngressClasses().List(context.TODO(), options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.NetworkingV1beta1().IngressClasses().Watch(context.TODO(), options) + }, + }, + &networkingv1beta1.IngressClass{}, + resyncPeriod, + indexers, + ) +} + +func (f *ingressClassInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewFilteredIngressClassInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) +} + +func (f *ingressClassInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&networkingv1beta1.IngressClass{}, f.defaultInformer) +} + +func (f *ingressClassInformer) Lister() v1beta1.IngressClassLister { + return v1beta1.NewIngressClassLister(f.Informer().GetIndexer()) +} diff --git a/vendor/k8s.io/client-go/informers/networking/v1beta1/interface.go b/vendor/k8s.io/client-go/informers/networking/v1beta1/interface.go index ab170dfc86..2dcc3129a5 100644 --- a/vendor/k8s.io/client-go/informers/networking/v1beta1/interface.go +++ b/vendor/k8s.io/client-go/informers/networking/v1beta1/interface.go @@ -26,6 +26,8 @@ import ( type Interface interface { // Ingresses returns a IngressInformer. Ingresses() IngressInformer + // IngressClasses returns a IngressClassInformer. + IngressClasses() IngressClassInformer } type version struct { @@ -43,3 +45,8 @@ func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakList func (v *version) Ingresses() IngressInformer { return &ingressInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} } + +// IngressClasses returns a IngressClassInformer. +func (v *version) IngressClasses() IngressClassInformer { + return &ingressClassInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} +} diff --git a/vendor/k8s.io/client-go/informers/node/v1alpha1/runtimeclass.go b/vendor/k8s.io/client-go/informers/node/v1alpha1/runtimeclass.go index 31edf930ae..d314a9573c 100644 --- a/vendor/k8s.io/client-go/informers/node/v1alpha1/runtimeclass.go +++ b/vendor/k8s.io/client-go/informers/node/v1alpha1/runtimeclass.go @@ -19,6 +19,7 @@ limitations under the License. package v1alpha1 import ( + "context" time "time" nodev1alpha1 "k8s.io/api/node/v1alpha1" @@ -60,13 +61,13 @@ func NewFilteredRuntimeClassInformer(client kubernetes.Interface, resyncPeriod t if tweakListOptions != nil { tweakListOptions(&options) } - return client.NodeV1alpha1().RuntimeClasses().List(options) + return client.NodeV1alpha1().RuntimeClasses().List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.NodeV1alpha1().RuntimeClasses().Watch(options) + return client.NodeV1alpha1().RuntimeClasses().Watch(context.TODO(), options) }, }, &nodev1alpha1.RuntimeClass{}, diff --git a/vendor/k8s.io/client-go/informers/node/v1beta1/runtimeclass.go b/vendor/k8s.io/client-go/informers/node/v1beta1/runtimeclass.go index 6972993ad8..07619b2306 100644 --- a/vendor/k8s.io/client-go/informers/node/v1beta1/runtimeclass.go +++ b/vendor/k8s.io/client-go/informers/node/v1beta1/runtimeclass.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" time "time" nodev1beta1 "k8s.io/api/node/v1beta1" @@ -60,13 +61,13 @@ func NewFilteredRuntimeClassInformer(client kubernetes.Interface, resyncPeriod t if tweakListOptions != nil { tweakListOptions(&options) } - return client.NodeV1beta1().RuntimeClasses().List(options) + return client.NodeV1beta1().RuntimeClasses().List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.NodeV1beta1().RuntimeClasses().Watch(options) + return client.NodeV1beta1().RuntimeClasses().Watch(context.TODO(), options) }, }, &nodev1beta1.RuntimeClass{}, diff --git a/vendor/k8s.io/client-go/informers/policy/v1beta1/poddisruptionbudget.go b/vendor/k8s.io/client-go/informers/policy/v1beta1/poddisruptionbudget.go index dce61f7f18..4530343ecc 100644 --- a/vendor/k8s.io/client-go/informers/policy/v1beta1/poddisruptionbudget.go +++ b/vendor/k8s.io/client-go/informers/policy/v1beta1/poddisruptionbudget.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" time "time" policyv1beta1 "k8s.io/api/policy/v1beta1" @@ -61,13 +62,13 @@ func NewFilteredPodDisruptionBudgetInformer(client kubernetes.Interface, namespa if tweakListOptions != nil { tweakListOptions(&options) } - return client.PolicyV1beta1().PodDisruptionBudgets(namespace).List(options) + return client.PolicyV1beta1().PodDisruptionBudgets(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.PolicyV1beta1().PodDisruptionBudgets(namespace).Watch(options) + return client.PolicyV1beta1().PodDisruptionBudgets(namespace).Watch(context.TODO(), options) }, }, &policyv1beta1.PodDisruptionBudget{}, diff --git a/vendor/k8s.io/client-go/informers/policy/v1beta1/podsecuritypolicy.go b/vendor/k8s.io/client-go/informers/policy/v1beta1/podsecuritypolicy.go index 7ce5684fb0..b87d23434e 100644 --- a/vendor/k8s.io/client-go/informers/policy/v1beta1/podsecuritypolicy.go +++ b/vendor/k8s.io/client-go/informers/policy/v1beta1/podsecuritypolicy.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" time "time" policyv1beta1 "k8s.io/api/policy/v1beta1" @@ -60,13 +61,13 @@ func NewFilteredPodSecurityPolicyInformer(client kubernetes.Interface, resyncPer if tweakListOptions != nil { tweakListOptions(&options) } - return client.PolicyV1beta1().PodSecurityPolicies().List(options) + return client.PolicyV1beta1().PodSecurityPolicies().List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.PolicyV1beta1().PodSecurityPolicies().Watch(options) + return client.PolicyV1beta1().PodSecurityPolicies().Watch(context.TODO(), options) }, }, &policyv1beta1.PodSecurityPolicy{}, diff --git a/vendor/k8s.io/client-go/informers/rbac/v1/clusterrole.go b/vendor/k8s.io/client-go/informers/rbac/v1/clusterrole.go index b8096e6bca..0572be264b 100644 --- a/vendor/k8s.io/client-go/informers/rbac/v1/clusterrole.go +++ b/vendor/k8s.io/client-go/informers/rbac/v1/clusterrole.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" time "time" rbacv1 "k8s.io/api/rbac/v1" @@ -60,13 +61,13 @@ func NewFilteredClusterRoleInformer(client kubernetes.Interface, resyncPeriod ti if tweakListOptions != nil { tweakListOptions(&options) } - return client.RbacV1().ClusterRoles().List(options) + return client.RbacV1().ClusterRoles().List(context.TODO(), options) }, WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.RbacV1().ClusterRoles().Watch(options) + return client.RbacV1().ClusterRoles().Watch(context.TODO(), options) }, }, &rbacv1.ClusterRole{}, diff --git a/vendor/k8s.io/client-go/informers/rbac/v1/clusterrolebinding.go b/vendor/k8s.io/client-go/informers/rbac/v1/clusterrolebinding.go index 5ef3407c4c..51026c0558 100644 --- a/vendor/k8s.io/client-go/informers/rbac/v1/clusterrolebinding.go +++ b/vendor/k8s.io/client-go/informers/rbac/v1/clusterrolebinding.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" time "time" rbacv1 "k8s.io/api/rbac/v1" @@ -60,13 +61,13 @@ func NewFilteredClusterRoleBindingInformer(client kubernetes.Interface, resyncPe if tweakListOptions != nil { tweakListOptions(&options) } - return client.RbacV1().ClusterRoleBindings().List(options) + return client.RbacV1().ClusterRoleBindings().List(context.TODO(), options) }, WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.RbacV1().ClusterRoleBindings().Watch(options) + return client.RbacV1().ClusterRoleBindings().Watch(context.TODO(), options) }, }, &rbacv1.ClusterRoleBinding{}, diff --git a/vendor/k8s.io/client-go/informers/rbac/v1/role.go b/vendor/k8s.io/client-go/informers/rbac/v1/role.go index 2d98874e5d..986a5f29f4 100644 --- a/vendor/k8s.io/client-go/informers/rbac/v1/role.go +++ b/vendor/k8s.io/client-go/informers/rbac/v1/role.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" time "time" rbacv1 "k8s.io/api/rbac/v1" @@ -61,13 +62,13 @@ func NewFilteredRoleInformer(client kubernetes.Interface, namespace string, resy if tweakListOptions != nil { tweakListOptions(&options) } - return client.RbacV1().Roles(namespace).List(options) + return client.RbacV1().Roles(namespace).List(context.TODO(), options) }, WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.RbacV1().Roles(namespace).Watch(options) + return client.RbacV1().Roles(namespace).Watch(context.TODO(), options) }, }, &rbacv1.Role{}, diff --git a/vendor/k8s.io/client-go/informers/rbac/v1/rolebinding.go b/vendor/k8s.io/client-go/informers/rbac/v1/rolebinding.go index a97107de1a..0264049fb0 100644 --- a/vendor/k8s.io/client-go/informers/rbac/v1/rolebinding.go +++ b/vendor/k8s.io/client-go/informers/rbac/v1/rolebinding.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" time "time" rbacv1 "k8s.io/api/rbac/v1" @@ -61,13 +62,13 @@ func NewFilteredRoleBindingInformer(client kubernetes.Interface, namespace strin if tweakListOptions != nil { tweakListOptions(&options) } - return client.RbacV1().RoleBindings(namespace).List(options) + return client.RbacV1().RoleBindings(namespace).List(context.TODO(), options) }, WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.RbacV1().RoleBindings(namespace).Watch(options) + return client.RbacV1().RoleBindings(namespace).Watch(context.TODO(), options) }, }, &rbacv1.RoleBinding{}, diff --git a/vendor/k8s.io/client-go/informers/rbac/v1alpha1/clusterrole.go b/vendor/k8s.io/client-go/informers/rbac/v1alpha1/clusterrole.go index 58c9c41259..70d9885f0a 100644 --- a/vendor/k8s.io/client-go/informers/rbac/v1alpha1/clusterrole.go +++ b/vendor/k8s.io/client-go/informers/rbac/v1alpha1/clusterrole.go @@ -19,6 +19,7 @@ limitations under the License. package v1alpha1 import ( + "context" time "time" rbacv1alpha1 "k8s.io/api/rbac/v1alpha1" @@ -60,13 +61,13 @@ func NewFilteredClusterRoleInformer(client kubernetes.Interface, resyncPeriod ti if tweakListOptions != nil { tweakListOptions(&options) } - return client.RbacV1alpha1().ClusterRoles().List(options) + return client.RbacV1alpha1().ClusterRoles().List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.RbacV1alpha1().ClusterRoles().Watch(options) + return client.RbacV1alpha1().ClusterRoles().Watch(context.TODO(), options) }, }, &rbacv1alpha1.ClusterRole{}, diff --git a/vendor/k8s.io/client-go/informers/rbac/v1alpha1/clusterrolebinding.go b/vendor/k8s.io/client-go/informers/rbac/v1alpha1/clusterrolebinding.go index 759c716bf8..8c18f67928 100644 --- a/vendor/k8s.io/client-go/informers/rbac/v1alpha1/clusterrolebinding.go +++ b/vendor/k8s.io/client-go/informers/rbac/v1alpha1/clusterrolebinding.go @@ -19,6 +19,7 @@ limitations under the License. package v1alpha1 import ( + "context" time "time" rbacv1alpha1 "k8s.io/api/rbac/v1alpha1" @@ -60,13 +61,13 @@ func NewFilteredClusterRoleBindingInformer(client kubernetes.Interface, resyncPe if tweakListOptions != nil { tweakListOptions(&options) } - return client.RbacV1alpha1().ClusterRoleBindings().List(options) + return client.RbacV1alpha1().ClusterRoleBindings().List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.RbacV1alpha1().ClusterRoleBindings().Watch(options) + return client.RbacV1alpha1().ClusterRoleBindings().Watch(context.TODO(), options) }, }, &rbacv1alpha1.ClusterRoleBinding{}, diff --git a/vendor/k8s.io/client-go/informers/rbac/v1alpha1/role.go b/vendor/k8s.io/client-go/informers/rbac/v1alpha1/role.go index 1d1f99f064..7dc4551d92 100644 --- a/vendor/k8s.io/client-go/informers/rbac/v1alpha1/role.go +++ b/vendor/k8s.io/client-go/informers/rbac/v1alpha1/role.go @@ -19,6 +19,7 @@ limitations under the License. package v1alpha1 import ( + "context" time "time" rbacv1alpha1 "k8s.io/api/rbac/v1alpha1" @@ -61,13 +62,13 @@ func NewFilteredRoleInformer(client kubernetes.Interface, namespace string, resy if tweakListOptions != nil { tweakListOptions(&options) } - return client.RbacV1alpha1().Roles(namespace).List(options) + return client.RbacV1alpha1().Roles(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.RbacV1alpha1().Roles(namespace).Watch(options) + return client.RbacV1alpha1().Roles(namespace).Watch(context.TODO(), options) }, }, &rbacv1alpha1.Role{}, diff --git a/vendor/k8s.io/client-go/informers/rbac/v1alpha1/rolebinding.go b/vendor/k8s.io/client-go/informers/rbac/v1alpha1/rolebinding.go index 9fcb01d3ab..d49ec8b362 100644 --- a/vendor/k8s.io/client-go/informers/rbac/v1alpha1/rolebinding.go +++ b/vendor/k8s.io/client-go/informers/rbac/v1alpha1/rolebinding.go @@ -19,6 +19,7 @@ limitations under the License. package v1alpha1 import ( + "context" time "time" rbacv1alpha1 "k8s.io/api/rbac/v1alpha1" @@ -61,13 +62,13 @@ func NewFilteredRoleBindingInformer(client kubernetes.Interface, namespace strin if tweakListOptions != nil { tweakListOptions(&options) } - return client.RbacV1alpha1().RoleBindings(namespace).List(options) + return client.RbacV1alpha1().RoleBindings(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.RbacV1alpha1().RoleBindings(namespace).Watch(options) + return client.RbacV1alpha1().RoleBindings(namespace).Watch(context.TODO(), options) }, }, &rbacv1alpha1.RoleBinding{}, diff --git a/vendor/k8s.io/client-go/informers/rbac/v1beta1/clusterrole.go b/vendor/k8s.io/client-go/informers/rbac/v1beta1/clusterrole.go index b82c1c740a..e50e1d3935 100644 --- a/vendor/k8s.io/client-go/informers/rbac/v1beta1/clusterrole.go +++ b/vendor/k8s.io/client-go/informers/rbac/v1beta1/clusterrole.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" time "time" rbacv1beta1 "k8s.io/api/rbac/v1beta1" @@ -60,13 +61,13 @@ func NewFilteredClusterRoleInformer(client kubernetes.Interface, resyncPeriod ti if tweakListOptions != nil { tweakListOptions(&options) } - return client.RbacV1beta1().ClusterRoles().List(options) + return client.RbacV1beta1().ClusterRoles().List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.RbacV1beta1().ClusterRoles().Watch(options) + return client.RbacV1beta1().ClusterRoles().Watch(context.TODO(), options) }, }, &rbacv1beta1.ClusterRole{}, diff --git a/vendor/k8s.io/client-go/informers/rbac/v1beta1/clusterrolebinding.go b/vendor/k8s.io/client-go/informers/rbac/v1beta1/clusterrolebinding.go index d662e7f563..a7ea4cd38d 100644 --- a/vendor/k8s.io/client-go/informers/rbac/v1beta1/clusterrolebinding.go +++ b/vendor/k8s.io/client-go/informers/rbac/v1beta1/clusterrolebinding.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" time "time" rbacv1beta1 "k8s.io/api/rbac/v1beta1" @@ -60,13 +61,13 @@ func NewFilteredClusterRoleBindingInformer(client kubernetes.Interface, resyncPe if tweakListOptions != nil { tweakListOptions(&options) } - return client.RbacV1beta1().ClusterRoleBindings().List(options) + return client.RbacV1beta1().ClusterRoleBindings().List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.RbacV1beta1().ClusterRoleBindings().Watch(options) + return client.RbacV1beta1().ClusterRoleBindings().Watch(context.TODO(), options) }, }, &rbacv1beta1.ClusterRoleBinding{}, diff --git a/vendor/k8s.io/client-go/informers/rbac/v1beta1/role.go b/vendor/k8s.io/client-go/informers/rbac/v1beta1/role.go index b885beb272..e56961e81e 100644 --- a/vendor/k8s.io/client-go/informers/rbac/v1beta1/role.go +++ b/vendor/k8s.io/client-go/informers/rbac/v1beta1/role.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" time "time" rbacv1beta1 "k8s.io/api/rbac/v1beta1" @@ -61,13 +62,13 @@ func NewFilteredRoleInformer(client kubernetes.Interface, namespace string, resy if tweakListOptions != nil { tweakListOptions(&options) } - return client.RbacV1beta1().Roles(namespace).List(options) + return client.RbacV1beta1().Roles(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.RbacV1beta1().Roles(namespace).Watch(options) + return client.RbacV1beta1().Roles(namespace).Watch(context.TODO(), options) }, }, &rbacv1beta1.Role{}, diff --git a/vendor/k8s.io/client-go/informers/rbac/v1beta1/rolebinding.go b/vendor/k8s.io/client-go/informers/rbac/v1beta1/rolebinding.go index 63d9d7264e..d893882db3 100644 --- a/vendor/k8s.io/client-go/informers/rbac/v1beta1/rolebinding.go +++ b/vendor/k8s.io/client-go/informers/rbac/v1beta1/rolebinding.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" time "time" rbacv1beta1 "k8s.io/api/rbac/v1beta1" @@ -61,13 +62,13 @@ func NewFilteredRoleBindingInformer(client kubernetes.Interface, namespace strin if tweakListOptions != nil { tweakListOptions(&options) } - return client.RbacV1beta1().RoleBindings(namespace).List(options) + return client.RbacV1beta1().RoleBindings(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.RbacV1beta1().RoleBindings(namespace).Watch(options) + return client.RbacV1beta1().RoleBindings(namespace).Watch(context.TODO(), options) }, }, &rbacv1beta1.RoleBinding{}, diff --git a/vendor/k8s.io/client-go/informers/scheduling/v1/priorityclass.go b/vendor/k8s.io/client-go/informers/scheduling/v1/priorityclass.go index a9ee6289e4..730616b4a5 100644 --- a/vendor/k8s.io/client-go/informers/scheduling/v1/priorityclass.go +++ b/vendor/k8s.io/client-go/informers/scheduling/v1/priorityclass.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" time "time" schedulingv1 "k8s.io/api/scheduling/v1" @@ -60,13 +61,13 @@ func NewFilteredPriorityClassInformer(client kubernetes.Interface, resyncPeriod if tweakListOptions != nil { tweakListOptions(&options) } - return client.SchedulingV1().PriorityClasses().List(options) + return client.SchedulingV1().PriorityClasses().List(context.TODO(), options) }, WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.SchedulingV1().PriorityClasses().Watch(options) + return client.SchedulingV1().PriorityClasses().Watch(context.TODO(), options) }, }, &schedulingv1.PriorityClass{}, diff --git a/vendor/k8s.io/client-go/informers/scheduling/v1alpha1/priorityclass.go b/vendor/k8s.io/client-go/informers/scheduling/v1alpha1/priorityclass.go index cd90dd7654..f82b664369 100644 --- a/vendor/k8s.io/client-go/informers/scheduling/v1alpha1/priorityclass.go +++ b/vendor/k8s.io/client-go/informers/scheduling/v1alpha1/priorityclass.go @@ -19,6 +19,7 @@ limitations under the License. package v1alpha1 import ( + "context" time "time" schedulingv1alpha1 "k8s.io/api/scheduling/v1alpha1" @@ -60,13 +61,13 @@ func NewFilteredPriorityClassInformer(client kubernetes.Interface, resyncPeriod if tweakListOptions != nil { tweakListOptions(&options) } - return client.SchedulingV1alpha1().PriorityClasses().List(options) + return client.SchedulingV1alpha1().PriorityClasses().List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.SchedulingV1alpha1().PriorityClasses().Watch(options) + return client.SchedulingV1alpha1().PriorityClasses().Watch(context.TODO(), options) }, }, &schedulingv1alpha1.PriorityClass{}, diff --git a/vendor/k8s.io/client-go/informers/scheduling/v1beta1/priorityclass.go b/vendor/k8s.io/client-go/informers/scheduling/v1beta1/priorityclass.go index 3c7d90938f..fc7848891e 100644 --- a/vendor/k8s.io/client-go/informers/scheduling/v1beta1/priorityclass.go +++ b/vendor/k8s.io/client-go/informers/scheduling/v1beta1/priorityclass.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" time "time" schedulingv1beta1 "k8s.io/api/scheduling/v1beta1" @@ -60,13 +61,13 @@ func NewFilteredPriorityClassInformer(client kubernetes.Interface, resyncPeriod if tweakListOptions != nil { tweakListOptions(&options) } - return client.SchedulingV1beta1().PriorityClasses().List(options) + return client.SchedulingV1beta1().PriorityClasses().List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.SchedulingV1beta1().PriorityClasses().Watch(options) + return client.SchedulingV1beta1().PriorityClasses().Watch(context.TODO(), options) }, }, &schedulingv1beta1.PriorityClass{}, diff --git a/vendor/k8s.io/client-go/informers/settings/v1alpha1/podpreset.go b/vendor/k8s.io/client-go/informers/settings/v1alpha1/podpreset.go index 33fcf2359e..8c10b16c85 100644 --- a/vendor/k8s.io/client-go/informers/settings/v1alpha1/podpreset.go +++ b/vendor/k8s.io/client-go/informers/settings/v1alpha1/podpreset.go @@ -19,6 +19,7 @@ limitations under the License. package v1alpha1 import ( + "context" time "time" settingsv1alpha1 "k8s.io/api/settings/v1alpha1" @@ -61,13 +62,13 @@ func NewFilteredPodPresetInformer(client kubernetes.Interface, namespace string, if tweakListOptions != nil { tweakListOptions(&options) } - return client.SettingsV1alpha1().PodPresets(namespace).List(options) + return client.SettingsV1alpha1().PodPresets(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.SettingsV1alpha1().PodPresets(namespace).Watch(options) + return client.SettingsV1alpha1().PodPresets(namespace).Watch(context.TODO(), options) }, }, &settingsv1alpha1.PodPreset{}, diff --git a/vendor/k8s.io/client-go/informers/storage/v1/csidriver.go b/vendor/k8s.io/client-go/informers/storage/v1/csidriver.go new file mode 100644 index 0000000000..6fd1e678d9 --- /dev/null +++ b/vendor/k8s.io/client-go/informers/storage/v1/csidriver.go @@ -0,0 +1,89 @@ +/* +Copyright The Kubernetes 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 v1 + +import ( + "context" + time "time" + + storagev1 "k8s.io/api/storage/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + watch "k8s.io/apimachinery/pkg/watch" + internalinterfaces "k8s.io/client-go/informers/internalinterfaces" + kubernetes "k8s.io/client-go/kubernetes" + v1 "k8s.io/client-go/listers/storage/v1" + cache "k8s.io/client-go/tools/cache" +) + +// CSIDriverInformer provides access to a shared informer and lister for +// CSIDrivers. +type CSIDriverInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1.CSIDriverLister +} + +type cSIDriverInformer struct { + factory internalinterfaces.SharedInformerFactory + tweakListOptions internalinterfaces.TweakListOptionsFunc +} + +// NewCSIDriverInformer constructs a new informer for CSIDriver 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 NewCSIDriverInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { + return NewFilteredCSIDriverInformer(client, resyncPeriod, indexers, nil) +} + +// NewFilteredCSIDriverInformer constructs a new informer for CSIDriver 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 NewFilteredCSIDriverInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { + return cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.StorageV1().CSIDrivers().List(context.TODO(), options) + }, + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.StorageV1().CSIDrivers().Watch(context.TODO(), options) + }, + }, + &storagev1.CSIDriver{}, + resyncPeriod, + indexers, + ) +} + +func (f *cSIDriverInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewFilteredCSIDriverInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) +} + +func (f *cSIDriverInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&storagev1.CSIDriver{}, f.defaultInformer) +} + +func (f *cSIDriverInformer) Lister() v1.CSIDriverLister { + return v1.NewCSIDriverLister(f.Informer().GetIndexer()) +} diff --git a/vendor/k8s.io/client-go/informers/storage/v1/csinode.go b/vendor/k8s.io/client-go/informers/storage/v1/csinode.go index eed947c4a6..96416967fb 100644 --- a/vendor/k8s.io/client-go/informers/storage/v1/csinode.go +++ b/vendor/k8s.io/client-go/informers/storage/v1/csinode.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" time "time" storagev1 "k8s.io/api/storage/v1" @@ -60,13 +61,13 @@ func NewFilteredCSINodeInformer(client kubernetes.Interface, resyncPeriod time.D if tweakListOptions != nil { tweakListOptions(&options) } - return client.StorageV1().CSINodes().List(options) + return client.StorageV1().CSINodes().List(context.TODO(), options) }, WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.StorageV1().CSINodes().Watch(options) + return client.StorageV1().CSINodes().Watch(context.TODO(), options) }, }, &storagev1.CSINode{}, diff --git a/vendor/k8s.io/client-go/informers/storage/v1/interface.go b/vendor/k8s.io/client-go/informers/storage/v1/interface.go index 59f367d339..1577591405 100644 --- a/vendor/k8s.io/client-go/informers/storage/v1/interface.go +++ b/vendor/k8s.io/client-go/informers/storage/v1/interface.go @@ -24,6 +24,8 @@ import ( // Interface provides access to all the informers in this group version. type Interface interface { + // CSIDrivers returns a CSIDriverInformer. + CSIDrivers() CSIDriverInformer // CSINodes returns a CSINodeInformer. CSINodes() CSINodeInformer // StorageClasses returns a StorageClassInformer. @@ -43,6 +45,11 @@ func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakList return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} } +// CSIDrivers returns a CSIDriverInformer. +func (v *version) CSIDrivers() CSIDriverInformer { + return &cSIDriverInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} +} + // CSINodes returns a CSINodeInformer. func (v *version) CSINodes() CSINodeInformer { return &cSINodeInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} diff --git a/vendor/k8s.io/client-go/informers/storage/v1/storageclass.go b/vendor/k8s.io/client-go/informers/storage/v1/storageclass.go index b4609b4d2f..8cde79d9a3 100644 --- a/vendor/k8s.io/client-go/informers/storage/v1/storageclass.go +++ b/vendor/k8s.io/client-go/informers/storage/v1/storageclass.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" time "time" storagev1 "k8s.io/api/storage/v1" @@ -60,13 +61,13 @@ func NewFilteredStorageClassInformer(client kubernetes.Interface, resyncPeriod t if tweakListOptions != nil { tweakListOptions(&options) } - return client.StorageV1().StorageClasses().List(options) + return client.StorageV1().StorageClasses().List(context.TODO(), options) }, WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.StorageV1().StorageClasses().Watch(options) + return client.StorageV1().StorageClasses().Watch(context.TODO(), options) }, }, &storagev1.StorageClass{}, diff --git a/vendor/k8s.io/client-go/informers/storage/v1/volumeattachment.go b/vendor/k8s.io/client-go/informers/storage/v1/volumeattachment.go index 7ca3b86f22..be605ff48c 100644 --- a/vendor/k8s.io/client-go/informers/storage/v1/volumeattachment.go +++ b/vendor/k8s.io/client-go/informers/storage/v1/volumeattachment.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" time "time" storagev1 "k8s.io/api/storage/v1" @@ -60,13 +61,13 @@ func NewFilteredVolumeAttachmentInformer(client kubernetes.Interface, resyncPeri if tweakListOptions != nil { tweakListOptions(&options) } - return client.StorageV1().VolumeAttachments().List(options) + return client.StorageV1().VolumeAttachments().List(context.TODO(), options) }, WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.StorageV1().VolumeAttachments().Watch(options) + return client.StorageV1().VolumeAttachments().Watch(context.TODO(), options) }, }, &storagev1.VolumeAttachment{}, diff --git a/vendor/k8s.io/client-go/informers/storage/v1alpha1/volumeattachment.go b/vendor/k8s.io/client-go/informers/storage/v1alpha1/volumeattachment.go index e169c8a29c..445496dade 100644 --- a/vendor/k8s.io/client-go/informers/storage/v1alpha1/volumeattachment.go +++ b/vendor/k8s.io/client-go/informers/storage/v1alpha1/volumeattachment.go @@ -19,6 +19,7 @@ limitations under the License. package v1alpha1 import ( + "context" time "time" storagev1alpha1 "k8s.io/api/storage/v1alpha1" @@ -60,13 +61,13 @@ func NewFilteredVolumeAttachmentInformer(client kubernetes.Interface, resyncPeri if tweakListOptions != nil { tweakListOptions(&options) } - return client.StorageV1alpha1().VolumeAttachments().List(options) + return client.StorageV1alpha1().VolumeAttachments().List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.StorageV1alpha1().VolumeAttachments().Watch(options) + return client.StorageV1alpha1().VolumeAttachments().Watch(context.TODO(), options) }, }, &storagev1alpha1.VolumeAttachment{}, diff --git a/vendor/k8s.io/client-go/informers/storage/v1beta1/csidriver.go b/vendor/k8s.io/client-go/informers/storage/v1beta1/csidriver.go index 7f7cb216df..f138a915b8 100644 --- a/vendor/k8s.io/client-go/informers/storage/v1beta1/csidriver.go +++ b/vendor/k8s.io/client-go/informers/storage/v1beta1/csidriver.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" time "time" storagev1beta1 "k8s.io/api/storage/v1beta1" @@ -60,13 +61,13 @@ func NewFilteredCSIDriverInformer(client kubernetes.Interface, resyncPeriod time if tweakListOptions != nil { tweakListOptions(&options) } - return client.StorageV1beta1().CSIDrivers().List(options) + return client.StorageV1beta1().CSIDrivers().List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.StorageV1beta1().CSIDrivers().Watch(options) + return client.StorageV1beta1().CSIDrivers().Watch(context.TODO(), options) }, }, &storagev1beta1.CSIDriver{}, diff --git a/vendor/k8s.io/client-go/informers/storage/v1beta1/csinode.go b/vendor/k8s.io/client-go/informers/storage/v1beta1/csinode.go index 218bb11831..6ba63172a3 100644 --- a/vendor/k8s.io/client-go/informers/storage/v1beta1/csinode.go +++ b/vendor/k8s.io/client-go/informers/storage/v1beta1/csinode.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" time "time" storagev1beta1 "k8s.io/api/storage/v1beta1" @@ -60,13 +61,13 @@ func NewFilteredCSINodeInformer(client kubernetes.Interface, resyncPeriod time.D if tweakListOptions != nil { tweakListOptions(&options) } - return client.StorageV1beta1().CSINodes().List(options) + return client.StorageV1beta1().CSINodes().List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.StorageV1beta1().CSINodes().Watch(options) + return client.StorageV1beta1().CSINodes().Watch(context.TODO(), options) }, }, &storagev1beta1.CSINode{}, diff --git a/vendor/k8s.io/client-go/informers/storage/v1beta1/storageclass.go b/vendor/k8s.io/client-go/informers/storage/v1beta1/storageclass.go index ed898a77b8..a6582bf3d6 100644 --- a/vendor/k8s.io/client-go/informers/storage/v1beta1/storageclass.go +++ b/vendor/k8s.io/client-go/informers/storage/v1beta1/storageclass.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" time "time" storagev1beta1 "k8s.io/api/storage/v1beta1" @@ -60,13 +61,13 @@ func NewFilteredStorageClassInformer(client kubernetes.Interface, resyncPeriod t if tweakListOptions != nil { tweakListOptions(&options) } - return client.StorageV1beta1().StorageClasses().List(options) + return client.StorageV1beta1().StorageClasses().List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.StorageV1beta1().StorageClasses().Watch(options) + return client.StorageV1beta1().StorageClasses().Watch(context.TODO(), options) }, }, &storagev1beta1.StorageClass{}, diff --git a/vendor/k8s.io/client-go/informers/storage/v1beta1/volumeattachment.go b/vendor/k8s.io/client-go/informers/storage/v1beta1/volumeattachment.go index c75fc06b15..e894246349 100644 --- a/vendor/k8s.io/client-go/informers/storage/v1beta1/volumeattachment.go +++ b/vendor/k8s.io/client-go/informers/storage/v1beta1/volumeattachment.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" time "time" storagev1beta1 "k8s.io/api/storage/v1beta1" @@ -60,13 +61,13 @@ func NewFilteredVolumeAttachmentInformer(client kubernetes.Interface, resyncPeri if tweakListOptions != nil { tweakListOptions(&options) } - return client.StorageV1beta1().VolumeAttachments().List(options) + return client.StorageV1beta1().VolumeAttachments().List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.StorageV1beta1().VolumeAttachments().Watch(options) + return client.StorageV1beta1().VolumeAttachments().Watch(context.TODO(), options) }, }, &storagev1beta1.VolumeAttachment{}, diff --git a/vendor/k8s.io/client-go/kubernetes/clientset.go b/vendor/k8s.io/client-go/kubernetes/clientset.go index cf98b05002..d76e9ac9b6 100644 --- a/vendor/k8s.io/client-go/kubernetes/clientset.go +++ b/vendor/k8s.io/client-go/kubernetes/clientset.go @@ -371,7 +371,7 @@ func NewForConfig(c *rest.Config) (*Clientset, error) { configShallowCopy := *c if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 { if configShallowCopy.Burst <= 0 { - return nil, fmt.Errorf("Burst is required to be greater than 0 when RateLimiter is not set and QPS is set to greater than 0") + return nil, fmt.Errorf("burst is required to be greater than 0 when RateLimiter is not set and QPS is set to greater than 0") } configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst) } diff --git a/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/fake/fake_mutatingwebhookconfiguration.go b/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/fake/fake_mutatingwebhookconfiguration.go index 6e09faf110..1173846127 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/fake/fake_mutatingwebhookconfiguration.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/fake/fake_mutatingwebhookconfiguration.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + admissionregistrationv1 "k8s.io/api/admissionregistration/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" @@ -38,7 +40,7 @@ var mutatingwebhookconfigurationsResource = schema.GroupVersionResource{Group: " var mutatingwebhookconfigurationsKind = schema.GroupVersionKind{Group: "admissionregistration.k8s.io", Version: "v1", Kind: "MutatingWebhookConfiguration"} // Get takes name of the mutatingWebhookConfiguration, and returns the corresponding mutatingWebhookConfiguration object, and an error if there is any. -func (c *FakeMutatingWebhookConfigurations) Get(name string, options v1.GetOptions) (result *admissionregistrationv1.MutatingWebhookConfiguration, err error) { +func (c *FakeMutatingWebhookConfigurations) Get(ctx context.Context, name string, options v1.GetOptions) (result *admissionregistrationv1.MutatingWebhookConfiguration, err error) { obj, err := c.Fake. Invokes(testing.NewRootGetAction(mutatingwebhookconfigurationsResource, name), &admissionregistrationv1.MutatingWebhookConfiguration{}) if obj == nil { @@ -48,7 +50,7 @@ func (c *FakeMutatingWebhookConfigurations) Get(name string, options v1.GetOptio } // List takes label and field selectors, and returns the list of MutatingWebhookConfigurations that match those selectors. -func (c *FakeMutatingWebhookConfigurations) List(opts v1.ListOptions) (result *admissionregistrationv1.MutatingWebhookConfigurationList, err error) { +func (c *FakeMutatingWebhookConfigurations) List(ctx context.Context, opts v1.ListOptions) (result *admissionregistrationv1.MutatingWebhookConfigurationList, err error) { obj, err := c.Fake. Invokes(testing.NewRootListAction(mutatingwebhookconfigurationsResource, mutatingwebhookconfigurationsKind, opts), &admissionregistrationv1.MutatingWebhookConfigurationList{}) if obj == nil { @@ -69,13 +71,13 @@ func (c *FakeMutatingWebhookConfigurations) List(opts v1.ListOptions) (result *a } // Watch returns a watch.Interface that watches the requested mutatingWebhookConfigurations. -func (c *FakeMutatingWebhookConfigurations) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeMutatingWebhookConfigurations) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewRootWatchAction(mutatingwebhookconfigurationsResource, opts)) } // Create takes the representation of a mutatingWebhookConfiguration and creates it. Returns the server's representation of the mutatingWebhookConfiguration, and an error, if there is any. -func (c *FakeMutatingWebhookConfigurations) Create(mutatingWebhookConfiguration *admissionregistrationv1.MutatingWebhookConfiguration) (result *admissionregistrationv1.MutatingWebhookConfiguration, err error) { +func (c *FakeMutatingWebhookConfigurations) Create(ctx context.Context, mutatingWebhookConfiguration *admissionregistrationv1.MutatingWebhookConfiguration, opts v1.CreateOptions) (result *admissionregistrationv1.MutatingWebhookConfiguration, err error) { obj, err := c.Fake. Invokes(testing.NewRootCreateAction(mutatingwebhookconfigurationsResource, mutatingWebhookConfiguration), &admissionregistrationv1.MutatingWebhookConfiguration{}) if obj == nil { @@ -85,7 +87,7 @@ func (c *FakeMutatingWebhookConfigurations) Create(mutatingWebhookConfiguration } // Update takes the representation of a mutatingWebhookConfiguration and updates it. Returns the server's representation of the mutatingWebhookConfiguration, and an error, if there is any. -func (c *FakeMutatingWebhookConfigurations) Update(mutatingWebhookConfiguration *admissionregistrationv1.MutatingWebhookConfiguration) (result *admissionregistrationv1.MutatingWebhookConfiguration, err error) { +func (c *FakeMutatingWebhookConfigurations) Update(ctx context.Context, mutatingWebhookConfiguration *admissionregistrationv1.MutatingWebhookConfiguration, opts v1.UpdateOptions) (result *admissionregistrationv1.MutatingWebhookConfiguration, err error) { obj, err := c.Fake. Invokes(testing.NewRootUpdateAction(mutatingwebhookconfigurationsResource, mutatingWebhookConfiguration), &admissionregistrationv1.MutatingWebhookConfiguration{}) if obj == nil { @@ -95,22 +97,22 @@ func (c *FakeMutatingWebhookConfigurations) Update(mutatingWebhookConfiguration } // Delete takes name of the mutatingWebhookConfiguration and deletes it. Returns an error if one occurs. -func (c *FakeMutatingWebhookConfigurations) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeMutatingWebhookConfigurations) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewRootDeleteAction(mutatingwebhookconfigurationsResource, name), &admissionregistrationv1.MutatingWebhookConfiguration{}) return err } // DeleteCollection deletes a collection of objects. -func (c *FakeMutatingWebhookConfigurations) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewRootDeleteCollectionAction(mutatingwebhookconfigurationsResource, listOptions) +func (c *FakeMutatingWebhookConfigurations) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(mutatingwebhookconfigurationsResource, listOpts) _, err := c.Fake.Invokes(action, &admissionregistrationv1.MutatingWebhookConfigurationList{}) return err } // Patch applies the patch and returns the patched mutatingWebhookConfiguration. -func (c *FakeMutatingWebhookConfigurations) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *admissionregistrationv1.MutatingWebhookConfiguration, err error) { +func (c *FakeMutatingWebhookConfigurations) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *admissionregistrationv1.MutatingWebhookConfiguration, err error) { obj, err := c.Fake. Invokes(testing.NewRootPatchSubresourceAction(mutatingwebhookconfigurationsResource, name, pt, data, subresources...), &admissionregistrationv1.MutatingWebhookConfiguration{}) if obj == nil { diff --git a/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/fake/fake_validatingwebhookconfiguration.go b/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/fake/fake_validatingwebhookconfiguration.go index a5f8d20456..78b059372c 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/fake/fake_validatingwebhookconfiguration.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/fake/fake_validatingwebhookconfiguration.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + admissionregistrationv1 "k8s.io/api/admissionregistration/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" @@ -38,7 +40,7 @@ var validatingwebhookconfigurationsResource = schema.GroupVersionResource{Group: var validatingwebhookconfigurationsKind = schema.GroupVersionKind{Group: "admissionregistration.k8s.io", Version: "v1", Kind: "ValidatingWebhookConfiguration"} // Get takes name of the validatingWebhookConfiguration, and returns the corresponding validatingWebhookConfiguration object, and an error if there is any. -func (c *FakeValidatingWebhookConfigurations) Get(name string, options v1.GetOptions) (result *admissionregistrationv1.ValidatingWebhookConfiguration, err error) { +func (c *FakeValidatingWebhookConfigurations) Get(ctx context.Context, name string, options v1.GetOptions) (result *admissionregistrationv1.ValidatingWebhookConfiguration, err error) { obj, err := c.Fake. Invokes(testing.NewRootGetAction(validatingwebhookconfigurationsResource, name), &admissionregistrationv1.ValidatingWebhookConfiguration{}) if obj == nil { @@ -48,7 +50,7 @@ func (c *FakeValidatingWebhookConfigurations) Get(name string, options v1.GetOpt } // List takes label and field selectors, and returns the list of ValidatingWebhookConfigurations that match those selectors. -func (c *FakeValidatingWebhookConfigurations) List(opts v1.ListOptions) (result *admissionregistrationv1.ValidatingWebhookConfigurationList, err error) { +func (c *FakeValidatingWebhookConfigurations) List(ctx context.Context, opts v1.ListOptions) (result *admissionregistrationv1.ValidatingWebhookConfigurationList, err error) { obj, err := c.Fake. Invokes(testing.NewRootListAction(validatingwebhookconfigurationsResource, validatingwebhookconfigurationsKind, opts), &admissionregistrationv1.ValidatingWebhookConfigurationList{}) if obj == nil { @@ -69,13 +71,13 @@ func (c *FakeValidatingWebhookConfigurations) List(opts v1.ListOptions) (result } // Watch returns a watch.Interface that watches the requested validatingWebhookConfigurations. -func (c *FakeValidatingWebhookConfigurations) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeValidatingWebhookConfigurations) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewRootWatchAction(validatingwebhookconfigurationsResource, opts)) } // Create takes the representation of a validatingWebhookConfiguration and creates it. Returns the server's representation of the validatingWebhookConfiguration, and an error, if there is any. -func (c *FakeValidatingWebhookConfigurations) Create(validatingWebhookConfiguration *admissionregistrationv1.ValidatingWebhookConfiguration) (result *admissionregistrationv1.ValidatingWebhookConfiguration, err error) { +func (c *FakeValidatingWebhookConfigurations) Create(ctx context.Context, validatingWebhookConfiguration *admissionregistrationv1.ValidatingWebhookConfiguration, opts v1.CreateOptions) (result *admissionregistrationv1.ValidatingWebhookConfiguration, err error) { obj, err := c.Fake. Invokes(testing.NewRootCreateAction(validatingwebhookconfigurationsResource, validatingWebhookConfiguration), &admissionregistrationv1.ValidatingWebhookConfiguration{}) if obj == nil { @@ -85,7 +87,7 @@ func (c *FakeValidatingWebhookConfigurations) Create(validatingWebhookConfigurat } // Update takes the representation of a validatingWebhookConfiguration and updates it. Returns the server's representation of the validatingWebhookConfiguration, and an error, if there is any. -func (c *FakeValidatingWebhookConfigurations) Update(validatingWebhookConfiguration *admissionregistrationv1.ValidatingWebhookConfiguration) (result *admissionregistrationv1.ValidatingWebhookConfiguration, err error) { +func (c *FakeValidatingWebhookConfigurations) Update(ctx context.Context, validatingWebhookConfiguration *admissionregistrationv1.ValidatingWebhookConfiguration, opts v1.UpdateOptions) (result *admissionregistrationv1.ValidatingWebhookConfiguration, err error) { obj, err := c.Fake. Invokes(testing.NewRootUpdateAction(validatingwebhookconfigurationsResource, validatingWebhookConfiguration), &admissionregistrationv1.ValidatingWebhookConfiguration{}) if obj == nil { @@ -95,22 +97,22 @@ func (c *FakeValidatingWebhookConfigurations) Update(validatingWebhookConfigurat } // Delete takes name of the validatingWebhookConfiguration and deletes it. Returns an error if one occurs. -func (c *FakeValidatingWebhookConfigurations) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeValidatingWebhookConfigurations) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewRootDeleteAction(validatingwebhookconfigurationsResource, name), &admissionregistrationv1.ValidatingWebhookConfiguration{}) return err } // DeleteCollection deletes a collection of objects. -func (c *FakeValidatingWebhookConfigurations) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewRootDeleteCollectionAction(validatingwebhookconfigurationsResource, listOptions) +func (c *FakeValidatingWebhookConfigurations) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(validatingwebhookconfigurationsResource, listOpts) _, err := c.Fake.Invokes(action, &admissionregistrationv1.ValidatingWebhookConfigurationList{}) return err } // Patch applies the patch and returns the patched validatingWebhookConfiguration. -func (c *FakeValidatingWebhookConfigurations) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *admissionregistrationv1.ValidatingWebhookConfiguration, err error) { +func (c *FakeValidatingWebhookConfigurations) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *admissionregistrationv1.ValidatingWebhookConfiguration, err error) { obj, err := c.Fake. Invokes(testing.NewRootPatchSubresourceAction(validatingwebhookconfigurationsResource, name, pt, data, subresources...), &admissionregistrationv1.ValidatingWebhookConfiguration{}) if obj == nil { diff --git a/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/mutatingwebhookconfiguration.go b/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/mutatingwebhookconfiguration.go index 1f5e5e3803..cf458f4820 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/mutatingwebhookconfiguration.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/mutatingwebhookconfiguration.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" "time" v1 "k8s.io/api/admissionregistration/v1" @@ -37,14 +38,14 @@ type MutatingWebhookConfigurationsGetter interface { // MutatingWebhookConfigurationInterface has methods to work with MutatingWebhookConfiguration resources. type MutatingWebhookConfigurationInterface interface { - Create(*v1.MutatingWebhookConfiguration) (*v1.MutatingWebhookConfiguration, error) - Update(*v1.MutatingWebhookConfiguration) (*v1.MutatingWebhookConfiguration, error) - Delete(name string, options *metav1.DeleteOptions) error - DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error - Get(name string, options metav1.GetOptions) (*v1.MutatingWebhookConfiguration, error) - List(opts metav1.ListOptions) (*v1.MutatingWebhookConfigurationList, error) - Watch(opts metav1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.MutatingWebhookConfiguration, err error) + Create(ctx context.Context, mutatingWebhookConfiguration *v1.MutatingWebhookConfiguration, opts metav1.CreateOptions) (*v1.MutatingWebhookConfiguration, error) + Update(ctx context.Context, mutatingWebhookConfiguration *v1.MutatingWebhookConfiguration, opts metav1.UpdateOptions) (*v1.MutatingWebhookConfiguration, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.MutatingWebhookConfiguration, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.MutatingWebhookConfigurationList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.MutatingWebhookConfiguration, err error) MutatingWebhookConfigurationExpansion } @@ -61,19 +62,19 @@ func newMutatingWebhookConfigurations(c *AdmissionregistrationV1Client) *mutatin } // Get takes name of the mutatingWebhookConfiguration, and returns the corresponding mutatingWebhookConfiguration object, and an error if there is any. -func (c *mutatingWebhookConfigurations) Get(name string, options metav1.GetOptions) (result *v1.MutatingWebhookConfiguration, err error) { +func (c *mutatingWebhookConfigurations) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.MutatingWebhookConfiguration, err error) { result = &v1.MutatingWebhookConfiguration{} err = c.client.Get(). Resource("mutatingwebhookconfigurations"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of MutatingWebhookConfigurations that match those selectors. -func (c *mutatingWebhookConfigurations) List(opts metav1.ListOptions) (result *v1.MutatingWebhookConfigurationList, err error) { +func (c *mutatingWebhookConfigurations) List(ctx context.Context, opts metav1.ListOptions) (result *v1.MutatingWebhookConfigurationList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -83,13 +84,13 @@ func (c *mutatingWebhookConfigurations) List(opts metav1.ListOptions) (result *v Resource("mutatingwebhookconfigurations"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested mutatingWebhookConfigurations. -func (c *mutatingWebhookConfigurations) Watch(opts metav1.ListOptions) (watch.Interface, error) { +func (c *mutatingWebhookConfigurations) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -99,66 +100,69 @@ func (c *mutatingWebhookConfigurations) Watch(opts metav1.ListOptions) (watch.In Resource("mutatingwebhookconfigurations"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a mutatingWebhookConfiguration and creates it. Returns the server's representation of the mutatingWebhookConfiguration, and an error, if there is any. -func (c *mutatingWebhookConfigurations) Create(mutatingWebhookConfiguration *v1.MutatingWebhookConfiguration) (result *v1.MutatingWebhookConfiguration, err error) { +func (c *mutatingWebhookConfigurations) Create(ctx context.Context, mutatingWebhookConfiguration *v1.MutatingWebhookConfiguration, opts metav1.CreateOptions) (result *v1.MutatingWebhookConfiguration, err error) { result = &v1.MutatingWebhookConfiguration{} err = c.client.Post(). Resource("mutatingwebhookconfigurations"). + VersionedParams(&opts, scheme.ParameterCodec). Body(mutatingWebhookConfiguration). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a mutatingWebhookConfiguration and updates it. Returns the server's representation of the mutatingWebhookConfiguration, and an error, if there is any. -func (c *mutatingWebhookConfigurations) Update(mutatingWebhookConfiguration *v1.MutatingWebhookConfiguration) (result *v1.MutatingWebhookConfiguration, err error) { +func (c *mutatingWebhookConfigurations) Update(ctx context.Context, mutatingWebhookConfiguration *v1.MutatingWebhookConfiguration, opts metav1.UpdateOptions) (result *v1.MutatingWebhookConfiguration, err error) { result = &v1.MutatingWebhookConfiguration{} err = c.client.Put(). Resource("mutatingwebhookconfigurations"). Name(mutatingWebhookConfiguration.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(mutatingWebhookConfiguration). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the mutatingWebhookConfiguration and deletes it. Returns an error if one occurs. -func (c *mutatingWebhookConfigurations) Delete(name string, options *metav1.DeleteOptions) error { +func (c *mutatingWebhookConfigurations) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { return c.client.Delete(). Resource("mutatingwebhookconfigurations"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *mutatingWebhookConfigurations) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error { +func (c *mutatingWebhookConfigurations) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Resource("mutatingwebhookconfigurations"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched mutatingWebhookConfiguration. -func (c *mutatingWebhookConfigurations) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.MutatingWebhookConfiguration, err error) { +func (c *mutatingWebhookConfigurations) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.MutatingWebhookConfiguration, err error) { result = &v1.MutatingWebhookConfiguration{} err = c.client.Patch(pt). Resource("mutatingwebhookconfigurations"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/validatingwebhookconfiguration.go b/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/validatingwebhookconfiguration.go index 7987b6e308..c7191c0fe9 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/validatingwebhookconfiguration.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/validatingwebhookconfiguration.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" "time" v1 "k8s.io/api/admissionregistration/v1" @@ -37,14 +38,14 @@ type ValidatingWebhookConfigurationsGetter interface { // ValidatingWebhookConfigurationInterface has methods to work with ValidatingWebhookConfiguration resources. type ValidatingWebhookConfigurationInterface interface { - Create(*v1.ValidatingWebhookConfiguration) (*v1.ValidatingWebhookConfiguration, error) - Update(*v1.ValidatingWebhookConfiguration) (*v1.ValidatingWebhookConfiguration, error) - Delete(name string, options *metav1.DeleteOptions) error - DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error - Get(name string, options metav1.GetOptions) (*v1.ValidatingWebhookConfiguration, error) - List(opts metav1.ListOptions) (*v1.ValidatingWebhookConfigurationList, error) - Watch(opts metav1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ValidatingWebhookConfiguration, err error) + Create(ctx context.Context, validatingWebhookConfiguration *v1.ValidatingWebhookConfiguration, opts metav1.CreateOptions) (*v1.ValidatingWebhookConfiguration, error) + Update(ctx context.Context, validatingWebhookConfiguration *v1.ValidatingWebhookConfiguration, opts metav1.UpdateOptions) (*v1.ValidatingWebhookConfiguration, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.ValidatingWebhookConfiguration, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.ValidatingWebhookConfigurationList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ValidatingWebhookConfiguration, err error) ValidatingWebhookConfigurationExpansion } @@ -61,19 +62,19 @@ func newValidatingWebhookConfigurations(c *AdmissionregistrationV1Client) *valid } // Get takes name of the validatingWebhookConfiguration, and returns the corresponding validatingWebhookConfiguration object, and an error if there is any. -func (c *validatingWebhookConfigurations) Get(name string, options metav1.GetOptions) (result *v1.ValidatingWebhookConfiguration, err error) { +func (c *validatingWebhookConfigurations) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ValidatingWebhookConfiguration, err error) { result = &v1.ValidatingWebhookConfiguration{} err = c.client.Get(). Resource("validatingwebhookconfigurations"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of ValidatingWebhookConfigurations that match those selectors. -func (c *validatingWebhookConfigurations) List(opts metav1.ListOptions) (result *v1.ValidatingWebhookConfigurationList, err error) { +func (c *validatingWebhookConfigurations) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ValidatingWebhookConfigurationList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -83,13 +84,13 @@ func (c *validatingWebhookConfigurations) List(opts metav1.ListOptions) (result Resource("validatingwebhookconfigurations"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested validatingWebhookConfigurations. -func (c *validatingWebhookConfigurations) Watch(opts metav1.ListOptions) (watch.Interface, error) { +func (c *validatingWebhookConfigurations) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -99,66 +100,69 @@ func (c *validatingWebhookConfigurations) Watch(opts metav1.ListOptions) (watch. Resource("validatingwebhookconfigurations"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a validatingWebhookConfiguration and creates it. Returns the server's representation of the validatingWebhookConfiguration, and an error, if there is any. -func (c *validatingWebhookConfigurations) Create(validatingWebhookConfiguration *v1.ValidatingWebhookConfiguration) (result *v1.ValidatingWebhookConfiguration, err error) { +func (c *validatingWebhookConfigurations) Create(ctx context.Context, validatingWebhookConfiguration *v1.ValidatingWebhookConfiguration, opts metav1.CreateOptions) (result *v1.ValidatingWebhookConfiguration, err error) { result = &v1.ValidatingWebhookConfiguration{} err = c.client.Post(). Resource("validatingwebhookconfigurations"). + VersionedParams(&opts, scheme.ParameterCodec). Body(validatingWebhookConfiguration). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a validatingWebhookConfiguration and updates it. Returns the server's representation of the validatingWebhookConfiguration, and an error, if there is any. -func (c *validatingWebhookConfigurations) Update(validatingWebhookConfiguration *v1.ValidatingWebhookConfiguration) (result *v1.ValidatingWebhookConfiguration, err error) { +func (c *validatingWebhookConfigurations) Update(ctx context.Context, validatingWebhookConfiguration *v1.ValidatingWebhookConfiguration, opts metav1.UpdateOptions) (result *v1.ValidatingWebhookConfiguration, err error) { result = &v1.ValidatingWebhookConfiguration{} err = c.client.Put(). Resource("validatingwebhookconfigurations"). Name(validatingWebhookConfiguration.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(validatingWebhookConfiguration). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the validatingWebhookConfiguration and deletes it. Returns an error if one occurs. -func (c *validatingWebhookConfigurations) Delete(name string, options *metav1.DeleteOptions) error { +func (c *validatingWebhookConfigurations) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { return c.client.Delete(). Resource("validatingwebhookconfigurations"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *validatingWebhookConfigurations) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error { +func (c *validatingWebhookConfigurations) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Resource("validatingwebhookconfigurations"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched validatingWebhookConfiguration. -func (c *validatingWebhookConfigurations) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ValidatingWebhookConfiguration, err error) { +func (c *validatingWebhookConfigurations) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ValidatingWebhookConfiguration, err error) { result = &v1.ValidatingWebhookConfiguration{} err = c.client.Patch(pt). Resource("validatingwebhookconfigurations"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/fake/fake_mutatingwebhookconfiguration.go b/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/fake/fake_mutatingwebhookconfiguration.go index d2177bad52..f303f9fdf0 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/fake/fake_mutatingwebhookconfiguration.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/fake/fake_mutatingwebhookconfiguration.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + v1beta1 "k8s.io/api/admissionregistration/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" @@ -38,7 +40,7 @@ var mutatingwebhookconfigurationsResource = schema.GroupVersionResource{Group: " var mutatingwebhookconfigurationsKind = schema.GroupVersionKind{Group: "admissionregistration.k8s.io", Version: "v1beta1", Kind: "MutatingWebhookConfiguration"} // Get takes name of the mutatingWebhookConfiguration, and returns the corresponding mutatingWebhookConfiguration object, and an error if there is any. -func (c *FakeMutatingWebhookConfigurations) Get(name string, options v1.GetOptions) (result *v1beta1.MutatingWebhookConfiguration, err error) { +func (c *FakeMutatingWebhookConfigurations) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.MutatingWebhookConfiguration, err error) { obj, err := c.Fake. Invokes(testing.NewRootGetAction(mutatingwebhookconfigurationsResource, name), &v1beta1.MutatingWebhookConfiguration{}) if obj == nil { @@ -48,7 +50,7 @@ func (c *FakeMutatingWebhookConfigurations) Get(name string, options v1.GetOptio } // List takes label and field selectors, and returns the list of MutatingWebhookConfigurations that match those selectors. -func (c *FakeMutatingWebhookConfigurations) List(opts v1.ListOptions) (result *v1beta1.MutatingWebhookConfigurationList, err error) { +func (c *FakeMutatingWebhookConfigurations) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.MutatingWebhookConfigurationList, err error) { obj, err := c.Fake. Invokes(testing.NewRootListAction(mutatingwebhookconfigurationsResource, mutatingwebhookconfigurationsKind, opts), &v1beta1.MutatingWebhookConfigurationList{}) if obj == nil { @@ -69,13 +71,13 @@ func (c *FakeMutatingWebhookConfigurations) List(opts v1.ListOptions) (result *v } // Watch returns a watch.Interface that watches the requested mutatingWebhookConfigurations. -func (c *FakeMutatingWebhookConfigurations) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeMutatingWebhookConfigurations) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewRootWatchAction(mutatingwebhookconfigurationsResource, opts)) } // Create takes the representation of a mutatingWebhookConfiguration and creates it. Returns the server's representation of the mutatingWebhookConfiguration, and an error, if there is any. -func (c *FakeMutatingWebhookConfigurations) Create(mutatingWebhookConfiguration *v1beta1.MutatingWebhookConfiguration) (result *v1beta1.MutatingWebhookConfiguration, err error) { +func (c *FakeMutatingWebhookConfigurations) Create(ctx context.Context, mutatingWebhookConfiguration *v1beta1.MutatingWebhookConfiguration, opts v1.CreateOptions) (result *v1beta1.MutatingWebhookConfiguration, err error) { obj, err := c.Fake. Invokes(testing.NewRootCreateAction(mutatingwebhookconfigurationsResource, mutatingWebhookConfiguration), &v1beta1.MutatingWebhookConfiguration{}) if obj == nil { @@ -85,7 +87,7 @@ func (c *FakeMutatingWebhookConfigurations) Create(mutatingWebhookConfiguration } // Update takes the representation of a mutatingWebhookConfiguration and updates it. Returns the server's representation of the mutatingWebhookConfiguration, and an error, if there is any. -func (c *FakeMutatingWebhookConfigurations) Update(mutatingWebhookConfiguration *v1beta1.MutatingWebhookConfiguration) (result *v1beta1.MutatingWebhookConfiguration, err error) { +func (c *FakeMutatingWebhookConfigurations) Update(ctx context.Context, mutatingWebhookConfiguration *v1beta1.MutatingWebhookConfiguration, opts v1.UpdateOptions) (result *v1beta1.MutatingWebhookConfiguration, err error) { obj, err := c.Fake. Invokes(testing.NewRootUpdateAction(mutatingwebhookconfigurationsResource, mutatingWebhookConfiguration), &v1beta1.MutatingWebhookConfiguration{}) if obj == nil { @@ -95,22 +97,22 @@ func (c *FakeMutatingWebhookConfigurations) Update(mutatingWebhookConfiguration } // Delete takes name of the mutatingWebhookConfiguration and deletes it. Returns an error if one occurs. -func (c *FakeMutatingWebhookConfigurations) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeMutatingWebhookConfigurations) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewRootDeleteAction(mutatingwebhookconfigurationsResource, name), &v1beta1.MutatingWebhookConfiguration{}) return err } // DeleteCollection deletes a collection of objects. -func (c *FakeMutatingWebhookConfigurations) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewRootDeleteCollectionAction(mutatingwebhookconfigurationsResource, listOptions) +func (c *FakeMutatingWebhookConfigurations) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(mutatingwebhookconfigurationsResource, listOpts) _, err := c.Fake.Invokes(action, &v1beta1.MutatingWebhookConfigurationList{}) return err } // Patch applies the patch and returns the patched mutatingWebhookConfiguration. -func (c *FakeMutatingWebhookConfigurations) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.MutatingWebhookConfiguration, err error) { +func (c *FakeMutatingWebhookConfigurations) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.MutatingWebhookConfiguration, err error) { obj, err := c.Fake. Invokes(testing.NewRootPatchSubresourceAction(mutatingwebhookconfigurationsResource, name, pt, data, subresources...), &v1beta1.MutatingWebhookConfiguration{}) if obj == nil { diff --git a/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/fake/fake_validatingwebhookconfiguration.go b/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/fake/fake_validatingwebhookconfiguration.go index 6be2b39386..7227fe0882 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/fake/fake_validatingwebhookconfiguration.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/fake/fake_validatingwebhookconfiguration.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + v1beta1 "k8s.io/api/admissionregistration/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" @@ -38,7 +40,7 @@ var validatingwebhookconfigurationsResource = schema.GroupVersionResource{Group: var validatingwebhookconfigurationsKind = schema.GroupVersionKind{Group: "admissionregistration.k8s.io", Version: "v1beta1", Kind: "ValidatingWebhookConfiguration"} // Get takes name of the validatingWebhookConfiguration, and returns the corresponding validatingWebhookConfiguration object, and an error if there is any. -func (c *FakeValidatingWebhookConfigurations) Get(name string, options v1.GetOptions) (result *v1beta1.ValidatingWebhookConfiguration, err error) { +func (c *FakeValidatingWebhookConfigurations) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.ValidatingWebhookConfiguration, err error) { obj, err := c.Fake. Invokes(testing.NewRootGetAction(validatingwebhookconfigurationsResource, name), &v1beta1.ValidatingWebhookConfiguration{}) if obj == nil { @@ -48,7 +50,7 @@ func (c *FakeValidatingWebhookConfigurations) Get(name string, options v1.GetOpt } // List takes label and field selectors, and returns the list of ValidatingWebhookConfigurations that match those selectors. -func (c *FakeValidatingWebhookConfigurations) List(opts v1.ListOptions) (result *v1beta1.ValidatingWebhookConfigurationList, err error) { +func (c *FakeValidatingWebhookConfigurations) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.ValidatingWebhookConfigurationList, err error) { obj, err := c.Fake. Invokes(testing.NewRootListAction(validatingwebhookconfigurationsResource, validatingwebhookconfigurationsKind, opts), &v1beta1.ValidatingWebhookConfigurationList{}) if obj == nil { @@ -69,13 +71,13 @@ func (c *FakeValidatingWebhookConfigurations) List(opts v1.ListOptions) (result } // Watch returns a watch.Interface that watches the requested validatingWebhookConfigurations. -func (c *FakeValidatingWebhookConfigurations) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeValidatingWebhookConfigurations) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewRootWatchAction(validatingwebhookconfigurationsResource, opts)) } // Create takes the representation of a validatingWebhookConfiguration and creates it. Returns the server's representation of the validatingWebhookConfiguration, and an error, if there is any. -func (c *FakeValidatingWebhookConfigurations) Create(validatingWebhookConfiguration *v1beta1.ValidatingWebhookConfiguration) (result *v1beta1.ValidatingWebhookConfiguration, err error) { +func (c *FakeValidatingWebhookConfigurations) Create(ctx context.Context, validatingWebhookConfiguration *v1beta1.ValidatingWebhookConfiguration, opts v1.CreateOptions) (result *v1beta1.ValidatingWebhookConfiguration, err error) { obj, err := c.Fake. Invokes(testing.NewRootCreateAction(validatingwebhookconfigurationsResource, validatingWebhookConfiguration), &v1beta1.ValidatingWebhookConfiguration{}) if obj == nil { @@ -85,7 +87,7 @@ func (c *FakeValidatingWebhookConfigurations) Create(validatingWebhookConfigurat } // Update takes the representation of a validatingWebhookConfiguration and updates it. Returns the server's representation of the validatingWebhookConfiguration, and an error, if there is any. -func (c *FakeValidatingWebhookConfigurations) Update(validatingWebhookConfiguration *v1beta1.ValidatingWebhookConfiguration) (result *v1beta1.ValidatingWebhookConfiguration, err error) { +func (c *FakeValidatingWebhookConfigurations) Update(ctx context.Context, validatingWebhookConfiguration *v1beta1.ValidatingWebhookConfiguration, opts v1.UpdateOptions) (result *v1beta1.ValidatingWebhookConfiguration, err error) { obj, err := c.Fake. Invokes(testing.NewRootUpdateAction(validatingwebhookconfigurationsResource, validatingWebhookConfiguration), &v1beta1.ValidatingWebhookConfiguration{}) if obj == nil { @@ -95,22 +97,22 @@ func (c *FakeValidatingWebhookConfigurations) Update(validatingWebhookConfigurat } // Delete takes name of the validatingWebhookConfiguration and deletes it. Returns an error if one occurs. -func (c *FakeValidatingWebhookConfigurations) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeValidatingWebhookConfigurations) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewRootDeleteAction(validatingwebhookconfigurationsResource, name), &v1beta1.ValidatingWebhookConfiguration{}) return err } // DeleteCollection deletes a collection of objects. -func (c *FakeValidatingWebhookConfigurations) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewRootDeleteCollectionAction(validatingwebhookconfigurationsResource, listOptions) +func (c *FakeValidatingWebhookConfigurations) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(validatingwebhookconfigurationsResource, listOpts) _, err := c.Fake.Invokes(action, &v1beta1.ValidatingWebhookConfigurationList{}) return err } // Patch applies the patch and returns the patched validatingWebhookConfiguration. -func (c *FakeValidatingWebhookConfigurations) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ValidatingWebhookConfiguration, err error) { +func (c *FakeValidatingWebhookConfigurations) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.ValidatingWebhookConfiguration, err error) { obj, err := c.Fake. Invokes(testing.NewRootPatchSubresourceAction(validatingwebhookconfigurationsResource, name, pt, data, subresources...), &v1beta1.ValidatingWebhookConfiguration{}) if obj == nil { diff --git a/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/mutatingwebhookconfiguration.go b/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/mutatingwebhookconfiguration.go index 4524896cd6..73ab9ecdee 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/mutatingwebhookconfiguration.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/mutatingwebhookconfiguration.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" "time" v1beta1 "k8s.io/api/admissionregistration/v1beta1" @@ -37,14 +38,14 @@ type MutatingWebhookConfigurationsGetter interface { // MutatingWebhookConfigurationInterface has methods to work with MutatingWebhookConfiguration resources. type MutatingWebhookConfigurationInterface interface { - Create(*v1beta1.MutatingWebhookConfiguration) (*v1beta1.MutatingWebhookConfiguration, error) - Update(*v1beta1.MutatingWebhookConfiguration) (*v1beta1.MutatingWebhookConfiguration, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*v1beta1.MutatingWebhookConfiguration, error) - List(opts v1.ListOptions) (*v1beta1.MutatingWebhookConfigurationList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.MutatingWebhookConfiguration, err error) + Create(ctx context.Context, mutatingWebhookConfiguration *v1beta1.MutatingWebhookConfiguration, opts v1.CreateOptions) (*v1beta1.MutatingWebhookConfiguration, error) + Update(ctx context.Context, mutatingWebhookConfiguration *v1beta1.MutatingWebhookConfiguration, opts v1.UpdateOptions) (*v1beta1.MutatingWebhookConfiguration, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.MutatingWebhookConfiguration, error) + List(ctx context.Context, opts v1.ListOptions) (*v1beta1.MutatingWebhookConfigurationList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.MutatingWebhookConfiguration, err error) MutatingWebhookConfigurationExpansion } @@ -61,19 +62,19 @@ func newMutatingWebhookConfigurations(c *AdmissionregistrationV1beta1Client) *mu } // Get takes name of the mutatingWebhookConfiguration, and returns the corresponding mutatingWebhookConfiguration object, and an error if there is any. -func (c *mutatingWebhookConfigurations) Get(name string, options v1.GetOptions) (result *v1beta1.MutatingWebhookConfiguration, err error) { +func (c *mutatingWebhookConfigurations) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.MutatingWebhookConfiguration, err error) { result = &v1beta1.MutatingWebhookConfiguration{} err = c.client.Get(). Resource("mutatingwebhookconfigurations"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of MutatingWebhookConfigurations that match those selectors. -func (c *mutatingWebhookConfigurations) List(opts v1.ListOptions) (result *v1beta1.MutatingWebhookConfigurationList, err error) { +func (c *mutatingWebhookConfigurations) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.MutatingWebhookConfigurationList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -83,13 +84,13 @@ func (c *mutatingWebhookConfigurations) List(opts v1.ListOptions) (result *v1bet Resource("mutatingwebhookconfigurations"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested mutatingWebhookConfigurations. -func (c *mutatingWebhookConfigurations) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *mutatingWebhookConfigurations) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -99,66 +100,69 @@ func (c *mutatingWebhookConfigurations) Watch(opts v1.ListOptions) (watch.Interf Resource("mutatingwebhookconfigurations"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a mutatingWebhookConfiguration and creates it. Returns the server's representation of the mutatingWebhookConfiguration, and an error, if there is any. -func (c *mutatingWebhookConfigurations) Create(mutatingWebhookConfiguration *v1beta1.MutatingWebhookConfiguration) (result *v1beta1.MutatingWebhookConfiguration, err error) { +func (c *mutatingWebhookConfigurations) Create(ctx context.Context, mutatingWebhookConfiguration *v1beta1.MutatingWebhookConfiguration, opts v1.CreateOptions) (result *v1beta1.MutatingWebhookConfiguration, err error) { result = &v1beta1.MutatingWebhookConfiguration{} err = c.client.Post(). Resource("mutatingwebhookconfigurations"). + VersionedParams(&opts, scheme.ParameterCodec). Body(mutatingWebhookConfiguration). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a mutatingWebhookConfiguration and updates it. Returns the server's representation of the mutatingWebhookConfiguration, and an error, if there is any. -func (c *mutatingWebhookConfigurations) Update(mutatingWebhookConfiguration *v1beta1.MutatingWebhookConfiguration) (result *v1beta1.MutatingWebhookConfiguration, err error) { +func (c *mutatingWebhookConfigurations) Update(ctx context.Context, mutatingWebhookConfiguration *v1beta1.MutatingWebhookConfiguration, opts v1.UpdateOptions) (result *v1beta1.MutatingWebhookConfiguration, err error) { result = &v1beta1.MutatingWebhookConfiguration{} err = c.client.Put(). Resource("mutatingwebhookconfigurations"). Name(mutatingWebhookConfiguration.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(mutatingWebhookConfiguration). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the mutatingWebhookConfiguration and deletes it. Returns an error if one occurs. -func (c *mutatingWebhookConfigurations) Delete(name string, options *v1.DeleteOptions) error { +func (c *mutatingWebhookConfigurations) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). Resource("mutatingwebhookconfigurations"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *mutatingWebhookConfigurations) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *mutatingWebhookConfigurations) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Resource("mutatingwebhookconfigurations"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched mutatingWebhookConfiguration. -func (c *mutatingWebhookConfigurations) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.MutatingWebhookConfiguration, err error) { +func (c *mutatingWebhookConfigurations) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.MutatingWebhookConfiguration, err error) { result = &v1beta1.MutatingWebhookConfiguration{} err = c.client.Patch(pt). Resource("mutatingwebhookconfigurations"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/validatingwebhookconfiguration.go b/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/validatingwebhookconfiguration.go index 7e711b3000..5ab0b9e377 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/validatingwebhookconfiguration.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/validatingwebhookconfiguration.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" "time" v1beta1 "k8s.io/api/admissionregistration/v1beta1" @@ -37,14 +38,14 @@ type ValidatingWebhookConfigurationsGetter interface { // ValidatingWebhookConfigurationInterface has methods to work with ValidatingWebhookConfiguration resources. type ValidatingWebhookConfigurationInterface interface { - Create(*v1beta1.ValidatingWebhookConfiguration) (*v1beta1.ValidatingWebhookConfiguration, error) - Update(*v1beta1.ValidatingWebhookConfiguration) (*v1beta1.ValidatingWebhookConfiguration, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*v1beta1.ValidatingWebhookConfiguration, error) - List(opts v1.ListOptions) (*v1beta1.ValidatingWebhookConfigurationList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ValidatingWebhookConfiguration, err error) + Create(ctx context.Context, validatingWebhookConfiguration *v1beta1.ValidatingWebhookConfiguration, opts v1.CreateOptions) (*v1beta1.ValidatingWebhookConfiguration, error) + Update(ctx context.Context, validatingWebhookConfiguration *v1beta1.ValidatingWebhookConfiguration, opts v1.UpdateOptions) (*v1beta1.ValidatingWebhookConfiguration, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.ValidatingWebhookConfiguration, error) + List(ctx context.Context, opts v1.ListOptions) (*v1beta1.ValidatingWebhookConfigurationList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.ValidatingWebhookConfiguration, err error) ValidatingWebhookConfigurationExpansion } @@ -61,19 +62,19 @@ func newValidatingWebhookConfigurations(c *AdmissionregistrationV1beta1Client) * } // Get takes name of the validatingWebhookConfiguration, and returns the corresponding validatingWebhookConfiguration object, and an error if there is any. -func (c *validatingWebhookConfigurations) Get(name string, options v1.GetOptions) (result *v1beta1.ValidatingWebhookConfiguration, err error) { +func (c *validatingWebhookConfigurations) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.ValidatingWebhookConfiguration, err error) { result = &v1beta1.ValidatingWebhookConfiguration{} err = c.client.Get(). Resource("validatingwebhookconfigurations"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of ValidatingWebhookConfigurations that match those selectors. -func (c *validatingWebhookConfigurations) List(opts v1.ListOptions) (result *v1beta1.ValidatingWebhookConfigurationList, err error) { +func (c *validatingWebhookConfigurations) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.ValidatingWebhookConfigurationList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -83,13 +84,13 @@ func (c *validatingWebhookConfigurations) List(opts v1.ListOptions) (result *v1b Resource("validatingwebhookconfigurations"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested validatingWebhookConfigurations. -func (c *validatingWebhookConfigurations) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *validatingWebhookConfigurations) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -99,66 +100,69 @@ func (c *validatingWebhookConfigurations) Watch(opts v1.ListOptions) (watch.Inte Resource("validatingwebhookconfigurations"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a validatingWebhookConfiguration and creates it. Returns the server's representation of the validatingWebhookConfiguration, and an error, if there is any. -func (c *validatingWebhookConfigurations) Create(validatingWebhookConfiguration *v1beta1.ValidatingWebhookConfiguration) (result *v1beta1.ValidatingWebhookConfiguration, err error) { +func (c *validatingWebhookConfigurations) Create(ctx context.Context, validatingWebhookConfiguration *v1beta1.ValidatingWebhookConfiguration, opts v1.CreateOptions) (result *v1beta1.ValidatingWebhookConfiguration, err error) { result = &v1beta1.ValidatingWebhookConfiguration{} err = c.client.Post(). Resource("validatingwebhookconfigurations"). + VersionedParams(&opts, scheme.ParameterCodec). Body(validatingWebhookConfiguration). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a validatingWebhookConfiguration and updates it. Returns the server's representation of the validatingWebhookConfiguration, and an error, if there is any. -func (c *validatingWebhookConfigurations) Update(validatingWebhookConfiguration *v1beta1.ValidatingWebhookConfiguration) (result *v1beta1.ValidatingWebhookConfiguration, err error) { +func (c *validatingWebhookConfigurations) Update(ctx context.Context, validatingWebhookConfiguration *v1beta1.ValidatingWebhookConfiguration, opts v1.UpdateOptions) (result *v1beta1.ValidatingWebhookConfiguration, err error) { result = &v1beta1.ValidatingWebhookConfiguration{} err = c.client.Put(). Resource("validatingwebhookconfigurations"). Name(validatingWebhookConfiguration.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(validatingWebhookConfiguration). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the validatingWebhookConfiguration and deletes it. Returns an error if one occurs. -func (c *validatingWebhookConfigurations) Delete(name string, options *v1.DeleteOptions) error { +func (c *validatingWebhookConfigurations) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). Resource("validatingwebhookconfigurations"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *validatingWebhookConfigurations) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *validatingWebhookConfigurations) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Resource("validatingwebhookconfigurations"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched validatingWebhookConfiguration. -func (c *validatingWebhookConfigurations) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ValidatingWebhookConfiguration, err error) { +func (c *validatingWebhookConfigurations) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.ValidatingWebhookConfiguration, err error) { result = &v1beta1.ValidatingWebhookConfiguration{} err = c.client.Patch(pt). Resource("validatingwebhookconfigurations"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1/controllerrevision.go b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1/controllerrevision.go index e28e4d2a3f..dba06207a0 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1/controllerrevision.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1/controllerrevision.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" "time" v1 "k8s.io/api/apps/v1" @@ -37,14 +38,14 @@ type ControllerRevisionsGetter interface { // ControllerRevisionInterface has methods to work with ControllerRevision resources. type ControllerRevisionInterface interface { - Create(*v1.ControllerRevision) (*v1.ControllerRevision, error) - Update(*v1.ControllerRevision) (*v1.ControllerRevision, error) - Delete(name string, options *metav1.DeleteOptions) error - DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error - Get(name string, options metav1.GetOptions) (*v1.ControllerRevision, error) - List(opts metav1.ListOptions) (*v1.ControllerRevisionList, error) - Watch(opts metav1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ControllerRevision, err error) + Create(ctx context.Context, controllerRevision *v1.ControllerRevision, opts metav1.CreateOptions) (*v1.ControllerRevision, error) + Update(ctx context.Context, controllerRevision *v1.ControllerRevision, opts metav1.UpdateOptions) (*v1.ControllerRevision, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.ControllerRevision, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.ControllerRevisionList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ControllerRevision, err error) ControllerRevisionExpansion } @@ -63,20 +64,20 @@ func newControllerRevisions(c *AppsV1Client, namespace string) *controllerRevisi } // Get takes name of the controllerRevision, and returns the corresponding controllerRevision object, and an error if there is any. -func (c *controllerRevisions) Get(name string, options metav1.GetOptions) (result *v1.ControllerRevision, err error) { +func (c *controllerRevisions) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ControllerRevision, err error) { result = &v1.ControllerRevision{} err = c.client.Get(). Namespace(c.ns). Resource("controllerrevisions"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of ControllerRevisions that match those selectors. -func (c *controllerRevisions) List(opts metav1.ListOptions) (result *v1.ControllerRevisionList, err error) { +func (c *controllerRevisions) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ControllerRevisionList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -87,13 +88,13 @@ func (c *controllerRevisions) List(opts metav1.ListOptions) (result *v1.Controll Resource("controllerrevisions"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested controllerRevisions. -func (c *controllerRevisions) Watch(opts metav1.ListOptions) (watch.Interface, error) { +func (c *controllerRevisions) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -104,71 +105,74 @@ func (c *controllerRevisions) Watch(opts metav1.ListOptions) (watch.Interface, e Resource("controllerrevisions"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a controllerRevision and creates it. Returns the server's representation of the controllerRevision, and an error, if there is any. -func (c *controllerRevisions) Create(controllerRevision *v1.ControllerRevision) (result *v1.ControllerRevision, err error) { +func (c *controllerRevisions) Create(ctx context.Context, controllerRevision *v1.ControllerRevision, opts metav1.CreateOptions) (result *v1.ControllerRevision, err error) { result = &v1.ControllerRevision{} err = c.client.Post(). Namespace(c.ns). Resource("controllerrevisions"). + VersionedParams(&opts, scheme.ParameterCodec). Body(controllerRevision). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a controllerRevision and updates it. Returns the server's representation of the controllerRevision, and an error, if there is any. -func (c *controllerRevisions) Update(controllerRevision *v1.ControllerRevision) (result *v1.ControllerRevision, err error) { +func (c *controllerRevisions) Update(ctx context.Context, controllerRevision *v1.ControllerRevision, opts metav1.UpdateOptions) (result *v1.ControllerRevision, err error) { result = &v1.ControllerRevision{} err = c.client.Put(). Namespace(c.ns). Resource("controllerrevisions"). Name(controllerRevision.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(controllerRevision). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the controllerRevision and deletes it. Returns an error if one occurs. -func (c *controllerRevisions) Delete(name string, options *metav1.DeleteOptions) error { +func (c *controllerRevisions) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("controllerrevisions"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *controllerRevisions) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error { +func (c *controllerRevisions) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Namespace(c.ns). Resource("controllerrevisions"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched controllerRevision. -func (c *controllerRevisions) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ControllerRevision, err error) { +func (c *controllerRevisions) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ControllerRevision, err error) { result = &v1.ControllerRevision{} err = c.client.Patch(pt). Namespace(c.ns). Resource("controllerrevisions"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1/daemonset.go b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1/daemonset.go index a535cdabe6..0bb397af72 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1/daemonset.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1/daemonset.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" "time" v1 "k8s.io/api/apps/v1" @@ -37,15 +38,15 @@ type DaemonSetsGetter interface { // DaemonSetInterface has methods to work with DaemonSet resources. type DaemonSetInterface interface { - Create(*v1.DaemonSet) (*v1.DaemonSet, error) - Update(*v1.DaemonSet) (*v1.DaemonSet, error) - UpdateStatus(*v1.DaemonSet) (*v1.DaemonSet, error) - Delete(name string, options *metav1.DeleteOptions) error - DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error - Get(name string, options metav1.GetOptions) (*v1.DaemonSet, error) - List(opts metav1.ListOptions) (*v1.DaemonSetList, error) - Watch(opts metav1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.DaemonSet, err error) + Create(ctx context.Context, daemonSet *v1.DaemonSet, opts metav1.CreateOptions) (*v1.DaemonSet, error) + Update(ctx context.Context, daemonSet *v1.DaemonSet, opts metav1.UpdateOptions) (*v1.DaemonSet, error) + UpdateStatus(ctx context.Context, daemonSet *v1.DaemonSet, opts metav1.UpdateOptions) (*v1.DaemonSet, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.DaemonSet, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.DaemonSetList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.DaemonSet, err error) DaemonSetExpansion } @@ -64,20 +65,20 @@ func newDaemonSets(c *AppsV1Client, namespace string) *daemonSets { } // Get takes name of the daemonSet, and returns the corresponding daemonSet object, and an error if there is any. -func (c *daemonSets) Get(name string, options metav1.GetOptions) (result *v1.DaemonSet, err error) { +func (c *daemonSets) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.DaemonSet, err error) { result = &v1.DaemonSet{} err = c.client.Get(). Namespace(c.ns). Resource("daemonsets"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of DaemonSets that match those selectors. -func (c *daemonSets) List(opts metav1.ListOptions) (result *v1.DaemonSetList, err error) { +func (c *daemonSets) List(ctx context.Context, opts metav1.ListOptions) (result *v1.DaemonSetList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -88,13 +89,13 @@ func (c *daemonSets) List(opts metav1.ListOptions) (result *v1.DaemonSetList, er Resource("daemonsets"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested daemonSets. -func (c *daemonSets) Watch(opts metav1.ListOptions) (watch.Interface, error) { +func (c *daemonSets) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -105,87 +106,90 @@ func (c *daemonSets) Watch(opts metav1.ListOptions) (watch.Interface, error) { Resource("daemonsets"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a daemonSet and creates it. Returns the server's representation of the daemonSet, and an error, if there is any. -func (c *daemonSets) Create(daemonSet *v1.DaemonSet) (result *v1.DaemonSet, err error) { +func (c *daemonSets) Create(ctx context.Context, daemonSet *v1.DaemonSet, opts metav1.CreateOptions) (result *v1.DaemonSet, err error) { result = &v1.DaemonSet{} err = c.client.Post(). Namespace(c.ns). Resource("daemonsets"). + VersionedParams(&opts, scheme.ParameterCodec). Body(daemonSet). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a daemonSet and updates it. Returns the server's representation of the daemonSet, and an error, if there is any. -func (c *daemonSets) Update(daemonSet *v1.DaemonSet) (result *v1.DaemonSet, err error) { +func (c *daemonSets) Update(ctx context.Context, daemonSet *v1.DaemonSet, opts metav1.UpdateOptions) (result *v1.DaemonSet, err error) { result = &v1.DaemonSet{} err = c.client.Put(). Namespace(c.ns). Resource("daemonsets"). Name(daemonSet.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(daemonSet). - Do(). + Do(ctx). Into(result) return } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *daemonSets) UpdateStatus(daemonSet *v1.DaemonSet) (result *v1.DaemonSet, err error) { +func (c *daemonSets) UpdateStatus(ctx context.Context, daemonSet *v1.DaemonSet, opts metav1.UpdateOptions) (result *v1.DaemonSet, err error) { result = &v1.DaemonSet{} err = c.client.Put(). Namespace(c.ns). Resource("daemonsets"). Name(daemonSet.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(daemonSet). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the daemonSet and deletes it. Returns an error if one occurs. -func (c *daemonSets) Delete(name string, options *metav1.DeleteOptions) error { +func (c *daemonSets) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("daemonsets"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *daemonSets) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error { +func (c *daemonSets) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Namespace(c.ns). Resource("daemonsets"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched daemonSet. -func (c *daemonSets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.DaemonSet, err error) { +func (c *daemonSets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.DaemonSet, err error) { result = &v1.DaemonSet{} err = c.client.Patch(pt). Namespace(c.ns). Resource("daemonsets"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1/deployment.go b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1/deployment.go index f9799a4539..69d1b86dc0 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1/deployment.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1/deployment.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" "time" v1 "k8s.io/api/apps/v1" @@ -38,17 +39,17 @@ type DeploymentsGetter interface { // DeploymentInterface has methods to work with Deployment resources. type DeploymentInterface interface { - Create(*v1.Deployment) (*v1.Deployment, error) - Update(*v1.Deployment) (*v1.Deployment, error) - UpdateStatus(*v1.Deployment) (*v1.Deployment, error) - Delete(name string, options *metav1.DeleteOptions) error - DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error - Get(name string, options metav1.GetOptions) (*v1.Deployment, error) - List(opts metav1.ListOptions) (*v1.DeploymentList, error) - Watch(opts metav1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Deployment, err error) - GetScale(deploymentName string, options metav1.GetOptions) (*autoscalingv1.Scale, error) - UpdateScale(deploymentName string, scale *autoscalingv1.Scale) (*autoscalingv1.Scale, error) + Create(ctx context.Context, deployment *v1.Deployment, opts metav1.CreateOptions) (*v1.Deployment, error) + Update(ctx context.Context, deployment *v1.Deployment, opts metav1.UpdateOptions) (*v1.Deployment, error) + UpdateStatus(ctx context.Context, deployment *v1.Deployment, opts metav1.UpdateOptions) (*v1.Deployment, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Deployment, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.DeploymentList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Deployment, err error) + GetScale(ctx context.Context, deploymentName string, options metav1.GetOptions) (*autoscalingv1.Scale, error) + UpdateScale(ctx context.Context, deploymentName string, scale *autoscalingv1.Scale, opts metav1.UpdateOptions) (*autoscalingv1.Scale, error) DeploymentExpansion } @@ -68,20 +69,20 @@ func newDeployments(c *AppsV1Client, namespace string) *deployments { } // Get takes name of the deployment, and returns the corresponding deployment object, and an error if there is any. -func (c *deployments) Get(name string, options metav1.GetOptions) (result *v1.Deployment, err error) { +func (c *deployments) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Deployment, err error) { result = &v1.Deployment{} err = c.client.Get(). Namespace(c.ns). Resource("deployments"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of Deployments that match those selectors. -func (c *deployments) List(opts metav1.ListOptions) (result *v1.DeploymentList, err error) { +func (c *deployments) List(ctx context.Context, opts metav1.ListOptions) (result *v1.DeploymentList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -92,13 +93,13 @@ func (c *deployments) List(opts metav1.ListOptions) (result *v1.DeploymentList, Resource("deployments"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested deployments. -func (c *deployments) Watch(opts metav1.ListOptions) (watch.Interface, error) { +func (c *deployments) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -109,93 +110,96 @@ func (c *deployments) Watch(opts metav1.ListOptions) (watch.Interface, error) { Resource("deployments"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a deployment and creates it. Returns the server's representation of the deployment, and an error, if there is any. -func (c *deployments) Create(deployment *v1.Deployment) (result *v1.Deployment, err error) { +func (c *deployments) Create(ctx context.Context, deployment *v1.Deployment, opts metav1.CreateOptions) (result *v1.Deployment, err error) { result = &v1.Deployment{} err = c.client.Post(). Namespace(c.ns). Resource("deployments"). + VersionedParams(&opts, scheme.ParameterCodec). Body(deployment). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a deployment and updates it. Returns the server's representation of the deployment, and an error, if there is any. -func (c *deployments) Update(deployment *v1.Deployment) (result *v1.Deployment, err error) { +func (c *deployments) Update(ctx context.Context, deployment *v1.Deployment, opts metav1.UpdateOptions) (result *v1.Deployment, err error) { result = &v1.Deployment{} err = c.client.Put(). Namespace(c.ns). Resource("deployments"). Name(deployment.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(deployment). - Do(). + Do(ctx). Into(result) return } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *deployments) UpdateStatus(deployment *v1.Deployment) (result *v1.Deployment, err error) { +func (c *deployments) UpdateStatus(ctx context.Context, deployment *v1.Deployment, opts metav1.UpdateOptions) (result *v1.Deployment, err error) { result = &v1.Deployment{} err = c.client.Put(). Namespace(c.ns). Resource("deployments"). Name(deployment.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(deployment). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the deployment and deletes it. Returns an error if one occurs. -func (c *deployments) Delete(name string, options *metav1.DeleteOptions) error { +func (c *deployments) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("deployments"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *deployments) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error { +func (c *deployments) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Namespace(c.ns). Resource("deployments"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched deployment. -func (c *deployments) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Deployment, err error) { +func (c *deployments) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Deployment, err error) { result = &v1.Deployment{} err = c.client.Patch(pt). Namespace(c.ns). Resource("deployments"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } // GetScale takes name of the deployment, and returns the corresponding autoscalingv1.Scale object, and an error if there is any. -func (c *deployments) GetScale(deploymentName string, options metav1.GetOptions) (result *autoscalingv1.Scale, err error) { +func (c *deployments) GetScale(ctx context.Context, deploymentName string, options metav1.GetOptions) (result *autoscalingv1.Scale, err error) { result = &autoscalingv1.Scale{} err = c.client.Get(). Namespace(c.ns). @@ -203,21 +207,22 @@ func (c *deployments) GetScale(deploymentName string, options metav1.GetOptions) Name(deploymentName). SubResource("scale"). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // UpdateScale takes the top resource name and the representation of a scale and updates it. Returns the server's representation of the scale, and an error, if there is any. -func (c *deployments) UpdateScale(deploymentName string, scale *autoscalingv1.Scale) (result *autoscalingv1.Scale, err error) { +func (c *deployments) UpdateScale(ctx context.Context, deploymentName string, scale *autoscalingv1.Scale, opts metav1.UpdateOptions) (result *autoscalingv1.Scale, err error) { result = &autoscalingv1.Scale{} err = c.client.Put(). Namespace(c.ns). Resource("deployments"). Name(deploymentName). SubResource("scale"). + VersionedParams(&opts, scheme.ParameterCodec). Body(scale). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1/fake/fake_controllerrevision.go b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1/fake/fake_controllerrevision.go index eb38bca41b..959fc758da 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1/fake/fake_controllerrevision.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1/fake/fake_controllerrevision.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + appsv1 "k8s.io/api/apps/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" @@ -39,7 +41,7 @@ var controllerrevisionsResource = schema.GroupVersionResource{Group: "apps", Ver var controllerrevisionsKind = schema.GroupVersionKind{Group: "apps", Version: "v1", Kind: "ControllerRevision"} // Get takes name of the controllerRevision, and returns the corresponding controllerRevision object, and an error if there is any. -func (c *FakeControllerRevisions) Get(name string, options v1.GetOptions) (result *appsv1.ControllerRevision, err error) { +func (c *FakeControllerRevisions) Get(ctx context.Context, name string, options v1.GetOptions) (result *appsv1.ControllerRevision, err error) { obj, err := c.Fake. Invokes(testing.NewGetAction(controllerrevisionsResource, c.ns, name), &appsv1.ControllerRevision{}) @@ -50,7 +52,7 @@ func (c *FakeControllerRevisions) Get(name string, options v1.GetOptions) (resul } // List takes label and field selectors, and returns the list of ControllerRevisions that match those selectors. -func (c *FakeControllerRevisions) List(opts v1.ListOptions) (result *appsv1.ControllerRevisionList, err error) { +func (c *FakeControllerRevisions) List(ctx context.Context, opts v1.ListOptions) (result *appsv1.ControllerRevisionList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(controllerrevisionsResource, controllerrevisionsKind, c.ns, opts), &appsv1.ControllerRevisionList{}) @@ -72,14 +74,14 @@ func (c *FakeControllerRevisions) List(opts v1.ListOptions) (result *appsv1.Cont } // Watch returns a watch.Interface that watches the requested controllerRevisions. -func (c *FakeControllerRevisions) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeControllerRevisions) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(controllerrevisionsResource, c.ns, opts)) } // Create takes the representation of a controllerRevision and creates it. Returns the server's representation of the controllerRevision, and an error, if there is any. -func (c *FakeControllerRevisions) Create(controllerRevision *appsv1.ControllerRevision) (result *appsv1.ControllerRevision, err error) { +func (c *FakeControllerRevisions) Create(ctx context.Context, controllerRevision *appsv1.ControllerRevision, opts v1.CreateOptions) (result *appsv1.ControllerRevision, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(controllerrevisionsResource, c.ns, controllerRevision), &appsv1.ControllerRevision{}) @@ -90,7 +92,7 @@ func (c *FakeControllerRevisions) Create(controllerRevision *appsv1.ControllerRe } // Update takes the representation of a controllerRevision and updates it. Returns the server's representation of the controllerRevision, and an error, if there is any. -func (c *FakeControllerRevisions) Update(controllerRevision *appsv1.ControllerRevision) (result *appsv1.ControllerRevision, err error) { +func (c *FakeControllerRevisions) Update(ctx context.Context, controllerRevision *appsv1.ControllerRevision, opts v1.UpdateOptions) (result *appsv1.ControllerRevision, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(controllerrevisionsResource, c.ns, controllerRevision), &appsv1.ControllerRevision{}) @@ -101,7 +103,7 @@ func (c *FakeControllerRevisions) Update(controllerRevision *appsv1.ControllerRe } // Delete takes name of the controllerRevision and deletes it. Returns an error if one occurs. -func (c *FakeControllerRevisions) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeControllerRevisions) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewDeleteAction(controllerrevisionsResource, c.ns, name), &appsv1.ControllerRevision{}) @@ -109,15 +111,15 @@ func (c *FakeControllerRevisions) Delete(name string, options *v1.DeleteOptions) } // DeleteCollection deletes a collection of objects. -func (c *FakeControllerRevisions) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(controllerrevisionsResource, c.ns, listOptions) +func (c *FakeControllerRevisions) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(controllerrevisionsResource, c.ns, listOpts) _, err := c.Fake.Invokes(action, &appsv1.ControllerRevisionList{}) return err } // Patch applies the patch and returns the patched controllerRevision. -func (c *FakeControllerRevisions) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *appsv1.ControllerRevision, err error) { +func (c *FakeControllerRevisions) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *appsv1.ControllerRevision, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(controllerrevisionsResource, c.ns, name, pt, data, subresources...), &appsv1.ControllerRevision{}) diff --git a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1/fake/fake_daemonset.go b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1/fake/fake_daemonset.go index c06336e970..3a799f6de2 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1/fake/fake_daemonset.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1/fake/fake_daemonset.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + appsv1 "k8s.io/api/apps/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" @@ -39,7 +41,7 @@ var daemonsetsResource = schema.GroupVersionResource{Group: "apps", Version: "v1 var daemonsetsKind = schema.GroupVersionKind{Group: "apps", Version: "v1", Kind: "DaemonSet"} // Get takes name of the daemonSet, and returns the corresponding daemonSet object, and an error if there is any. -func (c *FakeDaemonSets) Get(name string, options v1.GetOptions) (result *appsv1.DaemonSet, err error) { +func (c *FakeDaemonSets) Get(ctx context.Context, name string, options v1.GetOptions) (result *appsv1.DaemonSet, err error) { obj, err := c.Fake. Invokes(testing.NewGetAction(daemonsetsResource, c.ns, name), &appsv1.DaemonSet{}) @@ -50,7 +52,7 @@ func (c *FakeDaemonSets) Get(name string, options v1.GetOptions) (result *appsv1 } // List takes label and field selectors, and returns the list of DaemonSets that match those selectors. -func (c *FakeDaemonSets) List(opts v1.ListOptions) (result *appsv1.DaemonSetList, err error) { +func (c *FakeDaemonSets) List(ctx context.Context, opts v1.ListOptions) (result *appsv1.DaemonSetList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(daemonsetsResource, daemonsetsKind, c.ns, opts), &appsv1.DaemonSetList{}) @@ -72,14 +74,14 @@ func (c *FakeDaemonSets) List(opts v1.ListOptions) (result *appsv1.DaemonSetList } // Watch returns a watch.Interface that watches the requested daemonSets. -func (c *FakeDaemonSets) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeDaemonSets) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(daemonsetsResource, c.ns, opts)) } // Create takes the representation of a daemonSet and creates it. Returns the server's representation of the daemonSet, and an error, if there is any. -func (c *FakeDaemonSets) Create(daemonSet *appsv1.DaemonSet) (result *appsv1.DaemonSet, err error) { +func (c *FakeDaemonSets) Create(ctx context.Context, daemonSet *appsv1.DaemonSet, opts v1.CreateOptions) (result *appsv1.DaemonSet, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(daemonsetsResource, c.ns, daemonSet), &appsv1.DaemonSet{}) @@ -90,7 +92,7 @@ func (c *FakeDaemonSets) Create(daemonSet *appsv1.DaemonSet) (result *appsv1.Dae } // Update takes the representation of a daemonSet and updates it. Returns the server's representation of the daemonSet, and an error, if there is any. -func (c *FakeDaemonSets) Update(daemonSet *appsv1.DaemonSet) (result *appsv1.DaemonSet, err error) { +func (c *FakeDaemonSets) Update(ctx context.Context, daemonSet *appsv1.DaemonSet, opts v1.UpdateOptions) (result *appsv1.DaemonSet, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(daemonsetsResource, c.ns, daemonSet), &appsv1.DaemonSet{}) @@ -102,7 +104,7 @@ func (c *FakeDaemonSets) Update(daemonSet *appsv1.DaemonSet) (result *appsv1.Dae // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeDaemonSets) UpdateStatus(daemonSet *appsv1.DaemonSet) (*appsv1.DaemonSet, error) { +func (c *FakeDaemonSets) UpdateStatus(ctx context.Context, daemonSet *appsv1.DaemonSet, opts v1.UpdateOptions) (*appsv1.DaemonSet, error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(daemonsetsResource, "status", c.ns, daemonSet), &appsv1.DaemonSet{}) @@ -113,7 +115,7 @@ func (c *FakeDaemonSets) UpdateStatus(daemonSet *appsv1.DaemonSet) (*appsv1.Daem } // Delete takes name of the daemonSet and deletes it. Returns an error if one occurs. -func (c *FakeDaemonSets) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeDaemonSets) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewDeleteAction(daemonsetsResource, c.ns, name), &appsv1.DaemonSet{}) @@ -121,15 +123,15 @@ func (c *FakeDaemonSets) Delete(name string, options *v1.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *FakeDaemonSets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(daemonsetsResource, c.ns, listOptions) +func (c *FakeDaemonSets) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(daemonsetsResource, c.ns, listOpts) _, err := c.Fake.Invokes(action, &appsv1.DaemonSetList{}) return err } // Patch applies the patch and returns the patched daemonSet. -func (c *FakeDaemonSets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *appsv1.DaemonSet, err error) { +func (c *FakeDaemonSets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *appsv1.DaemonSet, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(daemonsetsResource, c.ns, name, pt, data, subresources...), &appsv1.DaemonSet{}) diff --git a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1/fake/fake_deployment.go b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1/fake/fake_deployment.go index 6a8cb379da..868742ac6c 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1/fake/fake_deployment.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1/fake/fake_deployment.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + appsv1 "k8s.io/api/apps/v1" autoscalingv1 "k8s.io/api/autoscaling/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -40,7 +42,7 @@ var deploymentsResource = schema.GroupVersionResource{Group: "apps", Version: "v var deploymentsKind = schema.GroupVersionKind{Group: "apps", Version: "v1", Kind: "Deployment"} // Get takes name of the deployment, and returns the corresponding deployment object, and an error if there is any. -func (c *FakeDeployments) Get(name string, options v1.GetOptions) (result *appsv1.Deployment, err error) { +func (c *FakeDeployments) Get(ctx context.Context, name string, options v1.GetOptions) (result *appsv1.Deployment, err error) { obj, err := c.Fake. Invokes(testing.NewGetAction(deploymentsResource, c.ns, name), &appsv1.Deployment{}) @@ -51,7 +53,7 @@ func (c *FakeDeployments) Get(name string, options v1.GetOptions) (result *appsv } // List takes label and field selectors, and returns the list of Deployments that match those selectors. -func (c *FakeDeployments) List(opts v1.ListOptions) (result *appsv1.DeploymentList, err error) { +func (c *FakeDeployments) List(ctx context.Context, opts v1.ListOptions) (result *appsv1.DeploymentList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(deploymentsResource, deploymentsKind, c.ns, opts), &appsv1.DeploymentList{}) @@ -73,14 +75,14 @@ func (c *FakeDeployments) List(opts v1.ListOptions) (result *appsv1.DeploymentLi } // Watch returns a watch.Interface that watches the requested deployments. -func (c *FakeDeployments) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeDeployments) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(deploymentsResource, c.ns, opts)) } // Create takes the representation of a deployment and creates it. Returns the server's representation of the deployment, and an error, if there is any. -func (c *FakeDeployments) Create(deployment *appsv1.Deployment) (result *appsv1.Deployment, err error) { +func (c *FakeDeployments) Create(ctx context.Context, deployment *appsv1.Deployment, opts v1.CreateOptions) (result *appsv1.Deployment, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(deploymentsResource, c.ns, deployment), &appsv1.Deployment{}) @@ -91,7 +93,7 @@ func (c *FakeDeployments) Create(deployment *appsv1.Deployment) (result *appsv1. } // Update takes the representation of a deployment and updates it. Returns the server's representation of the deployment, and an error, if there is any. -func (c *FakeDeployments) Update(deployment *appsv1.Deployment) (result *appsv1.Deployment, err error) { +func (c *FakeDeployments) Update(ctx context.Context, deployment *appsv1.Deployment, opts v1.UpdateOptions) (result *appsv1.Deployment, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(deploymentsResource, c.ns, deployment), &appsv1.Deployment{}) @@ -103,7 +105,7 @@ func (c *FakeDeployments) Update(deployment *appsv1.Deployment) (result *appsv1. // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeDeployments) UpdateStatus(deployment *appsv1.Deployment) (*appsv1.Deployment, error) { +func (c *FakeDeployments) UpdateStatus(ctx context.Context, deployment *appsv1.Deployment, opts v1.UpdateOptions) (*appsv1.Deployment, error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(deploymentsResource, "status", c.ns, deployment), &appsv1.Deployment{}) @@ -114,7 +116,7 @@ func (c *FakeDeployments) UpdateStatus(deployment *appsv1.Deployment) (*appsv1.D } // Delete takes name of the deployment and deletes it. Returns an error if one occurs. -func (c *FakeDeployments) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeDeployments) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewDeleteAction(deploymentsResource, c.ns, name), &appsv1.Deployment{}) @@ -122,15 +124,15 @@ func (c *FakeDeployments) Delete(name string, options *v1.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *FakeDeployments) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(deploymentsResource, c.ns, listOptions) +func (c *FakeDeployments) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(deploymentsResource, c.ns, listOpts) _, err := c.Fake.Invokes(action, &appsv1.DeploymentList{}) return err } // Patch applies the patch and returns the patched deployment. -func (c *FakeDeployments) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *appsv1.Deployment, err error) { +func (c *FakeDeployments) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *appsv1.Deployment, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(deploymentsResource, c.ns, name, pt, data, subresources...), &appsv1.Deployment{}) @@ -141,7 +143,7 @@ func (c *FakeDeployments) Patch(name string, pt types.PatchType, data []byte, su } // GetScale takes name of the deployment, and returns the corresponding scale object, and an error if there is any. -func (c *FakeDeployments) GetScale(deploymentName string, options v1.GetOptions) (result *autoscalingv1.Scale, err error) { +func (c *FakeDeployments) GetScale(ctx context.Context, deploymentName string, options v1.GetOptions) (result *autoscalingv1.Scale, err error) { obj, err := c.Fake. Invokes(testing.NewGetSubresourceAction(deploymentsResource, c.ns, "scale", deploymentName), &autoscalingv1.Scale{}) @@ -152,7 +154,7 @@ func (c *FakeDeployments) GetScale(deploymentName string, options v1.GetOptions) } // UpdateScale takes the representation of a scale and updates it. Returns the server's representation of the scale, and an error, if there is any. -func (c *FakeDeployments) UpdateScale(deploymentName string, scale *autoscalingv1.Scale) (result *autoscalingv1.Scale, err error) { +func (c *FakeDeployments) UpdateScale(ctx context.Context, deploymentName string, scale *autoscalingv1.Scale, opts v1.UpdateOptions) (result *autoscalingv1.Scale, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(deploymentsResource, "scale", c.ns, scale), &autoscalingv1.Scale{}) diff --git a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1/fake/fake_replicaset.go b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1/fake/fake_replicaset.go index e871f82f76..9e6912b7ee 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1/fake/fake_replicaset.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1/fake/fake_replicaset.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + appsv1 "k8s.io/api/apps/v1" autoscalingv1 "k8s.io/api/autoscaling/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -40,7 +42,7 @@ var replicasetsResource = schema.GroupVersionResource{Group: "apps", Version: "v var replicasetsKind = schema.GroupVersionKind{Group: "apps", Version: "v1", Kind: "ReplicaSet"} // Get takes name of the replicaSet, and returns the corresponding replicaSet object, and an error if there is any. -func (c *FakeReplicaSets) Get(name string, options v1.GetOptions) (result *appsv1.ReplicaSet, err error) { +func (c *FakeReplicaSets) Get(ctx context.Context, name string, options v1.GetOptions) (result *appsv1.ReplicaSet, err error) { obj, err := c.Fake. Invokes(testing.NewGetAction(replicasetsResource, c.ns, name), &appsv1.ReplicaSet{}) @@ -51,7 +53,7 @@ func (c *FakeReplicaSets) Get(name string, options v1.GetOptions) (result *appsv } // List takes label and field selectors, and returns the list of ReplicaSets that match those selectors. -func (c *FakeReplicaSets) List(opts v1.ListOptions) (result *appsv1.ReplicaSetList, err error) { +func (c *FakeReplicaSets) List(ctx context.Context, opts v1.ListOptions) (result *appsv1.ReplicaSetList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(replicasetsResource, replicasetsKind, c.ns, opts), &appsv1.ReplicaSetList{}) @@ -73,14 +75,14 @@ func (c *FakeReplicaSets) List(opts v1.ListOptions) (result *appsv1.ReplicaSetLi } // Watch returns a watch.Interface that watches the requested replicaSets. -func (c *FakeReplicaSets) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeReplicaSets) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(replicasetsResource, c.ns, opts)) } // Create takes the representation of a replicaSet and creates it. Returns the server's representation of the replicaSet, and an error, if there is any. -func (c *FakeReplicaSets) Create(replicaSet *appsv1.ReplicaSet) (result *appsv1.ReplicaSet, err error) { +func (c *FakeReplicaSets) Create(ctx context.Context, replicaSet *appsv1.ReplicaSet, opts v1.CreateOptions) (result *appsv1.ReplicaSet, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(replicasetsResource, c.ns, replicaSet), &appsv1.ReplicaSet{}) @@ -91,7 +93,7 @@ func (c *FakeReplicaSets) Create(replicaSet *appsv1.ReplicaSet) (result *appsv1. } // Update takes the representation of a replicaSet and updates it. Returns the server's representation of the replicaSet, and an error, if there is any. -func (c *FakeReplicaSets) Update(replicaSet *appsv1.ReplicaSet) (result *appsv1.ReplicaSet, err error) { +func (c *FakeReplicaSets) Update(ctx context.Context, replicaSet *appsv1.ReplicaSet, opts v1.UpdateOptions) (result *appsv1.ReplicaSet, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(replicasetsResource, c.ns, replicaSet), &appsv1.ReplicaSet{}) @@ -103,7 +105,7 @@ func (c *FakeReplicaSets) Update(replicaSet *appsv1.ReplicaSet) (result *appsv1. // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeReplicaSets) UpdateStatus(replicaSet *appsv1.ReplicaSet) (*appsv1.ReplicaSet, error) { +func (c *FakeReplicaSets) UpdateStatus(ctx context.Context, replicaSet *appsv1.ReplicaSet, opts v1.UpdateOptions) (*appsv1.ReplicaSet, error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(replicasetsResource, "status", c.ns, replicaSet), &appsv1.ReplicaSet{}) @@ -114,7 +116,7 @@ func (c *FakeReplicaSets) UpdateStatus(replicaSet *appsv1.ReplicaSet) (*appsv1.R } // Delete takes name of the replicaSet and deletes it. Returns an error if one occurs. -func (c *FakeReplicaSets) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeReplicaSets) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewDeleteAction(replicasetsResource, c.ns, name), &appsv1.ReplicaSet{}) @@ -122,15 +124,15 @@ func (c *FakeReplicaSets) Delete(name string, options *v1.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *FakeReplicaSets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(replicasetsResource, c.ns, listOptions) +func (c *FakeReplicaSets) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(replicasetsResource, c.ns, listOpts) _, err := c.Fake.Invokes(action, &appsv1.ReplicaSetList{}) return err } // Patch applies the patch and returns the patched replicaSet. -func (c *FakeReplicaSets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *appsv1.ReplicaSet, err error) { +func (c *FakeReplicaSets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *appsv1.ReplicaSet, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(replicasetsResource, c.ns, name, pt, data, subresources...), &appsv1.ReplicaSet{}) @@ -141,7 +143,7 @@ func (c *FakeReplicaSets) Patch(name string, pt types.PatchType, data []byte, su } // GetScale takes name of the replicaSet, and returns the corresponding scale object, and an error if there is any. -func (c *FakeReplicaSets) GetScale(replicaSetName string, options v1.GetOptions) (result *autoscalingv1.Scale, err error) { +func (c *FakeReplicaSets) GetScale(ctx context.Context, replicaSetName string, options v1.GetOptions) (result *autoscalingv1.Scale, err error) { obj, err := c.Fake. Invokes(testing.NewGetSubresourceAction(replicasetsResource, c.ns, "scale", replicaSetName), &autoscalingv1.Scale{}) @@ -152,7 +154,7 @@ func (c *FakeReplicaSets) GetScale(replicaSetName string, options v1.GetOptions) } // UpdateScale takes the representation of a scale and updates it. Returns the server's representation of the scale, and an error, if there is any. -func (c *FakeReplicaSets) UpdateScale(replicaSetName string, scale *autoscalingv1.Scale) (result *autoscalingv1.Scale, err error) { +func (c *FakeReplicaSets) UpdateScale(ctx context.Context, replicaSetName string, scale *autoscalingv1.Scale, opts v1.UpdateOptions) (result *autoscalingv1.Scale, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(replicasetsResource, "scale", c.ns, scale), &autoscalingv1.Scale{}) diff --git a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1/fake/fake_statefulset.go b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1/fake/fake_statefulset.go index 83e80bff49..65eea8dc3d 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1/fake/fake_statefulset.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1/fake/fake_statefulset.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + appsv1 "k8s.io/api/apps/v1" autoscalingv1 "k8s.io/api/autoscaling/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -40,7 +42,7 @@ var statefulsetsResource = schema.GroupVersionResource{Group: "apps", Version: " var statefulsetsKind = schema.GroupVersionKind{Group: "apps", Version: "v1", Kind: "StatefulSet"} // Get takes name of the statefulSet, and returns the corresponding statefulSet object, and an error if there is any. -func (c *FakeStatefulSets) Get(name string, options v1.GetOptions) (result *appsv1.StatefulSet, err error) { +func (c *FakeStatefulSets) Get(ctx context.Context, name string, options v1.GetOptions) (result *appsv1.StatefulSet, err error) { obj, err := c.Fake. Invokes(testing.NewGetAction(statefulsetsResource, c.ns, name), &appsv1.StatefulSet{}) @@ -51,7 +53,7 @@ func (c *FakeStatefulSets) Get(name string, options v1.GetOptions) (result *apps } // List takes label and field selectors, and returns the list of StatefulSets that match those selectors. -func (c *FakeStatefulSets) List(opts v1.ListOptions) (result *appsv1.StatefulSetList, err error) { +func (c *FakeStatefulSets) List(ctx context.Context, opts v1.ListOptions) (result *appsv1.StatefulSetList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(statefulsetsResource, statefulsetsKind, c.ns, opts), &appsv1.StatefulSetList{}) @@ -73,14 +75,14 @@ func (c *FakeStatefulSets) List(opts v1.ListOptions) (result *appsv1.StatefulSet } // Watch returns a watch.Interface that watches the requested statefulSets. -func (c *FakeStatefulSets) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeStatefulSets) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(statefulsetsResource, c.ns, opts)) } // Create takes the representation of a statefulSet and creates it. Returns the server's representation of the statefulSet, and an error, if there is any. -func (c *FakeStatefulSets) Create(statefulSet *appsv1.StatefulSet) (result *appsv1.StatefulSet, err error) { +func (c *FakeStatefulSets) Create(ctx context.Context, statefulSet *appsv1.StatefulSet, opts v1.CreateOptions) (result *appsv1.StatefulSet, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(statefulsetsResource, c.ns, statefulSet), &appsv1.StatefulSet{}) @@ -91,7 +93,7 @@ func (c *FakeStatefulSets) Create(statefulSet *appsv1.StatefulSet) (result *apps } // Update takes the representation of a statefulSet and updates it. Returns the server's representation of the statefulSet, and an error, if there is any. -func (c *FakeStatefulSets) Update(statefulSet *appsv1.StatefulSet) (result *appsv1.StatefulSet, err error) { +func (c *FakeStatefulSets) Update(ctx context.Context, statefulSet *appsv1.StatefulSet, opts v1.UpdateOptions) (result *appsv1.StatefulSet, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(statefulsetsResource, c.ns, statefulSet), &appsv1.StatefulSet{}) @@ -103,7 +105,7 @@ func (c *FakeStatefulSets) Update(statefulSet *appsv1.StatefulSet) (result *apps // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeStatefulSets) UpdateStatus(statefulSet *appsv1.StatefulSet) (*appsv1.StatefulSet, error) { +func (c *FakeStatefulSets) UpdateStatus(ctx context.Context, statefulSet *appsv1.StatefulSet, opts v1.UpdateOptions) (*appsv1.StatefulSet, error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(statefulsetsResource, "status", c.ns, statefulSet), &appsv1.StatefulSet{}) @@ -114,7 +116,7 @@ func (c *FakeStatefulSets) UpdateStatus(statefulSet *appsv1.StatefulSet) (*appsv } // Delete takes name of the statefulSet and deletes it. Returns an error if one occurs. -func (c *FakeStatefulSets) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeStatefulSets) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewDeleteAction(statefulsetsResource, c.ns, name), &appsv1.StatefulSet{}) @@ -122,15 +124,15 @@ func (c *FakeStatefulSets) Delete(name string, options *v1.DeleteOptions) error } // DeleteCollection deletes a collection of objects. -func (c *FakeStatefulSets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(statefulsetsResource, c.ns, listOptions) +func (c *FakeStatefulSets) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(statefulsetsResource, c.ns, listOpts) _, err := c.Fake.Invokes(action, &appsv1.StatefulSetList{}) return err } // Patch applies the patch and returns the patched statefulSet. -func (c *FakeStatefulSets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *appsv1.StatefulSet, err error) { +func (c *FakeStatefulSets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *appsv1.StatefulSet, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(statefulsetsResource, c.ns, name, pt, data, subresources...), &appsv1.StatefulSet{}) @@ -141,7 +143,7 @@ func (c *FakeStatefulSets) Patch(name string, pt types.PatchType, data []byte, s } // GetScale takes name of the statefulSet, and returns the corresponding scale object, and an error if there is any. -func (c *FakeStatefulSets) GetScale(statefulSetName string, options v1.GetOptions) (result *autoscalingv1.Scale, err error) { +func (c *FakeStatefulSets) GetScale(ctx context.Context, statefulSetName string, options v1.GetOptions) (result *autoscalingv1.Scale, err error) { obj, err := c.Fake. Invokes(testing.NewGetSubresourceAction(statefulsetsResource, c.ns, "scale", statefulSetName), &autoscalingv1.Scale{}) @@ -152,7 +154,7 @@ func (c *FakeStatefulSets) GetScale(statefulSetName string, options v1.GetOption } // UpdateScale takes the representation of a scale and updates it. Returns the server's representation of the scale, and an error, if there is any. -func (c *FakeStatefulSets) UpdateScale(statefulSetName string, scale *autoscalingv1.Scale) (result *autoscalingv1.Scale, err error) { +func (c *FakeStatefulSets) UpdateScale(ctx context.Context, statefulSetName string, scale *autoscalingv1.Scale, opts v1.UpdateOptions) (result *autoscalingv1.Scale, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(statefulsetsResource, "scale", c.ns, scale), &autoscalingv1.Scale{}) diff --git a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1/replicaset.go b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1/replicaset.go index ff3504e78a..377b9ca37a 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1/replicaset.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1/replicaset.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" "time" v1 "k8s.io/api/apps/v1" @@ -38,17 +39,17 @@ type ReplicaSetsGetter interface { // ReplicaSetInterface has methods to work with ReplicaSet resources. type ReplicaSetInterface interface { - Create(*v1.ReplicaSet) (*v1.ReplicaSet, error) - Update(*v1.ReplicaSet) (*v1.ReplicaSet, error) - UpdateStatus(*v1.ReplicaSet) (*v1.ReplicaSet, error) - Delete(name string, options *metav1.DeleteOptions) error - DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error - Get(name string, options metav1.GetOptions) (*v1.ReplicaSet, error) - List(opts metav1.ListOptions) (*v1.ReplicaSetList, error) - Watch(opts metav1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ReplicaSet, err error) - GetScale(replicaSetName string, options metav1.GetOptions) (*autoscalingv1.Scale, error) - UpdateScale(replicaSetName string, scale *autoscalingv1.Scale) (*autoscalingv1.Scale, error) + Create(ctx context.Context, replicaSet *v1.ReplicaSet, opts metav1.CreateOptions) (*v1.ReplicaSet, error) + Update(ctx context.Context, replicaSet *v1.ReplicaSet, opts metav1.UpdateOptions) (*v1.ReplicaSet, error) + UpdateStatus(ctx context.Context, replicaSet *v1.ReplicaSet, opts metav1.UpdateOptions) (*v1.ReplicaSet, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.ReplicaSet, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.ReplicaSetList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ReplicaSet, err error) + GetScale(ctx context.Context, replicaSetName string, options metav1.GetOptions) (*autoscalingv1.Scale, error) + UpdateScale(ctx context.Context, replicaSetName string, scale *autoscalingv1.Scale, opts metav1.UpdateOptions) (*autoscalingv1.Scale, error) ReplicaSetExpansion } @@ -68,20 +69,20 @@ func newReplicaSets(c *AppsV1Client, namespace string) *replicaSets { } // Get takes name of the replicaSet, and returns the corresponding replicaSet object, and an error if there is any. -func (c *replicaSets) Get(name string, options metav1.GetOptions) (result *v1.ReplicaSet, err error) { +func (c *replicaSets) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ReplicaSet, err error) { result = &v1.ReplicaSet{} err = c.client.Get(). Namespace(c.ns). Resource("replicasets"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of ReplicaSets that match those selectors. -func (c *replicaSets) List(opts metav1.ListOptions) (result *v1.ReplicaSetList, err error) { +func (c *replicaSets) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ReplicaSetList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -92,13 +93,13 @@ func (c *replicaSets) List(opts metav1.ListOptions) (result *v1.ReplicaSetList, Resource("replicasets"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested replicaSets. -func (c *replicaSets) Watch(opts metav1.ListOptions) (watch.Interface, error) { +func (c *replicaSets) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -109,93 +110,96 @@ func (c *replicaSets) Watch(opts metav1.ListOptions) (watch.Interface, error) { Resource("replicasets"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a replicaSet and creates it. Returns the server's representation of the replicaSet, and an error, if there is any. -func (c *replicaSets) Create(replicaSet *v1.ReplicaSet) (result *v1.ReplicaSet, err error) { +func (c *replicaSets) Create(ctx context.Context, replicaSet *v1.ReplicaSet, opts metav1.CreateOptions) (result *v1.ReplicaSet, err error) { result = &v1.ReplicaSet{} err = c.client.Post(). Namespace(c.ns). Resource("replicasets"). + VersionedParams(&opts, scheme.ParameterCodec). Body(replicaSet). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a replicaSet and updates it. Returns the server's representation of the replicaSet, and an error, if there is any. -func (c *replicaSets) Update(replicaSet *v1.ReplicaSet) (result *v1.ReplicaSet, err error) { +func (c *replicaSets) Update(ctx context.Context, replicaSet *v1.ReplicaSet, opts metav1.UpdateOptions) (result *v1.ReplicaSet, err error) { result = &v1.ReplicaSet{} err = c.client.Put(). Namespace(c.ns). Resource("replicasets"). Name(replicaSet.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(replicaSet). - Do(). + Do(ctx). Into(result) return } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *replicaSets) UpdateStatus(replicaSet *v1.ReplicaSet) (result *v1.ReplicaSet, err error) { +func (c *replicaSets) UpdateStatus(ctx context.Context, replicaSet *v1.ReplicaSet, opts metav1.UpdateOptions) (result *v1.ReplicaSet, err error) { result = &v1.ReplicaSet{} err = c.client.Put(). Namespace(c.ns). Resource("replicasets"). Name(replicaSet.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(replicaSet). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the replicaSet and deletes it. Returns an error if one occurs. -func (c *replicaSets) Delete(name string, options *metav1.DeleteOptions) error { +func (c *replicaSets) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("replicasets"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *replicaSets) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error { +func (c *replicaSets) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Namespace(c.ns). Resource("replicasets"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched replicaSet. -func (c *replicaSets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ReplicaSet, err error) { +func (c *replicaSets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ReplicaSet, err error) { result = &v1.ReplicaSet{} err = c.client.Patch(pt). Namespace(c.ns). Resource("replicasets"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } // GetScale takes name of the replicaSet, and returns the corresponding autoscalingv1.Scale object, and an error if there is any. -func (c *replicaSets) GetScale(replicaSetName string, options metav1.GetOptions) (result *autoscalingv1.Scale, err error) { +func (c *replicaSets) GetScale(ctx context.Context, replicaSetName string, options metav1.GetOptions) (result *autoscalingv1.Scale, err error) { result = &autoscalingv1.Scale{} err = c.client.Get(). Namespace(c.ns). @@ -203,21 +207,22 @@ func (c *replicaSets) GetScale(replicaSetName string, options metav1.GetOptions) Name(replicaSetName). SubResource("scale"). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // UpdateScale takes the top resource name and the representation of a scale and updates it. Returns the server's representation of the scale, and an error, if there is any. -func (c *replicaSets) UpdateScale(replicaSetName string, scale *autoscalingv1.Scale) (result *autoscalingv1.Scale, err error) { +func (c *replicaSets) UpdateScale(ctx context.Context, replicaSetName string, scale *autoscalingv1.Scale, opts metav1.UpdateOptions) (result *autoscalingv1.Scale, err error) { result = &autoscalingv1.Scale{} err = c.client.Put(). Namespace(c.ns). Resource("replicasets"). Name(replicaSetName). SubResource("scale"). + VersionedParams(&opts, scheme.ParameterCodec). Body(scale). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1/statefulset.go b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1/statefulset.go index c12c470bba..33a9f535c1 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1/statefulset.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1/statefulset.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" "time" v1 "k8s.io/api/apps/v1" @@ -38,17 +39,17 @@ type StatefulSetsGetter interface { // StatefulSetInterface has methods to work with StatefulSet resources. type StatefulSetInterface interface { - Create(*v1.StatefulSet) (*v1.StatefulSet, error) - Update(*v1.StatefulSet) (*v1.StatefulSet, error) - UpdateStatus(*v1.StatefulSet) (*v1.StatefulSet, error) - Delete(name string, options *metav1.DeleteOptions) error - DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error - Get(name string, options metav1.GetOptions) (*v1.StatefulSet, error) - List(opts metav1.ListOptions) (*v1.StatefulSetList, error) - Watch(opts metav1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.StatefulSet, err error) - GetScale(statefulSetName string, options metav1.GetOptions) (*autoscalingv1.Scale, error) - UpdateScale(statefulSetName string, scale *autoscalingv1.Scale) (*autoscalingv1.Scale, error) + Create(ctx context.Context, statefulSet *v1.StatefulSet, opts metav1.CreateOptions) (*v1.StatefulSet, error) + Update(ctx context.Context, statefulSet *v1.StatefulSet, opts metav1.UpdateOptions) (*v1.StatefulSet, error) + UpdateStatus(ctx context.Context, statefulSet *v1.StatefulSet, opts metav1.UpdateOptions) (*v1.StatefulSet, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.StatefulSet, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.StatefulSetList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.StatefulSet, err error) + GetScale(ctx context.Context, statefulSetName string, options metav1.GetOptions) (*autoscalingv1.Scale, error) + UpdateScale(ctx context.Context, statefulSetName string, scale *autoscalingv1.Scale, opts metav1.UpdateOptions) (*autoscalingv1.Scale, error) StatefulSetExpansion } @@ -68,20 +69,20 @@ func newStatefulSets(c *AppsV1Client, namespace string) *statefulSets { } // Get takes name of the statefulSet, and returns the corresponding statefulSet object, and an error if there is any. -func (c *statefulSets) Get(name string, options metav1.GetOptions) (result *v1.StatefulSet, err error) { +func (c *statefulSets) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.StatefulSet, err error) { result = &v1.StatefulSet{} err = c.client.Get(). Namespace(c.ns). Resource("statefulsets"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of StatefulSets that match those selectors. -func (c *statefulSets) List(opts metav1.ListOptions) (result *v1.StatefulSetList, err error) { +func (c *statefulSets) List(ctx context.Context, opts metav1.ListOptions) (result *v1.StatefulSetList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -92,13 +93,13 @@ func (c *statefulSets) List(opts metav1.ListOptions) (result *v1.StatefulSetList Resource("statefulsets"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested statefulSets. -func (c *statefulSets) Watch(opts metav1.ListOptions) (watch.Interface, error) { +func (c *statefulSets) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -109,93 +110,96 @@ func (c *statefulSets) Watch(opts metav1.ListOptions) (watch.Interface, error) { Resource("statefulsets"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a statefulSet and creates it. Returns the server's representation of the statefulSet, and an error, if there is any. -func (c *statefulSets) Create(statefulSet *v1.StatefulSet) (result *v1.StatefulSet, err error) { +func (c *statefulSets) Create(ctx context.Context, statefulSet *v1.StatefulSet, opts metav1.CreateOptions) (result *v1.StatefulSet, err error) { result = &v1.StatefulSet{} err = c.client.Post(). Namespace(c.ns). Resource("statefulsets"). + VersionedParams(&opts, scheme.ParameterCodec). Body(statefulSet). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a statefulSet and updates it. Returns the server's representation of the statefulSet, and an error, if there is any. -func (c *statefulSets) Update(statefulSet *v1.StatefulSet) (result *v1.StatefulSet, err error) { +func (c *statefulSets) Update(ctx context.Context, statefulSet *v1.StatefulSet, opts metav1.UpdateOptions) (result *v1.StatefulSet, err error) { result = &v1.StatefulSet{} err = c.client.Put(). Namespace(c.ns). Resource("statefulsets"). Name(statefulSet.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(statefulSet). - Do(). + Do(ctx). Into(result) return } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *statefulSets) UpdateStatus(statefulSet *v1.StatefulSet) (result *v1.StatefulSet, err error) { +func (c *statefulSets) UpdateStatus(ctx context.Context, statefulSet *v1.StatefulSet, opts metav1.UpdateOptions) (result *v1.StatefulSet, err error) { result = &v1.StatefulSet{} err = c.client.Put(). Namespace(c.ns). Resource("statefulsets"). Name(statefulSet.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(statefulSet). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the statefulSet and deletes it. Returns an error if one occurs. -func (c *statefulSets) Delete(name string, options *metav1.DeleteOptions) error { +func (c *statefulSets) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("statefulsets"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *statefulSets) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error { +func (c *statefulSets) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Namespace(c.ns). Resource("statefulsets"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched statefulSet. -func (c *statefulSets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.StatefulSet, err error) { +func (c *statefulSets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.StatefulSet, err error) { result = &v1.StatefulSet{} err = c.client.Patch(pt). Namespace(c.ns). Resource("statefulsets"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } // GetScale takes name of the statefulSet, and returns the corresponding autoscalingv1.Scale object, and an error if there is any. -func (c *statefulSets) GetScale(statefulSetName string, options metav1.GetOptions) (result *autoscalingv1.Scale, err error) { +func (c *statefulSets) GetScale(ctx context.Context, statefulSetName string, options metav1.GetOptions) (result *autoscalingv1.Scale, err error) { result = &autoscalingv1.Scale{} err = c.client.Get(). Namespace(c.ns). @@ -203,21 +207,22 @@ func (c *statefulSets) GetScale(statefulSetName string, options metav1.GetOption Name(statefulSetName). SubResource("scale"). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // UpdateScale takes the top resource name and the representation of a scale and updates it. Returns the server's representation of the scale, and an error, if there is any. -func (c *statefulSets) UpdateScale(statefulSetName string, scale *autoscalingv1.Scale) (result *autoscalingv1.Scale, err error) { +func (c *statefulSets) UpdateScale(ctx context.Context, statefulSetName string, scale *autoscalingv1.Scale, opts metav1.UpdateOptions) (result *autoscalingv1.Scale, err error) { result = &autoscalingv1.Scale{} err = c.client.Put(). Namespace(c.ns). Resource("statefulsets"). Name(statefulSetName). SubResource("scale"). + VersionedParams(&opts, scheme.ParameterCodec). Body(scale). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/controllerrevision.go b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/controllerrevision.go index 45ddb91592..e247e07d03 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/controllerrevision.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/controllerrevision.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" "time" v1beta1 "k8s.io/api/apps/v1beta1" @@ -37,14 +38,14 @@ type ControllerRevisionsGetter interface { // ControllerRevisionInterface has methods to work with ControllerRevision resources. type ControllerRevisionInterface interface { - Create(*v1beta1.ControllerRevision) (*v1beta1.ControllerRevision, error) - Update(*v1beta1.ControllerRevision) (*v1beta1.ControllerRevision, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*v1beta1.ControllerRevision, error) - List(opts v1.ListOptions) (*v1beta1.ControllerRevisionList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ControllerRevision, err error) + Create(ctx context.Context, controllerRevision *v1beta1.ControllerRevision, opts v1.CreateOptions) (*v1beta1.ControllerRevision, error) + Update(ctx context.Context, controllerRevision *v1beta1.ControllerRevision, opts v1.UpdateOptions) (*v1beta1.ControllerRevision, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.ControllerRevision, error) + List(ctx context.Context, opts v1.ListOptions) (*v1beta1.ControllerRevisionList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.ControllerRevision, err error) ControllerRevisionExpansion } @@ -63,20 +64,20 @@ func newControllerRevisions(c *AppsV1beta1Client, namespace string) *controllerR } // Get takes name of the controllerRevision, and returns the corresponding controllerRevision object, and an error if there is any. -func (c *controllerRevisions) Get(name string, options v1.GetOptions) (result *v1beta1.ControllerRevision, err error) { +func (c *controllerRevisions) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.ControllerRevision, err error) { result = &v1beta1.ControllerRevision{} err = c.client.Get(). Namespace(c.ns). Resource("controllerrevisions"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of ControllerRevisions that match those selectors. -func (c *controllerRevisions) List(opts v1.ListOptions) (result *v1beta1.ControllerRevisionList, err error) { +func (c *controllerRevisions) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.ControllerRevisionList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -87,13 +88,13 @@ func (c *controllerRevisions) List(opts v1.ListOptions) (result *v1beta1.Control Resource("controllerrevisions"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested controllerRevisions. -func (c *controllerRevisions) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *controllerRevisions) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -104,71 +105,74 @@ func (c *controllerRevisions) Watch(opts v1.ListOptions) (watch.Interface, error Resource("controllerrevisions"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a controllerRevision and creates it. Returns the server's representation of the controllerRevision, and an error, if there is any. -func (c *controllerRevisions) Create(controllerRevision *v1beta1.ControllerRevision) (result *v1beta1.ControllerRevision, err error) { +func (c *controllerRevisions) Create(ctx context.Context, controllerRevision *v1beta1.ControllerRevision, opts v1.CreateOptions) (result *v1beta1.ControllerRevision, err error) { result = &v1beta1.ControllerRevision{} err = c.client.Post(). Namespace(c.ns). Resource("controllerrevisions"). + VersionedParams(&opts, scheme.ParameterCodec). Body(controllerRevision). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a controllerRevision and updates it. Returns the server's representation of the controllerRevision, and an error, if there is any. -func (c *controllerRevisions) Update(controllerRevision *v1beta1.ControllerRevision) (result *v1beta1.ControllerRevision, err error) { +func (c *controllerRevisions) Update(ctx context.Context, controllerRevision *v1beta1.ControllerRevision, opts v1.UpdateOptions) (result *v1beta1.ControllerRevision, err error) { result = &v1beta1.ControllerRevision{} err = c.client.Put(). Namespace(c.ns). Resource("controllerrevisions"). Name(controllerRevision.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(controllerRevision). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the controllerRevision and deletes it. Returns an error if one occurs. -func (c *controllerRevisions) Delete(name string, options *v1.DeleteOptions) error { +func (c *controllerRevisions) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("controllerrevisions"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *controllerRevisions) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *controllerRevisions) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Namespace(c.ns). Resource("controllerrevisions"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched controllerRevision. -func (c *controllerRevisions) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ControllerRevision, err error) { +func (c *controllerRevisions) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.ControllerRevision, err error) { result = &v1beta1.ControllerRevision{} err = c.client.Patch(pt). Namespace(c.ns). Resource("controllerrevisions"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/deployment.go b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/deployment.go index 05fdcb7a64..dc0dad044d 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/deployment.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/deployment.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" "time" v1beta1 "k8s.io/api/apps/v1beta1" @@ -37,15 +38,15 @@ type DeploymentsGetter interface { // DeploymentInterface has methods to work with Deployment resources. type DeploymentInterface interface { - Create(*v1beta1.Deployment) (*v1beta1.Deployment, error) - Update(*v1beta1.Deployment) (*v1beta1.Deployment, error) - UpdateStatus(*v1beta1.Deployment) (*v1beta1.Deployment, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*v1beta1.Deployment, error) - List(opts v1.ListOptions) (*v1beta1.DeploymentList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Deployment, err error) + Create(ctx context.Context, deployment *v1beta1.Deployment, opts v1.CreateOptions) (*v1beta1.Deployment, error) + Update(ctx context.Context, deployment *v1beta1.Deployment, opts v1.UpdateOptions) (*v1beta1.Deployment, error) + UpdateStatus(ctx context.Context, deployment *v1beta1.Deployment, opts v1.UpdateOptions) (*v1beta1.Deployment, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.Deployment, error) + List(ctx context.Context, opts v1.ListOptions) (*v1beta1.DeploymentList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Deployment, err error) DeploymentExpansion } @@ -64,20 +65,20 @@ func newDeployments(c *AppsV1beta1Client, namespace string) *deployments { } // Get takes name of the deployment, and returns the corresponding deployment object, and an error if there is any. -func (c *deployments) Get(name string, options v1.GetOptions) (result *v1beta1.Deployment, err error) { +func (c *deployments) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.Deployment, err error) { result = &v1beta1.Deployment{} err = c.client.Get(). Namespace(c.ns). Resource("deployments"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of Deployments that match those selectors. -func (c *deployments) List(opts v1.ListOptions) (result *v1beta1.DeploymentList, err error) { +func (c *deployments) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.DeploymentList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -88,13 +89,13 @@ func (c *deployments) List(opts v1.ListOptions) (result *v1beta1.DeploymentList, Resource("deployments"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested deployments. -func (c *deployments) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *deployments) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -105,87 +106,90 @@ func (c *deployments) Watch(opts v1.ListOptions) (watch.Interface, error) { Resource("deployments"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a deployment and creates it. Returns the server's representation of the deployment, and an error, if there is any. -func (c *deployments) Create(deployment *v1beta1.Deployment) (result *v1beta1.Deployment, err error) { +func (c *deployments) Create(ctx context.Context, deployment *v1beta1.Deployment, opts v1.CreateOptions) (result *v1beta1.Deployment, err error) { result = &v1beta1.Deployment{} err = c.client.Post(). Namespace(c.ns). Resource("deployments"). + VersionedParams(&opts, scheme.ParameterCodec). Body(deployment). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a deployment and updates it. Returns the server's representation of the deployment, and an error, if there is any. -func (c *deployments) Update(deployment *v1beta1.Deployment) (result *v1beta1.Deployment, err error) { +func (c *deployments) Update(ctx context.Context, deployment *v1beta1.Deployment, opts v1.UpdateOptions) (result *v1beta1.Deployment, err error) { result = &v1beta1.Deployment{} err = c.client.Put(). Namespace(c.ns). Resource("deployments"). Name(deployment.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(deployment). - Do(). + Do(ctx). Into(result) return } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *deployments) UpdateStatus(deployment *v1beta1.Deployment) (result *v1beta1.Deployment, err error) { +func (c *deployments) UpdateStatus(ctx context.Context, deployment *v1beta1.Deployment, opts v1.UpdateOptions) (result *v1beta1.Deployment, err error) { result = &v1beta1.Deployment{} err = c.client.Put(). Namespace(c.ns). Resource("deployments"). Name(deployment.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(deployment). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the deployment and deletes it. Returns an error if one occurs. -func (c *deployments) Delete(name string, options *v1.DeleteOptions) error { +func (c *deployments) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("deployments"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *deployments) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *deployments) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Namespace(c.ns). Resource("deployments"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched deployment. -func (c *deployments) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Deployment, err error) { +func (c *deployments) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Deployment, err error) { result = &v1beta1.Deployment{} err = c.client.Patch(pt). Namespace(c.ns). Resource("deployments"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/fake/fake_controllerrevision.go b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/fake/fake_controllerrevision.go index 8e339d78b0..3215eca7d1 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/fake/fake_controllerrevision.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/fake/fake_controllerrevision.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + v1beta1 "k8s.io/api/apps/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" @@ -39,7 +41,7 @@ var controllerrevisionsResource = schema.GroupVersionResource{Group: "apps", Ver var controllerrevisionsKind = schema.GroupVersionKind{Group: "apps", Version: "v1beta1", Kind: "ControllerRevision"} // Get takes name of the controllerRevision, and returns the corresponding controllerRevision object, and an error if there is any. -func (c *FakeControllerRevisions) Get(name string, options v1.GetOptions) (result *v1beta1.ControllerRevision, err error) { +func (c *FakeControllerRevisions) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.ControllerRevision, err error) { obj, err := c.Fake. Invokes(testing.NewGetAction(controllerrevisionsResource, c.ns, name), &v1beta1.ControllerRevision{}) @@ -50,7 +52,7 @@ func (c *FakeControllerRevisions) Get(name string, options v1.GetOptions) (resul } // List takes label and field selectors, and returns the list of ControllerRevisions that match those selectors. -func (c *FakeControllerRevisions) List(opts v1.ListOptions) (result *v1beta1.ControllerRevisionList, err error) { +func (c *FakeControllerRevisions) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.ControllerRevisionList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(controllerrevisionsResource, controllerrevisionsKind, c.ns, opts), &v1beta1.ControllerRevisionList{}) @@ -72,14 +74,14 @@ func (c *FakeControllerRevisions) List(opts v1.ListOptions) (result *v1beta1.Con } // Watch returns a watch.Interface that watches the requested controllerRevisions. -func (c *FakeControllerRevisions) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeControllerRevisions) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(controllerrevisionsResource, c.ns, opts)) } // Create takes the representation of a controllerRevision and creates it. Returns the server's representation of the controllerRevision, and an error, if there is any. -func (c *FakeControllerRevisions) Create(controllerRevision *v1beta1.ControllerRevision) (result *v1beta1.ControllerRevision, err error) { +func (c *FakeControllerRevisions) Create(ctx context.Context, controllerRevision *v1beta1.ControllerRevision, opts v1.CreateOptions) (result *v1beta1.ControllerRevision, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(controllerrevisionsResource, c.ns, controllerRevision), &v1beta1.ControllerRevision{}) @@ -90,7 +92,7 @@ func (c *FakeControllerRevisions) Create(controllerRevision *v1beta1.ControllerR } // Update takes the representation of a controllerRevision and updates it. Returns the server's representation of the controllerRevision, and an error, if there is any. -func (c *FakeControllerRevisions) Update(controllerRevision *v1beta1.ControllerRevision) (result *v1beta1.ControllerRevision, err error) { +func (c *FakeControllerRevisions) Update(ctx context.Context, controllerRevision *v1beta1.ControllerRevision, opts v1.UpdateOptions) (result *v1beta1.ControllerRevision, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(controllerrevisionsResource, c.ns, controllerRevision), &v1beta1.ControllerRevision{}) @@ -101,7 +103,7 @@ func (c *FakeControllerRevisions) Update(controllerRevision *v1beta1.ControllerR } // Delete takes name of the controllerRevision and deletes it. Returns an error if one occurs. -func (c *FakeControllerRevisions) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeControllerRevisions) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewDeleteAction(controllerrevisionsResource, c.ns, name), &v1beta1.ControllerRevision{}) @@ -109,15 +111,15 @@ func (c *FakeControllerRevisions) Delete(name string, options *v1.DeleteOptions) } // DeleteCollection deletes a collection of objects. -func (c *FakeControllerRevisions) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(controllerrevisionsResource, c.ns, listOptions) +func (c *FakeControllerRevisions) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(controllerrevisionsResource, c.ns, listOpts) _, err := c.Fake.Invokes(action, &v1beta1.ControllerRevisionList{}) return err } // Patch applies the patch and returns the patched controllerRevision. -func (c *FakeControllerRevisions) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ControllerRevision, err error) { +func (c *FakeControllerRevisions) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.ControllerRevision, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(controllerrevisionsResource, c.ns, name, pt, data, subresources...), &v1beta1.ControllerRevision{}) diff --git a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/fake/fake_deployment.go b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/fake/fake_deployment.go index c33baba589..d9a9bbd167 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/fake/fake_deployment.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/fake/fake_deployment.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + v1beta1 "k8s.io/api/apps/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" @@ -39,7 +41,7 @@ var deploymentsResource = schema.GroupVersionResource{Group: "apps", Version: "v var deploymentsKind = schema.GroupVersionKind{Group: "apps", Version: "v1beta1", Kind: "Deployment"} // Get takes name of the deployment, and returns the corresponding deployment object, and an error if there is any. -func (c *FakeDeployments) Get(name string, options v1.GetOptions) (result *v1beta1.Deployment, err error) { +func (c *FakeDeployments) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.Deployment, err error) { obj, err := c.Fake. Invokes(testing.NewGetAction(deploymentsResource, c.ns, name), &v1beta1.Deployment{}) @@ -50,7 +52,7 @@ func (c *FakeDeployments) Get(name string, options v1.GetOptions) (result *v1bet } // List takes label and field selectors, and returns the list of Deployments that match those selectors. -func (c *FakeDeployments) List(opts v1.ListOptions) (result *v1beta1.DeploymentList, err error) { +func (c *FakeDeployments) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.DeploymentList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(deploymentsResource, deploymentsKind, c.ns, opts), &v1beta1.DeploymentList{}) @@ -72,14 +74,14 @@ func (c *FakeDeployments) List(opts v1.ListOptions) (result *v1beta1.DeploymentL } // Watch returns a watch.Interface that watches the requested deployments. -func (c *FakeDeployments) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeDeployments) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(deploymentsResource, c.ns, opts)) } // Create takes the representation of a deployment and creates it. Returns the server's representation of the deployment, and an error, if there is any. -func (c *FakeDeployments) Create(deployment *v1beta1.Deployment) (result *v1beta1.Deployment, err error) { +func (c *FakeDeployments) Create(ctx context.Context, deployment *v1beta1.Deployment, opts v1.CreateOptions) (result *v1beta1.Deployment, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(deploymentsResource, c.ns, deployment), &v1beta1.Deployment{}) @@ -90,7 +92,7 @@ func (c *FakeDeployments) Create(deployment *v1beta1.Deployment) (result *v1beta } // Update takes the representation of a deployment and updates it. Returns the server's representation of the deployment, and an error, if there is any. -func (c *FakeDeployments) Update(deployment *v1beta1.Deployment) (result *v1beta1.Deployment, err error) { +func (c *FakeDeployments) Update(ctx context.Context, deployment *v1beta1.Deployment, opts v1.UpdateOptions) (result *v1beta1.Deployment, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(deploymentsResource, c.ns, deployment), &v1beta1.Deployment{}) @@ -102,7 +104,7 @@ func (c *FakeDeployments) Update(deployment *v1beta1.Deployment) (result *v1beta // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeDeployments) UpdateStatus(deployment *v1beta1.Deployment) (*v1beta1.Deployment, error) { +func (c *FakeDeployments) UpdateStatus(ctx context.Context, deployment *v1beta1.Deployment, opts v1.UpdateOptions) (*v1beta1.Deployment, error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(deploymentsResource, "status", c.ns, deployment), &v1beta1.Deployment{}) @@ -113,7 +115,7 @@ func (c *FakeDeployments) UpdateStatus(deployment *v1beta1.Deployment) (*v1beta1 } // Delete takes name of the deployment and deletes it. Returns an error if one occurs. -func (c *FakeDeployments) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeDeployments) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewDeleteAction(deploymentsResource, c.ns, name), &v1beta1.Deployment{}) @@ -121,15 +123,15 @@ func (c *FakeDeployments) Delete(name string, options *v1.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *FakeDeployments) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(deploymentsResource, c.ns, listOptions) +func (c *FakeDeployments) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(deploymentsResource, c.ns, listOpts) _, err := c.Fake.Invokes(action, &v1beta1.DeploymentList{}) return err } // Patch applies the patch and returns the patched deployment. -func (c *FakeDeployments) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Deployment, err error) { +func (c *FakeDeployments) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Deployment, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(deploymentsResource, c.ns, name, pt, data, subresources...), &v1beta1.Deployment{}) diff --git a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/fake/fake_statefulset.go b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/fake/fake_statefulset.go index 754da5fba6..ef77142ff1 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/fake/fake_statefulset.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/fake/fake_statefulset.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + v1beta1 "k8s.io/api/apps/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" @@ -39,7 +41,7 @@ var statefulsetsResource = schema.GroupVersionResource{Group: "apps", Version: " var statefulsetsKind = schema.GroupVersionKind{Group: "apps", Version: "v1beta1", Kind: "StatefulSet"} // Get takes name of the statefulSet, and returns the corresponding statefulSet object, and an error if there is any. -func (c *FakeStatefulSets) Get(name string, options v1.GetOptions) (result *v1beta1.StatefulSet, err error) { +func (c *FakeStatefulSets) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.StatefulSet, err error) { obj, err := c.Fake. Invokes(testing.NewGetAction(statefulsetsResource, c.ns, name), &v1beta1.StatefulSet{}) @@ -50,7 +52,7 @@ func (c *FakeStatefulSets) Get(name string, options v1.GetOptions) (result *v1be } // List takes label and field selectors, and returns the list of StatefulSets that match those selectors. -func (c *FakeStatefulSets) List(opts v1.ListOptions) (result *v1beta1.StatefulSetList, err error) { +func (c *FakeStatefulSets) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.StatefulSetList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(statefulsetsResource, statefulsetsKind, c.ns, opts), &v1beta1.StatefulSetList{}) @@ -72,14 +74,14 @@ func (c *FakeStatefulSets) List(opts v1.ListOptions) (result *v1beta1.StatefulSe } // Watch returns a watch.Interface that watches the requested statefulSets. -func (c *FakeStatefulSets) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeStatefulSets) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(statefulsetsResource, c.ns, opts)) } // Create takes the representation of a statefulSet and creates it. Returns the server's representation of the statefulSet, and an error, if there is any. -func (c *FakeStatefulSets) Create(statefulSet *v1beta1.StatefulSet) (result *v1beta1.StatefulSet, err error) { +func (c *FakeStatefulSets) Create(ctx context.Context, statefulSet *v1beta1.StatefulSet, opts v1.CreateOptions) (result *v1beta1.StatefulSet, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(statefulsetsResource, c.ns, statefulSet), &v1beta1.StatefulSet{}) @@ -90,7 +92,7 @@ func (c *FakeStatefulSets) Create(statefulSet *v1beta1.StatefulSet) (result *v1b } // Update takes the representation of a statefulSet and updates it. Returns the server's representation of the statefulSet, and an error, if there is any. -func (c *FakeStatefulSets) Update(statefulSet *v1beta1.StatefulSet) (result *v1beta1.StatefulSet, err error) { +func (c *FakeStatefulSets) Update(ctx context.Context, statefulSet *v1beta1.StatefulSet, opts v1.UpdateOptions) (result *v1beta1.StatefulSet, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(statefulsetsResource, c.ns, statefulSet), &v1beta1.StatefulSet{}) @@ -102,7 +104,7 @@ func (c *FakeStatefulSets) Update(statefulSet *v1beta1.StatefulSet) (result *v1b // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeStatefulSets) UpdateStatus(statefulSet *v1beta1.StatefulSet) (*v1beta1.StatefulSet, error) { +func (c *FakeStatefulSets) UpdateStatus(ctx context.Context, statefulSet *v1beta1.StatefulSet, opts v1.UpdateOptions) (*v1beta1.StatefulSet, error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(statefulsetsResource, "status", c.ns, statefulSet), &v1beta1.StatefulSet{}) @@ -113,7 +115,7 @@ func (c *FakeStatefulSets) UpdateStatus(statefulSet *v1beta1.StatefulSet) (*v1be } // Delete takes name of the statefulSet and deletes it. Returns an error if one occurs. -func (c *FakeStatefulSets) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeStatefulSets) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewDeleteAction(statefulsetsResource, c.ns, name), &v1beta1.StatefulSet{}) @@ -121,15 +123,15 @@ func (c *FakeStatefulSets) Delete(name string, options *v1.DeleteOptions) error } // DeleteCollection deletes a collection of objects. -func (c *FakeStatefulSets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(statefulsetsResource, c.ns, listOptions) +func (c *FakeStatefulSets) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(statefulsetsResource, c.ns, listOpts) _, err := c.Fake.Invokes(action, &v1beta1.StatefulSetList{}) return err } // Patch applies the patch and returns the patched statefulSet. -func (c *FakeStatefulSets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.StatefulSet, err error) { +func (c *FakeStatefulSets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.StatefulSet, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(statefulsetsResource, c.ns, name, pt, data, subresources...), &v1beta1.StatefulSet{}) diff --git a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/statefulset.go b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/statefulset.go index c4b35b424c..32ec548ab4 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/statefulset.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/statefulset.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" "time" v1beta1 "k8s.io/api/apps/v1beta1" @@ -37,15 +38,15 @@ type StatefulSetsGetter interface { // StatefulSetInterface has methods to work with StatefulSet resources. type StatefulSetInterface interface { - Create(*v1beta1.StatefulSet) (*v1beta1.StatefulSet, error) - Update(*v1beta1.StatefulSet) (*v1beta1.StatefulSet, error) - UpdateStatus(*v1beta1.StatefulSet) (*v1beta1.StatefulSet, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*v1beta1.StatefulSet, error) - List(opts v1.ListOptions) (*v1beta1.StatefulSetList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.StatefulSet, err error) + Create(ctx context.Context, statefulSet *v1beta1.StatefulSet, opts v1.CreateOptions) (*v1beta1.StatefulSet, error) + Update(ctx context.Context, statefulSet *v1beta1.StatefulSet, opts v1.UpdateOptions) (*v1beta1.StatefulSet, error) + UpdateStatus(ctx context.Context, statefulSet *v1beta1.StatefulSet, opts v1.UpdateOptions) (*v1beta1.StatefulSet, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.StatefulSet, error) + List(ctx context.Context, opts v1.ListOptions) (*v1beta1.StatefulSetList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.StatefulSet, err error) StatefulSetExpansion } @@ -64,20 +65,20 @@ func newStatefulSets(c *AppsV1beta1Client, namespace string) *statefulSets { } // Get takes name of the statefulSet, and returns the corresponding statefulSet object, and an error if there is any. -func (c *statefulSets) Get(name string, options v1.GetOptions) (result *v1beta1.StatefulSet, err error) { +func (c *statefulSets) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.StatefulSet, err error) { result = &v1beta1.StatefulSet{} err = c.client.Get(). Namespace(c.ns). Resource("statefulsets"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of StatefulSets that match those selectors. -func (c *statefulSets) List(opts v1.ListOptions) (result *v1beta1.StatefulSetList, err error) { +func (c *statefulSets) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.StatefulSetList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -88,13 +89,13 @@ func (c *statefulSets) List(opts v1.ListOptions) (result *v1beta1.StatefulSetLis Resource("statefulsets"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested statefulSets. -func (c *statefulSets) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *statefulSets) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -105,87 +106,90 @@ func (c *statefulSets) Watch(opts v1.ListOptions) (watch.Interface, error) { Resource("statefulsets"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a statefulSet and creates it. Returns the server's representation of the statefulSet, and an error, if there is any. -func (c *statefulSets) Create(statefulSet *v1beta1.StatefulSet) (result *v1beta1.StatefulSet, err error) { +func (c *statefulSets) Create(ctx context.Context, statefulSet *v1beta1.StatefulSet, opts v1.CreateOptions) (result *v1beta1.StatefulSet, err error) { result = &v1beta1.StatefulSet{} err = c.client.Post(). Namespace(c.ns). Resource("statefulsets"). + VersionedParams(&opts, scheme.ParameterCodec). Body(statefulSet). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a statefulSet and updates it. Returns the server's representation of the statefulSet, and an error, if there is any. -func (c *statefulSets) Update(statefulSet *v1beta1.StatefulSet) (result *v1beta1.StatefulSet, err error) { +func (c *statefulSets) Update(ctx context.Context, statefulSet *v1beta1.StatefulSet, opts v1.UpdateOptions) (result *v1beta1.StatefulSet, err error) { result = &v1beta1.StatefulSet{} err = c.client.Put(). Namespace(c.ns). Resource("statefulsets"). Name(statefulSet.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(statefulSet). - Do(). + Do(ctx). Into(result) return } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *statefulSets) UpdateStatus(statefulSet *v1beta1.StatefulSet) (result *v1beta1.StatefulSet, err error) { +func (c *statefulSets) UpdateStatus(ctx context.Context, statefulSet *v1beta1.StatefulSet, opts v1.UpdateOptions) (result *v1beta1.StatefulSet, err error) { result = &v1beta1.StatefulSet{} err = c.client.Put(). Namespace(c.ns). Resource("statefulsets"). Name(statefulSet.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(statefulSet). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the statefulSet and deletes it. Returns an error if one occurs. -func (c *statefulSets) Delete(name string, options *v1.DeleteOptions) error { +func (c *statefulSets) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("statefulsets"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *statefulSets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *statefulSets) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Namespace(c.ns). Resource("statefulsets"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched statefulSet. -func (c *statefulSets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.StatefulSet, err error) { +func (c *statefulSets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.StatefulSet, err error) { result = &v1beta1.StatefulSet{} err = c.client.Patch(pt). Namespace(c.ns). Resource("statefulsets"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta2/controllerrevision.go b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta2/controllerrevision.go index e1d6025155..e8de2d0fd0 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta2/controllerrevision.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta2/controllerrevision.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta2 import ( + "context" "time" v1beta2 "k8s.io/api/apps/v1beta2" @@ -37,14 +38,14 @@ type ControllerRevisionsGetter interface { // ControllerRevisionInterface has methods to work with ControllerRevision resources. type ControllerRevisionInterface interface { - Create(*v1beta2.ControllerRevision) (*v1beta2.ControllerRevision, error) - Update(*v1beta2.ControllerRevision) (*v1beta2.ControllerRevision, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*v1beta2.ControllerRevision, error) - List(opts v1.ListOptions) (*v1beta2.ControllerRevisionList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta2.ControllerRevision, err error) + Create(ctx context.Context, controllerRevision *v1beta2.ControllerRevision, opts v1.CreateOptions) (*v1beta2.ControllerRevision, error) + Update(ctx context.Context, controllerRevision *v1beta2.ControllerRevision, opts v1.UpdateOptions) (*v1beta2.ControllerRevision, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta2.ControllerRevision, error) + List(ctx context.Context, opts v1.ListOptions) (*v1beta2.ControllerRevisionList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta2.ControllerRevision, err error) ControllerRevisionExpansion } @@ -63,20 +64,20 @@ func newControllerRevisions(c *AppsV1beta2Client, namespace string) *controllerR } // Get takes name of the controllerRevision, and returns the corresponding controllerRevision object, and an error if there is any. -func (c *controllerRevisions) Get(name string, options v1.GetOptions) (result *v1beta2.ControllerRevision, err error) { +func (c *controllerRevisions) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta2.ControllerRevision, err error) { result = &v1beta2.ControllerRevision{} err = c.client.Get(). Namespace(c.ns). Resource("controllerrevisions"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of ControllerRevisions that match those selectors. -func (c *controllerRevisions) List(opts v1.ListOptions) (result *v1beta2.ControllerRevisionList, err error) { +func (c *controllerRevisions) List(ctx context.Context, opts v1.ListOptions) (result *v1beta2.ControllerRevisionList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -87,13 +88,13 @@ func (c *controllerRevisions) List(opts v1.ListOptions) (result *v1beta2.Control Resource("controllerrevisions"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested controllerRevisions. -func (c *controllerRevisions) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *controllerRevisions) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -104,71 +105,74 @@ func (c *controllerRevisions) Watch(opts v1.ListOptions) (watch.Interface, error Resource("controllerrevisions"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a controllerRevision and creates it. Returns the server's representation of the controllerRevision, and an error, if there is any. -func (c *controllerRevisions) Create(controllerRevision *v1beta2.ControllerRevision) (result *v1beta2.ControllerRevision, err error) { +func (c *controllerRevisions) Create(ctx context.Context, controllerRevision *v1beta2.ControllerRevision, opts v1.CreateOptions) (result *v1beta2.ControllerRevision, err error) { result = &v1beta2.ControllerRevision{} err = c.client.Post(). Namespace(c.ns). Resource("controllerrevisions"). + VersionedParams(&opts, scheme.ParameterCodec). Body(controllerRevision). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a controllerRevision and updates it. Returns the server's representation of the controllerRevision, and an error, if there is any. -func (c *controllerRevisions) Update(controllerRevision *v1beta2.ControllerRevision) (result *v1beta2.ControllerRevision, err error) { +func (c *controllerRevisions) Update(ctx context.Context, controllerRevision *v1beta2.ControllerRevision, opts v1.UpdateOptions) (result *v1beta2.ControllerRevision, err error) { result = &v1beta2.ControllerRevision{} err = c.client.Put(). Namespace(c.ns). Resource("controllerrevisions"). Name(controllerRevision.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(controllerRevision). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the controllerRevision and deletes it. Returns an error if one occurs. -func (c *controllerRevisions) Delete(name string, options *v1.DeleteOptions) error { +func (c *controllerRevisions) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("controllerrevisions"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *controllerRevisions) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *controllerRevisions) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Namespace(c.ns). Resource("controllerrevisions"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched controllerRevision. -func (c *controllerRevisions) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta2.ControllerRevision, err error) { +func (c *controllerRevisions) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta2.ControllerRevision, err error) { result = &v1beta2.ControllerRevision{} err = c.client.Patch(pt). Namespace(c.ns). Resource("controllerrevisions"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta2/daemonset.go b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta2/daemonset.go index f8b7ac2597..6d3a26d337 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta2/daemonset.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta2/daemonset.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta2 import ( + "context" "time" v1beta2 "k8s.io/api/apps/v1beta2" @@ -37,15 +38,15 @@ type DaemonSetsGetter interface { // DaemonSetInterface has methods to work with DaemonSet resources. type DaemonSetInterface interface { - Create(*v1beta2.DaemonSet) (*v1beta2.DaemonSet, error) - Update(*v1beta2.DaemonSet) (*v1beta2.DaemonSet, error) - UpdateStatus(*v1beta2.DaemonSet) (*v1beta2.DaemonSet, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*v1beta2.DaemonSet, error) - List(opts v1.ListOptions) (*v1beta2.DaemonSetList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta2.DaemonSet, err error) + Create(ctx context.Context, daemonSet *v1beta2.DaemonSet, opts v1.CreateOptions) (*v1beta2.DaemonSet, error) + Update(ctx context.Context, daemonSet *v1beta2.DaemonSet, opts v1.UpdateOptions) (*v1beta2.DaemonSet, error) + UpdateStatus(ctx context.Context, daemonSet *v1beta2.DaemonSet, opts v1.UpdateOptions) (*v1beta2.DaemonSet, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta2.DaemonSet, error) + List(ctx context.Context, opts v1.ListOptions) (*v1beta2.DaemonSetList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta2.DaemonSet, err error) DaemonSetExpansion } @@ -64,20 +65,20 @@ func newDaemonSets(c *AppsV1beta2Client, namespace string) *daemonSets { } // Get takes name of the daemonSet, and returns the corresponding daemonSet object, and an error if there is any. -func (c *daemonSets) Get(name string, options v1.GetOptions) (result *v1beta2.DaemonSet, err error) { +func (c *daemonSets) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta2.DaemonSet, err error) { result = &v1beta2.DaemonSet{} err = c.client.Get(). Namespace(c.ns). Resource("daemonsets"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of DaemonSets that match those selectors. -func (c *daemonSets) List(opts v1.ListOptions) (result *v1beta2.DaemonSetList, err error) { +func (c *daemonSets) List(ctx context.Context, opts v1.ListOptions) (result *v1beta2.DaemonSetList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -88,13 +89,13 @@ func (c *daemonSets) List(opts v1.ListOptions) (result *v1beta2.DaemonSetList, e Resource("daemonsets"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested daemonSets. -func (c *daemonSets) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *daemonSets) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -105,87 +106,90 @@ func (c *daemonSets) Watch(opts v1.ListOptions) (watch.Interface, error) { Resource("daemonsets"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a daemonSet and creates it. Returns the server's representation of the daemonSet, and an error, if there is any. -func (c *daemonSets) Create(daemonSet *v1beta2.DaemonSet) (result *v1beta2.DaemonSet, err error) { +func (c *daemonSets) Create(ctx context.Context, daemonSet *v1beta2.DaemonSet, opts v1.CreateOptions) (result *v1beta2.DaemonSet, err error) { result = &v1beta2.DaemonSet{} err = c.client.Post(). Namespace(c.ns). Resource("daemonsets"). + VersionedParams(&opts, scheme.ParameterCodec). Body(daemonSet). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a daemonSet and updates it. Returns the server's representation of the daemonSet, and an error, if there is any. -func (c *daemonSets) Update(daemonSet *v1beta2.DaemonSet) (result *v1beta2.DaemonSet, err error) { +func (c *daemonSets) Update(ctx context.Context, daemonSet *v1beta2.DaemonSet, opts v1.UpdateOptions) (result *v1beta2.DaemonSet, err error) { result = &v1beta2.DaemonSet{} err = c.client.Put(). Namespace(c.ns). Resource("daemonsets"). Name(daemonSet.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(daemonSet). - Do(). + Do(ctx). Into(result) return } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *daemonSets) UpdateStatus(daemonSet *v1beta2.DaemonSet) (result *v1beta2.DaemonSet, err error) { +func (c *daemonSets) UpdateStatus(ctx context.Context, daemonSet *v1beta2.DaemonSet, opts v1.UpdateOptions) (result *v1beta2.DaemonSet, err error) { result = &v1beta2.DaemonSet{} err = c.client.Put(). Namespace(c.ns). Resource("daemonsets"). Name(daemonSet.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(daemonSet). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the daemonSet and deletes it. Returns an error if one occurs. -func (c *daemonSets) Delete(name string, options *v1.DeleteOptions) error { +func (c *daemonSets) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("daemonsets"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *daemonSets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *daemonSets) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Namespace(c.ns). Resource("daemonsets"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched daemonSet. -func (c *daemonSets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta2.DaemonSet, err error) { +func (c *daemonSets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta2.DaemonSet, err error) { result = &v1beta2.DaemonSet{} err = c.client.Patch(pt). Namespace(c.ns). Resource("daemonsets"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta2/deployment.go b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta2/deployment.go index 510250b06e..2cdb539ef9 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta2/deployment.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta2/deployment.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta2 import ( + "context" "time" v1beta2 "k8s.io/api/apps/v1beta2" @@ -37,15 +38,15 @@ type DeploymentsGetter interface { // DeploymentInterface has methods to work with Deployment resources. type DeploymentInterface interface { - Create(*v1beta2.Deployment) (*v1beta2.Deployment, error) - Update(*v1beta2.Deployment) (*v1beta2.Deployment, error) - UpdateStatus(*v1beta2.Deployment) (*v1beta2.Deployment, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*v1beta2.Deployment, error) - List(opts v1.ListOptions) (*v1beta2.DeploymentList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta2.Deployment, err error) + Create(ctx context.Context, deployment *v1beta2.Deployment, opts v1.CreateOptions) (*v1beta2.Deployment, error) + Update(ctx context.Context, deployment *v1beta2.Deployment, opts v1.UpdateOptions) (*v1beta2.Deployment, error) + UpdateStatus(ctx context.Context, deployment *v1beta2.Deployment, opts v1.UpdateOptions) (*v1beta2.Deployment, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta2.Deployment, error) + List(ctx context.Context, opts v1.ListOptions) (*v1beta2.DeploymentList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta2.Deployment, err error) DeploymentExpansion } @@ -64,20 +65,20 @@ func newDeployments(c *AppsV1beta2Client, namespace string) *deployments { } // Get takes name of the deployment, and returns the corresponding deployment object, and an error if there is any. -func (c *deployments) Get(name string, options v1.GetOptions) (result *v1beta2.Deployment, err error) { +func (c *deployments) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta2.Deployment, err error) { result = &v1beta2.Deployment{} err = c.client.Get(). Namespace(c.ns). Resource("deployments"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of Deployments that match those selectors. -func (c *deployments) List(opts v1.ListOptions) (result *v1beta2.DeploymentList, err error) { +func (c *deployments) List(ctx context.Context, opts v1.ListOptions) (result *v1beta2.DeploymentList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -88,13 +89,13 @@ func (c *deployments) List(opts v1.ListOptions) (result *v1beta2.DeploymentList, Resource("deployments"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested deployments. -func (c *deployments) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *deployments) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -105,87 +106,90 @@ func (c *deployments) Watch(opts v1.ListOptions) (watch.Interface, error) { Resource("deployments"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a deployment and creates it. Returns the server's representation of the deployment, and an error, if there is any. -func (c *deployments) Create(deployment *v1beta2.Deployment) (result *v1beta2.Deployment, err error) { +func (c *deployments) Create(ctx context.Context, deployment *v1beta2.Deployment, opts v1.CreateOptions) (result *v1beta2.Deployment, err error) { result = &v1beta2.Deployment{} err = c.client.Post(). Namespace(c.ns). Resource("deployments"). + VersionedParams(&opts, scheme.ParameterCodec). Body(deployment). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a deployment and updates it. Returns the server's representation of the deployment, and an error, if there is any. -func (c *deployments) Update(deployment *v1beta2.Deployment) (result *v1beta2.Deployment, err error) { +func (c *deployments) Update(ctx context.Context, deployment *v1beta2.Deployment, opts v1.UpdateOptions) (result *v1beta2.Deployment, err error) { result = &v1beta2.Deployment{} err = c.client.Put(). Namespace(c.ns). Resource("deployments"). Name(deployment.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(deployment). - Do(). + Do(ctx). Into(result) return } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *deployments) UpdateStatus(deployment *v1beta2.Deployment) (result *v1beta2.Deployment, err error) { +func (c *deployments) UpdateStatus(ctx context.Context, deployment *v1beta2.Deployment, opts v1.UpdateOptions) (result *v1beta2.Deployment, err error) { result = &v1beta2.Deployment{} err = c.client.Put(). Namespace(c.ns). Resource("deployments"). Name(deployment.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(deployment). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the deployment and deletes it. Returns an error if one occurs. -func (c *deployments) Delete(name string, options *v1.DeleteOptions) error { +func (c *deployments) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("deployments"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *deployments) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *deployments) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Namespace(c.ns). Resource("deployments"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched deployment. -func (c *deployments) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta2.Deployment, err error) { +func (c *deployments) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta2.Deployment, err error) { result = &v1beta2.Deployment{} err = c.client.Patch(pt). Namespace(c.ns). Resource("deployments"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake/fake_controllerrevision.go b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake/fake_controllerrevision.go index 197f190cbd..a29d7eb584 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake/fake_controllerrevision.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake/fake_controllerrevision.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + v1beta2 "k8s.io/api/apps/v1beta2" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" @@ -39,7 +41,7 @@ var controllerrevisionsResource = schema.GroupVersionResource{Group: "apps", Ver var controllerrevisionsKind = schema.GroupVersionKind{Group: "apps", Version: "v1beta2", Kind: "ControllerRevision"} // Get takes name of the controllerRevision, and returns the corresponding controllerRevision object, and an error if there is any. -func (c *FakeControllerRevisions) Get(name string, options v1.GetOptions) (result *v1beta2.ControllerRevision, err error) { +func (c *FakeControllerRevisions) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta2.ControllerRevision, err error) { obj, err := c.Fake. Invokes(testing.NewGetAction(controllerrevisionsResource, c.ns, name), &v1beta2.ControllerRevision{}) @@ -50,7 +52,7 @@ func (c *FakeControllerRevisions) Get(name string, options v1.GetOptions) (resul } // List takes label and field selectors, and returns the list of ControllerRevisions that match those selectors. -func (c *FakeControllerRevisions) List(opts v1.ListOptions) (result *v1beta2.ControllerRevisionList, err error) { +func (c *FakeControllerRevisions) List(ctx context.Context, opts v1.ListOptions) (result *v1beta2.ControllerRevisionList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(controllerrevisionsResource, controllerrevisionsKind, c.ns, opts), &v1beta2.ControllerRevisionList{}) @@ -72,14 +74,14 @@ func (c *FakeControllerRevisions) List(opts v1.ListOptions) (result *v1beta2.Con } // Watch returns a watch.Interface that watches the requested controllerRevisions. -func (c *FakeControllerRevisions) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeControllerRevisions) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(controllerrevisionsResource, c.ns, opts)) } // Create takes the representation of a controllerRevision and creates it. Returns the server's representation of the controllerRevision, and an error, if there is any. -func (c *FakeControllerRevisions) Create(controllerRevision *v1beta2.ControllerRevision) (result *v1beta2.ControllerRevision, err error) { +func (c *FakeControllerRevisions) Create(ctx context.Context, controllerRevision *v1beta2.ControllerRevision, opts v1.CreateOptions) (result *v1beta2.ControllerRevision, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(controllerrevisionsResource, c.ns, controllerRevision), &v1beta2.ControllerRevision{}) @@ -90,7 +92,7 @@ func (c *FakeControllerRevisions) Create(controllerRevision *v1beta2.ControllerR } // Update takes the representation of a controllerRevision and updates it. Returns the server's representation of the controllerRevision, and an error, if there is any. -func (c *FakeControllerRevisions) Update(controllerRevision *v1beta2.ControllerRevision) (result *v1beta2.ControllerRevision, err error) { +func (c *FakeControllerRevisions) Update(ctx context.Context, controllerRevision *v1beta2.ControllerRevision, opts v1.UpdateOptions) (result *v1beta2.ControllerRevision, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(controllerrevisionsResource, c.ns, controllerRevision), &v1beta2.ControllerRevision{}) @@ -101,7 +103,7 @@ func (c *FakeControllerRevisions) Update(controllerRevision *v1beta2.ControllerR } // Delete takes name of the controllerRevision and deletes it. Returns an error if one occurs. -func (c *FakeControllerRevisions) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeControllerRevisions) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewDeleteAction(controllerrevisionsResource, c.ns, name), &v1beta2.ControllerRevision{}) @@ -109,15 +111,15 @@ func (c *FakeControllerRevisions) Delete(name string, options *v1.DeleteOptions) } // DeleteCollection deletes a collection of objects. -func (c *FakeControllerRevisions) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(controllerrevisionsResource, c.ns, listOptions) +func (c *FakeControllerRevisions) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(controllerrevisionsResource, c.ns, listOpts) _, err := c.Fake.Invokes(action, &v1beta2.ControllerRevisionList{}) return err } // Patch applies the patch and returns the patched controllerRevision. -func (c *FakeControllerRevisions) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta2.ControllerRevision, err error) { +func (c *FakeControllerRevisions) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta2.ControllerRevision, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(controllerrevisionsResource, c.ns, name, pt, data, subresources...), &v1beta2.ControllerRevision{}) diff --git a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake/fake_daemonset.go b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake/fake_daemonset.go index b50747fdc9..3e355e582f 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake/fake_daemonset.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake/fake_daemonset.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + v1beta2 "k8s.io/api/apps/v1beta2" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" @@ -39,7 +41,7 @@ var daemonsetsResource = schema.GroupVersionResource{Group: "apps", Version: "v1 var daemonsetsKind = schema.GroupVersionKind{Group: "apps", Version: "v1beta2", Kind: "DaemonSet"} // Get takes name of the daemonSet, and returns the corresponding daemonSet object, and an error if there is any. -func (c *FakeDaemonSets) Get(name string, options v1.GetOptions) (result *v1beta2.DaemonSet, err error) { +func (c *FakeDaemonSets) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta2.DaemonSet, err error) { obj, err := c.Fake. Invokes(testing.NewGetAction(daemonsetsResource, c.ns, name), &v1beta2.DaemonSet{}) @@ -50,7 +52,7 @@ func (c *FakeDaemonSets) Get(name string, options v1.GetOptions) (result *v1beta } // List takes label and field selectors, and returns the list of DaemonSets that match those selectors. -func (c *FakeDaemonSets) List(opts v1.ListOptions) (result *v1beta2.DaemonSetList, err error) { +func (c *FakeDaemonSets) List(ctx context.Context, opts v1.ListOptions) (result *v1beta2.DaemonSetList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(daemonsetsResource, daemonsetsKind, c.ns, opts), &v1beta2.DaemonSetList{}) @@ -72,14 +74,14 @@ func (c *FakeDaemonSets) List(opts v1.ListOptions) (result *v1beta2.DaemonSetLis } // Watch returns a watch.Interface that watches the requested daemonSets. -func (c *FakeDaemonSets) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeDaemonSets) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(daemonsetsResource, c.ns, opts)) } // Create takes the representation of a daemonSet and creates it. Returns the server's representation of the daemonSet, and an error, if there is any. -func (c *FakeDaemonSets) Create(daemonSet *v1beta2.DaemonSet) (result *v1beta2.DaemonSet, err error) { +func (c *FakeDaemonSets) Create(ctx context.Context, daemonSet *v1beta2.DaemonSet, opts v1.CreateOptions) (result *v1beta2.DaemonSet, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(daemonsetsResource, c.ns, daemonSet), &v1beta2.DaemonSet{}) @@ -90,7 +92,7 @@ func (c *FakeDaemonSets) Create(daemonSet *v1beta2.DaemonSet) (result *v1beta2.D } // Update takes the representation of a daemonSet and updates it. Returns the server's representation of the daemonSet, and an error, if there is any. -func (c *FakeDaemonSets) Update(daemonSet *v1beta2.DaemonSet) (result *v1beta2.DaemonSet, err error) { +func (c *FakeDaemonSets) Update(ctx context.Context, daemonSet *v1beta2.DaemonSet, opts v1.UpdateOptions) (result *v1beta2.DaemonSet, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(daemonsetsResource, c.ns, daemonSet), &v1beta2.DaemonSet{}) @@ -102,7 +104,7 @@ func (c *FakeDaemonSets) Update(daemonSet *v1beta2.DaemonSet) (result *v1beta2.D // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeDaemonSets) UpdateStatus(daemonSet *v1beta2.DaemonSet) (*v1beta2.DaemonSet, error) { +func (c *FakeDaemonSets) UpdateStatus(ctx context.Context, daemonSet *v1beta2.DaemonSet, opts v1.UpdateOptions) (*v1beta2.DaemonSet, error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(daemonsetsResource, "status", c.ns, daemonSet), &v1beta2.DaemonSet{}) @@ -113,7 +115,7 @@ func (c *FakeDaemonSets) UpdateStatus(daemonSet *v1beta2.DaemonSet) (*v1beta2.Da } // Delete takes name of the daemonSet and deletes it. Returns an error if one occurs. -func (c *FakeDaemonSets) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeDaemonSets) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewDeleteAction(daemonsetsResource, c.ns, name), &v1beta2.DaemonSet{}) @@ -121,15 +123,15 @@ func (c *FakeDaemonSets) Delete(name string, options *v1.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *FakeDaemonSets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(daemonsetsResource, c.ns, listOptions) +func (c *FakeDaemonSets) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(daemonsetsResource, c.ns, listOpts) _, err := c.Fake.Invokes(action, &v1beta2.DaemonSetList{}) return err } // Patch applies the patch and returns the patched daemonSet. -func (c *FakeDaemonSets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta2.DaemonSet, err error) { +func (c *FakeDaemonSets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta2.DaemonSet, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(daemonsetsResource, c.ns, name, pt, data, subresources...), &v1beta2.DaemonSet{}) diff --git a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake/fake_deployment.go b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake/fake_deployment.go index b74d24ed7c..c01fddb333 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake/fake_deployment.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake/fake_deployment.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + v1beta2 "k8s.io/api/apps/v1beta2" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" @@ -39,7 +41,7 @@ var deploymentsResource = schema.GroupVersionResource{Group: "apps", Version: "v var deploymentsKind = schema.GroupVersionKind{Group: "apps", Version: "v1beta2", Kind: "Deployment"} // Get takes name of the deployment, and returns the corresponding deployment object, and an error if there is any. -func (c *FakeDeployments) Get(name string, options v1.GetOptions) (result *v1beta2.Deployment, err error) { +func (c *FakeDeployments) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta2.Deployment, err error) { obj, err := c.Fake. Invokes(testing.NewGetAction(deploymentsResource, c.ns, name), &v1beta2.Deployment{}) @@ -50,7 +52,7 @@ func (c *FakeDeployments) Get(name string, options v1.GetOptions) (result *v1bet } // List takes label and field selectors, and returns the list of Deployments that match those selectors. -func (c *FakeDeployments) List(opts v1.ListOptions) (result *v1beta2.DeploymentList, err error) { +func (c *FakeDeployments) List(ctx context.Context, opts v1.ListOptions) (result *v1beta2.DeploymentList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(deploymentsResource, deploymentsKind, c.ns, opts), &v1beta2.DeploymentList{}) @@ -72,14 +74,14 @@ func (c *FakeDeployments) List(opts v1.ListOptions) (result *v1beta2.DeploymentL } // Watch returns a watch.Interface that watches the requested deployments. -func (c *FakeDeployments) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeDeployments) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(deploymentsResource, c.ns, opts)) } // Create takes the representation of a deployment and creates it. Returns the server's representation of the deployment, and an error, if there is any. -func (c *FakeDeployments) Create(deployment *v1beta2.Deployment) (result *v1beta2.Deployment, err error) { +func (c *FakeDeployments) Create(ctx context.Context, deployment *v1beta2.Deployment, opts v1.CreateOptions) (result *v1beta2.Deployment, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(deploymentsResource, c.ns, deployment), &v1beta2.Deployment{}) @@ -90,7 +92,7 @@ func (c *FakeDeployments) Create(deployment *v1beta2.Deployment) (result *v1beta } // Update takes the representation of a deployment and updates it. Returns the server's representation of the deployment, and an error, if there is any. -func (c *FakeDeployments) Update(deployment *v1beta2.Deployment) (result *v1beta2.Deployment, err error) { +func (c *FakeDeployments) Update(ctx context.Context, deployment *v1beta2.Deployment, opts v1.UpdateOptions) (result *v1beta2.Deployment, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(deploymentsResource, c.ns, deployment), &v1beta2.Deployment{}) @@ -102,7 +104,7 @@ func (c *FakeDeployments) Update(deployment *v1beta2.Deployment) (result *v1beta // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeDeployments) UpdateStatus(deployment *v1beta2.Deployment) (*v1beta2.Deployment, error) { +func (c *FakeDeployments) UpdateStatus(ctx context.Context, deployment *v1beta2.Deployment, opts v1.UpdateOptions) (*v1beta2.Deployment, error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(deploymentsResource, "status", c.ns, deployment), &v1beta2.Deployment{}) @@ -113,7 +115,7 @@ func (c *FakeDeployments) UpdateStatus(deployment *v1beta2.Deployment) (*v1beta2 } // Delete takes name of the deployment and deletes it. Returns an error if one occurs. -func (c *FakeDeployments) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeDeployments) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewDeleteAction(deploymentsResource, c.ns, name), &v1beta2.Deployment{}) @@ -121,15 +123,15 @@ func (c *FakeDeployments) Delete(name string, options *v1.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *FakeDeployments) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(deploymentsResource, c.ns, listOptions) +func (c *FakeDeployments) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(deploymentsResource, c.ns, listOpts) _, err := c.Fake.Invokes(action, &v1beta2.DeploymentList{}) return err } // Patch applies the patch and returns the patched deployment. -func (c *FakeDeployments) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta2.Deployment, err error) { +func (c *FakeDeployments) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta2.Deployment, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(deploymentsResource, c.ns, name, pt, data, subresources...), &v1beta2.Deployment{}) diff --git a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake/fake_replicaset.go b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake/fake_replicaset.go index ba1de33ecf..1f623d2976 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake/fake_replicaset.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake/fake_replicaset.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + v1beta2 "k8s.io/api/apps/v1beta2" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" @@ -39,7 +41,7 @@ var replicasetsResource = schema.GroupVersionResource{Group: "apps", Version: "v var replicasetsKind = schema.GroupVersionKind{Group: "apps", Version: "v1beta2", Kind: "ReplicaSet"} // Get takes name of the replicaSet, and returns the corresponding replicaSet object, and an error if there is any. -func (c *FakeReplicaSets) Get(name string, options v1.GetOptions) (result *v1beta2.ReplicaSet, err error) { +func (c *FakeReplicaSets) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta2.ReplicaSet, err error) { obj, err := c.Fake. Invokes(testing.NewGetAction(replicasetsResource, c.ns, name), &v1beta2.ReplicaSet{}) @@ -50,7 +52,7 @@ func (c *FakeReplicaSets) Get(name string, options v1.GetOptions) (result *v1bet } // List takes label and field selectors, and returns the list of ReplicaSets that match those selectors. -func (c *FakeReplicaSets) List(opts v1.ListOptions) (result *v1beta2.ReplicaSetList, err error) { +func (c *FakeReplicaSets) List(ctx context.Context, opts v1.ListOptions) (result *v1beta2.ReplicaSetList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(replicasetsResource, replicasetsKind, c.ns, opts), &v1beta2.ReplicaSetList{}) @@ -72,14 +74,14 @@ func (c *FakeReplicaSets) List(opts v1.ListOptions) (result *v1beta2.ReplicaSetL } // Watch returns a watch.Interface that watches the requested replicaSets. -func (c *FakeReplicaSets) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeReplicaSets) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(replicasetsResource, c.ns, opts)) } // Create takes the representation of a replicaSet and creates it. Returns the server's representation of the replicaSet, and an error, if there is any. -func (c *FakeReplicaSets) Create(replicaSet *v1beta2.ReplicaSet) (result *v1beta2.ReplicaSet, err error) { +func (c *FakeReplicaSets) Create(ctx context.Context, replicaSet *v1beta2.ReplicaSet, opts v1.CreateOptions) (result *v1beta2.ReplicaSet, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(replicasetsResource, c.ns, replicaSet), &v1beta2.ReplicaSet{}) @@ -90,7 +92,7 @@ func (c *FakeReplicaSets) Create(replicaSet *v1beta2.ReplicaSet) (result *v1beta } // Update takes the representation of a replicaSet and updates it. Returns the server's representation of the replicaSet, and an error, if there is any. -func (c *FakeReplicaSets) Update(replicaSet *v1beta2.ReplicaSet) (result *v1beta2.ReplicaSet, err error) { +func (c *FakeReplicaSets) Update(ctx context.Context, replicaSet *v1beta2.ReplicaSet, opts v1.UpdateOptions) (result *v1beta2.ReplicaSet, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(replicasetsResource, c.ns, replicaSet), &v1beta2.ReplicaSet{}) @@ -102,7 +104,7 @@ func (c *FakeReplicaSets) Update(replicaSet *v1beta2.ReplicaSet) (result *v1beta // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeReplicaSets) UpdateStatus(replicaSet *v1beta2.ReplicaSet) (*v1beta2.ReplicaSet, error) { +func (c *FakeReplicaSets) UpdateStatus(ctx context.Context, replicaSet *v1beta2.ReplicaSet, opts v1.UpdateOptions) (*v1beta2.ReplicaSet, error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(replicasetsResource, "status", c.ns, replicaSet), &v1beta2.ReplicaSet{}) @@ -113,7 +115,7 @@ func (c *FakeReplicaSets) UpdateStatus(replicaSet *v1beta2.ReplicaSet) (*v1beta2 } // Delete takes name of the replicaSet and deletes it. Returns an error if one occurs. -func (c *FakeReplicaSets) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeReplicaSets) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewDeleteAction(replicasetsResource, c.ns, name), &v1beta2.ReplicaSet{}) @@ -121,15 +123,15 @@ func (c *FakeReplicaSets) Delete(name string, options *v1.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *FakeReplicaSets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(replicasetsResource, c.ns, listOptions) +func (c *FakeReplicaSets) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(replicasetsResource, c.ns, listOpts) _, err := c.Fake.Invokes(action, &v1beta2.ReplicaSetList{}) return err } // Patch applies the patch and returns the patched replicaSet. -func (c *FakeReplicaSets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta2.ReplicaSet, err error) { +func (c *FakeReplicaSets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta2.ReplicaSet, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(replicasetsResource, c.ns, name, pt, data, subresources...), &v1beta2.ReplicaSet{}) diff --git a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake/fake_statefulset.go b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake/fake_statefulset.go index 652c7cbc5d..035086e229 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake/fake_statefulset.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake/fake_statefulset.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + v1beta2 "k8s.io/api/apps/v1beta2" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" @@ -39,7 +41,7 @@ var statefulsetsResource = schema.GroupVersionResource{Group: "apps", Version: " var statefulsetsKind = schema.GroupVersionKind{Group: "apps", Version: "v1beta2", Kind: "StatefulSet"} // Get takes name of the statefulSet, and returns the corresponding statefulSet object, and an error if there is any. -func (c *FakeStatefulSets) Get(name string, options v1.GetOptions) (result *v1beta2.StatefulSet, err error) { +func (c *FakeStatefulSets) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta2.StatefulSet, err error) { obj, err := c.Fake. Invokes(testing.NewGetAction(statefulsetsResource, c.ns, name), &v1beta2.StatefulSet{}) @@ -50,7 +52,7 @@ func (c *FakeStatefulSets) Get(name string, options v1.GetOptions) (result *v1be } // List takes label and field selectors, and returns the list of StatefulSets that match those selectors. -func (c *FakeStatefulSets) List(opts v1.ListOptions) (result *v1beta2.StatefulSetList, err error) { +func (c *FakeStatefulSets) List(ctx context.Context, opts v1.ListOptions) (result *v1beta2.StatefulSetList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(statefulsetsResource, statefulsetsKind, c.ns, opts), &v1beta2.StatefulSetList{}) @@ -72,14 +74,14 @@ func (c *FakeStatefulSets) List(opts v1.ListOptions) (result *v1beta2.StatefulSe } // Watch returns a watch.Interface that watches the requested statefulSets. -func (c *FakeStatefulSets) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeStatefulSets) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(statefulsetsResource, c.ns, opts)) } // Create takes the representation of a statefulSet and creates it. Returns the server's representation of the statefulSet, and an error, if there is any. -func (c *FakeStatefulSets) Create(statefulSet *v1beta2.StatefulSet) (result *v1beta2.StatefulSet, err error) { +func (c *FakeStatefulSets) Create(ctx context.Context, statefulSet *v1beta2.StatefulSet, opts v1.CreateOptions) (result *v1beta2.StatefulSet, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(statefulsetsResource, c.ns, statefulSet), &v1beta2.StatefulSet{}) @@ -90,7 +92,7 @@ func (c *FakeStatefulSets) Create(statefulSet *v1beta2.StatefulSet) (result *v1b } // Update takes the representation of a statefulSet and updates it. Returns the server's representation of the statefulSet, and an error, if there is any. -func (c *FakeStatefulSets) Update(statefulSet *v1beta2.StatefulSet) (result *v1beta2.StatefulSet, err error) { +func (c *FakeStatefulSets) Update(ctx context.Context, statefulSet *v1beta2.StatefulSet, opts v1.UpdateOptions) (result *v1beta2.StatefulSet, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(statefulsetsResource, c.ns, statefulSet), &v1beta2.StatefulSet{}) @@ -102,7 +104,7 @@ func (c *FakeStatefulSets) Update(statefulSet *v1beta2.StatefulSet) (result *v1b // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeStatefulSets) UpdateStatus(statefulSet *v1beta2.StatefulSet) (*v1beta2.StatefulSet, error) { +func (c *FakeStatefulSets) UpdateStatus(ctx context.Context, statefulSet *v1beta2.StatefulSet, opts v1.UpdateOptions) (*v1beta2.StatefulSet, error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(statefulsetsResource, "status", c.ns, statefulSet), &v1beta2.StatefulSet{}) @@ -113,7 +115,7 @@ func (c *FakeStatefulSets) UpdateStatus(statefulSet *v1beta2.StatefulSet) (*v1be } // Delete takes name of the statefulSet and deletes it. Returns an error if one occurs. -func (c *FakeStatefulSets) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeStatefulSets) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewDeleteAction(statefulsetsResource, c.ns, name), &v1beta2.StatefulSet{}) @@ -121,15 +123,15 @@ func (c *FakeStatefulSets) Delete(name string, options *v1.DeleteOptions) error } // DeleteCollection deletes a collection of objects. -func (c *FakeStatefulSets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(statefulsetsResource, c.ns, listOptions) +func (c *FakeStatefulSets) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(statefulsetsResource, c.ns, listOpts) _, err := c.Fake.Invokes(action, &v1beta2.StatefulSetList{}) return err } // Patch applies the patch and returns the patched statefulSet. -func (c *FakeStatefulSets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta2.StatefulSet, err error) { +func (c *FakeStatefulSets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta2.StatefulSet, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(statefulsetsResource, c.ns, name, pt, data, subresources...), &v1beta2.StatefulSet{}) @@ -140,7 +142,7 @@ func (c *FakeStatefulSets) Patch(name string, pt types.PatchType, data []byte, s } // GetScale takes name of the statefulSet, and returns the corresponding scale object, and an error if there is any. -func (c *FakeStatefulSets) GetScale(statefulSetName string, options v1.GetOptions) (result *v1beta2.Scale, err error) { +func (c *FakeStatefulSets) GetScale(ctx context.Context, statefulSetName string, options v1.GetOptions) (result *v1beta2.Scale, err error) { obj, err := c.Fake. Invokes(testing.NewGetSubresourceAction(statefulsetsResource, c.ns, "scale", statefulSetName), &v1beta2.Scale{}) @@ -151,7 +153,7 @@ func (c *FakeStatefulSets) GetScale(statefulSetName string, options v1.GetOption } // UpdateScale takes the representation of a scale and updates it. Returns the server's representation of the scale, and an error, if there is any. -func (c *FakeStatefulSets) UpdateScale(statefulSetName string, scale *v1beta2.Scale) (result *v1beta2.Scale, err error) { +func (c *FakeStatefulSets) UpdateScale(ctx context.Context, statefulSetName string, scale *v1beta2.Scale, opts v1.UpdateOptions) (result *v1beta2.Scale, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(statefulsetsResource, "scale", c.ns, scale), &v1beta2.Scale{}) diff --git a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta2/replicaset.go b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta2/replicaset.go index 7b738774b7..d7365bebb5 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta2/replicaset.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta2/replicaset.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta2 import ( + "context" "time" v1beta2 "k8s.io/api/apps/v1beta2" @@ -37,15 +38,15 @@ type ReplicaSetsGetter interface { // ReplicaSetInterface has methods to work with ReplicaSet resources. type ReplicaSetInterface interface { - Create(*v1beta2.ReplicaSet) (*v1beta2.ReplicaSet, error) - Update(*v1beta2.ReplicaSet) (*v1beta2.ReplicaSet, error) - UpdateStatus(*v1beta2.ReplicaSet) (*v1beta2.ReplicaSet, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*v1beta2.ReplicaSet, error) - List(opts v1.ListOptions) (*v1beta2.ReplicaSetList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta2.ReplicaSet, err error) + Create(ctx context.Context, replicaSet *v1beta2.ReplicaSet, opts v1.CreateOptions) (*v1beta2.ReplicaSet, error) + Update(ctx context.Context, replicaSet *v1beta2.ReplicaSet, opts v1.UpdateOptions) (*v1beta2.ReplicaSet, error) + UpdateStatus(ctx context.Context, replicaSet *v1beta2.ReplicaSet, opts v1.UpdateOptions) (*v1beta2.ReplicaSet, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta2.ReplicaSet, error) + List(ctx context.Context, opts v1.ListOptions) (*v1beta2.ReplicaSetList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta2.ReplicaSet, err error) ReplicaSetExpansion } @@ -64,20 +65,20 @@ func newReplicaSets(c *AppsV1beta2Client, namespace string) *replicaSets { } // Get takes name of the replicaSet, and returns the corresponding replicaSet object, and an error if there is any. -func (c *replicaSets) Get(name string, options v1.GetOptions) (result *v1beta2.ReplicaSet, err error) { +func (c *replicaSets) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta2.ReplicaSet, err error) { result = &v1beta2.ReplicaSet{} err = c.client.Get(). Namespace(c.ns). Resource("replicasets"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of ReplicaSets that match those selectors. -func (c *replicaSets) List(opts v1.ListOptions) (result *v1beta2.ReplicaSetList, err error) { +func (c *replicaSets) List(ctx context.Context, opts v1.ListOptions) (result *v1beta2.ReplicaSetList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -88,13 +89,13 @@ func (c *replicaSets) List(opts v1.ListOptions) (result *v1beta2.ReplicaSetList, Resource("replicasets"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested replicaSets. -func (c *replicaSets) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *replicaSets) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -105,87 +106,90 @@ func (c *replicaSets) Watch(opts v1.ListOptions) (watch.Interface, error) { Resource("replicasets"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a replicaSet and creates it. Returns the server's representation of the replicaSet, and an error, if there is any. -func (c *replicaSets) Create(replicaSet *v1beta2.ReplicaSet) (result *v1beta2.ReplicaSet, err error) { +func (c *replicaSets) Create(ctx context.Context, replicaSet *v1beta2.ReplicaSet, opts v1.CreateOptions) (result *v1beta2.ReplicaSet, err error) { result = &v1beta2.ReplicaSet{} err = c.client.Post(). Namespace(c.ns). Resource("replicasets"). + VersionedParams(&opts, scheme.ParameterCodec). Body(replicaSet). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a replicaSet and updates it. Returns the server's representation of the replicaSet, and an error, if there is any. -func (c *replicaSets) Update(replicaSet *v1beta2.ReplicaSet) (result *v1beta2.ReplicaSet, err error) { +func (c *replicaSets) Update(ctx context.Context, replicaSet *v1beta2.ReplicaSet, opts v1.UpdateOptions) (result *v1beta2.ReplicaSet, err error) { result = &v1beta2.ReplicaSet{} err = c.client.Put(). Namespace(c.ns). Resource("replicasets"). Name(replicaSet.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(replicaSet). - Do(). + Do(ctx). Into(result) return } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *replicaSets) UpdateStatus(replicaSet *v1beta2.ReplicaSet) (result *v1beta2.ReplicaSet, err error) { +func (c *replicaSets) UpdateStatus(ctx context.Context, replicaSet *v1beta2.ReplicaSet, opts v1.UpdateOptions) (result *v1beta2.ReplicaSet, err error) { result = &v1beta2.ReplicaSet{} err = c.client.Put(). Namespace(c.ns). Resource("replicasets"). Name(replicaSet.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(replicaSet). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the replicaSet and deletes it. Returns an error if one occurs. -func (c *replicaSets) Delete(name string, options *v1.DeleteOptions) error { +func (c *replicaSets) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("replicasets"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *replicaSets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *replicaSets) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Namespace(c.ns). Resource("replicasets"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched replicaSet. -func (c *replicaSets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta2.ReplicaSet, err error) { +func (c *replicaSets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta2.ReplicaSet, err error) { result = &v1beta2.ReplicaSet{} err = c.client.Patch(pt). Namespace(c.ns). Resource("replicasets"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta2/statefulset.go b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta2/statefulset.go index de7c3db8b5..7458316990 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta2/statefulset.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta2/statefulset.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta2 import ( + "context" "time" v1beta2 "k8s.io/api/apps/v1beta2" @@ -37,17 +38,17 @@ type StatefulSetsGetter interface { // StatefulSetInterface has methods to work with StatefulSet resources. type StatefulSetInterface interface { - Create(*v1beta2.StatefulSet) (*v1beta2.StatefulSet, error) - Update(*v1beta2.StatefulSet) (*v1beta2.StatefulSet, error) - UpdateStatus(*v1beta2.StatefulSet) (*v1beta2.StatefulSet, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*v1beta2.StatefulSet, error) - List(opts v1.ListOptions) (*v1beta2.StatefulSetList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta2.StatefulSet, err error) - GetScale(statefulSetName string, options v1.GetOptions) (*v1beta2.Scale, error) - UpdateScale(statefulSetName string, scale *v1beta2.Scale) (*v1beta2.Scale, error) + Create(ctx context.Context, statefulSet *v1beta2.StatefulSet, opts v1.CreateOptions) (*v1beta2.StatefulSet, error) + Update(ctx context.Context, statefulSet *v1beta2.StatefulSet, opts v1.UpdateOptions) (*v1beta2.StatefulSet, error) + UpdateStatus(ctx context.Context, statefulSet *v1beta2.StatefulSet, opts v1.UpdateOptions) (*v1beta2.StatefulSet, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta2.StatefulSet, error) + List(ctx context.Context, opts v1.ListOptions) (*v1beta2.StatefulSetList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta2.StatefulSet, err error) + GetScale(ctx context.Context, statefulSetName string, options v1.GetOptions) (*v1beta2.Scale, error) + UpdateScale(ctx context.Context, statefulSetName string, scale *v1beta2.Scale, opts v1.UpdateOptions) (*v1beta2.Scale, error) StatefulSetExpansion } @@ -67,20 +68,20 @@ func newStatefulSets(c *AppsV1beta2Client, namespace string) *statefulSets { } // Get takes name of the statefulSet, and returns the corresponding statefulSet object, and an error if there is any. -func (c *statefulSets) Get(name string, options v1.GetOptions) (result *v1beta2.StatefulSet, err error) { +func (c *statefulSets) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta2.StatefulSet, err error) { result = &v1beta2.StatefulSet{} err = c.client.Get(). Namespace(c.ns). Resource("statefulsets"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of StatefulSets that match those selectors. -func (c *statefulSets) List(opts v1.ListOptions) (result *v1beta2.StatefulSetList, err error) { +func (c *statefulSets) List(ctx context.Context, opts v1.ListOptions) (result *v1beta2.StatefulSetList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -91,13 +92,13 @@ func (c *statefulSets) List(opts v1.ListOptions) (result *v1beta2.StatefulSetLis Resource("statefulsets"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested statefulSets. -func (c *statefulSets) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *statefulSets) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -108,93 +109,96 @@ func (c *statefulSets) Watch(opts v1.ListOptions) (watch.Interface, error) { Resource("statefulsets"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a statefulSet and creates it. Returns the server's representation of the statefulSet, and an error, if there is any. -func (c *statefulSets) Create(statefulSet *v1beta2.StatefulSet) (result *v1beta2.StatefulSet, err error) { +func (c *statefulSets) Create(ctx context.Context, statefulSet *v1beta2.StatefulSet, opts v1.CreateOptions) (result *v1beta2.StatefulSet, err error) { result = &v1beta2.StatefulSet{} err = c.client.Post(). Namespace(c.ns). Resource("statefulsets"). + VersionedParams(&opts, scheme.ParameterCodec). Body(statefulSet). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a statefulSet and updates it. Returns the server's representation of the statefulSet, and an error, if there is any. -func (c *statefulSets) Update(statefulSet *v1beta2.StatefulSet) (result *v1beta2.StatefulSet, err error) { +func (c *statefulSets) Update(ctx context.Context, statefulSet *v1beta2.StatefulSet, opts v1.UpdateOptions) (result *v1beta2.StatefulSet, err error) { result = &v1beta2.StatefulSet{} err = c.client.Put(). Namespace(c.ns). Resource("statefulsets"). Name(statefulSet.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(statefulSet). - Do(). + Do(ctx). Into(result) return } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *statefulSets) UpdateStatus(statefulSet *v1beta2.StatefulSet) (result *v1beta2.StatefulSet, err error) { +func (c *statefulSets) UpdateStatus(ctx context.Context, statefulSet *v1beta2.StatefulSet, opts v1.UpdateOptions) (result *v1beta2.StatefulSet, err error) { result = &v1beta2.StatefulSet{} err = c.client.Put(). Namespace(c.ns). Resource("statefulsets"). Name(statefulSet.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(statefulSet). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the statefulSet and deletes it. Returns an error if one occurs. -func (c *statefulSets) Delete(name string, options *v1.DeleteOptions) error { +func (c *statefulSets) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("statefulsets"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *statefulSets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *statefulSets) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Namespace(c.ns). Resource("statefulsets"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched statefulSet. -func (c *statefulSets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta2.StatefulSet, err error) { +func (c *statefulSets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta2.StatefulSet, err error) { result = &v1beta2.StatefulSet{} err = c.client.Patch(pt). Namespace(c.ns). Resource("statefulsets"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } // GetScale takes name of the statefulSet, and returns the corresponding v1beta2.Scale object, and an error if there is any. -func (c *statefulSets) GetScale(statefulSetName string, options v1.GetOptions) (result *v1beta2.Scale, err error) { +func (c *statefulSets) GetScale(ctx context.Context, statefulSetName string, options v1.GetOptions) (result *v1beta2.Scale, err error) { result = &v1beta2.Scale{} err = c.client.Get(). Namespace(c.ns). @@ -202,21 +206,22 @@ func (c *statefulSets) GetScale(statefulSetName string, options v1.GetOptions) ( Name(statefulSetName). SubResource("scale"). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // UpdateScale takes the top resource name and the representation of a scale and updates it. Returns the server's representation of the scale, and an error, if there is any. -func (c *statefulSets) UpdateScale(statefulSetName string, scale *v1beta2.Scale) (result *v1beta2.Scale, err error) { +func (c *statefulSets) UpdateScale(ctx context.Context, statefulSetName string, scale *v1beta2.Scale, opts v1.UpdateOptions) (result *v1beta2.Scale, err error) { result = &v1beta2.Scale{} err = c.client.Put(). Namespace(c.ns). Resource("statefulsets"). Name(statefulSetName). SubResource("scale"). + VersionedParams(&opts, scheme.ParameterCodec). Body(scale). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/k8s.io/client-go/kubernetes/typed/auditregistration/v1alpha1/auditsink.go b/vendor/k8s.io/client-go/kubernetes/typed/auditregistration/v1alpha1/auditsink.go index 414d480062..ea748c6622 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/auditregistration/v1alpha1/auditsink.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/auditregistration/v1alpha1/auditsink.go @@ -19,6 +19,7 @@ limitations under the License. package v1alpha1 import ( + "context" "time" v1alpha1 "k8s.io/api/auditregistration/v1alpha1" @@ -37,14 +38,14 @@ type AuditSinksGetter interface { // AuditSinkInterface has methods to work with AuditSink resources. type AuditSinkInterface interface { - Create(*v1alpha1.AuditSink) (*v1alpha1.AuditSink, error) - Update(*v1alpha1.AuditSink) (*v1alpha1.AuditSink, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*v1alpha1.AuditSink, error) - List(opts v1.ListOptions) (*v1alpha1.AuditSinkList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.AuditSink, err error) + Create(ctx context.Context, auditSink *v1alpha1.AuditSink, opts v1.CreateOptions) (*v1alpha1.AuditSink, error) + Update(ctx context.Context, auditSink *v1alpha1.AuditSink, opts v1.UpdateOptions) (*v1alpha1.AuditSink, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.AuditSink, error) + List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.AuditSinkList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.AuditSink, err error) AuditSinkExpansion } @@ -61,19 +62,19 @@ func newAuditSinks(c *AuditregistrationV1alpha1Client) *auditSinks { } // Get takes name of the auditSink, and returns the corresponding auditSink object, and an error if there is any. -func (c *auditSinks) Get(name string, options v1.GetOptions) (result *v1alpha1.AuditSink, err error) { +func (c *auditSinks) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.AuditSink, err error) { result = &v1alpha1.AuditSink{} err = c.client.Get(). Resource("auditsinks"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of AuditSinks that match those selectors. -func (c *auditSinks) List(opts v1.ListOptions) (result *v1alpha1.AuditSinkList, err error) { +func (c *auditSinks) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.AuditSinkList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -83,13 +84,13 @@ func (c *auditSinks) List(opts v1.ListOptions) (result *v1alpha1.AuditSinkList, Resource("auditsinks"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested auditSinks. -func (c *auditSinks) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *auditSinks) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -99,66 +100,69 @@ func (c *auditSinks) Watch(opts v1.ListOptions) (watch.Interface, error) { Resource("auditsinks"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a auditSink and creates it. Returns the server's representation of the auditSink, and an error, if there is any. -func (c *auditSinks) Create(auditSink *v1alpha1.AuditSink) (result *v1alpha1.AuditSink, err error) { +func (c *auditSinks) Create(ctx context.Context, auditSink *v1alpha1.AuditSink, opts v1.CreateOptions) (result *v1alpha1.AuditSink, err error) { result = &v1alpha1.AuditSink{} err = c.client.Post(). Resource("auditsinks"). + VersionedParams(&opts, scheme.ParameterCodec). Body(auditSink). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a auditSink and updates it. Returns the server's representation of the auditSink, and an error, if there is any. -func (c *auditSinks) Update(auditSink *v1alpha1.AuditSink) (result *v1alpha1.AuditSink, err error) { +func (c *auditSinks) Update(ctx context.Context, auditSink *v1alpha1.AuditSink, opts v1.UpdateOptions) (result *v1alpha1.AuditSink, err error) { result = &v1alpha1.AuditSink{} err = c.client.Put(). Resource("auditsinks"). Name(auditSink.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(auditSink). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the auditSink and deletes it. Returns an error if one occurs. -func (c *auditSinks) Delete(name string, options *v1.DeleteOptions) error { +func (c *auditSinks) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). Resource("auditsinks"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *auditSinks) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *auditSinks) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Resource("auditsinks"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched auditSink. -func (c *auditSinks) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.AuditSink, err error) { +func (c *auditSinks) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.AuditSink, err error) { result = &v1alpha1.AuditSink{} err = c.client.Patch(pt). Resource("auditsinks"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/k8s.io/client-go/kubernetes/typed/auditregistration/v1alpha1/fake/fake_auditsink.go b/vendor/k8s.io/client-go/kubernetes/typed/auditregistration/v1alpha1/fake/fake_auditsink.go index d0bb9fd000..f97c674714 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/auditregistration/v1alpha1/fake/fake_auditsink.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/auditregistration/v1alpha1/fake/fake_auditsink.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + v1alpha1 "k8s.io/api/auditregistration/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" @@ -38,7 +40,7 @@ var auditsinksResource = schema.GroupVersionResource{Group: "auditregistration.k var auditsinksKind = schema.GroupVersionKind{Group: "auditregistration.k8s.io", Version: "v1alpha1", Kind: "AuditSink"} // Get takes name of the auditSink, and returns the corresponding auditSink object, and an error if there is any. -func (c *FakeAuditSinks) Get(name string, options v1.GetOptions) (result *v1alpha1.AuditSink, err error) { +func (c *FakeAuditSinks) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.AuditSink, err error) { obj, err := c.Fake. Invokes(testing.NewRootGetAction(auditsinksResource, name), &v1alpha1.AuditSink{}) if obj == nil { @@ -48,7 +50,7 @@ func (c *FakeAuditSinks) Get(name string, options v1.GetOptions) (result *v1alph } // List takes label and field selectors, and returns the list of AuditSinks that match those selectors. -func (c *FakeAuditSinks) List(opts v1.ListOptions) (result *v1alpha1.AuditSinkList, err error) { +func (c *FakeAuditSinks) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.AuditSinkList, err error) { obj, err := c.Fake. Invokes(testing.NewRootListAction(auditsinksResource, auditsinksKind, opts), &v1alpha1.AuditSinkList{}) if obj == nil { @@ -69,13 +71,13 @@ func (c *FakeAuditSinks) List(opts v1.ListOptions) (result *v1alpha1.AuditSinkLi } // Watch returns a watch.Interface that watches the requested auditSinks. -func (c *FakeAuditSinks) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeAuditSinks) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewRootWatchAction(auditsinksResource, opts)) } // Create takes the representation of a auditSink and creates it. Returns the server's representation of the auditSink, and an error, if there is any. -func (c *FakeAuditSinks) Create(auditSink *v1alpha1.AuditSink) (result *v1alpha1.AuditSink, err error) { +func (c *FakeAuditSinks) Create(ctx context.Context, auditSink *v1alpha1.AuditSink, opts v1.CreateOptions) (result *v1alpha1.AuditSink, err error) { obj, err := c.Fake. Invokes(testing.NewRootCreateAction(auditsinksResource, auditSink), &v1alpha1.AuditSink{}) if obj == nil { @@ -85,7 +87,7 @@ func (c *FakeAuditSinks) Create(auditSink *v1alpha1.AuditSink) (result *v1alpha1 } // Update takes the representation of a auditSink and updates it. Returns the server's representation of the auditSink, and an error, if there is any. -func (c *FakeAuditSinks) Update(auditSink *v1alpha1.AuditSink) (result *v1alpha1.AuditSink, err error) { +func (c *FakeAuditSinks) Update(ctx context.Context, auditSink *v1alpha1.AuditSink, opts v1.UpdateOptions) (result *v1alpha1.AuditSink, err error) { obj, err := c.Fake. Invokes(testing.NewRootUpdateAction(auditsinksResource, auditSink), &v1alpha1.AuditSink{}) if obj == nil { @@ -95,22 +97,22 @@ func (c *FakeAuditSinks) Update(auditSink *v1alpha1.AuditSink) (result *v1alpha1 } // Delete takes name of the auditSink and deletes it. Returns an error if one occurs. -func (c *FakeAuditSinks) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeAuditSinks) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewRootDeleteAction(auditsinksResource, name), &v1alpha1.AuditSink{}) return err } // DeleteCollection deletes a collection of objects. -func (c *FakeAuditSinks) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewRootDeleteCollectionAction(auditsinksResource, listOptions) +func (c *FakeAuditSinks) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(auditsinksResource, listOpts) _, err := c.Fake.Invokes(action, &v1alpha1.AuditSinkList{}) return err } // Patch applies the patch and returns the patched auditSink. -func (c *FakeAuditSinks) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.AuditSink, err error) { +func (c *FakeAuditSinks) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.AuditSink, err error) { obj, err := c.Fake. Invokes(testing.NewRootPatchSubresourceAction(auditsinksResource, name, pt, data, subresources...), &v1alpha1.AuditSink{}) if obj == nil { diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1/fake/fake_tokenreview.go b/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1/fake/fake_tokenreview.go index e2a7f72b66..b85fcfbb87 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1/fake/fake_tokenreview.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1/fake/fake_tokenreview.go @@ -18,7 +18,30 @@ limitations under the License. package fake +import ( + "context" + + v1 "k8s.io/api/authentication/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + schema "k8s.io/apimachinery/pkg/runtime/schema" + testing "k8s.io/client-go/testing" +) + // FakeTokenReviews implements TokenReviewInterface type FakeTokenReviews struct { Fake *FakeAuthenticationV1 } + +var tokenreviewsResource = schema.GroupVersionResource{Group: "authentication.k8s.io", Version: "v1", Resource: "tokenreviews"} + +var tokenreviewsKind = schema.GroupVersionKind{Group: "authentication.k8s.io", Version: "v1", Kind: "TokenReview"} + +// Create takes the representation of a tokenReview and creates it. Returns the server's representation of the tokenReview, and an error, if there is any. +func (c *FakeTokenReviews) Create(ctx context.Context, tokenReview *v1.TokenReview, opts metav1.CreateOptions) (result *v1.TokenReview, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootCreateAction(tokenreviewsResource, tokenReview), &v1.TokenReview{}) + if obj == nil { + return nil, err + } + return obj.(*v1.TokenReview), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1/fake/fake_tokenreview_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1/fake/fake_tokenreview_expansion.go deleted file mode 100644 index 610948ef10..0000000000 --- a/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1/fake/fake_tokenreview_expansion.go +++ /dev/null @@ -1,33 +0,0 @@ -/* -Copyright 2017 The Kubernetes 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. -*/ - -package fake - -import ( - "context" - - authenticationapi "k8s.io/api/authentication/v1" - core "k8s.io/client-go/testing" -) - -func (c *FakeTokenReviews) Create(tokenReview *authenticationapi.TokenReview) (result *authenticationapi.TokenReview, err error) { - return c.CreateContext(context.Background(), tokenReview) -} - -func (c *FakeTokenReviews) CreateContext(ctx context.Context, tokenReview *authenticationapi.TokenReview) (result *authenticationapi.TokenReview, err error) { - obj, err := c.Fake.Invokes(core.NewRootCreateAction(authenticationapi.SchemeGroupVersion.WithResource("tokenreviews"), tokenReview), &authenticationapi.TokenReview{}) - return obj.(*authenticationapi.TokenReview), err -} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1/generated_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1/generated_expansion.go index 177209ec61..0413fb2b66 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1/generated_expansion.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1/generated_expansion.go @@ -17,3 +17,5 @@ limitations under the License. // Code generated by client-gen. DO NOT EDIT. package v1 + +type TokenReviewExpansion interface{} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1/tokenreview.go b/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1/tokenreview.go index 25a8d6a17c..ca7cd47d26 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1/tokenreview.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1/tokenreview.go @@ -19,6 +19,11 @@ limitations under the License. package v1 import ( + "context" + + v1 "k8s.io/api/authentication/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" ) @@ -30,6 +35,7 @@ type TokenReviewsGetter interface { // TokenReviewInterface has methods to work with TokenReview resources. type TokenReviewInterface interface { + Create(ctx context.Context, tokenReview *v1.TokenReview, opts metav1.CreateOptions) (*v1.TokenReview, error) TokenReviewExpansion } @@ -44,3 +50,15 @@ func newTokenReviews(c *AuthenticationV1Client) *tokenReviews { client: c.RESTClient(), } } + +// Create takes the representation of a tokenReview and creates it. Returns the server's representation of the tokenReview, and an error, if there is any. +func (c *tokenReviews) Create(ctx context.Context, tokenReview *v1.TokenReview, opts metav1.CreateOptions) (result *v1.TokenReview, err error) { + result = &v1.TokenReview{} + err = c.client.Post(). + Resource("tokenreviews"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(tokenReview). + Do(ctx). + Into(result) + return +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1/tokenreview_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1/tokenreview_expansion.go deleted file mode 100644 index 8a21b7c764..0000000000 --- a/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1/tokenreview_expansion.go +++ /dev/null @@ -1,43 +0,0 @@ -/* -Copyright 2017 The Kubernetes 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. -*/ - -package v1 - -import ( - "context" - - authenticationapi "k8s.io/api/authentication/v1" -) - -type TokenReviewExpansion interface { - Create(tokenReview *authenticationapi.TokenReview) (result *authenticationapi.TokenReview, err error) - CreateContext(ctx context.Context, tokenReview *authenticationapi.TokenReview) (result *authenticationapi.TokenReview, err error) -} - -func (c *tokenReviews) Create(tokenReview *authenticationapi.TokenReview) (result *authenticationapi.TokenReview, err error) { - return c.CreateContext(context.Background(), tokenReview) -} - -func (c *tokenReviews) CreateContext(ctx context.Context, tokenReview *authenticationapi.TokenReview) (result *authenticationapi.TokenReview, err error) { - result = &authenticationapi.TokenReview{} - err = c.client.Post(). - Context(ctx). - Resource("tokenreviews"). - Body(tokenReview). - Do(). - Into(result) - return -} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/fake/fake_tokenreview.go b/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/fake/fake_tokenreview.go index 63b6b6a853..0da3ec6f43 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/fake/fake_tokenreview.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/fake/fake_tokenreview.go @@ -18,7 +18,30 @@ limitations under the License. package fake +import ( + "context" + + v1beta1 "k8s.io/api/authentication/v1beta1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + schema "k8s.io/apimachinery/pkg/runtime/schema" + testing "k8s.io/client-go/testing" +) + // FakeTokenReviews implements TokenReviewInterface type FakeTokenReviews struct { Fake *FakeAuthenticationV1beta1 } + +var tokenreviewsResource = schema.GroupVersionResource{Group: "authentication.k8s.io", Version: "v1beta1", Resource: "tokenreviews"} + +var tokenreviewsKind = schema.GroupVersionKind{Group: "authentication.k8s.io", Version: "v1beta1", Kind: "TokenReview"} + +// Create takes the representation of a tokenReview and creates it. Returns the server's representation of the tokenReview, and an error, if there is any. +func (c *FakeTokenReviews) Create(ctx context.Context, tokenReview *v1beta1.TokenReview, opts v1.CreateOptions) (result *v1beta1.TokenReview, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootCreateAction(tokenreviewsResource, tokenReview), &v1beta1.TokenReview{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.TokenReview), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/fake/fake_tokenreview_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/fake/fake_tokenreview_expansion.go deleted file mode 100644 index f9c487c3d8..0000000000 --- a/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/fake/fake_tokenreview_expansion.go +++ /dev/null @@ -1,33 +0,0 @@ -/* -Copyright 2016 The Kubernetes 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. -*/ - -package fake - -import ( - "context" - - authenticationapi "k8s.io/api/authentication/v1beta1" - core "k8s.io/client-go/testing" -) - -func (c *FakeTokenReviews) Create(tokenReview *authenticationapi.TokenReview) (result *authenticationapi.TokenReview, err error) { - return c.CreateContext(context.Background(), tokenReview) -} - -func (c *FakeTokenReviews) CreateContext(ctx context.Context, tokenReview *authenticationapi.TokenReview) (result *authenticationapi.TokenReview, err error) { - obj, err := c.Fake.Invokes(core.NewRootCreateAction(authenticationapi.SchemeGroupVersion.WithResource("tokenreviews"), tokenReview), &authenticationapi.TokenReview{}) - return obj.(*authenticationapi.TokenReview), err -} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/generated_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/generated_expansion.go index f6df769632..60bf15ab99 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/generated_expansion.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/generated_expansion.go @@ -17,3 +17,5 @@ limitations under the License. // Code generated by client-gen. DO NOT EDIT. package v1beta1 + +type TokenReviewExpansion interface{} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/tokenreview.go b/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/tokenreview.go index 0ac3561e13..5da1224337 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/tokenreview.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/tokenreview.go @@ -19,6 +19,11 @@ limitations under the License. package v1beta1 import ( + "context" + + v1beta1 "k8s.io/api/authentication/v1beta1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" ) @@ -30,6 +35,7 @@ type TokenReviewsGetter interface { // TokenReviewInterface has methods to work with TokenReview resources. type TokenReviewInterface interface { + Create(ctx context.Context, tokenReview *v1beta1.TokenReview, opts v1.CreateOptions) (*v1beta1.TokenReview, error) TokenReviewExpansion } @@ -44,3 +50,15 @@ func newTokenReviews(c *AuthenticationV1beta1Client) *tokenReviews { client: c.RESTClient(), } } + +// Create takes the representation of a tokenReview and creates it. Returns the server's representation of the tokenReview, and an error, if there is any. +func (c *tokenReviews) Create(ctx context.Context, tokenReview *v1beta1.TokenReview, opts v1.CreateOptions) (result *v1beta1.TokenReview, err error) { + result = &v1beta1.TokenReview{} + err = c.client.Post(). + Resource("tokenreviews"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(tokenReview). + Do(ctx). + Into(result) + return +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/tokenreview_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/tokenreview_expansion.go deleted file mode 100644 index 0476b17359..0000000000 --- a/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/tokenreview_expansion.go +++ /dev/null @@ -1,43 +0,0 @@ -/* -Copyright 2016 The Kubernetes 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. -*/ - -package v1beta1 - -import ( - "context" - - authenticationapi "k8s.io/api/authentication/v1beta1" -) - -type TokenReviewExpansion interface { - Create(tokenReview *authenticationapi.TokenReview) (result *authenticationapi.TokenReview, err error) - CreateContext(ctx context.Context, tokenReview *authenticationapi.TokenReview) (result *authenticationapi.TokenReview, err error) -} - -func (c *tokenReviews) Create(tokenReview *authenticationapi.TokenReview) (result *authenticationapi.TokenReview, err error) { - return c.CreateContext(context.Background(), tokenReview) -} - -func (c *tokenReviews) CreateContext(ctx context.Context, tokenReview *authenticationapi.TokenReview) (result *authenticationapi.TokenReview, err error) { - result = &authenticationapi.TokenReview{} - err = c.client.Post(). - Context(ctx). - Resource("tokenreviews"). - Body(tokenReview). - Do(). - Into(result) - return -} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/fake/fake_localsubjectaccessreview.go b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/fake/fake_localsubjectaccessreview.go index 778ba9cea0..d74ae0a474 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/fake/fake_localsubjectaccessreview.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/fake/fake_localsubjectaccessreview.go @@ -18,8 +18,32 @@ limitations under the License. package fake +import ( + "context" + + v1 "k8s.io/api/authorization/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + schema "k8s.io/apimachinery/pkg/runtime/schema" + testing "k8s.io/client-go/testing" +) + // FakeLocalSubjectAccessReviews implements LocalSubjectAccessReviewInterface type FakeLocalSubjectAccessReviews struct { Fake *FakeAuthorizationV1 ns string } + +var localsubjectaccessreviewsResource = schema.GroupVersionResource{Group: "authorization.k8s.io", Version: "v1", Resource: "localsubjectaccessreviews"} + +var localsubjectaccessreviewsKind = schema.GroupVersionKind{Group: "authorization.k8s.io", Version: "v1", Kind: "LocalSubjectAccessReview"} + +// Create takes the representation of a localSubjectAccessReview and creates it. Returns the server's representation of the localSubjectAccessReview, and an error, if there is any. +func (c *FakeLocalSubjectAccessReviews) Create(ctx context.Context, localSubjectAccessReview *v1.LocalSubjectAccessReview, opts metav1.CreateOptions) (result *v1.LocalSubjectAccessReview, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(localsubjectaccessreviewsResource, c.ns, localSubjectAccessReview), &v1.LocalSubjectAccessReview{}) + + if obj == nil { + return nil, err + } + return obj.(*v1.LocalSubjectAccessReview), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/fake/fake_localsubjectaccessreview_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/fake/fake_localsubjectaccessreview_expansion.go deleted file mode 100644 index 59c8773774..0000000000 --- a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/fake/fake_localsubjectaccessreview_expansion.go +++ /dev/null @@ -1,33 +0,0 @@ -/* -Copyright 2017 The Kubernetes 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. -*/ - -package fake - -import ( - "context" - - authorizationapi "k8s.io/api/authorization/v1" - core "k8s.io/client-go/testing" -) - -func (c *FakeLocalSubjectAccessReviews) Create(sar *authorizationapi.LocalSubjectAccessReview) (result *authorizationapi.LocalSubjectAccessReview, err error) { - return c.CreateContext(context.Background(), sar) -} - -func (c *FakeLocalSubjectAccessReviews) CreateContext(ctx context.Context, sar *authorizationapi.LocalSubjectAccessReview) (result *authorizationapi.LocalSubjectAccessReview, err error) { - obj, err := c.Fake.Invokes(core.NewCreateAction(authorizationapi.SchemeGroupVersion.WithResource("localsubjectaccessreviews"), c.ns, sar), &authorizationapi.SubjectAccessReview{}) - return obj.(*authorizationapi.LocalSubjectAccessReview), err -} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/fake/fake_selfsubjectaccessreview.go b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/fake/fake_selfsubjectaccessreview.go index a43a980baf..80ebbbd45f 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/fake/fake_selfsubjectaccessreview.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/fake/fake_selfsubjectaccessreview.go @@ -18,7 +18,30 @@ limitations under the License. package fake +import ( + "context" + + v1 "k8s.io/api/authorization/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + schema "k8s.io/apimachinery/pkg/runtime/schema" + testing "k8s.io/client-go/testing" +) + // FakeSelfSubjectAccessReviews implements SelfSubjectAccessReviewInterface type FakeSelfSubjectAccessReviews struct { Fake *FakeAuthorizationV1 } + +var selfsubjectaccessreviewsResource = schema.GroupVersionResource{Group: "authorization.k8s.io", Version: "v1", Resource: "selfsubjectaccessreviews"} + +var selfsubjectaccessreviewsKind = schema.GroupVersionKind{Group: "authorization.k8s.io", Version: "v1", Kind: "SelfSubjectAccessReview"} + +// Create takes the representation of a selfSubjectAccessReview and creates it. Returns the server's representation of the selfSubjectAccessReview, and an error, if there is any. +func (c *FakeSelfSubjectAccessReviews) Create(ctx context.Context, selfSubjectAccessReview *v1.SelfSubjectAccessReview, opts metav1.CreateOptions) (result *v1.SelfSubjectAccessReview, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootCreateAction(selfsubjectaccessreviewsResource, selfSubjectAccessReview), &v1.SelfSubjectAccessReview{}) + if obj == nil { + return nil, err + } + return obj.(*v1.SelfSubjectAccessReview), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/fake/fake_selfsubjectaccessreview_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/fake/fake_selfsubjectaccessreview_expansion.go deleted file mode 100644 index d3ee5a6a8b..0000000000 --- a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/fake/fake_selfsubjectaccessreview_expansion.go +++ /dev/null @@ -1,33 +0,0 @@ -/* -Copyright 2017 The Kubernetes 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. -*/ - -package fake - -import ( - "context" - - authorizationapi "k8s.io/api/authorization/v1" - core "k8s.io/client-go/testing" -) - -func (c *FakeSelfSubjectAccessReviews) Create(sar *authorizationapi.SelfSubjectAccessReview) (result *authorizationapi.SelfSubjectAccessReview, err error) { - return c.CreateContext(context.Background(), sar) -} - -func (c *FakeSelfSubjectAccessReviews) CreateContext(ctx context.Context, sar *authorizationapi.SelfSubjectAccessReview) (result *authorizationapi.SelfSubjectAccessReview, err error) { - obj, err := c.Fake.Invokes(core.NewRootCreateAction(authorizationapi.SchemeGroupVersion.WithResource("selfsubjectaccessreviews"), sar), &authorizationapi.SelfSubjectAccessReview{}) - return obj.(*authorizationapi.SelfSubjectAccessReview), err -} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/fake/fake_selfsubjectrulesreview.go b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/fake/fake_selfsubjectrulesreview.go index 243f2e89ee..dd70908ad3 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/fake/fake_selfsubjectrulesreview.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/fake/fake_selfsubjectrulesreview.go @@ -18,7 +18,30 @@ limitations under the License. package fake +import ( + "context" + + v1 "k8s.io/api/authorization/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + schema "k8s.io/apimachinery/pkg/runtime/schema" + testing "k8s.io/client-go/testing" +) + // FakeSelfSubjectRulesReviews implements SelfSubjectRulesReviewInterface type FakeSelfSubjectRulesReviews struct { Fake *FakeAuthorizationV1 } + +var selfsubjectrulesreviewsResource = schema.GroupVersionResource{Group: "authorization.k8s.io", Version: "v1", Resource: "selfsubjectrulesreviews"} + +var selfsubjectrulesreviewsKind = schema.GroupVersionKind{Group: "authorization.k8s.io", Version: "v1", Kind: "SelfSubjectRulesReview"} + +// Create takes the representation of a selfSubjectRulesReview and creates it. Returns the server's representation of the selfSubjectRulesReview, and an error, if there is any. +func (c *FakeSelfSubjectRulesReviews) Create(ctx context.Context, selfSubjectRulesReview *v1.SelfSubjectRulesReview, opts metav1.CreateOptions) (result *v1.SelfSubjectRulesReview, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootCreateAction(selfsubjectrulesreviewsResource, selfSubjectRulesReview), &v1.SelfSubjectRulesReview{}) + if obj == nil { + return nil, err + } + return obj.(*v1.SelfSubjectRulesReview), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/fake/fake_selfsubjectrulesreview_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/fake/fake_selfsubjectrulesreview_expansion.go deleted file mode 100644 index 06f1cd6917..0000000000 --- a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/fake/fake_selfsubjectrulesreview_expansion.go +++ /dev/null @@ -1,33 +0,0 @@ -/* -Copyright 2017 The Kubernetes 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. -*/ - -package fake - -import ( - "context" - - authorizationapi "k8s.io/api/authorization/v1" - core "k8s.io/client-go/testing" -) - -func (c *FakeSelfSubjectRulesReviews) Create(srr *authorizationapi.SelfSubjectRulesReview) (result *authorizationapi.SelfSubjectRulesReview, err error) { - return c.CreateContext(context.Background(), srr) -} - -func (c *FakeSelfSubjectRulesReviews) CreateContext(ctx context.Context, srr *authorizationapi.SelfSubjectRulesReview) (result *authorizationapi.SelfSubjectRulesReview, err error) { - obj, err := c.Fake.Invokes(core.NewRootCreateAction(authorizationapi.SchemeGroupVersion.WithResource("selfsubjectrulesreviews"), srr), &authorizationapi.SelfSubjectRulesReview{}) - return obj.(*authorizationapi.SelfSubjectRulesReview), err -} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/fake/fake_subjectaccessreview.go b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/fake/fake_subjectaccessreview.go index d07e562546..b480b2b418 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/fake/fake_subjectaccessreview.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/fake/fake_subjectaccessreview.go @@ -18,7 +18,30 @@ limitations under the License. package fake +import ( + "context" + + v1 "k8s.io/api/authorization/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + schema "k8s.io/apimachinery/pkg/runtime/schema" + testing "k8s.io/client-go/testing" +) + // FakeSubjectAccessReviews implements SubjectAccessReviewInterface type FakeSubjectAccessReviews struct { Fake *FakeAuthorizationV1 } + +var subjectaccessreviewsResource = schema.GroupVersionResource{Group: "authorization.k8s.io", Version: "v1", Resource: "subjectaccessreviews"} + +var subjectaccessreviewsKind = schema.GroupVersionKind{Group: "authorization.k8s.io", Version: "v1", Kind: "SubjectAccessReview"} + +// Create takes the representation of a subjectAccessReview and creates it. Returns the server's representation of the subjectAccessReview, and an error, if there is any. +func (c *FakeSubjectAccessReviews) Create(ctx context.Context, subjectAccessReview *v1.SubjectAccessReview, opts metav1.CreateOptions) (result *v1.SubjectAccessReview, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootCreateAction(subjectaccessreviewsResource, subjectAccessReview), &v1.SubjectAccessReview{}) + if obj == nil { + return nil, err + } + return obj.(*v1.SubjectAccessReview), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/fake/fake_subjectaccessreview_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/fake/fake_subjectaccessreview_expansion.go deleted file mode 100644 index 6e3f3b45b3..0000000000 --- a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/fake/fake_subjectaccessreview_expansion.go +++ /dev/null @@ -1,36 +0,0 @@ -/* -Copyright 2017 The Kubernetes 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. -*/ - -package fake - -import ( - "context" - - authorizationapi "k8s.io/api/authorization/v1" - core "k8s.io/client-go/testing" -) - -func (c *FakeSubjectAccessReviews) Create(sar *authorizationapi.SubjectAccessReview) (result *authorizationapi.SubjectAccessReview, err error) { - return c.CreateContext(context.Background(), sar) -} - -func (c *FakeSubjectAccessReviews) CreateContext(ctx context.Context, sar *authorizationapi.SubjectAccessReview) (result *authorizationapi.SubjectAccessReview, err error) { - obj, err := c.Fake.Invokes(core.NewRootCreateAction(authorizationapi.SchemeGroupVersion.WithResource("subjectaccessreviews"), sar), &authorizationapi.SubjectAccessReview{}) - if obj == nil { - return nil, err - } - return obj.(*authorizationapi.SubjectAccessReview), err -} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/generated_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/generated_expansion.go index 177209ec61..fe8c72cd4d 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/generated_expansion.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/generated_expansion.go @@ -17,3 +17,11 @@ limitations under the License. // Code generated by client-gen. DO NOT EDIT. package v1 + +type LocalSubjectAccessReviewExpansion interface{} + +type SelfSubjectAccessReviewExpansion interface{} + +type SelfSubjectRulesReviewExpansion interface{} + +type SubjectAccessReviewExpansion interface{} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/localsubjectaccessreview.go b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/localsubjectaccessreview.go index 0292c78618..84b2efe166 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/localsubjectaccessreview.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/localsubjectaccessreview.go @@ -19,6 +19,11 @@ limitations under the License. package v1 import ( + "context" + + v1 "k8s.io/api/authorization/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" ) @@ -30,6 +35,7 @@ type LocalSubjectAccessReviewsGetter interface { // LocalSubjectAccessReviewInterface has methods to work with LocalSubjectAccessReview resources. type LocalSubjectAccessReviewInterface interface { + Create(ctx context.Context, localSubjectAccessReview *v1.LocalSubjectAccessReview, opts metav1.CreateOptions) (*v1.LocalSubjectAccessReview, error) LocalSubjectAccessReviewExpansion } @@ -46,3 +52,16 @@ func newLocalSubjectAccessReviews(c *AuthorizationV1Client, namespace string) *l ns: namespace, } } + +// Create takes the representation of a localSubjectAccessReview and creates it. Returns the server's representation of the localSubjectAccessReview, and an error, if there is any. +func (c *localSubjectAccessReviews) Create(ctx context.Context, localSubjectAccessReview *v1.LocalSubjectAccessReview, opts metav1.CreateOptions) (result *v1.LocalSubjectAccessReview, err error) { + result = &v1.LocalSubjectAccessReview{} + err = c.client.Post(). + Namespace(c.ns). + Resource("localsubjectaccessreviews"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(localSubjectAccessReview). + Do(ctx). + Into(result) + return +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/localsubjectaccessreview_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/localsubjectaccessreview_expansion.go deleted file mode 100644 index 9836308bd6..0000000000 --- a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/localsubjectaccessreview_expansion.go +++ /dev/null @@ -1,44 +0,0 @@ -/* -Copyright 2017 The Kubernetes 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. -*/ - -package v1 - -import ( - "context" - - authorizationapi "k8s.io/api/authorization/v1" -) - -type LocalSubjectAccessReviewExpansion interface { - Create(sar *authorizationapi.LocalSubjectAccessReview) (result *authorizationapi.LocalSubjectAccessReview, err error) - CreateContext(ctx context.Context, sar *authorizationapi.LocalSubjectAccessReview) (result *authorizationapi.LocalSubjectAccessReview, err error) -} - -func (c *localSubjectAccessReviews) Create(sar *authorizationapi.LocalSubjectAccessReview) (result *authorizationapi.LocalSubjectAccessReview, err error) { - return c.CreateContext(context.Background(), sar) -} - -func (c *localSubjectAccessReviews) CreateContext(ctx context.Context, sar *authorizationapi.LocalSubjectAccessReview) (result *authorizationapi.LocalSubjectAccessReview, err error) { - result = &authorizationapi.LocalSubjectAccessReview{} - err = c.client.Post(). - Context(ctx). - Namespace(c.ns). - Resource("localsubjectaccessreviews"). - Body(sar). - Do(). - Into(result) - return -} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/selfsubjectaccessreview.go b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/selfsubjectaccessreview.go index 1e3a458178..2006196c11 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/selfsubjectaccessreview.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/selfsubjectaccessreview.go @@ -19,6 +19,11 @@ limitations under the License. package v1 import ( + "context" + + v1 "k8s.io/api/authorization/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" ) @@ -30,6 +35,7 @@ type SelfSubjectAccessReviewsGetter interface { // SelfSubjectAccessReviewInterface has methods to work with SelfSubjectAccessReview resources. type SelfSubjectAccessReviewInterface interface { + Create(ctx context.Context, selfSubjectAccessReview *v1.SelfSubjectAccessReview, opts metav1.CreateOptions) (*v1.SelfSubjectAccessReview, error) SelfSubjectAccessReviewExpansion } @@ -44,3 +50,15 @@ func newSelfSubjectAccessReviews(c *AuthorizationV1Client) *selfSubjectAccessRev client: c.RESTClient(), } } + +// Create takes the representation of a selfSubjectAccessReview and creates it. Returns the server's representation of the selfSubjectAccessReview, and an error, if there is any. +func (c *selfSubjectAccessReviews) Create(ctx context.Context, selfSubjectAccessReview *v1.SelfSubjectAccessReview, opts metav1.CreateOptions) (result *v1.SelfSubjectAccessReview, err error) { + result = &v1.SelfSubjectAccessReview{} + err = c.client.Post(). + Resource("selfsubjectaccessreviews"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(selfSubjectAccessReview). + Do(ctx). + Into(result) + return +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/selfsubjectaccessreview_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/selfsubjectaccessreview_expansion.go deleted file mode 100644 index 916e5b43f0..0000000000 --- a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/selfsubjectaccessreview_expansion.go +++ /dev/null @@ -1,43 +0,0 @@ -/* -Copyright 2017 The Kubernetes 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. -*/ - -package v1 - -import ( - "context" - - authorizationapi "k8s.io/api/authorization/v1" -) - -type SelfSubjectAccessReviewExpansion interface { - Create(sar *authorizationapi.SelfSubjectAccessReview) (result *authorizationapi.SelfSubjectAccessReview, err error) - CreateContext(ctx context.Context, sar *authorizationapi.SelfSubjectAccessReview) (result *authorizationapi.SelfSubjectAccessReview, err error) -} - -func (c *selfSubjectAccessReviews) Create(sar *authorizationapi.SelfSubjectAccessReview) (result *authorizationapi.SelfSubjectAccessReview, err error) { - return c.CreateContext(context.Background(), sar) -} - -func (c *selfSubjectAccessReviews) CreateContext(ctx context.Context, sar *authorizationapi.SelfSubjectAccessReview) (result *authorizationapi.SelfSubjectAccessReview, err error) { - result = &authorizationapi.SelfSubjectAccessReview{} - err = c.client.Post(). - Context(ctx). - Resource("selfsubjectaccessreviews"). - Body(sar). - Do(). - Into(result) - return -} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/selfsubjectrulesreview.go b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/selfsubjectrulesreview.go index 50a0233eb9..25d99f7b52 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/selfsubjectrulesreview.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/selfsubjectrulesreview.go @@ -19,6 +19,11 @@ limitations under the License. package v1 import ( + "context" + + v1 "k8s.io/api/authorization/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" ) @@ -30,6 +35,7 @@ type SelfSubjectRulesReviewsGetter interface { // SelfSubjectRulesReviewInterface has methods to work with SelfSubjectRulesReview resources. type SelfSubjectRulesReviewInterface interface { + Create(ctx context.Context, selfSubjectRulesReview *v1.SelfSubjectRulesReview, opts metav1.CreateOptions) (*v1.SelfSubjectRulesReview, error) SelfSubjectRulesReviewExpansion } @@ -44,3 +50,15 @@ func newSelfSubjectRulesReviews(c *AuthorizationV1Client) *selfSubjectRulesRevie client: c.RESTClient(), } } + +// Create takes the representation of a selfSubjectRulesReview and creates it. Returns the server's representation of the selfSubjectRulesReview, and an error, if there is any. +func (c *selfSubjectRulesReviews) Create(ctx context.Context, selfSubjectRulesReview *v1.SelfSubjectRulesReview, opts metav1.CreateOptions) (result *v1.SelfSubjectRulesReview, err error) { + result = &v1.SelfSubjectRulesReview{} + err = c.client.Post(). + Resource("selfsubjectrulesreviews"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(selfSubjectRulesReview). + Do(ctx). + Into(result) + return +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/selfsubjectrulesreview_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/selfsubjectrulesreview_expansion.go deleted file mode 100644 index 365282ed86..0000000000 --- a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/selfsubjectrulesreview_expansion.go +++ /dev/null @@ -1,43 +0,0 @@ -/* -Copyright 2017 The Kubernetes 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. -*/ - -package v1 - -import ( - "context" - - authorizationapi "k8s.io/api/authorization/v1" -) - -type SelfSubjectRulesReviewExpansion interface { - Create(srr *authorizationapi.SelfSubjectRulesReview) (result *authorizationapi.SelfSubjectRulesReview, err error) - CreateContext(ctx context.Context, srr *authorizationapi.SelfSubjectRulesReview) (result *authorizationapi.SelfSubjectRulesReview, err error) -} - -func (c *selfSubjectRulesReviews) Create(srr *authorizationapi.SelfSubjectRulesReview) (result *authorizationapi.SelfSubjectRulesReview, err error) { - return c.CreateContext(context.Background(), srr) -} - -func (c *selfSubjectRulesReviews) CreateContext(ctx context.Context, srr *authorizationapi.SelfSubjectRulesReview) (result *authorizationapi.SelfSubjectRulesReview, err error) { - result = &authorizationapi.SelfSubjectRulesReview{} - err = c.client.Post(). - Context(ctx). - Resource("selfsubjectrulesreviews"). - Body(srr). - Do(). - Into(result) - return -} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/subjectaccessreview.go b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/subjectaccessreview.go index 9c09008c3d..8ac0566a2e 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/subjectaccessreview.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/subjectaccessreview.go @@ -19,6 +19,11 @@ limitations under the License. package v1 import ( + "context" + + v1 "k8s.io/api/authorization/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" ) @@ -30,6 +35,7 @@ type SubjectAccessReviewsGetter interface { // SubjectAccessReviewInterface has methods to work with SubjectAccessReview resources. type SubjectAccessReviewInterface interface { + Create(ctx context.Context, subjectAccessReview *v1.SubjectAccessReview, opts metav1.CreateOptions) (*v1.SubjectAccessReview, error) SubjectAccessReviewExpansion } @@ -44,3 +50,15 @@ func newSubjectAccessReviews(c *AuthorizationV1Client) *subjectAccessReviews { client: c.RESTClient(), } } + +// Create takes the representation of a subjectAccessReview and creates it. Returns the server's representation of the subjectAccessReview, and an error, if there is any. +func (c *subjectAccessReviews) Create(ctx context.Context, subjectAccessReview *v1.SubjectAccessReview, opts metav1.CreateOptions) (result *v1.SubjectAccessReview, err error) { + result = &v1.SubjectAccessReview{} + err = c.client.Post(). + Resource("subjectaccessreviews"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(subjectAccessReview). + Do(ctx). + Into(result) + return +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/subjectaccessreview_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/subjectaccessreview_expansion.go deleted file mode 100644 index 927544f127..0000000000 --- a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/subjectaccessreview_expansion.go +++ /dev/null @@ -1,44 +0,0 @@ -/* -Copyright 2017 The Kubernetes 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. -*/ - -package v1 - -import ( - "context" - - authorizationapi "k8s.io/api/authorization/v1" -) - -// The SubjectAccessReviewExpansion interface allows manually adding extra methods to the AuthorizationInterface. -type SubjectAccessReviewExpansion interface { - Create(sar *authorizationapi.SubjectAccessReview) (result *authorizationapi.SubjectAccessReview, err error) - CreateContext(ctx context.Context, sar *authorizationapi.SubjectAccessReview) (result *authorizationapi.SubjectAccessReview, err error) -} - -func (c *subjectAccessReviews) Create(sar *authorizationapi.SubjectAccessReview) (result *authorizationapi.SubjectAccessReview, err error) { - return c.CreateContext(context.Background(), sar) -} - -func (c *subjectAccessReviews) CreateContext(ctx context.Context, sar *authorizationapi.SubjectAccessReview) (result *authorizationapi.SubjectAccessReview, err error) { - result = &authorizationapi.SubjectAccessReview{} - err = c.client.Post(). - Context(ctx). - Resource("subjectaccessreviews"). - Body(sar). - Do(). - Into(result) - return -} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake/fake_generated_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake/fake_generated_expansion.go deleted file mode 100644 index 8754e39d87..0000000000 --- a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake/fake_generated_expansion.go +++ /dev/null @@ -1,17 +0,0 @@ -/* -Copyright 2016 The Kubernetes 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. -*/ - -package fake diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake/fake_localsubjectaccessreview.go b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake/fake_localsubjectaccessreview.go index d02d05e5d1..2d3ba44628 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake/fake_localsubjectaccessreview.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake/fake_localsubjectaccessreview.go @@ -18,8 +18,32 @@ limitations under the License. package fake +import ( + "context" + + v1beta1 "k8s.io/api/authorization/v1beta1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + schema "k8s.io/apimachinery/pkg/runtime/schema" + testing "k8s.io/client-go/testing" +) + // FakeLocalSubjectAccessReviews implements LocalSubjectAccessReviewInterface type FakeLocalSubjectAccessReviews struct { Fake *FakeAuthorizationV1beta1 ns string } + +var localsubjectaccessreviewsResource = schema.GroupVersionResource{Group: "authorization.k8s.io", Version: "v1beta1", Resource: "localsubjectaccessreviews"} + +var localsubjectaccessreviewsKind = schema.GroupVersionKind{Group: "authorization.k8s.io", Version: "v1beta1", Kind: "LocalSubjectAccessReview"} + +// Create takes the representation of a localSubjectAccessReview and creates it. Returns the server's representation of the localSubjectAccessReview, and an error, if there is any. +func (c *FakeLocalSubjectAccessReviews) Create(ctx context.Context, localSubjectAccessReview *v1beta1.LocalSubjectAccessReview, opts v1.CreateOptions) (result *v1beta1.LocalSubjectAccessReview, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(localsubjectaccessreviewsResource, c.ns, localSubjectAccessReview), &v1beta1.LocalSubjectAccessReview{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.LocalSubjectAccessReview), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake/fake_localsubjectaccessreview_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake/fake_localsubjectaccessreview_expansion.go deleted file mode 100644 index f8580d28a8..0000000000 --- a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake/fake_localsubjectaccessreview_expansion.go +++ /dev/null @@ -1,33 +0,0 @@ -/* -Copyright 2016 The Kubernetes 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. -*/ - -package fake - -import ( - "context" - - authorizationapi "k8s.io/api/authorization/v1beta1" - core "k8s.io/client-go/testing" -) - -func (c *FakeLocalSubjectAccessReviews) Create(sar *authorizationapi.LocalSubjectAccessReview) (result *authorizationapi.LocalSubjectAccessReview, err error) { - return c.CreateContext(context.Background(), sar) -} - -func (c *FakeLocalSubjectAccessReviews) CreateContext(ctx context.Context, sar *authorizationapi.LocalSubjectAccessReview) (result *authorizationapi.LocalSubjectAccessReview, err error) { - obj, err := c.Fake.Invokes(core.NewCreateAction(authorizationapi.SchemeGroupVersion.WithResource("localsubjectaccessreviews"), c.ns, sar), &authorizationapi.SubjectAccessReview{}) - return obj.(*authorizationapi.LocalSubjectAccessReview), err -} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake/fake_selfsubjectaccessreview.go b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake/fake_selfsubjectaccessreview.go index 8f98ce7a3c..febe90c77a 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake/fake_selfsubjectaccessreview.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake/fake_selfsubjectaccessreview.go @@ -18,7 +18,30 @@ limitations under the License. package fake +import ( + "context" + + v1beta1 "k8s.io/api/authorization/v1beta1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + schema "k8s.io/apimachinery/pkg/runtime/schema" + testing "k8s.io/client-go/testing" +) + // FakeSelfSubjectAccessReviews implements SelfSubjectAccessReviewInterface type FakeSelfSubjectAccessReviews struct { Fake *FakeAuthorizationV1beta1 } + +var selfsubjectaccessreviewsResource = schema.GroupVersionResource{Group: "authorization.k8s.io", Version: "v1beta1", Resource: "selfsubjectaccessreviews"} + +var selfsubjectaccessreviewsKind = schema.GroupVersionKind{Group: "authorization.k8s.io", Version: "v1beta1", Kind: "SelfSubjectAccessReview"} + +// Create takes the representation of a selfSubjectAccessReview and creates it. Returns the server's representation of the selfSubjectAccessReview, and an error, if there is any. +func (c *FakeSelfSubjectAccessReviews) Create(ctx context.Context, selfSubjectAccessReview *v1beta1.SelfSubjectAccessReview, opts v1.CreateOptions) (result *v1beta1.SelfSubjectAccessReview, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootCreateAction(selfsubjectaccessreviewsResource, selfSubjectAccessReview), &v1beta1.SelfSubjectAccessReview{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.SelfSubjectAccessReview), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake/fake_selfsubjectaccessreview_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake/fake_selfsubjectaccessreview_expansion.go deleted file mode 100644 index cf1fe78700..0000000000 --- a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake/fake_selfsubjectaccessreview_expansion.go +++ /dev/null @@ -1,33 +0,0 @@ -/* -Copyright 2016 The Kubernetes 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. -*/ - -package fake - -import ( - "context" - - authorizationapi "k8s.io/api/authorization/v1beta1" - core "k8s.io/client-go/testing" -) - -func (c *FakeSelfSubjectAccessReviews) Create(sar *authorizationapi.SelfSubjectAccessReview) (result *authorizationapi.SelfSubjectAccessReview, err error) { - return c.CreateContext(context.Background(), sar) -} - -func (c *FakeSelfSubjectAccessReviews) CreateContext(ctx context.Context, sar *authorizationapi.SelfSubjectAccessReview) (result *authorizationapi.SelfSubjectAccessReview, err error) { - obj, err := c.Fake.Invokes(core.NewRootCreateAction(authorizationapi.SchemeGroupVersion.WithResource("selfsubjectaccessreviews"), sar), &authorizationapi.SelfSubjectAccessReview{}) - return obj.(*authorizationapi.SelfSubjectAccessReview), err -} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake/fake_selfsubjectrulesreview.go b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake/fake_selfsubjectrulesreview.go index d8466b4c8d..02df06012a 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake/fake_selfsubjectrulesreview.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake/fake_selfsubjectrulesreview.go @@ -18,7 +18,30 @@ limitations under the License. package fake +import ( + "context" + + v1beta1 "k8s.io/api/authorization/v1beta1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + schema "k8s.io/apimachinery/pkg/runtime/schema" + testing "k8s.io/client-go/testing" +) + // FakeSelfSubjectRulesReviews implements SelfSubjectRulesReviewInterface type FakeSelfSubjectRulesReviews struct { Fake *FakeAuthorizationV1beta1 } + +var selfsubjectrulesreviewsResource = schema.GroupVersionResource{Group: "authorization.k8s.io", Version: "v1beta1", Resource: "selfsubjectrulesreviews"} + +var selfsubjectrulesreviewsKind = schema.GroupVersionKind{Group: "authorization.k8s.io", Version: "v1beta1", Kind: "SelfSubjectRulesReview"} + +// Create takes the representation of a selfSubjectRulesReview and creates it. Returns the server's representation of the selfSubjectRulesReview, and an error, if there is any. +func (c *FakeSelfSubjectRulesReviews) Create(ctx context.Context, selfSubjectRulesReview *v1beta1.SelfSubjectRulesReview, opts v1.CreateOptions) (result *v1beta1.SelfSubjectRulesReview, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootCreateAction(selfsubjectrulesreviewsResource, selfSubjectRulesReview), &v1beta1.SelfSubjectRulesReview{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.SelfSubjectRulesReview), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake/fake_selfsubjectrulesreview_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake/fake_selfsubjectrulesreview_expansion.go deleted file mode 100644 index 27410b81cd..0000000000 --- a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake/fake_selfsubjectrulesreview_expansion.go +++ /dev/null @@ -1,33 +0,0 @@ -/* -Copyright 2017 The Kubernetes 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. -*/ - -package fake - -import ( - "context" - - authorizationapi "k8s.io/api/authorization/v1beta1" - core "k8s.io/client-go/testing" -) - -func (c *FakeSelfSubjectRulesReviews) Create(srr *authorizationapi.SelfSubjectRulesReview) (result *authorizationapi.SelfSubjectRulesReview, err error) { - return c.CreateContext(context.Background(), srr) -} - -func (c *FakeSelfSubjectRulesReviews) CreateContext(ctx context.Context, srr *authorizationapi.SelfSubjectRulesReview) (result *authorizationapi.SelfSubjectRulesReview, err error) { - obj, err := c.Fake.Invokes(core.NewRootCreateAction(authorizationapi.SchemeGroupVersion.WithResource("selfsubjectrulesreviews"), srr), &authorizationapi.SelfSubjectRulesReview{}) - return obj.(*authorizationapi.SelfSubjectRulesReview), err -} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake/fake_subjectaccessreview.go b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake/fake_subjectaccessreview.go index 0d0abdb72a..b5be913c4b 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake/fake_subjectaccessreview.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake/fake_subjectaccessreview.go @@ -18,7 +18,30 @@ limitations under the License. package fake +import ( + "context" + + v1beta1 "k8s.io/api/authorization/v1beta1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + schema "k8s.io/apimachinery/pkg/runtime/schema" + testing "k8s.io/client-go/testing" +) + // FakeSubjectAccessReviews implements SubjectAccessReviewInterface type FakeSubjectAccessReviews struct { Fake *FakeAuthorizationV1beta1 } + +var subjectaccessreviewsResource = schema.GroupVersionResource{Group: "authorization.k8s.io", Version: "v1beta1", Resource: "subjectaccessreviews"} + +var subjectaccessreviewsKind = schema.GroupVersionKind{Group: "authorization.k8s.io", Version: "v1beta1", Kind: "SubjectAccessReview"} + +// Create takes the representation of a subjectAccessReview and creates it. Returns the server's representation of the subjectAccessReview, and an error, if there is any. +func (c *FakeSubjectAccessReviews) Create(ctx context.Context, subjectAccessReview *v1beta1.SubjectAccessReview, opts v1.CreateOptions) (result *v1beta1.SubjectAccessReview, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootCreateAction(subjectaccessreviewsResource, subjectAccessReview), &v1beta1.SubjectAccessReview{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.SubjectAccessReview), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake/fake_subjectaccessreview_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake/fake_subjectaccessreview_expansion.go deleted file mode 100644 index 721c5963c6..0000000000 --- a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake/fake_subjectaccessreview_expansion.go +++ /dev/null @@ -1,33 +0,0 @@ -/* -Copyright 2016 The Kubernetes 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. -*/ - -package fake - -import ( - "context" - - authorizationapi "k8s.io/api/authorization/v1beta1" - core "k8s.io/client-go/testing" -) - -func (c *FakeSubjectAccessReviews) Create(sar *authorizationapi.SubjectAccessReview) (result *authorizationapi.SubjectAccessReview, err error) { - return c.CreateContext(context.Background(), sar) -} - -func (c *FakeSubjectAccessReviews) CreateContext(ctx context.Context, sar *authorizationapi.SubjectAccessReview) (result *authorizationapi.SubjectAccessReview, err error) { - obj, err := c.Fake.Invokes(core.NewRootCreateAction(authorizationapi.SchemeGroupVersion.WithResource("subjectaccessreviews"), sar), &authorizationapi.SubjectAccessReview{}) - return obj.(*authorizationapi.SubjectAccessReview), err -} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/generated_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/generated_expansion.go index f6df769632..ae2388301f 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/generated_expansion.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/generated_expansion.go @@ -17,3 +17,11 @@ limitations under the License. // Code generated by client-gen. DO NOT EDIT. package v1beta1 + +type LocalSubjectAccessReviewExpansion interface{} + +type SelfSubjectAccessReviewExpansion interface{} + +type SelfSubjectRulesReviewExpansion interface{} + +type SubjectAccessReviewExpansion interface{} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/localsubjectaccessreview.go b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/localsubjectaccessreview.go index f5e86a76a1..78584ba945 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/localsubjectaccessreview.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/localsubjectaccessreview.go @@ -19,6 +19,11 @@ limitations under the License. package v1beta1 import ( + "context" + + v1beta1 "k8s.io/api/authorization/v1beta1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" ) @@ -30,6 +35,7 @@ type LocalSubjectAccessReviewsGetter interface { // LocalSubjectAccessReviewInterface has methods to work with LocalSubjectAccessReview resources. type LocalSubjectAccessReviewInterface interface { + Create(ctx context.Context, localSubjectAccessReview *v1beta1.LocalSubjectAccessReview, opts v1.CreateOptions) (*v1beta1.LocalSubjectAccessReview, error) LocalSubjectAccessReviewExpansion } @@ -46,3 +52,16 @@ func newLocalSubjectAccessReviews(c *AuthorizationV1beta1Client, namespace strin ns: namespace, } } + +// Create takes the representation of a localSubjectAccessReview and creates it. Returns the server's representation of the localSubjectAccessReview, and an error, if there is any. +func (c *localSubjectAccessReviews) Create(ctx context.Context, localSubjectAccessReview *v1beta1.LocalSubjectAccessReview, opts v1.CreateOptions) (result *v1beta1.LocalSubjectAccessReview, err error) { + result = &v1beta1.LocalSubjectAccessReview{} + err = c.client.Post(). + Namespace(c.ns). + Resource("localsubjectaccessreviews"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(localSubjectAccessReview). + Do(ctx). + Into(result) + return +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/localsubjectaccessreview_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/localsubjectaccessreview_expansion.go deleted file mode 100644 index 148cf62823..0000000000 --- a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/localsubjectaccessreview_expansion.go +++ /dev/null @@ -1,44 +0,0 @@ -/* -Copyright 2016 The Kubernetes 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. -*/ - -package v1beta1 - -import ( - "context" - - authorizationapi "k8s.io/api/authorization/v1beta1" -) - -type LocalSubjectAccessReviewExpansion interface { - Create(sar *authorizationapi.LocalSubjectAccessReview) (result *authorizationapi.LocalSubjectAccessReview, err error) - CreateContext(ctx context.Context, sar *authorizationapi.LocalSubjectAccessReview) (result *authorizationapi.LocalSubjectAccessReview, err error) -} - -func (c *localSubjectAccessReviews) Create(sar *authorizationapi.LocalSubjectAccessReview) (result *authorizationapi.LocalSubjectAccessReview, err error) { - return c.CreateContext(context.Background(), sar) -} - -func (c *localSubjectAccessReviews) CreateContext(ctx context.Context, sar *authorizationapi.LocalSubjectAccessReview) (result *authorizationapi.LocalSubjectAccessReview, err error) { - result = &authorizationapi.LocalSubjectAccessReview{} - err = c.client.Post(). - Context(ctx). - Namespace(c.ns). - Resource("localsubjectaccessreviews"). - Body(sar). - Do(). - Into(result) - return -} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/selfsubjectaccessreview.go b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/selfsubjectaccessreview.go index 906712cc31..0286c93fe6 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/selfsubjectaccessreview.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/selfsubjectaccessreview.go @@ -19,6 +19,11 @@ limitations under the License. package v1beta1 import ( + "context" + + v1beta1 "k8s.io/api/authorization/v1beta1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" ) @@ -30,6 +35,7 @@ type SelfSubjectAccessReviewsGetter interface { // SelfSubjectAccessReviewInterface has methods to work with SelfSubjectAccessReview resources. type SelfSubjectAccessReviewInterface interface { + Create(ctx context.Context, selfSubjectAccessReview *v1beta1.SelfSubjectAccessReview, opts v1.CreateOptions) (*v1beta1.SelfSubjectAccessReview, error) SelfSubjectAccessReviewExpansion } @@ -44,3 +50,15 @@ func newSelfSubjectAccessReviews(c *AuthorizationV1beta1Client) *selfSubjectAcce client: c.RESTClient(), } } + +// Create takes the representation of a selfSubjectAccessReview and creates it. Returns the server's representation of the selfSubjectAccessReview, and an error, if there is any. +func (c *selfSubjectAccessReviews) Create(ctx context.Context, selfSubjectAccessReview *v1beta1.SelfSubjectAccessReview, opts v1.CreateOptions) (result *v1beta1.SelfSubjectAccessReview, err error) { + result = &v1beta1.SelfSubjectAccessReview{} + err = c.client.Post(). + Resource("selfsubjectaccessreviews"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(selfSubjectAccessReview). + Do(ctx). + Into(result) + return +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/selfsubjectaccessreview_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/selfsubjectaccessreview_expansion.go deleted file mode 100644 index 6edead0e77..0000000000 --- a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/selfsubjectaccessreview_expansion.go +++ /dev/null @@ -1,43 +0,0 @@ -/* -Copyright 2016 The Kubernetes 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. -*/ - -package v1beta1 - -import ( - "context" - - authorizationapi "k8s.io/api/authorization/v1beta1" -) - -type SelfSubjectAccessReviewExpansion interface { - Create(sar *authorizationapi.SelfSubjectAccessReview) (result *authorizationapi.SelfSubjectAccessReview, err error) - CreateContext(ctx context.Context, sar *authorizationapi.SelfSubjectAccessReview) (result *authorizationapi.SelfSubjectAccessReview, err error) -} - -func (c *selfSubjectAccessReviews) Create(sar *authorizationapi.SelfSubjectAccessReview) (result *authorizationapi.SelfSubjectAccessReview, err error) { - return c.CreateContext(context.Background(), sar) -} - -func (c *selfSubjectAccessReviews) CreateContext(ctx context.Context, sar *authorizationapi.SelfSubjectAccessReview) (result *authorizationapi.SelfSubjectAccessReview, err error) { - result = &authorizationapi.SelfSubjectAccessReview{} - err = c.client.Post(). - Context(ctx). - Resource("selfsubjectaccessreviews"). - Body(sar). - Do(). - Into(result) - return -} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/selfsubjectrulesreview.go b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/selfsubjectrulesreview.go index 56c0f99d4f..d772973ec6 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/selfsubjectrulesreview.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/selfsubjectrulesreview.go @@ -19,6 +19,11 @@ limitations under the License. package v1beta1 import ( + "context" + + v1beta1 "k8s.io/api/authorization/v1beta1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" ) @@ -30,6 +35,7 @@ type SelfSubjectRulesReviewsGetter interface { // SelfSubjectRulesReviewInterface has methods to work with SelfSubjectRulesReview resources. type SelfSubjectRulesReviewInterface interface { + Create(ctx context.Context, selfSubjectRulesReview *v1beta1.SelfSubjectRulesReview, opts v1.CreateOptions) (*v1beta1.SelfSubjectRulesReview, error) SelfSubjectRulesReviewExpansion } @@ -44,3 +50,15 @@ func newSelfSubjectRulesReviews(c *AuthorizationV1beta1Client) *selfSubjectRules client: c.RESTClient(), } } + +// Create takes the representation of a selfSubjectRulesReview and creates it. Returns the server's representation of the selfSubjectRulesReview, and an error, if there is any. +func (c *selfSubjectRulesReviews) Create(ctx context.Context, selfSubjectRulesReview *v1beta1.SelfSubjectRulesReview, opts v1.CreateOptions) (result *v1beta1.SelfSubjectRulesReview, err error) { + result = &v1beta1.SelfSubjectRulesReview{} + err = c.client.Post(). + Resource("selfsubjectrulesreviews"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(selfSubjectRulesReview). + Do(ctx). + Into(result) + return +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/selfsubjectrulesreview_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/selfsubjectrulesreview_expansion.go deleted file mode 100644 index a459d5c3ea..0000000000 --- a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/selfsubjectrulesreview_expansion.go +++ /dev/null @@ -1,43 +0,0 @@ -/* -Copyright 2017 The Kubernetes 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. -*/ - -package v1beta1 - -import ( - "context" - - authorizationapi "k8s.io/api/authorization/v1beta1" -) - -type SelfSubjectRulesReviewExpansion interface { - Create(srr *authorizationapi.SelfSubjectRulesReview) (result *authorizationapi.SelfSubjectRulesReview, err error) - CreateContext(ctx context.Context, srr *authorizationapi.SelfSubjectRulesReview) (result *authorizationapi.SelfSubjectRulesReview, err error) -} - -func (c *selfSubjectRulesReviews) Create(srr *authorizationapi.SelfSubjectRulesReview) (result *authorizationapi.SelfSubjectRulesReview, err error) { - return c.CreateContext(context.Background(), srr) -} - -func (c *selfSubjectRulesReviews) CreateContext(ctx context.Context, srr *authorizationapi.SelfSubjectRulesReview) (result *authorizationapi.SelfSubjectRulesReview, err error) { - result = &authorizationapi.SelfSubjectRulesReview{} - err = c.client.Post(). - Context(ctx). - Resource("selfsubjectrulesreviews"). - Body(srr). - Do(). - Into(result) - return -} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/subjectaccessreview.go b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/subjectaccessreview.go index 79f1ec5355..aebe8398c0 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/subjectaccessreview.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/subjectaccessreview.go @@ -19,6 +19,11 @@ limitations under the License. package v1beta1 import ( + "context" + + v1beta1 "k8s.io/api/authorization/v1beta1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" ) @@ -30,6 +35,7 @@ type SubjectAccessReviewsGetter interface { // SubjectAccessReviewInterface has methods to work with SubjectAccessReview resources. type SubjectAccessReviewInterface interface { + Create(ctx context.Context, subjectAccessReview *v1beta1.SubjectAccessReview, opts v1.CreateOptions) (*v1beta1.SubjectAccessReview, error) SubjectAccessReviewExpansion } @@ -44,3 +50,15 @@ func newSubjectAccessReviews(c *AuthorizationV1beta1Client) *subjectAccessReview client: c.RESTClient(), } } + +// Create takes the representation of a subjectAccessReview and creates it. Returns the server's representation of the subjectAccessReview, and an error, if there is any. +func (c *subjectAccessReviews) Create(ctx context.Context, subjectAccessReview *v1beta1.SubjectAccessReview, opts v1.CreateOptions) (result *v1beta1.SubjectAccessReview, err error) { + result = &v1beta1.SubjectAccessReview{} + err = c.client.Post(). + Resource("subjectaccessreviews"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(subjectAccessReview). + Do(ctx). + Into(result) + return +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/subjectaccessreview_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/subjectaccessreview_expansion.go deleted file mode 100644 index 7072e29ca4..0000000000 --- a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/subjectaccessreview_expansion.go +++ /dev/null @@ -1,44 +0,0 @@ -/* -Copyright 2016 The Kubernetes 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. -*/ - -package v1beta1 - -import ( - "context" - - authorizationapi "k8s.io/api/authorization/v1beta1" -) - -// The SubjectAccessReviewExpansion interface allows manually adding extra methods to the AuthorizationInterface. -type SubjectAccessReviewExpansion interface { - Create(sar *authorizationapi.SubjectAccessReview) (result *authorizationapi.SubjectAccessReview, err error) - CreateContext(ctx context.Context, sar *authorizationapi.SubjectAccessReview) (result *authorizationapi.SubjectAccessReview, err error) -} - -func (c *subjectAccessReviews) Create(sar *authorizationapi.SubjectAccessReview) (result *authorizationapi.SubjectAccessReview, err error) { - return c.CreateContext(context.Background(), sar) -} - -func (c *subjectAccessReviews) CreateContext(ctx context.Context, sar *authorizationapi.SubjectAccessReview) (result *authorizationapi.SubjectAccessReview, err error) { - result = &authorizationapi.SubjectAccessReview{} - err = c.client.Post(). - Context(ctx). - Resource("subjectaccessreviews"). - Body(sar). - Do(). - Into(result) - return -} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v1/fake/fake_horizontalpodautoscaler.go b/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v1/fake/fake_horizontalpodautoscaler.go index 6a4bf98810..82b8709a94 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v1/fake/fake_horizontalpodautoscaler.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v1/fake/fake_horizontalpodautoscaler.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + autoscalingv1 "k8s.io/api/autoscaling/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" @@ -39,7 +41,7 @@ var horizontalpodautoscalersResource = schema.GroupVersionResource{Group: "autos var horizontalpodautoscalersKind = schema.GroupVersionKind{Group: "autoscaling", Version: "v1", Kind: "HorizontalPodAutoscaler"} // Get takes name of the horizontalPodAutoscaler, and returns the corresponding horizontalPodAutoscaler object, and an error if there is any. -func (c *FakeHorizontalPodAutoscalers) Get(name string, options v1.GetOptions) (result *autoscalingv1.HorizontalPodAutoscaler, err error) { +func (c *FakeHorizontalPodAutoscalers) Get(ctx context.Context, name string, options v1.GetOptions) (result *autoscalingv1.HorizontalPodAutoscaler, err error) { obj, err := c.Fake. Invokes(testing.NewGetAction(horizontalpodautoscalersResource, c.ns, name), &autoscalingv1.HorizontalPodAutoscaler{}) @@ -50,7 +52,7 @@ func (c *FakeHorizontalPodAutoscalers) Get(name string, options v1.GetOptions) ( } // List takes label and field selectors, and returns the list of HorizontalPodAutoscalers that match those selectors. -func (c *FakeHorizontalPodAutoscalers) List(opts v1.ListOptions) (result *autoscalingv1.HorizontalPodAutoscalerList, err error) { +func (c *FakeHorizontalPodAutoscalers) List(ctx context.Context, opts v1.ListOptions) (result *autoscalingv1.HorizontalPodAutoscalerList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(horizontalpodautoscalersResource, horizontalpodautoscalersKind, c.ns, opts), &autoscalingv1.HorizontalPodAutoscalerList{}) @@ -72,14 +74,14 @@ func (c *FakeHorizontalPodAutoscalers) List(opts v1.ListOptions) (result *autosc } // Watch returns a watch.Interface that watches the requested horizontalPodAutoscalers. -func (c *FakeHorizontalPodAutoscalers) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeHorizontalPodAutoscalers) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(horizontalpodautoscalersResource, c.ns, opts)) } // Create takes the representation of a horizontalPodAutoscaler and creates it. Returns the server's representation of the horizontalPodAutoscaler, and an error, if there is any. -func (c *FakeHorizontalPodAutoscalers) Create(horizontalPodAutoscaler *autoscalingv1.HorizontalPodAutoscaler) (result *autoscalingv1.HorizontalPodAutoscaler, err error) { +func (c *FakeHorizontalPodAutoscalers) Create(ctx context.Context, horizontalPodAutoscaler *autoscalingv1.HorizontalPodAutoscaler, opts v1.CreateOptions) (result *autoscalingv1.HorizontalPodAutoscaler, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(horizontalpodautoscalersResource, c.ns, horizontalPodAutoscaler), &autoscalingv1.HorizontalPodAutoscaler{}) @@ -90,7 +92,7 @@ func (c *FakeHorizontalPodAutoscalers) Create(horizontalPodAutoscaler *autoscali } // Update takes the representation of a horizontalPodAutoscaler and updates it. Returns the server's representation of the horizontalPodAutoscaler, and an error, if there is any. -func (c *FakeHorizontalPodAutoscalers) Update(horizontalPodAutoscaler *autoscalingv1.HorizontalPodAutoscaler) (result *autoscalingv1.HorizontalPodAutoscaler, err error) { +func (c *FakeHorizontalPodAutoscalers) Update(ctx context.Context, horizontalPodAutoscaler *autoscalingv1.HorizontalPodAutoscaler, opts v1.UpdateOptions) (result *autoscalingv1.HorizontalPodAutoscaler, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(horizontalpodautoscalersResource, c.ns, horizontalPodAutoscaler), &autoscalingv1.HorizontalPodAutoscaler{}) @@ -102,7 +104,7 @@ func (c *FakeHorizontalPodAutoscalers) Update(horizontalPodAutoscaler *autoscali // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeHorizontalPodAutoscalers) UpdateStatus(horizontalPodAutoscaler *autoscalingv1.HorizontalPodAutoscaler) (*autoscalingv1.HorizontalPodAutoscaler, error) { +func (c *FakeHorizontalPodAutoscalers) UpdateStatus(ctx context.Context, horizontalPodAutoscaler *autoscalingv1.HorizontalPodAutoscaler, opts v1.UpdateOptions) (*autoscalingv1.HorizontalPodAutoscaler, error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(horizontalpodautoscalersResource, "status", c.ns, horizontalPodAutoscaler), &autoscalingv1.HorizontalPodAutoscaler{}) @@ -113,7 +115,7 @@ func (c *FakeHorizontalPodAutoscalers) UpdateStatus(horizontalPodAutoscaler *aut } // Delete takes name of the horizontalPodAutoscaler and deletes it. Returns an error if one occurs. -func (c *FakeHorizontalPodAutoscalers) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeHorizontalPodAutoscalers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewDeleteAction(horizontalpodautoscalersResource, c.ns, name), &autoscalingv1.HorizontalPodAutoscaler{}) @@ -121,15 +123,15 @@ func (c *FakeHorizontalPodAutoscalers) Delete(name string, options *v1.DeleteOpt } // DeleteCollection deletes a collection of objects. -func (c *FakeHorizontalPodAutoscalers) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(horizontalpodautoscalersResource, c.ns, listOptions) +func (c *FakeHorizontalPodAutoscalers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(horizontalpodautoscalersResource, c.ns, listOpts) _, err := c.Fake.Invokes(action, &autoscalingv1.HorizontalPodAutoscalerList{}) return err } // Patch applies the patch and returns the patched horizontalPodAutoscaler. -func (c *FakeHorizontalPodAutoscalers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *autoscalingv1.HorizontalPodAutoscaler, err error) { +func (c *FakeHorizontalPodAutoscalers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *autoscalingv1.HorizontalPodAutoscaler, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(horizontalpodautoscalersResource, c.ns, name, pt, data, subresources...), &autoscalingv1.HorizontalPodAutoscaler{}) diff --git a/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v1/horizontalpodautoscaler.go b/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v1/horizontalpodautoscaler.go index 0e0839fb50..ca8e0da8ba 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v1/horizontalpodautoscaler.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v1/horizontalpodautoscaler.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" "time" v1 "k8s.io/api/autoscaling/v1" @@ -37,15 +38,15 @@ type HorizontalPodAutoscalersGetter interface { // HorizontalPodAutoscalerInterface has methods to work with HorizontalPodAutoscaler resources. type HorizontalPodAutoscalerInterface interface { - Create(*v1.HorizontalPodAutoscaler) (*v1.HorizontalPodAutoscaler, error) - Update(*v1.HorizontalPodAutoscaler) (*v1.HorizontalPodAutoscaler, error) - UpdateStatus(*v1.HorizontalPodAutoscaler) (*v1.HorizontalPodAutoscaler, error) - Delete(name string, options *metav1.DeleteOptions) error - DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error - Get(name string, options metav1.GetOptions) (*v1.HorizontalPodAutoscaler, error) - List(opts metav1.ListOptions) (*v1.HorizontalPodAutoscalerList, error) - Watch(opts metav1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.HorizontalPodAutoscaler, err error) + Create(ctx context.Context, horizontalPodAutoscaler *v1.HorizontalPodAutoscaler, opts metav1.CreateOptions) (*v1.HorizontalPodAutoscaler, error) + Update(ctx context.Context, horizontalPodAutoscaler *v1.HorizontalPodAutoscaler, opts metav1.UpdateOptions) (*v1.HorizontalPodAutoscaler, error) + UpdateStatus(ctx context.Context, horizontalPodAutoscaler *v1.HorizontalPodAutoscaler, opts metav1.UpdateOptions) (*v1.HorizontalPodAutoscaler, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.HorizontalPodAutoscaler, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.HorizontalPodAutoscalerList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.HorizontalPodAutoscaler, err error) HorizontalPodAutoscalerExpansion } @@ -64,20 +65,20 @@ func newHorizontalPodAutoscalers(c *AutoscalingV1Client, namespace string) *hori } // Get takes name of the horizontalPodAutoscaler, and returns the corresponding horizontalPodAutoscaler object, and an error if there is any. -func (c *horizontalPodAutoscalers) Get(name string, options metav1.GetOptions) (result *v1.HorizontalPodAutoscaler, err error) { +func (c *horizontalPodAutoscalers) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.HorizontalPodAutoscaler, err error) { result = &v1.HorizontalPodAutoscaler{} err = c.client.Get(). Namespace(c.ns). Resource("horizontalpodautoscalers"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of HorizontalPodAutoscalers that match those selectors. -func (c *horizontalPodAutoscalers) List(opts metav1.ListOptions) (result *v1.HorizontalPodAutoscalerList, err error) { +func (c *horizontalPodAutoscalers) List(ctx context.Context, opts metav1.ListOptions) (result *v1.HorizontalPodAutoscalerList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -88,13 +89,13 @@ func (c *horizontalPodAutoscalers) List(opts metav1.ListOptions) (result *v1.Hor Resource("horizontalpodautoscalers"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested horizontalPodAutoscalers. -func (c *horizontalPodAutoscalers) Watch(opts metav1.ListOptions) (watch.Interface, error) { +func (c *horizontalPodAutoscalers) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -105,87 +106,90 @@ func (c *horizontalPodAutoscalers) Watch(opts metav1.ListOptions) (watch.Interfa Resource("horizontalpodautoscalers"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a horizontalPodAutoscaler and creates it. Returns the server's representation of the horizontalPodAutoscaler, and an error, if there is any. -func (c *horizontalPodAutoscalers) Create(horizontalPodAutoscaler *v1.HorizontalPodAutoscaler) (result *v1.HorizontalPodAutoscaler, err error) { +func (c *horizontalPodAutoscalers) Create(ctx context.Context, horizontalPodAutoscaler *v1.HorizontalPodAutoscaler, opts metav1.CreateOptions) (result *v1.HorizontalPodAutoscaler, err error) { result = &v1.HorizontalPodAutoscaler{} err = c.client.Post(). Namespace(c.ns). Resource("horizontalpodautoscalers"). + VersionedParams(&opts, scheme.ParameterCodec). Body(horizontalPodAutoscaler). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a horizontalPodAutoscaler and updates it. Returns the server's representation of the horizontalPodAutoscaler, and an error, if there is any. -func (c *horizontalPodAutoscalers) Update(horizontalPodAutoscaler *v1.HorizontalPodAutoscaler) (result *v1.HorizontalPodAutoscaler, err error) { +func (c *horizontalPodAutoscalers) Update(ctx context.Context, horizontalPodAutoscaler *v1.HorizontalPodAutoscaler, opts metav1.UpdateOptions) (result *v1.HorizontalPodAutoscaler, err error) { result = &v1.HorizontalPodAutoscaler{} err = c.client.Put(). Namespace(c.ns). Resource("horizontalpodautoscalers"). Name(horizontalPodAutoscaler.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(horizontalPodAutoscaler). - Do(). + Do(ctx). Into(result) return } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *horizontalPodAutoscalers) UpdateStatus(horizontalPodAutoscaler *v1.HorizontalPodAutoscaler) (result *v1.HorizontalPodAutoscaler, err error) { +func (c *horizontalPodAutoscalers) UpdateStatus(ctx context.Context, horizontalPodAutoscaler *v1.HorizontalPodAutoscaler, opts metav1.UpdateOptions) (result *v1.HorizontalPodAutoscaler, err error) { result = &v1.HorizontalPodAutoscaler{} err = c.client.Put(). Namespace(c.ns). Resource("horizontalpodautoscalers"). Name(horizontalPodAutoscaler.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(horizontalPodAutoscaler). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the horizontalPodAutoscaler and deletes it. Returns an error if one occurs. -func (c *horizontalPodAutoscalers) Delete(name string, options *metav1.DeleteOptions) error { +func (c *horizontalPodAutoscalers) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("horizontalpodautoscalers"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *horizontalPodAutoscalers) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error { +func (c *horizontalPodAutoscalers) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Namespace(c.ns). Resource("horizontalpodautoscalers"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched horizontalPodAutoscaler. -func (c *horizontalPodAutoscalers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.HorizontalPodAutoscaler, err error) { +func (c *horizontalPodAutoscalers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.HorizontalPodAutoscaler, err error) { result = &v1.HorizontalPodAutoscaler{} err = c.client.Patch(pt). Namespace(c.ns). Resource("horizontalpodautoscalers"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/fake/fake_horizontalpodautoscaler.go b/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/fake/fake_horizontalpodautoscaler.go index 514a787cb1..292d01814b 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/fake/fake_horizontalpodautoscaler.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/fake/fake_horizontalpodautoscaler.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + v2beta1 "k8s.io/api/autoscaling/v2beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" @@ -39,7 +41,7 @@ var horizontalpodautoscalersResource = schema.GroupVersionResource{Group: "autos var horizontalpodautoscalersKind = schema.GroupVersionKind{Group: "autoscaling", Version: "v2beta1", Kind: "HorizontalPodAutoscaler"} // Get takes name of the horizontalPodAutoscaler, and returns the corresponding horizontalPodAutoscaler object, and an error if there is any. -func (c *FakeHorizontalPodAutoscalers) Get(name string, options v1.GetOptions) (result *v2beta1.HorizontalPodAutoscaler, err error) { +func (c *FakeHorizontalPodAutoscalers) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2beta1.HorizontalPodAutoscaler, err error) { obj, err := c.Fake. Invokes(testing.NewGetAction(horizontalpodautoscalersResource, c.ns, name), &v2beta1.HorizontalPodAutoscaler{}) @@ -50,7 +52,7 @@ func (c *FakeHorizontalPodAutoscalers) Get(name string, options v1.GetOptions) ( } // List takes label and field selectors, and returns the list of HorizontalPodAutoscalers that match those selectors. -func (c *FakeHorizontalPodAutoscalers) List(opts v1.ListOptions) (result *v2beta1.HorizontalPodAutoscalerList, err error) { +func (c *FakeHorizontalPodAutoscalers) List(ctx context.Context, opts v1.ListOptions) (result *v2beta1.HorizontalPodAutoscalerList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(horizontalpodautoscalersResource, horizontalpodautoscalersKind, c.ns, opts), &v2beta1.HorizontalPodAutoscalerList{}) @@ -72,14 +74,14 @@ func (c *FakeHorizontalPodAutoscalers) List(opts v1.ListOptions) (result *v2beta } // Watch returns a watch.Interface that watches the requested horizontalPodAutoscalers. -func (c *FakeHorizontalPodAutoscalers) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeHorizontalPodAutoscalers) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(horizontalpodautoscalersResource, c.ns, opts)) } // Create takes the representation of a horizontalPodAutoscaler and creates it. Returns the server's representation of the horizontalPodAutoscaler, and an error, if there is any. -func (c *FakeHorizontalPodAutoscalers) Create(horizontalPodAutoscaler *v2beta1.HorizontalPodAutoscaler) (result *v2beta1.HorizontalPodAutoscaler, err error) { +func (c *FakeHorizontalPodAutoscalers) Create(ctx context.Context, horizontalPodAutoscaler *v2beta1.HorizontalPodAutoscaler, opts v1.CreateOptions) (result *v2beta1.HorizontalPodAutoscaler, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(horizontalpodautoscalersResource, c.ns, horizontalPodAutoscaler), &v2beta1.HorizontalPodAutoscaler{}) @@ -90,7 +92,7 @@ func (c *FakeHorizontalPodAutoscalers) Create(horizontalPodAutoscaler *v2beta1.H } // Update takes the representation of a horizontalPodAutoscaler and updates it. Returns the server's representation of the horizontalPodAutoscaler, and an error, if there is any. -func (c *FakeHorizontalPodAutoscalers) Update(horizontalPodAutoscaler *v2beta1.HorizontalPodAutoscaler) (result *v2beta1.HorizontalPodAutoscaler, err error) { +func (c *FakeHorizontalPodAutoscalers) Update(ctx context.Context, horizontalPodAutoscaler *v2beta1.HorizontalPodAutoscaler, opts v1.UpdateOptions) (result *v2beta1.HorizontalPodAutoscaler, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(horizontalpodautoscalersResource, c.ns, horizontalPodAutoscaler), &v2beta1.HorizontalPodAutoscaler{}) @@ -102,7 +104,7 @@ func (c *FakeHorizontalPodAutoscalers) Update(horizontalPodAutoscaler *v2beta1.H // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeHorizontalPodAutoscalers) UpdateStatus(horizontalPodAutoscaler *v2beta1.HorizontalPodAutoscaler) (*v2beta1.HorizontalPodAutoscaler, error) { +func (c *FakeHorizontalPodAutoscalers) UpdateStatus(ctx context.Context, horizontalPodAutoscaler *v2beta1.HorizontalPodAutoscaler, opts v1.UpdateOptions) (*v2beta1.HorizontalPodAutoscaler, error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(horizontalpodautoscalersResource, "status", c.ns, horizontalPodAutoscaler), &v2beta1.HorizontalPodAutoscaler{}) @@ -113,7 +115,7 @@ func (c *FakeHorizontalPodAutoscalers) UpdateStatus(horizontalPodAutoscaler *v2b } // Delete takes name of the horizontalPodAutoscaler and deletes it. Returns an error if one occurs. -func (c *FakeHorizontalPodAutoscalers) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeHorizontalPodAutoscalers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewDeleteAction(horizontalpodautoscalersResource, c.ns, name), &v2beta1.HorizontalPodAutoscaler{}) @@ -121,15 +123,15 @@ func (c *FakeHorizontalPodAutoscalers) Delete(name string, options *v1.DeleteOpt } // DeleteCollection deletes a collection of objects. -func (c *FakeHorizontalPodAutoscalers) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(horizontalpodautoscalersResource, c.ns, listOptions) +func (c *FakeHorizontalPodAutoscalers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(horizontalpodautoscalersResource, c.ns, listOpts) _, err := c.Fake.Invokes(action, &v2beta1.HorizontalPodAutoscalerList{}) return err } // Patch applies the patch and returns the patched horizontalPodAutoscaler. -func (c *FakeHorizontalPodAutoscalers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v2beta1.HorizontalPodAutoscaler, err error) { +func (c *FakeHorizontalPodAutoscalers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2beta1.HorizontalPodAutoscaler, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(horizontalpodautoscalersResource, c.ns, name, pt, data, subresources...), &v2beta1.HorizontalPodAutoscaler{}) diff --git a/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/horizontalpodautoscaler.go b/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/horizontalpodautoscaler.go index 02d5cfb9b6..f1637c1b85 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/horizontalpodautoscaler.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/horizontalpodautoscaler.go @@ -19,6 +19,7 @@ limitations under the License. package v2beta1 import ( + "context" "time" v2beta1 "k8s.io/api/autoscaling/v2beta1" @@ -37,15 +38,15 @@ type HorizontalPodAutoscalersGetter interface { // HorizontalPodAutoscalerInterface has methods to work with HorizontalPodAutoscaler resources. type HorizontalPodAutoscalerInterface interface { - Create(*v2beta1.HorizontalPodAutoscaler) (*v2beta1.HorizontalPodAutoscaler, error) - Update(*v2beta1.HorizontalPodAutoscaler) (*v2beta1.HorizontalPodAutoscaler, error) - UpdateStatus(*v2beta1.HorizontalPodAutoscaler) (*v2beta1.HorizontalPodAutoscaler, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*v2beta1.HorizontalPodAutoscaler, error) - List(opts v1.ListOptions) (*v2beta1.HorizontalPodAutoscalerList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v2beta1.HorizontalPodAutoscaler, err error) + Create(ctx context.Context, horizontalPodAutoscaler *v2beta1.HorizontalPodAutoscaler, opts v1.CreateOptions) (*v2beta1.HorizontalPodAutoscaler, error) + Update(ctx context.Context, horizontalPodAutoscaler *v2beta1.HorizontalPodAutoscaler, opts v1.UpdateOptions) (*v2beta1.HorizontalPodAutoscaler, error) + UpdateStatus(ctx context.Context, horizontalPodAutoscaler *v2beta1.HorizontalPodAutoscaler, opts v1.UpdateOptions) (*v2beta1.HorizontalPodAutoscaler, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v2beta1.HorizontalPodAutoscaler, error) + List(ctx context.Context, opts v1.ListOptions) (*v2beta1.HorizontalPodAutoscalerList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2beta1.HorizontalPodAutoscaler, err error) HorizontalPodAutoscalerExpansion } @@ -64,20 +65,20 @@ func newHorizontalPodAutoscalers(c *AutoscalingV2beta1Client, namespace string) } // Get takes name of the horizontalPodAutoscaler, and returns the corresponding horizontalPodAutoscaler object, and an error if there is any. -func (c *horizontalPodAutoscalers) Get(name string, options v1.GetOptions) (result *v2beta1.HorizontalPodAutoscaler, err error) { +func (c *horizontalPodAutoscalers) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2beta1.HorizontalPodAutoscaler, err error) { result = &v2beta1.HorizontalPodAutoscaler{} err = c.client.Get(). Namespace(c.ns). Resource("horizontalpodautoscalers"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of HorizontalPodAutoscalers that match those selectors. -func (c *horizontalPodAutoscalers) List(opts v1.ListOptions) (result *v2beta1.HorizontalPodAutoscalerList, err error) { +func (c *horizontalPodAutoscalers) List(ctx context.Context, opts v1.ListOptions) (result *v2beta1.HorizontalPodAutoscalerList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -88,13 +89,13 @@ func (c *horizontalPodAutoscalers) List(opts v1.ListOptions) (result *v2beta1.Ho Resource("horizontalpodautoscalers"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested horizontalPodAutoscalers. -func (c *horizontalPodAutoscalers) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *horizontalPodAutoscalers) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -105,87 +106,90 @@ func (c *horizontalPodAutoscalers) Watch(opts v1.ListOptions) (watch.Interface, Resource("horizontalpodautoscalers"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a horizontalPodAutoscaler and creates it. Returns the server's representation of the horizontalPodAutoscaler, and an error, if there is any. -func (c *horizontalPodAutoscalers) Create(horizontalPodAutoscaler *v2beta1.HorizontalPodAutoscaler) (result *v2beta1.HorizontalPodAutoscaler, err error) { +func (c *horizontalPodAutoscalers) Create(ctx context.Context, horizontalPodAutoscaler *v2beta1.HorizontalPodAutoscaler, opts v1.CreateOptions) (result *v2beta1.HorizontalPodAutoscaler, err error) { result = &v2beta1.HorizontalPodAutoscaler{} err = c.client.Post(). Namespace(c.ns). Resource("horizontalpodautoscalers"). + VersionedParams(&opts, scheme.ParameterCodec). Body(horizontalPodAutoscaler). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a horizontalPodAutoscaler and updates it. Returns the server's representation of the horizontalPodAutoscaler, and an error, if there is any. -func (c *horizontalPodAutoscalers) Update(horizontalPodAutoscaler *v2beta1.HorizontalPodAutoscaler) (result *v2beta1.HorizontalPodAutoscaler, err error) { +func (c *horizontalPodAutoscalers) Update(ctx context.Context, horizontalPodAutoscaler *v2beta1.HorizontalPodAutoscaler, opts v1.UpdateOptions) (result *v2beta1.HorizontalPodAutoscaler, err error) { result = &v2beta1.HorizontalPodAutoscaler{} err = c.client.Put(). Namespace(c.ns). Resource("horizontalpodautoscalers"). Name(horizontalPodAutoscaler.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(horizontalPodAutoscaler). - Do(). + Do(ctx). Into(result) return } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *horizontalPodAutoscalers) UpdateStatus(horizontalPodAutoscaler *v2beta1.HorizontalPodAutoscaler) (result *v2beta1.HorizontalPodAutoscaler, err error) { +func (c *horizontalPodAutoscalers) UpdateStatus(ctx context.Context, horizontalPodAutoscaler *v2beta1.HorizontalPodAutoscaler, opts v1.UpdateOptions) (result *v2beta1.HorizontalPodAutoscaler, err error) { result = &v2beta1.HorizontalPodAutoscaler{} err = c.client.Put(). Namespace(c.ns). Resource("horizontalpodautoscalers"). Name(horizontalPodAutoscaler.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(horizontalPodAutoscaler). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the horizontalPodAutoscaler and deletes it. Returns an error if one occurs. -func (c *horizontalPodAutoscalers) Delete(name string, options *v1.DeleteOptions) error { +func (c *horizontalPodAutoscalers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("horizontalpodautoscalers"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *horizontalPodAutoscalers) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *horizontalPodAutoscalers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Namespace(c.ns). Resource("horizontalpodautoscalers"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched horizontalPodAutoscaler. -func (c *horizontalPodAutoscalers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v2beta1.HorizontalPodAutoscaler, err error) { +func (c *horizontalPodAutoscalers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2beta1.HorizontalPodAutoscaler, err error) { result = &v2beta1.HorizontalPodAutoscaler{} err = c.client.Patch(pt). Namespace(c.ns). Resource("horizontalpodautoscalers"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta2/fake/fake_horizontalpodautoscaler.go b/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta2/fake/fake_horizontalpodautoscaler.go index c0569f00ad..845568b331 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta2/fake/fake_horizontalpodautoscaler.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta2/fake/fake_horizontalpodautoscaler.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + v2beta2 "k8s.io/api/autoscaling/v2beta2" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" @@ -39,7 +41,7 @@ var horizontalpodautoscalersResource = schema.GroupVersionResource{Group: "autos var horizontalpodautoscalersKind = schema.GroupVersionKind{Group: "autoscaling", Version: "v2beta2", Kind: "HorizontalPodAutoscaler"} // Get takes name of the horizontalPodAutoscaler, and returns the corresponding horizontalPodAutoscaler object, and an error if there is any. -func (c *FakeHorizontalPodAutoscalers) Get(name string, options v1.GetOptions) (result *v2beta2.HorizontalPodAutoscaler, err error) { +func (c *FakeHorizontalPodAutoscalers) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2beta2.HorizontalPodAutoscaler, err error) { obj, err := c.Fake. Invokes(testing.NewGetAction(horizontalpodautoscalersResource, c.ns, name), &v2beta2.HorizontalPodAutoscaler{}) @@ -50,7 +52,7 @@ func (c *FakeHorizontalPodAutoscalers) Get(name string, options v1.GetOptions) ( } // List takes label and field selectors, and returns the list of HorizontalPodAutoscalers that match those selectors. -func (c *FakeHorizontalPodAutoscalers) List(opts v1.ListOptions) (result *v2beta2.HorizontalPodAutoscalerList, err error) { +func (c *FakeHorizontalPodAutoscalers) List(ctx context.Context, opts v1.ListOptions) (result *v2beta2.HorizontalPodAutoscalerList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(horizontalpodautoscalersResource, horizontalpodautoscalersKind, c.ns, opts), &v2beta2.HorizontalPodAutoscalerList{}) @@ -72,14 +74,14 @@ func (c *FakeHorizontalPodAutoscalers) List(opts v1.ListOptions) (result *v2beta } // Watch returns a watch.Interface that watches the requested horizontalPodAutoscalers. -func (c *FakeHorizontalPodAutoscalers) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeHorizontalPodAutoscalers) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(horizontalpodautoscalersResource, c.ns, opts)) } // Create takes the representation of a horizontalPodAutoscaler and creates it. Returns the server's representation of the horizontalPodAutoscaler, and an error, if there is any. -func (c *FakeHorizontalPodAutoscalers) Create(horizontalPodAutoscaler *v2beta2.HorizontalPodAutoscaler) (result *v2beta2.HorizontalPodAutoscaler, err error) { +func (c *FakeHorizontalPodAutoscalers) Create(ctx context.Context, horizontalPodAutoscaler *v2beta2.HorizontalPodAutoscaler, opts v1.CreateOptions) (result *v2beta2.HorizontalPodAutoscaler, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(horizontalpodautoscalersResource, c.ns, horizontalPodAutoscaler), &v2beta2.HorizontalPodAutoscaler{}) @@ -90,7 +92,7 @@ func (c *FakeHorizontalPodAutoscalers) Create(horizontalPodAutoscaler *v2beta2.H } // Update takes the representation of a horizontalPodAutoscaler and updates it. Returns the server's representation of the horizontalPodAutoscaler, and an error, if there is any. -func (c *FakeHorizontalPodAutoscalers) Update(horizontalPodAutoscaler *v2beta2.HorizontalPodAutoscaler) (result *v2beta2.HorizontalPodAutoscaler, err error) { +func (c *FakeHorizontalPodAutoscalers) Update(ctx context.Context, horizontalPodAutoscaler *v2beta2.HorizontalPodAutoscaler, opts v1.UpdateOptions) (result *v2beta2.HorizontalPodAutoscaler, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(horizontalpodautoscalersResource, c.ns, horizontalPodAutoscaler), &v2beta2.HorizontalPodAutoscaler{}) @@ -102,7 +104,7 @@ func (c *FakeHorizontalPodAutoscalers) Update(horizontalPodAutoscaler *v2beta2.H // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeHorizontalPodAutoscalers) UpdateStatus(horizontalPodAutoscaler *v2beta2.HorizontalPodAutoscaler) (*v2beta2.HorizontalPodAutoscaler, error) { +func (c *FakeHorizontalPodAutoscalers) UpdateStatus(ctx context.Context, horizontalPodAutoscaler *v2beta2.HorizontalPodAutoscaler, opts v1.UpdateOptions) (*v2beta2.HorizontalPodAutoscaler, error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(horizontalpodautoscalersResource, "status", c.ns, horizontalPodAutoscaler), &v2beta2.HorizontalPodAutoscaler{}) @@ -113,7 +115,7 @@ func (c *FakeHorizontalPodAutoscalers) UpdateStatus(horizontalPodAutoscaler *v2b } // Delete takes name of the horizontalPodAutoscaler and deletes it. Returns an error if one occurs. -func (c *FakeHorizontalPodAutoscalers) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeHorizontalPodAutoscalers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewDeleteAction(horizontalpodautoscalersResource, c.ns, name), &v2beta2.HorizontalPodAutoscaler{}) @@ -121,15 +123,15 @@ func (c *FakeHorizontalPodAutoscalers) Delete(name string, options *v1.DeleteOpt } // DeleteCollection deletes a collection of objects. -func (c *FakeHorizontalPodAutoscalers) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(horizontalpodautoscalersResource, c.ns, listOptions) +func (c *FakeHorizontalPodAutoscalers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(horizontalpodautoscalersResource, c.ns, listOpts) _, err := c.Fake.Invokes(action, &v2beta2.HorizontalPodAutoscalerList{}) return err } // Patch applies the patch and returns the patched horizontalPodAutoscaler. -func (c *FakeHorizontalPodAutoscalers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v2beta2.HorizontalPodAutoscaler, err error) { +func (c *FakeHorizontalPodAutoscalers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2beta2.HorizontalPodAutoscaler, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(horizontalpodautoscalersResource, c.ns, name, pt, data, subresources...), &v2beta2.HorizontalPodAutoscaler{}) diff --git a/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta2/horizontalpodautoscaler.go b/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta2/horizontalpodautoscaler.go index 91a0fa64f9..c7fad10808 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta2/horizontalpodautoscaler.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta2/horizontalpodautoscaler.go @@ -19,6 +19,7 @@ limitations under the License. package v2beta2 import ( + "context" "time" v2beta2 "k8s.io/api/autoscaling/v2beta2" @@ -37,15 +38,15 @@ type HorizontalPodAutoscalersGetter interface { // HorizontalPodAutoscalerInterface has methods to work with HorizontalPodAutoscaler resources. type HorizontalPodAutoscalerInterface interface { - Create(*v2beta2.HorizontalPodAutoscaler) (*v2beta2.HorizontalPodAutoscaler, error) - Update(*v2beta2.HorizontalPodAutoscaler) (*v2beta2.HorizontalPodAutoscaler, error) - UpdateStatus(*v2beta2.HorizontalPodAutoscaler) (*v2beta2.HorizontalPodAutoscaler, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*v2beta2.HorizontalPodAutoscaler, error) - List(opts v1.ListOptions) (*v2beta2.HorizontalPodAutoscalerList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v2beta2.HorizontalPodAutoscaler, err error) + Create(ctx context.Context, horizontalPodAutoscaler *v2beta2.HorizontalPodAutoscaler, opts v1.CreateOptions) (*v2beta2.HorizontalPodAutoscaler, error) + Update(ctx context.Context, horizontalPodAutoscaler *v2beta2.HorizontalPodAutoscaler, opts v1.UpdateOptions) (*v2beta2.HorizontalPodAutoscaler, error) + UpdateStatus(ctx context.Context, horizontalPodAutoscaler *v2beta2.HorizontalPodAutoscaler, opts v1.UpdateOptions) (*v2beta2.HorizontalPodAutoscaler, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v2beta2.HorizontalPodAutoscaler, error) + List(ctx context.Context, opts v1.ListOptions) (*v2beta2.HorizontalPodAutoscalerList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2beta2.HorizontalPodAutoscaler, err error) HorizontalPodAutoscalerExpansion } @@ -64,20 +65,20 @@ func newHorizontalPodAutoscalers(c *AutoscalingV2beta2Client, namespace string) } // Get takes name of the horizontalPodAutoscaler, and returns the corresponding horizontalPodAutoscaler object, and an error if there is any. -func (c *horizontalPodAutoscalers) Get(name string, options v1.GetOptions) (result *v2beta2.HorizontalPodAutoscaler, err error) { +func (c *horizontalPodAutoscalers) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2beta2.HorizontalPodAutoscaler, err error) { result = &v2beta2.HorizontalPodAutoscaler{} err = c.client.Get(). Namespace(c.ns). Resource("horizontalpodautoscalers"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of HorizontalPodAutoscalers that match those selectors. -func (c *horizontalPodAutoscalers) List(opts v1.ListOptions) (result *v2beta2.HorizontalPodAutoscalerList, err error) { +func (c *horizontalPodAutoscalers) List(ctx context.Context, opts v1.ListOptions) (result *v2beta2.HorizontalPodAutoscalerList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -88,13 +89,13 @@ func (c *horizontalPodAutoscalers) List(opts v1.ListOptions) (result *v2beta2.Ho Resource("horizontalpodautoscalers"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested horizontalPodAutoscalers. -func (c *horizontalPodAutoscalers) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *horizontalPodAutoscalers) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -105,87 +106,90 @@ func (c *horizontalPodAutoscalers) Watch(opts v1.ListOptions) (watch.Interface, Resource("horizontalpodautoscalers"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a horizontalPodAutoscaler and creates it. Returns the server's representation of the horizontalPodAutoscaler, and an error, if there is any. -func (c *horizontalPodAutoscalers) Create(horizontalPodAutoscaler *v2beta2.HorizontalPodAutoscaler) (result *v2beta2.HorizontalPodAutoscaler, err error) { +func (c *horizontalPodAutoscalers) Create(ctx context.Context, horizontalPodAutoscaler *v2beta2.HorizontalPodAutoscaler, opts v1.CreateOptions) (result *v2beta2.HorizontalPodAutoscaler, err error) { result = &v2beta2.HorizontalPodAutoscaler{} err = c.client.Post(). Namespace(c.ns). Resource("horizontalpodautoscalers"). + VersionedParams(&opts, scheme.ParameterCodec). Body(horizontalPodAutoscaler). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a horizontalPodAutoscaler and updates it. Returns the server's representation of the horizontalPodAutoscaler, and an error, if there is any. -func (c *horizontalPodAutoscalers) Update(horizontalPodAutoscaler *v2beta2.HorizontalPodAutoscaler) (result *v2beta2.HorizontalPodAutoscaler, err error) { +func (c *horizontalPodAutoscalers) Update(ctx context.Context, horizontalPodAutoscaler *v2beta2.HorizontalPodAutoscaler, opts v1.UpdateOptions) (result *v2beta2.HorizontalPodAutoscaler, err error) { result = &v2beta2.HorizontalPodAutoscaler{} err = c.client.Put(). Namespace(c.ns). Resource("horizontalpodautoscalers"). Name(horizontalPodAutoscaler.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(horizontalPodAutoscaler). - Do(). + Do(ctx). Into(result) return } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *horizontalPodAutoscalers) UpdateStatus(horizontalPodAutoscaler *v2beta2.HorizontalPodAutoscaler) (result *v2beta2.HorizontalPodAutoscaler, err error) { +func (c *horizontalPodAutoscalers) UpdateStatus(ctx context.Context, horizontalPodAutoscaler *v2beta2.HorizontalPodAutoscaler, opts v1.UpdateOptions) (result *v2beta2.HorizontalPodAutoscaler, err error) { result = &v2beta2.HorizontalPodAutoscaler{} err = c.client.Put(). Namespace(c.ns). Resource("horizontalpodautoscalers"). Name(horizontalPodAutoscaler.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(horizontalPodAutoscaler). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the horizontalPodAutoscaler and deletes it. Returns an error if one occurs. -func (c *horizontalPodAutoscalers) Delete(name string, options *v1.DeleteOptions) error { +func (c *horizontalPodAutoscalers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("horizontalpodautoscalers"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *horizontalPodAutoscalers) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *horizontalPodAutoscalers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Namespace(c.ns). Resource("horizontalpodautoscalers"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched horizontalPodAutoscaler. -func (c *horizontalPodAutoscalers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v2beta2.HorizontalPodAutoscaler, err error) { +func (c *horizontalPodAutoscalers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2beta2.HorizontalPodAutoscaler, err error) { result = &v2beta2.HorizontalPodAutoscaler{} err = c.client.Patch(pt). Namespace(c.ns). Resource("horizontalpodautoscalers"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/k8s.io/client-go/kubernetes/typed/batch/v1/fake/fake_job.go b/vendor/k8s.io/client-go/kubernetes/typed/batch/v1/fake/fake_job.go index 06dc25c6b4..45c0ad1ee7 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/batch/v1/fake/fake_job.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/batch/v1/fake/fake_job.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + batchv1 "k8s.io/api/batch/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" @@ -39,7 +41,7 @@ var jobsResource = schema.GroupVersionResource{Group: "batch", Version: "v1", Re var jobsKind = schema.GroupVersionKind{Group: "batch", Version: "v1", Kind: "Job"} // Get takes name of the job, and returns the corresponding job object, and an error if there is any. -func (c *FakeJobs) Get(name string, options v1.GetOptions) (result *batchv1.Job, err error) { +func (c *FakeJobs) Get(ctx context.Context, name string, options v1.GetOptions) (result *batchv1.Job, err error) { obj, err := c.Fake. Invokes(testing.NewGetAction(jobsResource, c.ns, name), &batchv1.Job{}) @@ -50,7 +52,7 @@ func (c *FakeJobs) Get(name string, options v1.GetOptions) (result *batchv1.Job, } // List takes label and field selectors, and returns the list of Jobs that match those selectors. -func (c *FakeJobs) List(opts v1.ListOptions) (result *batchv1.JobList, err error) { +func (c *FakeJobs) List(ctx context.Context, opts v1.ListOptions) (result *batchv1.JobList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(jobsResource, jobsKind, c.ns, opts), &batchv1.JobList{}) @@ -72,14 +74,14 @@ func (c *FakeJobs) List(opts v1.ListOptions) (result *batchv1.JobList, err error } // Watch returns a watch.Interface that watches the requested jobs. -func (c *FakeJobs) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeJobs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(jobsResource, c.ns, opts)) } // Create takes the representation of a job and creates it. Returns the server's representation of the job, and an error, if there is any. -func (c *FakeJobs) Create(job *batchv1.Job) (result *batchv1.Job, err error) { +func (c *FakeJobs) Create(ctx context.Context, job *batchv1.Job, opts v1.CreateOptions) (result *batchv1.Job, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(jobsResource, c.ns, job), &batchv1.Job{}) @@ -90,7 +92,7 @@ func (c *FakeJobs) Create(job *batchv1.Job) (result *batchv1.Job, err error) { } // Update takes the representation of a job and updates it. Returns the server's representation of the job, and an error, if there is any. -func (c *FakeJobs) Update(job *batchv1.Job) (result *batchv1.Job, err error) { +func (c *FakeJobs) Update(ctx context.Context, job *batchv1.Job, opts v1.UpdateOptions) (result *batchv1.Job, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(jobsResource, c.ns, job), &batchv1.Job{}) @@ -102,7 +104,7 @@ func (c *FakeJobs) Update(job *batchv1.Job) (result *batchv1.Job, err error) { // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeJobs) UpdateStatus(job *batchv1.Job) (*batchv1.Job, error) { +func (c *FakeJobs) UpdateStatus(ctx context.Context, job *batchv1.Job, opts v1.UpdateOptions) (*batchv1.Job, error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(jobsResource, "status", c.ns, job), &batchv1.Job{}) @@ -113,7 +115,7 @@ func (c *FakeJobs) UpdateStatus(job *batchv1.Job) (*batchv1.Job, error) { } // Delete takes name of the job and deletes it. Returns an error if one occurs. -func (c *FakeJobs) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeJobs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewDeleteAction(jobsResource, c.ns, name), &batchv1.Job{}) @@ -121,15 +123,15 @@ func (c *FakeJobs) Delete(name string, options *v1.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *FakeJobs) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(jobsResource, c.ns, listOptions) +func (c *FakeJobs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(jobsResource, c.ns, listOpts) _, err := c.Fake.Invokes(action, &batchv1.JobList{}) return err } // Patch applies the patch and returns the patched job. -func (c *FakeJobs) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *batchv1.Job, err error) { +func (c *FakeJobs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *batchv1.Job, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(jobsResource, c.ns, name, pt, data, subresources...), &batchv1.Job{}) diff --git a/vendor/k8s.io/client-go/kubernetes/typed/batch/v1/job.go b/vendor/k8s.io/client-go/kubernetes/typed/batch/v1/job.go index b55c602b34..a20c8e0e4e 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/batch/v1/job.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/batch/v1/job.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" "time" v1 "k8s.io/api/batch/v1" @@ -37,15 +38,15 @@ type JobsGetter interface { // JobInterface has methods to work with Job resources. type JobInterface interface { - Create(*v1.Job) (*v1.Job, error) - Update(*v1.Job) (*v1.Job, error) - UpdateStatus(*v1.Job) (*v1.Job, error) - Delete(name string, options *metav1.DeleteOptions) error - DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error - Get(name string, options metav1.GetOptions) (*v1.Job, error) - List(opts metav1.ListOptions) (*v1.JobList, error) - Watch(opts metav1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Job, err error) + Create(ctx context.Context, job *v1.Job, opts metav1.CreateOptions) (*v1.Job, error) + Update(ctx context.Context, job *v1.Job, opts metav1.UpdateOptions) (*v1.Job, error) + UpdateStatus(ctx context.Context, job *v1.Job, opts metav1.UpdateOptions) (*v1.Job, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Job, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.JobList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Job, err error) JobExpansion } @@ -64,20 +65,20 @@ func newJobs(c *BatchV1Client, namespace string) *jobs { } // Get takes name of the job, and returns the corresponding job object, and an error if there is any. -func (c *jobs) Get(name string, options metav1.GetOptions) (result *v1.Job, err error) { +func (c *jobs) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Job, err error) { result = &v1.Job{} err = c.client.Get(). Namespace(c.ns). Resource("jobs"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of Jobs that match those selectors. -func (c *jobs) List(opts metav1.ListOptions) (result *v1.JobList, err error) { +func (c *jobs) List(ctx context.Context, opts metav1.ListOptions) (result *v1.JobList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -88,13 +89,13 @@ func (c *jobs) List(opts metav1.ListOptions) (result *v1.JobList, err error) { Resource("jobs"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested jobs. -func (c *jobs) Watch(opts metav1.ListOptions) (watch.Interface, error) { +func (c *jobs) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -105,87 +106,90 @@ func (c *jobs) Watch(opts metav1.ListOptions) (watch.Interface, error) { Resource("jobs"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a job and creates it. Returns the server's representation of the job, and an error, if there is any. -func (c *jobs) Create(job *v1.Job) (result *v1.Job, err error) { +func (c *jobs) Create(ctx context.Context, job *v1.Job, opts metav1.CreateOptions) (result *v1.Job, err error) { result = &v1.Job{} err = c.client.Post(). Namespace(c.ns). Resource("jobs"). + VersionedParams(&opts, scheme.ParameterCodec). Body(job). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a job and updates it. Returns the server's representation of the job, and an error, if there is any. -func (c *jobs) Update(job *v1.Job) (result *v1.Job, err error) { +func (c *jobs) Update(ctx context.Context, job *v1.Job, opts metav1.UpdateOptions) (result *v1.Job, err error) { result = &v1.Job{} err = c.client.Put(). Namespace(c.ns). Resource("jobs"). Name(job.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(job). - Do(). + Do(ctx). Into(result) return } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *jobs) UpdateStatus(job *v1.Job) (result *v1.Job, err error) { +func (c *jobs) UpdateStatus(ctx context.Context, job *v1.Job, opts metav1.UpdateOptions) (result *v1.Job, err error) { result = &v1.Job{} err = c.client.Put(). Namespace(c.ns). Resource("jobs"). Name(job.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(job). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the job and deletes it. Returns an error if one occurs. -func (c *jobs) Delete(name string, options *metav1.DeleteOptions) error { +func (c *jobs) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("jobs"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *jobs) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error { +func (c *jobs) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Namespace(c.ns). Resource("jobs"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched job. -func (c *jobs) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Job, err error) { +func (c *jobs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Job, err error) { result = &v1.Job{} err = c.client.Patch(pt). Namespace(c.ns). Resource("jobs"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/k8s.io/client-go/kubernetes/typed/batch/v1beta1/cronjob.go b/vendor/k8s.io/client-go/kubernetes/typed/batch/v1beta1/cronjob.go index d89d2fa21d..076520296b 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/batch/v1beta1/cronjob.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/batch/v1beta1/cronjob.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" "time" v1beta1 "k8s.io/api/batch/v1beta1" @@ -37,15 +38,15 @@ type CronJobsGetter interface { // CronJobInterface has methods to work with CronJob resources. type CronJobInterface interface { - Create(*v1beta1.CronJob) (*v1beta1.CronJob, error) - Update(*v1beta1.CronJob) (*v1beta1.CronJob, error) - UpdateStatus(*v1beta1.CronJob) (*v1beta1.CronJob, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*v1beta1.CronJob, error) - List(opts v1.ListOptions) (*v1beta1.CronJobList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.CronJob, err error) + Create(ctx context.Context, cronJob *v1beta1.CronJob, opts v1.CreateOptions) (*v1beta1.CronJob, error) + Update(ctx context.Context, cronJob *v1beta1.CronJob, opts v1.UpdateOptions) (*v1beta1.CronJob, error) + UpdateStatus(ctx context.Context, cronJob *v1beta1.CronJob, opts v1.UpdateOptions) (*v1beta1.CronJob, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.CronJob, error) + List(ctx context.Context, opts v1.ListOptions) (*v1beta1.CronJobList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.CronJob, err error) CronJobExpansion } @@ -64,20 +65,20 @@ func newCronJobs(c *BatchV1beta1Client, namespace string) *cronJobs { } // Get takes name of the cronJob, and returns the corresponding cronJob object, and an error if there is any. -func (c *cronJobs) Get(name string, options v1.GetOptions) (result *v1beta1.CronJob, err error) { +func (c *cronJobs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.CronJob, err error) { result = &v1beta1.CronJob{} err = c.client.Get(). Namespace(c.ns). Resource("cronjobs"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of CronJobs that match those selectors. -func (c *cronJobs) List(opts v1.ListOptions) (result *v1beta1.CronJobList, err error) { +func (c *cronJobs) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.CronJobList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -88,13 +89,13 @@ func (c *cronJobs) List(opts v1.ListOptions) (result *v1beta1.CronJobList, err e Resource("cronjobs"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested cronJobs. -func (c *cronJobs) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *cronJobs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -105,87 +106,90 @@ func (c *cronJobs) Watch(opts v1.ListOptions) (watch.Interface, error) { Resource("cronjobs"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a cronJob and creates it. Returns the server's representation of the cronJob, and an error, if there is any. -func (c *cronJobs) Create(cronJob *v1beta1.CronJob) (result *v1beta1.CronJob, err error) { +func (c *cronJobs) Create(ctx context.Context, cronJob *v1beta1.CronJob, opts v1.CreateOptions) (result *v1beta1.CronJob, err error) { result = &v1beta1.CronJob{} err = c.client.Post(). Namespace(c.ns). Resource("cronjobs"). + VersionedParams(&opts, scheme.ParameterCodec). Body(cronJob). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a cronJob and updates it. Returns the server's representation of the cronJob, and an error, if there is any. -func (c *cronJobs) Update(cronJob *v1beta1.CronJob) (result *v1beta1.CronJob, err error) { +func (c *cronJobs) Update(ctx context.Context, cronJob *v1beta1.CronJob, opts v1.UpdateOptions) (result *v1beta1.CronJob, err error) { result = &v1beta1.CronJob{} err = c.client.Put(). Namespace(c.ns). Resource("cronjobs"). Name(cronJob.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(cronJob). - Do(). + Do(ctx). Into(result) return } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *cronJobs) UpdateStatus(cronJob *v1beta1.CronJob) (result *v1beta1.CronJob, err error) { +func (c *cronJobs) UpdateStatus(ctx context.Context, cronJob *v1beta1.CronJob, opts v1.UpdateOptions) (result *v1beta1.CronJob, err error) { result = &v1beta1.CronJob{} err = c.client.Put(). Namespace(c.ns). Resource("cronjobs"). Name(cronJob.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(cronJob). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the cronJob and deletes it. Returns an error if one occurs. -func (c *cronJobs) Delete(name string, options *v1.DeleteOptions) error { +func (c *cronJobs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("cronjobs"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *cronJobs) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *cronJobs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Namespace(c.ns). Resource("cronjobs"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched cronJob. -func (c *cronJobs) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.CronJob, err error) { +func (c *cronJobs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.CronJob, err error) { result = &v1beta1.CronJob{} err = c.client.Patch(pt). Namespace(c.ns). Resource("cronjobs"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/k8s.io/client-go/kubernetes/typed/batch/v1beta1/fake/fake_cronjob.go b/vendor/k8s.io/client-go/kubernetes/typed/batch/v1beta1/fake/fake_cronjob.go index 3985c40374..303b7506a1 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/batch/v1beta1/fake/fake_cronjob.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/batch/v1beta1/fake/fake_cronjob.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + v1beta1 "k8s.io/api/batch/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" @@ -39,7 +41,7 @@ var cronjobsResource = schema.GroupVersionResource{Group: "batch", Version: "v1b var cronjobsKind = schema.GroupVersionKind{Group: "batch", Version: "v1beta1", Kind: "CronJob"} // Get takes name of the cronJob, and returns the corresponding cronJob object, and an error if there is any. -func (c *FakeCronJobs) Get(name string, options v1.GetOptions) (result *v1beta1.CronJob, err error) { +func (c *FakeCronJobs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.CronJob, err error) { obj, err := c.Fake. Invokes(testing.NewGetAction(cronjobsResource, c.ns, name), &v1beta1.CronJob{}) @@ -50,7 +52,7 @@ func (c *FakeCronJobs) Get(name string, options v1.GetOptions) (result *v1beta1. } // List takes label and field selectors, and returns the list of CronJobs that match those selectors. -func (c *FakeCronJobs) List(opts v1.ListOptions) (result *v1beta1.CronJobList, err error) { +func (c *FakeCronJobs) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.CronJobList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(cronjobsResource, cronjobsKind, c.ns, opts), &v1beta1.CronJobList{}) @@ -72,14 +74,14 @@ func (c *FakeCronJobs) List(opts v1.ListOptions) (result *v1beta1.CronJobList, e } // Watch returns a watch.Interface that watches the requested cronJobs. -func (c *FakeCronJobs) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeCronJobs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(cronjobsResource, c.ns, opts)) } // Create takes the representation of a cronJob and creates it. Returns the server's representation of the cronJob, and an error, if there is any. -func (c *FakeCronJobs) Create(cronJob *v1beta1.CronJob) (result *v1beta1.CronJob, err error) { +func (c *FakeCronJobs) Create(ctx context.Context, cronJob *v1beta1.CronJob, opts v1.CreateOptions) (result *v1beta1.CronJob, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(cronjobsResource, c.ns, cronJob), &v1beta1.CronJob{}) @@ -90,7 +92,7 @@ func (c *FakeCronJobs) Create(cronJob *v1beta1.CronJob) (result *v1beta1.CronJob } // Update takes the representation of a cronJob and updates it. Returns the server's representation of the cronJob, and an error, if there is any. -func (c *FakeCronJobs) Update(cronJob *v1beta1.CronJob) (result *v1beta1.CronJob, err error) { +func (c *FakeCronJobs) Update(ctx context.Context, cronJob *v1beta1.CronJob, opts v1.UpdateOptions) (result *v1beta1.CronJob, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(cronjobsResource, c.ns, cronJob), &v1beta1.CronJob{}) @@ -102,7 +104,7 @@ func (c *FakeCronJobs) Update(cronJob *v1beta1.CronJob) (result *v1beta1.CronJob // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeCronJobs) UpdateStatus(cronJob *v1beta1.CronJob) (*v1beta1.CronJob, error) { +func (c *FakeCronJobs) UpdateStatus(ctx context.Context, cronJob *v1beta1.CronJob, opts v1.UpdateOptions) (*v1beta1.CronJob, error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(cronjobsResource, "status", c.ns, cronJob), &v1beta1.CronJob{}) @@ -113,7 +115,7 @@ func (c *FakeCronJobs) UpdateStatus(cronJob *v1beta1.CronJob) (*v1beta1.CronJob, } // Delete takes name of the cronJob and deletes it. Returns an error if one occurs. -func (c *FakeCronJobs) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeCronJobs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewDeleteAction(cronjobsResource, c.ns, name), &v1beta1.CronJob{}) @@ -121,15 +123,15 @@ func (c *FakeCronJobs) Delete(name string, options *v1.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *FakeCronJobs) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(cronjobsResource, c.ns, listOptions) +func (c *FakeCronJobs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(cronjobsResource, c.ns, listOpts) _, err := c.Fake.Invokes(action, &v1beta1.CronJobList{}) return err } // Patch applies the patch and returns the patched cronJob. -func (c *FakeCronJobs) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.CronJob, err error) { +func (c *FakeCronJobs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.CronJob, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(cronjobsResource, c.ns, name, pt, data, subresources...), &v1beta1.CronJob{}) diff --git a/vendor/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/cronjob.go b/vendor/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/cronjob.go index 19123b6041..a25054f244 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/cronjob.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/cronjob.go @@ -19,6 +19,7 @@ limitations under the License. package v2alpha1 import ( + "context" "time" v2alpha1 "k8s.io/api/batch/v2alpha1" @@ -37,15 +38,15 @@ type CronJobsGetter interface { // CronJobInterface has methods to work with CronJob resources. type CronJobInterface interface { - Create(*v2alpha1.CronJob) (*v2alpha1.CronJob, error) - Update(*v2alpha1.CronJob) (*v2alpha1.CronJob, error) - UpdateStatus(*v2alpha1.CronJob) (*v2alpha1.CronJob, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*v2alpha1.CronJob, error) - List(opts v1.ListOptions) (*v2alpha1.CronJobList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v2alpha1.CronJob, err error) + Create(ctx context.Context, cronJob *v2alpha1.CronJob, opts v1.CreateOptions) (*v2alpha1.CronJob, error) + Update(ctx context.Context, cronJob *v2alpha1.CronJob, opts v1.UpdateOptions) (*v2alpha1.CronJob, error) + UpdateStatus(ctx context.Context, cronJob *v2alpha1.CronJob, opts v1.UpdateOptions) (*v2alpha1.CronJob, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v2alpha1.CronJob, error) + List(ctx context.Context, opts v1.ListOptions) (*v2alpha1.CronJobList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2alpha1.CronJob, err error) CronJobExpansion } @@ -64,20 +65,20 @@ func newCronJobs(c *BatchV2alpha1Client, namespace string) *cronJobs { } // Get takes name of the cronJob, and returns the corresponding cronJob object, and an error if there is any. -func (c *cronJobs) Get(name string, options v1.GetOptions) (result *v2alpha1.CronJob, err error) { +func (c *cronJobs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2alpha1.CronJob, err error) { result = &v2alpha1.CronJob{} err = c.client.Get(). Namespace(c.ns). Resource("cronjobs"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of CronJobs that match those selectors. -func (c *cronJobs) List(opts v1.ListOptions) (result *v2alpha1.CronJobList, err error) { +func (c *cronJobs) List(ctx context.Context, opts v1.ListOptions) (result *v2alpha1.CronJobList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -88,13 +89,13 @@ func (c *cronJobs) List(opts v1.ListOptions) (result *v2alpha1.CronJobList, err Resource("cronjobs"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested cronJobs. -func (c *cronJobs) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *cronJobs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -105,87 +106,90 @@ func (c *cronJobs) Watch(opts v1.ListOptions) (watch.Interface, error) { Resource("cronjobs"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a cronJob and creates it. Returns the server's representation of the cronJob, and an error, if there is any. -func (c *cronJobs) Create(cronJob *v2alpha1.CronJob) (result *v2alpha1.CronJob, err error) { +func (c *cronJobs) Create(ctx context.Context, cronJob *v2alpha1.CronJob, opts v1.CreateOptions) (result *v2alpha1.CronJob, err error) { result = &v2alpha1.CronJob{} err = c.client.Post(). Namespace(c.ns). Resource("cronjobs"). + VersionedParams(&opts, scheme.ParameterCodec). Body(cronJob). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a cronJob and updates it. Returns the server's representation of the cronJob, and an error, if there is any. -func (c *cronJobs) Update(cronJob *v2alpha1.CronJob) (result *v2alpha1.CronJob, err error) { +func (c *cronJobs) Update(ctx context.Context, cronJob *v2alpha1.CronJob, opts v1.UpdateOptions) (result *v2alpha1.CronJob, err error) { result = &v2alpha1.CronJob{} err = c.client.Put(). Namespace(c.ns). Resource("cronjobs"). Name(cronJob.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(cronJob). - Do(). + Do(ctx). Into(result) return } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *cronJobs) UpdateStatus(cronJob *v2alpha1.CronJob) (result *v2alpha1.CronJob, err error) { +func (c *cronJobs) UpdateStatus(ctx context.Context, cronJob *v2alpha1.CronJob, opts v1.UpdateOptions) (result *v2alpha1.CronJob, err error) { result = &v2alpha1.CronJob{} err = c.client.Put(). Namespace(c.ns). Resource("cronjobs"). Name(cronJob.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(cronJob). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the cronJob and deletes it. Returns an error if one occurs. -func (c *cronJobs) Delete(name string, options *v1.DeleteOptions) error { +func (c *cronJobs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("cronjobs"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *cronJobs) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *cronJobs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Namespace(c.ns). Resource("cronjobs"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched cronJob. -func (c *cronJobs) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v2alpha1.CronJob, err error) { +func (c *cronJobs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2alpha1.CronJob, err error) { result = &v2alpha1.CronJob{} err = c.client.Patch(pt). Namespace(c.ns). Resource("cronjobs"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/fake/fake_cronjob.go b/vendor/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/fake/fake_cronjob.go index 2195027d27..3cd1bc159f 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/fake/fake_cronjob.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/fake/fake_cronjob.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + v2alpha1 "k8s.io/api/batch/v2alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" @@ -39,7 +41,7 @@ var cronjobsResource = schema.GroupVersionResource{Group: "batch", Version: "v2a var cronjobsKind = schema.GroupVersionKind{Group: "batch", Version: "v2alpha1", Kind: "CronJob"} // Get takes name of the cronJob, and returns the corresponding cronJob object, and an error if there is any. -func (c *FakeCronJobs) Get(name string, options v1.GetOptions) (result *v2alpha1.CronJob, err error) { +func (c *FakeCronJobs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2alpha1.CronJob, err error) { obj, err := c.Fake. Invokes(testing.NewGetAction(cronjobsResource, c.ns, name), &v2alpha1.CronJob{}) @@ -50,7 +52,7 @@ func (c *FakeCronJobs) Get(name string, options v1.GetOptions) (result *v2alpha1 } // List takes label and field selectors, and returns the list of CronJobs that match those selectors. -func (c *FakeCronJobs) List(opts v1.ListOptions) (result *v2alpha1.CronJobList, err error) { +func (c *FakeCronJobs) List(ctx context.Context, opts v1.ListOptions) (result *v2alpha1.CronJobList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(cronjobsResource, cronjobsKind, c.ns, opts), &v2alpha1.CronJobList{}) @@ -72,14 +74,14 @@ func (c *FakeCronJobs) List(opts v1.ListOptions) (result *v2alpha1.CronJobList, } // Watch returns a watch.Interface that watches the requested cronJobs. -func (c *FakeCronJobs) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeCronJobs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(cronjobsResource, c.ns, opts)) } // Create takes the representation of a cronJob and creates it. Returns the server's representation of the cronJob, and an error, if there is any. -func (c *FakeCronJobs) Create(cronJob *v2alpha1.CronJob) (result *v2alpha1.CronJob, err error) { +func (c *FakeCronJobs) Create(ctx context.Context, cronJob *v2alpha1.CronJob, opts v1.CreateOptions) (result *v2alpha1.CronJob, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(cronjobsResource, c.ns, cronJob), &v2alpha1.CronJob{}) @@ -90,7 +92,7 @@ func (c *FakeCronJobs) Create(cronJob *v2alpha1.CronJob) (result *v2alpha1.CronJ } // Update takes the representation of a cronJob and updates it. Returns the server's representation of the cronJob, and an error, if there is any. -func (c *FakeCronJobs) Update(cronJob *v2alpha1.CronJob) (result *v2alpha1.CronJob, err error) { +func (c *FakeCronJobs) Update(ctx context.Context, cronJob *v2alpha1.CronJob, opts v1.UpdateOptions) (result *v2alpha1.CronJob, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(cronjobsResource, c.ns, cronJob), &v2alpha1.CronJob{}) @@ -102,7 +104,7 @@ func (c *FakeCronJobs) Update(cronJob *v2alpha1.CronJob) (result *v2alpha1.CronJ // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeCronJobs) UpdateStatus(cronJob *v2alpha1.CronJob) (*v2alpha1.CronJob, error) { +func (c *FakeCronJobs) UpdateStatus(ctx context.Context, cronJob *v2alpha1.CronJob, opts v1.UpdateOptions) (*v2alpha1.CronJob, error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(cronjobsResource, "status", c.ns, cronJob), &v2alpha1.CronJob{}) @@ -113,7 +115,7 @@ func (c *FakeCronJobs) UpdateStatus(cronJob *v2alpha1.CronJob) (*v2alpha1.CronJo } // Delete takes name of the cronJob and deletes it. Returns an error if one occurs. -func (c *FakeCronJobs) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeCronJobs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewDeleteAction(cronjobsResource, c.ns, name), &v2alpha1.CronJob{}) @@ -121,15 +123,15 @@ func (c *FakeCronJobs) Delete(name string, options *v1.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *FakeCronJobs) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(cronjobsResource, c.ns, listOptions) +func (c *FakeCronJobs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(cronjobsResource, c.ns, listOpts) _, err := c.Fake.Invokes(action, &v2alpha1.CronJobList{}) return err } // Patch applies the patch and returns the patched cronJob. -func (c *FakeCronJobs) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v2alpha1.CronJob, err error) { +func (c *FakeCronJobs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2alpha1.CronJob, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(cronjobsResource, c.ns, name, pt, data, subresources...), &v2alpha1.CronJob{}) diff --git a/vendor/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/certificatesigningrequest.go b/vendor/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/certificatesigningrequest.go index 712d3a01af..6b2623b8ae 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/certificatesigningrequest.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/certificatesigningrequest.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" "time" v1beta1 "k8s.io/api/certificates/v1beta1" @@ -37,15 +38,15 @@ type CertificateSigningRequestsGetter interface { // CertificateSigningRequestInterface has methods to work with CertificateSigningRequest resources. type CertificateSigningRequestInterface interface { - Create(*v1beta1.CertificateSigningRequest) (*v1beta1.CertificateSigningRequest, error) - Update(*v1beta1.CertificateSigningRequest) (*v1beta1.CertificateSigningRequest, error) - UpdateStatus(*v1beta1.CertificateSigningRequest) (*v1beta1.CertificateSigningRequest, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*v1beta1.CertificateSigningRequest, error) - List(opts v1.ListOptions) (*v1beta1.CertificateSigningRequestList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.CertificateSigningRequest, err error) + Create(ctx context.Context, certificateSigningRequest *v1beta1.CertificateSigningRequest, opts v1.CreateOptions) (*v1beta1.CertificateSigningRequest, error) + Update(ctx context.Context, certificateSigningRequest *v1beta1.CertificateSigningRequest, opts v1.UpdateOptions) (*v1beta1.CertificateSigningRequest, error) + UpdateStatus(ctx context.Context, certificateSigningRequest *v1beta1.CertificateSigningRequest, opts v1.UpdateOptions) (*v1beta1.CertificateSigningRequest, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.CertificateSigningRequest, error) + List(ctx context.Context, opts v1.ListOptions) (*v1beta1.CertificateSigningRequestList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.CertificateSigningRequest, err error) CertificateSigningRequestExpansion } @@ -62,19 +63,19 @@ func newCertificateSigningRequests(c *CertificatesV1beta1Client) *certificateSig } // Get takes name of the certificateSigningRequest, and returns the corresponding certificateSigningRequest object, and an error if there is any. -func (c *certificateSigningRequests) Get(name string, options v1.GetOptions) (result *v1beta1.CertificateSigningRequest, err error) { +func (c *certificateSigningRequests) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.CertificateSigningRequest, err error) { result = &v1beta1.CertificateSigningRequest{} err = c.client.Get(). Resource("certificatesigningrequests"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of CertificateSigningRequests that match those selectors. -func (c *certificateSigningRequests) List(opts v1.ListOptions) (result *v1beta1.CertificateSigningRequestList, err error) { +func (c *certificateSigningRequests) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.CertificateSigningRequestList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -84,13 +85,13 @@ func (c *certificateSigningRequests) List(opts v1.ListOptions) (result *v1beta1. Resource("certificatesigningrequests"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested certificateSigningRequests. -func (c *certificateSigningRequests) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *certificateSigningRequests) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -100,81 +101,84 @@ func (c *certificateSigningRequests) Watch(opts v1.ListOptions) (watch.Interface Resource("certificatesigningrequests"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a certificateSigningRequest and creates it. Returns the server's representation of the certificateSigningRequest, and an error, if there is any. -func (c *certificateSigningRequests) Create(certificateSigningRequest *v1beta1.CertificateSigningRequest) (result *v1beta1.CertificateSigningRequest, err error) { +func (c *certificateSigningRequests) Create(ctx context.Context, certificateSigningRequest *v1beta1.CertificateSigningRequest, opts v1.CreateOptions) (result *v1beta1.CertificateSigningRequest, err error) { result = &v1beta1.CertificateSigningRequest{} err = c.client.Post(). Resource("certificatesigningrequests"). + VersionedParams(&opts, scheme.ParameterCodec). Body(certificateSigningRequest). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a certificateSigningRequest and updates it. Returns the server's representation of the certificateSigningRequest, and an error, if there is any. -func (c *certificateSigningRequests) Update(certificateSigningRequest *v1beta1.CertificateSigningRequest) (result *v1beta1.CertificateSigningRequest, err error) { +func (c *certificateSigningRequests) Update(ctx context.Context, certificateSigningRequest *v1beta1.CertificateSigningRequest, opts v1.UpdateOptions) (result *v1beta1.CertificateSigningRequest, err error) { result = &v1beta1.CertificateSigningRequest{} err = c.client.Put(). Resource("certificatesigningrequests"). Name(certificateSigningRequest.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(certificateSigningRequest). - Do(). + Do(ctx). Into(result) return } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *certificateSigningRequests) UpdateStatus(certificateSigningRequest *v1beta1.CertificateSigningRequest) (result *v1beta1.CertificateSigningRequest, err error) { +func (c *certificateSigningRequests) UpdateStatus(ctx context.Context, certificateSigningRequest *v1beta1.CertificateSigningRequest, opts v1.UpdateOptions) (result *v1beta1.CertificateSigningRequest, err error) { result = &v1beta1.CertificateSigningRequest{} err = c.client.Put(). Resource("certificatesigningrequests"). Name(certificateSigningRequest.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(certificateSigningRequest). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the certificateSigningRequest and deletes it. Returns an error if one occurs. -func (c *certificateSigningRequests) Delete(name string, options *v1.DeleteOptions) error { +func (c *certificateSigningRequests) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). Resource("certificatesigningrequests"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *certificateSigningRequests) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *certificateSigningRequests) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Resource("certificatesigningrequests"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched certificateSigningRequest. -func (c *certificateSigningRequests) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.CertificateSigningRequest, err error) { +func (c *certificateSigningRequests) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.CertificateSigningRequest, err error) { result = &v1beta1.CertificateSigningRequest{} err = c.client.Patch(pt). Resource("certificatesigningrequests"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/certificatesigningrequest_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/certificatesigningrequest_expansion.go index c63b80638f..4737891411 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/certificatesigningrequest_expansion.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/certificatesigningrequest_expansion.go @@ -17,21 +17,26 @@ limitations under the License. package v1beta1 import ( + "context" + certificates "k8s.io/api/certificates/v1beta1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + scheme "k8s.io/client-go/kubernetes/scheme" ) type CertificateSigningRequestExpansion interface { - UpdateApproval(certificateSigningRequest *certificates.CertificateSigningRequest) (result *certificates.CertificateSigningRequest, err error) + UpdateApproval(ctx context.Context, certificateSigningRequest *certificates.CertificateSigningRequest, opts metav1.UpdateOptions) (result *certificates.CertificateSigningRequest, err error) } -func (c *certificateSigningRequests) UpdateApproval(certificateSigningRequest *certificates.CertificateSigningRequest) (result *certificates.CertificateSigningRequest, err error) { +func (c *certificateSigningRequests) UpdateApproval(ctx context.Context, certificateSigningRequest *certificates.CertificateSigningRequest, opts metav1.UpdateOptions) (result *certificates.CertificateSigningRequest, err error) { result = &certificates.CertificateSigningRequest{} err = c.client.Put(). Resource("certificatesigningrequests"). Name(certificateSigningRequest.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(certificateSigningRequest). SubResource("approval"). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/fake/fake_certificatesigningrequest.go b/vendor/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/fake/fake_certificatesigningrequest.go index aa45c88033..9c1bd38473 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/fake/fake_certificatesigningrequest.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/fake/fake_certificatesigningrequest.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + v1beta1 "k8s.io/api/certificates/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" @@ -38,7 +40,7 @@ var certificatesigningrequestsResource = schema.GroupVersionResource{Group: "cer var certificatesigningrequestsKind = schema.GroupVersionKind{Group: "certificates.k8s.io", Version: "v1beta1", Kind: "CertificateSigningRequest"} // Get takes name of the certificateSigningRequest, and returns the corresponding certificateSigningRequest object, and an error if there is any. -func (c *FakeCertificateSigningRequests) Get(name string, options v1.GetOptions) (result *v1beta1.CertificateSigningRequest, err error) { +func (c *FakeCertificateSigningRequests) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.CertificateSigningRequest, err error) { obj, err := c.Fake. Invokes(testing.NewRootGetAction(certificatesigningrequestsResource, name), &v1beta1.CertificateSigningRequest{}) if obj == nil { @@ -48,7 +50,7 @@ func (c *FakeCertificateSigningRequests) Get(name string, options v1.GetOptions) } // List takes label and field selectors, and returns the list of CertificateSigningRequests that match those selectors. -func (c *FakeCertificateSigningRequests) List(opts v1.ListOptions) (result *v1beta1.CertificateSigningRequestList, err error) { +func (c *FakeCertificateSigningRequests) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.CertificateSigningRequestList, err error) { obj, err := c.Fake. Invokes(testing.NewRootListAction(certificatesigningrequestsResource, certificatesigningrequestsKind, opts), &v1beta1.CertificateSigningRequestList{}) if obj == nil { @@ -69,13 +71,13 @@ func (c *FakeCertificateSigningRequests) List(opts v1.ListOptions) (result *v1be } // Watch returns a watch.Interface that watches the requested certificateSigningRequests. -func (c *FakeCertificateSigningRequests) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeCertificateSigningRequests) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewRootWatchAction(certificatesigningrequestsResource, opts)) } // Create takes the representation of a certificateSigningRequest and creates it. Returns the server's representation of the certificateSigningRequest, and an error, if there is any. -func (c *FakeCertificateSigningRequests) Create(certificateSigningRequest *v1beta1.CertificateSigningRequest) (result *v1beta1.CertificateSigningRequest, err error) { +func (c *FakeCertificateSigningRequests) Create(ctx context.Context, certificateSigningRequest *v1beta1.CertificateSigningRequest, opts v1.CreateOptions) (result *v1beta1.CertificateSigningRequest, err error) { obj, err := c.Fake. Invokes(testing.NewRootCreateAction(certificatesigningrequestsResource, certificateSigningRequest), &v1beta1.CertificateSigningRequest{}) if obj == nil { @@ -85,7 +87,7 @@ func (c *FakeCertificateSigningRequests) Create(certificateSigningRequest *v1bet } // Update takes the representation of a certificateSigningRequest and updates it. Returns the server's representation of the certificateSigningRequest, and an error, if there is any. -func (c *FakeCertificateSigningRequests) Update(certificateSigningRequest *v1beta1.CertificateSigningRequest) (result *v1beta1.CertificateSigningRequest, err error) { +func (c *FakeCertificateSigningRequests) Update(ctx context.Context, certificateSigningRequest *v1beta1.CertificateSigningRequest, opts v1.UpdateOptions) (result *v1beta1.CertificateSigningRequest, err error) { obj, err := c.Fake. Invokes(testing.NewRootUpdateAction(certificatesigningrequestsResource, certificateSigningRequest), &v1beta1.CertificateSigningRequest{}) if obj == nil { @@ -96,7 +98,7 @@ func (c *FakeCertificateSigningRequests) Update(certificateSigningRequest *v1bet // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeCertificateSigningRequests) UpdateStatus(certificateSigningRequest *v1beta1.CertificateSigningRequest) (*v1beta1.CertificateSigningRequest, error) { +func (c *FakeCertificateSigningRequests) UpdateStatus(ctx context.Context, certificateSigningRequest *v1beta1.CertificateSigningRequest, opts v1.UpdateOptions) (*v1beta1.CertificateSigningRequest, error) { obj, err := c.Fake. Invokes(testing.NewRootUpdateSubresourceAction(certificatesigningrequestsResource, "status", certificateSigningRequest), &v1beta1.CertificateSigningRequest{}) if obj == nil { @@ -106,22 +108,22 @@ func (c *FakeCertificateSigningRequests) UpdateStatus(certificateSigningRequest } // Delete takes name of the certificateSigningRequest and deletes it. Returns an error if one occurs. -func (c *FakeCertificateSigningRequests) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeCertificateSigningRequests) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewRootDeleteAction(certificatesigningrequestsResource, name), &v1beta1.CertificateSigningRequest{}) return err } // DeleteCollection deletes a collection of objects. -func (c *FakeCertificateSigningRequests) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewRootDeleteCollectionAction(certificatesigningrequestsResource, listOptions) +func (c *FakeCertificateSigningRequests) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(certificatesigningrequestsResource, listOpts) _, err := c.Fake.Invokes(action, &v1beta1.CertificateSigningRequestList{}) return err } // Patch applies the patch and returns the patched certificateSigningRequest. -func (c *FakeCertificateSigningRequests) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.CertificateSigningRequest, err error) { +func (c *FakeCertificateSigningRequests) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.CertificateSigningRequest, err error) { obj, err := c.Fake. Invokes(testing.NewRootPatchSubresourceAction(certificatesigningrequestsResource, name, pt, data, subresources...), &v1beta1.CertificateSigningRequest{}) if obj == nil { diff --git a/vendor/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/fake/fake_certificatesigningrequest_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/fake/fake_certificatesigningrequest_expansion.go index 8af33e62ad..2c3eaf971e 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/fake/fake_certificatesigningrequest_expansion.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/fake/fake_certificatesigningrequest_expansion.go @@ -17,11 +17,14 @@ limitations under the License. package fake import ( + "context" + certificates "k8s.io/api/certificates/v1beta1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" core "k8s.io/client-go/testing" ) -func (c *FakeCertificateSigningRequests) UpdateApproval(certificateSigningRequest *certificates.CertificateSigningRequest) (result *certificates.CertificateSigningRequest, err error) { +func (c *FakeCertificateSigningRequests) UpdateApproval(ctx context.Context, certificateSigningRequest *certificates.CertificateSigningRequest, opts metav1.UpdateOptions) (result *certificates.CertificateSigningRequest, err error) { obj, err := c.Fake. Invokes(core.NewRootUpdateSubresourceAction(certificatesigningrequestsResource, "approval", certificateSigningRequest), &certificates.CertificateSigningRequest{}) if obj == nil { diff --git a/vendor/k8s.io/client-go/kubernetes/typed/coordination/v1/fake/fake_lease.go b/vendor/k8s.io/client-go/kubernetes/typed/coordination/v1/fake/fake_lease.go index 940c738c1b..1c979de00f 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/coordination/v1/fake/fake_lease.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/coordination/v1/fake/fake_lease.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + coordinationv1 "k8s.io/api/coordination/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" @@ -39,7 +41,7 @@ var leasesResource = schema.GroupVersionResource{Group: "coordination.k8s.io", V var leasesKind = schema.GroupVersionKind{Group: "coordination.k8s.io", Version: "v1", Kind: "Lease"} // Get takes name of the lease, and returns the corresponding lease object, and an error if there is any. -func (c *FakeLeases) Get(name string, options v1.GetOptions) (result *coordinationv1.Lease, err error) { +func (c *FakeLeases) Get(ctx context.Context, name string, options v1.GetOptions) (result *coordinationv1.Lease, err error) { obj, err := c.Fake. Invokes(testing.NewGetAction(leasesResource, c.ns, name), &coordinationv1.Lease{}) @@ -50,7 +52,7 @@ func (c *FakeLeases) Get(name string, options v1.GetOptions) (result *coordinati } // List takes label and field selectors, and returns the list of Leases that match those selectors. -func (c *FakeLeases) List(opts v1.ListOptions) (result *coordinationv1.LeaseList, err error) { +func (c *FakeLeases) List(ctx context.Context, opts v1.ListOptions) (result *coordinationv1.LeaseList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(leasesResource, leasesKind, c.ns, opts), &coordinationv1.LeaseList{}) @@ -72,14 +74,14 @@ func (c *FakeLeases) List(opts v1.ListOptions) (result *coordinationv1.LeaseList } // Watch returns a watch.Interface that watches the requested leases. -func (c *FakeLeases) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeLeases) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(leasesResource, c.ns, opts)) } // Create takes the representation of a lease and creates it. Returns the server's representation of the lease, and an error, if there is any. -func (c *FakeLeases) Create(lease *coordinationv1.Lease) (result *coordinationv1.Lease, err error) { +func (c *FakeLeases) Create(ctx context.Context, lease *coordinationv1.Lease, opts v1.CreateOptions) (result *coordinationv1.Lease, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(leasesResource, c.ns, lease), &coordinationv1.Lease{}) @@ -90,7 +92,7 @@ func (c *FakeLeases) Create(lease *coordinationv1.Lease) (result *coordinationv1 } // Update takes the representation of a lease and updates it. Returns the server's representation of the lease, and an error, if there is any. -func (c *FakeLeases) Update(lease *coordinationv1.Lease) (result *coordinationv1.Lease, err error) { +func (c *FakeLeases) Update(ctx context.Context, lease *coordinationv1.Lease, opts v1.UpdateOptions) (result *coordinationv1.Lease, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(leasesResource, c.ns, lease), &coordinationv1.Lease{}) @@ -101,7 +103,7 @@ func (c *FakeLeases) Update(lease *coordinationv1.Lease) (result *coordinationv1 } // Delete takes name of the lease and deletes it. Returns an error if one occurs. -func (c *FakeLeases) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeLeases) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewDeleteAction(leasesResource, c.ns, name), &coordinationv1.Lease{}) @@ -109,15 +111,15 @@ func (c *FakeLeases) Delete(name string, options *v1.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *FakeLeases) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(leasesResource, c.ns, listOptions) +func (c *FakeLeases) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(leasesResource, c.ns, listOpts) _, err := c.Fake.Invokes(action, &coordinationv1.LeaseList{}) return err } // Patch applies the patch and returns the patched lease. -func (c *FakeLeases) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *coordinationv1.Lease, err error) { +func (c *FakeLeases) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *coordinationv1.Lease, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(leasesResource, c.ns, name, pt, data, subresources...), &coordinationv1.Lease{}) diff --git a/vendor/k8s.io/client-go/kubernetes/typed/coordination/v1/lease.go b/vendor/k8s.io/client-go/kubernetes/typed/coordination/v1/lease.go index b6cf1b64f6..4e8cbf9d61 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/coordination/v1/lease.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/coordination/v1/lease.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" "time" v1 "k8s.io/api/coordination/v1" @@ -37,14 +38,14 @@ type LeasesGetter interface { // LeaseInterface has methods to work with Lease resources. type LeaseInterface interface { - Create(*v1.Lease) (*v1.Lease, error) - Update(*v1.Lease) (*v1.Lease, error) - Delete(name string, options *metav1.DeleteOptions) error - DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error - Get(name string, options metav1.GetOptions) (*v1.Lease, error) - List(opts metav1.ListOptions) (*v1.LeaseList, error) - Watch(opts metav1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Lease, err error) + Create(ctx context.Context, lease *v1.Lease, opts metav1.CreateOptions) (*v1.Lease, error) + Update(ctx context.Context, lease *v1.Lease, opts metav1.UpdateOptions) (*v1.Lease, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Lease, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.LeaseList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Lease, err error) LeaseExpansion } @@ -63,20 +64,20 @@ func newLeases(c *CoordinationV1Client, namespace string) *leases { } // Get takes name of the lease, and returns the corresponding lease object, and an error if there is any. -func (c *leases) Get(name string, options metav1.GetOptions) (result *v1.Lease, err error) { +func (c *leases) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Lease, err error) { result = &v1.Lease{} err = c.client.Get(). Namespace(c.ns). Resource("leases"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of Leases that match those selectors. -func (c *leases) List(opts metav1.ListOptions) (result *v1.LeaseList, err error) { +func (c *leases) List(ctx context.Context, opts metav1.ListOptions) (result *v1.LeaseList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -87,13 +88,13 @@ func (c *leases) List(opts metav1.ListOptions) (result *v1.LeaseList, err error) Resource("leases"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested leases. -func (c *leases) Watch(opts metav1.ListOptions) (watch.Interface, error) { +func (c *leases) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -104,71 +105,74 @@ func (c *leases) Watch(opts metav1.ListOptions) (watch.Interface, error) { Resource("leases"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a lease and creates it. Returns the server's representation of the lease, and an error, if there is any. -func (c *leases) Create(lease *v1.Lease) (result *v1.Lease, err error) { +func (c *leases) Create(ctx context.Context, lease *v1.Lease, opts metav1.CreateOptions) (result *v1.Lease, err error) { result = &v1.Lease{} err = c.client.Post(). Namespace(c.ns). Resource("leases"). + VersionedParams(&opts, scheme.ParameterCodec). Body(lease). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a lease and updates it. Returns the server's representation of the lease, and an error, if there is any. -func (c *leases) Update(lease *v1.Lease) (result *v1.Lease, err error) { +func (c *leases) Update(ctx context.Context, lease *v1.Lease, opts metav1.UpdateOptions) (result *v1.Lease, err error) { result = &v1.Lease{} err = c.client.Put(). Namespace(c.ns). Resource("leases"). Name(lease.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(lease). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the lease and deletes it. Returns an error if one occurs. -func (c *leases) Delete(name string, options *metav1.DeleteOptions) error { +func (c *leases) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("leases"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *leases) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error { +func (c *leases) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Namespace(c.ns). Resource("leases"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched lease. -func (c *leases) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Lease, err error) { +func (c *leases) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Lease, err error) { result = &v1.Lease{} err = c.client.Patch(pt). Namespace(c.ns). Resource("leases"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/k8s.io/client-go/kubernetes/typed/coordination/v1beta1/fake/fake_lease.go b/vendor/k8s.io/client-go/kubernetes/typed/coordination/v1beta1/fake/fake_lease.go index 0ebf3bffc2..4ab5b2ebd4 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/coordination/v1beta1/fake/fake_lease.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/coordination/v1beta1/fake/fake_lease.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + v1beta1 "k8s.io/api/coordination/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" @@ -39,7 +41,7 @@ var leasesResource = schema.GroupVersionResource{Group: "coordination.k8s.io", V var leasesKind = schema.GroupVersionKind{Group: "coordination.k8s.io", Version: "v1beta1", Kind: "Lease"} // Get takes name of the lease, and returns the corresponding lease object, and an error if there is any. -func (c *FakeLeases) Get(name string, options v1.GetOptions) (result *v1beta1.Lease, err error) { +func (c *FakeLeases) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.Lease, err error) { obj, err := c.Fake. Invokes(testing.NewGetAction(leasesResource, c.ns, name), &v1beta1.Lease{}) @@ -50,7 +52,7 @@ func (c *FakeLeases) Get(name string, options v1.GetOptions) (result *v1beta1.Le } // List takes label and field selectors, and returns the list of Leases that match those selectors. -func (c *FakeLeases) List(opts v1.ListOptions) (result *v1beta1.LeaseList, err error) { +func (c *FakeLeases) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.LeaseList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(leasesResource, leasesKind, c.ns, opts), &v1beta1.LeaseList{}) @@ -72,14 +74,14 @@ func (c *FakeLeases) List(opts v1.ListOptions) (result *v1beta1.LeaseList, err e } // Watch returns a watch.Interface that watches the requested leases. -func (c *FakeLeases) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeLeases) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(leasesResource, c.ns, opts)) } // Create takes the representation of a lease and creates it. Returns the server's representation of the lease, and an error, if there is any. -func (c *FakeLeases) Create(lease *v1beta1.Lease) (result *v1beta1.Lease, err error) { +func (c *FakeLeases) Create(ctx context.Context, lease *v1beta1.Lease, opts v1.CreateOptions) (result *v1beta1.Lease, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(leasesResource, c.ns, lease), &v1beta1.Lease{}) @@ -90,7 +92,7 @@ func (c *FakeLeases) Create(lease *v1beta1.Lease) (result *v1beta1.Lease, err er } // Update takes the representation of a lease and updates it. Returns the server's representation of the lease, and an error, if there is any. -func (c *FakeLeases) Update(lease *v1beta1.Lease) (result *v1beta1.Lease, err error) { +func (c *FakeLeases) Update(ctx context.Context, lease *v1beta1.Lease, opts v1.UpdateOptions) (result *v1beta1.Lease, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(leasesResource, c.ns, lease), &v1beta1.Lease{}) @@ -101,7 +103,7 @@ func (c *FakeLeases) Update(lease *v1beta1.Lease) (result *v1beta1.Lease, err er } // Delete takes name of the lease and deletes it. Returns an error if one occurs. -func (c *FakeLeases) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeLeases) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewDeleteAction(leasesResource, c.ns, name), &v1beta1.Lease{}) @@ -109,15 +111,15 @@ func (c *FakeLeases) Delete(name string, options *v1.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *FakeLeases) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(leasesResource, c.ns, listOptions) +func (c *FakeLeases) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(leasesResource, c.ns, listOpts) _, err := c.Fake.Invokes(action, &v1beta1.LeaseList{}) return err } // Patch applies the patch and returns the patched lease. -func (c *FakeLeases) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Lease, err error) { +func (c *FakeLeases) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Lease, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(leasesResource, c.ns, name, pt, data, subresources...), &v1beta1.Lease{}) diff --git a/vendor/k8s.io/client-go/kubernetes/typed/coordination/v1beta1/lease.go b/vendor/k8s.io/client-go/kubernetes/typed/coordination/v1beta1/lease.go index 490d815aa6..c73cb0a97d 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/coordination/v1beta1/lease.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/coordination/v1beta1/lease.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" "time" v1beta1 "k8s.io/api/coordination/v1beta1" @@ -37,14 +38,14 @@ type LeasesGetter interface { // LeaseInterface has methods to work with Lease resources. type LeaseInterface interface { - Create(*v1beta1.Lease) (*v1beta1.Lease, error) - Update(*v1beta1.Lease) (*v1beta1.Lease, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*v1beta1.Lease, error) - List(opts v1.ListOptions) (*v1beta1.LeaseList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Lease, err error) + Create(ctx context.Context, lease *v1beta1.Lease, opts v1.CreateOptions) (*v1beta1.Lease, error) + Update(ctx context.Context, lease *v1beta1.Lease, opts v1.UpdateOptions) (*v1beta1.Lease, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.Lease, error) + List(ctx context.Context, opts v1.ListOptions) (*v1beta1.LeaseList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Lease, err error) LeaseExpansion } @@ -63,20 +64,20 @@ func newLeases(c *CoordinationV1beta1Client, namespace string) *leases { } // Get takes name of the lease, and returns the corresponding lease object, and an error if there is any. -func (c *leases) Get(name string, options v1.GetOptions) (result *v1beta1.Lease, err error) { +func (c *leases) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.Lease, err error) { result = &v1beta1.Lease{} err = c.client.Get(). Namespace(c.ns). Resource("leases"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of Leases that match those selectors. -func (c *leases) List(opts v1.ListOptions) (result *v1beta1.LeaseList, err error) { +func (c *leases) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.LeaseList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -87,13 +88,13 @@ func (c *leases) List(opts v1.ListOptions) (result *v1beta1.LeaseList, err error Resource("leases"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested leases. -func (c *leases) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *leases) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -104,71 +105,74 @@ func (c *leases) Watch(opts v1.ListOptions) (watch.Interface, error) { Resource("leases"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a lease and creates it. Returns the server's representation of the lease, and an error, if there is any. -func (c *leases) Create(lease *v1beta1.Lease) (result *v1beta1.Lease, err error) { +func (c *leases) Create(ctx context.Context, lease *v1beta1.Lease, opts v1.CreateOptions) (result *v1beta1.Lease, err error) { result = &v1beta1.Lease{} err = c.client.Post(). Namespace(c.ns). Resource("leases"). + VersionedParams(&opts, scheme.ParameterCodec). Body(lease). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a lease and updates it. Returns the server's representation of the lease, and an error, if there is any. -func (c *leases) Update(lease *v1beta1.Lease) (result *v1beta1.Lease, err error) { +func (c *leases) Update(ctx context.Context, lease *v1beta1.Lease, opts v1.UpdateOptions) (result *v1beta1.Lease, err error) { result = &v1beta1.Lease{} err = c.client.Put(). Namespace(c.ns). Resource("leases"). Name(lease.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(lease). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the lease and deletes it. Returns an error if one occurs. -func (c *leases) Delete(name string, options *v1.DeleteOptions) error { +func (c *leases) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("leases"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *leases) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *leases) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Namespace(c.ns). Resource("leases"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched lease. -func (c *leases) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Lease, err error) { +func (c *leases) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Lease, err error) { result = &v1beta1.Lease{} err = c.client.Patch(pt). Namespace(c.ns). Resource("leases"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/componentstatus.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/componentstatus.go index 302b2fdc34..faf5d19cc1 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/componentstatus.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/componentstatus.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" "time" v1 "k8s.io/api/core/v1" @@ -37,14 +38,14 @@ type ComponentStatusesGetter interface { // ComponentStatusInterface has methods to work with ComponentStatus resources. type ComponentStatusInterface interface { - Create(*v1.ComponentStatus) (*v1.ComponentStatus, error) - Update(*v1.ComponentStatus) (*v1.ComponentStatus, error) - Delete(name string, options *metav1.DeleteOptions) error - DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error - Get(name string, options metav1.GetOptions) (*v1.ComponentStatus, error) - List(opts metav1.ListOptions) (*v1.ComponentStatusList, error) - Watch(opts metav1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ComponentStatus, err error) + Create(ctx context.Context, componentStatus *v1.ComponentStatus, opts metav1.CreateOptions) (*v1.ComponentStatus, error) + Update(ctx context.Context, componentStatus *v1.ComponentStatus, opts metav1.UpdateOptions) (*v1.ComponentStatus, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.ComponentStatus, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.ComponentStatusList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ComponentStatus, err error) ComponentStatusExpansion } @@ -61,19 +62,19 @@ func newComponentStatuses(c *CoreV1Client) *componentStatuses { } // Get takes name of the componentStatus, and returns the corresponding componentStatus object, and an error if there is any. -func (c *componentStatuses) Get(name string, options metav1.GetOptions) (result *v1.ComponentStatus, err error) { +func (c *componentStatuses) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ComponentStatus, err error) { result = &v1.ComponentStatus{} err = c.client.Get(). Resource("componentstatuses"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of ComponentStatuses that match those selectors. -func (c *componentStatuses) List(opts metav1.ListOptions) (result *v1.ComponentStatusList, err error) { +func (c *componentStatuses) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ComponentStatusList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -83,13 +84,13 @@ func (c *componentStatuses) List(opts metav1.ListOptions) (result *v1.ComponentS Resource("componentstatuses"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested componentStatuses. -func (c *componentStatuses) Watch(opts metav1.ListOptions) (watch.Interface, error) { +func (c *componentStatuses) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -99,66 +100,69 @@ func (c *componentStatuses) Watch(opts metav1.ListOptions) (watch.Interface, err Resource("componentstatuses"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a componentStatus and creates it. Returns the server's representation of the componentStatus, and an error, if there is any. -func (c *componentStatuses) Create(componentStatus *v1.ComponentStatus) (result *v1.ComponentStatus, err error) { +func (c *componentStatuses) Create(ctx context.Context, componentStatus *v1.ComponentStatus, opts metav1.CreateOptions) (result *v1.ComponentStatus, err error) { result = &v1.ComponentStatus{} err = c.client.Post(). Resource("componentstatuses"). + VersionedParams(&opts, scheme.ParameterCodec). Body(componentStatus). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a componentStatus and updates it. Returns the server's representation of the componentStatus, and an error, if there is any. -func (c *componentStatuses) Update(componentStatus *v1.ComponentStatus) (result *v1.ComponentStatus, err error) { +func (c *componentStatuses) Update(ctx context.Context, componentStatus *v1.ComponentStatus, opts metav1.UpdateOptions) (result *v1.ComponentStatus, err error) { result = &v1.ComponentStatus{} err = c.client.Put(). Resource("componentstatuses"). Name(componentStatus.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(componentStatus). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the componentStatus and deletes it. Returns an error if one occurs. -func (c *componentStatuses) Delete(name string, options *metav1.DeleteOptions) error { +func (c *componentStatuses) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { return c.client.Delete(). Resource("componentstatuses"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *componentStatuses) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error { +func (c *componentStatuses) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Resource("componentstatuses"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched componentStatus. -func (c *componentStatuses) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ComponentStatus, err error) { +func (c *componentStatuses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ComponentStatus, err error) { result = &v1.ComponentStatus{} err = c.client.Patch(pt). Resource("componentstatuses"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/configmap.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/configmap.go index 18ce954ae2..407d25a462 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/configmap.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/configmap.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" "time" v1 "k8s.io/api/core/v1" @@ -37,14 +38,14 @@ type ConfigMapsGetter interface { // ConfigMapInterface has methods to work with ConfigMap resources. type ConfigMapInterface interface { - Create(*v1.ConfigMap) (*v1.ConfigMap, error) - Update(*v1.ConfigMap) (*v1.ConfigMap, error) - Delete(name string, options *metav1.DeleteOptions) error - DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error - Get(name string, options metav1.GetOptions) (*v1.ConfigMap, error) - List(opts metav1.ListOptions) (*v1.ConfigMapList, error) - Watch(opts metav1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ConfigMap, err error) + Create(ctx context.Context, configMap *v1.ConfigMap, opts metav1.CreateOptions) (*v1.ConfigMap, error) + Update(ctx context.Context, configMap *v1.ConfigMap, opts metav1.UpdateOptions) (*v1.ConfigMap, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.ConfigMap, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.ConfigMapList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ConfigMap, err error) ConfigMapExpansion } @@ -63,20 +64,20 @@ func newConfigMaps(c *CoreV1Client, namespace string) *configMaps { } // Get takes name of the configMap, and returns the corresponding configMap object, and an error if there is any. -func (c *configMaps) Get(name string, options metav1.GetOptions) (result *v1.ConfigMap, err error) { +func (c *configMaps) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ConfigMap, err error) { result = &v1.ConfigMap{} err = c.client.Get(). Namespace(c.ns). Resource("configmaps"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of ConfigMaps that match those selectors. -func (c *configMaps) List(opts metav1.ListOptions) (result *v1.ConfigMapList, err error) { +func (c *configMaps) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ConfigMapList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -87,13 +88,13 @@ func (c *configMaps) List(opts metav1.ListOptions) (result *v1.ConfigMapList, er Resource("configmaps"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested configMaps. -func (c *configMaps) Watch(opts metav1.ListOptions) (watch.Interface, error) { +func (c *configMaps) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -104,71 +105,74 @@ func (c *configMaps) Watch(opts metav1.ListOptions) (watch.Interface, error) { Resource("configmaps"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a configMap and creates it. Returns the server's representation of the configMap, and an error, if there is any. -func (c *configMaps) Create(configMap *v1.ConfigMap) (result *v1.ConfigMap, err error) { +func (c *configMaps) Create(ctx context.Context, configMap *v1.ConfigMap, opts metav1.CreateOptions) (result *v1.ConfigMap, err error) { result = &v1.ConfigMap{} err = c.client.Post(). Namespace(c.ns). Resource("configmaps"). + VersionedParams(&opts, scheme.ParameterCodec). Body(configMap). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a configMap and updates it. Returns the server's representation of the configMap, and an error, if there is any. -func (c *configMaps) Update(configMap *v1.ConfigMap) (result *v1.ConfigMap, err error) { +func (c *configMaps) Update(ctx context.Context, configMap *v1.ConfigMap, opts metav1.UpdateOptions) (result *v1.ConfigMap, err error) { result = &v1.ConfigMap{} err = c.client.Put(). Namespace(c.ns). Resource("configmaps"). Name(configMap.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(configMap). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the configMap and deletes it. Returns an error if one occurs. -func (c *configMaps) Delete(name string, options *metav1.DeleteOptions) error { +func (c *configMaps) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("configmaps"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *configMaps) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error { +func (c *configMaps) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Namespace(c.ns). Resource("configmaps"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched configMap. -func (c *configMaps) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ConfigMap, err error) { +func (c *configMaps) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ConfigMap, err error) { result = &v1.ConfigMap{} err = c.client.Patch(pt). Namespace(c.ns). Resource("configmaps"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/endpoints.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/endpoints.go index 978a2a196c..c36eaaa4ab 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/endpoints.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/endpoints.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" "time" v1 "k8s.io/api/core/v1" @@ -37,14 +38,14 @@ type EndpointsGetter interface { // EndpointsInterface has methods to work with Endpoints resources. type EndpointsInterface interface { - Create(*v1.Endpoints) (*v1.Endpoints, error) - Update(*v1.Endpoints) (*v1.Endpoints, error) - Delete(name string, options *metav1.DeleteOptions) error - DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error - Get(name string, options metav1.GetOptions) (*v1.Endpoints, error) - List(opts metav1.ListOptions) (*v1.EndpointsList, error) - Watch(opts metav1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Endpoints, err error) + Create(ctx context.Context, endpoints *v1.Endpoints, opts metav1.CreateOptions) (*v1.Endpoints, error) + Update(ctx context.Context, endpoints *v1.Endpoints, opts metav1.UpdateOptions) (*v1.Endpoints, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Endpoints, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.EndpointsList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Endpoints, err error) EndpointsExpansion } @@ -63,20 +64,20 @@ func newEndpoints(c *CoreV1Client, namespace string) *endpoints { } // Get takes name of the endpoints, and returns the corresponding endpoints object, and an error if there is any. -func (c *endpoints) Get(name string, options metav1.GetOptions) (result *v1.Endpoints, err error) { +func (c *endpoints) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Endpoints, err error) { result = &v1.Endpoints{} err = c.client.Get(). Namespace(c.ns). Resource("endpoints"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of Endpoints that match those selectors. -func (c *endpoints) List(opts metav1.ListOptions) (result *v1.EndpointsList, err error) { +func (c *endpoints) List(ctx context.Context, opts metav1.ListOptions) (result *v1.EndpointsList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -87,13 +88,13 @@ func (c *endpoints) List(opts metav1.ListOptions) (result *v1.EndpointsList, err Resource("endpoints"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested endpoints. -func (c *endpoints) Watch(opts metav1.ListOptions) (watch.Interface, error) { +func (c *endpoints) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -104,71 +105,74 @@ func (c *endpoints) Watch(opts metav1.ListOptions) (watch.Interface, error) { Resource("endpoints"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a endpoints and creates it. Returns the server's representation of the endpoints, and an error, if there is any. -func (c *endpoints) Create(endpoints *v1.Endpoints) (result *v1.Endpoints, err error) { +func (c *endpoints) Create(ctx context.Context, endpoints *v1.Endpoints, opts metav1.CreateOptions) (result *v1.Endpoints, err error) { result = &v1.Endpoints{} err = c.client.Post(). Namespace(c.ns). Resource("endpoints"). + VersionedParams(&opts, scheme.ParameterCodec). Body(endpoints). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a endpoints and updates it. Returns the server's representation of the endpoints, and an error, if there is any. -func (c *endpoints) Update(endpoints *v1.Endpoints) (result *v1.Endpoints, err error) { +func (c *endpoints) Update(ctx context.Context, endpoints *v1.Endpoints, opts metav1.UpdateOptions) (result *v1.Endpoints, err error) { result = &v1.Endpoints{} err = c.client.Put(). Namespace(c.ns). Resource("endpoints"). Name(endpoints.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(endpoints). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the endpoints and deletes it. Returns an error if one occurs. -func (c *endpoints) Delete(name string, options *metav1.DeleteOptions) error { +func (c *endpoints) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("endpoints"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *endpoints) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error { +func (c *endpoints) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Namespace(c.ns). Resource("endpoints"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched endpoints. -func (c *endpoints) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Endpoints, err error) { +func (c *endpoints) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Endpoints, err error) { result = &v1.Endpoints{} err = c.client.Patch(pt). Namespace(c.ns). Resource("endpoints"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/event.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/event.go index 55cfa0901b..9b669920f1 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/event.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/event.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" "time" v1 "k8s.io/api/core/v1" @@ -37,14 +38,14 @@ type EventsGetter interface { // EventInterface has methods to work with Event resources. type EventInterface interface { - Create(*v1.Event) (*v1.Event, error) - Update(*v1.Event) (*v1.Event, error) - Delete(name string, options *metav1.DeleteOptions) error - DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error - Get(name string, options metav1.GetOptions) (*v1.Event, error) - List(opts metav1.ListOptions) (*v1.EventList, error) - Watch(opts metav1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Event, err error) + Create(ctx context.Context, event *v1.Event, opts metav1.CreateOptions) (*v1.Event, error) + Update(ctx context.Context, event *v1.Event, opts metav1.UpdateOptions) (*v1.Event, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Event, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.EventList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Event, err error) EventExpansion } @@ -63,20 +64,20 @@ func newEvents(c *CoreV1Client, namespace string) *events { } // Get takes name of the event, and returns the corresponding event object, and an error if there is any. -func (c *events) Get(name string, options metav1.GetOptions) (result *v1.Event, err error) { +func (c *events) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Event, err error) { result = &v1.Event{} err = c.client.Get(). Namespace(c.ns). Resource("events"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of Events that match those selectors. -func (c *events) List(opts metav1.ListOptions) (result *v1.EventList, err error) { +func (c *events) List(ctx context.Context, opts metav1.ListOptions) (result *v1.EventList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -87,13 +88,13 @@ func (c *events) List(opts metav1.ListOptions) (result *v1.EventList, err error) Resource("events"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested events. -func (c *events) Watch(opts metav1.ListOptions) (watch.Interface, error) { +func (c *events) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -104,71 +105,74 @@ func (c *events) Watch(opts metav1.ListOptions) (watch.Interface, error) { Resource("events"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a event and creates it. Returns the server's representation of the event, and an error, if there is any. -func (c *events) Create(event *v1.Event) (result *v1.Event, err error) { +func (c *events) Create(ctx context.Context, event *v1.Event, opts metav1.CreateOptions) (result *v1.Event, err error) { result = &v1.Event{} err = c.client.Post(). Namespace(c.ns). Resource("events"). + VersionedParams(&opts, scheme.ParameterCodec). Body(event). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a event and updates it. Returns the server's representation of the event, and an error, if there is any. -func (c *events) Update(event *v1.Event) (result *v1.Event, err error) { +func (c *events) Update(ctx context.Context, event *v1.Event, opts metav1.UpdateOptions) (result *v1.Event, err error) { result = &v1.Event{} err = c.client.Put(). Namespace(c.ns). Resource("events"). Name(event.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(event). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the event and deletes it. Returns an error if one occurs. -func (c *events) Delete(name string, options *metav1.DeleteOptions) error { +func (c *events) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("events"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *events) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error { +func (c *events) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Namespace(c.ns). Resource("events"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched event. -func (c *events) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Event, err error) { +func (c *events) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Event, err error) { result = &v1.Event{} err = c.client.Patch(pt). Namespace(c.ns). Resource("events"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/event_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/event_expansion.go index 5a82afa42f..211cf0603c 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/event_expansion.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/event_expansion.go @@ -17,9 +17,10 @@ limitations under the License. package v1 import ( + "context" "fmt" - "k8s.io/api/core/v1" + v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/runtime" @@ -54,7 +55,7 @@ func (e *events) CreateWithEventNamespace(event *v1.Event) (*v1.Event, error) { NamespaceIfScoped(event.Namespace, len(event.Namespace) > 0). Resource("events"). Body(event). - Do(). + Do(context.TODO()). Into(result) return result, err } @@ -71,7 +72,7 @@ func (e *events) UpdateWithEventNamespace(event *v1.Event) (*v1.Event, error) { Resource("events"). Name(event.Name). Body(event). - Do(). + Do(context.TODO()). Into(result) return result, err } @@ -91,7 +92,7 @@ func (e *events) PatchWithEventNamespace(incompleteEvent *v1.Event, data []byte) Resource("events"). Name(incompleteEvent.Name). Body(data). - Do(). + Do(context.TODO()). Into(result) return result, err } @@ -118,7 +119,7 @@ func (e *events) Search(scheme *runtime.Scheme, objOrRef runtime.Object) (*v1.Ev refUID = &stringRefUID } fieldSelector := e.GetFieldSelector(&ref.Name, &ref.Namespace, refKind, refUID) - return e.List(metav1.ListOptions{FieldSelector: fieldSelector.String()}) + return e.List(context.TODO(), metav1.ListOptions{FieldSelector: fieldSelector.String()}) } // Returns the appropriate field selector based on the API version being used to communicate with the server. diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_componentstatus.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_componentstatus.go index 18beedc2d3..08ff515df1 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_componentstatus.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_componentstatus.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + corev1 "k8s.io/api/core/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" @@ -38,7 +40,7 @@ var componentstatusesResource = schema.GroupVersionResource{Group: "", Version: var componentstatusesKind = schema.GroupVersionKind{Group: "", Version: "v1", Kind: "ComponentStatus"} // Get takes name of the componentStatus, and returns the corresponding componentStatus object, and an error if there is any. -func (c *FakeComponentStatuses) Get(name string, options v1.GetOptions) (result *corev1.ComponentStatus, err error) { +func (c *FakeComponentStatuses) Get(ctx context.Context, name string, options v1.GetOptions) (result *corev1.ComponentStatus, err error) { obj, err := c.Fake. Invokes(testing.NewRootGetAction(componentstatusesResource, name), &corev1.ComponentStatus{}) if obj == nil { @@ -48,7 +50,7 @@ func (c *FakeComponentStatuses) Get(name string, options v1.GetOptions) (result } // List takes label and field selectors, and returns the list of ComponentStatuses that match those selectors. -func (c *FakeComponentStatuses) List(opts v1.ListOptions) (result *corev1.ComponentStatusList, err error) { +func (c *FakeComponentStatuses) List(ctx context.Context, opts v1.ListOptions) (result *corev1.ComponentStatusList, err error) { obj, err := c.Fake. Invokes(testing.NewRootListAction(componentstatusesResource, componentstatusesKind, opts), &corev1.ComponentStatusList{}) if obj == nil { @@ -69,13 +71,13 @@ func (c *FakeComponentStatuses) List(opts v1.ListOptions) (result *corev1.Compon } // Watch returns a watch.Interface that watches the requested componentStatuses. -func (c *FakeComponentStatuses) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeComponentStatuses) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewRootWatchAction(componentstatusesResource, opts)) } // Create takes the representation of a componentStatus and creates it. Returns the server's representation of the componentStatus, and an error, if there is any. -func (c *FakeComponentStatuses) Create(componentStatus *corev1.ComponentStatus) (result *corev1.ComponentStatus, err error) { +func (c *FakeComponentStatuses) Create(ctx context.Context, componentStatus *corev1.ComponentStatus, opts v1.CreateOptions) (result *corev1.ComponentStatus, err error) { obj, err := c.Fake. Invokes(testing.NewRootCreateAction(componentstatusesResource, componentStatus), &corev1.ComponentStatus{}) if obj == nil { @@ -85,7 +87,7 @@ func (c *FakeComponentStatuses) Create(componentStatus *corev1.ComponentStatus) } // Update takes the representation of a componentStatus and updates it. Returns the server's representation of the componentStatus, and an error, if there is any. -func (c *FakeComponentStatuses) Update(componentStatus *corev1.ComponentStatus) (result *corev1.ComponentStatus, err error) { +func (c *FakeComponentStatuses) Update(ctx context.Context, componentStatus *corev1.ComponentStatus, opts v1.UpdateOptions) (result *corev1.ComponentStatus, err error) { obj, err := c.Fake. Invokes(testing.NewRootUpdateAction(componentstatusesResource, componentStatus), &corev1.ComponentStatus{}) if obj == nil { @@ -95,22 +97,22 @@ func (c *FakeComponentStatuses) Update(componentStatus *corev1.ComponentStatus) } // Delete takes name of the componentStatus and deletes it. Returns an error if one occurs. -func (c *FakeComponentStatuses) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeComponentStatuses) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewRootDeleteAction(componentstatusesResource, name), &corev1.ComponentStatus{}) return err } // DeleteCollection deletes a collection of objects. -func (c *FakeComponentStatuses) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewRootDeleteCollectionAction(componentstatusesResource, listOptions) +func (c *FakeComponentStatuses) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(componentstatusesResource, listOpts) _, err := c.Fake.Invokes(action, &corev1.ComponentStatusList{}) return err } // Patch applies the patch and returns the patched componentStatus. -func (c *FakeComponentStatuses) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *corev1.ComponentStatus, err error) { +func (c *FakeComponentStatuses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *corev1.ComponentStatus, err error) { obj, err := c.Fake. Invokes(testing.NewRootPatchSubresourceAction(componentstatusesResource, name, pt, data, subresources...), &corev1.ComponentStatus{}) if obj == nil { diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_configmap.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_configmap.go index 2361ac3fe9..6c541ec7d3 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_configmap.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_configmap.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + corev1 "k8s.io/api/core/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" @@ -39,7 +41,7 @@ var configmapsResource = schema.GroupVersionResource{Group: "", Version: "v1", R var configmapsKind = schema.GroupVersionKind{Group: "", Version: "v1", Kind: "ConfigMap"} // Get takes name of the configMap, and returns the corresponding configMap object, and an error if there is any. -func (c *FakeConfigMaps) Get(name string, options v1.GetOptions) (result *corev1.ConfigMap, err error) { +func (c *FakeConfigMaps) Get(ctx context.Context, name string, options v1.GetOptions) (result *corev1.ConfigMap, err error) { obj, err := c.Fake. Invokes(testing.NewGetAction(configmapsResource, c.ns, name), &corev1.ConfigMap{}) @@ -50,7 +52,7 @@ func (c *FakeConfigMaps) Get(name string, options v1.GetOptions) (result *corev1 } // List takes label and field selectors, and returns the list of ConfigMaps that match those selectors. -func (c *FakeConfigMaps) List(opts v1.ListOptions) (result *corev1.ConfigMapList, err error) { +func (c *FakeConfigMaps) List(ctx context.Context, opts v1.ListOptions) (result *corev1.ConfigMapList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(configmapsResource, configmapsKind, c.ns, opts), &corev1.ConfigMapList{}) @@ -72,14 +74,14 @@ func (c *FakeConfigMaps) List(opts v1.ListOptions) (result *corev1.ConfigMapList } // Watch returns a watch.Interface that watches the requested configMaps. -func (c *FakeConfigMaps) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeConfigMaps) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(configmapsResource, c.ns, opts)) } // Create takes the representation of a configMap and creates it. Returns the server's representation of the configMap, and an error, if there is any. -func (c *FakeConfigMaps) Create(configMap *corev1.ConfigMap) (result *corev1.ConfigMap, err error) { +func (c *FakeConfigMaps) Create(ctx context.Context, configMap *corev1.ConfigMap, opts v1.CreateOptions) (result *corev1.ConfigMap, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(configmapsResource, c.ns, configMap), &corev1.ConfigMap{}) @@ -90,7 +92,7 @@ func (c *FakeConfigMaps) Create(configMap *corev1.ConfigMap) (result *corev1.Con } // Update takes the representation of a configMap and updates it. Returns the server's representation of the configMap, and an error, if there is any. -func (c *FakeConfigMaps) Update(configMap *corev1.ConfigMap) (result *corev1.ConfigMap, err error) { +func (c *FakeConfigMaps) Update(ctx context.Context, configMap *corev1.ConfigMap, opts v1.UpdateOptions) (result *corev1.ConfigMap, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(configmapsResource, c.ns, configMap), &corev1.ConfigMap{}) @@ -101,7 +103,7 @@ func (c *FakeConfigMaps) Update(configMap *corev1.ConfigMap) (result *corev1.Con } // Delete takes name of the configMap and deletes it. Returns an error if one occurs. -func (c *FakeConfigMaps) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeConfigMaps) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewDeleteAction(configmapsResource, c.ns, name), &corev1.ConfigMap{}) @@ -109,15 +111,15 @@ func (c *FakeConfigMaps) Delete(name string, options *v1.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *FakeConfigMaps) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(configmapsResource, c.ns, listOptions) +func (c *FakeConfigMaps) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(configmapsResource, c.ns, listOpts) _, err := c.Fake.Invokes(action, &corev1.ConfigMapList{}) return err } // Patch applies the patch and returns the patched configMap. -func (c *FakeConfigMaps) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *corev1.ConfigMap, err error) { +func (c *FakeConfigMaps) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *corev1.ConfigMap, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(configmapsResource, c.ns, name, pt, data, subresources...), &corev1.ConfigMap{}) diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_endpoints.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_endpoints.go index d521af4083..02c03223aa 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_endpoints.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_endpoints.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + corev1 "k8s.io/api/core/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" @@ -39,7 +41,7 @@ var endpointsResource = schema.GroupVersionResource{Group: "", Version: "v1", Re var endpointsKind = schema.GroupVersionKind{Group: "", Version: "v1", Kind: "Endpoints"} // Get takes name of the endpoints, and returns the corresponding endpoints object, and an error if there is any. -func (c *FakeEndpoints) Get(name string, options v1.GetOptions) (result *corev1.Endpoints, err error) { +func (c *FakeEndpoints) Get(ctx context.Context, name string, options v1.GetOptions) (result *corev1.Endpoints, err error) { obj, err := c.Fake. Invokes(testing.NewGetAction(endpointsResource, c.ns, name), &corev1.Endpoints{}) @@ -50,7 +52,7 @@ func (c *FakeEndpoints) Get(name string, options v1.GetOptions) (result *corev1. } // List takes label and field selectors, and returns the list of Endpoints that match those selectors. -func (c *FakeEndpoints) List(opts v1.ListOptions) (result *corev1.EndpointsList, err error) { +func (c *FakeEndpoints) List(ctx context.Context, opts v1.ListOptions) (result *corev1.EndpointsList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(endpointsResource, endpointsKind, c.ns, opts), &corev1.EndpointsList{}) @@ -72,14 +74,14 @@ func (c *FakeEndpoints) List(opts v1.ListOptions) (result *corev1.EndpointsList, } // Watch returns a watch.Interface that watches the requested endpoints. -func (c *FakeEndpoints) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeEndpoints) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(endpointsResource, c.ns, opts)) } // Create takes the representation of a endpoints and creates it. Returns the server's representation of the endpoints, and an error, if there is any. -func (c *FakeEndpoints) Create(endpoints *corev1.Endpoints) (result *corev1.Endpoints, err error) { +func (c *FakeEndpoints) Create(ctx context.Context, endpoints *corev1.Endpoints, opts v1.CreateOptions) (result *corev1.Endpoints, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(endpointsResource, c.ns, endpoints), &corev1.Endpoints{}) @@ -90,7 +92,7 @@ func (c *FakeEndpoints) Create(endpoints *corev1.Endpoints) (result *corev1.Endp } // Update takes the representation of a endpoints and updates it. Returns the server's representation of the endpoints, and an error, if there is any. -func (c *FakeEndpoints) Update(endpoints *corev1.Endpoints) (result *corev1.Endpoints, err error) { +func (c *FakeEndpoints) Update(ctx context.Context, endpoints *corev1.Endpoints, opts v1.UpdateOptions) (result *corev1.Endpoints, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(endpointsResource, c.ns, endpoints), &corev1.Endpoints{}) @@ -101,7 +103,7 @@ func (c *FakeEndpoints) Update(endpoints *corev1.Endpoints) (result *corev1.Endp } // Delete takes name of the endpoints and deletes it. Returns an error if one occurs. -func (c *FakeEndpoints) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeEndpoints) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewDeleteAction(endpointsResource, c.ns, name), &corev1.Endpoints{}) @@ -109,15 +111,15 @@ func (c *FakeEndpoints) Delete(name string, options *v1.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *FakeEndpoints) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(endpointsResource, c.ns, listOptions) +func (c *FakeEndpoints) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(endpointsResource, c.ns, listOpts) _, err := c.Fake.Invokes(action, &corev1.EndpointsList{}) return err } // Patch applies the patch and returns the patched endpoints. -func (c *FakeEndpoints) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *corev1.Endpoints, err error) { +func (c *FakeEndpoints) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *corev1.Endpoints, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(endpointsResource, c.ns, name, pt, data, subresources...), &corev1.Endpoints{}) diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_event.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_event.go index 3444f4be96..2e4787dc7f 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_event.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_event.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + corev1 "k8s.io/api/core/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" @@ -39,7 +41,7 @@ var eventsResource = schema.GroupVersionResource{Group: "", Version: "v1", Resou var eventsKind = schema.GroupVersionKind{Group: "", Version: "v1", Kind: "Event"} // Get takes name of the event, and returns the corresponding event object, and an error if there is any. -func (c *FakeEvents) Get(name string, options v1.GetOptions) (result *corev1.Event, err error) { +func (c *FakeEvents) Get(ctx context.Context, name string, options v1.GetOptions) (result *corev1.Event, err error) { obj, err := c.Fake. Invokes(testing.NewGetAction(eventsResource, c.ns, name), &corev1.Event{}) @@ -50,7 +52,7 @@ func (c *FakeEvents) Get(name string, options v1.GetOptions) (result *corev1.Eve } // List takes label and field selectors, and returns the list of Events that match those selectors. -func (c *FakeEvents) List(opts v1.ListOptions) (result *corev1.EventList, err error) { +func (c *FakeEvents) List(ctx context.Context, opts v1.ListOptions) (result *corev1.EventList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(eventsResource, eventsKind, c.ns, opts), &corev1.EventList{}) @@ -72,14 +74,14 @@ func (c *FakeEvents) List(opts v1.ListOptions) (result *corev1.EventList, err er } // Watch returns a watch.Interface that watches the requested events. -func (c *FakeEvents) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeEvents) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(eventsResource, c.ns, opts)) } // Create takes the representation of a event and creates it. Returns the server's representation of the event, and an error, if there is any. -func (c *FakeEvents) Create(event *corev1.Event) (result *corev1.Event, err error) { +func (c *FakeEvents) Create(ctx context.Context, event *corev1.Event, opts v1.CreateOptions) (result *corev1.Event, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(eventsResource, c.ns, event), &corev1.Event{}) @@ -90,7 +92,7 @@ func (c *FakeEvents) Create(event *corev1.Event) (result *corev1.Event, err erro } // Update takes the representation of a event and updates it. Returns the server's representation of the event, and an error, if there is any. -func (c *FakeEvents) Update(event *corev1.Event) (result *corev1.Event, err error) { +func (c *FakeEvents) Update(ctx context.Context, event *corev1.Event, opts v1.UpdateOptions) (result *corev1.Event, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(eventsResource, c.ns, event), &corev1.Event{}) @@ -101,7 +103,7 @@ func (c *FakeEvents) Update(event *corev1.Event) (result *corev1.Event, err erro } // Delete takes name of the event and deletes it. Returns an error if one occurs. -func (c *FakeEvents) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeEvents) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewDeleteAction(eventsResource, c.ns, name), &corev1.Event{}) @@ -109,15 +111,15 @@ func (c *FakeEvents) Delete(name string, options *v1.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *FakeEvents) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(eventsResource, c.ns, listOptions) +func (c *FakeEvents) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(eventsResource, c.ns, listOpts) _, err := c.Fake.Invokes(action, &corev1.EventList{}) return err } // Patch applies the patch and returns the patched event. -func (c *FakeEvents) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *corev1.Event, err error) { +func (c *FakeEvents) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *corev1.Event, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(eventsResource, c.ns, name, pt, data, subresources...), &corev1.Event{}) diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_limitrange.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_limitrange.go index d110031f83..eb0bde8e59 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_limitrange.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_limitrange.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + corev1 "k8s.io/api/core/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" @@ -39,7 +41,7 @@ var limitrangesResource = schema.GroupVersionResource{Group: "", Version: "v1", var limitrangesKind = schema.GroupVersionKind{Group: "", Version: "v1", Kind: "LimitRange"} // Get takes name of the limitRange, and returns the corresponding limitRange object, and an error if there is any. -func (c *FakeLimitRanges) Get(name string, options v1.GetOptions) (result *corev1.LimitRange, err error) { +func (c *FakeLimitRanges) Get(ctx context.Context, name string, options v1.GetOptions) (result *corev1.LimitRange, err error) { obj, err := c.Fake. Invokes(testing.NewGetAction(limitrangesResource, c.ns, name), &corev1.LimitRange{}) @@ -50,7 +52,7 @@ func (c *FakeLimitRanges) Get(name string, options v1.GetOptions) (result *corev } // List takes label and field selectors, and returns the list of LimitRanges that match those selectors. -func (c *FakeLimitRanges) List(opts v1.ListOptions) (result *corev1.LimitRangeList, err error) { +func (c *FakeLimitRanges) List(ctx context.Context, opts v1.ListOptions) (result *corev1.LimitRangeList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(limitrangesResource, limitrangesKind, c.ns, opts), &corev1.LimitRangeList{}) @@ -72,14 +74,14 @@ func (c *FakeLimitRanges) List(opts v1.ListOptions) (result *corev1.LimitRangeLi } // Watch returns a watch.Interface that watches the requested limitRanges. -func (c *FakeLimitRanges) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeLimitRanges) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(limitrangesResource, c.ns, opts)) } // Create takes the representation of a limitRange and creates it. Returns the server's representation of the limitRange, and an error, if there is any. -func (c *FakeLimitRanges) Create(limitRange *corev1.LimitRange) (result *corev1.LimitRange, err error) { +func (c *FakeLimitRanges) Create(ctx context.Context, limitRange *corev1.LimitRange, opts v1.CreateOptions) (result *corev1.LimitRange, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(limitrangesResource, c.ns, limitRange), &corev1.LimitRange{}) @@ -90,7 +92,7 @@ func (c *FakeLimitRanges) Create(limitRange *corev1.LimitRange) (result *corev1. } // Update takes the representation of a limitRange and updates it. Returns the server's representation of the limitRange, and an error, if there is any. -func (c *FakeLimitRanges) Update(limitRange *corev1.LimitRange) (result *corev1.LimitRange, err error) { +func (c *FakeLimitRanges) Update(ctx context.Context, limitRange *corev1.LimitRange, opts v1.UpdateOptions) (result *corev1.LimitRange, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(limitrangesResource, c.ns, limitRange), &corev1.LimitRange{}) @@ -101,7 +103,7 @@ func (c *FakeLimitRanges) Update(limitRange *corev1.LimitRange) (result *corev1. } // Delete takes name of the limitRange and deletes it. Returns an error if one occurs. -func (c *FakeLimitRanges) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeLimitRanges) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewDeleteAction(limitrangesResource, c.ns, name), &corev1.LimitRange{}) @@ -109,15 +111,15 @@ func (c *FakeLimitRanges) Delete(name string, options *v1.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *FakeLimitRanges) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(limitrangesResource, c.ns, listOptions) +func (c *FakeLimitRanges) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(limitrangesResource, c.ns, listOpts) _, err := c.Fake.Invokes(action, &corev1.LimitRangeList{}) return err } // Patch applies the patch and returns the patched limitRange. -func (c *FakeLimitRanges) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *corev1.LimitRange, err error) { +func (c *FakeLimitRanges) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *corev1.LimitRange, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(limitrangesResource, c.ns, name, pt, data, subresources...), &corev1.LimitRange{}) diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_namespace.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_namespace.go index 21387b5e25..efb9375803 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_namespace.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_namespace.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + corev1 "k8s.io/api/core/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" @@ -38,7 +40,7 @@ var namespacesResource = schema.GroupVersionResource{Group: "", Version: "v1", R var namespacesKind = schema.GroupVersionKind{Group: "", Version: "v1", Kind: "Namespace"} // Get takes name of the namespace, and returns the corresponding namespace object, and an error if there is any. -func (c *FakeNamespaces) Get(name string, options v1.GetOptions) (result *corev1.Namespace, err error) { +func (c *FakeNamespaces) Get(ctx context.Context, name string, options v1.GetOptions) (result *corev1.Namespace, err error) { obj, err := c.Fake. Invokes(testing.NewRootGetAction(namespacesResource, name), &corev1.Namespace{}) if obj == nil { @@ -48,7 +50,7 @@ func (c *FakeNamespaces) Get(name string, options v1.GetOptions) (result *corev1 } // List takes label and field selectors, and returns the list of Namespaces that match those selectors. -func (c *FakeNamespaces) List(opts v1.ListOptions) (result *corev1.NamespaceList, err error) { +func (c *FakeNamespaces) List(ctx context.Context, opts v1.ListOptions) (result *corev1.NamespaceList, err error) { obj, err := c.Fake. Invokes(testing.NewRootListAction(namespacesResource, namespacesKind, opts), &corev1.NamespaceList{}) if obj == nil { @@ -69,13 +71,13 @@ func (c *FakeNamespaces) List(opts v1.ListOptions) (result *corev1.NamespaceList } // Watch returns a watch.Interface that watches the requested namespaces. -func (c *FakeNamespaces) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeNamespaces) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewRootWatchAction(namespacesResource, opts)) } // Create takes the representation of a namespace and creates it. Returns the server's representation of the namespace, and an error, if there is any. -func (c *FakeNamespaces) Create(namespace *corev1.Namespace) (result *corev1.Namespace, err error) { +func (c *FakeNamespaces) Create(ctx context.Context, namespace *corev1.Namespace, opts v1.CreateOptions) (result *corev1.Namespace, err error) { obj, err := c.Fake. Invokes(testing.NewRootCreateAction(namespacesResource, namespace), &corev1.Namespace{}) if obj == nil { @@ -85,7 +87,7 @@ func (c *FakeNamespaces) Create(namespace *corev1.Namespace) (result *corev1.Nam } // Update takes the representation of a namespace and updates it. Returns the server's representation of the namespace, and an error, if there is any. -func (c *FakeNamespaces) Update(namespace *corev1.Namespace) (result *corev1.Namespace, err error) { +func (c *FakeNamespaces) Update(ctx context.Context, namespace *corev1.Namespace, opts v1.UpdateOptions) (result *corev1.Namespace, err error) { obj, err := c.Fake. Invokes(testing.NewRootUpdateAction(namespacesResource, namespace), &corev1.Namespace{}) if obj == nil { @@ -96,7 +98,7 @@ func (c *FakeNamespaces) Update(namespace *corev1.Namespace) (result *corev1.Nam // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeNamespaces) UpdateStatus(namespace *corev1.Namespace) (*corev1.Namespace, error) { +func (c *FakeNamespaces) UpdateStatus(ctx context.Context, namespace *corev1.Namespace, opts v1.UpdateOptions) (*corev1.Namespace, error) { obj, err := c.Fake. Invokes(testing.NewRootUpdateSubresourceAction(namespacesResource, "status", namespace), &corev1.Namespace{}) if obj == nil { @@ -106,14 +108,14 @@ func (c *FakeNamespaces) UpdateStatus(namespace *corev1.Namespace) (*corev1.Name } // Delete takes name of the namespace and deletes it. Returns an error if one occurs. -func (c *FakeNamespaces) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeNamespaces) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewRootDeleteAction(namespacesResource, name), &corev1.Namespace{}) return err } // Patch applies the patch and returns the patched namespace. -func (c *FakeNamespaces) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *corev1.Namespace, err error) { +func (c *FakeNamespaces) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *corev1.Namespace, err error) { obj, err := c.Fake. Invokes(testing.NewRootPatchSubresourceAction(namespacesResource, name, pt, data, subresources...), &corev1.Namespace{}) if obj == nil { diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_namespace_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_namespace_expansion.go index a0eae34904..d86b328a4d 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_namespace_expansion.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_namespace_expansion.go @@ -17,11 +17,14 @@ limitations under the License. package fake import ( + "context" + "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" core "k8s.io/client-go/testing" ) -func (c *FakeNamespaces) Finalize(namespace *v1.Namespace) (*v1.Namespace, error) { +func (c *FakeNamespaces) Finalize(ctx context.Context, namespace *v1.Namespace, opts metav1.UpdateOptions) (*v1.Namespace, error) { action := core.CreateActionImpl{} action.Verb = "create" action.Resource = namespacesResource diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_node.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_node.go index bcde116a4e..47c3a21686 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_node.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_node.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + corev1 "k8s.io/api/core/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" @@ -38,7 +40,7 @@ var nodesResource = schema.GroupVersionResource{Group: "", Version: "v1", Resour var nodesKind = schema.GroupVersionKind{Group: "", Version: "v1", Kind: "Node"} // Get takes name of the node, and returns the corresponding node object, and an error if there is any. -func (c *FakeNodes) Get(name string, options v1.GetOptions) (result *corev1.Node, err error) { +func (c *FakeNodes) Get(ctx context.Context, name string, options v1.GetOptions) (result *corev1.Node, err error) { obj, err := c.Fake. Invokes(testing.NewRootGetAction(nodesResource, name), &corev1.Node{}) if obj == nil { @@ -48,7 +50,7 @@ func (c *FakeNodes) Get(name string, options v1.GetOptions) (result *corev1.Node } // List takes label and field selectors, and returns the list of Nodes that match those selectors. -func (c *FakeNodes) List(opts v1.ListOptions) (result *corev1.NodeList, err error) { +func (c *FakeNodes) List(ctx context.Context, opts v1.ListOptions) (result *corev1.NodeList, err error) { obj, err := c.Fake. Invokes(testing.NewRootListAction(nodesResource, nodesKind, opts), &corev1.NodeList{}) if obj == nil { @@ -69,13 +71,13 @@ func (c *FakeNodes) List(opts v1.ListOptions) (result *corev1.NodeList, err erro } // Watch returns a watch.Interface that watches the requested nodes. -func (c *FakeNodes) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeNodes) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewRootWatchAction(nodesResource, opts)) } // Create takes the representation of a node and creates it. Returns the server's representation of the node, and an error, if there is any. -func (c *FakeNodes) Create(node *corev1.Node) (result *corev1.Node, err error) { +func (c *FakeNodes) Create(ctx context.Context, node *corev1.Node, opts v1.CreateOptions) (result *corev1.Node, err error) { obj, err := c.Fake. Invokes(testing.NewRootCreateAction(nodesResource, node), &corev1.Node{}) if obj == nil { @@ -85,7 +87,7 @@ func (c *FakeNodes) Create(node *corev1.Node) (result *corev1.Node, err error) { } // Update takes the representation of a node and updates it. Returns the server's representation of the node, and an error, if there is any. -func (c *FakeNodes) Update(node *corev1.Node) (result *corev1.Node, err error) { +func (c *FakeNodes) Update(ctx context.Context, node *corev1.Node, opts v1.UpdateOptions) (result *corev1.Node, err error) { obj, err := c.Fake. Invokes(testing.NewRootUpdateAction(nodesResource, node), &corev1.Node{}) if obj == nil { @@ -96,7 +98,7 @@ func (c *FakeNodes) Update(node *corev1.Node) (result *corev1.Node, err error) { // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeNodes) UpdateStatus(node *corev1.Node) (*corev1.Node, error) { +func (c *FakeNodes) UpdateStatus(ctx context.Context, node *corev1.Node, opts v1.UpdateOptions) (*corev1.Node, error) { obj, err := c.Fake. Invokes(testing.NewRootUpdateSubresourceAction(nodesResource, "status", node), &corev1.Node{}) if obj == nil { @@ -106,22 +108,22 @@ func (c *FakeNodes) UpdateStatus(node *corev1.Node) (*corev1.Node, error) { } // Delete takes name of the node and deletes it. Returns an error if one occurs. -func (c *FakeNodes) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeNodes) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewRootDeleteAction(nodesResource, name), &corev1.Node{}) return err } // DeleteCollection deletes a collection of objects. -func (c *FakeNodes) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewRootDeleteCollectionAction(nodesResource, listOptions) +func (c *FakeNodes) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(nodesResource, listOpts) _, err := c.Fake.Invokes(action, &corev1.NodeList{}) return err } // Patch applies the patch and returns the patched node. -func (c *FakeNodes) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *corev1.Node, err error) { +func (c *FakeNodes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *corev1.Node, err error) { obj, err := c.Fake. Invokes(testing.NewRootPatchSubresourceAction(nodesResource, name, pt, data, subresources...), &corev1.Node{}) if obj == nil { diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_node_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_node_expansion.go index a39022c83f..eccf9fec63 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_node_expansion.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_node_expansion.go @@ -17,13 +17,15 @@ limitations under the License. package fake import ( - "k8s.io/api/core/v1" + "context" + + v1 "k8s.io/api/core/v1" types "k8s.io/apimachinery/pkg/types" core "k8s.io/client-go/testing" ) // TODO: Should take a PatchType as an argument probably. -func (c *FakeNodes) PatchStatus(nodeName string, data []byte) (*v1.Node, error) { +func (c *FakeNodes) PatchStatus(_ context.Context, nodeName string, data []byte) (*v1.Node, error) { // TODO: Should be configurable to support additional patch strategies. pt := types.StrategicMergePatchType obj, err := c.Fake.Invokes( diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_persistentvolume.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_persistentvolume.go index 843f323075..94e093073d 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_persistentvolume.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_persistentvolume.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + corev1 "k8s.io/api/core/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" @@ -38,7 +40,7 @@ var persistentvolumesResource = schema.GroupVersionResource{Group: "", Version: var persistentvolumesKind = schema.GroupVersionKind{Group: "", Version: "v1", Kind: "PersistentVolume"} // Get takes name of the persistentVolume, and returns the corresponding persistentVolume object, and an error if there is any. -func (c *FakePersistentVolumes) Get(name string, options v1.GetOptions) (result *corev1.PersistentVolume, err error) { +func (c *FakePersistentVolumes) Get(ctx context.Context, name string, options v1.GetOptions) (result *corev1.PersistentVolume, err error) { obj, err := c.Fake. Invokes(testing.NewRootGetAction(persistentvolumesResource, name), &corev1.PersistentVolume{}) if obj == nil { @@ -48,7 +50,7 @@ func (c *FakePersistentVolumes) Get(name string, options v1.GetOptions) (result } // List takes label and field selectors, and returns the list of PersistentVolumes that match those selectors. -func (c *FakePersistentVolumes) List(opts v1.ListOptions) (result *corev1.PersistentVolumeList, err error) { +func (c *FakePersistentVolumes) List(ctx context.Context, opts v1.ListOptions) (result *corev1.PersistentVolumeList, err error) { obj, err := c.Fake. Invokes(testing.NewRootListAction(persistentvolumesResource, persistentvolumesKind, opts), &corev1.PersistentVolumeList{}) if obj == nil { @@ -69,13 +71,13 @@ func (c *FakePersistentVolumes) List(opts v1.ListOptions) (result *corev1.Persis } // Watch returns a watch.Interface that watches the requested persistentVolumes. -func (c *FakePersistentVolumes) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakePersistentVolumes) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewRootWatchAction(persistentvolumesResource, opts)) } // Create takes the representation of a persistentVolume and creates it. Returns the server's representation of the persistentVolume, and an error, if there is any. -func (c *FakePersistentVolumes) Create(persistentVolume *corev1.PersistentVolume) (result *corev1.PersistentVolume, err error) { +func (c *FakePersistentVolumes) Create(ctx context.Context, persistentVolume *corev1.PersistentVolume, opts v1.CreateOptions) (result *corev1.PersistentVolume, err error) { obj, err := c.Fake. Invokes(testing.NewRootCreateAction(persistentvolumesResource, persistentVolume), &corev1.PersistentVolume{}) if obj == nil { @@ -85,7 +87,7 @@ func (c *FakePersistentVolumes) Create(persistentVolume *corev1.PersistentVolume } // Update takes the representation of a persistentVolume and updates it. Returns the server's representation of the persistentVolume, and an error, if there is any. -func (c *FakePersistentVolumes) Update(persistentVolume *corev1.PersistentVolume) (result *corev1.PersistentVolume, err error) { +func (c *FakePersistentVolumes) Update(ctx context.Context, persistentVolume *corev1.PersistentVolume, opts v1.UpdateOptions) (result *corev1.PersistentVolume, err error) { obj, err := c.Fake. Invokes(testing.NewRootUpdateAction(persistentvolumesResource, persistentVolume), &corev1.PersistentVolume{}) if obj == nil { @@ -96,7 +98,7 @@ func (c *FakePersistentVolumes) Update(persistentVolume *corev1.PersistentVolume // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakePersistentVolumes) UpdateStatus(persistentVolume *corev1.PersistentVolume) (*corev1.PersistentVolume, error) { +func (c *FakePersistentVolumes) UpdateStatus(ctx context.Context, persistentVolume *corev1.PersistentVolume, opts v1.UpdateOptions) (*corev1.PersistentVolume, error) { obj, err := c.Fake. Invokes(testing.NewRootUpdateSubresourceAction(persistentvolumesResource, "status", persistentVolume), &corev1.PersistentVolume{}) if obj == nil { @@ -106,22 +108,22 @@ func (c *FakePersistentVolumes) UpdateStatus(persistentVolume *corev1.Persistent } // Delete takes name of the persistentVolume and deletes it. Returns an error if one occurs. -func (c *FakePersistentVolumes) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakePersistentVolumes) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewRootDeleteAction(persistentvolumesResource, name), &corev1.PersistentVolume{}) return err } // DeleteCollection deletes a collection of objects. -func (c *FakePersistentVolumes) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewRootDeleteCollectionAction(persistentvolumesResource, listOptions) +func (c *FakePersistentVolumes) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(persistentvolumesResource, listOpts) _, err := c.Fake.Invokes(action, &corev1.PersistentVolumeList{}) return err } // Patch applies the patch and returns the patched persistentVolume. -func (c *FakePersistentVolumes) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *corev1.PersistentVolume, err error) { +func (c *FakePersistentVolumes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *corev1.PersistentVolume, err error) { obj, err := c.Fake. Invokes(testing.NewRootPatchSubresourceAction(persistentvolumesResource, name, pt, data, subresources...), &corev1.PersistentVolume{}) if obj == nil { diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_persistentvolumeclaim.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_persistentvolumeclaim.go index d2557c4c83..7b9a38da0e 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_persistentvolumeclaim.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_persistentvolumeclaim.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + corev1 "k8s.io/api/core/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" @@ -39,7 +41,7 @@ var persistentvolumeclaimsResource = schema.GroupVersionResource{Group: "", Vers var persistentvolumeclaimsKind = schema.GroupVersionKind{Group: "", Version: "v1", Kind: "PersistentVolumeClaim"} // Get takes name of the persistentVolumeClaim, and returns the corresponding persistentVolumeClaim object, and an error if there is any. -func (c *FakePersistentVolumeClaims) Get(name string, options v1.GetOptions) (result *corev1.PersistentVolumeClaim, err error) { +func (c *FakePersistentVolumeClaims) Get(ctx context.Context, name string, options v1.GetOptions) (result *corev1.PersistentVolumeClaim, err error) { obj, err := c.Fake. Invokes(testing.NewGetAction(persistentvolumeclaimsResource, c.ns, name), &corev1.PersistentVolumeClaim{}) @@ -50,7 +52,7 @@ func (c *FakePersistentVolumeClaims) Get(name string, options v1.GetOptions) (re } // List takes label and field selectors, and returns the list of PersistentVolumeClaims that match those selectors. -func (c *FakePersistentVolumeClaims) List(opts v1.ListOptions) (result *corev1.PersistentVolumeClaimList, err error) { +func (c *FakePersistentVolumeClaims) List(ctx context.Context, opts v1.ListOptions) (result *corev1.PersistentVolumeClaimList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(persistentvolumeclaimsResource, persistentvolumeclaimsKind, c.ns, opts), &corev1.PersistentVolumeClaimList{}) @@ -72,14 +74,14 @@ func (c *FakePersistentVolumeClaims) List(opts v1.ListOptions) (result *corev1.P } // Watch returns a watch.Interface that watches the requested persistentVolumeClaims. -func (c *FakePersistentVolumeClaims) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakePersistentVolumeClaims) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(persistentvolumeclaimsResource, c.ns, opts)) } // Create takes the representation of a persistentVolumeClaim and creates it. Returns the server's representation of the persistentVolumeClaim, and an error, if there is any. -func (c *FakePersistentVolumeClaims) Create(persistentVolumeClaim *corev1.PersistentVolumeClaim) (result *corev1.PersistentVolumeClaim, err error) { +func (c *FakePersistentVolumeClaims) Create(ctx context.Context, persistentVolumeClaim *corev1.PersistentVolumeClaim, opts v1.CreateOptions) (result *corev1.PersistentVolumeClaim, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(persistentvolumeclaimsResource, c.ns, persistentVolumeClaim), &corev1.PersistentVolumeClaim{}) @@ -90,7 +92,7 @@ func (c *FakePersistentVolumeClaims) Create(persistentVolumeClaim *corev1.Persis } // Update takes the representation of a persistentVolumeClaim and updates it. Returns the server's representation of the persistentVolumeClaim, and an error, if there is any. -func (c *FakePersistentVolumeClaims) Update(persistentVolumeClaim *corev1.PersistentVolumeClaim) (result *corev1.PersistentVolumeClaim, err error) { +func (c *FakePersistentVolumeClaims) Update(ctx context.Context, persistentVolumeClaim *corev1.PersistentVolumeClaim, opts v1.UpdateOptions) (result *corev1.PersistentVolumeClaim, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(persistentvolumeclaimsResource, c.ns, persistentVolumeClaim), &corev1.PersistentVolumeClaim{}) @@ -102,7 +104,7 @@ func (c *FakePersistentVolumeClaims) Update(persistentVolumeClaim *corev1.Persis // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakePersistentVolumeClaims) UpdateStatus(persistentVolumeClaim *corev1.PersistentVolumeClaim) (*corev1.PersistentVolumeClaim, error) { +func (c *FakePersistentVolumeClaims) UpdateStatus(ctx context.Context, persistentVolumeClaim *corev1.PersistentVolumeClaim, opts v1.UpdateOptions) (*corev1.PersistentVolumeClaim, error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(persistentvolumeclaimsResource, "status", c.ns, persistentVolumeClaim), &corev1.PersistentVolumeClaim{}) @@ -113,7 +115,7 @@ func (c *FakePersistentVolumeClaims) UpdateStatus(persistentVolumeClaim *corev1. } // Delete takes name of the persistentVolumeClaim and deletes it. Returns an error if one occurs. -func (c *FakePersistentVolumeClaims) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakePersistentVolumeClaims) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewDeleteAction(persistentvolumeclaimsResource, c.ns, name), &corev1.PersistentVolumeClaim{}) @@ -121,15 +123,15 @@ func (c *FakePersistentVolumeClaims) Delete(name string, options *v1.DeleteOptio } // DeleteCollection deletes a collection of objects. -func (c *FakePersistentVolumeClaims) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(persistentvolumeclaimsResource, c.ns, listOptions) +func (c *FakePersistentVolumeClaims) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(persistentvolumeclaimsResource, c.ns, listOpts) _, err := c.Fake.Invokes(action, &corev1.PersistentVolumeClaimList{}) return err } // Patch applies the patch and returns the patched persistentVolumeClaim. -func (c *FakePersistentVolumeClaims) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *corev1.PersistentVolumeClaim, err error) { +func (c *FakePersistentVolumeClaims) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *corev1.PersistentVolumeClaim, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(persistentvolumeclaimsResource, c.ns, name, pt, data, subresources...), &corev1.PersistentVolumeClaim{}) diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_pod.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_pod.go index ebd473ac75..b2f1b15315 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_pod.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_pod.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + corev1 "k8s.io/api/core/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" @@ -39,7 +41,7 @@ var podsResource = schema.GroupVersionResource{Group: "", Version: "v1", Resourc var podsKind = schema.GroupVersionKind{Group: "", Version: "v1", Kind: "Pod"} // Get takes name of the pod, and returns the corresponding pod object, and an error if there is any. -func (c *FakePods) Get(name string, options v1.GetOptions) (result *corev1.Pod, err error) { +func (c *FakePods) Get(ctx context.Context, name string, options v1.GetOptions) (result *corev1.Pod, err error) { obj, err := c.Fake. Invokes(testing.NewGetAction(podsResource, c.ns, name), &corev1.Pod{}) @@ -50,7 +52,7 @@ func (c *FakePods) Get(name string, options v1.GetOptions) (result *corev1.Pod, } // List takes label and field selectors, and returns the list of Pods that match those selectors. -func (c *FakePods) List(opts v1.ListOptions) (result *corev1.PodList, err error) { +func (c *FakePods) List(ctx context.Context, opts v1.ListOptions) (result *corev1.PodList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(podsResource, podsKind, c.ns, opts), &corev1.PodList{}) @@ -72,14 +74,14 @@ func (c *FakePods) List(opts v1.ListOptions) (result *corev1.PodList, err error) } // Watch returns a watch.Interface that watches the requested pods. -func (c *FakePods) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakePods) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(podsResource, c.ns, opts)) } // Create takes the representation of a pod and creates it. Returns the server's representation of the pod, and an error, if there is any. -func (c *FakePods) Create(pod *corev1.Pod) (result *corev1.Pod, err error) { +func (c *FakePods) Create(ctx context.Context, pod *corev1.Pod, opts v1.CreateOptions) (result *corev1.Pod, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(podsResource, c.ns, pod), &corev1.Pod{}) @@ -90,7 +92,7 @@ func (c *FakePods) Create(pod *corev1.Pod) (result *corev1.Pod, err error) { } // Update takes the representation of a pod and updates it. Returns the server's representation of the pod, and an error, if there is any. -func (c *FakePods) Update(pod *corev1.Pod) (result *corev1.Pod, err error) { +func (c *FakePods) Update(ctx context.Context, pod *corev1.Pod, opts v1.UpdateOptions) (result *corev1.Pod, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(podsResource, c.ns, pod), &corev1.Pod{}) @@ -102,7 +104,7 @@ func (c *FakePods) Update(pod *corev1.Pod) (result *corev1.Pod, err error) { // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakePods) UpdateStatus(pod *corev1.Pod) (*corev1.Pod, error) { +func (c *FakePods) UpdateStatus(ctx context.Context, pod *corev1.Pod, opts v1.UpdateOptions) (*corev1.Pod, error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(podsResource, "status", c.ns, pod), &corev1.Pod{}) @@ -113,7 +115,7 @@ func (c *FakePods) UpdateStatus(pod *corev1.Pod) (*corev1.Pod, error) { } // Delete takes name of the pod and deletes it. Returns an error if one occurs. -func (c *FakePods) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakePods) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewDeleteAction(podsResource, c.ns, name), &corev1.Pod{}) @@ -121,15 +123,15 @@ func (c *FakePods) Delete(name string, options *v1.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *FakePods) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(podsResource, c.ns, listOptions) +func (c *FakePods) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(podsResource, c.ns, listOpts) _, err := c.Fake.Invokes(action, &corev1.PodList{}) return err } // Patch applies the patch and returns the patched pod. -func (c *FakePods) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *corev1.Pod, err error) { +func (c *FakePods) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *corev1.Pod, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(podsResource, c.ns, name, pt, data, subresources...), &corev1.Pod{}) @@ -140,7 +142,7 @@ func (c *FakePods) Patch(name string, pt types.PatchType, data []byte, subresour } // GetEphemeralContainers takes name of the pod, and returns the corresponding ephemeralContainers object, and an error if there is any. -func (c *FakePods) GetEphemeralContainers(podName string, options v1.GetOptions) (result *corev1.EphemeralContainers, err error) { +func (c *FakePods) GetEphemeralContainers(ctx context.Context, podName string, options v1.GetOptions) (result *corev1.EphemeralContainers, err error) { obj, err := c.Fake. Invokes(testing.NewGetSubresourceAction(podsResource, c.ns, "ephemeralcontainers", podName), &corev1.EphemeralContainers{}) @@ -151,7 +153,7 @@ func (c *FakePods) GetEphemeralContainers(podName string, options v1.GetOptions) } // UpdateEphemeralContainers takes the representation of a ephemeralContainers and updates it. Returns the server's representation of the ephemeralContainers, and an error, if there is any. -func (c *FakePods) UpdateEphemeralContainers(podName string, ephemeralContainers *corev1.EphemeralContainers) (result *corev1.EphemeralContainers, err error) { +func (c *FakePods) UpdateEphemeralContainers(ctx context.Context, podName string, ephemeralContainers *corev1.EphemeralContainers, opts v1.UpdateOptions) (result *corev1.EphemeralContainers, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(podsResource, "ephemeralcontainers", c.ns, ephemeralContainers), &corev1.EphemeralContainers{}) diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_pod_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_pod_expansion.go index b35d8aaa5f..a95fdb21d6 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_pod_expansion.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_pod_expansion.go @@ -17,13 +17,16 @@ limitations under the License. package fake import ( + "context" + "k8s.io/api/core/v1" policy "k8s.io/api/policy/v1beta1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" restclient "k8s.io/client-go/rest" core "k8s.io/client-go/testing" ) -func (c *FakePods) Bind(binding *v1.Binding) error { +func (c *FakePods) Bind(ctx context.Context, binding *v1.Binding, opts metav1.CreateOptions) error { action := core.CreateActionImpl{} action.Verb = "create" action.Namespace = binding.Namespace @@ -57,7 +60,7 @@ func (c *FakePods) GetLogs(name string, opts *v1.PodLogOptions) *restclient.Requ return &restclient.Request{} } -func (c *FakePods) Evict(eviction *policy.Eviction) error { +func (c *FakePods) Evict(ctx context.Context, eviction *policy.Eviction) error { action := core.CreateActionImpl{} action.Verb = "create" action.Namespace = c.ns diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_podtemplate.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_podtemplate.go index 307f30594e..579fe1c7a7 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_podtemplate.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_podtemplate.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + corev1 "k8s.io/api/core/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" @@ -39,7 +41,7 @@ var podtemplatesResource = schema.GroupVersionResource{Group: "", Version: "v1", var podtemplatesKind = schema.GroupVersionKind{Group: "", Version: "v1", Kind: "PodTemplate"} // Get takes name of the podTemplate, and returns the corresponding podTemplate object, and an error if there is any. -func (c *FakePodTemplates) Get(name string, options v1.GetOptions) (result *corev1.PodTemplate, err error) { +func (c *FakePodTemplates) Get(ctx context.Context, name string, options v1.GetOptions) (result *corev1.PodTemplate, err error) { obj, err := c.Fake. Invokes(testing.NewGetAction(podtemplatesResource, c.ns, name), &corev1.PodTemplate{}) @@ -50,7 +52,7 @@ func (c *FakePodTemplates) Get(name string, options v1.GetOptions) (result *core } // List takes label and field selectors, and returns the list of PodTemplates that match those selectors. -func (c *FakePodTemplates) List(opts v1.ListOptions) (result *corev1.PodTemplateList, err error) { +func (c *FakePodTemplates) List(ctx context.Context, opts v1.ListOptions) (result *corev1.PodTemplateList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(podtemplatesResource, podtemplatesKind, c.ns, opts), &corev1.PodTemplateList{}) @@ -72,14 +74,14 @@ func (c *FakePodTemplates) List(opts v1.ListOptions) (result *corev1.PodTemplate } // Watch returns a watch.Interface that watches the requested podTemplates. -func (c *FakePodTemplates) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakePodTemplates) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(podtemplatesResource, c.ns, opts)) } // Create takes the representation of a podTemplate and creates it. Returns the server's representation of the podTemplate, and an error, if there is any. -func (c *FakePodTemplates) Create(podTemplate *corev1.PodTemplate) (result *corev1.PodTemplate, err error) { +func (c *FakePodTemplates) Create(ctx context.Context, podTemplate *corev1.PodTemplate, opts v1.CreateOptions) (result *corev1.PodTemplate, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(podtemplatesResource, c.ns, podTemplate), &corev1.PodTemplate{}) @@ -90,7 +92,7 @@ func (c *FakePodTemplates) Create(podTemplate *corev1.PodTemplate) (result *core } // Update takes the representation of a podTemplate and updates it. Returns the server's representation of the podTemplate, and an error, if there is any. -func (c *FakePodTemplates) Update(podTemplate *corev1.PodTemplate) (result *corev1.PodTemplate, err error) { +func (c *FakePodTemplates) Update(ctx context.Context, podTemplate *corev1.PodTemplate, opts v1.UpdateOptions) (result *corev1.PodTemplate, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(podtemplatesResource, c.ns, podTemplate), &corev1.PodTemplate{}) @@ -101,7 +103,7 @@ func (c *FakePodTemplates) Update(podTemplate *corev1.PodTemplate) (result *core } // Delete takes name of the podTemplate and deletes it. Returns an error if one occurs. -func (c *FakePodTemplates) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakePodTemplates) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewDeleteAction(podtemplatesResource, c.ns, name), &corev1.PodTemplate{}) @@ -109,15 +111,15 @@ func (c *FakePodTemplates) Delete(name string, options *v1.DeleteOptions) error } // DeleteCollection deletes a collection of objects. -func (c *FakePodTemplates) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(podtemplatesResource, c.ns, listOptions) +func (c *FakePodTemplates) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(podtemplatesResource, c.ns, listOpts) _, err := c.Fake.Invokes(action, &corev1.PodTemplateList{}) return err } // Patch applies the patch and returns the patched podTemplate. -func (c *FakePodTemplates) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *corev1.PodTemplate, err error) { +func (c *FakePodTemplates) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *corev1.PodTemplate, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(podtemplatesResource, c.ns, name, pt, data, subresources...), &corev1.PodTemplate{}) diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_replicationcontroller.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_replicationcontroller.go index 6de94c1482..3fa03a0763 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_replicationcontroller.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_replicationcontroller.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + autoscalingv1 "k8s.io/api/autoscaling/v1" corev1 "k8s.io/api/core/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -40,7 +42,7 @@ var replicationcontrollersResource = schema.GroupVersionResource{Group: "", Vers var replicationcontrollersKind = schema.GroupVersionKind{Group: "", Version: "v1", Kind: "ReplicationController"} // Get takes name of the replicationController, and returns the corresponding replicationController object, and an error if there is any. -func (c *FakeReplicationControllers) Get(name string, options v1.GetOptions) (result *corev1.ReplicationController, err error) { +func (c *FakeReplicationControllers) Get(ctx context.Context, name string, options v1.GetOptions) (result *corev1.ReplicationController, err error) { obj, err := c.Fake. Invokes(testing.NewGetAction(replicationcontrollersResource, c.ns, name), &corev1.ReplicationController{}) @@ -51,7 +53,7 @@ func (c *FakeReplicationControllers) Get(name string, options v1.GetOptions) (re } // List takes label and field selectors, and returns the list of ReplicationControllers that match those selectors. -func (c *FakeReplicationControllers) List(opts v1.ListOptions) (result *corev1.ReplicationControllerList, err error) { +func (c *FakeReplicationControllers) List(ctx context.Context, opts v1.ListOptions) (result *corev1.ReplicationControllerList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(replicationcontrollersResource, replicationcontrollersKind, c.ns, opts), &corev1.ReplicationControllerList{}) @@ -73,14 +75,14 @@ func (c *FakeReplicationControllers) List(opts v1.ListOptions) (result *corev1.R } // Watch returns a watch.Interface that watches the requested replicationControllers. -func (c *FakeReplicationControllers) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeReplicationControllers) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(replicationcontrollersResource, c.ns, opts)) } // Create takes the representation of a replicationController and creates it. Returns the server's representation of the replicationController, and an error, if there is any. -func (c *FakeReplicationControllers) Create(replicationController *corev1.ReplicationController) (result *corev1.ReplicationController, err error) { +func (c *FakeReplicationControllers) Create(ctx context.Context, replicationController *corev1.ReplicationController, opts v1.CreateOptions) (result *corev1.ReplicationController, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(replicationcontrollersResource, c.ns, replicationController), &corev1.ReplicationController{}) @@ -91,7 +93,7 @@ func (c *FakeReplicationControllers) Create(replicationController *corev1.Replic } // Update takes the representation of a replicationController and updates it. Returns the server's representation of the replicationController, and an error, if there is any. -func (c *FakeReplicationControllers) Update(replicationController *corev1.ReplicationController) (result *corev1.ReplicationController, err error) { +func (c *FakeReplicationControllers) Update(ctx context.Context, replicationController *corev1.ReplicationController, opts v1.UpdateOptions) (result *corev1.ReplicationController, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(replicationcontrollersResource, c.ns, replicationController), &corev1.ReplicationController{}) @@ -103,7 +105,7 @@ func (c *FakeReplicationControllers) Update(replicationController *corev1.Replic // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeReplicationControllers) UpdateStatus(replicationController *corev1.ReplicationController) (*corev1.ReplicationController, error) { +func (c *FakeReplicationControllers) UpdateStatus(ctx context.Context, replicationController *corev1.ReplicationController, opts v1.UpdateOptions) (*corev1.ReplicationController, error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(replicationcontrollersResource, "status", c.ns, replicationController), &corev1.ReplicationController{}) @@ -114,7 +116,7 @@ func (c *FakeReplicationControllers) UpdateStatus(replicationController *corev1. } // Delete takes name of the replicationController and deletes it. Returns an error if one occurs. -func (c *FakeReplicationControllers) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeReplicationControllers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewDeleteAction(replicationcontrollersResource, c.ns, name), &corev1.ReplicationController{}) @@ -122,15 +124,15 @@ func (c *FakeReplicationControllers) Delete(name string, options *v1.DeleteOptio } // DeleteCollection deletes a collection of objects. -func (c *FakeReplicationControllers) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(replicationcontrollersResource, c.ns, listOptions) +func (c *FakeReplicationControllers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(replicationcontrollersResource, c.ns, listOpts) _, err := c.Fake.Invokes(action, &corev1.ReplicationControllerList{}) return err } // Patch applies the patch and returns the patched replicationController. -func (c *FakeReplicationControllers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *corev1.ReplicationController, err error) { +func (c *FakeReplicationControllers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *corev1.ReplicationController, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(replicationcontrollersResource, c.ns, name, pt, data, subresources...), &corev1.ReplicationController{}) @@ -141,7 +143,7 @@ func (c *FakeReplicationControllers) Patch(name string, pt types.PatchType, data } // GetScale takes name of the replicationController, and returns the corresponding scale object, and an error if there is any. -func (c *FakeReplicationControllers) GetScale(replicationControllerName string, options v1.GetOptions) (result *autoscalingv1.Scale, err error) { +func (c *FakeReplicationControllers) GetScale(ctx context.Context, replicationControllerName string, options v1.GetOptions) (result *autoscalingv1.Scale, err error) { obj, err := c.Fake. Invokes(testing.NewGetSubresourceAction(replicationcontrollersResource, c.ns, "scale", replicationControllerName), &autoscalingv1.Scale{}) @@ -152,7 +154,7 @@ func (c *FakeReplicationControllers) GetScale(replicationControllerName string, } // UpdateScale takes the representation of a scale and updates it. Returns the server's representation of the scale, and an error, if there is any. -func (c *FakeReplicationControllers) UpdateScale(replicationControllerName string, scale *autoscalingv1.Scale) (result *autoscalingv1.Scale, err error) { +func (c *FakeReplicationControllers) UpdateScale(ctx context.Context, replicationControllerName string, scale *autoscalingv1.Scale, opts v1.UpdateOptions) (result *autoscalingv1.Scale, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(replicationcontrollersResource, "scale", c.ns, scale), &autoscalingv1.Scale{}) diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_resourcequota.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_resourcequota.go index b521f7120b..f70de30849 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_resourcequota.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_resourcequota.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + corev1 "k8s.io/api/core/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" @@ -39,7 +41,7 @@ var resourcequotasResource = schema.GroupVersionResource{Group: "", Version: "v1 var resourcequotasKind = schema.GroupVersionKind{Group: "", Version: "v1", Kind: "ResourceQuota"} // Get takes name of the resourceQuota, and returns the corresponding resourceQuota object, and an error if there is any. -func (c *FakeResourceQuotas) Get(name string, options v1.GetOptions) (result *corev1.ResourceQuota, err error) { +func (c *FakeResourceQuotas) Get(ctx context.Context, name string, options v1.GetOptions) (result *corev1.ResourceQuota, err error) { obj, err := c.Fake. Invokes(testing.NewGetAction(resourcequotasResource, c.ns, name), &corev1.ResourceQuota{}) @@ -50,7 +52,7 @@ func (c *FakeResourceQuotas) Get(name string, options v1.GetOptions) (result *co } // List takes label and field selectors, and returns the list of ResourceQuotas that match those selectors. -func (c *FakeResourceQuotas) List(opts v1.ListOptions) (result *corev1.ResourceQuotaList, err error) { +func (c *FakeResourceQuotas) List(ctx context.Context, opts v1.ListOptions) (result *corev1.ResourceQuotaList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(resourcequotasResource, resourcequotasKind, c.ns, opts), &corev1.ResourceQuotaList{}) @@ -72,14 +74,14 @@ func (c *FakeResourceQuotas) List(opts v1.ListOptions) (result *corev1.ResourceQ } // Watch returns a watch.Interface that watches the requested resourceQuotas. -func (c *FakeResourceQuotas) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeResourceQuotas) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(resourcequotasResource, c.ns, opts)) } // Create takes the representation of a resourceQuota and creates it. Returns the server's representation of the resourceQuota, and an error, if there is any. -func (c *FakeResourceQuotas) Create(resourceQuota *corev1.ResourceQuota) (result *corev1.ResourceQuota, err error) { +func (c *FakeResourceQuotas) Create(ctx context.Context, resourceQuota *corev1.ResourceQuota, opts v1.CreateOptions) (result *corev1.ResourceQuota, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(resourcequotasResource, c.ns, resourceQuota), &corev1.ResourceQuota{}) @@ -90,7 +92,7 @@ func (c *FakeResourceQuotas) Create(resourceQuota *corev1.ResourceQuota) (result } // Update takes the representation of a resourceQuota and updates it. Returns the server's representation of the resourceQuota, and an error, if there is any. -func (c *FakeResourceQuotas) Update(resourceQuota *corev1.ResourceQuota) (result *corev1.ResourceQuota, err error) { +func (c *FakeResourceQuotas) Update(ctx context.Context, resourceQuota *corev1.ResourceQuota, opts v1.UpdateOptions) (result *corev1.ResourceQuota, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(resourcequotasResource, c.ns, resourceQuota), &corev1.ResourceQuota{}) @@ -102,7 +104,7 @@ func (c *FakeResourceQuotas) Update(resourceQuota *corev1.ResourceQuota) (result // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeResourceQuotas) UpdateStatus(resourceQuota *corev1.ResourceQuota) (*corev1.ResourceQuota, error) { +func (c *FakeResourceQuotas) UpdateStatus(ctx context.Context, resourceQuota *corev1.ResourceQuota, opts v1.UpdateOptions) (*corev1.ResourceQuota, error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(resourcequotasResource, "status", c.ns, resourceQuota), &corev1.ResourceQuota{}) @@ -113,7 +115,7 @@ func (c *FakeResourceQuotas) UpdateStatus(resourceQuota *corev1.ResourceQuota) ( } // Delete takes name of the resourceQuota and deletes it. Returns an error if one occurs. -func (c *FakeResourceQuotas) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeResourceQuotas) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewDeleteAction(resourcequotasResource, c.ns, name), &corev1.ResourceQuota{}) @@ -121,15 +123,15 @@ func (c *FakeResourceQuotas) Delete(name string, options *v1.DeleteOptions) erro } // DeleteCollection deletes a collection of objects. -func (c *FakeResourceQuotas) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(resourcequotasResource, c.ns, listOptions) +func (c *FakeResourceQuotas) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(resourcequotasResource, c.ns, listOpts) _, err := c.Fake.Invokes(action, &corev1.ResourceQuotaList{}) return err } // Patch applies the patch and returns the patched resourceQuota. -func (c *FakeResourceQuotas) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *corev1.ResourceQuota, err error) { +func (c *FakeResourceQuotas) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *corev1.ResourceQuota, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(resourcequotasResource, c.ns, name, pt, data, subresources...), &corev1.ResourceQuota{}) diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_secret.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_secret.go index 47dba9eff4..a92329cfaa 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_secret.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_secret.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + corev1 "k8s.io/api/core/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" @@ -39,7 +41,7 @@ var secretsResource = schema.GroupVersionResource{Group: "", Version: "v1", Reso var secretsKind = schema.GroupVersionKind{Group: "", Version: "v1", Kind: "Secret"} // Get takes name of the secret, and returns the corresponding secret object, and an error if there is any. -func (c *FakeSecrets) Get(name string, options v1.GetOptions) (result *corev1.Secret, err error) { +func (c *FakeSecrets) Get(ctx context.Context, name string, options v1.GetOptions) (result *corev1.Secret, err error) { obj, err := c.Fake. Invokes(testing.NewGetAction(secretsResource, c.ns, name), &corev1.Secret{}) @@ -50,7 +52,7 @@ func (c *FakeSecrets) Get(name string, options v1.GetOptions) (result *corev1.Se } // List takes label and field selectors, and returns the list of Secrets that match those selectors. -func (c *FakeSecrets) List(opts v1.ListOptions) (result *corev1.SecretList, err error) { +func (c *FakeSecrets) List(ctx context.Context, opts v1.ListOptions) (result *corev1.SecretList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(secretsResource, secretsKind, c.ns, opts), &corev1.SecretList{}) @@ -72,14 +74,14 @@ func (c *FakeSecrets) List(opts v1.ListOptions) (result *corev1.SecretList, err } // Watch returns a watch.Interface that watches the requested secrets. -func (c *FakeSecrets) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeSecrets) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(secretsResource, c.ns, opts)) } // Create takes the representation of a secret and creates it. Returns the server's representation of the secret, and an error, if there is any. -func (c *FakeSecrets) Create(secret *corev1.Secret) (result *corev1.Secret, err error) { +func (c *FakeSecrets) Create(ctx context.Context, secret *corev1.Secret, opts v1.CreateOptions) (result *corev1.Secret, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(secretsResource, c.ns, secret), &corev1.Secret{}) @@ -90,7 +92,7 @@ func (c *FakeSecrets) Create(secret *corev1.Secret) (result *corev1.Secret, err } // Update takes the representation of a secret and updates it. Returns the server's representation of the secret, and an error, if there is any. -func (c *FakeSecrets) Update(secret *corev1.Secret) (result *corev1.Secret, err error) { +func (c *FakeSecrets) Update(ctx context.Context, secret *corev1.Secret, opts v1.UpdateOptions) (result *corev1.Secret, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(secretsResource, c.ns, secret), &corev1.Secret{}) @@ -101,7 +103,7 @@ func (c *FakeSecrets) Update(secret *corev1.Secret) (result *corev1.Secret, err } // Delete takes name of the secret and deletes it. Returns an error if one occurs. -func (c *FakeSecrets) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeSecrets) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewDeleteAction(secretsResource, c.ns, name), &corev1.Secret{}) @@ -109,15 +111,15 @@ func (c *FakeSecrets) Delete(name string, options *v1.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *FakeSecrets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(secretsResource, c.ns, listOptions) +func (c *FakeSecrets) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(secretsResource, c.ns, listOpts) _, err := c.Fake.Invokes(action, &corev1.SecretList{}) return err } // Patch applies the patch and returns the patched secret. -func (c *FakeSecrets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *corev1.Secret, err error) { +func (c *FakeSecrets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *corev1.Secret, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(secretsResource, c.ns, name, pt, data, subresources...), &corev1.Secret{}) diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_service.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_service.go index a65de49911..e5391ffb38 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_service.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_service.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + corev1 "k8s.io/api/core/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" @@ -39,7 +41,7 @@ var servicesResource = schema.GroupVersionResource{Group: "", Version: "v1", Res var servicesKind = schema.GroupVersionKind{Group: "", Version: "v1", Kind: "Service"} // Get takes name of the service, and returns the corresponding service object, and an error if there is any. -func (c *FakeServices) Get(name string, options v1.GetOptions) (result *corev1.Service, err error) { +func (c *FakeServices) Get(ctx context.Context, name string, options v1.GetOptions) (result *corev1.Service, err error) { obj, err := c.Fake. Invokes(testing.NewGetAction(servicesResource, c.ns, name), &corev1.Service{}) @@ -50,7 +52,7 @@ func (c *FakeServices) Get(name string, options v1.GetOptions) (result *corev1.S } // List takes label and field selectors, and returns the list of Services that match those selectors. -func (c *FakeServices) List(opts v1.ListOptions) (result *corev1.ServiceList, err error) { +func (c *FakeServices) List(ctx context.Context, opts v1.ListOptions) (result *corev1.ServiceList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(servicesResource, servicesKind, c.ns, opts), &corev1.ServiceList{}) @@ -72,14 +74,14 @@ func (c *FakeServices) List(opts v1.ListOptions) (result *corev1.ServiceList, er } // Watch returns a watch.Interface that watches the requested services. -func (c *FakeServices) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeServices) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(servicesResource, c.ns, opts)) } // Create takes the representation of a service and creates it. Returns the server's representation of the service, and an error, if there is any. -func (c *FakeServices) Create(service *corev1.Service) (result *corev1.Service, err error) { +func (c *FakeServices) Create(ctx context.Context, service *corev1.Service, opts v1.CreateOptions) (result *corev1.Service, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(servicesResource, c.ns, service), &corev1.Service{}) @@ -90,7 +92,7 @@ func (c *FakeServices) Create(service *corev1.Service) (result *corev1.Service, } // Update takes the representation of a service and updates it. Returns the server's representation of the service, and an error, if there is any. -func (c *FakeServices) Update(service *corev1.Service) (result *corev1.Service, err error) { +func (c *FakeServices) Update(ctx context.Context, service *corev1.Service, opts v1.UpdateOptions) (result *corev1.Service, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(servicesResource, c.ns, service), &corev1.Service{}) @@ -102,7 +104,7 @@ func (c *FakeServices) Update(service *corev1.Service) (result *corev1.Service, // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeServices) UpdateStatus(service *corev1.Service) (*corev1.Service, error) { +func (c *FakeServices) UpdateStatus(ctx context.Context, service *corev1.Service, opts v1.UpdateOptions) (*corev1.Service, error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(servicesResource, "status", c.ns, service), &corev1.Service{}) @@ -113,7 +115,7 @@ func (c *FakeServices) UpdateStatus(service *corev1.Service) (*corev1.Service, e } // Delete takes name of the service and deletes it. Returns an error if one occurs. -func (c *FakeServices) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeServices) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewDeleteAction(servicesResource, c.ns, name), &corev1.Service{}) @@ -121,7 +123,7 @@ func (c *FakeServices) Delete(name string, options *v1.DeleteOptions) error { } // Patch applies the patch and returns the patched service. -func (c *FakeServices) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *corev1.Service, err error) { +func (c *FakeServices) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *corev1.Service, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(servicesResource, c.ns, name, pt, data, subresources...), &corev1.Service{}) diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_serviceaccount.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_serviceaccount.go index 5b6d8f8be5..df344b5893 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_serviceaccount.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_serviceaccount.go @@ -19,6 +19,9 @@ limitations under the License. package fake import ( + "context" + + authenticationv1 "k8s.io/api/authentication/v1" corev1 "k8s.io/api/core/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" @@ -39,7 +42,7 @@ var serviceaccountsResource = schema.GroupVersionResource{Group: "", Version: "v var serviceaccountsKind = schema.GroupVersionKind{Group: "", Version: "v1", Kind: "ServiceAccount"} // Get takes name of the serviceAccount, and returns the corresponding serviceAccount object, and an error if there is any. -func (c *FakeServiceAccounts) Get(name string, options v1.GetOptions) (result *corev1.ServiceAccount, err error) { +func (c *FakeServiceAccounts) Get(ctx context.Context, name string, options v1.GetOptions) (result *corev1.ServiceAccount, err error) { obj, err := c.Fake. Invokes(testing.NewGetAction(serviceaccountsResource, c.ns, name), &corev1.ServiceAccount{}) @@ -50,7 +53,7 @@ func (c *FakeServiceAccounts) Get(name string, options v1.GetOptions) (result *c } // List takes label and field selectors, and returns the list of ServiceAccounts that match those selectors. -func (c *FakeServiceAccounts) List(opts v1.ListOptions) (result *corev1.ServiceAccountList, err error) { +func (c *FakeServiceAccounts) List(ctx context.Context, opts v1.ListOptions) (result *corev1.ServiceAccountList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(serviceaccountsResource, serviceaccountsKind, c.ns, opts), &corev1.ServiceAccountList{}) @@ -72,14 +75,14 @@ func (c *FakeServiceAccounts) List(opts v1.ListOptions) (result *corev1.ServiceA } // Watch returns a watch.Interface that watches the requested serviceAccounts. -func (c *FakeServiceAccounts) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeServiceAccounts) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(serviceaccountsResource, c.ns, opts)) } // Create takes the representation of a serviceAccount and creates it. Returns the server's representation of the serviceAccount, and an error, if there is any. -func (c *FakeServiceAccounts) Create(serviceAccount *corev1.ServiceAccount) (result *corev1.ServiceAccount, err error) { +func (c *FakeServiceAccounts) Create(ctx context.Context, serviceAccount *corev1.ServiceAccount, opts v1.CreateOptions) (result *corev1.ServiceAccount, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(serviceaccountsResource, c.ns, serviceAccount), &corev1.ServiceAccount{}) @@ -90,7 +93,7 @@ func (c *FakeServiceAccounts) Create(serviceAccount *corev1.ServiceAccount) (res } // Update takes the representation of a serviceAccount and updates it. Returns the server's representation of the serviceAccount, and an error, if there is any. -func (c *FakeServiceAccounts) Update(serviceAccount *corev1.ServiceAccount) (result *corev1.ServiceAccount, err error) { +func (c *FakeServiceAccounts) Update(ctx context.Context, serviceAccount *corev1.ServiceAccount, opts v1.UpdateOptions) (result *corev1.ServiceAccount, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(serviceaccountsResource, c.ns, serviceAccount), &corev1.ServiceAccount{}) @@ -101,7 +104,7 @@ func (c *FakeServiceAccounts) Update(serviceAccount *corev1.ServiceAccount) (res } // Delete takes name of the serviceAccount and deletes it. Returns an error if one occurs. -func (c *FakeServiceAccounts) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeServiceAccounts) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewDeleteAction(serviceaccountsResource, c.ns, name), &corev1.ServiceAccount{}) @@ -109,15 +112,15 @@ func (c *FakeServiceAccounts) Delete(name string, options *v1.DeleteOptions) err } // DeleteCollection deletes a collection of objects. -func (c *FakeServiceAccounts) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(serviceaccountsResource, c.ns, listOptions) +func (c *FakeServiceAccounts) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(serviceaccountsResource, c.ns, listOpts) _, err := c.Fake.Invokes(action, &corev1.ServiceAccountList{}) return err } // Patch applies the patch and returns the patched serviceAccount. -func (c *FakeServiceAccounts) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *corev1.ServiceAccount, err error) { +func (c *FakeServiceAccounts) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *corev1.ServiceAccount, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(serviceaccountsResource, c.ns, name, pt, data, subresources...), &corev1.ServiceAccount{}) @@ -126,3 +129,14 @@ func (c *FakeServiceAccounts) Patch(name string, pt types.PatchType, data []byte } return obj.(*corev1.ServiceAccount), err } + +// CreateToken takes the representation of a tokenRequest and creates it. Returns the server's representation of the tokenRequest, and an error, if there is any. +func (c *FakeServiceAccounts) CreateToken(ctx context.Context, serviceAccountName string, tokenRequest *authenticationv1.TokenRequest, opts v1.CreateOptions) (result *authenticationv1.TokenRequest, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateSubresourceAction(serviceaccountsResource, serviceAccountName, "token", c.ns, tokenRequest), &authenticationv1.TokenRequest{}) + + if obj == nil { + return nil, err + } + return obj.(*authenticationv1.TokenRequest), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_serviceaccount_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_serviceaccount_expansion.go deleted file mode 100644 index a0efbcc2fe..0000000000 --- a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_serviceaccount_expansion.go +++ /dev/null @@ -1,31 +0,0 @@ -/* -Copyright 2018 The Kubernetes 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. -*/ - -package fake - -import ( - authenticationv1 "k8s.io/api/authentication/v1" - core "k8s.io/client-go/testing" -) - -func (c *FakeServiceAccounts) CreateToken(name string, tr *authenticationv1.TokenRequest) (*authenticationv1.TokenRequest, error) { - obj, err := c.Fake.Invokes(core.NewCreateSubresourceAction(serviceaccountsResource, name, "token", c.ns, tr), &authenticationv1.TokenRequest{}) - - if obj == nil { - return nil, err - } - return obj.(*authenticationv1.TokenRequest), err -} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/generated_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/generated_expansion.go index 6e8591b12b..2cb81aa40b 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/generated_expansion.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/generated_expansion.go @@ -37,3 +37,5 @@ type ReplicationControllerExpansion interface{} type ResourceQuotaExpansion interface{} type SecretExpansion interface{} + +type ServiceAccountExpansion interface{} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/limitrange.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/limitrange.go index 2eeae11a83..7031cd77ed 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/limitrange.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/limitrange.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" "time" v1 "k8s.io/api/core/v1" @@ -37,14 +38,14 @@ type LimitRangesGetter interface { // LimitRangeInterface has methods to work with LimitRange resources. type LimitRangeInterface interface { - Create(*v1.LimitRange) (*v1.LimitRange, error) - Update(*v1.LimitRange) (*v1.LimitRange, error) - Delete(name string, options *metav1.DeleteOptions) error - DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error - Get(name string, options metav1.GetOptions) (*v1.LimitRange, error) - List(opts metav1.ListOptions) (*v1.LimitRangeList, error) - Watch(opts metav1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.LimitRange, err error) + Create(ctx context.Context, limitRange *v1.LimitRange, opts metav1.CreateOptions) (*v1.LimitRange, error) + Update(ctx context.Context, limitRange *v1.LimitRange, opts metav1.UpdateOptions) (*v1.LimitRange, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.LimitRange, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.LimitRangeList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.LimitRange, err error) LimitRangeExpansion } @@ -63,20 +64,20 @@ func newLimitRanges(c *CoreV1Client, namespace string) *limitRanges { } // Get takes name of the limitRange, and returns the corresponding limitRange object, and an error if there is any. -func (c *limitRanges) Get(name string, options metav1.GetOptions) (result *v1.LimitRange, err error) { +func (c *limitRanges) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.LimitRange, err error) { result = &v1.LimitRange{} err = c.client.Get(). Namespace(c.ns). Resource("limitranges"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of LimitRanges that match those selectors. -func (c *limitRanges) List(opts metav1.ListOptions) (result *v1.LimitRangeList, err error) { +func (c *limitRanges) List(ctx context.Context, opts metav1.ListOptions) (result *v1.LimitRangeList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -87,13 +88,13 @@ func (c *limitRanges) List(opts metav1.ListOptions) (result *v1.LimitRangeList, Resource("limitranges"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested limitRanges. -func (c *limitRanges) Watch(opts metav1.ListOptions) (watch.Interface, error) { +func (c *limitRanges) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -104,71 +105,74 @@ func (c *limitRanges) Watch(opts metav1.ListOptions) (watch.Interface, error) { Resource("limitranges"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a limitRange and creates it. Returns the server's representation of the limitRange, and an error, if there is any. -func (c *limitRanges) Create(limitRange *v1.LimitRange) (result *v1.LimitRange, err error) { +func (c *limitRanges) Create(ctx context.Context, limitRange *v1.LimitRange, opts metav1.CreateOptions) (result *v1.LimitRange, err error) { result = &v1.LimitRange{} err = c.client.Post(). Namespace(c.ns). Resource("limitranges"). + VersionedParams(&opts, scheme.ParameterCodec). Body(limitRange). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a limitRange and updates it. Returns the server's representation of the limitRange, and an error, if there is any. -func (c *limitRanges) Update(limitRange *v1.LimitRange) (result *v1.LimitRange, err error) { +func (c *limitRanges) Update(ctx context.Context, limitRange *v1.LimitRange, opts metav1.UpdateOptions) (result *v1.LimitRange, err error) { result = &v1.LimitRange{} err = c.client.Put(). Namespace(c.ns). Resource("limitranges"). Name(limitRange.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(limitRange). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the limitRange and deletes it. Returns an error if one occurs. -func (c *limitRanges) Delete(name string, options *metav1.DeleteOptions) error { +func (c *limitRanges) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("limitranges"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *limitRanges) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error { +func (c *limitRanges) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Namespace(c.ns). Resource("limitranges"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched limitRange. -func (c *limitRanges) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.LimitRange, err error) { +func (c *limitRanges) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.LimitRange, err error) { result = &v1.LimitRange{} err = c.client.Patch(pt). Namespace(c.ns). Resource("limitranges"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/namespace.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/namespace.go index 8a81fe8507..55b03d65b2 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/namespace.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/namespace.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" "time" v1 "k8s.io/api/core/v1" @@ -37,14 +38,14 @@ type NamespacesGetter interface { // NamespaceInterface has methods to work with Namespace resources. type NamespaceInterface interface { - Create(*v1.Namespace) (*v1.Namespace, error) - Update(*v1.Namespace) (*v1.Namespace, error) - UpdateStatus(*v1.Namespace) (*v1.Namespace, error) - Delete(name string, options *metav1.DeleteOptions) error - Get(name string, options metav1.GetOptions) (*v1.Namespace, error) - List(opts metav1.ListOptions) (*v1.NamespaceList, error) - Watch(opts metav1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Namespace, err error) + Create(ctx context.Context, namespace *v1.Namespace, opts metav1.CreateOptions) (*v1.Namespace, error) + Update(ctx context.Context, namespace *v1.Namespace, opts metav1.UpdateOptions) (*v1.Namespace, error) + UpdateStatus(ctx context.Context, namespace *v1.Namespace, opts metav1.UpdateOptions) (*v1.Namespace, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Namespace, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.NamespaceList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Namespace, err error) NamespaceExpansion } @@ -61,19 +62,19 @@ func newNamespaces(c *CoreV1Client) *namespaces { } // Get takes name of the namespace, and returns the corresponding namespace object, and an error if there is any. -func (c *namespaces) Get(name string, options metav1.GetOptions) (result *v1.Namespace, err error) { +func (c *namespaces) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Namespace, err error) { result = &v1.Namespace{} err = c.client.Get(). Resource("namespaces"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of Namespaces that match those selectors. -func (c *namespaces) List(opts metav1.ListOptions) (result *v1.NamespaceList, err error) { +func (c *namespaces) List(ctx context.Context, opts metav1.ListOptions) (result *v1.NamespaceList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -83,13 +84,13 @@ func (c *namespaces) List(opts metav1.ListOptions) (result *v1.NamespaceList, er Resource("namespaces"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested namespaces. -func (c *namespaces) Watch(opts metav1.ListOptions) (watch.Interface, error) { +func (c *namespaces) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -99,66 +100,69 @@ func (c *namespaces) Watch(opts metav1.ListOptions) (watch.Interface, error) { Resource("namespaces"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a namespace and creates it. Returns the server's representation of the namespace, and an error, if there is any. -func (c *namespaces) Create(namespace *v1.Namespace) (result *v1.Namespace, err error) { +func (c *namespaces) Create(ctx context.Context, namespace *v1.Namespace, opts metav1.CreateOptions) (result *v1.Namespace, err error) { result = &v1.Namespace{} err = c.client.Post(). Resource("namespaces"). + VersionedParams(&opts, scheme.ParameterCodec). Body(namespace). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a namespace and updates it. Returns the server's representation of the namespace, and an error, if there is any. -func (c *namespaces) Update(namespace *v1.Namespace) (result *v1.Namespace, err error) { +func (c *namespaces) Update(ctx context.Context, namespace *v1.Namespace, opts metav1.UpdateOptions) (result *v1.Namespace, err error) { result = &v1.Namespace{} err = c.client.Put(). Resource("namespaces"). Name(namespace.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(namespace). - Do(). + Do(ctx). Into(result) return } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *namespaces) UpdateStatus(namespace *v1.Namespace) (result *v1.Namespace, err error) { +func (c *namespaces) UpdateStatus(ctx context.Context, namespace *v1.Namespace, opts metav1.UpdateOptions) (result *v1.Namespace, err error) { result = &v1.Namespace{} err = c.client.Put(). Resource("namespaces"). Name(namespace.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(namespace). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the namespace and deletes it. Returns an error if one occurs. -func (c *namespaces) Delete(name string, options *metav1.DeleteOptions) error { +func (c *namespaces) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { return c.client.Delete(). Resource("namespaces"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched namespace. -func (c *namespaces) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Namespace, err error) { +func (c *namespaces) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Namespace, err error) { result = &v1.Namespace{} err = c.client.Patch(pt). Resource("namespaces"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/namespace_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/namespace_expansion.go index 17effe29c6..be1116db15 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/namespace_expansion.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/namespace_expansion.go @@ -16,16 +16,22 @@ limitations under the License. package v1 -import "k8s.io/api/core/v1" +import ( + "context" + + v1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + scheme "k8s.io/client-go/kubernetes/scheme" +) // The NamespaceExpansion interface allows manually adding extra methods to the NamespaceInterface. type NamespaceExpansion interface { - Finalize(item *v1.Namespace) (*v1.Namespace, error) + Finalize(ctx context.Context, item *v1.Namespace, opts metav1.UpdateOptions) (*v1.Namespace, error) } // Finalize takes the representation of a namespace to update. Returns the server's representation of the namespace, and an error, if it occurs. -func (c *namespaces) Finalize(namespace *v1.Namespace) (result *v1.Namespace, err error) { +func (c *namespaces) Finalize(ctx context.Context, namespace *v1.Namespace, opts metav1.UpdateOptions) (result *v1.Namespace, err error) { result = &v1.Namespace{} - err = c.client.Put().Resource("namespaces").Name(namespace.Name).SubResource("finalize").Body(namespace).Do().Into(result) + err = c.client.Put().Resource("namespaces").Name(namespace.Name).VersionedParams(&opts, scheme.ParameterCodec).SubResource("finalize").Body(namespace).Do(ctx).Into(result) return } diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/node.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/node.go index d19fab8952..6176808f42 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/node.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/node.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" "time" v1 "k8s.io/api/core/v1" @@ -37,15 +38,15 @@ type NodesGetter interface { // NodeInterface has methods to work with Node resources. type NodeInterface interface { - Create(*v1.Node) (*v1.Node, error) - Update(*v1.Node) (*v1.Node, error) - UpdateStatus(*v1.Node) (*v1.Node, error) - Delete(name string, options *metav1.DeleteOptions) error - DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error - Get(name string, options metav1.GetOptions) (*v1.Node, error) - List(opts metav1.ListOptions) (*v1.NodeList, error) - Watch(opts metav1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Node, err error) + Create(ctx context.Context, node *v1.Node, opts metav1.CreateOptions) (*v1.Node, error) + Update(ctx context.Context, node *v1.Node, opts metav1.UpdateOptions) (*v1.Node, error) + UpdateStatus(ctx context.Context, node *v1.Node, opts metav1.UpdateOptions) (*v1.Node, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Node, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.NodeList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Node, err error) NodeExpansion } @@ -62,19 +63,19 @@ func newNodes(c *CoreV1Client) *nodes { } // Get takes name of the node, and returns the corresponding node object, and an error if there is any. -func (c *nodes) Get(name string, options metav1.GetOptions) (result *v1.Node, err error) { +func (c *nodes) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Node, err error) { result = &v1.Node{} err = c.client.Get(). Resource("nodes"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of Nodes that match those selectors. -func (c *nodes) List(opts metav1.ListOptions) (result *v1.NodeList, err error) { +func (c *nodes) List(ctx context.Context, opts metav1.ListOptions) (result *v1.NodeList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -84,13 +85,13 @@ func (c *nodes) List(opts metav1.ListOptions) (result *v1.NodeList, err error) { Resource("nodes"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested nodes. -func (c *nodes) Watch(opts metav1.ListOptions) (watch.Interface, error) { +func (c *nodes) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -100,81 +101,84 @@ func (c *nodes) Watch(opts metav1.ListOptions) (watch.Interface, error) { Resource("nodes"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a node and creates it. Returns the server's representation of the node, and an error, if there is any. -func (c *nodes) Create(node *v1.Node) (result *v1.Node, err error) { +func (c *nodes) Create(ctx context.Context, node *v1.Node, opts metav1.CreateOptions) (result *v1.Node, err error) { result = &v1.Node{} err = c.client.Post(). Resource("nodes"). + VersionedParams(&opts, scheme.ParameterCodec). Body(node). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a node and updates it. Returns the server's representation of the node, and an error, if there is any. -func (c *nodes) Update(node *v1.Node) (result *v1.Node, err error) { +func (c *nodes) Update(ctx context.Context, node *v1.Node, opts metav1.UpdateOptions) (result *v1.Node, err error) { result = &v1.Node{} err = c.client.Put(). Resource("nodes"). Name(node.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(node). - Do(). + Do(ctx). Into(result) return } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *nodes) UpdateStatus(node *v1.Node) (result *v1.Node, err error) { +func (c *nodes) UpdateStatus(ctx context.Context, node *v1.Node, opts metav1.UpdateOptions) (result *v1.Node, err error) { result = &v1.Node{} err = c.client.Put(). Resource("nodes"). Name(node.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(node). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the node and deletes it. Returns an error if one occurs. -func (c *nodes) Delete(name string, options *metav1.DeleteOptions) error { +func (c *nodes) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { return c.client.Delete(). Resource("nodes"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *nodes) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error { +func (c *nodes) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Resource("nodes"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched node. -func (c *nodes) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Node, err error) { +func (c *nodes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Node, err error) { result = &v1.Node{} err = c.client.Patch(pt). Resource("nodes"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/node_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/node_expansion.go index 5db29c3f74..bdf7bfed8d 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/node_expansion.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/node_expansion.go @@ -17,7 +17,9 @@ limitations under the License. package v1 import ( - "k8s.io/api/core/v1" + "context" + + v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/types" ) @@ -25,19 +27,19 @@ import ( type NodeExpansion interface { // PatchStatus modifies the status of an existing node. It returns the copy // of the node that the server returns, or an error. - PatchStatus(nodeName string, data []byte) (*v1.Node, error) + PatchStatus(ctx context.Context, nodeName string, data []byte) (*v1.Node, error) } // PatchStatus modifies the status of an existing node. It returns the copy of // the node that the server returns, or an error. -func (c *nodes) PatchStatus(nodeName string, data []byte) (*v1.Node, error) { +func (c *nodes) PatchStatus(ctx context.Context, nodeName string, data []byte) (*v1.Node, error) { result := &v1.Node{} err := c.client.Patch(types.StrategicMergePatchType). Resource("nodes"). Name(nodeName). SubResource("status"). Body(data). - Do(). + Do(ctx). Into(result) return result, err } diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/persistentvolume.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/persistentvolume.go index 74514825e9..1eb9db635a 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/persistentvolume.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/persistentvolume.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" "time" v1 "k8s.io/api/core/v1" @@ -37,15 +38,15 @@ type PersistentVolumesGetter interface { // PersistentVolumeInterface has methods to work with PersistentVolume resources. type PersistentVolumeInterface interface { - Create(*v1.PersistentVolume) (*v1.PersistentVolume, error) - Update(*v1.PersistentVolume) (*v1.PersistentVolume, error) - UpdateStatus(*v1.PersistentVolume) (*v1.PersistentVolume, error) - Delete(name string, options *metav1.DeleteOptions) error - DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error - Get(name string, options metav1.GetOptions) (*v1.PersistentVolume, error) - List(opts metav1.ListOptions) (*v1.PersistentVolumeList, error) - Watch(opts metav1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.PersistentVolume, err error) + Create(ctx context.Context, persistentVolume *v1.PersistentVolume, opts metav1.CreateOptions) (*v1.PersistentVolume, error) + Update(ctx context.Context, persistentVolume *v1.PersistentVolume, opts metav1.UpdateOptions) (*v1.PersistentVolume, error) + UpdateStatus(ctx context.Context, persistentVolume *v1.PersistentVolume, opts metav1.UpdateOptions) (*v1.PersistentVolume, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.PersistentVolume, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.PersistentVolumeList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.PersistentVolume, err error) PersistentVolumeExpansion } @@ -62,19 +63,19 @@ func newPersistentVolumes(c *CoreV1Client) *persistentVolumes { } // Get takes name of the persistentVolume, and returns the corresponding persistentVolume object, and an error if there is any. -func (c *persistentVolumes) Get(name string, options metav1.GetOptions) (result *v1.PersistentVolume, err error) { +func (c *persistentVolumes) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.PersistentVolume, err error) { result = &v1.PersistentVolume{} err = c.client.Get(). Resource("persistentvolumes"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of PersistentVolumes that match those selectors. -func (c *persistentVolumes) List(opts metav1.ListOptions) (result *v1.PersistentVolumeList, err error) { +func (c *persistentVolumes) List(ctx context.Context, opts metav1.ListOptions) (result *v1.PersistentVolumeList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -84,13 +85,13 @@ func (c *persistentVolumes) List(opts metav1.ListOptions) (result *v1.Persistent Resource("persistentvolumes"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested persistentVolumes. -func (c *persistentVolumes) Watch(opts metav1.ListOptions) (watch.Interface, error) { +func (c *persistentVolumes) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -100,81 +101,84 @@ func (c *persistentVolumes) Watch(opts metav1.ListOptions) (watch.Interface, err Resource("persistentvolumes"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a persistentVolume and creates it. Returns the server's representation of the persistentVolume, and an error, if there is any. -func (c *persistentVolumes) Create(persistentVolume *v1.PersistentVolume) (result *v1.PersistentVolume, err error) { +func (c *persistentVolumes) Create(ctx context.Context, persistentVolume *v1.PersistentVolume, opts metav1.CreateOptions) (result *v1.PersistentVolume, err error) { result = &v1.PersistentVolume{} err = c.client.Post(). Resource("persistentvolumes"). + VersionedParams(&opts, scheme.ParameterCodec). Body(persistentVolume). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a persistentVolume and updates it. Returns the server's representation of the persistentVolume, and an error, if there is any. -func (c *persistentVolumes) Update(persistentVolume *v1.PersistentVolume) (result *v1.PersistentVolume, err error) { +func (c *persistentVolumes) Update(ctx context.Context, persistentVolume *v1.PersistentVolume, opts metav1.UpdateOptions) (result *v1.PersistentVolume, err error) { result = &v1.PersistentVolume{} err = c.client.Put(). Resource("persistentvolumes"). Name(persistentVolume.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(persistentVolume). - Do(). + Do(ctx). Into(result) return } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *persistentVolumes) UpdateStatus(persistentVolume *v1.PersistentVolume) (result *v1.PersistentVolume, err error) { +func (c *persistentVolumes) UpdateStatus(ctx context.Context, persistentVolume *v1.PersistentVolume, opts metav1.UpdateOptions) (result *v1.PersistentVolume, err error) { result = &v1.PersistentVolume{} err = c.client.Put(). Resource("persistentvolumes"). Name(persistentVolume.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(persistentVolume). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the persistentVolume and deletes it. Returns an error if one occurs. -func (c *persistentVolumes) Delete(name string, options *metav1.DeleteOptions) error { +func (c *persistentVolumes) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { return c.client.Delete(). Resource("persistentvolumes"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *persistentVolumes) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error { +func (c *persistentVolumes) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Resource("persistentvolumes"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched persistentVolume. -func (c *persistentVolumes) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.PersistentVolume, err error) { +func (c *persistentVolumes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.PersistentVolume, err error) { result = &v1.PersistentVolume{} err = c.client.Patch(pt). Resource("persistentvolumes"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/persistentvolumeclaim.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/persistentvolumeclaim.go index 410ab37dcb..f4e205f4e8 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/persistentvolumeclaim.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/persistentvolumeclaim.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" "time" v1 "k8s.io/api/core/v1" @@ -37,15 +38,15 @@ type PersistentVolumeClaimsGetter interface { // PersistentVolumeClaimInterface has methods to work with PersistentVolumeClaim resources. type PersistentVolumeClaimInterface interface { - Create(*v1.PersistentVolumeClaim) (*v1.PersistentVolumeClaim, error) - Update(*v1.PersistentVolumeClaim) (*v1.PersistentVolumeClaim, error) - UpdateStatus(*v1.PersistentVolumeClaim) (*v1.PersistentVolumeClaim, error) - Delete(name string, options *metav1.DeleteOptions) error - DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error - Get(name string, options metav1.GetOptions) (*v1.PersistentVolumeClaim, error) - List(opts metav1.ListOptions) (*v1.PersistentVolumeClaimList, error) - Watch(opts metav1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.PersistentVolumeClaim, err error) + Create(ctx context.Context, persistentVolumeClaim *v1.PersistentVolumeClaim, opts metav1.CreateOptions) (*v1.PersistentVolumeClaim, error) + Update(ctx context.Context, persistentVolumeClaim *v1.PersistentVolumeClaim, opts metav1.UpdateOptions) (*v1.PersistentVolumeClaim, error) + UpdateStatus(ctx context.Context, persistentVolumeClaim *v1.PersistentVolumeClaim, opts metav1.UpdateOptions) (*v1.PersistentVolumeClaim, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.PersistentVolumeClaim, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.PersistentVolumeClaimList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.PersistentVolumeClaim, err error) PersistentVolumeClaimExpansion } @@ -64,20 +65,20 @@ func newPersistentVolumeClaims(c *CoreV1Client, namespace string) *persistentVol } // Get takes name of the persistentVolumeClaim, and returns the corresponding persistentVolumeClaim object, and an error if there is any. -func (c *persistentVolumeClaims) Get(name string, options metav1.GetOptions) (result *v1.PersistentVolumeClaim, err error) { +func (c *persistentVolumeClaims) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.PersistentVolumeClaim, err error) { result = &v1.PersistentVolumeClaim{} err = c.client.Get(). Namespace(c.ns). Resource("persistentvolumeclaims"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of PersistentVolumeClaims that match those selectors. -func (c *persistentVolumeClaims) List(opts metav1.ListOptions) (result *v1.PersistentVolumeClaimList, err error) { +func (c *persistentVolumeClaims) List(ctx context.Context, opts metav1.ListOptions) (result *v1.PersistentVolumeClaimList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -88,13 +89,13 @@ func (c *persistentVolumeClaims) List(opts metav1.ListOptions) (result *v1.Persi Resource("persistentvolumeclaims"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested persistentVolumeClaims. -func (c *persistentVolumeClaims) Watch(opts metav1.ListOptions) (watch.Interface, error) { +func (c *persistentVolumeClaims) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -105,87 +106,90 @@ func (c *persistentVolumeClaims) Watch(opts metav1.ListOptions) (watch.Interface Resource("persistentvolumeclaims"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a persistentVolumeClaim and creates it. Returns the server's representation of the persistentVolumeClaim, and an error, if there is any. -func (c *persistentVolumeClaims) Create(persistentVolumeClaim *v1.PersistentVolumeClaim) (result *v1.PersistentVolumeClaim, err error) { +func (c *persistentVolumeClaims) Create(ctx context.Context, persistentVolumeClaim *v1.PersistentVolumeClaim, opts metav1.CreateOptions) (result *v1.PersistentVolumeClaim, err error) { result = &v1.PersistentVolumeClaim{} err = c.client.Post(). Namespace(c.ns). Resource("persistentvolumeclaims"). + VersionedParams(&opts, scheme.ParameterCodec). Body(persistentVolumeClaim). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a persistentVolumeClaim and updates it. Returns the server's representation of the persistentVolumeClaim, and an error, if there is any. -func (c *persistentVolumeClaims) Update(persistentVolumeClaim *v1.PersistentVolumeClaim) (result *v1.PersistentVolumeClaim, err error) { +func (c *persistentVolumeClaims) Update(ctx context.Context, persistentVolumeClaim *v1.PersistentVolumeClaim, opts metav1.UpdateOptions) (result *v1.PersistentVolumeClaim, err error) { result = &v1.PersistentVolumeClaim{} err = c.client.Put(). Namespace(c.ns). Resource("persistentvolumeclaims"). Name(persistentVolumeClaim.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(persistentVolumeClaim). - Do(). + Do(ctx). Into(result) return } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *persistentVolumeClaims) UpdateStatus(persistentVolumeClaim *v1.PersistentVolumeClaim) (result *v1.PersistentVolumeClaim, err error) { +func (c *persistentVolumeClaims) UpdateStatus(ctx context.Context, persistentVolumeClaim *v1.PersistentVolumeClaim, opts metav1.UpdateOptions) (result *v1.PersistentVolumeClaim, err error) { result = &v1.PersistentVolumeClaim{} err = c.client.Put(). Namespace(c.ns). Resource("persistentvolumeclaims"). Name(persistentVolumeClaim.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(persistentVolumeClaim). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the persistentVolumeClaim and deletes it. Returns an error if one occurs. -func (c *persistentVolumeClaims) Delete(name string, options *metav1.DeleteOptions) error { +func (c *persistentVolumeClaims) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("persistentvolumeclaims"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *persistentVolumeClaims) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error { +func (c *persistentVolumeClaims) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Namespace(c.ns). Resource("persistentvolumeclaims"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched persistentVolumeClaim. -func (c *persistentVolumeClaims) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.PersistentVolumeClaim, err error) { +func (c *persistentVolumeClaims) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.PersistentVolumeClaim, err error) { result = &v1.PersistentVolumeClaim{} err = c.client.Patch(pt). Namespace(c.ns). Resource("persistentvolumeclaims"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/pod.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/pod.go index feacd307f5..36092ab640 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/pod.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/pod.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" "time" v1 "k8s.io/api/core/v1" @@ -37,17 +38,17 @@ type PodsGetter interface { // PodInterface has methods to work with Pod resources. type PodInterface interface { - Create(*v1.Pod) (*v1.Pod, error) - Update(*v1.Pod) (*v1.Pod, error) - UpdateStatus(*v1.Pod) (*v1.Pod, error) - Delete(name string, options *metav1.DeleteOptions) error - DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error - Get(name string, options metav1.GetOptions) (*v1.Pod, error) - List(opts metav1.ListOptions) (*v1.PodList, error) - Watch(opts metav1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Pod, err error) - GetEphemeralContainers(podName string, options metav1.GetOptions) (*v1.EphemeralContainers, error) - UpdateEphemeralContainers(podName string, ephemeralContainers *v1.EphemeralContainers) (*v1.EphemeralContainers, error) + Create(ctx context.Context, pod *v1.Pod, opts metav1.CreateOptions) (*v1.Pod, error) + Update(ctx context.Context, pod *v1.Pod, opts metav1.UpdateOptions) (*v1.Pod, error) + UpdateStatus(ctx context.Context, pod *v1.Pod, opts metav1.UpdateOptions) (*v1.Pod, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Pod, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.PodList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Pod, err error) + GetEphemeralContainers(ctx context.Context, podName string, options metav1.GetOptions) (*v1.EphemeralContainers, error) + UpdateEphemeralContainers(ctx context.Context, podName string, ephemeralContainers *v1.EphemeralContainers, opts metav1.UpdateOptions) (*v1.EphemeralContainers, error) PodExpansion } @@ -67,20 +68,20 @@ func newPods(c *CoreV1Client, namespace string) *pods { } // Get takes name of the pod, and returns the corresponding pod object, and an error if there is any. -func (c *pods) Get(name string, options metav1.GetOptions) (result *v1.Pod, err error) { +func (c *pods) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Pod, err error) { result = &v1.Pod{} err = c.client.Get(). Namespace(c.ns). Resource("pods"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of Pods that match those selectors. -func (c *pods) List(opts metav1.ListOptions) (result *v1.PodList, err error) { +func (c *pods) List(ctx context.Context, opts metav1.ListOptions) (result *v1.PodList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -91,13 +92,13 @@ func (c *pods) List(opts metav1.ListOptions) (result *v1.PodList, err error) { Resource("pods"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested pods. -func (c *pods) Watch(opts metav1.ListOptions) (watch.Interface, error) { +func (c *pods) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -108,93 +109,96 @@ func (c *pods) Watch(opts metav1.ListOptions) (watch.Interface, error) { Resource("pods"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a pod and creates it. Returns the server's representation of the pod, and an error, if there is any. -func (c *pods) Create(pod *v1.Pod) (result *v1.Pod, err error) { +func (c *pods) Create(ctx context.Context, pod *v1.Pod, opts metav1.CreateOptions) (result *v1.Pod, err error) { result = &v1.Pod{} err = c.client.Post(). Namespace(c.ns). Resource("pods"). + VersionedParams(&opts, scheme.ParameterCodec). Body(pod). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a pod and updates it. Returns the server's representation of the pod, and an error, if there is any. -func (c *pods) Update(pod *v1.Pod) (result *v1.Pod, err error) { +func (c *pods) Update(ctx context.Context, pod *v1.Pod, opts metav1.UpdateOptions) (result *v1.Pod, err error) { result = &v1.Pod{} err = c.client.Put(). Namespace(c.ns). Resource("pods"). Name(pod.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(pod). - Do(). + Do(ctx). Into(result) return } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *pods) UpdateStatus(pod *v1.Pod) (result *v1.Pod, err error) { +func (c *pods) UpdateStatus(ctx context.Context, pod *v1.Pod, opts metav1.UpdateOptions) (result *v1.Pod, err error) { result = &v1.Pod{} err = c.client.Put(). Namespace(c.ns). Resource("pods"). Name(pod.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(pod). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the pod and deletes it. Returns an error if one occurs. -func (c *pods) Delete(name string, options *metav1.DeleteOptions) error { +func (c *pods) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("pods"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *pods) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error { +func (c *pods) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Namespace(c.ns). Resource("pods"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched pod. -func (c *pods) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Pod, err error) { +func (c *pods) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Pod, err error) { result = &v1.Pod{} err = c.client.Patch(pt). Namespace(c.ns). Resource("pods"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } // GetEphemeralContainers takes name of the pod, and returns the corresponding v1.EphemeralContainers object, and an error if there is any. -func (c *pods) GetEphemeralContainers(podName string, options metav1.GetOptions) (result *v1.EphemeralContainers, err error) { +func (c *pods) GetEphemeralContainers(ctx context.Context, podName string, options metav1.GetOptions) (result *v1.EphemeralContainers, err error) { result = &v1.EphemeralContainers{} err = c.client.Get(). Namespace(c.ns). @@ -202,21 +206,22 @@ func (c *pods) GetEphemeralContainers(podName string, options metav1.GetOptions) Name(podName). SubResource("ephemeralcontainers"). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // UpdateEphemeralContainers takes the top resource name and the representation of a ephemeralContainers and updates it. Returns the server's representation of the ephemeralContainers, and an error, if there is any. -func (c *pods) UpdateEphemeralContainers(podName string, ephemeralContainers *v1.EphemeralContainers) (result *v1.EphemeralContainers, err error) { +func (c *pods) UpdateEphemeralContainers(ctx context.Context, podName string, ephemeralContainers *v1.EphemeralContainers, opts metav1.UpdateOptions) (result *v1.EphemeralContainers, err error) { result = &v1.EphemeralContainers{} err = c.client.Put(). Namespace(c.ns). Resource("pods"). Name(podName). SubResource("ephemeralcontainers"). + VersionedParams(&opts, scheme.ParameterCodec). Body(ephemeralContainers). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/pod_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/pod_expansion.go index ed876be8b5..8710a2c054 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/pod_expansion.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/pod_expansion.go @@ -17,26 +17,29 @@ limitations under the License. package v1 import ( - "k8s.io/api/core/v1" + "context" + + v1 "k8s.io/api/core/v1" policy "k8s.io/api/policy/v1beta1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/client-go/kubernetes/scheme" restclient "k8s.io/client-go/rest" ) // The PodExpansion interface allows manually adding extra methods to the PodInterface. type PodExpansion interface { - Bind(binding *v1.Binding) error - Evict(eviction *policy.Eviction) error + Bind(ctx context.Context, binding *v1.Binding, opts metav1.CreateOptions) error + Evict(ctx context.Context, eviction *policy.Eviction) error GetLogs(name string, opts *v1.PodLogOptions) *restclient.Request } // Bind applies the provided binding to the named pod in the current namespace (binding.Namespace is ignored). -func (c *pods) Bind(binding *v1.Binding) error { - return c.client.Post().Namespace(c.ns).Resource("pods").Name(binding.Name).SubResource("binding").Body(binding).Do().Error() +func (c *pods) Bind(ctx context.Context, binding *v1.Binding, opts metav1.CreateOptions) error { + return c.client.Post().Namespace(c.ns).Resource("pods").Name(binding.Name).VersionedParams(&opts, scheme.ParameterCodec).SubResource("binding").Body(binding).Do(ctx).Error() } -func (c *pods) Evict(eviction *policy.Eviction) error { - return c.client.Post().Namespace(c.ns).Resource("pods").Name(eviction.Name).SubResource("eviction").Body(eviction).Do().Error() +func (c *pods) Evict(ctx context.Context, eviction *policy.Eviction) error { + return c.client.Post().Namespace(c.ns).Resource("pods").Name(eviction.Name).SubResource("eviction").Body(eviction).Do(ctx).Error() } // Get constructs a request for getting the logs for a pod diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/podtemplate.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/podtemplate.go index 84d7c98059..012d3b52c4 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/podtemplate.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/podtemplate.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" "time" v1 "k8s.io/api/core/v1" @@ -37,14 +38,14 @@ type PodTemplatesGetter interface { // PodTemplateInterface has methods to work with PodTemplate resources. type PodTemplateInterface interface { - Create(*v1.PodTemplate) (*v1.PodTemplate, error) - Update(*v1.PodTemplate) (*v1.PodTemplate, error) - Delete(name string, options *metav1.DeleteOptions) error - DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error - Get(name string, options metav1.GetOptions) (*v1.PodTemplate, error) - List(opts metav1.ListOptions) (*v1.PodTemplateList, error) - Watch(opts metav1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.PodTemplate, err error) + Create(ctx context.Context, podTemplate *v1.PodTemplate, opts metav1.CreateOptions) (*v1.PodTemplate, error) + Update(ctx context.Context, podTemplate *v1.PodTemplate, opts metav1.UpdateOptions) (*v1.PodTemplate, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.PodTemplate, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.PodTemplateList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.PodTemplate, err error) PodTemplateExpansion } @@ -63,20 +64,20 @@ func newPodTemplates(c *CoreV1Client, namespace string) *podTemplates { } // Get takes name of the podTemplate, and returns the corresponding podTemplate object, and an error if there is any. -func (c *podTemplates) Get(name string, options metav1.GetOptions) (result *v1.PodTemplate, err error) { +func (c *podTemplates) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.PodTemplate, err error) { result = &v1.PodTemplate{} err = c.client.Get(). Namespace(c.ns). Resource("podtemplates"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of PodTemplates that match those selectors. -func (c *podTemplates) List(opts metav1.ListOptions) (result *v1.PodTemplateList, err error) { +func (c *podTemplates) List(ctx context.Context, opts metav1.ListOptions) (result *v1.PodTemplateList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -87,13 +88,13 @@ func (c *podTemplates) List(opts metav1.ListOptions) (result *v1.PodTemplateList Resource("podtemplates"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested podTemplates. -func (c *podTemplates) Watch(opts metav1.ListOptions) (watch.Interface, error) { +func (c *podTemplates) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -104,71 +105,74 @@ func (c *podTemplates) Watch(opts metav1.ListOptions) (watch.Interface, error) { Resource("podtemplates"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a podTemplate and creates it. Returns the server's representation of the podTemplate, and an error, if there is any. -func (c *podTemplates) Create(podTemplate *v1.PodTemplate) (result *v1.PodTemplate, err error) { +func (c *podTemplates) Create(ctx context.Context, podTemplate *v1.PodTemplate, opts metav1.CreateOptions) (result *v1.PodTemplate, err error) { result = &v1.PodTemplate{} err = c.client.Post(). Namespace(c.ns). Resource("podtemplates"). + VersionedParams(&opts, scheme.ParameterCodec). Body(podTemplate). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a podTemplate and updates it. Returns the server's representation of the podTemplate, and an error, if there is any. -func (c *podTemplates) Update(podTemplate *v1.PodTemplate) (result *v1.PodTemplate, err error) { +func (c *podTemplates) Update(ctx context.Context, podTemplate *v1.PodTemplate, opts metav1.UpdateOptions) (result *v1.PodTemplate, err error) { result = &v1.PodTemplate{} err = c.client.Put(). Namespace(c.ns). Resource("podtemplates"). Name(podTemplate.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(podTemplate). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the podTemplate and deletes it. Returns an error if one occurs. -func (c *podTemplates) Delete(name string, options *metav1.DeleteOptions) error { +func (c *podTemplates) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("podtemplates"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *podTemplates) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error { +func (c *podTemplates) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Namespace(c.ns). Resource("podtemplates"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched podTemplate. -func (c *podTemplates) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.PodTemplate, err error) { +func (c *podTemplates) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.PodTemplate, err error) { result = &v1.PodTemplate{} err = c.client.Patch(pt). Namespace(c.ns). Resource("podtemplates"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/replicationcontroller.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/replicationcontroller.go index dd3182db65..8e9ccd59de 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/replicationcontroller.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/replicationcontroller.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" "time" autoscalingv1 "k8s.io/api/autoscaling/v1" @@ -38,17 +39,17 @@ type ReplicationControllersGetter interface { // ReplicationControllerInterface has methods to work with ReplicationController resources. type ReplicationControllerInterface interface { - Create(*v1.ReplicationController) (*v1.ReplicationController, error) - Update(*v1.ReplicationController) (*v1.ReplicationController, error) - UpdateStatus(*v1.ReplicationController) (*v1.ReplicationController, error) - Delete(name string, options *metav1.DeleteOptions) error - DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error - Get(name string, options metav1.GetOptions) (*v1.ReplicationController, error) - List(opts metav1.ListOptions) (*v1.ReplicationControllerList, error) - Watch(opts metav1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ReplicationController, err error) - GetScale(replicationControllerName string, options metav1.GetOptions) (*autoscalingv1.Scale, error) - UpdateScale(replicationControllerName string, scale *autoscalingv1.Scale) (*autoscalingv1.Scale, error) + Create(ctx context.Context, replicationController *v1.ReplicationController, opts metav1.CreateOptions) (*v1.ReplicationController, error) + Update(ctx context.Context, replicationController *v1.ReplicationController, opts metav1.UpdateOptions) (*v1.ReplicationController, error) + UpdateStatus(ctx context.Context, replicationController *v1.ReplicationController, opts metav1.UpdateOptions) (*v1.ReplicationController, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.ReplicationController, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.ReplicationControllerList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ReplicationController, err error) + GetScale(ctx context.Context, replicationControllerName string, options metav1.GetOptions) (*autoscalingv1.Scale, error) + UpdateScale(ctx context.Context, replicationControllerName string, scale *autoscalingv1.Scale, opts metav1.UpdateOptions) (*autoscalingv1.Scale, error) ReplicationControllerExpansion } @@ -68,20 +69,20 @@ func newReplicationControllers(c *CoreV1Client, namespace string) *replicationCo } // Get takes name of the replicationController, and returns the corresponding replicationController object, and an error if there is any. -func (c *replicationControllers) Get(name string, options metav1.GetOptions) (result *v1.ReplicationController, err error) { +func (c *replicationControllers) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ReplicationController, err error) { result = &v1.ReplicationController{} err = c.client.Get(). Namespace(c.ns). Resource("replicationcontrollers"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of ReplicationControllers that match those selectors. -func (c *replicationControllers) List(opts metav1.ListOptions) (result *v1.ReplicationControllerList, err error) { +func (c *replicationControllers) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ReplicationControllerList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -92,13 +93,13 @@ func (c *replicationControllers) List(opts metav1.ListOptions) (result *v1.Repli Resource("replicationcontrollers"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested replicationControllers. -func (c *replicationControllers) Watch(opts metav1.ListOptions) (watch.Interface, error) { +func (c *replicationControllers) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -109,93 +110,96 @@ func (c *replicationControllers) Watch(opts metav1.ListOptions) (watch.Interface Resource("replicationcontrollers"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a replicationController and creates it. Returns the server's representation of the replicationController, and an error, if there is any. -func (c *replicationControllers) Create(replicationController *v1.ReplicationController) (result *v1.ReplicationController, err error) { +func (c *replicationControllers) Create(ctx context.Context, replicationController *v1.ReplicationController, opts metav1.CreateOptions) (result *v1.ReplicationController, err error) { result = &v1.ReplicationController{} err = c.client.Post(). Namespace(c.ns). Resource("replicationcontrollers"). + VersionedParams(&opts, scheme.ParameterCodec). Body(replicationController). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a replicationController and updates it. Returns the server's representation of the replicationController, and an error, if there is any. -func (c *replicationControllers) Update(replicationController *v1.ReplicationController) (result *v1.ReplicationController, err error) { +func (c *replicationControllers) Update(ctx context.Context, replicationController *v1.ReplicationController, opts metav1.UpdateOptions) (result *v1.ReplicationController, err error) { result = &v1.ReplicationController{} err = c.client.Put(). Namespace(c.ns). Resource("replicationcontrollers"). Name(replicationController.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(replicationController). - Do(). + Do(ctx). Into(result) return } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *replicationControllers) UpdateStatus(replicationController *v1.ReplicationController) (result *v1.ReplicationController, err error) { +func (c *replicationControllers) UpdateStatus(ctx context.Context, replicationController *v1.ReplicationController, opts metav1.UpdateOptions) (result *v1.ReplicationController, err error) { result = &v1.ReplicationController{} err = c.client.Put(). Namespace(c.ns). Resource("replicationcontrollers"). Name(replicationController.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(replicationController). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the replicationController and deletes it. Returns an error if one occurs. -func (c *replicationControllers) Delete(name string, options *metav1.DeleteOptions) error { +func (c *replicationControllers) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("replicationcontrollers"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *replicationControllers) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error { +func (c *replicationControllers) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Namespace(c.ns). Resource("replicationcontrollers"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched replicationController. -func (c *replicationControllers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ReplicationController, err error) { +func (c *replicationControllers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ReplicationController, err error) { result = &v1.ReplicationController{} err = c.client.Patch(pt). Namespace(c.ns). Resource("replicationcontrollers"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } // GetScale takes name of the replicationController, and returns the corresponding autoscalingv1.Scale object, and an error if there is any. -func (c *replicationControllers) GetScale(replicationControllerName string, options metav1.GetOptions) (result *autoscalingv1.Scale, err error) { +func (c *replicationControllers) GetScale(ctx context.Context, replicationControllerName string, options metav1.GetOptions) (result *autoscalingv1.Scale, err error) { result = &autoscalingv1.Scale{} err = c.client.Get(). Namespace(c.ns). @@ -203,21 +207,22 @@ func (c *replicationControllers) GetScale(replicationControllerName string, opti Name(replicationControllerName). SubResource("scale"). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // UpdateScale takes the top resource name and the representation of a scale and updates it. Returns the server's representation of the scale, and an error, if there is any. -func (c *replicationControllers) UpdateScale(replicationControllerName string, scale *autoscalingv1.Scale) (result *autoscalingv1.Scale, err error) { +func (c *replicationControllers) UpdateScale(ctx context.Context, replicationControllerName string, scale *autoscalingv1.Scale, opts metav1.UpdateOptions) (result *autoscalingv1.Scale, err error) { result = &autoscalingv1.Scale{} err = c.client.Put(). Namespace(c.ns). Resource("replicationcontrollers"). Name(replicationControllerName). SubResource("scale"). + VersionedParams(&opts, scheme.ParameterCodec). Body(scale). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/resourcequota.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/resourcequota.go index 5a178990ec..6a41e35fdb 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/resourcequota.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/resourcequota.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" "time" v1 "k8s.io/api/core/v1" @@ -37,15 +38,15 @@ type ResourceQuotasGetter interface { // ResourceQuotaInterface has methods to work with ResourceQuota resources. type ResourceQuotaInterface interface { - Create(*v1.ResourceQuota) (*v1.ResourceQuota, error) - Update(*v1.ResourceQuota) (*v1.ResourceQuota, error) - UpdateStatus(*v1.ResourceQuota) (*v1.ResourceQuota, error) - Delete(name string, options *metav1.DeleteOptions) error - DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error - Get(name string, options metav1.GetOptions) (*v1.ResourceQuota, error) - List(opts metav1.ListOptions) (*v1.ResourceQuotaList, error) - Watch(opts metav1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ResourceQuota, err error) + Create(ctx context.Context, resourceQuota *v1.ResourceQuota, opts metav1.CreateOptions) (*v1.ResourceQuota, error) + Update(ctx context.Context, resourceQuota *v1.ResourceQuota, opts metav1.UpdateOptions) (*v1.ResourceQuota, error) + UpdateStatus(ctx context.Context, resourceQuota *v1.ResourceQuota, opts metav1.UpdateOptions) (*v1.ResourceQuota, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.ResourceQuota, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.ResourceQuotaList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ResourceQuota, err error) ResourceQuotaExpansion } @@ -64,20 +65,20 @@ func newResourceQuotas(c *CoreV1Client, namespace string) *resourceQuotas { } // Get takes name of the resourceQuota, and returns the corresponding resourceQuota object, and an error if there is any. -func (c *resourceQuotas) Get(name string, options metav1.GetOptions) (result *v1.ResourceQuota, err error) { +func (c *resourceQuotas) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ResourceQuota, err error) { result = &v1.ResourceQuota{} err = c.client.Get(). Namespace(c.ns). Resource("resourcequotas"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of ResourceQuotas that match those selectors. -func (c *resourceQuotas) List(opts metav1.ListOptions) (result *v1.ResourceQuotaList, err error) { +func (c *resourceQuotas) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ResourceQuotaList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -88,13 +89,13 @@ func (c *resourceQuotas) List(opts metav1.ListOptions) (result *v1.ResourceQuota Resource("resourcequotas"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested resourceQuotas. -func (c *resourceQuotas) Watch(opts metav1.ListOptions) (watch.Interface, error) { +func (c *resourceQuotas) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -105,87 +106,90 @@ func (c *resourceQuotas) Watch(opts metav1.ListOptions) (watch.Interface, error) Resource("resourcequotas"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a resourceQuota and creates it. Returns the server's representation of the resourceQuota, and an error, if there is any. -func (c *resourceQuotas) Create(resourceQuota *v1.ResourceQuota) (result *v1.ResourceQuota, err error) { +func (c *resourceQuotas) Create(ctx context.Context, resourceQuota *v1.ResourceQuota, opts metav1.CreateOptions) (result *v1.ResourceQuota, err error) { result = &v1.ResourceQuota{} err = c.client.Post(). Namespace(c.ns). Resource("resourcequotas"). + VersionedParams(&opts, scheme.ParameterCodec). Body(resourceQuota). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a resourceQuota and updates it. Returns the server's representation of the resourceQuota, and an error, if there is any. -func (c *resourceQuotas) Update(resourceQuota *v1.ResourceQuota) (result *v1.ResourceQuota, err error) { +func (c *resourceQuotas) Update(ctx context.Context, resourceQuota *v1.ResourceQuota, opts metav1.UpdateOptions) (result *v1.ResourceQuota, err error) { result = &v1.ResourceQuota{} err = c.client.Put(). Namespace(c.ns). Resource("resourcequotas"). Name(resourceQuota.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(resourceQuota). - Do(). + Do(ctx). Into(result) return } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *resourceQuotas) UpdateStatus(resourceQuota *v1.ResourceQuota) (result *v1.ResourceQuota, err error) { +func (c *resourceQuotas) UpdateStatus(ctx context.Context, resourceQuota *v1.ResourceQuota, opts metav1.UpdateOptions) (result *v1.ResourceQuota, err error) { result = &v1.ResourceQuota{} err = c.client.Put(). Namespace(c.ns). Resource("resourcequotas"). Name(resourceQuota.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(resourceQuota). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the resourceQuota and deletes it. Returns an error if one occurs. -func (c *resourceQuotas) Delete(name string, options *metav1.DeleteOptions) error { +func (c *resourceQuotas) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("resourcequotas"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *resourceQuotas) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error { +func (c *resourceQuotas) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Namespace(c.ns). Resource("resourcequotas"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched resourceQuota. -func (c *resourceQuotas) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ResourceQuota, err error) { +func (c *resourceQuotas) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ResourceQuota, err error) { result = &v1.ResourceQuota{} err = c.client.Patch(pt). Namespace(c.ns). Resource("resourcequotas"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/secret.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/secret.go index 85c143b173..b2bd80baa5 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/secret.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/secret.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" "time" v1 "k8s.io/api/core/v1" @@ -37,14 +38,14 @@ type SecretsGetter interface { // SecretInterface has methods to work with Secret resources. type SecretInterface interface { - Create(*v1.Secret) (*v1.Secret, error) - Update(*v1.Secret) (*v1.Secret, error) - Delete(name string, options *metav1.DeleteOptions) error - DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error - Get(name string, options metav1.GetOptions) (*v1.Secret, error) - List(opts metav1.ListOptions) (*v1.SecretList, error) - Watch(opts metav1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Secret, err error) + Create(ctx context.Context, secret *v1.Secret, opts metav1.CreateOptions) (*v1.Secret, error) + Update(ctx context.Context, secret *v1.Secret, opts metav1.UpdateOptions) (*v1.Secret, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Secret, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.SecretList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Secret, err error) SecretExpansion } @@ -63,20 +64,20 @@ func newSecrets(c *CoreV1Client, namespace string) *secrets { } // Get takes name of the secret, and returns the corresponding secret object, and an error if there is any. -func (c *secrets) Get(name string, options metav1.GetOptions) (result *v1.Secret, err error) { +func (c *secrets) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Secret, err error) { result = &v1.Secret{} err = c.client.Get(). Namespace(c.ns). Resource("secrets"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of Secrets that match those selectors. -func (c *secrets) List(opts metav1.ListOptions) (result *v1.SecretList, err error) { +func (c *secrets) List(ctx context.Context, opts metav1.ListOptions) (result *v1.SecretList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -87,13 +88,13 @@ func (c *secrets) List(opts metav1.ListOptions) (result *v1.SecretList, err erro Resource("secrets"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested secrets. -func (c *secrets) Watch(opts metav1.ListOptions) (watch.Interface, error) { +func (c *secrets) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -104,71 +105,74 @@ func (c *secrets) Watch(opts metav1.ListOptions) (watch.Interface, error) { Resource("secrets"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a secret and creates it. Returns the server's representation of the secret, and an error, if there is any. -func (c *secrets) Create(secret *v1.Secret) (result *v1.Secret, err error) { +func (c *secrets) Create(ctx context.Context, secret *v1.Secret, opts metav1.CreateOptions) (result *v1.Secret, err error) { result = &v1.Secret{} err = c.client.Post(). Namespace(c.ns). Resource("secrets"). + VersionedParams(&opts, scheme.ParameterCodec). Body(secret). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a secret and updates it. Returns the server's representation of the secret, and an error, if there is any. -func (c *secrets) Update(secret *v1.Secret) (result *v1.Secret, err error) { +func (c *secrets) Update(ctx context.Context, secret *v1.Secret, opts metav1.UpdateOptions) (result *v1.Secret, err error) { result = &v1.Secret{} err = c.client.Put(). Namespace(c.ns). Resource("secrets"). Name(secret.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(secret). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the secret and deletes it. Returns an error if one occurs. -func (c *secrets) Delete(name string, options *metav1.DeleteOptions) error { +func (c *secrets) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("secrets"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *secrets) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error { +func (c *secrets) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Namespace(c.ns). Resource("secrets"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched secret. -func (c *secrets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Secret, err error) { +func (c *secrets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Secret, err error) { result = &v1.Secret{} err = c.client.Patch(pt). Namespace(c.ns). Resource("secrets"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/service.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/service.go index b0e09413ef..ddde2ec6c7 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/service.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/service.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" "time" v1 "k8s.io/api/core/v1" @@ -37,14 +38,14 @@ type ServicesGetter interface { // ServiceInterface has methods to work with Service resources. type ServiceInterface interface { - Create(*v1.Service) (*v1.Service, error) - Update(*v1.Service) (*v1.Service, error) - UpdateStatus(*v1.Service) (*v1.Service, error) - Delete(name string, options *metav1.DeleteOptions) error - Get(name string, options metav1.GetOptions) (*v1.Service, error) - List(opts metav1.ListOptions) (*v1.ServiceList, error) - Watch(opts metav1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Service, err error) + Create(ctx context.Context, service *v1.Service, opts metav1.CreateOptions) (*v1.Service, error) + Update(ctx context.Context, service *v1.Service, opts metav1.UpdateOptions) (*v1.Service, error) + UpdateStatus(ctx context.Context, service *v1.Service, opts metav1.UpdateOptions) (*v1.Service, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Service, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.ServiceList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Service, err error) ServiceExpansion } @@ -63,20 +64,20 @@ func newServices(c *CoreV1Client, namespace string) *services { } // Get takes name of the service, and returns the corresponding service object, and an error if there is any. -func (c *services) Get(name string, options metav1.GetOptions) (result *v1.Service, err error) { +func (c *services) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Service, err error) { result = &v1.Service{} err = c.client.Get(). Namespace(c.ns). Resource("services"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of Services that match those selectors. -func (c *services) List(opts metav1.ListOptions) (result *v1.ServiceList, err error) { +func (c *services) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ServiceList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -87,13 +88,13 @@ func (c *services) List(opts metav1.ListOptions) (result *v1.ServiceList, err er Resource("services"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested services. -func (c *services) Watch(opts metav1.ListOptions) (watch.Interface, error) { +func (c *services) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -104,71 +105,74 @@ func (c *services) Watch(opts metav1.ListOptions) (watch.Interface, error) { Resource("services"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a service and creates it. Returns the server's representation of the service, and an error, if there is any. -func (c *services) Create(service *v1.Service) (result *v1.Service, err error) { +func (c *services) Create(ctx context.Context, service *v1.Service, opts metav1.CreateOptions) (result *v1.Service, err error) { result = &v1.Service{} err = c.client.Post(). Namespace(c.ns). Resource("services"). + VersionedParams(&opts, scheme.ParameterCodec). Body(service). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a service and updates it. Returns the server's representation of the service, and an error, if there is any. -func (c *services) Update(service *v1.Service) (result *v1.Service, err error) { +func (c *services) Update(ctx context.Context, service *v1.Service, opts metav1.UpdateOptions) (result *v1.Service, err error) { result = &v1.Service{} err = c.client.Put(). Namespace(c.ns). Resource("services"). Name(service.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(service). - Do(). + Do(ctx). Into(result) return } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *services) UpdateStatus(service *v1.Service) (result *v1.Service, err error) { +func (c *services) UpdateStatus(ctx context.Context, service *v1.Service, opts metav1.UpdateOptions) (result *v1.Service, err error) { result = &v1.Service{} err = c.client.Put(). Namespace(c.ns). Resource("services"). Name(service.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(service). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the service and deletes it. Returns an error if one occurs. -func (c *services) Delete(name string, options *metav1.DeleteOptions) error { +func (c *services) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("services"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched service. -func (c *services) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Service, err error) { +func (c *services) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Service, err error) { result = &v1.Service{} err = c.client.Patch(pt). Namespace(c.ns). Resource("services"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/serviceaccount.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/serviceaccount.go index 50af6a21c9..c2ddfbfdb7 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/serviceaccount.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/serviceaccount.go @@ -19,8 +19,10 @@ limitations under the License. package v1 import ( + "context" "time" + authenticationv1 "k8s.io/api/authentication/v1" v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -37,14 +39,16 @@ type ServiceAccountsGetter interface { // ServiceAccountInterface has methods to work with ServiceAccount resources. type ServiceAccountInterface interface { - Create(*v1.ServiceAccount) (*v1.ServiceAccount, error) - Update(*v1.ServiceAccount) (*v1.ServiceAccount, error) - Delete(name string, options *metav1.DeleteOptions) error - DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error - Get(name string, options metav1.GetOptions) (*v1.ServiceAccount, error) - List(opts metav1.ListOptions) (*v1.ServiceAccountList, error) - Watch(opts metav1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ServiceAccount, err error) + Create(ctx context.Context, serviceAccount *v1.ServiceAccount, opts metav1.CreateOptions) (*v1.ServiceAccount, error) + Update(ctx context.Context, serviceAccount *v1.ServiceAccount, opts metav1.UpdateOptions) (*v1.ServiceAccount, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.ServiceAccount, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.ServiceAccountList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ServiceAccount, err error) + CreateToken(ctx context.Context, serviceAccountName string, tokenRequest *authenticationv1.TokenRequest, opts metav1.CreateOptions) (*authenticationv1.TokenRequest, error) + ServiceAccountExpansion } @@ -63,20 +67,20 @@ func newServiceAccounts(c *CoreV1Client, namespace string) *serviceAccounts { } // Get takes name of the serviceAccount, and returns the corresponding serviceAccount object, and an error if there is any. -func (c *serviceAccounts) Get(name string, options metav1.GetOptions) (result *v1.ServiceAccount, err error) { +func (c *serviceAccounts) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ServiceAccount, err error) { result = &v1.ServiceAccount{} err = c.client.Get(). Namespace(c.ns). Resource("serviceaccounts"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of ServiceAccounts that match those selectors. -func (c *serviceAccounts) List(opts metav1.ListOptions) (result *v1.ServiceAccountList, err error) { +func (c *serviceAccounts) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ServiceAccountList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -87,13 +91,13 @@ func (c *serviceAccounts) List(opts metav1.ListOptions) (result *v1.ServiceAccou Resource("serviceaccounts"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested serviceAccounts. -func (c *serviceAccounts) Watch(opts metav1.ListOptions) (watch.Interface, error) { +func (c *serviceAccounts) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -104,71 +108,89 @@ func (c *serviceAccounts) Watch(opts metav1.ListOptions) (watch.Interface, error Resource("serviceaccounts"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a serviceAccount and creates it. Returns the server's representation of the serviceAccount, and an error, if there is any. -func (c *serviceAccounts) Create(serviceAccount *v1.ServiceAccount) (result *v1.ServiceAccount, err error) { +func (c *serviceAccounts) Create(ctx context.Context, serviceAccount *v1.ServiceAccount, opts metav1.CreateOptions) (result *v1.ServiceAccount, err error) { result = &v1.ServiceAccount{} err = c.client.Post(). Namespace(c.ns). Resource("serviceaccounts"). + VersionedParams(&opts, scheme.ParameterCodec). Body(serviceAccount). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a serviceAccount and updates it. Returns the server's representation of the serviceAccount, and an error, if there is any. -func (c *serviceAccounts) Update(serviceAccount *v1.ServiceAccount) (result *v1.ServiceAccount, err error) { +func (c *serviceAccounts) Update(ctx context.Context, serviceAccount *v1.ServiceAccount, opts metav1.UpdateOptions) (result *v1.ServiceAccount, err error) { result = &v1.ServiceAccount{} err = c.client.Put(). Namespace(c.ns). Resource("serviceaccounts"). Name(serviceAccount.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(serviceAccount). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the serviceAccount and deletes it. Returns an error if one occurs. -func (c *serviceAccounts) Delete(name string, options *metav1.DeleteOptions) error { +func (c *serviceAccounts) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("serviceaccounts"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *serviceAccounts) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error { +func (c *serviceAccounts) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Namespace(c.ns). Resource("serviceaccounts"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched serviceAccount. -func (c *serviceAccounts) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ServiceAccount, err error) { +func (c *serviceAccounts) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ServiceAccount, err error) { result = &v1.ServiceAccount{} err = c.client.Patch(pt). Namespace(c.ns). Resource("serviceaccounts"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). + Into(result) + return +} + +// CreateToken takes the representation of a tokenRequest and creates it. Returns the server's representation of the tokenRequest, and an error, if there is any. +func (c *serviceAccounts) CreateToken(ctx context.Context, serviceAccountName string, tokenRequest *authenticationv1.TokenRequest, opts metav1.CreateOptions) (result *authenticationv1.TokenRequest, err error) { + result = &authenticationv1.TokenRequest{} + err = c.client.Post(). + Namespace(c.ns). + Resource("serviceaccounts"). + Name(serviceAccountName). + SubResource("token"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(tokenRequest). + Do(ctx). Into(result) return } diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/serviceaccount_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/serviceaccount_expansion.go deleted file mode 100644 index eaf643f154..0000000000 --- a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/serviceaccount_expansion.go +++ /dev/null @@ -1,41 +0,0 @@ -/* -Copyright 2018 The Kubernetes 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. -*/ - -package v1 - -import ( - authenticationv1 "k8s.io/api/authentication/v1" -) - -// The ServiceAccountExpansion interface allows manually adding extra methods -// to the ServiceAccountInterface. -type ServiceAccountExpansion interface { - CreateToken(name string, tr *authenticationv1.TokenRequest) (*authenticationv1.TokenRequest, error) -} - -// CreateToken creates a new token for a serviceaccount. -func (c *serviceAccounts) CreateToken(name string, tr *authenticationv1.TokenRequest) (*authenticationv1.TokenRequest, error) { - result := &authenticationv1.TokenRequest{} - err := c.client.Post(). - Namespace(c.ns). - Resource("serviceaccounts"). - SubResource("token"). - Name(name). - Body(tr). - Do(). - Into(result) - return result, err -} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/discovery/v1alpha1/endpointslice.go b/vendor/k8s.io/client-go/kubernetes/typed/discovery/v1alpha1/endpointslice.go index 417514761f..63b4627d33 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/discovery/v1alpha1/endpointslice.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/discovery/v1alpha1/endpointslice.go @@ -19,6 +19,7 @@ limitations under the License. package v1alpha1 import ( + "context" "time" v1alpha1 "k8s.io/api/discovery/v1alpha1" @@ -37,14 +38,14 @@ type EndpointSlicesGetter interface { // EndpointSliceInterface has methods to work with EndpointSlice resources. type EndpointSliceInterface interface { - Create(*v1alpha1.EndpointSlice) (*v1alpha1.EndpointSlice, error) - Update(*v1alpha1.EndpointSlice) (*v1alpha1.EndpointSlice, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*v1alpha1.EndpointSlice, error) - List(opts v1.ListOptions) (*v1alpha1.EndpointSliceList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.EndpointSlice, err error) + Create(ctx context.Context, endpointSlice *v1alpha1.EndpointSlice, opts v1.CreateOptions) (*v1alpha1.EndpointSlice, error) + Update(ctx context.Context, endpointSlice *v1alpha1.EndpointSlice, opts v1.UpdateOptions) (*v1alpha1.EndpointSlice, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.EndpointSlice, error) + List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.EndpointSliceList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.EndpointSlice, err error) EndpointSliceExpansion } @@ -63,20 +64,20 @@ func newEndpointSlices(c *DiscoveryV1alpha1Client, namespace string) *endpointSl } // Get takes name of the endpointSlice, and returns the corresponding endpointSlice object, and an error if there is any. -func (c *endpointSlices) Get(name string, options v1.GetOptions) (result *v1alpha1.EndpointSlice, err error) { +func (c *endpointSlices) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.EndpointSlice, err error) { result = &v1alpha1.EndpointSlice{} err = c.client.Get(). Namespace(c.ns). Resource("endpointslices"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of EndpointSlices that match those selectors. -func (c *endpointSlices) List(opts v1.ListOptions) (result *v1alpha1.EndpointSliceList, err error) { +func (c *endpointSlices) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.EndpointSliceList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -87,13 +88,13 @@ func (c *endpointSlices) List(opts v1.ListOptions) (result *v1alpha1.EndpointSli Resource("endpointslices"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested endpointSlices. -func (c *endpointSlices) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *endpointSlices) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -104,71 +105,74 @@ func (c *endpointSlices) Watch(opts v1.ListOptions) (watch.Interface, error) { Resource("endpointslices"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a endpointSlice and creates it. Returns the server's representation of the endpointSlice, and an error, if there is any. -func (c *endpointSlices) Create(endpointSlice *v1alpha1.EndpointSlice) (result *v1alpha1.EndpointSlice, err error) { +func (c *endpointSlices) Create(ctx context.Context, endpointSlice *v1alpha1.EndpointSlice, opts v1.CreateOptions) (result *v1alpha1.EndpointSlice, err error) { result = &v1alpha1.EndpointSlice{} err = c.client.Post(). Namespace(c.ns). Resource("endpointslices"). + VersionedParams(&opts, scheme.ParameterCodec). Body(endpointSlice). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a endpointSlice and updates it. Returns the server's representation of the endpointSlice, and an error, if there is any. -func (c *endpointSlices) Update(endpointSlice *v1alpha1.EndpointSlice) (result *v1alpha1.EndpointSlice, err error) { +func (c *endpointSlices) Update(ctx context.Context, endpointSlice *v1alpha1.EndpointSlice, opts v1.UpdateOptions) (result *v1alpha1.EndpointSlice, err error) { result = &v1alpha1.EndpointSlice{} err = c.client.Put(). Namespace(c.ns). Resource("endpointslices"). Name(endpointSlice.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(endpointSlice). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the endpointSlice and deletes it. Returns an error if one occurs. -func (c *endpointSlices) Delete(name string, options *v1.DeleteOptions) error { +func (c *endpointSlices) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("endpointslices"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *endpointSlices) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *endpointSlices) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Namespace(c.ns). Resource("endpointslices"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched endpointSlice. -func (c *endpointSlices) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.EndpointSlice, err error) { +func (c *endpointSlices) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.EndpointSlice, err error) { result = &v1alpha1.EndpointSlice{} err = c.client.Patch(pt). Namespace(c.ns). Resource("endpointslices"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/k8s.io/client-go/kubernetes/typed/discovery/v1alpha1/fake/fake_endpointslice.go b/vendor/k8s.io/client-go/kubernetes/typed/discovery/v1alpha1/fake/fake_endpointslice.go index 9d17306a46..f180340ab6 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/discovery/v1alpha1/fake/fake_endpointslice.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/discovery/v1alpha1/fake/fake_endpointslice.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + v1alpha1 "k8s.io/api/discovery/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" @@ -39,7 +41,7 @@ var endpointslicesResource = schema.GroupVersionResource{Group: "discovery.k8s.i var endpointslicesKind = schema.GroupVersionKind{Group: "discovery.k8s.io", Version: "v1alpha1", Kind: "EndpointSlice"} // Get takes name of the endpointSlice, and returns the corresponding endpointSlice object, and an error if there is any. -func (c *FakeEndpointSlices) Get(name string, options v1.GetOptions) (result *v1alpha1.EndpointSlice, err error) { +func (c *FakeEndpointSlices) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.EndpointSlice, err error) { obj, err := c.Fake. Invokes(testing.NewGetAction(endpointslicesResource, c.ns, name), &v1alpha1.EndpointSlice{}) @@ -50,7 +52,7 @@ func (c *FakeEndpointSlices) Get(name string, options v1.GetOptions) (result *v1 } // List takes label and field selectors, and returns the list of EndpointSlices that match those selectors. -func (c *FakeEndpointSlices) List(opts v1.ListOptions) (result *v1alpha1.EndpointSliceList, err error) { +func (c *FakeEndpointSlices) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.EndpointSliceList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(endpointslicesResource, endpointslicesKind, c.ns, opts), &v1alpha1.EndpointSliceList{}) @@ -72,14 +74,14 @@ func (c *FakeEndpointSlices) List(opts v1.ListOptions) (result *v1alpha1.Endpoin } // Watch returns a watch.Interface that watches the requested endpointSlices. -func (c *FakeEndpointSlices) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeEndpointSlices) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(endpointslicesResource, c.ns, opts)) } // Create takes the representation of a endpointSlice and creates it. Returns the server's representation of the endpointSlice, and an error, if there is any. -func (c *FakeEndpointSlices) Create(endpointSlice *v1alpha1.EndpointSlice) (result *v1alpha1.EndpointSlice, err error) { +func (c *FakeEndpointSlices) Create(ctx context.Context, endpointSlice *v1alpha1.EndpointSlice, opts v1.CreateOptions) (result *v1alpha1.EndpointSlice, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(endpointslicesResource, c.ns, endpointSlice), &v1alpha1.EndpointSlice{}) @@ -90,7 +92,7 @@ func (c *FakeEndpointSlices) Create(endpointSlice *v1alpha1.EndpointSlice) (resu } // Update takes the representation of a endpointSlice and updates it. Returns the server's representation of the endpointSlice, and an error, if there is any. -func (c *FakeEndpointSlices) Update(endpointSlice *v1alpha1.EndpointSlice) (result *v1alpha1.EndpointSlice, err error) { +func (c *FakeEndpointSlices) Update(ctx context.Context, endpointSlice *v1alpha1.EndpointSlice, opts v1.UpdateOptions) (result *v1alpha1.EndpointSlice, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(endpointslicesResource, c.ns, endpointSlice), &v1alpha1.EndpointSlice{}) @@ -101,7 +103,7 @@ func (c *FakeEndpointSlices) Update(endpointSlice *v1alpha1.EndpointSlice) (resu } // Delete takes name of the endpointSlice and deletes it. Returns an error if one occurs. -func (c *FakeEndpointSlices) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeEndpointSlices) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewDeleteAction(endpointslicesResource, c.ns, name), &v1alpha1.EndpointSlice{}) @@ -109,15 +111,15 @@ func (c *FakeEndpointSlices) Delete(name string, options *v1.DeleteOptions) erro } // DeleteCollection deletes a collection of objects. -func (c *FakeEndpointSlices) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(endpointslicesResource, c.ns, listOptions) +func (c *FakeEndpointSlices) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(endpointslicesResource, c.ns, listOpts) _, err := c.Fake.Invokes(action, &v1alpha1.EndpointSliceList{}) return err } // Patch applies the patch and returns the patched endpointSlice. -func (c *FakeEndpointSlices) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.EndpointSlice, err error) { +func (c *FakeEndpointSlices) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.EndpointSlice, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(endpointslicesResource, c.ns, name, pt, data, subresources...), &v1alpha1.EndpointSlice{}) diff --git a/vendor/k8s.io/client-go/kubernetes/typed/discovery/v1beta1/endpointslice.go b/vendor/k8s.io/client-go/kubernetes/typed/discovery/v1beta1/endpointslice.go index bba656b8fd..a016663e73 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/discovery/v1beta1/endpointslice.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/discovery/v1beta1/endpointslice.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" "time" v1beta1 "k8s.io/api/discovery/v1beta1" @@ -37,14 +38,14 @@ type EndpointSlicesGetter interface { // EndpointSliceInterface has methods to work with EndpointSlice resources. type EndpointSliceInterface interface { - Create(*v1beta1.EndpointSlice) (*v1beta1.EndpointSlice, error) - Update(*v1beta1.EndpointSlice) (*v1beta1.EndpointSlice, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*v1beta1.EndpointSlice, error) - List(opts v1.ListOptions) (*v1beta1.EndpointSliceList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.EndpointSlice, err error) + Create(ctx context.Context, endpointSlice *v1beta1.EndpointSlice, opts v1.CreateOptions) (*v1beta1.EndpointSlice, error) + Update(ctx context.Context, endpointSlice *v1beta1.EndpointSlice, opts v1.UpdateOptions) (*v1beta1.EndpointSlice, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.EndpointSlice, error) + List(ctx context.Context, opts v1.ListOptions) (*v1beta1.EndpointSliceList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.EndpointSlice, err error) EndpointSliceExpansion } @@ -63,20 +64,20 @@ func newEndpointSlices(c *DiscoveryV1beta1Client, namespace string) *endpointSli } // Get takes name of the endpointSlice, and returns the corresponding endpointSlice object, and an error if there is any. -func (c *endpointSlices) Get(name string, options v1.GetOptions) (result *v1beta1.EndpointSlice, err error) { +func (c *endpointSlices) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.EndpointSlice, err error) { result = &v1beta1.EndpointSlice{} err = c.client.Get(). Namespace(c.ns). Resource("endpointslices"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of EndpointSlices that match those selectors. -func (c *endpointSlices) List(opts v1.ListOptions) (result *v1beta1.EndpointSliceList, err error) { +func (c *endpointSlices) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.EndpointSliceList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -87,13 +88,13 @@ func (c *endpointSlices) List(opts v1.ListOptions) (result *v1beta1.EndpointSlic Resource("endpointslices"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested endpointSlices. -func (c *endpointSlices) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *endpointSlices) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -104,71 +105,74 @@ func (c *endpointSlices) Watch(opts v1.ListOptions) (watch.Interface, error) { Resource("endpointslices"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a endpointSlice and creates it. Returns the server's representation of the endpointSlice, and an error, if there is any. -func (c *endpointSlices) Create(endpointSlice *v1beta1.EndpointSlice) (result *v1beta1.EndpointSlice, err error) { +func (c *endpointSlices) Create(ctx context.Context, endpointSlice *v1beta1.EndpointSlice, opts v1.CreateOptions) (result *v1beta1.EndpointSlice, err error) { result = &v1beta1.EndpointSlice{} err = c.client.Post(). Namespace(c.ns). Resource("endpointslices"). + VersionedParams(&opts, scheme.ParameterCodec). Body(endpointSlice). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a endpointSlice and updates it. Returns the server's representation of the endpointSlice, and an error, if there is any. -func (c *endpointSlices) Update(endpointSlice *v1beta1.EndpointSlice) (result *v1beta1.EndpointSlice, err error) { +func (c *endpointSlices) Update(ctx context.Context, endpointSlice *v1beta1.EndpointSlice, opts v1.UpdateOptions) (result *v1beta1.EndpointSlice, err error) { result = &v1beta1.EndpointSlice{} err = c.client.Put(). Namespace(c.ns). Resource("endpointslices"). Name(endpointSlice.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(endpointSlice). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the endpointSlice and deletes it. Returns an error if one occurs. -func (c *endpointSlices) Delete(name string, options *v1.DeleteOptions) error { +func (c *endpointSlices) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("endpointslices"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *endpointSlices) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *endpointSlices) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Namespace(c.ns). Resource("endpointslices"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched endpointSlice. -func (c *endpointSlices) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.EndpointSlice, err error) { +func (c *endpointSlices) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.EndpointSlice, err error) { result = &v1beta1.EndpointSlice{} err = c.client.Patch(pt). Namespace(c.ns). Resource("endpointslices"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/k8s.io/client-go/kubernetes/typed/discovery/v1beta1/fake/fake_endpointslice.go b/vendor/k8s.io/client-go/kubernetes/typed/discovery/v1beta1/fake/fake_endpointslice.go index ba13afea41..f338d1bd64 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/discovery/v1beta1/fake/fake_endpointslice.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/discovery/v1beta1/fake/fake_endpointslice.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + v1beta1 "k8s.io/api/discovery/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" @@ -39,7 +41,7 @@ var endpointslicesResource = schema.GroupVersionResource{Group: "discovery.k8s.i var endpointslicesKind = schema.GroupVersionKind{Group: "discovery.k8s.io", Version: "v1beta1", Kind: "EndpointSlice"} // Get takes name of the endpointSlice, and returns the corresponding endpointSlice object, and an error if there is any. -func (c *FakeEndpointSlices) Get(name string, options v1.GetOptions) (result *v1beta1.EndpointSlice, err error) { +func (c *FakeEndpointSlices) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.EndpointSlice, err error) { obj, err := c.Fake. Invokes(testing.NewGetAction(endpointslicesResource, c.ns, name), &v1beta1.EndpointSlice{}) @@ -50,7 +52,7 @@ func (c *FakeEndpointSlices) Get(name string, options v1.GetOptions) (result *v1 } // List takes label and field selectors, and returns the list of EndpointSlices that match those selectors. -func (c *FakeEndpointSlices) List(opts v1.ListOptions) (result *v1beta1.EndpointSliceList, err error) { +func (c *FakeEndpointSlices) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.EndpointSliceList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(endpointslicesResource, endpointslicesKind, c.ns, opts), &v1beta1.EndpointSliceList{}) @@ -72,14 +74,14 @@ func (c *FakeEndpointSlices) List(opts v1.ListOptions) (result *v1beta1.Endpoint } // Watch returns a watch.Interface that watches the requested endpointSlices. -func (c *FakeEndpointSlices) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeEndpointSlices) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(endpointslicesResource, c.ns, opts)) } // Create takes the representation of a endpointSlice and creates it. Returns the server's representation of the endpointSlice, and an error, if there is any. -func (c *FakeEndpointSlices) Create(endpointSlice *v1beta1.EndpointSlice) (result *v1beta1.EndpointSlice, err error) { +func (c *FakeEndpointSlices) Create(ctx context.Context, endpointSlice *v1beta1.EndpointSlice, opts v1.CreateOptions) (result *v1beta1.EndpointSlice, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(endpointslicesResource, c.ns, endpointSlice), &v1beta1.EndpointSlice{}) @@ -90,7 +92,7 @@ func (c *FakeEndpointSlices) Create(endpointSlice *v1beta1.EndpointSlice) (resul } // Update takes the representation of a endpointSlice and updates it. Returns the server's representation of the endpointSlice, and an error, if there is any. -func (c *FakeEndpointSlices) Update(endpointSlice *v1beta1.EndpointSlice) (result *v1beta1.EndpointSlice, err error) { +func (c *FakeEndpointSlices) Update(ctx context.Context, endpointSlice *v1beta1.EndpointSlice, opts v1.UpdateOptions) (result *v1beta1.EndpointSlice, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(endpointslicesResource, c.ns, endpointSlice), &v1beta1.EndpointSlice{}) @@ -101,7 +103,7 @@ func (c *FakeEndpointSlices) Update(endpointSlice *v1beta1.EndpointSlice) (resul } // Delete takes name of the endpointSlice and deletes it. Returns an error if one occurs. -func (c *FakeEndpointSlices) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeEndpointSlices) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewDeleteAction(endpointslicesResource, c.ns, name), &v1beta1.EndpointSlice{}) @@ -109,15 +111,15 @@ func (c *FakeEndpointSlices) Delete(name string, options *v1.DeleteOptions) erro } // DeleteCollection deletes a collection of objects. -func (c *FakeEndpointSlices) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(endpointslicesResource, c.ns, listOptions) +func (c *FakeEndpointSlices) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(endpointslicesResource, c.ns, listOpts) _, err := c.Fake.Invokes(action, &v1beta1.EndpointSliceList{}) return err } // Patch applies the patch and returns the patched endpointSlice. -func (c *FakeEndpointSlices) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.EndpointSlice, err error) { +func (c *FakeEndpointSlices) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.EndpointSlice, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(endpointslicesResource, c.ns, name, pt, data, subresources...), &v1beta1.EndpointSlice{}) diff --git a/vendor/k8s.io/client-go/kubernetes/typed/events/v1beta1/event.go b/vendor/k8s.io/client-go/kubernetes/typed/events/v1beta1/event.go index 143281b25c..4cdc471fb0 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/events/v1beta1/event.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/events/v1beta1/event.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" "time" v1beta1 "k8s.io/api/events/v1beta1" @@ -37,14 +38,14 @@ type EventsGetter interface { // EventInterface has methods to work with Event resources. type EventInterface interface { - Create(*v1beta1.Event) (*v1beta1.Event, error) - Update(*v1beta1.Event) (*v1beta1.Event, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*v1beta1.Event, error) - List(opts v1.ListOptions) (*v1beta1.EventList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Event, err error) + Create(ctx context.Context, event *v1beta1.Event, opts v1.CreateOptions) (*v1beta1.Event, error) + Update(ctx context.Context, event *v1beta1.Event, opts v1.UpdateOptions) (*v1beta1.Event, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.Event, error) + List(ctx context.Context, opts v1.ListOptions) (*v1beta1.EventList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Event, err error) EventExpansion } @@ -63,20 +64,20 @@ func newEvents(c *EventsV1beta1Client, namespace string) *events { } // Get takes name of the event, and returns the corresponding event object, and an error if there is any. -func (c *events) Get(name string, options v1.GetOptions) (result *v1beta1.Event, err error) { +func (c *events) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.Event, err error) { result = &v1beta1.Event{} err = c.client.Get(). Namespace(c.ns). Resource("events"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of Events that match those selectors. -func (c *events) List(opts v1.ListOptions) (result *v1beta1.EventList, err error) { +func (c *events) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.EventList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -87,13 +88,13 @@ func (c *events) List(opts v1.ListOptions) (result *v1beta1.EventList, err error Resource("events"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested events. -func (c *events) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *events) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -104,71 +105,74 @@ func (c *events) Watch(opts v1.ListOptions) (watch.Interface, error) { Resource("events"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a event and creates it. Returns the server's representation of the event, and an error, if there is any. -func (c *events) Create(event *v1beta1.Event) (result *v1beta1.Event, err error) { +func (c *events) Create(ctx context.Context, event *v1beta1.Event, opts v1.CreateOptions) (result *v1beta1.Event, err error) { result = &v1beta1.Event{} err = c.client.Post(). Namespace(c.ns). Resource("events"). + VersionedParams(&opts, scheme.ParameterCodec). Body(event). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a event and updates it. Returns the server's representation of the event, and an error, if there is any. -func (c *events) Update(event *v1beta1.Event) (result *v1beta1.Event, err error) { +func (c *events) Update(ctx context.Context, event *v1beta1.Event, opts v1.UpdateOptions) (result *v1beta1.Event, err error) { result = &v1beta1.Event{} err = c.client.Put(). Namespace(c.ns). Resource("events"). Name(event.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(event). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the event and deletes it. Returns an error if one occurs. -func (c *events) Delete(name string, options *v1.DeleteOptions) error { +func (c *events) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("events"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *events) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *events) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Namespace(c.ns). Resource("events"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched event. -func (c *events) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Event, err error) { +func (c *events) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Event, err error) { result = &v1beta1.Event{} err = c.client.Patch(pt). Namespace(c.ns). Resource("events"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/k8s.io/client-go/kubernetes/typed/events/v1beta1/event_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/events/v1beta1/event_expansion.go index 312ee4283d..e0ae41dfe7 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/events/v1beta1/event_expansion.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/events/v1beta1/event_expansion.go @@ -17,6 +17,7 @@ limitations under the License. package v1beta1 import ( + "context" "fmt" "k8s.io/api/events/v1beta1" @@ -51,7 +52,7 @@ func (e *events) CreateWithEventNamespace(event *v1beta1.Event) (*v1beta1.Event, NamespaceIfScoped(event.Namespace, len(event.Namespace) > 0). Resource("events"). Body(event). - Do(). + Do(context.TODO()). Into(result) return result, err } @@ -72,7 +73,7 @@ func (e *events) UpdateWithEventNamespace(event *v1beta1.Event) (*v1beta1.Event, Resource("events"). Name(event.Name). Body(event). - Do(). + Do(context.TODO()). Into(result) return result, err } @@ -92,7 +93,7 @@ func (e *events) PatchWithEventNamespace(event *v1beta1.Event, data []byte) (*v1 Resource("events"). Name(event.Name). Body(data). - Do(). + Do(context.TODO()). Into(result) return result, err } diff --git a/vendor/k8s.io/client-go/kubernetes/typed/events/v1beta1/fake/fake_event.go b/vendor/k8s.io/client-go/kubernetes/typed/events/v1beta1/fake/fake_event.go index ef76ec1318..dcf488f7c1 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/events/v1beta1/fake/fake_event.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/events/v1beta1/fake/fake_event.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + v1beta1 "k8s.io/api/events/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" @@ -39,7 +41,7 @@ var eventsResource = schema.GroupVersionResource{Group: "events.k8s.io", Version var eventsKind = schema.GroupVersionKind{Group: "events.k8s.io", Version: "v1beta1", Kind: "Event"} // Get takes name of the event, and returns the corresponding event object, and an error if there is any. -func (c *FakeEvents) Get(name string, options v1.GetOptions) (result *v1beta1.Event, err error) { +func (c *FakeEvents) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.Event, err error) { obj, err := c.Fake. Invokes(testing.NewGetAction(eventsResource, c.ns, name), &v1beta1.Event{}) @@ -50,7 +52,7 @@ func (c *FakeEvents) Get(name string, options v1.GetOptions) (result *v1beta1.Ev } // List takes label and field selectors, and returns the list of Events that match those selectors. -func (c *FakeEvents) List(opts v1.ListOptions) (result *v1beta1.EventList, err error) { +func (c *FakeEvents) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.EventList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(eventsResource, eventsKind, c.ns, opts), &v1beta1.EventList{}) @@ -72,14 +74,14 @@ func (c *FakeEvents) List(opts v1.ListOptions) (result *v1beta1.EventList, err e } // Watch returns a watch.Interface that watches the requested events. -func (c *FakeEvents) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeEvents) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(eventsResource, c.ns, opts)) } // Create takes the representation of a event and creates it. Returns the server's representation of the event, and an error, if there is any. -func (c *FakeEvents) Create(event *v1beta1.Event) (result *v1beta1.Event, err error) { +func (c *FakeEvents) Create(ctx context.Context, event *v1beta1.Event, opts v1.CreateOptions) (result *v1beta1.Event, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(eventsResource, c.ns, event), &v1beta1.Event{}) @@ -90,7 +92,7 @@ func (c *FakeEvents) Create(event *v1beta1.Event) (result *v1beta1.Event, err er } // Update takes the representation of a event and updates it. Returns the server's representation of the event, and an error, if there is any. -func (c *FakeEvents) Update(event *v1beta1.Event) (result *v1beta1.Event, err error) { +func (c *FakeEvents) Update(ctx context.Context, event *v1beta1.Event, opts v1.UpdateOptions) (result *v1beta1.Event, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(eventsResource, c.ns, event), &v1beta1.Event{}) @@ -101,7 +103,7 @@ func (c *FakeEvents) Update(event *v1beta1.Event) (result *v1beta1.Event, err er } // Delete takes name of the event and deletes it. Returns an error if one occurs. -func (c *FakeEvents) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeEvents) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewDeleteAction(eventsResource, c.ns, name), &v1beta1.Event{}) @@ -109,15 +111,15 @@ func (c *FakeEvents) Delete(name string, options *v1.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *FakeEvents) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(eventsResource, c.ns, listOptions) +func (c *FakeEvents) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(eventsResource, c.ns, listOpts) _, err := c.Fake.Invokes(action, &v1beta1.EventList{}) return err } // Patch applies the patch and returns the patched event. -func (c *FakeEvents) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Event, err error) { +func (c *FakeEvents) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Event, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(eventsResource, c.ns, name, pt, data, subresources...), &v1beta1.Event{}) diff --git a/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/daemonset.go b/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/daemonset.go index 93b1ae9b6d..0ba8bfc949 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/daemonset.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/daemonset.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" "time" v1beta1 "k8s.io/api/extensions/v1beta1" @@ -37,15 +38,15 @@ type DaemonSetsGetter interface { // DaemonSetInterface has methods to work with DaemonSet resources. type DaemonSetInterface interface { - Create(*v1beta1.DaemonSet) (*v1beta1.DaemonSet, error) - Update(*v1beta1.DaemonSet) (*v1beta1.DaemonSet, error) - UpdateStatus(*v1beta1.DaemonSet) (*v1beta1.DaemonSet, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*v1beta1.DaemonSet, error) - List(opts v1.ListOptions) (*v1beta1.DaemonSetList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.DaemonSet, err error) + Create(ctx context.Context, daemonSet *v1beta1.DaemonSet, opts v1.CreateOptions) (*v1beta1.DaemonSet, error) + Update(ctx context.Context, daemonSet *v1beta1.DaemonSet, opts v1.UpdateOptions) (*v1beta1.DaemonSet, error) + UpdateStatus(ctx context.Context, daemonSet *v1beta1.DaemonSet, opts v1.UpdateOptions) (*v1beta1.DaemonSet, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.DaemonSet, error) + List(ctx context.Context, opts v1.ListOptions) (*v1beta1.DaemonSetList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.DaemonSet, err error) DaemonSetExpansion } @@ -64,20 +65,20 @@ func newDaemonSets(c *ExtensionsV1beta1Client, namespace string) *daemonSets { } // Get takes name of the daemonSet, and returns the corresponding daemonSet object, and an error if there is any. -func (c *daemonSets) Get(name string, options v1.GetOptions) (result *v1beta1.DaemonSet, err error) { +func (c *daemonSets) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.DaemonSet, err error) { result = &v1beta1.DaemonSet{} err = c.client.Get(). Namespace(c.ns). Resource("daemonsets"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of DaemonSets that match those selectors. -func (c *daemonSets) List(opts v1.ListOptions) (result *v1beta1.DaemonSetList, err error) { +func (c *daemonSets) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.DaemonSetList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -88,13 +89,13 @@ func (c *daemonSets) List(opts v1.ListOptions) (result *v1beta1.DaemonSetList, e Resource("daemonsets"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested daemonSets. -func (c *daemonSets) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *daemonSets) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -105,87 +106,90 @@ func (c *daemonSets) Watch(opts v1.ListOptions) (watch.Interface, error) { Resource("daemonsets"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a daemonSet and creates it. Returns the server's representation of the daemonSet, and an error, if there is any. -func (c *daemonSets) Create(daemonSet *v1beta1.DaemonSet) (result *v1beta1.DaemonSet, err error) { +func (c *daemonSets) Create(ctx context.Context, daemonSet *v1beta1.DaemonSet, opts v1.CreateOptions) (result *v1beta1.DaemonSet, err error) { result = &v1beta1.DaemonSet{} err = c.client.Post(). Namespace(c.ns). Resource("daemonsets"). + VersionedParams(&opts, scheme.ParameterCodec). Body(daemonSet). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a daemonSet and updates it. Returns the server's representation of the daemonSet, and an error, if there is any. -func (c *daemonSets) Update(daemonSet *v1beta1.DaemonSet) (result *v1beta1.DaemonSet, err error) { +func (c *daemonSets) Update(ctx context.Context, daemonSet *v1beta1.DaemonSet, opts v1.UpdateOptions) (result *v1beta1.DaemonSet, err error) { result = &v1beta1.DaemonSet{} err = c.client.Put(). Namespace(c.ns). Resource("daemonsets"). Name(daemonSet.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(daemonSet). - Do(). + Do(ctx). Into(result) return } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *daemonSets) UpdateStatus(daemonSet *v1beta1.DaemonSet) (result *v1beta1.DaemonSet, err error) { +func (c *daemonSets) UpdateStatus(ctx context.Context, daemonSet *v1beta1.DaemonSet, opts v1.UpdateOptions) (result *v1beta1.DaemonSet, err error) { result = &v1beta1.DaemonSet{} err = c.client.Put(). Namespace(c.ns). Resource("daemonsets"). Name(daemonSet.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(daemonSet). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the daemonSet and deletes it. Returns an error if one occurs. -func (c *daemonSets) Delete(name string, options *v1.DeleteOptions) error { +func (c *daemonSets) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("daemonsets"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *daemonSets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *daemonSets) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Namespace(c.ns). Resource("daemonsets"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched daemonSet. -func (c *daemonSets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.DaemonSet, err error) { +func (c *daemonSets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.DaemonSet, err error) { result = &v1beta1.DaemonSet{} err = c.client.Patch(pt). Namespace(c.ns). Resource("daemonsets"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/deployment.go b/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/deployment.go index 5557b9f2b1..4265f6decb 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/deployment.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/deployment.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" "time" v1beta1 "k8s.io/api/extensions/v1beta1" @@ -37,17 +38,17 @@ type DeploymentsGetter interface { // DeploymentInterface has methods to work with Deployment resources. type DeploymentInterface interface { - Create(*v1beta1.Deployment) (*v1beta1.Deployment, error) - Update(*v1beta1.Deployment) (*v1beta1.Deployment, error) - UpdateStatus(*v1beta1.Deployment) (*v1beta1.Deployment, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*v1beta1.Deployment, error) - List(opts v1.ListOptions) (*v1beta1.DeploymentList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Deployment, err error) - GetScale(deploymentName string, options v1.GetOptions) (*v1beta1.Scale, error) - UpdateScale(deploymentName string, scale *v1beta1.Scale) (*v1beta1.Scale, error) + Create(ctx context.Context, deployment *v1beta1.Deployment, opts v1.CreateOptions) (*v1beta1.Deployment, error) + Update(ctx context.Context, deployment *v1beta1.Deployment, opts v1.UpdateOptions) (*v1beta1.Deployment, error) + UpdateStatus(ctx context.Context, deployment *v1beta1.Deployment, opts v1.UpdateOptions) (*v1beta1.Deployment, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.Deployment, error) + List(ctx context.Context, opts v1.ListOptions) (*v1beta1.DeploymentList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Deployment, err error) + GetScale(ctx context.Context, deploymentName string, options v1.GetOptions) (*v1beta1.Scale, error) + UpdateScale(ctx context.Context, deploymentName string, scale *v1beta1.Scale, opts v1.UpdateOptions) (*v1beta1.Scale, error) DeploymentExpansion } @@ -67,20 +68,20 @@ func newDeployments(c *ExtensionsV1beta1Client, namespace string) *deployments { } // Get takes name of the deployment, and returns the corresponding deployment object, and an error if there is any. -func (c *deployments) Get(name string, options v1.GetOptions) (result *v1beta1.Deployment, err error) { +func (c *deployments) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.Deployment, err error) { result = &v1beta1.Deployment{} err = c.client.Get(). Namespace(c.ns). Resource("deployments"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of Deployments that match those selectors. -func (c *deployments) List(opts v1.ListOptions) (result *v1beta1.DeploymentList, err error) { +func (c *deployments) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.DeploymentList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -91,13 +92,13 @@ func (c *deployments) List(opts v1.ListOptions) (result *v1beta1.DeploymentList, Resource("deployments"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested deployments. -func (c *deployments) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *deployments) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -108,93 +109,96 @@ func (c *deployments) Watch(opts v1.ListOptions) (watch.Interface, error) { Resource("deployments"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a deployment and creates it. Returns the server's representation of the deployment, and an error, if there is any. -func (c *deployments) Create(deployment *v1beta1.Deployment) (result *v1beta1.Deployment, err error) { +func (c *deployments) Create(ctx context.Context, deployment *v1beta1.Deployment, opts v1.CreateOptions) (result *v1beta1.Deployment, err error) { result = &v1beta1.Deployment{} err = c.client.Post(). Namespace(c.ns). Resource("deployments"). + VersionedParams(&opts, scheme.ParameterCodec). Body(deployment). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a deployment and updates it. Returns the server's representation of the deployment, and an error, if there is any. -func (c *deployments) Update(deployment *v1beta1.Deployment) (result *v1beta1.Deployment, err error) { +func (c *deployments) Update(ctx context.Context, deployment *v1beta1.Deployment, opts v1.UpdateOptions) (result *v1beta1.Deployment, err error) { result = &v1beta1.Deployment{} err = c.client.Put(). Namespace(c.ns). Resource("deployments"). Name(deployment.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(deployment). - Do(). + Do(ctx). Into(result) return } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *deployments) UpdateStatus(deployment *v1beta1.Deployment) (result *v1beta1.Deployment, err error) { +func (c *deployments) UpdateStatus(ctx context.Context, deployment *v1beta1.Deployment, opts v1.UpdateOptions) (result *v1beta1.Deployment, err error) { result = &v1beta1.Deployment{} err = c.client.Put(). Namespace(c.ns). Resource("deployments"). Name(deployment.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(deployment). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the deployment and deletes it. Returns an error if one occurs. -func (c *deployments) Delete(name string, options *v1.DeleteOptions) error { +func (c *deployments) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("deployments"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *deployments) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *deployments) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Namespace(c.ns). Resource("deployments"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched deployment. -func (c *deployments) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Deployment, err error) { +func (c *deployments) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Deployment, err error) { result = &v1beta1.Deployment{} err = c.client.Patch(pt). Namespace(c.ns). Resource("deployments"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } // GetScale takes name of the deployment, and returns the corresponding v1beta1.Scale object, and an error if there is any. -func (c *deployments) GetScale(deploymentName string, options v1.GetOptions) (result *v1beta1.Scale, err error) { +func (c *deployments) GetScale(ctx context.Context, deploymentName string, options v1.GetOptions) (result *v1beta1.Scale, err error) { result = &v1beta1.Scale{} err = c.client.Get(). Namespace(c.ns). @@ -202,21 +206,22 @@ func (c *deployments) GetScale(deploymentName string, options v1.GetOptions) (re Name(deploymentName). SubResource("scale"). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // UpdateScale takes the top resource name and the representation of a scale and updates it. Returns the server's representation of the scale, and an error, if there is any. -func (c *deployments) UpdateScale(deploymentName string, scale *v1beta1.Scale) (result *v1beta1.Scale, err error) { +func (c *deployments) UpdateScale(ctx context.Context, deploymentName string, scale *v1beta1.Scale, opts v1.UpdateOptions) (result *v1beta1.Scale, err error) { result = &v1beta1.Scale{} err = c.client.Put(). Namespace(c.ns). Resource("deployments"). Name(deploymentName). SubResource("scale"). + VersionedParams(&opts, scheme.ParameterCodec). Body(scale). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/deployment_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/deployment_expansion.go index 24734be6a6..5c409ac996 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/deployment_expansion.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/deployment_expansion.go @@ -16,14 +16,20 @@ limitations under the License. package v1beta1 -import "k8s.io/api/extensions/v1beta1" +import ( + "context" + + "k8s.io/api/extensions/v1beta1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + scheme "k8s.io/client-go/kubernetes/scheme" +) // The DeploymentExpansion interface allows manually adding extra methods to the DeploymentInterface. type DeploymentExpansion interface { - Rollback(*v1beta1.DeploymentRollback) error + Rollback(context.Context, *v1beta1.DeploymentRollback, metav1.CreateOptions) error } // Rollback applied the provided DeploymentRollback to the named deployment in the current namespace. -func (c *deployments) Rollback(deploymentRollback *v1beta1.DeploymentRollback) error { - return c.client.Post().Namespace(c.ns).Resource("deployments").Name(deploymentRollback.Name).SubResource("rollback").Body(deploymentRollback).Do().Error() +func (c *deployments) Rollback(ctx context.Context, deploymentRollback *v1beta1.DeploymentRollback, opts metav1.CreateOptions) error { + return c.client.Post().Namespace(c.ns).Resource("deployments").Name(deploymentRollback.Name).VersionedParams(&opts, scheme.ParameterCodec).SubResource("rollback").Body(deploymentRollback).Do(ctx).Error() } diff --git a/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_daemonset.go b/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_daemonset.go index 4c98660607..75e9132e6e 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_daemonset.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_daemonset.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + v1beta1 "k8s.io/api/extensions/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" @@ -39,7 +41,7 @@ var daemonsetsResource = schema.GroupVersionResource{Group: "extensions", Versio var daemonsetsKind = schema.GroupVersionKind{Group: "extensions", Version: "v1beta1", Kind: "DaemonSet"} // Get takes name of the daemonSet, and returns the corresponding daemonSet object, and an error if there is any. -func (c *FakeDaemonSets) Get(name string, options v1.GetOptions) (result *v1beta1.DaemonSet, err error) { +func (c *FakeDaemonSets) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.DaemonSet, err error) { obj, err := c.Fake. Invokes(testing.NewGetAction(daemonsetsResource, c.ns, name), &v1beta1.DaemonSet{}) @@ -50,7 +52,7 @@ func (c *FakeDaemonSets) Get(name string, options v1.GetOptions) (result *v1beta } // List takes label and field selectors, and returns the list of DaemonSets that match those selectors. -func (c *FakeDaemonSets) List(opts v1.ListOptions) (result *v1beta1.DaemonSetList, err error) { +func (c *FakeDaemonSets) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.DaemonSetList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(daemonsetsResource, daemonsetsKind, c.ns, opts), &v1beta1.DaemonSetList{}) @@ -72,14 +74,14 @@ func (c *FakeDaemonSets) List(opts v1.ListOptions) (result *v1beta1.DaemonSetLis } // Watch returns a watch.Interface that watches the requested daemonSets. -func (c *FakeDaemonSets) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeDaemonSets) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(daemonsetsResource, c.ns, opts)) } // Create takes the representation of a daemonSet and creates it. Returns the server's representation of the daemonSet, and an error, if there is any. -func (c *FakeDaemonSets) Create(daemonSet *v1beta1.DaemonSet) (result *v1beta1.DaemonSet, err error) { +func (c *FakeDaemonSets) Create(ctx context.Context, daemonSet *v1beta1.DaemonSet, opts v1.CreateOptions) (result *v1beta1.DaemonSet, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(daemonsetsResource, c.ns, daemonSet), &v1beta1.DaemonSet{}) @@ -90,7 +92,7 @@ func (c *FakeDaemonSets) Create(daemonSet *v1beta1.DaemonSet) (result *v1beta1.D } // Update takes the representation of a daemonSet and updates it. Returns the server's representation of the daemonSet, and an error, if there is any. -func (c *FakeDaemonSets) Update(daemonSet *v1beta1.DaemonSet) (result *v1beta1.DaemonSet, err error) { +func (c *FakeDaemonSets) Update(ctx context.Context, daemonSet *v1beta1.DaemonSet, opts v1.UpdateOptions) (result *v1beta1.DaemonSet, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(daemonsetsResource, c.ns, daemonSet), &v1beta1.DaemonSet{}) @@ -102,7 +104,7 @@ func (c *FakeDaemonSets) Update(daemonSet *v1beta1.DaemonSet) (result *v1beta1.D // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeDaemonSets) UpdateStatus(daemonSet *v1beta1.DaemonSet) (*v1beta1.DaemonSet, error) { +func (c *FakeDaemonSets) UpdateStatus(ctx context.Context, daemonSet *v1beta1.DaemonSet, opts v1.UpdateOptions) (*v1beta1.DaemonSet, error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(daemonsetsResource, "status", c.ns, daemonSet), &v1beta1.DaemonSet{}) @@ -113,7 +115,7 @@ func (c *FakeDaemonSets) UpdateStatus(daemonSet *v1beta1.DaemonSet) (*v1beta1.Da } // Delete takes name of the daemonSet and deletes it. Returns an error if one occurs. -func (c *FakeDaemonSets) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeDaemonSets) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewDeleteAction(daemonsetsResource, c.ns, name), &v1beta1.DaemonSet{}) @@ -121,15 +123,15 @@ func (c *FakeDaemonSets) Delete(name string, options *v1.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *FakeDaemonSets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(daemonsetsResource, c.ns, listOptions) +func (c *FakeDaemonSets) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(daemonsetsResource, c.ns, listOpts) _, err := c.Fake.Invokes(action, &v1beta1.DaemonSetList{}) return err } // Patch applies the patch and returns the patched daemonSet. -func (c *FakeDaemonSets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.DaemonSet, err error) { +func (c *FakeDaemonSets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.DaemonSet, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(daemonsetsResource, c.ns, name, pt, data, subresources...), &v1beta1.DaemonSet{}) diff --git a/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_deployment.go b/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_deployment.go index 7b7df45cc3..2841b7b877 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_deployment.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_deployment.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + v1beta1 "k8s.io/api/extensions/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" @@ -39,7 +41,7 @@ var deploymentsResource = schema.GroupVersionResource{Group: "extensions", Versi var deploymentsKind = schema.GroupVersionKind{Group: "extensions", Version: "v1beta1", Kind: "Deployment"} // Get takes name of the deployment, and returns the corresponding deployment object, and an error if there is any. -func (c *FakeDeployments) Get(name string, options v1.GetOptions) (result *v1beta1.Deployment, err error) { +func (c *FakeDeployments) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.Deployment, err error) { obj, err := c.Fake. Invokes(testing.NewGetAction(deploymentsResource, c.ns, name), &v1beta1.Deployment{}) @@ -50,7 +52,7 @@ func (c *FakeDeployments) Get(name string, options v1.GetOptions) (result *v1bet } // List takes label and field selectors, and returns the list of Deployments that match those selectors. -func (c *FakeDeployments) List(opts v1.ListOptions) (result *v1beta1.DeploymentList, err error) { +func (c *FakeDeployments) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.DeploymentList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(deploymentsResource, deploymentsKind, c.ns, opts), &v1beta1.DeploymentList{}) @@ -72,14 +74,14 @@ func (c *FakeDeployments) List(opts v1.ListOptions) (result *v1beta1.DeploymentL } // Watch returns a watch.Interface that watches the requested deployments. -func (c *FakeDeployments) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeDeployments) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(deploymentsResource, c.ns, opts)) } // Create takes the representation of a deployment and creates it. Returns the server's representation of the deployment, and an error, if there is any. -func (c *FakeDeployments) Create(deployment *v1beta1.Deployment) (result *v1beta1.Deployment, err error) { +func (c *FakeDeployments) Create(ctx context.Context, deployment *v1beta1.Deployment, opts v1.CreateOptions) (result *v1beta1.Deployment, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(deploymentsResource, c.ns, deployment), &v1beta1.Deployment{}) @@ -90,7 +92,7 @@ func (c *FakeDeployments) Create(deployment *v1beta1.Deployment) (result *v1beta } // Update takes the representation of a deployment and updates it. Returns the server's representation of the deployment, and an error, if there is any. -func (c *FakeDeployments) Update(deployment *v1beta1.Deployment) (result *v1beta1.Deployment, err error) { +func (c *FakeDeployments) Update(ctx context.Context, deployment *v1beta1.Deployment, opts v1.UpdateOptions) (result *v1beta1.Deployment, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(deploymentsResource, c.ns, deployment), &v1beta1.Deployment{}) @@ -102,7 +104,7 @@ func (c *FakeDeployments) Update(deployment *v1beta1.Deployment) (result *v1beta // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeDeployments) UpdateStatus(deployment *v1beta1.Deployment) (*v1beta1.Deployment, error) { +func (c *FakeDeployments) UpdateStatus(ctx context.Context, deployment *v1beta1.Deployment, opts v1.UpdateOptions) (*v1beta1.Deployment, error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(deploymentsResource, "status", c.ns, deployment), &v1beta1.Deployment{}) @@ -113,7 +115,7 @@ func (c *FakeDeployments) UpdateStatus(deployment *v1beta1.Deployment) (*v1beta1 } // Delete takes name of the deployment and deletes it. Returns an error if one occurs. -func (c *FakeDeployments) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeDeployments) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewDeleteAction(deploymentsResource, c.ns, name), &v1beta1.Deployment{}) @@ -121,15 +123,15 @@ func (c *FakeDeployments) Delete(name string, options *v1.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *FakeDeployments) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(deploymentsResource, c.ns, listOptions) +func (c *FakeDeployments) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(deploymentsResource, c.ns, listOpts) _, err := c.Fake.Invokes(action, &v1beta1.DeploymentList{}) return err } // Patch applies the patch and returns the patched deployment. -func (c *FakeDeployments) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Deployment, err error) { +func (c *FakeDeployments) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Deployment, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(deploymentsResource, c.ns, name, pt, data, subresources...), &v1beta1.Deployment{}) @@ -140,7 +142,7 @@ func (c *FakeDeployments) Patch(name string, pt types.PatchType, data []byte, su } // GetScale takes name of the deployment, and returns the corresponding scale object, and an error if there is any. -func (c *FakeDeployments) GetScale(deploymentName string, options v1.GetOptions) (result *v1beta1.Scale, err error) { +func (c *FakeDeployments) GetScale(ctx context.Context, deploymentName string, options v1.GetOptions) (result *v1beta1.Scale, err error) { obj, err := c.Fake. Invokes(testing.NewGetSubresourceAction(deploymentsResource, c.ns, "scale", deploymentName), &v1beta1.Scale{}) @@ -151,7 +153,7 @@ func (c *FakeDeployments) GetScale(deploymentName string, options v1.GetOptions) } // UpdateScale takes the representation of a scale and updates it. Returns the server's representation of the scale, and an error, if there is any. -func (c *FakeDeployments) UpdateScale(deploymentName string, scale *v1beta1.Scale) (result *v1beta1.Scale, err error) { +func (c *FakeDeployments) UpdateScale(ctx context.Context, deploymentName string, scale *v1beta1.Scale, opts v1.UpdateOptions) (result *v1beta1.Scale, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(deploymentsResource, "scale", c.ns, scale), &v1beta1.Scale{}) diff --git a/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_deployment_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_deployment_expansion.go index af2bc0f713..6ea1acd853 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_deployment_expansion.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_deployment_expansion.go @@ -17,11 +17,14 @@ limitations under the License. package fake import ( + "context" + "k8s.io/api/extensions/v1beta1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" core "k8s.io/client-go/testing" ) -func (c *FakeDeployments) Rollback(deploymentRollback *v1beta1.DeploymentRollback) error { +func (c *FakeDeployments) Rollback(ctx context.Context, deploymentRollback *v1beta1.DeploymentRollback, opts metav1.CreateOptions) error { action := core.CreateActionImpl{} action.Verb = "create" action.Resource = deploymentsResource diff --git a/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_ingress.go b/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_ingress.go index 01c2521401..01a3cf1adb 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_ingress.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_ingress.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + v1beta1 "k8s.io/api/extensions/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" @@ -39,7 +41,7 @@ var ingressesResource = schema.GroupVersionResource{Group: "extensions", Version var ingressesKind = schema.GroupVersionKind{Group: "extensions", Version: "v1beta1", Kind: "Ingress"} // Get takes name of the ingress, and returns the corresponding ingress object, and an error if there is any. -func (c *FakeIngresses) Get(name string, options v1.GetOptions) (result *v1beta1.Ingress, err error) { +func (c *FakeIngresses) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.Ingress, err error) { obj, err := c.Fake. Invokes(testing.NewGetAction(ingressesResource, c.ns, name), &v1beta1.Ingress{}) @@ -50,7 +52,7 @@ func (c *FakeIngresses) Get(name string, options v1.GetOptions) (result *v1beta1 } // List takes label and field selectors, and returns the list of Ingresses that match those selectors. -func (c *FakeIngresses) List(opts v1.ListOptions) (result *v1beta1.IngressList, err error) { +func (c *FakeIngresses) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.IngressList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(ingressesResource, ingressesKind, c.ns, opts), &v1beta1.IngressList{}) @@ -72,14 +74,14 @@ func (c *FakeIngresses) List(opts v1.ListOptions) (result *v1beta1.IngressList, } // Watch returns a watch.Interface that watches the requested ingresses. -func (c *FakeIngresses) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeIngresses) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(ingressesResource, c.ns, opts)) } // Create takes the representation of a ingress and creates it. Returns the server's representation of the ingress, and an error, if there is any. -func (c *FakeIngresses) Create(ingress *v1beta1.Ingress) (result *v1beta1.Ingress, err error) { +func (c *FakeIngresses) Create(ctx context.Context, ingress *v1beta1.Ingress, opts v1.CreateOptions) (result *v1beta1.Ingress, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(ingressesResource, c.ns, ingress), &v1beta1.Ingress{}) @@ -90,7 +92,7 @@ func (c *FakeIngresses) Create(ingress *v1beta1.Ingress) (result *v1beta1.Ingres } // Update takes the representation of a ingress and updates it. Returns the server's representation of the ingress, and an error, if there is any. -func (c *FakeIngresses) Update(ingress *v1beta1.Ingress) (result *v1beta1.Ingress, err error) { +func (c *FakeIngresses) Update(ctx context.Context, ingress *v1beta1.Ingress, opts v1.UpdateOptions) (result *v1beta1.Ingress, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(ingressesResource, c.ns, ingress), &v1beta1.Ingress{}) @@ -102,7 +104,7 @@ func (c *FakeIngresses) Update(ingress *v1beta1.Ingress) (result *v1beta1.Ingres // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeIngresses) UpdateStatus(ingress *v1beta1.Ingress) (*v1beta1.Ingress, error) { +func (c *FakeIngresses) UpdateStatus(ctx context.Context, ingress *v1beta1.Ingress, opts v1.UpdateOptions) (*v1beta1.Ingress, error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(ingressesResource, "status", c.ns, ingress), &v1beta1.Ingress{}) @@ -113,7 +115,7 @@ func (c *FakeIngresses) UpdateStatus(ingress *v1beta1.Ingress) (*v1beta1.Ingress } // Delete takes name of the ingress and deletes it. Returns an error if one occurs. -func (c *FakeIngresses) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeIngresses) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewDeleteAction(ingressesResource, c.ns, name), &v1beta1.Ingress{}) @@ -121,15 +123,15 @@ func (c *FakeIngresses) Delete(name string, options *v1.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *FakeIngresses) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(ingressesResource, c.ns, listOptions) +func (c *FakeIngresses) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(ingressesResource, c.ns, listOpts) _, err := c.Fake.Invokes(action, &v1beta1.IngressList{}) return err } // Patch applies the patch and returns the patched ingress. -func (c *FakeIngresses) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Ingress, err error) { +func (c *FakeIngresses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Ingress, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(ingressesResource, c.ns, name, pt, data, subresources...), &v1beta1.Ingress{}) diff --git a/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_networkpolicy.go b/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_networkpolicy.go index 7f4d4a5554..e97a54eaaf 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_networkpolicy.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_networkpolicy.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + v1beta1 "k8s.io/api/extensions/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" @@ -39,7 +41,7 @@ var networkpoliciesResource = schema.GroupVersionResource{Group: "extensions", V var networkpoliciesKind = schema.GroupVersionKind{Group: "extensions", Version: "v1beta1", Kind: "NetworkPolicy"} // Get takes name of the networkPolicy, and returns the corresponding networkPolicy object, and an error if there is any. -func (c *FakeNetworkPolicies) Get(name string, options v1.GetOptions) (result *v1beta1.NetworkPolicy, err error) { +func (c *FakeNetworkPolicies) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.NetworkPolicy, err error) { obj, err := c.Fake. Invokes(testing.NewGetAction(networkpoliciesResource, c.ns, name), &v1beta1.NetworkPolicy{}) @@ -50,7 +52,7 @@ func (c *FakeNetworkPolicies) Get(name string, options v1.GetOptions) (result *v } // List takes label and field selectors, and returns the list of NetworkPolicies that match those selectors. -func (c *FakeNetworkPolicies) List(opts v1.ListOptions) (result *v1beta1.NetworkPolicyList, err error) { +func (c *FakeNetworkPolicies) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.NetworkPolicyList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(networkpoliciesResource, networkpoliciesKind, c.ns, opts), &v1beta1.NetworkPolicyList{}) @@ -72,14 +74,14 @@ func (c *FakeNetworkPolicies) List(opts v1.ListOptions) (result *v1beta1.Network } // Watch returns a watch.Interface that watches the requested networkPolicies. -func (c *FakeNetworkPolicies) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeNetworkPolicies) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(networkpoliciesResource, c.ns, opts)) } // Create takes the representation of a networkPolicy and creates it. Returns the server's representation of the networkPolicy, and an error, if there is any. -func (c *FakeNetworkPolicies) Create(networkPolicy *v1beta1.NetworkPolicy) (result *v1beta1.NetworkPolicy, err error) { +func (c *FakeNetworkPolicies) Create(ctx context.Context, networkPolicy *v1beta1.NetworkPolicy, opts v1.CreateOptions) (result *v1beta1.NetworkPolicy, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(networkpoliciesResource, c.ns, networkPolicy), &v1beta1.NetworkPolicy{}) @@ -90,7 +92,7 @@ func (c *FakeNetworkPolicies) Create(networkPolicy *v1beta1.NetworkPolicy) (resu } // Update takes the representation of a networkPolicy and updates it. Returns the server's representation of the networkPolicy, and an error, if there is any. -func (c *FakeNetworkPolicies) Update(networkPolicy *v1beta1.NetworkPolicy) (result *v1beta1.NetworkPolicy, err error) { +func (c *FakeNetworkPolicies) Update(ctx context.Context, networkPolicy *v1beta1.NetworkPolicy, opts v1.UpdateOptions) (result *v1beta1.NetworkPolicy, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(networkpoliciesResource, c.ns, networkPolicy), &v1beta1.NetworkPolicy{}) @@ -101,7 +103,7 @@ func (c *FakeNetworkPolicies) Update(networkPolicy *v1beta1.NetworkPolicy) (resu } // Delete takes name of the networkPolicy and deletes it. Returns an error if one occurs. -func (c *FakeNetworkPolicies) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeNetworkPolicies) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewDeleteAction(networkpoliciesResource, c.ns, name), &v1beta1.NetworkPolicy{}) @@ -109,15 +111,15 @@ func (c *FakeNetworkPolicies) Delete(name string, options *v1.DeleteOptions) err } // DeleteCollection deletes a collection of objects. -func (c *FakeNetworkPolicies) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(networkpoliciesResource, c.ns, listOptions) +func (c *FakeNetworkPolicies) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(networkpoliciesResource, c.ns, listOpts) _, err := c.Fake.Invokes(action, &v1beta1.NetworkPolicyList{}) return err } // Patch applies the patch and returns the patched networkPolicy. -func (c *FakeNetworkPolicies) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.NetworkPolicy, err error) { +func (c *FakeNetworkPolicies) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.NetworkPolicy, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(networkpoliciesResource, c.ns, name, pt, data, subresources...), &v1beta1.NetworkPolicy{}) diff --git a/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_podsecuritypolicy.go b/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_podsecuritypolicy.go index b97a34416e..adb7d30fbd 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_podsecuritypolicy.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_podsecuritypolicy.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + v1beta1 "k8s.io/api/extensions/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" @@ -38,7 +40,7 @@ var podsecuritypoliciesResource = schema.GroupVersionResource{Group: "extensions var podsecuritypoliciesKind = schema.GroupVersionKind{Group: "extensions", Version: "v1beta1", Kind: "PodSecurityPolicy"} // Get takes name of the podSecurityPolicy, and returns the corresponding podSecurityPolicy object, and an error if there is any. -func (c *FakePodSecurityPolicies) Get(name string, options v1.GetOptions) (result *v1beta1.PodSecurityPolicy, err error) { +func (c *FakePodSecurityPolicies) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.PodSecurityPolicy, err error) { obj, err := c.Fake. Invokes(testing.NewRootGetAction(podsecuritypoliciesResource, name), &v1beta1.PodSecurityPolicy{}) if obj == nil { @@ -48,7 +50,7 @@ func (c *FakePodSecurityPolicies) Get(name string, options v1.GetOptions) (resul } // List takes label and field selectors, and returns the list of PodSecurityPolicies that match those selectors. -func (c *FakePodSecurityPolicies) List(opts v1.ListOptions) (result *v1beta1.PodSecurityPolicyList, err error) { +func (c *FakePodSecurityPolicies) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.PodSecurityPolicyList, err error) { obj, err := c.Fake. Invokes(testing.NewRootListAction(podsecuritypoliciesResource, podsecuritypoliciesKind, opts), &v1beta1.PodSecurityPolicyList{}) if obj == nil { @@ -69,13 +71,13 @@ func (c *FakePodSecurityPolicies) List(opts v1.ListOptions) (result *v1beta1.Pod } // Watch returns a watch.Interface that watches the requested podSecurityPolicies. -func (c *FakePodSecurityPolicies) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakePodSecurityPolicies) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewRootWatchAction(podsecuritypoliciesResource, opts)) } // Create takes the representation of a podSecurityPolicy and creates it. Returns the server's representation of the podSecurityPolicy, and an error, if there is any. -func (c *FakePodSecurityPolicies) Create(podSecurityPolicy *v1beta1.PodSecurityPolicy) (result *v1beta1.PodSecurityPolicy, err error) { +func (c *FakePodSecurityPolicies) Create(ctx context.Context, podSecurityPolicy *v1beta1.PodSecurityPolicy, opts v1.CreateOptions) (result *v1beta1.PodSecurityPolicy, err error) { obj, err := c.Fake. Invokes(testing.NewRootCreateAction(podsecuritypoliciesResource, podSecurityPolicy), &v1beta1.PodSecurityPolicy{}) if obj == nil { @@ -85,7 +87,7 @@ func (c *FakePodSecurityPolicies) Create(podSecurityPolicy *v1beta1.PodSecurityP } // Update takes the representation of a podSecurityPolicy and updates it. Returns the server's representation of the podSecurityPolicy, and an error, if there is any. -func (c *FakePodSecurityPolicies) Update(podSecurityPolicy *v1beta1.PodSecurityPolicy) (result *v1beta1.PodSecurityPolicy, err error) { +func (c *FakePodSecurityPolicies) Update(ctx context.Context, podSecurityPolicy *v1beta1.PodSecurityPolicy, opts v1.UpdateOptions) (result *v1beta1.PodSecurityPolicy, err error) { obj, err := c.Fake. Invokes(testing.NewRootUpdateAction(podsecuritypoliciesResource, podSecurityPolicy), &v1beta1.PodSecurityPolicy{}) if obj == nil { @@ -95,22 +97,22 @@ func (c *FakePodSecurityPolicies) Update(podSecurityPolicy *v1beta1.PodSecurityP } // Delete takes name of the podSecurityPolicy and deletes it. Returns an error if one occurs. -func (c *FakePodSecurityPolicies) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakePodSecurityPolicies) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewRootDeleteAction(podsecuritypoliciesResource, name), &v1beta1.PodSecurityPolicy{}) return err } // DeleteCollection deletes a collection of objects. -func (c *FakePodSecurityPolicies) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewRootDeleteCollectionAction(podsecuritypoliciesResource, listOptions) +func (c *FakePodSecurityPolicies) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(podsecuritypoliciesResource, listOpts) _, err := c.Fake.Invokes(action, &v1beta1.PodSecurityPolicyList{}) return err } // Patch applies the patch and returns the patched podSecurityPolicy. -func (c *FakePodSecurityPolicies) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.PodSecurityPolicy, err error) { +func (c *FakePodSecurityPolicies) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.PodSecurityPolicy, err error) { obj, err := c.Fake. Invokes(testing.NewRootPatchSubresourceAction(podsecuritypoliciesResource, name, pt, data, subresources...), &v1beta1.PodSecurityPolicy{}) if obj == nil { diff --git a/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_replicaset.go b/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_replicaset.go index 7ed16af904..5b824acbbf 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_replicaset.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_replicaset.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + v1beta1 "k8s.io/api/extensions/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" @@ -39,7 +41,7 @@ var replicasetsResource = schema.GroupVersionResource{Group: "extensions", Versi var replicasetsKind = schema.GroupVersionKind{Group: "extensions", Version: "v1beta1", Kind: "ReplicaSet"} // Get takes name of the replicaSet, and returns the corresponding replicaSet object, and an error if there is any. -func (c *FakeReplicaSets) Get(name string, options v1.GetOptions) (result *v1beta1.ReplicaSet, err error) { +func (c *FakeReplicaSets) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.ReplicaSet, err error) { obj, err := c.Fake. Invokes(testing.NewGetAction(replicasetsResource, c.ns, name), &v1beta1.ReplicaSet{}) @@ -50,7 +52,7 @@ func (c *FakeReplicaSets) Get(name string, options v1.GetOptions) (result *v1bet } // List takes label and field selectors, and returns the list of ReplicaSets that match those selectors. -func (c *FakeReplicaSets) List(opts v1.ListOptions) (result *v1beta1.ReplicaSetList, err error) { +func (c *FakeReplicaSets) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.ReplicaSetList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(replicasetsResource, replicasetsKind, c.ns, opts), &v1beta1.ReplicaSetList{}) @@ -72,14 +74,14 @@ func (c *FakeReplicaSets) List(opts v1.ListOptions) (result *v1beta1.ReplicaSetL } // Watch returns a watch.Interface that watches the requested replicaSets. -func (c *FakeReplicaSets) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeReplicaSets) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(replicasetsResource, c.ns, opts)) } // Create takes the representation of a replicaSet and creates it. Returns the server's representation of the replicaSet, and an error, if there is any. -func (c *FakeReplicaSets) Create(replicaSet *v1beta1.ReplicaSet) (result *v1beta1.ReplicaSet, err error) { +func (c *FakeReplicaSets) Create(ctx context.Context, replicaSet *v1beta1.ReplicaSet, opts v1.CreateOptions) (result *v1beta1.ReplicaSet, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(replicasetsResource, c.ns, replicaSet), &v1beta1.ReplicaSet{}) @@ -90,7 +92,7 @@ func (c *FakeReplicaSets) Create(replicaSet *v1beta1.ReplicaSet) (result *v1beta } // Update takes the representation of a replicaSet and updates it. Returns the server's representation of the replicaSet, and an error, if there is any. -func (c *FakeReplicaSets) Update(replicaSet *v1beta1.ReplicaSet) (result *v1beta1.ReplicaSet, err error) { +func (c *FakeReplicaSets) Update(ctx context.Context, replicaSet *v1beta1.ReplicaSet, opts v1.UpdateOptions) (result *v1beta1.ReplicaSet, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(replicasetsResource, c.ns, replicaSet), &v1beta1.ReplicaSet{}) @@ -102,7 +104,7 @@ func (c *FakeReplicaSets) Update(replicaSet *v1beta1.ReplicaSet) (result *v1beta // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeReplicaSets) UpdateStatus(replicaSet *v1beta1.ReplicaSet) (*v1beta1.ReplicaSet, error) { +func (c *FakeReplicaSets) UpdateStatus(ctx context.Context, replicaSet *v1beta1.ReplicaSet, opts v1.UpdateOptions) (*v1beta1.ReplicaSet, error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(replicasetsResource, "status", c.ns, replicaSet), &v1beta1.ReplicaSet{}) @@ -113,7 +115,7 @@ func (c *FakeReplicaSets) UpdateStatus(replicaSet *v1beta1.ReplicaSet) (*v1beta1 } // Delete takes name of the replicaSet and deletes it. Returns an error if one occurs. -func (c *FakeReplicaSets) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeReplicaSets) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewDeleteAction(replicasetsResource, c.ns, name), &v1beta1.ReplicaSet{}) @@ -121,15 +123,15 @@ func (c *FakeReplicaSets) Delete(name string, options *v1.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *FakeReplicaSets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(replicasetsResource, c.ns, listOptions) +func (c *FakeReplicaSets) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(replicasetsResource, c.ns, listOpts) _, err := c.Fake.Invokes(action, &v1beta1.ReplicaSetList{}) return err } // Patch applies the patch and returns the patched replicaSet. -func (c *FakeReplicaSets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ReplicaSet, err error) { +func (c *FakeReplicaSets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.ReplicaSet, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(replicasetsResource, c.ns, name, pt, data, subresources...), &v1beta1.ReplicaSet{}) @@ -140,7 +142,7 @@ func (c *FakeReplicaSets) Patch(name string, pt types.PatchType, data []byte, su } // GetScale takes name of the replicaSet, and returns the corresponding scale object, and an error if there is any. -func (c *FakeReplicaSets) GetScale(replicaSetName string, options v1.GetOptions) (result *v1beta1.Scale, err error) { +func (c *FakeReplicaSets) GetScale(ctx context.Context, replicaSetName string, options v1.GetOptions) (result *v1beta1.Scale, err error) { obj, err := c.Fake. Invokes(testing.NewGetSubresourceAction(replicasetsResource, c.ns, "scale", replicaSetName), &v1beta1.Scale{}) @@ -151,7 +153,7 @@ func (c *FakeReplicaSets) GetScale(replicaSetName string, options v1.GetOptions) } // UpdateScale takes the representation of a scale and updates it. Returns the server's representation of the scale, and an error, if there is any. -func (c *FakeReplicaSets) UpdateScale(replicaSetName string, scale *v1beta1.Scale) (result *v1beta1.Scale, err error) { +func (c *FakeReplicaSets) UpdateScale(ctx context.Context, replicaSetName string, scale *v1beta1.Scale, opts v1.UpdateOptions) (result *v1beta1.Scale, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(replicasetsResource, "scale", c.ns, scale), &v1beta1.Scale{}) diff --git a/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/ingress.go b/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/ingress.go index 4da51c3685..b19e2455ad 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/ingress.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/ingress.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" "time" v1beta1 "k8s.io/api/extensions/v1beta1" @@ -37,15 +38,15 @@ type IngressesGetter interface { // IngressInterface has methods to work with Ingress resources. type IngressInterface interface { - Create(*v1beta1.Ingress) (*v1beta1.Ingress, error) - Update(*v1beta1.Ingress) (*v1beta1.Ingress, error) - UpdateStatus(*v1beta1.Ingress) (*v1beta1.Ingress, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*v1beta1.Ingress, error) - List(opts v1.ListOptions) (*v1beta1.IngressList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Ingress, err error) + Create(ctx context.Context, ingress *v1beta1.Ingress, opts v1.CreateOptions) (*v1beta1.Ingress, error) + Update(ctx context.Context, ingress *v1beta1.Ingress, opts v1.UpdateOptions) (*v1beta1.Ingress, error) + UpdateStatus(ctx context.Context, ingress *v1beta1.Ingress, opts v1.UpdateOptions) (*v1beta1.Ingress, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.Ingress, error) + List(ctx context.Context, opts v1.ListOptions) (*v1beta1.IngressList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Ingress, err error) IngressExpansion } @@ -64,20 +65,20 @@ func newIngresses(c *ExtensionsV1beta1Client, namespace string) *ingresses { } // Get takes name of the ingress, and returns the corresponding ingress object, and an error if there is any. -func (c *ingresses) Get(name string, options v1.GetOptions) (result *v1beta1.Ingress, err error) { +func (c *ingresses) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.Ingress, err error) { result = &v1beta1.Ingress{} err = c.client.Get(). Namespace(c.ns). Resource("ingresses"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of Ingresses that match those selectors. -func (c *ingresses) List(opts v1.ListOptions) (result *v1beta1.IngressList, err error) { +func (c *ingresses) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.IngressList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -88,13 +89,13 @@ func (c *ingresses) List(opts v1.ListOptions) (result *v1beta1.IngressList, err Resource("ingresses"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested ingresses. -func (c *ingresses) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *ingresses) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -105,87 +106,90 @@ func (c *ingresses) Watch(opts v1.ListOptions) (watch.Interface, error) { Resource("ingresses"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a ingress and creates it. Returns the server's representation of the ingress, and an error, if there is any. -func (c *ingresses) Create(ingress *v1beta1.Ingress) (result *v1beta1.Ingress, err error) { +func (c *ingresses) Create(ctx context.Context, ingress *v1beta1.Ingress, opts v1.CreateOptions) (result *v1beta1.Ingress, err error) { result = &v1beta1.Ingress{} err = c.client.Post(). Namespace(c.ns). Resource("ingresses"). + VersionedParams(&opts, scheme.ParameterCodec). Body(ingress). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a ingress and updates it. Returns the server's representation of the ingress, and an error, if there is any. -func (c *ingresses) Update(ingress *v1beta1.Ingress) (result *v1beta1.Ingress, err error) { +func (c *ingresses) Update(ctx context.Context, ingress *v1beta1.Ingress, opts v1.UpdateOptions) (result *v1beta1.Ingress, err error) { result = &v1beta1.Ingress{} err = c.client.Put(). Namespace(c.ns). Resource("ingresses"). Name(ingress.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(ingress). - Do(). + Do(ctx). Into(result) return } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *ingresses) UpdateStatus(ingress *v1beta1.Ingress) (result *v1beta1.Ingress, err error) { +func (c *ingresses) UpdateStatus(ctx context.Context, ingress *v1beta1.Ingress, opts v1.UpdateOptions) (result *v1beta1.Ingress, err error) { result = &v1beta1.Ingress{} err = c.client.Put(). Namespace(c.ns). Resource("ingresses"). Name(ingress.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(ingress). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the ingress and deletes it. Returns an error if one occurs. -func (c *ingresses) Delete(name string, options *v1.DeleteOptions) error { +func (c *ingresses) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("ingresses"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *ingresses) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *ingresses) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Namespace(c.ns). Resource("ingresses"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched ingress. -func (c *ingresses) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Ingress, err error) { +func (c *ingresses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Ingress, err error) { result = &v1beta1.Ingress{} err = c.client.Patch(pt). Namespace(c.ns). Resource("ingresses"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/networkpolicy.go b/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/networkpolicy.go index 0607e2dd48..ed9ae30ded 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/networkpolicy.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/networkpolicy.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" "time" v1beta1 "k8s.io/api/extensions/v1beta1" @@ -37,14 +38,14 @@ type NetworkPoliciesGetter interface { // NetworkPolicyInterface has methods to work with NetworkPolicy resources. type NetworkPolicyInterface interface { - Create(*v1beta1.NetworkPolicy) (*v1beta1.NetworkPolicy, error) - Update(*v1beta1.NetworkPolicy) (*v1beta1.NetworkPolicy, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*v1beta1.NetworkPolicy, error) - List(opts v1.ListOptions) (*v1beta1.NetworkPolicyList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.NetworkPolicy, err error) + Create(ctx context.Context, networkPolicy *v1beta1.NetworkPolicy, opts v1.CreateOptions) (*v1beta1.NetworkPolicy, error) + Update(ctx context.Context, networkPolicy *v1beta1.NetworkPolicy, opts v1.UpdateOptions) (*v1beta1.NetworkPolicy, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.NetworkPolicy, error) + List(ctx context.Context, opts v1.ListOptions) (*v1beta1.NetworkPolicyList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.NetworkPolicy, err error) NetworkPolicyExpansion } @@ -63,20 +64,20 @@ func newNetworkPolicies(c *ExtensionsV1beta1Client, namespace string) *networkPo } // Get takes name of the networkPolicy, and returns the corresponding networkPolicy object, and an error if there is any. -func (c *networkPolicies) Get(name string, options v1.GetOptions) (result *v1beta1.NetworkPolicy, err error) { +func (c *networkPolicies) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.NetworkPolicy, err error) { result = &v1beta1.NetworkPolicy{} err = c.client.Get(). Namespace(c.ns). Resource("networkpolicies"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of NetworkPolicies that match those selectors. -func (c *networkPolicies) List(opts v1.ListOptions) (result *v1beta1.NetworkPolicyList, err error) { +func (c *networkPolicies) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.NetworkPolicyList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -87,13 +88,13 @@ func (c *networkPolicies) List(opts v1.ListOptions) (result *v1beta1.NetworkPoli Resource("networkpolicies"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested networkPolicies. -func (c *networkPolicies) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *networkPolicies) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -104,71 +105,74 @@ func (c *networkPolicies) Watch(opts v1.ListOptions) (watch.Interface, error) { Resource("networkpolicies"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a networkPolicy and creates it. Returns the server's representation of the networkPolicy, and an error, if there is any. -func (c *networkPolicies) Create(networkPolicy *v1beta1.NetworkPolicy) (result *v1beta1.NetworkPolicy, err error) { +func (c *networkPolicies) Create(ctx context.Context, networkPolicy *v1beta1.NetworkPolicy, opts v1.CreateOptions) (result *v1beta1.NetworkPolicy, err error) { result = &v1beta1.NetworkPolicy{} err = c.client.Post(). Namespace(c.ns). Resource("networkpolicies"). + VersionedParams(&opts, scheme.ParameterCodec). Body(networkPolicy). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a networkPolicy and updates it. Returns the server's representation of the networkPolicy, and an error, if there is any. -func (c *networkPolicies) Update(networkPolicy *v1beta1.NetworkPolicy) (result *v1beta1.NetworkPolicy, err error) { +func (c *networkPolicies) Update(ctx context.Context, networkPolicy *v1beta1.NetworkPolicy, opts v1.UpdateOptions) (result *v1beta1.NetworkPolicy, err error) { result = &v1beta1.NetworkPolicy{} err = c.client.Put(). Namespace(c.ns). Resource("networkpolicies"). Name(networkPolicy.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(networkPolicy). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the networkPolicy and deletes it. Returns an error if one occurs. -func (c *networkPolicies) Delete(name string, options *v1.DeleteOptions) error { +func (c *networkPolicies) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("networkpolicies"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *networkPolicies) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *networkPolicies) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Namespace(c.ns). Resource("networkpolicies"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched networkPolicy. -func (c *networkPolicies) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.NetworkPolicy, err error) { +func (c *networkPolicies) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.NetworkPolicy, err error) { result = &v1beta1.NetworkPolicy{} err = c.client.Patch(pt). Namespace(c.ns). Resource("networkpolicies"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/podsecuritypolicy.go b/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/podsecuritypolicy.go index a947a54a6f..76e67dedb8 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/podsecuritypolicy.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/podsecuritypolicy.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" "time" v1beta1 "k8s.io/api/extensions/v1beta1" @@ -37,14 +38,14 @@ type PodSecurityPoliciesGetter interface { // PodSecurityPolicyInterface has methods to work with PodSecurityPolicy resources. type PodSecurityPolicyInterface interface { - Create(*v1beta1.PodSecurityPolicy) (*v1beta1.PodSecurityPolicy, error) - Update(*v1beta1.PodSecurityPolicy) (*v1beta1.PodSecurityPolicy, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*v1beta1.PodSecurityPolicy, error) - List(opts v1.ListOptions) (*v1beta1.PodSecurityPolicyList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.PodSecurityPolicy, err error) + Create(ctx context.Context, podSecurityPolicy *v1beta1.PodSecurityPolicy, opts v1.CreateOptions) (*v1beta1.PodSecurityPolicy, error) + Update(ctx context.Context, podSecurityPolicy *v1beta1.PodSecurityPolicy, opts v1.UpdateOptions) (*v1beta1.PodSecurityPolicy, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.PodSecurityPolicy, error) + List(ctx context.Context, opts v1.ListOptions) (*v1beta1.PodSecurityPolicyList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.PodSecurityPolicy, err error) PodSecurityPolicyExpansion } @@ -61,19 +62,19 @@ func newPodSecurityPolicies(c *ExtensionsV1beta1Client) *podSecurityPolicies { } // Get takes name of the podSecurityPolicy, and returns the corresponding podSecurityPolicy object, and an error if there is any. -func (c *podSecurityPolicies) Get(name string, options v1.GetOptions) (result *v1beta1.PodSecurityPolicy, err error) { +func (c *podSecurityPolicies) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.PodSecurityPolicy, err error) { result = &v1beta1.PodSecurityPolicy{} err = c.client.Get(). Resource("podsecuritypolicies"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of PodSecurityPolicies that match those selectors. -func (c *podSecurityPolicies) List(opts v1.ListOptions) (result *v1beta1.PodSecurityPolicyList, err error) { +func (c *podSecurityPolicies) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.PodSecurityPolicyList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -83,13 +84,13 @@ func (c *podSecurityPolicies) List(opts v1.ListOptions) (result *v1beta1.PodSecu Resource("podsecuritypolicies"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested podSecurityPolicies. -func (c *podSecurityPolicies) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *podSecurityPolicies) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -99,66 +100,69 @@ func (c *podSecurityPolicies) Watch(opts v1.ListOptions) (watch.Interface, error Resource("podsecuritypolicies"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a podSecurityPolicy and creates it. Returns the server's representation of the podSecurityPolicy, and an error, if there is any. -func (c *podSecurityPolicies) Create(podSecurityPolicy *v1beta1.PodSecurityPolicy) (result *v1beta1.PodSecurityPolicy, err error) { +func (c *podSecurityPolicies) Create(ctx context.Context, podSecurityPolicy *v1beta1.PodSecurityPolicy, opts v1.CreateOptions) (result *v1beta1.PodSecurityPolicy, err error) { result = &v1beta1.PodSecurityPolicy{} err = c.client.Post(). Resource("podsecuritypolicies"). + VersionedParams(&opts, scheme.ParameterCodec). Body(podSecurityPolicy). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a podSecurityPolicy and updates it. Returns the server's representation of the podSecurityPolicy, and an error, if there is any. -func (c *podSecurityPolicies) Update(podSecurityPolicy *v1beta1.PodSecurityPolicy) (result *v1beta1.PodSecurityPolicy, err error) { +func (c *podSecurityPolicies) Update(ctx context.Context, podSecurityPolicy *v1beta1.PodSecurityPolicy, opts v1.UpdateOptions) (result *v1beta1.PodSecurityPolicy, err error) { result = &v1beta1.PodSecurityPolicy{} err = c.client.Put(). Resource("podsecuritypolicies"). Name(podSecurityPolicy.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(podSecurityPolicy). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the podSecurityPolicy and deletes it. Returns an error if one occurs. -func (c *podSecurityPolicies) Delete(name string, options *v1.DeleteOptions) error { +func (c *podSecurityPolicies) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). Resource("podsecuritypolicies"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *podSecurityPolicies) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *podSecurityPolicies) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Resource("podsecuritypolicies"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched podSecurityPolicy. -func (c *podSecurityPolicies) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.PodSecurityPolicy, err error) { +func (c *podSecurityPolicies) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.PodSecurityPolicy, err error) { result = &v1beta1.PodSecurityPolicy{} err = c.client.Patch(pt). Resource("podsecuritypolicies"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/replicaset.go b/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/replicaset.go index 444029058b..64e3c18617 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/replicaset.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/replicaset.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" "time" v1beta1 "k8s.io/api/extensions/v1beta1" @@ -37,17 +38,17 @@ type ReplicaSetsGetter interface { // ReplicaSetInterface has methods to work with ReplicaSet resources. type ReplicaSetInterface interface { - Create(*v1beta1.ReplicaSet) (*v1beta1.ReplicaSet, error) - Update(*v1beta1.ReplicaSet) (*v1beta1.ReplicaSet, error) - UpdateStatus(*v1beta1.ReplicaSet) (*v1beta1.ReplicaSet, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*v1beta1.ReplicaSet, error) - List(opts v1.ListOptions) (*v1beta1.ReplicaSetList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ReplicaSet, err error) - GetScale(replicaSetName string, options v1.GetOptions) (*v1beta1.Scale, error) - UpdateScale(replicaSetName string, scale *v1beta1.Scale) (*v1beta1.Scale, error) + Create(ctx context.Context, replicaSet *v1beta1.ReplicaSet, opts v1.CreateOptions) (*v1beta1.ReplicaSet, error) + Update(ctx context.Context, replicaSet *v1beta1.ReplicaSet, opts v1.UpdateOptions) (*v1beta1.ReplicaSet, error) + UpdateStatus(ctx context.Context, replicaSet *v1beta1.ReplicaSet, opts v1.UpdateOptions) (*v1beta1.ReplicaSet, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.ReplicaSet, error) + List(ctx context.Context, opts v1.ListOptions) (*v1beta1.ReplicaSetList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.ReplicaSet, err error) + GetScale(ctx context.Context, replicaSetName string, options v1.GetOptions) (*v1beta1.Scale, error) + UpdateScale(ctx context.Context, replicaSetName string, scale *v1beta1.Scale, opts v1.UpdateOptions) (*v1beta1.Scale, error) ReplicaSetExpansion } @@ -67,20 +68,20 @@ func newReplicaSets(c *ExtensionsV1beta1Client, namespace string) *replicaSets { } // Get takes name of the replicaSet, and returns the corresponding replicaSet object, and an error if there is any. -func (c *replicaSets) Get(name string, options v1.GetOptions) (result *v1beta1.ReplicaSet, err error) { +func (c *replicaSets) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.ReplicaSet, err error) { result = &v1beta1.ReplicaSet{} err = c.client.Get(). Namespace(c.ns). Resource("replicasets"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of ReplicaSets that match those selectors. -func (c *replicaSets) List(opts v1.ListOptions) (result *v1beta1.ReplicaSetList, err error) { +func (c *replicaSets) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.ReplicaSetList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -91,13 +92,13 @@ func (c *replicaSets) List(opts v1.ListOptions) (result *v1beta1.ReplicaSetList, Resource("replicasets"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested replicaSets. -func (c *replicaSets) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *replicaSets) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -108,93 +109,96 @@ func (c *replicaSets) Watch(opts v1.ListOptions) (watch.Interface, error) { Resource("replicasets"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a replicaSet and creates it. Returns the server's representation of the replicaSet, and an error, if there is any. -func (c *replicaSets) Create(replicaSet *v1beta1.ReplicaSet) (result *v1beta1.ReplicaSet, err error) { +func (c *replicaSets) Create(ctx context.Context, replicaSet *v1beta1.ReplicaSet, opts v1.CreateOptions) (result *v1beta1.ReplicaSet, err error) { result = &v1beta1.ReplicaSet{} err = c.client.Post(). Namespace(c.ns). Resource("replicasets"). + VersionedParams(&opts, scheme.ParameterCodec). Body(replicaSet). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a replicaSet and updates it. Returns the server's representation of the replicaSet, and an error, if there is any. -func (c *replicaSets) Update(replicaSet *v1beta1.ReplicaSet) (result *v1beta1.ReplicaSet, err error) { +func (c *replicaSets) Update(ctx context.Context, replicaSet *v1beta1.ReplicaSet, opts v1.UpdateOptions) (result *v1beta1.ReplicaSet, err error) { result = &v1beta1.ReplicaSet{} err = c.client.Put(). Namespace(c.ns). Resource("replicasets"). Name(replicaSet.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(replicaSet). - Do(). + Do(ctx). Into(result) return } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *replicaSets) UpdateStatus(replicaSet *v1beta1.ReplicaSet) (result *v1beta1.ReplicaSet, err error) { +func (c *replicaSets) UpdateStatus(ctx context.Context, replicaSet *v1beta1.ReplicaSet, opts v1.UpdateOptions) (result *v1beta1.ReplicaSet, err error) { result = &v1beta1.ReplicaSet{} err = c.client.Put(). Namespace(c.ns). Resource("replicasets"). Name(replicaSet.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(replicaSet). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the replicaSet and deletes it. Returns an error if one occurs. -func (c *replicaSets) Delete(name string, options *v1.DeleteOptions) error { +func (c *replicaSets) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("replicasets"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *replicaSets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *replicaSets) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Namespace(c.ns). Resource("replicasets"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched replicaSet. -func (c *replicaSets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ReplicaSet, err error) { +func (c *replicaSets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.ReplicaSet, err error) { result = &v1beta1.ReplicaSet{} err = c.client.Patch(pt). Namespace(c.ns). Resource("replicasets"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } // GetScale takes name of the replicaSet, and returns the corresponding v1beta1.Scale object, and an error if there is any. -func (c *replicaSets) GetScale(replicaSetName string, options v1.GetOptions) (result *v1beta1.Scale, err error) { +func (c *replicaSets) GetScale(ctx context.Context, replicaSetName string, options v1.GetOptions) (result *v1beta1.Scale, err error) { result = &v1beta1.Scale{} err = c.client.Get(). Namespace(c.ns). @@ -202,21 +206,22 @@ func (c *replicaSets) GetScale(replicaSetName string, options v1.GetOptions) (re Name(replicaSetName). SubResource("scale"). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // UpdateScale takes the top resource name and the representation of a scale and updates it. Returns the server's representation of the scale, and an error, if there is any. -func (c *replicaSets) UpdateScale(replicaSetName string, scale *v1beta1.Scale) (result *v1beta1.Scale, err error) { +func (c *replicaSets) UpdateScale(ctx context.Context, replicaSetName string, scale *v1beta1.Scale, opts v1.UpdateOptions) (result *v1beta1.Scale, err error) { result = &v1beta1.Scale{} err = c.client.Put(). Namespace(c.ns). Resource("replicasets"). Name(replicaSetName). SubResource("scale"). + VersionedParams(&opts, scheme.ParameterCodec). Body(scale). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1/fake/fake_flowschema.go b/vendor/k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1/fake/fake_flowschema.go index d27f802e1b..e4692874e8 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1/fake/fake_flowschema.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1/fake/fake_flowschema.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + v1alpha1 "k8s.io/api/flowcontrol/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" @@ -38,7 +40,7 @@ var flowschemasResource = schema.GroupVersionResource{Group: "flowcontrol.apiser var flowschemasKind = schema.GroupVersionKind{Group: "flowcontrol.apiserver.k8s.io", Version: "v1alpha1", Kind: "FlowSchema"} // Get takes name of the flowSchema, and returns the corresponding flowSchema object, and an error if there is any. -func (c *FakeFlowSchemas) Get(name string, options v1.GetOptions) (result *v1alpha1.FlowSchema, err error) { +func (c *FakeFlowSchemas) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.FlowSchema, err error) { obj, err := c.Fake. Invokes(testing.NewRootGetAction(flowschemasResource, name), &v1alpha1.FlowSchema{}) if obj == nil { @@ -48,7 +50,7 @@ func (c *FakeFlowSchemas) Get(name string, options v1.GetOptions) (result *v1alp } // List takes label and field selectors, and returns the list of FlowSchemas that match those selectors. -func (c *FakeFlowSchemas) List(opts v1.ListOptions) (result *v1alpha1.FlowSchemaList, err error) { +func (c *FakeFlowSchemas) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.FlowSchemaList, err error) { obj, err := c.Fake. Invokes(testing.NewRootListAction(flowschemasResource, flowschemasKind, opts), &v1alpha1.FlowSchemaList{}) if obj == nil { @@ -69,13 +71,13 @@ func (c *FakeFlowSchemas) List(opts v1.ListOptions) (result *v1alpha1.FlowSchema } // Watch returns a watch.Interface that watches the requested flowSchemas. -func (c *FakeFlowSchemas) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeFlowSchemas) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewRootWatchAction(flowschemasResource, opts)) } // Create takes the representation of a flowSchema and creates it. Returns the server's representation of the flowSchema, and an error, if there is any. -func (c *FakeFlowSchemas) Create(flowSchema *v1alpha1.FlowSchema) (result *v1alpha1.FlowSchema, err error) { +func (c *FakeFlowSchemas) Create(ctx context.Context, flowSchema *v1alpha1.FlowSchema, opts v1.CreateOptions) (result *v1alpha1.FlowSchema, err error) { obj, err := c.Fake. Invokes(testing.NewRootCreateAction(flowschemasResource, flowSchema), &v1alpha1.FlowSchema{}) if obj == nil { @@ -85,7 +87,7 @@ func (c *FakeFlowSchemas) Create(flowSchema *v1alpha1.FlowSchema) (result *v1alp } // Update takes the representation of a flowSchema and updates it. Returns the server's representation of the flowSchema, and an error, if there is any. -func (c *FakeFlowSchemas) Update(flowSchema *v1alpha1.FlowSchema) (result *v1alpha1.FlowSchema, err error) { +func (c *FakeFlowSchemas) Update(ctx context.Context, flowSchema *v1alpha1.FlowSchema, opts v1.UpdateOptions) (result *v1alpha1.FlowSchema, err error) { obj, err := c.Fake. Invokes(testing.NewRootUpdateAction(flowschemasResource, flowSchema), &v1alpha1.FlowSchema{}) if obj == nil { @@ -96,7 +98,7 @@ func (c *FakeFlowSchemas) Update(flowSchema *v1alpha1.FlowSchema) (result *v1alp // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeFlowSchemas) UpdateStatus(flowSchema *v1alpha1.FlowSchema) (*v1alpha1.FlowSchema, error) { +func (c *FakeFlowSchemas) UpdateStatus(ctx context.Context, flowSchema *v1alpha1.FlowSchema, opts v1.UpdateOptions) (*v1alpha1.FlowSchema, error) { obj, err := c.Fake. Invokes(testing.NewRootUpdateSubresourceAction(flowschemasResource, "status", flowSchema), &v1alpha1.FlowSchema{}) if obj == nil { @@ -106,22 +108,22 @@ func (c *FakeFlowSchemas) UpdateStatus(flowSchema *v1alpha1.FlowSchema) (*v1alph } // Delete takes name of the flowSchema and deletes it. Returns an error if one occurs. -func (c *FakeFlowSchemas) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeFlowSchemas) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewRootDeleteAction(flowschemasResource, name), &v1alpha1.FlowSchema{}) return err } // DeleteCollection deletes a collection of objects. -func (c *FakeFlowSchemas) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewRootDeleteCollectionAction(flowschemasResource, listOptions) +func (c *FakeFlowSchemas) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(flowschemasResource, listOpts) _, err := c.Fake.Invokes(action, &v1alpha1.FlowSchemaList{}) return err } // Patch applies the patch and returns the patched flowSchema. -func (c *FakeFlowSchemas) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.FlowSchema, err error) { +func (c *FakeFlowSchemas) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.FlowSchema, err error) { obj, err := c.Fake. Invokes(testing.NewRootPatchSubresourceAction(flowschemasResource, name, pt, data, subresources...), &v1alpha1.FlowSchema{}) if obj == nil { diff --git a/vendor/k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1/fake/fake_prioritylevelconfiguration.go b/vendor/k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1/fake/fake_prioritylevelconfiguration.go index 960481c286..133ab793ce 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1/fake/fake_prioritylevelconfiguration.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1/fake/fake_prioritylevelconfiguration.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + v1alpha1 "k8s.io/api/flowcontrol/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" @@ -38,7 +40,7 @@ var prioritylevelconfigurationsResource = schema.GroupVersionResource{Group: "fl var prioritylevelconfigurationsKind = schema.GroupVersionKind{Group: "flowcontrol.apiserver.k8s.io", Version: "v1alpha1", Kind: "PriorityLevelConfiguration"} // Get takes name of the priorityLevelConfiguration, and returns the corresponding priorityLevelConfiguration object, and an error if there is any. -func (c *FakePriorityLevelConfigurations) Get(name string, options v1.GetOptions) (result *v1alpha1.PriorityLevelConfiguration, err error) { +func (c *FakePriorityLevelConfigurations) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.PriorityLevelConfiguration, err error) { obj, err := c.Fake. Invokes(testing.NewRootGetAction(prioritylevelconfigurationsResource, name), &v1alpha1.PriorityLevelConfiguration{}) if obj == nil { @@ -48,7 +50,7 @@ func (c *FakePriorityLevelConfigurations) Get(name string, options v1.GetOptions } // List takes label and field selectors, and returns the list of PriorityLevelConfigurations that match those selectors. -func (c *FakePriorityLevelConfigurations) List(opts v1.ListOptions) (result *v1alpha1.PriorityLevelConfigurationList, err error) { +func (c *FakePriorityLevelConfigurations) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.PriorityLevelConfigurationList, err error) { obj, err := c.Fake. Invokes(testing.NewRootListAction(prioritylevelconfigurationsResource, prioritylevelconfigurationsKind, opts), &v1alpha1.PriorityLevelConfigurationList{}) if obj == nil { @@ -69,13 +71,13 @@ func (c *FakePriorityLevelConfigurations) List(opts v1.ListOptions) (result *v1a } // Watch returns a watch.Interface that watches the requested priorityLevelConfigurations. -func (c *FakePriorityLevelConfigurations) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakePriorityLevelConfigurations) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewRootWatchAction(prioritylevelconfigurationsResource, opts)) } // Create takes the representation of a priorityLevelConfiguration and creates it. Returns the server's representation of the priorityLevelConfiguration, and an error, if there is any. -func (c *FakePriorityLevelConfigurations) Create(priorityLevelConfiguration *v1alpha1.PriorityLevelConfiguration) (result *v1alpha1.PriorityLevelConfiguration, err error) { +func (c *FakePriorityLevelConfigurations) Create(ctx context.Context, priorityLevelConfiguration *v1alpha1.PriorityLevelConfiguration, opts v1.CreateOptions) (result *v1alpha1.PriorityLevelConfiguration, err error) { obj, err := c.Fake. Invokes(testing.NewRootCreateAction(prioritylevelconfigurationsResource, priorityLevelConfiguration), &v1alpha1.PriorityLevelConfiguration{}) if obj == nil { @@ -85,7 +87,7 @@ func (c *FakePriorityLevelConfigurations) Create(priorityLevelConfiguration *v1a } // Update takes the representation of a priorityLevelConfiguration and updates it. Returns the server's representation of the priorityLevelConfiguration, and an error, if there is any. -func (c *FakePriorityLevelConfigurations) Update(priorityLevelConfiguration *v1alpha1.PriorityLevelConfiguration) (result *v1alpha1.PriorityLevelConfiguration, err error) { +func (c *FakePriorityLevelConfigurations) Update(ctx context.Context, priorityLevelConfiguration *v1alpha1.PriorityLevelConfiguration, opts v1.UpdateOptions) (result *v1alpha1.PriorityLevelConfiguration, err error) { obj, err := c.Fake. Invokes(testing.NewRootUpdateAction(prioritylevelconfigurationsResource, priorityLevelConfiguration), &v1alpha1.PriorityLevelConfiguration{}) if obj == nil { @@ -96,7 +98,7 @@ func (c *FakePriorityLevelConfigurations) Update(priorityLevelConfiguration *v1a // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakePriorityLevelConfigurations) UpdateStatus(priorityLevelConfiguration *v1alpha1.PriorityLevelConfiguration) (*v1alpha1.PriorityLevelConfiguration, error) { +func (c *FakePriorityLevelConfigurations) UpdateStatus(ctx context.Context, priorityLevelConfiguration *v1alpha1.PriorityLevelConfiguration, opts v1.UpdateOptions) (*v1alpha1.PriorityLevelConfiguration, error) { obj, err := c.Fake. Invokes(testing.NewRootUpdateSubresourceAction(prioritylevelconfigurationsResource, "status", priorityLevelConfiguration), &v1alpha1.PriorityLevelConfiguration{}) if obj == nil { @@ -106,22 +108,22 @@ func (c *FakePriorityLevelConfigurations) UpdateStatus(priorityLevelConfiguratio } // Delete takes name of the priorityLevelConfiguration and deletes it. Returns an error if one occurs. -func (c *FakePriorityLevelConfigurations) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakePriorityLevelConfigurations) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewRootDeleteAction(prioritylevelconfigurationsResource, name), &v1alpha1.PriorityLevelConfiguration{}) return err } // DeleteCollection deletes a collection of objects. -func (c *FakePriorityLevelConfigurations) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewRootDeleteCollectionAction(prioritylevelconfigurationsResource, listOptions) +func (c *FakePriorityLevelConfigurations) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(prioritylevelconfigurationsResource, listOpts) _, err := c.Fake.Invokes(action, &v1alpha1.PriorityLevelConfigurationList{}) return err } // Patch applies the patch and returns the patched priorityLevelConfiguration. -func (c *FakePriorityLevelConfigurations) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.PriorityLevelConfiguration, err error) { +func (c *FakePriorityLevelConfigurations) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.PriorityLevelConfiguration, err error) { obj, err := c.Fake. Invokes(testing.NewRootPatchSubresourceAction(prioritylevelconfigurationsResource, name, pt, data, subresources...), &v1alpha1.PriorityLevelConfiguration{}) if obj == nil { diff --git a/vendor/k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1/flowschema.go b/vendor/k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1/flowschema.go index db71d29a57..319636f771 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1/flowschema.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1/flowschema.go @@ -19,6 +19,7 @@ limitations under the License. package v1alpha1 import ( + "context" "time" v1alpha1 "k8s.io/api/flowcontrol/v1alpha1" @@ -37,15 +38,15 @@ type FlowSchemasGetter interface { // FlowSchemaInterface has methods to work with FlowSchema resources. type FlowSchemaInterface interface { - Create(*v1alpha1.FlowSchema) (*v1alpha1.FlowSchema, error) - Update(*v1alpha1.FlowSchema) (*v1alpha1.FlowSchema, error) - UpdateStatus(*v1alpha1.FlowSchema) (*v1alpha1.FlowSchema, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*v1alpha1.FlowSchema, error) - List(opts v1.ListOptions) (*v1alpha1.FlowSchemaList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.FlowSchema, err error) + Create(ctx context.Context, flowSchema *v1alpha1.FlowSchema, opts v1.CreateOptions) (*v1alpha1.FlowSchema, error) + Update(ctx context.Context, flowSchema *v1alpha1.FlowSchema, opts v1.UpdateOptions) (*v1alpha1.FlowSchema, error) + UpdateStatus(ctx context.Context, flowSchema *v1alpha1.FlowSchema, opts v1.UpdateOptions) (*v1alpha1.FlowSchema, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.FlowSchema, error) + List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.FlowSchemaList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.FlowSchema, err error) FlowSchemaExpansion } @@ -62,19 +63,19 @@ func newFlowSchemas(c *FlowcontrolV1alpha1Client) *flowSchemas { } // Get takes name of the flowSchema, and returns the corresponding flowSchema object, and an error if there is any. -func (c *flowSchemas) Get(name string, options v1.GetOptions) (result *v1alpha1.FlowSchema, err error) { +func (c *flowSchemas) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.FlowSchema, err error) { result = &v1alpha1.FlowSchema{} err = c.client.Get(). Resource("flowschemas"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of FlowSchemas that match those selectors. -func (c *flowSchemas) List(opts v1.ListOptions) (result *v1alpha1.FlowSchemaList, err error) { +func (c *flowSchemas) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.FlowSchemaList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -84,13 +85,13 @@ func (c *flowSchemas) List(opts v1.ListOptions) (result *v1alpha1.FlowSchemaList Resource("flowschemas"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested flowSchemas. -func (c *flowSchemas) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *flowSchemas) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -100,81 +101,84 @@ func (c *flowSchemas) Watch(opts v1.ListOptions) (watch.Interface, error) { Resource("flowschemas"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a flowSchema and creates it. Returns the server's representation of the flowSchema, and an error, if there is any. -func (c *flowSchemas) Create(flowSchema *v1alpha1.FlowSchema) (result *v1alpha1.FlowSchema, err error) { +func (c *flowSchemas) Create(ctx context.Context, flowSchema *v1alpha1.FlowSchema, opts v1.CreateOptions) (result *v1alpha1.FlowSchema, err error) { result = &v1alpha1.FlowSchema{} err = c.client.Post(). Resource("flowschemas"). + VersionedParams(&opts, scheme.ParameterCodec). Body(flowSchema). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a flowSchema and updates it. Returns the server's representation of the flowSchema, and an error, if there is any. -func (c *flowSchemas) Update(flowSchema *v1alpha1.FlowSchema) (result *v1alpha1.FlowSchema, err error) { +func (c *flowSchemas) Update(ctx context.Context, flowSchema *v1alpha1.FlowSchema, opts v1.UpdateOptions) (result *v1alpha1.FlowSchema, err error) { result = &v1alpha1.FlowSchema{} err = c.client.Put(). Resource("flowschemas"). Name(flowSchema.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(flowSchema). - Do(). + Do(ctx). Into(result) return } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *flowSchemas) UpdateStatus(flowSchema *v1alpha1.FlowSchema) (result *v1alpha1.FlowSchema, err error) { +func (c *flowSchemas) UpdateStatus(ctx context.Context, flowSchema *v1alpha1.FlowSchema, opts v1.UpdateOptions) (result *v1alpha1.FlowSchema, err error) { result = &v1alpha1.FlowSchema{} err = c.client.Put(). Resource("flowschemas"). Name(flowSchema.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(flowSchema). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the flowSchema and deletes it. Returns an error if one occurs. -func (c *flowSchemas) Delete(name string, options *v1.DeleteOptions) error { +func (c *flowSchemas) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). Resource("flowschemas"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *flowSchemas) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *flowSchemas) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Resource("flowschemas"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched flowSchema. -func (c *flowSchemas) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.FlowSchema, err error) { +func (c *flowSchemas) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.FlowSchema, err error) { result = &v1alpha1.FlowSchema{} err = c.client.Patch(pt). Resource("flowschemas"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1/prioritylevelconfiguration.go b/vendor/k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1/prioritylevelconfiguration.go index eb99cca602..1290e7936b 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1/prioritylevelconfiguration.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1/prioritylevelconfiguration.go @@ -19,6 +19,7 @@ limitations under the License. package v1alpha1 import ( + "context" "time" v1alpha1 "k8s.io/api/flowcontrol/v1alpha1" @@ -37,15 +38,15 @@ type PriorityLevelConfigurationsGetter interface { // PriorityLevelConfigurationInterface has methods to work with PriorityLevelConfiguration resources. type PriorityLevelConfigurationInterface interface { - Create(*v1alpha1.PriorityLevelConfiguration) (*v1alpha1.PriorityLevelConfiguration, error) - Update(*v1alpha1.PriorityLevelConfiguration) (*v1alpha1.PriorityLevelConfiguration, error) - UpdateStatus(*v1alpha1.PriorityLevelConfiguration) (*v1alpha1.PriorityLevelConfiguration, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*v1alpha1.PriorityLevelConfiguration, error) - List(opts v1.ListOptions) (*v1alpha1.PriorityLevelConfigurationList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.PriorityLevelConfiguration, err error) + Create(ctx context.Context, priorityLevelConfiguration *v1alpha1.PriorityLevelConfiguration, opts v1.CreateOptions) (*v1alpha1.PriorityLevelConfiguration, error) + Update(ctx context.Context, priorityLevelConfiguration *v1alpha1.PriorityLevelConfiguration, opts v1.UpdateOptions) (*v1alpha1.PriorityLevelConfiguration, error) + UpdateStatus(ctx context.Context, priorityLevelConfiguration *v1alpha1.PriorityLevelConfiguration, opts v1.UpdateOptions) (*v1alpha1.PriorityLevelConfiguration, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.PriorityLevelConfiguration, error) + List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.PriorityLevelConfigurationList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.PriorityLevelConfiguration, err error) PriorityLevelConfigurationExpansion } @@ -62,19 +63,19 @@ func newPriorityLevelConfigurations(c *FlowcontrolV1alpha1Client) *priorityLevel } // Get takes name of the priorityLevelConfiguration, and returns the corresponding priorityLevelConfiguration object, and an error if there is any. -func (c *priorityLevelConfigurations) Get(name string, options v1.GetOptions) (result *v1alpha1.PriorityLevelConfiguration, err error) { +func (c *priorityLevelConfigurations) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.PriorityLevelConfiguration, err error) { result = &v1alpha1.PriorityLevelConfiguration{} err = c.client.Get(). Resource("prioritylevelconfigurations"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of PriorityLevelConfigurations that match those selectors. -func (c *priorityLevelConfigurations) List(opts v1.ListOptions) (result *v1alpha1.PriorityLevelConfigurationList, err error) { +func (c *priorityLevelConfigurations) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.PriorityLevelConfigurationList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -84,13 +85,13 @@ func (c *priorityLevelConfigurations) List(opts v1.ListOptions) (result *v1alpha Resource("prioritylevelconfigurations"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested priorityLevelConfigurations. -func (c *priorityLevelConfigurations) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *priorityLevelConfigurations) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -100,81 +101,84 @@ func (c *priorityLevelConfigurations) Watch(opts v1.ListOptions) (watch.Interfac Resource("prioritylevelconfigurations"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a priorityLevelConfiguration and creates it. Returns the server's representation of the priorityLevelConfiguration, and an error, if there is any. -func (c *priorityLevelConfigurations) Create(priorityLevelConfiguration *v1alpha1.PriorityLevelConfiguration) (result *v1alpha1.PriorityLevelConfiguration, err error) { +func (c *priorityLevelConfigurations) Create(ctx context.Context, priorityLevelConfiguration *v1alpha1.PriorityLevelConfiguration, opts v1.CreateOptions) (result *v1alpha1.PriorityLevelConfiguration, err error) { result = &v1alpha1.PriorityLevelConfiguration{} err = c.client.Post(). Resource("prioritylevelconfigurations"). + VersionedParams(&opts, scheme.ParameterCodec). Body(priorityLevelConfiguration). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a priorityLevelConfiguration and updates it. Returns the server's representation of the priorityLevelConfiguration, and an error, if there is any. -func (c *priorityLevelConfigurations) Update(priorityLevelConfiguration *v1alpha1.PriorityLevelConfiguration) (result *v1alpha1.PriorityLevelConfiguration, err error) { +func (c *priorityLevelConfigurations) Update(ctx context.Context, priorityLevelConfiguration *v1alpha1.PriorityLevelConfiguration, opts v1.UpdateOptions) (result *v1alpha1.PriorityLevelConfiguration, err error) { result = &v1alpha1.PriorityLevelConfiguration{} err = c.client.Put(). Resource("prioritylevelconfigurations"). Name(priorityLevelConfiguration.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(priorityLevelConfiguration). - Do(). + Do(ctx). Into(result) return } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *priorityLevelConfigurations) UpdateStatus(priorityLevelConfiguration *v1alpha1.PriorityLevelConfiguration) (result *v1alpha1.PriorityLevelConfiguration, err error) { +func (c *priorityLevelConfigurations) UpdateStatus(ctx context.Context, priorityLevelConfiguration *v1alpha1.PriorityLevelConfiguration, opts v1.UpdateOptions) (result *v1alpha1.PriorityLevelConfiguration, err error) { result = &v1alpha1.PriorityLevelConfiguration{} err = c.client.Put(). Resource("prioritylevelconfigurations"). Name(priorityLevelConfiguration.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(priorityLevelConfiguration). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the priorityLevelConfiguration and deletes it. Returns an error if one occurs. -func (c *priorityLevelConfigurations) Delete(name string, options *v1.DeleteOptions) error { +func (c *priorityLevelConfigurations) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). Resource("prioritylevelconfigurations"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *priorityLevelConfigurations) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *priorityLevelConfigurations) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Resource("prioritylevelconfigurations"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched priorityLevelConfiguration. -func (c *priorityLevelConfigurations) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.PriorityLevelConfiguration, err error) { +func (c *priorityLevelConfigurations) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.PriorityLevelConfiguration, err error) { result = &v1alpha1.PriorityLevelConfiguration{} err = c.client.Patch(pt). Resource("prioritylevelconfigurations"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/k8s.io/client-go/kubernetes/typed/networking/v1/fake/fake_networkpolicy.go b/vendor/k8s.io/client-go/kubernetes/typed/networking/v1/fake/fake_networkpolicy.go index 58667c481a..e8d6e28e44 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/networking/v1/fake/fake_networkpolicy.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/networking/v1/fake/fake_networkpolicy.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + networkingv1 "k8s.io/api/networking/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" @@ -39,7 +41,7 @@ var networkpoliciesResource = schema.GroupVersionResource{Group: "networking.k8s var networkpoliciesKind = schema.GroupVersionKind{Group: "networking.k8s.io", Version: "v1", Kind: "NetworkPolicy"} // Get takes name of the networkPolicy, and returns the corresponding networkPolicy object, and an error if there is any. -func (c *FakeNetworkPolicies) Get(name string, options v1.GetOptions) (result *networkingv1.NetworkPolicy, err error) { +func (c *FakeNetworkPolicies) Get(ctx context.Context, name string, options v1.GetOptions) (result *networkingv1.NetworkPolicy, err error) { obj, err := c.Fake. Invokes(testing.NewGetAction(networkpoliciesResource, c.ns, name), &networkingv1.NetworkPolicy{}) @@ -50,7 +52,7 @@ func (c *FakeNetworkPolicies) Get(name string, options v1.GetOptions) (result *n } // List takes label and field selectors, and returns the list of NetworkPolicies that match those selectors. -func (c *FakeNetworkPolicies) List(opts v1.ListOptions) (result *networkingv1.NetworkPolicyList, err error) { +func (c *FakeNetworkPolicies) List(ctx context.Context, opts v1.ListOptions) (result *networkingv1.NetworkPolicyList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(networkpoliciesResource, networkpoliciesKind, c.ns, opts), &networkingv1.NetworkPolicyList{}) @@ -72,14 +74,14 @@ func (c *FakeNetworkPolicies) List(opts v1.ListOptions) (result *networkingv1.Ne } // Watch returns a watch.Interface that watches the requested networkPolicies. -func (c *FakeNetworkPolicies) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeNetworkPolicies) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(networkpoliciesResource, c.ns, opts)) } // Create takes the representation of a networkPolicy and creates it. Returns the server's representation of the networkPolicy, and an error, if there is any. -func (c *FakeNetworkPolicies) Create(networkPolicy *networkingv1.NetworkPolicy) (result *networkingv1.NetworkPolicy, err error) { +func (c *FakeNetworkPolicies) Create(ctx context.Context, networkPolicy *networkingv1.NetworkPolicy, opts v1.CreateOptions) (result *networkingv1.NetworkPolicy, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(networkpoliciesResource, c.ns, networkPolicy), &networkingv1.NetworkPolicy{}) @@ -90,7 +92,7 @@ func (c *FakeNetworkPolicies) Create(networkPolicy *networkingv1.NetworkPolicy) } // Update takes the representation of a networkPolicy and updates it. Returns the server's representation of the networkPolicy, and an error, if there is any. -func (c *FakeNetworkPolicies) Update(networkPolicy *networkingv1.NetworkPolicy) (result *networkingv1.NetworkPolicy, err error) { +func (c *FakeNetworkPolicies) Update(ctx context.Context, networkPolicy *networkingv1.NetworkPolicy, opts v1.UpdateOptions) (result *networkingv1.NetworkPolicy, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(networkpoliciesResource, c.ns, networkPolicy), &networkingv1.NetworkPolicy{}) @@ -101,7 +103,7 @@ func (c *FakeNetworkPolicies) Update(networkPolicy *networkingv1.NetworkPolicy) } // Delete takes name of the networkPolicy and deletes it. Returns an error if one occurs. -func (c *FakeNetworkPolicies) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeNetworkPolicies) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewDeleteAction(networkpoliciesResource, c.ns, name), &networkingv1.NetworkPolicy{}) @@ -109,15 +111,15 @@ func (c *FakeNetworkPolicies) Delete(name string, options *v1.DeleteOptions) err } // DeleteCollection deletes a collection of objects. -func (c *FakeNetworkPolicies) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(networkpoliciesResource, c.ns, listOptions) +func (c *FakeNetworkPolicies) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(networkpoliciesResource, c.ns, listOpts) _, err := c.Fake.Invokes(action, &networkingv1.NetworkPolicyList{}) return err } // Patch applies the patch and returns the patched networkPolicy. -func (c *FakeNetworkPolicies) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *networkingv1.NetworkPolicy, err error) { +func (c *FakeNetworkPolicies) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *networkingv1.NetworkPolicy, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(networkpoliciesResource, c.ns, name, pt, data, subresources...), &networkingv1.NetworkPolicy{}) diff --git a/vendor/k8s.io/client-go/kubernetes/typed/networking/v1/networkpolicy.go b/vendor/k8s.io/client-go/kubernetes/typed/networking/v1/networkpolicy.go index 3f39be957d..19c0c880f3 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/networking/v1/networkpolicy.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/networking/v1/networkpolicy.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" "time" v1 "k8s.io/api/networking/v1" @@ -37,14 +38,14 @@ type NetworkPoliciesGetter interface { // NetworkPolicyInterface has methods to work with NetworkPolicy resources. type NetworkPolicyInterface interface { - Create(*v1.NetworkPolicy) (*v1.NetworkPolicy, error) - Update(*v1.NetworkPolicy) (*v1.NetworkPolicy, error) - Delete(name string, options *metav1.DeleteOptions) error - DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error - Get(name string, options metav1.GetOptions) (*v1.NetworkPolicy, error) - List(opts metav1.ListOptions) (*v1.NetworkPolicyList, error) - Watch(opts metav1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.NetworkPolicy, err error) + Create(ctx context.Context, networkPolicy *v1.NetworkPolicy, opts metav1.CreateOptions) (*v1.NetworkPolicy, error) + Update(ctx context.Context, networkPolicy *v1.NetworkPolicy, opts metav1.UpdateOptions) (*v1.NetworkPolicy, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.NetworkPolicy, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.NetworkPolicyList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.NetworkPolicy, err error) NetworkPolicyExpansion } @@ -63,20 +64,20 @@ func newNetworkPolicies(c *NetworkingV1Client, namespace string) *networkPolicie } // Get takes name of the networkPolicy, and returns the corresponding networkPolicy object, and an error if there is any. -func (c *networkPolicies) Get(name string, options metav1.GetOptions) (result *v1.NetworkPolicy, err error) { +func (c *networkPolicies) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.NetworkPolicy, err error) { result = &v1.NetworkPolicy{} err = c.client.Get(). Namespace(c.ns). Resource("networkpolicies"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of NetworkPolicies that match those selectors. -func (c *networkPolicies) List(opts metav1.ListOptions) (result *v1.NetworkPolicyList, err error) { +func (c *networkPolicies) List(ctx context.Context, opts metav1.ListOptions) (result *v1.NetworkPolicyList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -87,13 +88,13 @@ func (c *networkPolicies) List(opts metav1.ListOptions) (result *v1.NetworkPolic Resource("networkpolicies"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested networkPolicies. -func (c *networkPolicies) Watch(opts metav1.ListOptions) (watch.Interface, error) { +func (c *networkPolicies) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -104,71 +105,74 @@ func (c *networkPolicies) Watch(opts metav1.ListOptions) (watch.Interface, error Resource("networkpolicies"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a networkPolicy and creates it. Returns the server's representation of the networkPolicy, and an error, if there is any. -func (c *networkPolicies) Create(networkPolicy *v1.NetworkPolicy) (result *v1.NetworkPolicy, err error) { +func (c *networkPolicies) Create(ctx context.Context, networkPolicy *v1.NetworkPolicy, opts metav1.CreateOptions) (result *v1.NetworkPolicy, err error) { result = &v1.NetworkPolicy{} err = c.client.Post(). Namespace(c.ns). Resource("networkpolicies"). + VersionedParams(&opts, scheme.ParameterCodec). Body(networkPolicy). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a networkPolicy and updates it. Returns the server's representation of the networkPolicy, and an error, if there is any. -func (c *networkPolicies) Update(networkPolicy *v1.NetworkPolicy) (result *v1.NetworkPolicy, err error) { +func (c *networkPolicies) Update(ctx context.Context, networkPolicy *v1.NetworkPolicy, opts metav1.UpdateOptions) (result *v1.NetworkPolicy, err error) { result = &v1.NetworkPolicy{} err = c.client.Put(). Namespace(c.ns). Resource("networkpolicies"). Name(networkPolicy.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(networkPolicy). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the networkPolicy and deletes it. Returns an error if one occurs. -func (c *networkPolicies) Delete(name string, options *metav1.DeleteOptions) error { +func (c *networkPolicies) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("networkpolicies"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *networkPolicies) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error { +func (c *networkPolicies) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Namespace(c.ns). Resource("networkpolicies"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched networkPolicy. -func (c *networkPolicies) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.NetworkPolicy, err error) { +func (c *networkPolicies) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.NetworkPolicy, err error) { result = &v1.NetworkPolicy{} err = c.client.Patch(pt). Namespace(c.ns). Resource("networkpolicies"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/k8s.io/client-go/kubernetes/typed/networking/v1beta1/fake/fake_ingress.go b/vendor/k8s.io/client-go/kubernetes/typed/networking/v1beta1/fake/fake_ingress.go index ee7821778e..083229e290 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/networking/v1beta1/fake/fake_ingress.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/networking/v1beta1/fake/fake_ingress.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + v1beta1 "k8s.io/api/networking/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" @@ -39,7 +41,7 @@ var ingressesResource = schema.GroupVersionResource{Group: "networking.k8s.io", var ingressesKind = schema.GroupVersionKind{Group: "networking.k8s.io", Version: "v1beta1", Kind: "Ingress"} // Get takes name of the ingress, and returns the corresponding ingress object, and an error if there is any. -func (c *FakeIngresses) Get(name string, options v1.GetOptions) (result *v1beta1.Ingress, err error) { +func (c *FakeIngresses) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.Ingress, err error) { obj, err := c.Fake. Invokes(testing.NewGetAction(ingressesResource, c.ns, name), &v1beta1.Ingress{}) @@ -50,7 +52,7 @@ func (c *FakeIngresses) Get(name string, options v1.GetOptions) (result *v1beta1 } // List takes label and field selectors, and returns the list of Ingresses that match those selectors. -func (c *FakeIngresses) List(opts v1.ListOptions) (result *v1beta1.IngressList, err error) { +func (c *FakeIngresses) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.IngressList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(ingressesResource, ingressesKind, c.ns, opts), &v1beta1.IngressList{}) @@ -72,14 +74,14 @@ func (c *FakeIngresses) List(opts v1.ListOptions) (result *v1beta1.IngressList, } // Watch returns a watch.Interface that watches the requested ingresses. -func (c *FakeIngresses) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeIngresses) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(ingressesResource, c.ns, opts)) } // Create takes the representation of a ingress and creates it. Returns the server's representation of the ingress, and an error, if there is any. -func (c *FakeIngresses) Create(ingress *v1beta1.Ingress) (result *v1beta1.Ingress, err error) { +func (c *FakeIngresses) Create(ctx context.Context, ingress *v1beta1.Ingress, opts v1.CreateOptions) (result *v1beta1.Ingress, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(ingressesResource, c.ns, ingress), &v1beta1.Ingress{}) @@ -90,7 +92,7 @@ func (c *FakeIngresses) Create(ingress *v1beta1.Ingress) (result *v1beta1.Ingres } // Update takes the representation of a ingress and updates it. Returns the server's representation of the ingress, and an error, if there is any. -func (c *FakeIngresses) Update(ingress *v1beta1.Ingress) (result *v1beta1.Ingress, err error) { +func (c *FakeIngresses) Update(ctx context.Context, ingress *v1beta1.Ingress, opts v1.UpdateOptions) (result *v1beta1.Ingress, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(ingressesResource, c.ns, ingress), &v1beta1.Ingress{}) @@ -102,7 +104,7 @@ func (c *FakeIngresses) Update(ingress *v1beta1.Ingress) (result *v1beta1.Ingres // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeIngresses) UpdateStatus(ingress *v1beta1.Ingress) (*v1beta1.Ingress, error) { +func (c *FakeIngresses) UpdateStatus(ctx context.Context, ingress *v1beta1.Ingress, opts v1.UpdateOptions) (*v1beta1.Ingress, error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(ingressesResource, "status", c.ns, ingress), &v1beta1.Ingress{}) @@ -113,7 +115,7 @@ func (c *FakeIngresses) UpdateStatus(ingress *v1beta1.Ingress) (*v1beta1.Ingress } // Delete takes name of the ingress and deletes it. Returns an error if one occurs. -func (c *FakeIngresses) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeIngresses) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewDeleteAction(ingressesResource, c.ns, name), &v1beta1.Ingress{}) @@ -121,15 +123,15 @@ func (c *FakeIngresses) Delete(name string, options *v1.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *FakeIngresses) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(ingressesResource, c.ns, listOptions) +func (c *FakeIngresses) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(ingressesResource, c.ns, listOpts) _, err := c.Fake.Invokes(action, &v1beta1.IngressList{}) return err } // Patch applies the patch and returns the patched ingress. -func (c *FakeIngresses) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Ingress, err error) { +func (c *FakeIngresses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Ingress, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(ingressesResource, c.ns, name, pt, data, subresources...), &v1beta1.Ingress{}) diff --git a/vendor/k8s.io/client-go/kubernetes/typed/networking/v1beta1/fake/fake_ingressclass.go b/vendor/k8s.io/client-go/kubernetes/typed/networking/v1beta1/fake/fake_ingressclass.go new file mode 100644 index 0000000000..9329d0b397 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/networking/v1beta1/fake/fake_ingressclass.go @@ -0,0 +1,122 @@ +/* +Copyright The Kubernetes 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 ( + "context" + + v1beta1 "k8s.io/api/networking/v1beta1" + 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" +) + +// FakeIngressClasses implements IngressClassInterface +type FakeIngressClasses struct { + Fake *FakeNetworkingV1beta1 +} + +var ingressclassesResource = schema.GroupVersionResource{Group: "networking.k8s.io", Version: "v1beta1", Resource: "ingressclasses"} + +var ingressclassesKind = schema.GroupVersionKind{Group: "networking.k8s.io", Version: "v1beta1", Kind: "IngressClass"} + +// Get takes name of the ingressClass, and returns the corresponding ingressClass object, and an error if there is any. +func (c *FakeIngressClasses) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.IngressClass, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootGetAction(ingressclassesResource, name), &v1beta1.IngressClass{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.IngressClass), err +} + +// List takes label and field selectors, and returns the list of IngressClasses that match those selectors. +func (c *FakeIngressClasses) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.IngressClassList, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootListAction(ingressclassesResource, ingressclassesKind, opts), &v1beta1.IngressClassList{}) + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1beta1.IngressClassList{ListMeta: obj.(*v1beta1.IngressClassList).ListMeta} + for _, item := range obj.(*v1beta1.IngressClassList).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 ingressClasses. +func (c *FakeIngressClasses) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewRootWatchAction(ingressclassesResource, opts)) +} + +// Create takes the representation of a ingressClass and creates it. Returns the server's representation of the ingressClass, and an error, if there is any. +func (c *FakeIngressClasses) Create(ctx context.Context, ingressClass *v1beta1.IngressClass, opts v1.CreateOptions) (result *v1beta1.IngressClass, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootCreateAction(ingressclassesResource, ingressClass), &v1beta1.IngressClass{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.IngressClass), err +} + +// Update takes the representation of a ingressClass and updates it. Returns the server's representation of the ingressClass, and an error, if there is any. +func (c *FakeIngressClasses) Update(ctx context.Context, ingressClass *v1beta1.IngressClass, opts v1.UpdateOptions) (result *v1beta1.IngressClass, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateAction(ingressclassesResource, ingressClass), &v1beta1.IngressClass{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.IngressClass), err +} + +// Delete takes name of the ingressClass and deletes it. Returns an error if one occurs. +func (c *FakeIngressClasses) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewRootDeleteAction(ingressclassesResource, name), &v1beta1.IngressClass{}) + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeIngressClasses) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(ingressclassesResource, listOpts) + + _, err := c.Fake.Invokes(action, &v1beta1.IngressClassList{}) + return err +} + +// Patch applies the patch and returns the patched ingressClass. +func (c *FakeIngressClasses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.IngressClass, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(ingressclassesResource, name, pt, data, subresources...), &v1beta1.IngressClass{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.IngressClass), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/networking/v1beta1/fake/fake_networking_client.go b/vendor/k8s.io/client-go/kubernetes/typed/networking/v1beta1/fake/fake_networking_client.go index bfe6fee684..b8792a3064 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/networking/v1beta1/fake/fake_networking_client.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/networking/v1beta1/fake/fake_networking_client.go @@ -32,6 +32,10 @@ func (c *FakeNetworkingV1beta1) Ingresses(namespace string) v1beta1.IngressInter return &FakeIngresses{c, namespace} } +func (c *FakeNetworkingV1beta1) IngressClasses() v1beta1.IngressClassInterface { + return &FakeIngressClasses{c} +} + // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. func (c *FakeNetworkingV1beta1) RESTClient() rest.Interface { diff --git a/vendor/k8s.io/client-go/kubernetes/typed/networking/v1beta1/generated_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/networking/v1beta1/generated_expansion.go index 1442649b37..f74c7257ad 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/networking/v1beta1/generated_expansion.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/networking/v1beta1/generated_expansion.go @@ -19,3 +19,5 @@ limitations under the License. package v1beta1 type IngressExpansion interface{} + +type IngressClassExpansion interface{} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/networking/v1beta1/ingress.go b/vendor/k8s.io/client-go/kubernetes/typed/networking/v1beta1/ingress.go index 8d76678f16..0857c05d69 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/networking/v1beta1/ingress.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/networking/v1beta1/ingress.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" "time" v1beta1 "k8s.io/api/networking/v1beta1" @@ -37,15 +38,15 @@ type IngressesGetter interface { // IngressInterface has methods to work with Ingress resources. type IngressInterface interface { - Create(*v1beta1.Ingress) (*v1beta1.Ingress, error) - Update(*v1beta1.Ingress) (*v1beta1.Ingress, error) - UpdateStatus(*v1beta1.Ingress) (*v1beta1.Ingress, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*v1beta1.Ingress, error) - List(opts v1.ListOptions) (*v1beta1.IngressList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Ingress, err error) + Create(ctx context.Context, ingress *v1beta1.Ingress, opts v1.CreateOptions) (*v1beta1.Ingress, error) + Update(ctx context.Context, ingress *v1beta1.Ingress, opts v1.UpdateOptions) (*v1beta1.Ingress, error) + UpdateStatus(ctx context.Context, ingress *v1beta1.Ingress, opts v1.UpdateOptions) (*v1beta1.Ingress, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.Ingress, error) + List(ctx context.Context, opts v1.ListOptions) (*v1beta1.IngressList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Ingress, err error) IngressExpansion } @@ -64,20 +65,20 @@ func newIngresses(c *NetworkingV1beta1Client, namespace string) *ingresses { } // Get takes name of the ingress, and returns the corresponding ingress object, and an error if there is any. -func (c *ingresses) Get(name string, options v1.GetOptions) (result *v1beta1.Ingress, err error) { +func (c *ingresses) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.Ingress, err error) { result = &v1beta1.Ingress{} err = c.client.Get(). Namespace(c.ns). Resource("ingresses"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of Ingresses that match those selectors. -func (c *ingresses) List(opts v1.ListOptions) (result *v1beta1.IngressList, err error) { +func (c *ingresses) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.IngressList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -88,13 +89,13 @@ func (c *ingresses) List(opts v1.ListOptions) (result *v1beta1.IngressList, err Resource("ingresses"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested ingresses. -func (c *ingresses) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *ingresses) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -105,87 +106,90 @@ func (c *ingresses) Watch(opts v1.ListOptions) (watch.Interface, error) { Resource("ingresses"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a ingress and creates it. Returns the server's representation of the ingress, and an error, if there is any. -func (c *ingresses) Create(ingress *v1beta1.Ingress) (result *v1beta1.Ingress, err error) { +func (c *ingresses) Create(ctx context.Context, ingress *v1beta1.Ingress, opts v1.CreateOptions) (result *v1beta1.Ingress, err error) { result = &v1beta1.Ingress{} err = c.client.Post(). Namespace(c.ns). Resource("ingresses"). + VersionedParams(&opts, scheme.ParameterCodec). Body(ingress). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a ingress and updates it. Returns the server's representation of the ingress, and an error, if there is any. -func (c *ingresses) Update(ingress *v1beta1.Ingress) (result *v1beta1.Ingress, err error) { +func (c *ingresses) Update(ctx context.Context, ingress *v1beta1.Ingress, opts v1.UpdateOptions) (result *v1beta1.Ingress, err error) { result = &v1beta1.Ingress{} err = c.client.Put(). Namespace(c.ns). Resource("ingresses"). Name(ingress.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(ingress). - Do(). + Do(ctx). Into(result) return } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *ingresses) UpdateStatus(ingress *v1beta1.Ingress) (result *v1beta1.Ingress, err error) { +func (c *ingresses) UpdateStatus(ctx context.Context, ingress *v1beta1.Ingress, opts v1.UpdateOptions) (result *v1beta1.Ingress, err error) { result = &v1beta1.Ingress{} err = c.client.Put(). Namespace(c.ns). Resource("ingresses"). Name(ingress.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(ingress). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the ingress and deletes it. Returns an error if one occurs. -func (c *ingresses) Delete(name string, options *v1.DeleteOptions) error { +func (c *ingresses) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("ingresses"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *ingresses) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *ingresses) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Namespace(c.ns). Resource("ingresses"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched ingress. -func (c *ingresses) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Ingress, err error) { +func (c *ingresses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Ingress, err error) { result = &v1beta1.Ingress{} err = c.client.Patch(pt). Namespace(c.ns). Resource("ingresses"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/k8s.io/client-go/kubernetes/typed/networking/v1beta1/ingressclass.go b/vendor/k8s.io/client-go/kubernetes/typed/networking/v1beta1/ingressclass.go new file mode 100644 index 0000000000..2a4237425b --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/networking/v1beta1/ingressclass.go @@ -0,0 +1,168 @@ +/* +Copyright The Kubernetes 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 v1beta1 + +import ( + "context" + "time" + + v1beta1 "k8s.io/api/networking/v1beta1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + scheme "k8s.io/client-go/kubernetes/scheme" + rest "k8s.io/client-go/rest" +) + +// IngressClassesGetter has a method to return a IngressClassInterface. +// A group's client should implement this interface. +type IngressClassesGetter interface { + IngressClasses() IngressClassInterface +} + +// IngressClassInterface has methods to work with IngressClass resources. +type IngressClassInterface interface { + Create(ctx context.Context, ingressClass *v1beta1.IngressClass, opts v1.CreateOptions) (*v1beta1.IngressClass, error) + Update(ctx context.Context, ingressClass *v1beta1.IngressClass, opts v1.UpdateOptions) (*v1beta1.IngressClass, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.IngressClass, error) + List(ctx context.Context, opts v1.ListOptions) (*v1beta1.IngressClassList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.IngressClass, err error) + IngressClassExpansion +} + +// ingressClasses implements IngressClassInterface +type ingressClasses struct { + client rest.Interface +} + +// newIngressClasses returns a IngressClasses +func newIngressClasses(c *NetworkingV1beta1Client) *ingressClasses { + return &ingressClasses{ + client: c.RESTClient(), + } +} + +// Get takes name of the ingressClass, and returns the corresponding ingressClass object, and an error if there is any. +func (c *ingressClasses) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.IngressClass, err error) { + result = &v1beta1.IngressClass{} + err = c.client.Get(). + Resource("ingressclasses"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of IngressClasses that match those selectors. +func (c *ingressClasses) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.IngressClassList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1beta1.IngressClassList{} + err = c.client.Get(). + Resource("ingressclasses"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested ingressClasses. +func (c *ingressClasses) Watch(ctx context.Context, 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(). + Resource("ingressclasses"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a ingressClass and creates it. Returns the server's representation of the ingressClass, and an error, if there is any. +func (c *ingressClasses) Create(ctx context.Context, ingressClass *v1beta1.IngressClass, opts v1.CreateOptions) (result *v1beta1.IngressClass, err error) { + result = &v1beta1.IngressClass{} + err = c.client.Post(). + Resource("ingressclasses"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(ingressClass). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a ingressClass and updates it. Returns the server's representation of the ingressClass, and an error, if there is any. +func (c *ingressClasses) Update(ctx context.Context, ingressClass *v1beta1.IngressClass, opts v1.UpdateOptions) (result *v1beta1.IngressClass, err error) { + result = &v1beta1.IngressClass{} + err = c.client.Put(). + Resource("ingressclasses"). + Name(ingressClass.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(ingressClass). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the ingressClass and deletes it. Returns an error if one occurs. +func (c *ingressClasses) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + return c.client.Delete(). + Resource("ingressclasses"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *ingressClasses) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Resource("ingressclasses"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched ingressClass. +func (c *ingressClasses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.IngressClass, err error) { + result = &v1beta1.IngressClass{} + err = c.client.Patch(pt). + Resource("ingressclasses"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/networking/v1beta1/networking_client.go b/vendor/k8s.io/client-go/kubernetes/typed/networking/v1beta1/networking_client.go index ee523f8e7f..849ac219f6 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/networking/v1beta1/networking_client.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/networking/v1beta1/networking_client.go @@ -27,6 +27,7 @@ import ( type NetworkingV1beta1Interface interface { RESTClient() rest.Interface IngressesGetter + IngressClassesGetter } // NetworkingV1beta1Client is used to interact with features provided by the networking.k8s.io group. @@ -38,6 +39,10 @@ func (c *NetworkingV1beta1Client) Ingresses(namespace string) IngressInterface { return newIngresses(c, namespace) } +func (c *NetworkingV1beta1Client) IngressClasses() IngressClassInterface { + return newIngressClasses(c) +} + // NewForConfig creates a new NetworkingV1beta1Client for the given config. func NewForConfig(c *rest.Config) (*NetworkingV1beta1Client, error) { config := *c diff --git a/vendor/k8s.io/client-go/kubernetes/typed/node/v1alpha1/fake/fake_runtimeclass.go b/vendor/k8s.io/client-go/kubernetes/typed/node/v1alpha1/fake/fake_runtimeclass.go index 3c8b00986f..b49d787ded 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/node/v1alpha1/fake/fake_runtimeclass.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/node/v1alpha1/fake/fake_runtimeclass.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + v1alpha1 "k8s.io/api/node/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" @@ -38,7 +40,7 @@ var runtimeclassesResource = schema.GroupVersionResource{Group: "node.k8s.io", V var runtimeclassesKind = schema.GroupVersionKind{Group: "node.k8s.io", Version: "v1alpha1", Kind: "RuntimeClass"} // Get takes name of the runtimeClass, and returns the corresponding runtimeClass object, and an error if there is any. -func (c *FakeRuntimeClasses) Get(name string, options v1.GetOptions) (result *v1alpha1.RuntimeClass, err error) { +func (c *FakeRuntimeClasses) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.RuntimeClass, err error) { obj, err := c.Fake. Invokes(testing.NewRootGetAction(runtimeclassesResource, name), &v1alpha1.RuntimeClass{}) if obj == nil { @@ -48,7 +50,7 @@ func (c *FakeRuntimeClasses) Get(name string, options v1.GetOptions) (result *v1 } // List takes label and field selectors, and returns the list of RuntimeClasses that match those selectors. -func (c *FakeRuntimeClasses) List(opts v1.ListOptions) (result *v1alpha1.RuntimeClassList, err error) { +func (c *FakeRuntimeClasses) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.RuntimeClassList, err error) { obj, err := c.Fake. Invokes(testing.NewRootListAction(runtimeclassesResource, runtimeclassesKind, opts), &v1alpha1.RuntimeClassList{}) if obj == nil { @@ -69,13 +71,13 @@ func (c *FakeRuntimeClasses) List(opts v1.ListOptions) (result *v1alpha1.Runtime } // Watch returns a watch.Interface that watches the requested runtimeClasses. -func (c *FakeRuntimeClasses) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeRuntimeClasses) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewRootWatchAction(runtimeclassesResource, opts)) } // Create takes the representation of a runtimeClass and creates it. Returns the server's representation of the runtimeClass, and an error, if there is any. -func (c *FakeRuntimeClasses) Create(runtimeClass *v1alpha1.RuntimeClass) (result *v1alpha1.RuntimeClass, err error) { +func (c *FakeRuntimeClasses) Create(ctx context.Context, runtimeClass *v1alpha1.RuntimeClass, opts v1.CreateOptions) (result *v1alpha1.RuntimeClass, err error) { obj, err := c.Fake. Invokes(testing.NewRootCreateAction(runtimeclassesResource, runtimeClass), &v1alpha1.RuntimeClass{}) if obj == nil { @@ -85,7 +87,7 @@ func (c *FakeRuntimeClasses) Create(runtimeClass *v1alpha1.RuntimeClass) (result } // Update takes the representation of a runtimeClass and updates it. Returns the server's representation of the runtimeClass, and an error, if there is any. -func (c *FakeRuntimeClasses) Update(runtimeClass *v1alpha1.RuntimeClass) (result *v1alpha1.RuntimeClass, err error) { +func (c *FakeRuntimeClasses) Update(ctx context.Context, runtimeClass *v1alpha1.RuntimeClass, opts v1.UpdateOptions) (result *v1alpha1.RuntimeClass, err error) { obj, err := c.Fake. Invokes(testing.NewRootUpdateAction(runtimeclassesResource, runtimeClass), &v1alpha1.RuntimeClass{}) if obj == nil { @@ -95,22 +97,22 @@ func (c *FakeRuntimeClasses) Update(runtimeClass *v1alpha1.RuntimeClass) (result } // Delete takes name of the runtimeClass and deletes it. Returns an error if one occurs. -func (c *FakeRuntimeClasses) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeRuntimeClasses) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewRootDeleteAction(runtimeclassesResource, name), &v1alpha1.RuntimeClass{}) return err } // DeleteCollection deletes a collection of objects. -func (c *FakeRuntimeClasses) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewRootDeleteCollectionAction(runtimeclassesResource, listOptions) +func (c *FakeRuntimeClasses) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(runtimeclassesResource, listOpts) _, err := c.Fake.Invokes(action, &v1alpha1.RuntimeClassList{}) return err } // Patch applies the patch and returns the patched runtimeClass. -func (c *FakeRuntimeClasses) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.RuntimeClass, err error) { +func (c *FakeRuntimeClasses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.RuntimeClass, err error) { obj, err := c.Fake. Invokes(testing.NewRootPatchSubresourceAction(runtimeclassesResource, name, pt, data, subresources...), &v1alpha1.RuntimeClass{}) if obj == nil { diff --git a/vendor/k8s.io/client-go/kubernetes/typed/node/v1alpha1/runtimeclass.go b/vendor/k8s.io/client-go/kubernetes/typed/node/v1alpha1/runtimeclass.go index 044460ec0b..402c23e8af 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/node/v1alpha1/runtimeclass.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/node/v1alpha1/runtimeclass.go @@ -19,6 +19,7 @@ limitations under the License. package v1alpha1 import ( + "context" "time" v1alpha1 "k8s.io/api/node/v1alpha1" @@ -37,14 +38,14 @@ type RuntimeClassesGetter interface { // RuntimeClassInterface has methods to work with RuntimeClass resources. type RuntimeClassInterface interface { - Create(*v1alpha1.RuntimeClass) (*v1alpha1.RuntimeClass, error) - Update(*v1alpha1.RuntimeClass) (*v1alpha1.RuntimeClass, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*v1alpha1.RuntimeClass, error) - List(opts v1.ListOptions) (*v1alpha1.RuntimeClassList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.RuntimeClass, err error) + Create(ctx context.Context, runtimeClass *v1alpha1.RuntimeClass, opts v1.CreateOptions) (*v1alpha1.RuntimeClass, error) + Update(ctx context.Context, runtimeClass *v1alpha1.RuntimeClass, opts v1.UpdateOptions) (*v1alpha1.RuntimeClass, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.RuntimeClass, error) + List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.RuntimeClassList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.RuntimeClass, err error) RuntimeClassExpansion } @@ -61,19 +62,19 @@ func newRuntimeClasses(c *NodeV1alpha1Client) *runtimeClasses { } // Get takes name of the runtimeClass, and returns the corresponding runtimeClass object, and an error if there is any. -func (c *runtimeClasses) Get(name string, options v1.GetOptions) (result *v1alpha1.RuntimeClass, err error) { +func (c *runtimeClasses) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.RuntimeClass, err error) { result = &v1alpha1.RuntimeClass{} err = c.client.Get(). Resource("runtimeclasses"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of RuntimeClasses that match those selectors. -func (c *runtimeClasses) List(opts v1.ListOptions) (result *v1alpha1.RuntimeClassList, err error) { +func (c *runtimeClasses) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.RuntimeClassList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -83,13 +84,13 @@ func (c *runtimeClasses) List(opts v1.ListOptions) (result *v1alpha1.RuntimeClas Resource("runtimeclasses"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested runtimeClasses. -func (c *runtimeClasses) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *runtimeClasses) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -99,66 +100,69 @@ func (c *runtimeClasses) Watch(opts v1.ListOptions) (watch.Interface, error) { Resource("runtimeclasses"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a runtimeClass and creates it. Returns the server's representation of the runtimeClass, and an error, if there is any. -func (c *runtimeClasses) Create(runtimeClass *v1alpha1.RuntimeClass) (result *v1alpha1.RuntimeClass, err error) { +func (c *runtimeClasses) Create(ctx context.Context, runtimeClass *v1alpha1.RuntimeClass, opts v1.CreateOptions) (result *v1alpha1.RuntimeClass, err error) { result = &v1alpha1.RuntimeClass{} err = c.client.Post(). Resource("runtimeclasses"). + VersionedParams(&opts, scheme.ParameterCodec). Body(runtimeClass). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a runtimeClass and updates it. Returns the server's representation of the runtimeClass, and an error, if there is any. -func (c *runtimeClasses) Update(runtimeClass *v1alpha1.RuntimeClass) (result *v1alpha1.RuntimeClass, err error) { +func (c *runtimeClasses) Update(ctx context.Context, runtimeClass *v1alpha1.RuntimeClass, opts v1.UpdateOptions) (result *v1alpha1.RuntimeClass, err error) { result = &v1alpha1.RuntimeClass{} err = c.client.Put(). Resource("runtimeclasses"). Name(runtimeClass.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(runtimeClass). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the runtimeClass and deletes it. Returns an error if one occurs. -func (c *runtimeClasses) Delete(name string, options *v1.DeleteOptions) error { +func (c *runtimeClasses) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). Resource("runtimeclasses"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *runtimeClasses) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *runtimeClasses) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Resource("runtimeclasses"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched runtimeClass. -func (c *runtimeClasses) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.RuntimeClass, err error) { +func (c *runtimeClasses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.RuntimeClass, err error) { result = &v1alpha1.RuntimeClass{} err = c.client.Patch(pt). Resource("runtimeclasses"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/k8s.io/client-go/kubernetes/typed/node/v1beta1/fake/fake_runtimeclass.go b/vendor/k8s.io/client-go/kubernetes/typed/node/v1beta1/fake/fake_runtimeclass.go index 201d742667..d7987d9812 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/node/v1beta1/fake/fake_runtimeclass.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/node/v1beta1/fake/fake_runtimeclass.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + v1beta1 "k8s.io/api/node/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" @@ -38,7 +40,7 @@ var runtimeclassesResource = schema.GroupVersionResource{Group: "node.k8s.io", V var runtimeclassesKind = schema.GroupVersionKind{Group: "node.k8s.io", Version: "v1beta1", Kind: "RuntimeClass"} // Get takes name of the runtimeClass, and returns the corresponding runtimeClass object, and an error if there is any. -func (c *FakeRuntimeClasses) Get(name string, options v1.GetOptions) (result *v1beta1.RuntimeClass, err error) { +func (c *FakeRuntimeClasses) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.RuntimeClass, err error) { obj, err := c.Fake. Invokes(testing.NewRootGetAction(runtimeclassesResource, name), &v1beta1.RuntimeClass{}) if obj == nil { @@ -48,7 +50,7 @@ func (c *FakeRuntimeClasses) Get(name string, options v1.GetOptions) (result *v1 } // List takes label and field selectors, and returns the list of RuntimeClasses that match those selectors. -func (c *FakeRuntimeClasses) List(opts v1.ListOptions) (result *v1beta1.RuntimeClassList, err error) { +func (c *FakeRuntimeClasses) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.RuntimeClassList, err error) { obj, err := c.Fake. Invokes(testing.NewRootListAction(runtimeclassesResource, runtimeclassesKind, opts), &v1beta1.RuntimeClassList{}) if obj == nil { @@ -69,13 +71,13 @@ func (c *FakeRuntimeClasses) List(opts v1.ListOptions) (result *v1beta1.RuntimeC } // Watch returns a watch.Interface that watches the requested runtimeClasses. -func (c *FakeRuntimeClasses) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeRuntimeClasses) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewRootWatchAction(runtimeclassesResource, opts)) } // Create takes the representation of a runtimeClass and creates it. Returns the server's representation of the runtimeClass, and an error, if there is any. -func (c *FakeRuntimeClasses) Create(runtimeClass *v1beta1.RuntimeClass) (result *v1beta1.RuntimeClass, err error) { +func (c *FakeRuntimeClasses) Create(ctx context.Context, runtimeClass *v1beta1.RuntimeClass, opts v1.CreateOptions) (result *v1beta1.RuntimeClass, err error) { obj, err := c.Fake. Invokes(testing.NewRootCreateAction(runtimeclassesResource, runtimeClass), &v1beta1.RuntimeClass{}) if obj == nil { @@ -85,7 +87,7 @@ func (c *FakeRuntimeClasses) Create(runtimeClass *v1beta1.RuntimeClass) (result } // Update takes the representation of a runtimeClass and updates it. Returns the server's representation of the runtimeClass, and an error, if there is any. -func (c *FakeRuntimeClasses) Update(runtimeClass *v1beta1.RuntimeClass) (result *v1beta1.RuntimeClass, err error) { +func (c *FakeRuntimeClasses) Update(ctx context.Context, runtimeClass *v1beta1.RuntimeClass, opts v1.UpdateOptions) (result *v1beta1.RuntimeClass, err error) { obj, err := c.Fake. Invokes(testing.NewRootUpdateAction(runtimeclassesResource, runtimeClass), &v1beta1.RuntimeClass{}) if obj == nil { @@ -95,22 +97,22 @@ func (c *FakeRuntimeClasses) Update(runtimeClass *v1beta1.RuntimeClass) (result } // Delete takes name of the runtimeClass and deletes it. Returns an error if one occurs. -func (c *FakeRuntimeClasses) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeRuntimeClasses) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewRootDeleteAction(runtimeclassesResource, name), &v1beta1.RuntimeClass{}) return err } // DeleteCollection deletes a collection of objects. -func (c *FakeRuntimeClasses) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewRootDeleteCollectionAction(runtimeclassesResource, listOptions) +func (c *FakeRuntimeClasses) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(runtimeclassesResource, listOpts) _, err := c.Fake.Invokes(action, &v1beta1.RuntimeClassList{}) return err } // Patch applies the patch and returns the patched runtimeClass. -func (c *FakeRuntimeClasses) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.RuntimeClass, err error) { +func (c *FakeRuntimeClasses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.RuntimeClass, err error) { obj, err := c.Fake. Invokes(testing.NewRootPatchSubresourceAction(runtimeclassesResource, name, pt, data, subresources...), &v1beta1.RuntimeClass{}) if obj == nil { diff --git a/vendor/k8s.io/client-go/kubernetes/typed/node/v1beta1/runtimeclass.go b/vendor/k8s.io/client-go/kubernetes/typed/node/v1beta1/runtimeclass.go index b3f7c497fb..b0d1886ecc 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/node/v1beta1/runtimeclass.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/node/v1beta1/runtimeclass.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" "time" v1beta1 "k8s.io/api/node/v1beta1" @@ -37,14 +38,14 @@ type RuntimeClassesGetter interface { // RuntimeClassInterface has methods to work with RuntimeClass resources. type RuntimeClassInterface interface { - Create(*v1beta1.RuntimeClass) (*v1beta1.RuntimeClass, error) - Update(*v1beta1.RuntimeClass) (*v1beta1.RuntimeClass, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*v1beta1.RuntimeClass, error) - List(opts v1.ListOptions) (*v1beta1.RuntimeClassList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.RuntimeClass, err error) + Create(ctx context.Context, runtimeClass *v1beta1.RuntimeClass, opts v1.CreateOptions) (*v1beta1.RuntimeClass, error) + Update(ctx context.Context, runtimeClass *v1beta1.RuntimeClass, opts v1.UpdateOptions) (*v1beta1.RuntimeClass, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.RuntimeClass, error) + List(ctx context.Context, opts v1.ListOptions) (*v1beta1.RuntimeClassList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.RuntimeClass, err error) RuntimeClassExpansion } @@ -61,19 +62,19 @@ func newRuntimeClasses(c *NodeV1beta1Client) *runtimeClasses { } // Get takes name of the runtimeClass, and returns the corresponding runtimeClass object, and an error if there is any. -func (c *runtimeClasses) Get(name string, options v1.GetOptions) (result *v1beta1.RuntimeClass, err error) { +func (c *runtimeClasses) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.RuntimeClass, err error) { result = &v1beta1.RuntimeClass{} err = c.client.Get(). Resource("runtimeclasses"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of RuntimeClasses that match those selectors. -func (c *runtimeClasses) List(opts v1.ListOptions) (result *v1beta1.RuntimeClassList, err error) { +func (c *runtimeClasses) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.RuntimeClassList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -83,13 +84,13 @@ func (c *runtimeClasses) List(opts v1.ListOptions) (result *v1beta1.RuntimeClass Resource("runtimeclasses"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested runtimeClasses. -func (c *runtimeClasses) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *runtimeClasses) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -99,66 +100,69 @@ func (c *runtimeClasses) Watch(opts v1.ListOptions) (watch.Interface, error) { Resource("runtimeclasses"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a runtimeClass and creates it. Returns the server's representation of the runtimeClass, and an error, if there is any. -func (c *runtimeClasses) Create(runtimeClass *v1beta1.RuntimeClass) (result *v1beta1.RuntimeClass, err error) { +func (c *runtimeClasses) Create(ctx context.Context, runtimeClass *v1beta1.RuntimeClass, opts v1.CreateOptions) (result *v1beta1.RuntimeClass, err error) { result = &v1beta1.RuntimeClass{} err = c.client.Post(). Resource("runtimeclasses"). + VersionedParams(&opts, scheme.ParameterCodec). Body(runtimeClass). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a runtimeClass and updates it. Returns the server's representation of the runtimeClass, and an error, if there is any. -func (c *runtimeClasses) Update(runtimeClass *v1beta1.RuntimeClass) (result *v1beta1.RuntimeClass, err error) { +func (c *runtimeClasses) Update(ctx context.Context, runtimeClass *v1beta1.RuntimeClass, opts v1.UpdateOptions) (result *v1beta1.RuntimeClass, err error) { result = &v1beta1.RuntimeClass{} err = c.client.Put(). Resource("runtimeclasses"). Name(runtimeClass.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(runtimeClass). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the runtimeClass and deletes it. Returns an error if one occurs. -func (c *runtimeClasses) Delete(name string, options *v1.DeleteOptions) error { +func (c *runtimeClasses) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). Resource("runtimeclasses"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *runtimeClasses) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *runtimeClasses) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Resource("runtimeclasses"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched runtimeClass. -func (c *runtimeClasses) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.RuntimeClass, err error) { +func (c *runtimeClasses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.RuntimeClass, err error) { result = &v1beta1.RuntimeClass{} err = c.client.Patch(pt). Resource("runtimeclasses"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/eviction_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/eviction_expansion.go index 40bad265f0..c003671f5d 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/eviction_expansion.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/eviction_expansion.go @@ -17,15 +17,17 @@ limitations under the License. package v1beta1 import ( + "context" + policy "k8s.io/api/policy/v1beta1" ) // The EvictionExpansion interface allows manually adding extra methods to the ScaleInterface. type EvictionExpansion interface { - Evict(eviction *policy.Eviction) error + Evict(ctx context.Context, eviction *policy.Eviction) error } -func (c *evictions) Evict(eviction *policy.Eviction) error { +func (c *evictions) Evict(ctx context.Context, eviction *policy.Eviction) error { return c.client.Post(). AbsPath("/api/v1"). Namespace(eviction.Namespace). @@ -33,6 +35,6 @@ func (c *evictions) Evict(eviction *policy.Eviction) error { Name(eviction.Name). SubResource("eviction"). Body(eviction). - Do(). + Do(ctx). Error() } diff --git a/vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/fake/fake_eviction_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/fake/fake_eviction_expansion.go index d660d09e56..f97522bb38 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/fake/fake_eviction_expansion.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/fake/fake_eviction_expansion.go @@ -17,12 +17,14 @@ limitations under the License. package fake import ( + "context" + policy "k8s.io/api/policy/v1beta1" "k8s.io/apimachinery/pkg/runtime/schema" core "k8s.io/client-go/testing" ) -func (c *FakeEvictions) Evict(eviction *policy.Eviction) error { +func (c *FakeEvictions) Evict(ctx context.Context, eviction *policy.Eviction) error { action := core.CreateActionImpl{} action.Verb = "create" action.Namespace = c.ns diff --git a/vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/fake/fake_poddisruptionbudget.go b/vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/fake/fake_poddisruptionbudget.go index 5bfbbca47f..78ea7815ac 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/fake/fake_poddisruptionbudget.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/fake/fake_poddisruptionbudget.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + v1beta1 "k8s.io/api/policy/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" @@ -39,7 +41,7 @@ var poddisruptionbudgetsResource = schema.GroupVersionResource{Group: "policy", var poddisruptionbudgetsKind = schema.GroupVersionKind{Group: "policy", Version: "v1beta1", Kind: "PodDisruptionBudget"} // Get takes name of the podDisruptionBudget, and returns the corresponding podDisruptionBudget object, and an error if there is any. -func (c *FakePodDisruptionBudgets) Get(name string, options v1.GetOptions) (result *v1beta1.PodDisruptionBudget, err error) { +func (c *FakePodDisruptionBudgets) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.PodDisruptionBudget, err error) { obj, err := c.Fake. Invokes(testing.NewGetAction(poddisruptionbudgetsResource, c.ns, name), &v1beta1.PodDisruptionBudget{}) @@ -50,7 +52,7 @@ func (c *FakePodDisruptionBudgets) Get(name string, options v1.GetOptions) (resu } // List takes label and field selectors, and returns the list of PodDisruptionBudgets that match those selectors. -func (c *FakePodDisruptionBudgets) List(opts v1.ListOptions) (result *v1beta1.PodDisruptionBudgetList, err error) { +func (c *FakePodDisruptionBudgets) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.PodDisruptionBudgetList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(poddisruptionbudgetsResource, poddisruptionbudgetsKind, c.ns, opts), &v1beta1.PodDisruptionBudgetList{}) @@ -72,14 +74,14 @@ func (c *FakePodDisruptionBudgets) List(opts v1.ListOptions) (result *v1beta1.Po } // Watch returns a watch.Interface that watches the requested podDisruptionBudgets. -func (c *FakePodDisruptionBudgets) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakePodDisruptionBudgets) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(poddisruptionbudgetsResource, c.ns, opts)) } // Create takes the representation of a podDisruptionBudget and creates it. Returns the server's representation of the podDisruptionBudget, and an error, if there is any. -func (c *FakePodDisruptionBudgets) Create(podDisruptionBudget *v1beta1.PodDisruptionBudget) (result *v1beta1.PodDisruptionBudget, err error) { +func (c *FakePodDisruptionBudgets) Create(ctx context.Context, podDisruptionBudget *v1beta1.PodDisruptionBudget, opts v1.CreateOptions) (result *v1beta1.PodDisruptionBudget, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(poddisruptionbudgetsResource, c.ns, podDisruptionBudget), &v1beta1.PodDisruptionBudget{}) @@ -90,7 +92,7 @@ func (c *FakePodDisruptionBudgets) Create(podDisruptionBudget *v1beta1.PodDisrup } // Update takes the representation of a podDisruptionBudget and updates it. Returns the server's representation of the podDisruptionBudget, and an error, if there is any. -func (c *FakePodDisruptionBudgets) Update(podDisruptionBudget *v1beta1.PodDisruptionBudget) (result *v1beta1.PodDisruptionBudget, err error) { +func (c *FakePodDisruptionBudgets) Update(ctx context.Context, podDisruptionBudget *v1beta1.PodDisruptionBudget, opts v1.UpdateOptions) (result *v1beta1.PodDisruptionBudget, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(poddisruptionbudgetsResource, c.ns, podDisruptionBudget), &v1beta1.PodDisruptionBudget{}) @@ -102,7 +104,7 @@ func (c *FakePodDisruptionBudgets) Update(podDisruptionBudget *v1beta1.PodDisrup // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakePodDisruptionBudgets) UpdateStatus(podDisruptionBudget *v1beta1.PodDisruptionBudget) (*v1beta1.PodDisruptionBudget, error) { +func (c *FakePodDisruptionBudgets) UpdateStatus(ctx context.Context, podDisruptionBudget *v1beta1.PodDisruptionBudget, opts v1.UpdateOptions) (*v1beta1.PodDisruptionBudget, error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(poddisruptionbudgetsResource, "status", c.ns, podDisruptionBudget), &v1beta1.PodDisruptionBudget{}) @@ -113,7 +115,7 @@ func (c *FakePodDisruptionBudgets) UpdateStatus(podDisruptionBudget *v1beta1.Pod } // Delete takes name of the podDisruptionBudget and deletes it. Returns an error if one occurs. -func (c *FakePodDisruptionBudgets) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakePodDisruptionBudgets) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewDeleteAction(poddisruptionbudgetsResource, c.ns, name), &v1beta1.PodDisruptionBudget{}) @@ -121,15 +123,15 @@ func (c *FakePodDisruptionBudgets) Delete(name string, options *v1.DeleteOptions } // DeleteCollection deletes a collection of objects. -func (c *FakePodDisruptionBudgets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(poddisruptionbudgetsResource, c.ns, listOptions) +func (c *FakePodDisruptionBudgets) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(poddisruptionbudgetsResource, c.ns, listOpts) _, err := c.Fake.Invokes(action, &v1beta1.PodDisruptionBudgetList{}) return err } // Patch applies the patch and returns the patched podDisruptionBudget. -func (c *FakePodDisruptionBudgets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.PodDisruptionBudget, err error) { +func (c *FakePodDisruptionBudgets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.PodDisruptionBudget, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(poddisruptionbudgetsResource, c.ns, name, pt, data, subresources...), &v1beta1.PodDisruptionBudget{}) diff --git a/vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/fake/fake_podsecuritypolicy.go b/vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/fake/fake_podsecuritypolicy.go index 32d1989f33..667f86b792 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/fake/fake_podsecuritypolicy.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/fake/fake_podsecuritypolicy.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + v1beta1 "k8s.io/api/policy/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" @@ -38,7 +40,7 @@ var podsecuritypoliciesResource = schema.GroupVersionResource{Group: "policy", V var podsecuritypoliciesKind = schema.GroupVersionKind{Group: "policy", Version: "v1beta1", Kind: "PodSecurityPolicy"} // Get takes name of the podSecurityPolicy, and returns the corresponding podSecurityPolicy object, and an error if there is any. -func (c *FakePodSecurityPolicies) Get(name string, options v1.GetOptions) (result *v1beta1.PodSecurityPolicy, err error) { +func (c *FakePodSecurityPolicies) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.PodSecurityPolicy, err error) { obj, err := c.Fake. Invokes(testing.NewRootGetAction(podsecuritypoliciesResource, name), &v1beta1.PodSecurityPolicy{}) if obj == nil { @@ -48,7 +50,7 @@ func (c *FakePodSecurityPolicies) Get(name string, options v1.GetOptions) (resul } // List takes label and field selectors, and returns the list of PodSecurityPolicies that match those selectors. -func (c *FakePodSecurityPolicies) List(opts v1.ListOptions) (result *v1beta1.PodSecurityPolicyList, err error) { +func (c *FakePodSecurityPolicies) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.PodSecurityPolicyList, err error) { obj, err := c.Fake. Invokes(testing.NewRootListAction(podsecuritypoliciesResource, podsecuritypoliciesKind, opts), &v1beta1.PodSecurityPolicyList{}) if obj == nil { @@ -69,13 +71,13 @@ func (c *FakePodSecurityPolicies) List(opts v1.ListOptions) (result *v1beta1.Pod } // Watch returns a watch.Interface that watches the requested podSecurityPolicies. -func (c *FakePodSecurityPolicies) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakePodSecurityPolicies) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewRootWatchAction(podsecuritypoliciesResource, opts)) } // Create takes the representation of a podSecurityPolicy and creates it. Returns the server's representation of the podSecurityPolicy, and an error, if there is any. -func (c *FakePodSecurityPolicies) Create(podSecurityPolicy *v1beta1.PodSecurityPolicy) (result *v1beta1.PodSecurityPolicy, err error) { +func (c *FakePodSecurityPolicies) Create(ctx context.Context, podSecurityPolicy *v1beta1.PodSecurityPolicy, opts v1.CreateOptions) (result *v1beta1.PodSecurityPolicy, err error) { obj, err := c.Fake. Invokes(testing.NewRootCreateAction(podsecuritypoliciesResource, podSecurityPolicy), &v1beta1.PodSecurityPolicy{}) if obj == nil { @@ -85,7 +87,7 @@ func (c *FakePodSecurityPolicies) Create(podSecurityPolicy *v1beta1.PodSecurityP } // Update takes the representation of a podSecurityPolicy and updates it. Returns the server's representation of the podSecurityPolicy, and an error, if there is any. -func (c *FakePodSecurityPolicies) Update(podSecurityPolicy *v1beta1.PodSecurityPolicy) (result *v1beta1.PodSecurityPolicy, err error) { +func (c *FakePodSecurityPolicies) Update(ctx context.Context, podSecurityPolicy *v1beta1.PodSecurityPolicy, opts v1.UpdateOptions) (result *v1beta1.PodSecurityPolicy, err error) { obj, err := c.Fake. Invokes(testing.NewRootUpdateAction(podsecuritypoliciesResource, podSecurityPolicy), &v1beta1.PodSecurityPolicy{}) if obj == nil { @@ -95,22 +97,22 @@ func (c *FakePodSecurityPolicies) Update(podSecurityPolicy *v1beta1.PodSecurityP } // Delete takes name of the podSecurityPolicy and deletes it. Returns an error if one occurs. -func (c *FakePodSecurityPolicies) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakePodSecurityPolicies) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewRootDeleteAction(podsecuritypoliciesResource, name), &v1beta1.PodSecurityPolicy{}) return err } // DeleteCollection deletes a collection of objects. -func (c *FakePodSecurityPolicies) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewRootDeleteCollectionAction(podsecuritypoliciesResource, listOptions) +func (c *FakePodSecurityPolicies) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(podsecuritypoliciesResource, listOpts) _, err := c.Fake.Invokes(action, &v1beta1.PodSecurityPolicyList{}) return err } // Patch applies the patch and returns the patched podSecurityPolicy. -func (c *FakePodSecurityPolicies) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.PodSecurityPolicy, err error) { +func (c *FakePodSecurityPolicies) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.PodSecurityPolicy, err error) { obj, err := c.Fake. Invokes(testing.NewRootPatchSubresourceAction(podsecuritypoliciesResource, name, pt, data, subresources...), &v1beta1.PodSecurityPolicy{}) if obj == nil { diff --git a/vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/poddisruptionbudget.go b/vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/poddisruptionbudget.go index 864af9a262..95b7ff1b82 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/poddisruptionbudget.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/poddisruptionbudget.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" "time" v1beta1 "k8s.io/api/policy/v1beta1" @@ -37,15 +38,15 @@ type PodDisruptionBudgetsGetter interface { // PodDisruptionBudgetInterface has methods to work with PodDisruptionBudget resources. type PodDisruptionBudgetInterface interface { - Create(*v1beta1.PodDisruptionBudget) (*v1beta1.PodDisruptionBudget, error) - Update(*v1beta1.PodDisruptionBudget) (*v1beta1.PodDisruptionBudget, error) - UpdateStatus(*v1beta1.PodDisruptionBudget) (*v1beta1.PodDisruptionBudget, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*v1beta1.PodDisruptionBudget, error) - List(opts v1.ListOptions) (*v1beta1.PodDisruptionBudgetList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.PodDisruptionBudget, err error) + Create(ctx context.Context, podDisruptionBudget *v1beta1.PodDisruptionBudget, opts v1.CreateOptions) (*v1beta1.PodDisruptionBudget, error) + Update(ctx context.Context, podDisruptionBudget *v1beta1.PodDisruptionBudget, opts v1.UpdateOptions) (*v1beta1.PodDisruptionBudget, error) + UpdateStatus(ctx context.Context, podDisruptionBudget *v1beta1.PodDisruptionBudget, opts v1.UpdateOptions) (*v1beta1.PodDisruptionBudget, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.PodDisruptionBudget, error) + List(ctx context.Context, opts v1.ListOptions) (*v1beta1.PodDisruptionBudgetList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.PodDisruptionBudget, err error) PodDisruptionBudgetExpansion } @@ -64,20 +65,20 @@ func newPodDisruptionBudgets(c *PolicyV1beta1Client, namespace string) *podDisru } // Get takes name of the podDisruptionBudget, and returns the corresponding podDisruptionBudget object, and an error if there is any. -func (c *podDisruptionBudgets) Get(name string, options v1.GetOptions) (result *v1beta1.PodDisruptionBudget, err error) { +func (c *podDisruptionBudgets) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.PodDisruptionBudget, err error) { result = &v1beta1.PodDisruptionBudget{} err = c.client.Get(). Namespace(c.ns). Resource("poddisruptionbudgets"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of PodDisruptionBudgets that match those selectors. -func (c *podDisruptionBudgets) List(opts v1.ListOptions) (result *v1beta1.PodDisruptionBudgetList, err error) { +func (c *podDisruptionBudgets) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.PodDisruptionBudgetList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -88,13 +89,13 @@ func (c *podDisruptionBudgets) List(opts v1.ListOptions) (result *v1beta1.PodDis Resource("poddisruptionbudgets"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested podDisruptionBudgets. -func (c *podDisruptionBudgets) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *podDisruptionBudgets) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -105,87 +106,90 @@ func (c *podDisruptionBudgets) Watch(opts v1.ListOptions) (watch.Interface, erro Resource("poddisruptionbudgets"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a podDisruptionBudget and creates it. Returns the server's representation of the podDisruptionBudget, and an error, if there is any. -func (c *podDisruptionBudgets) Create(podDisruptionBudget *v1beta1.PodDisruptionBudget) (result *v1beta1.PodDisruptionBudget, err error) { +func (c *podDisruptionBudgets) Create(ctx context.Context, podDisruptionBudget *v1beta1.PodDisruptionBudget, opts v1.CreateOptions) (result *v1beta1.PodDisruptionBudget, err error) { result = &v1beta1.PodDisruptionBudget{} err = c.client.Post(). Namespace(c.ns). Resource("poddisruptionbudgets"). + VersionedParams(&opts, scheme.ParameterCodec). Body(podDisruptionBudget). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a podDisruptionBudget and updates it. Returns the server's representation of the podDisruptionBudget, and an error, if there is any. -func (c *podDisruptionBudgets) Update(podDisruptionBudget *v1beta1.PodDisruptionBudget) (result *v1beta1.PodDisruptionBudget, err error) { +func (c *podDisruptionBudgets) Update(ctx context.Context, podDisruptionBudget *v1beta1.PodDisruptionBudget, opts v1.UpdateOptions) (result *v1beta1.PodDisruptionBudget, err error) { result = &v1beta1.PodDisruptionBudget{} err = c.client.Put(). Namespace(c.ns). Resource("poddisruptionbudgets"). Name(podDisruptionBudget.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(podDisruptionBudget). - Do(). + Do(ctx). Into(result) return } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *podDisruptionBudgets) UpdateStatus(podDisruptionBudget *v1beta1.PodDisruptionBudget) (result *v1beta1.PodDisruptionBudget, err error) { +func (c *podDisruptionBudgets) UpdateStatus(ctx context.Context, podDisruptionBudget *v1beta1.PodDisruptionBudget, opts v1.UpdateOptions) (result *v1beta1.PodDisruptionBudget, err error) { result = &v1beta1.PodDisruptionBudget{} err = c.client.Put(). Namespace(c.ns). Resource("poddisruptionbudgets"). Name(podDisruptionBudget.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(podDisruptionBudget). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the podDisruptionBudget and deletes it. Returns an error if one occurs. -func (c *podDisruptionBudgets) Delete(name string, options *v1.DeleteOptions) error { +func (c *podDisruptionBudgets) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("poddisruptionbudgets"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *podDisruptionBudgets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *podDisruptionBudgets) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Namespace(c.ns). Resource("poddisruptionbudgets"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched podDisruptionBudget. -func (c *podDisruptionBudgets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.PodDisruptionBudget, err error) { +func (c *podDisruptionBudgets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.PodDisruptionBudget, err error) { result = &v1beta1.PodDisruptionBudget{} err = c.client.Patch(pt). Namespace(c.ns). Resource("poddisruptionbudgets"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/podsecuritypolicy.go b/vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/podsecuritypolicy.go index d02096d747..15d7bb9e46 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/podsecuritypolicy.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/podsecuritypolicy.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" "time" v1beta1 "k8s.io/api/policy/v1beta1" @@ -37,14 +38,14 @@ type PodSecurityPoliciesGetter interface { // PodSecurityPolicyInterface has methods to work with PodSecurityPolicy resources. type PodSecurityPolicyInterface interface { - Create(*v1beta1.PodSecurityPolicy) (*v1beta1.PodSecurityPolicy, error) - Update(*v1beta1.PodSecurityPolicy) (*v1beta1.PodSecurityPolicy, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*v1beta1.PodSecurityPolicy, error) - List(opts v1.ListOptions) (*v1beta1.PodSecurityPolicyList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.PodSecurityPolicy, err error) + Create(ctx context.Context, podSecurityPolicy *v1beta1.PodSecurityPolicy, opts v1.CreateOptions) (*v1beta1.PodSecurityPolicy, error) + Update(ctx context.Context, podSecurityPolicy *v1beta1.PodSecurityPolicy, opts v1.UpdateOptions) (*v1beta1.PodSecurityPolicy, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.PodSecurityPolicy, error) + List(ctx context.Context, opts v1.ListOptions) (*v1beta1.PodSecurityPolicyList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.PodSecurityPolicy, err error) PodSecurityPolicyExpansion } @@ -61,19 +62,19 @@ func newPodSecurityPolicies(c *PolicyV1beta1Client) *podSecurityPolicies { } // Get takes name of the podSecurityPolicy, and returns the corresponding podSecurityPolicy object, and an error if there is any. -func (c *podSecurityPolicies) Get(name string, options v1.GetOptions) (result *v1beta1.PodSecurityPolicy, err error) { +func (c *podSecurityPolicies) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.PodSecurityPolicy, err error) { result = &v1beta1.PodSecurityPolicy{} err = c.client.Get(). Resource("podsecuritypolicies"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of PodSecurityPolicies that match those selectors. -func (c *podSecurityPolicies) List(opts v1.ListOptions) (result *v1beta1.PodSecurityPolicyList, err error) { +func (c *podSecurityPolicies) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.PodSecurityPolicyList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -83,13 +84,13 @@ func (c *podSecurityPolicies) List(opts v1.ListOptions) (result *v1beta1.PodSecu Resource("podsecuritypolicies"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested podSecurityPolicies. -func (c *podSecurityPolicies) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *podSecurityPolicies) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -99,66 +100,69 @@ func (c *podSecurityPolicies) Watch(opts v1.ListOptions) (watch.Interface, error Resource("podsecuritypolicies"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a podSecurityPolicy and creates it. Returns the server's representation of the podSecurityPolicy, and an error, if there is any. -func (c *podSecurityPolicies) Create(podSecurityPolicy *v1beta1.PodSecurityPolicy) (result *v1beta1.PodSecurityPolicy, err error) { +func (c *podSecurityPolicies) Create(ctx context.Context, podSecurityPolicy *v1beta1.PodSecurityPolicy, opts v1.CreateOptions) (result *v1beta1.PodSecurityPolicy, err error) { result = &v1beta1.PodSecurityPolicy{} err = c.client.Post(). Resource("podsecuritypolicies"). + VersionedParams(&opts, scheme.ParameterCodec). Body(podSecurityPolicy). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a podSecurityPolicy and updates it. Returns the server's representation of the podSecurityPolicy, and an error, if there is any. -func (c *podSecurityPolicies) Update(podSecurityPolicy *v1beta1.PodSecurityPolicy) (result *v1beta1.PodSecurityPolicy, err error) { +func (c *podSecurityPolicies) Update(ctx context.Context, podSecurityPolicy *v1beta1.PodSecurityPolicy, opts v1.UpdateOptions) (result *v1beta1.PodSecurityPolicy, err error) { result = &v1beta1.PodSecurityPolicy{} err = c.client.Put(). Resource("podsecuritypolicies"). Name(podSecurityPolicy.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(podSecurityPolicy). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the podSecurityPolicy and deletes it. Returns an error if one occurs. -func (c *podSecurityPolicies) Delete(name string, options *v1.DeleteOptions) error { +func (c *podSecurityPolicies) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). Resource("podsecuritypolicies"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *podSecurityPolicies) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *podSecurityPolicies) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Resource("podsecuritypolicies"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched podSecurityPolicy. -func (c *podSecurityPolicies) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.PodSecurityPolicy, err error) { +func (c *podSecurityPolicies) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.PodSecurityPolicy, err error) { result = &v1beta1.PodSecurityPolicy{} err = c.client.Patch(pt). Resource("podsecuritypolicies"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1/clusterrole.go b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1/clusterrole.go index 0a47c44115..787324d654 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1/clusterrole.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1/clusterrole.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" "time" v1 "k8s.io/api/rbac/v1" @@ -37,14 +38,14 @@ type ClusterRolesGetter interface { // ClusterRoleInterface has methods to work with ClusterRole resources. type ClusterRoleInterface interface { - Create(*v1.ClusterRole) (*v1.ClusterRole, error) - Update(*v1.ClusterRole) (*v1.ClusterRole, error) - Delete(name string, options *metav1.DeleteOptions) error - DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error - Get(name string, options metav1.GetOptions) (*v1.ClusterRole, error) - List(opts metav1.ListOptions) (*v1.ClusterRoleList, error) - Watch(opts metav1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ClusterRole, err error) + Create(ctx context.Context, clusterRole *v1.ClusterRole, opts metav1.CreateOptions) (*v1.ClusterRole, error) + Update(ctx context.Context, clusterRole *v1.ClusterRole, opts metav1.UpdateOptions) (*v1.ClusterRole, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.ClusterRole, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.ClusterRoleList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ClusterRole, err error) ClusterRoleExpansion } @@ -61,19 +62,19 @@ func newClusterRoles(c *RbacV1Client) *clusterRoles { } // Get takes name of the clusterRole, and returns the corresponding clusterRole object, and an error if there is any. -func (c *clusterRoles) Get(name string, options metav1.GetOptions) (result *v1.ClusterRole, err error) { +func (c *clusterRoles) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ClusterRole, err error) { result = &v1.ClusterRole{} err = c.client.Get(). Resource("clusterroles"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of ClusterRoles that match those selectors. -func (c *clusterRoles) List(opts metav1.ListOptions) (result *v1.ClusterRoleList, err error) { +func (c *clusterRoles) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ClusterRoleList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -83,13 +84,13 @@ func (c *clusterRoles) List(opts metav1.ListOptions) (result *v1.ClusterRoleList Resource("clusterroles"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested clusterRoles. -func (c *clusterRoles) Watch(opts metav1.ListOptions) (watch.Interface, error) { +func (c *clusterRoles) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -99,66 +100,69 @@ func (c *clusterRoles) Watch(opts metav1.ListOptions) (watch.Interface, error) { Resource("clusterroles"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a clusterRole and creates it. Returns the server's representation of the clusterRole, and an error, if there is any. -func (c *clusterRoles) Create(clusterRole *v1.ClusterRole) (result *v1.ClusterRole, err error) { +func (c *clusterRoles) Create(ctx context.Context, clusterRole *v1.ClusterRole, opts metav1.CreateOptions) (result *v1.ClusterRole, err error) { result = &v1.ClusterRole{} err = c.client.Post(). Resource("clusterroles"). + VersionedParams(&opts, scheme.ParameterCodec). Body(clusterRole). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a clusterRole and updates it. Returns the server's representation of the clusterRole, and an error, if there is any. -func (c *clusterRoles) Update(clusterRole *v1.ClusterRole) (result *v1.ClusterRole, err error) { +func (c *clusterRoles) Update(ctx context.Context, clusterRole *v1.ClusterRole, opts metav1.UpdateOptions) (result *v1.ClusterRole, err error) { result = &v1.ClusterRole{} err = c.client.Put(). Resource("clusterroles"). Name(clusterRole.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(clusterRole). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the clusterRole and deletes it. Returns an error if one occurs. -func (c *clusterRoles) Delete(name string, options *metav1.DeleteOptions) error { +func (c *clusterRoles) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { return c.client.Delete(). Resource("clusterroles"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *clusterRoles) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error { +func (c *clusterRoles) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Resource("clusterroles"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched clusterRole. -func (c *clusterRoles) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ClusterRole, err error) { +func (c *clusterRoles) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ClusterRole, err error) { result = &v1.ClusterRole{} err = c.client.Patch(pt). Resource("clusterroles"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1/clusterrolebinding.go b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1/clusterrolebinding.go index c16ebc3122..83e8c81bb2 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1/clusterrolebinding.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1/clusterrolebinding.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" "time" v1 "k8s.io/api/rbac/v1" @@ -37,14 +38,14 @@ type ClusterRoleBindingsGetter interface { // ClusterRoleBindingInterface has methods to work with ClusterRoleBinding resources. type ClusterRoleBindingInterface interface { - Create(*v1.ClusterRoleBinding) (*v1.ClusterRoleBinding, error) - Update(*v1.ClusterRoleBinding) (*v1.ClusterRoleBinding, error) - Delete(name string, options *metav1.DeleteOptions) error - DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error - Get(name string, options metav1.GetOptions) (*v1.ClusterRoleBinding, error) - List(opts metav1.ListOptions) (*v1.ClusterRoleBindingList, error) - Watch(opts metav1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ClusterRoleBinding, err error) + Create(ctx context.Context, clusterRoleBinding *v1.ClusterRoleBinding, opts metav1.CreateOptions) (*v1.ClusterRoleBinding, error) + Update(ctx context.Context, clusterRoleBinding *v1.ClusterRoleBinding, opts metav1.UpdateOptions) (*v1.ClusterRoleBinding, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.ClusterRoleBinding, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.ClusterRoleBindingList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ClusterRoleBinding, err error) ClusterRoleBindingExpansion } @@ -61,19 +62,19 @@ func newClusterRoleBindings(c *RbacV1Client) *clusterRoleBindings { } // Get takes name of the clusterRoleBinding, and returns the corresponding clusterRoleBinding object, and an error if there is any. -func (c *clusterRoleBindings) Get(name string, options metav1.GetOptions) (result *v1.ClusterRoleBinding, err error) { +func (c *clusterRoleBindings) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ClusterRoleBinding, err error) { result = &v1.ClusterRoleBinding{} err = c.client.Get(). Resource("clusterrolebindings"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of ClusterRoleBindings that match those selectors. -func (c *clusterRoleBindings) List(opts metav1.ListOptions) (result *v1.ClusterRoleBindingList, err error) { +func (c *clusterRoleBindings) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ClusterRoleBindingList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -83,13 +84,13 @@ func (c *clusterRoleBindings) List(opts metav1.ListOptions) (result *v1.ClusterR Resource("clusterrolebindings"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested clusterRoleBindings. -func (c *clusterRoleBindings) Watch(opts metav1.ListOptions) (watch.Interface, error) { +func (c *clusterRoleBindings) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -99,66 +100,69 @@ func (c *clusterRoleBindings) Watch(opts metav1.ListOptions) (watch.Interface, e Resource("clusterrolebindings"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a clusterRoleBinding and creates it. Returns the server's representation of the clusterRoleBinding, and an error, if there is any. -func (c *clusterRoleBindings) Create(clusterRoleBinding *v1.ClusterRoleBinding) (result *v1.ClusterRoleBinding, err error) { +func (c *clusterRoleBindings) Create(ctx context.Context, clusterRoleBinding *v1.ClusterRoleBinding, opts metav1.CreateOptions) (result *v1.ClusterRoleBinding, err error) { result = &v1.ClusterRoleBinding{} err = c.client.Post(). Resource("clusterrolebindings"). + VersionedParams(&opts, scheme.ParameterCodec). Body(clusterRoleBinding). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a clusterRoleBinding and updates it. Returns the server's representation of the clusterRoleBinding, and an error, if there is any. -func (c *clusterRoleBindings) Update(clusterRoleBinding *v1.ClusterRoleBinding) (result *v1.ClusterRoleBinding, err error) { +func (c *clusterRoleBindings) Update(ctx context.Context, clusterRoleBinding *v1.ClusterRoleBinding, opts metav1.UpdateOptions) (result *v1.ClusterRoleBinding, err error) { result = &v1.ClusterRoleBinding{} err = c.client.Put(). Resource("clusterrolebindings"). Name(clusterRoleBinding.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(clusterRoleBinding). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the clusterRoleBinding and deletes it. Returns an error if one occurs. -func (c *clusterRoleBindings) Delete(name string, options *metav1.DeleteOptions) error { +func (c *clusterRoleBindings) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { return c.client.Delete(). Resource("clusterrolebindings"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *clusterRoleBindings) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error { +func (c *clusterRoleBindings) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Resource("clusterrolebindings"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched clusterRoleBinding. -func (c *clusterRoleBindings) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ClusterRoleBinding, err error) { +func (c *clusterRoleBindings) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ClusterRoleBinding, err error) { result = &v1.ClusterRoleBinding{} err = c.client.Patch(pt). Resource("clusterrolebindings"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1/fake/fake_clusterrole.go b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1/fake/fake_clusterrole.go index d57f339390..e7696ba27d 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1/fake/fake_clusterrole.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1/fake/fake_clusterrole.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + rbacv1 "k8s.io/api/rbac/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" @@ -38,7 +40,7 @@ var clusterrolesResource = schema.GroupVersionResource{Group: "rbac.authorizatio var clusterrolesKind = schema.GroupVersionKind{Group: "rbac.authorization.k8s.io", Version: "v1", Kind: "ClusterRole"} // Get takes name of the clusterRole, and returns the corresponding clusterRole object, and an error if there is any. -func (c *FakeClusterRoles) Get(name string, options v1.GetOptions) (result *rbacv1.ClusterRole, err error) { +func (c *FakeClusterRoles) Get(ctx context.Context, name string, options v1.GetOptions) (result *rbacv1.ClusterRole, err error) { obj, err := c.Fake. Invokes(testing.NewRootGetAction(clusterrolesResource, name), &rbacv1.ClusterRole{}) if obj == nil { @@ -48,7 +50,7 @@ func (c *FakeClusterRoles) Get(name string, options v1.GetOptions) (result *rbac } // List takes label and field selectors, and returns the list of ClusterRoles that match those selectors. -func (c *FakeClusterRoles) List(opts v1.ListOptions) (result *rbacv1.ClusterRoleList, err error) { +func (c *FakeClusterRoles) List(ctx context.Context, opts v1.ListOptions) (result *rbacv1.ClusterRoleList, err error) { obj, err := c.Fake. Invokes(testing.NewRootListAction(clusterrolesResource, clusterrolesKind, opts), &rbacv1.ClusterRoleList{}) if obj == nil { @@ -69,13 +71,13 @@ func (c *FakeClusterRoles) List(opts v1.ListOptions) (result *rbacv1.ClusterRole } // Watch returns a watch.Interface that watches the requested clusterRoles. -func (c *FakeClusterRoles) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeClusterRoles) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewRootWatchAction(clusterrolesResource, opts)) } // Create takes the representation of a clusterRole and creates it. Returns the server's representation of the clusterRole, and an error, if there is any. -func (c *FakeClusterRoles) Create(clusterRole *rbacv1.ClusterRole) (result *rbacv1.ClusterRole, err error) { +func (c *FakeClusterRoles) Create(ctx context.Context, clusterRole *rbacv1.ClusterRole, opts v1.CreateOptions) (result *rbacv1.ClusterRole, err error) { obj, err := c.Fake. Invokes(testing.NewRootCreateAction(clusterrolesResource, clusterRole), &rbacv1.ClusterRole{}) if obj == nil { @@ -85,7 +87,7 @@ func (c *FakeClusterRoles) Create(clusterRole *rbacv1.ClusterRole) (result *rbac } // Update takes the representation of a clusterRole and updates it. Returns the server's representation of the clusterRole, and an error, if there is any. -func (c *FakeClusterRoles) Update(clusterRole *rbacv1.ClusterRole) (result *rbacv1.ClusterRole, err error) { +func (c *FakeClusterRoles) Update(ctx context.Context, clusterRole *rbacv1.ClusterRole, opts v1.UpdateOptions) (result *rbacv1.ClusterRole, err error) { obj, err := c.Fake. Invokes(testing.NewRootUpdateAction(clusterrolesResource, clusterRole), &rbacv1.ClusterRole{}) if obj == nil { @@ -95,22 +97,22 @@ func (c *FakeClusterRoles) Update(clusterRole *rbacv1.ClusterRole) (result *rbac } // Delete takes name of the clusterRole and deletes it. Returns an error if one occurs. -func (c *FakeClusterRoles) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeClusterRoles) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewRootDeleteAction(clusterrolesResource, name), &rbacv1.ClusterRole{}) return err } // DeleteCollection deletes a collection of objects. -func (c *FakeClusterRoles) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewRootDeleteCollectionAction(clusterrolesResource, listOptions) +func (c *FakeClusterRoles) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(clusterrolesResource, listOpts) _, err := c.Fake.Invokes(action, &rbacv1.ClusterRoleList{}) return err } // Patch applies the patch and returns the patched clusterRole. -func (c *FakeClusterRoles) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *rbacv1.ClusterRole, err error) { +func (c *FakeClusterRoles) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *rbacv1.ClusterRole, err error) { obj, err := c.Fake. Invokes(testing.NewRootPatchSubresourceAction(clusterrolesResource, name, pt, data, subresources...), &rbacv1.ClusterRole{}) if obj == nil { diff --git a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1/fake/fake_clusterrolebinding.go b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1/fake/fake_clusterrolebinding.go index 878473ef35..e9d19f1e09 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1/fake/fake_clusterrolebinding.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1/fake/fake_clusterrolebinding.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + rbacv1 "k8s.io/api/rbac/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" @@ -38,7 +40,7 @@ var clusterrolebindingsResource = schema.GroupVersionResource{Group: "rbac.autho var clusterrolebindingsKind = schema.GroupVersionKind{Group: "rbac.authorization.k8s.io", Version: "v1", Kind: "ClusterRoleBinding"} // Get takes name of the clusterRoleBinding, and returns the corresponding clusterRoleBinding object, and an error if there is any. -func (c *FakeClusterRoleBindings) Get(name string, options v1.GetOptions) (result *rbacv1.ClusterRoleBinding, err error) { +func (c *FakeClusterRoleBindings) Get(ctx context.Context, name string, options v1.GetOptions) (result *rbacv1.ClusterRoleBinding, err error) { obj, err := c.Fake. Invokes(testing.NewRootGetAction(clusterrolebindingsResource, name), &rbacv1.ClusterRoleBinding{}) if obj == nil { @@ -48,7 +50,7 @@ func (c *FakeClusterRoleBindings) Get(name string, options v1.GetOptions) (resul } // List takes label and field selectors, and returns the list of ClusterRoleBindings that match those selectors. -func (c *FakeClusterRoleBindings) List(opts v1.ListOptions) (result *rbacv1.ClusterRoleBindingList, err error) { +func (c *FakeClusterRoleBindings) List(ctx context.Context, opts v1.ListOptions) (result *rbacv1.ClusterRoleBindingList, err error) { obj, err := c.Fake. Invokes(testing.NewRootListAction(clusterrolebindingsResource, clusterrolebindingsKind, opts), &rbacv1.ClusterRoleBindingList{}) if obj == nil { @@ -69,13 +71,13 @@ func (c *FakeClusterRoleBindings) List(opts v1.ListOptions) (result *rbacv1.Clus } // Watch returns a watch.Interface that watches the requested clusterRoleBindings. -func (c *FakeClusterRoleBindings) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeClusterRoleBindings) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewRootWatchAction(clusterrolebindingsResource, opts)) } // Create takes the representation of a clusterRoleBinding and creates it. Returns the server's representation of the clusterRoleBinding, and an error, if there is any. -func (c *FakeClusterRoleBindings) Create(clusterRoleBinding *rbacv1.ClusterRoleBinding) (result *rbacv1.ClusterRoleBinding, err error) { +func (c *FakeClusterRoleBindings) Create(ctx context.Context, clusterRoleBinding *rbacv1.ClusterRoleBinding, opts v1.CreateOptions) (result *rbacv1.ClusterRoleBinding, err error) { obj, err := c.Fake. Invokes(testing.NewRootCreateAction(clusterrolebindingsResource, clusterRoleBinding), &rbacv1.ClusterRoleBinding{}) if obj == nil { @@ -85,7 +87,7 @@ func (c *FakeClusterRoleBindings) Create(clusterRoleBinding *rbacv1.ClusterRoleB } // Update takes the representation of a clusterRoleBinding and updates it. Returns the server's representation of the clusterRoleBinding, and an error, if there is any. -func (c *FakeClusterRoleBindings) Update(clusterRoleBinding *rbacv1.ClusterRoleBinding) (result *rbacv1.ClusterRoleBinding, err error) { +func (c *FakeClusterRoleBindings) Update(ctx context.Context, clusterRoleBinding *rbacv1.ClusterRoleBinding, opts v1.UpdateOptions) (result *rbacv1.ClusterRoleBinding, err error) { obj, err := c.Fake. Invokes(testing.NewRootUpdateAction(clusterrolebindingsResource, clusterRoleBinding), &rbacv1.ClusterRoleBinding{}) if obj == nil { @@ -95,22 +97,22 @@ func (c *FakeClusterRoleBindings) Update(clusterRoleBinding *rbacv1.ClusterRoleB } // Delete takes name of the clusterRoleBinding and deletes it. Returns an error if one occurs. -func (c *FakeClusterRoleBindings) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeClusterRoleBindings) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewRootDeleteAction(clusterrolebindingsResource, name), &rbacv1.ClusterRoleBinding{}) return err } // DeleteCollection deletes a collection of objects. -func (c *FakeClusterRoleBindings) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewRootDeleteCollectionAction(clusterrolebindingsResource, listOptions) +func (c *FakeClusterRoleBindings) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(clusterrolebindingsResource, listOpts) _, err := c.Fake.Invokes(action, &rbacv1.ClusterRoleBindingList{}) return err } // Patch applies the patch and returns the patched clusterRoleBinding. -func (c *FakeClusterRoleBindings) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *rbacv1.ClusterRoleBinding, err error) { +func (c *FakeClusterRoleBindings) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *rbacv1.ClusterRoleBinding, err error) { obj, err := c.Fake. Invokes(testing.NewRootPatchSubresourceAction(clusterrolebindingsResource, name, pt, data, subresources...), &rbacv1.ClusterRoleBinding{}) if obj == nil { diff --git a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1/fake/fake_role.go b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1/fake/fake_role.go index 78ef3192f3..1bc86d425d 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1/fake/fake_role.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1/fake/fake_role.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + rbacv1 "k8s.io/api/rbac/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" @@ -39,7 +41,7 @@ var rolesResource = schema.GroupVersionResource{Group: "rbac.authorization.k8s.i var rolesKind = schema.GroupVersionKind{Group: "rbac.authorization.k8s.io", Version: "v1", Kind: "Role"} // Get takes name of the role, and returns the corresponding role object, and an error if there is any. -func (c *FakeRoles) Get(name string, options v1.GetOptions) (result *rbacv1.Role, err error) { +func (c *FakeRoles) Get(ctx context.Context, name string, options v1.GetOptions) (result *rbacv1.Role, err error) { obj, err := c.Fake. Invokes(testing.NewGetAction(rolesResource, c.ns, name), &rbacv1.Role{}) @@ -50,7 +52,7 @@ func (c *FakeRoles) Get(name string, options v1.GetOptions) (result *rbacv1.Role } // List takes label and field selectors, and returns the list of Roles that match those selectors. -func (c *FakeRoles) List(opts v1.ListOptions) (result *rbacv1.RoleList, err error) { +func (c *FakeRoles) List(ctx context.Context, opts v1.ListOptions) (result *rbacv1.RoleList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(rolesResource, rolesKind, c.ns, opts), &rbacv1.RoleList{}) @@ -72,14 +74,14 @@ func (c *FakeRoles) List(opts v1.ListOptions) (result *rbacv1.RoleList, err erro } // Watch returns a watch.Interface that watches the requested roles. -func (c *FakeRoles) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeRoles) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(rolesResource, c.ns, opts)) } // Create takes the representation of a role and creates it. Returns the server's representation of the role, and an error, if there is any. -func (c *FakeRoles) Create(role *rbacv1.Role) (result *rbacv1.Role, err error) { +func (c *FakeRoles) Create(ctx context.Context, role *rbacv1.Role, opts v1.CreateOptions) (result *rbacv1.Role, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(rolesResource, c.ns, role), &rbacv1.Role{}) @@ -90,7 +92,7 @@ func (c *FakeRoles) Create(role *rbacv1.Role) (result *rbacv1.Role, err error) { } // Update takes the representation of a role and updates it. Returns the server's representation of the role, and an error, if there is any. -func (c *FakeRoles) Update(role *rbacv1.Role) (result *rbacv1.Role, err error) { +func (c *FakeRoles) Update(ctx context.Context, role *rbacv1.Role, opts v1.UpdateOptions) (result *rbacv1.Role, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(rolesResource, c.ns, role), &rbacv1.Role{}) @@ -101,7 +103,7 @@ func (c *FakeRoles) Update(role *rbacv1.Role) (result *rbacv1.Role, err error) { } // Delete takes name of the role and deletes it. Returns an error if one occurs. -func (c *FakeRoles) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeRoles) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewDeleteAction(rolesResource, c.ns, name), &rbacv1.Role{}) @@ -109,15 +111,15 @@ func (c *FakeRoles) Delete(name string, options *v1.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *FakeRoles) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(rolesResource, c.ns, listOptions) +func (c *FakeRoles) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(rolesResource, c.ns, listOpts) _, err := c.Fake.Invokes(action, &rbacv1.RoleList{}) return err } // Patch applies the patch and returns the patched role. -func (c *FakeRoles) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *rbacv1.Role, err error) { +func (c *FakeRoles) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *rbacv1.Role, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(rolesResource, c.ns, name, pt, data, subresources...), &rbacv1.Role{}) diff --git a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1/fake/fake_rolebinding.go b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1/fake/fake_rolebinding.go index 6c344cadff..4962aa7c8b 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1/fake/fake_rolebinding.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1/fake/fake_rolebinding.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + rbacv1 "k8s.io/api/rbac/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" @@ -39,7 +41,7 @@ var rolebindingsResource = schema.GroupVersionResource{Group: "rbac.authorizatio var rolebindingsKind = schema.GroupVersionKind{Group: "rbac.authorization.k8s.io", Version: "v1", Kind: "RoleBinding"} // Get takes name of the roleBinding, and returns the corresponding roleBinding object, and an error if there is any. -func (c *FakeRoleBindings) Get(name string, options v1.GetOptions) (result *rbacv1.RoleBinding, err error) { +func (c *FakeRoleBindings) Get(ctx context.Context, name string, options v1.GetOptions) (result *rbacv1.RoleBinding, err error) { obj, err := c.Fake. Invokes(testing.NewGetAction(rolebindingsResource, c.ns, name), &rbacv1.RoleBinding{}) @@ -50,7 +52,7 @@ func (c *FakeRoleBindings) Get(name string, options v1.GetOptions) (result *rbac } // List takes label and field selectors, and returns the list of RoleBindings that match those selectors. -func (c *FakeRoleBindings) List(opts v1.ListOptions) (result *rbacv1.RoleBindingList, err error) { +func (c *FakeRoleBindings) List(ctx context.Context, opts v1.ListOptions) (result *rbacv1.RoleBindingList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(rolebindingsResource, rolebindingsKind, c.ns, opts), &rbacv1.RoleBindingList{}) @@ -72,14 +74,14 @@ func (c *FakeRoleBindings) List(opts v1.ListOptions) (result *rbacv1.RoleBinding } // Watch returns a watch.Interface that watches the requested roleBindings. -func (c *FakeRoleBindings) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeRoleBindings) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(rolebindingsResource, c.ns, opts)) } // Create takes the representation of a roleBinding and creates it. Returns the server's representation of the roleBinding, and an error, if there is any. -func (c *FakeRoleBindings) Create(roleBinding *rbacv1.RoleBinding) (result *rbacv1.RoleBinding, err error) { +func (c *FakeRoleBindings) Create(ctx context.Context, roleBinding *rbacv1.RoleBinding, opts v1.CreateOptions) (result *rbacv1.RoleBinding, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(rolebindingsResource, c.ns, roleBinding), &rbacv1.RoleBinding{}) @@ -90,7 +92,7 @@ func (c *FakeRoleBindings) Create(roleBinding *rbacv1.RoleBinding) (result *rbac } // Update takes the representation of a roleBinding and updates it. Returns the server's representation of the roleBinding, and an error, if there is any. -func (c *FakeRoleBindings) Update(roleBinding *rbacv1.RoleBinding) (result *rbacv1.RoleBinding, err error) { +func (c *FakeRoleBindings) Update(ctx context.Context, roleBinding *rbacv1.RoleBinding, opts v1.UpdateOptions) (result *rbacv1.RoleBinding, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(rolebindingsResource, c.ns, roleBinding), &rbacv1.RoleBinding{}) @@ -101,7 +103,7 @@ func (c *FakeRoleBindings) Update(roleBinding *rbacv1.RoleBinding) (result *rbac } // Delete takes name of the roleBinding and deletes it. Returns an error if one occurs. -func (c *FakeRoleBindings) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeRoleBindings) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewDeleteAction(rolebindingsResource, c.ns, name), &rbacv1.RoleBinding{}) @@ -109,15 +111,15 @@ func (c *FakeRoleBindings) Delete(name string, options *v1.DeleteOptions) error } // DeleteCollection deletes a collection of objects. -func (c *FakeRoleBindings) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(rolebindingsResource, c.ns, listOptions) +func (c *FakeRoleBindings) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(rolebindingsResource, c.ns, listOpts) _, err := c.Fake.Invokes(action, &rbacv1.RoleBindingList{}) return err } // Patch applies the patch and returns the patched roleBinding. -func (c *FakeRoleBindings) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *rbacv1.RoleBinding, err error) { +func (c *FakeRoleBindings) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *rbacv1.RoleBinding, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(rolebindingsResource, c.ns, name, pt, data, subresources...), &rbacv1.RoleBinding{}) diff --git a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1/role.go b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1/role.go index a17d791fff..c31e22b63e 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1/role.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1/role.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" "time" v1 "k8s.io/api/rbac/v1" @@ -37,14 +38,14 @@ type RolesGetter interface { // RoleInterface has methods to work with Role resources. type RoleInterface interface { - Create(*v1.Role) (*v1.Role, error) - Update(*v1.Role) (*v1.Role, error) - Delete(name string, options *metav1.DeleteOptions) error - DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error - Get(name string, options metav1.GetOptions) (*v1.Role, error) - List(opts metav1.ListOptions) (*v1.RoleList, error) - Watch(opts metav1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Role, err error) + Create(ctx context.Context, role *v1.Role, opts metav1.CreateOptions) (*v1.Role, error) + Update(ctx context.Context, role *v1.Role, opts metav1.UpdateOptions) (*v1.Role, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Role, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.RoleList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Role, err error) RoleExpansion } @@ -63,20 +64,20 @@ func newRoles(c *RbacV1Client, namespace string) *roles { } // Get takes name of the role, and returns the corresponding role object, and an error if there is any. -func (c *roles) Get(name string, options metav1.GetOptions) (result *v1.Role, err error) { +func (c *roles) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Role, err error) { result = &v1.Role{} err = c.client.Get(). Namespace(c.ns). Resource("roles"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of Roles that match those selectors. -func (c *roles) List(opts metav1.ListOptions) (result *v1.RoleList, err error) { +func (c *roles) List(ctx context.Context, opts metav1.ListOptions) (result *v1.RoleList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -87,13 +88,13 @@ func (c *roles) List(opts metav1.ListOptions) (result *v1.RoleList, err error) { Resource("roles"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested roles. -func (c *roles) Watch(opts metav1.ListOptions) (watch.Interface, error) { +func (c *roles) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -104,71 +105,74 @@ func (c *roles) Watch(opts metav1.ListOptions) (watch.Interface, error) { Resource("roles"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a role and creates it. Returns the server's representation of the role, and an error, if there is any. -func (c *roles) Create(role *v1.Role) (result *v1.Role, err error) { +func (c *roles) Create(ctx context.Context, role *v1.Role, opts metav1.CreateOptions) (result *v1.Role, err error) { result = &v1.Role{} err = c.client.Post(). Namespace(c.ns). Resource("roles"). + VersionedParams(&opts, scheme.ParameterCodec). Body(role). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a role and updates it. Returns the server's representation of the role, and an error, if there is any. -func (c *roles) Update(role *v1.Role) (result *v1.Role, err error) { +func (c *roles) Update(ctx context.Context, role *v1.Role, opts metav1.UpdateOptions) (result *v1.Role, err error) { result = &v1.Role{} err = c.client.Put(). Namespace(c.ns). Resource("roles"). Name(role.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(role). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the role and deletes it. Returns an error if one occurs. -func (c *roles) Delete(name string, options *metav1.DeleteOptions) error { +func (c *roles) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("roles"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *roles) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error { +func (c *roles) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Namespace(c.ns). Resource("roles"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched role. -func (c *roles) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Role, err error) { +func (c *roles) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Role, err error) { result = &v1.Role{} err = c.client.Patch(pt). Namespace(c.ns). Resource("roles"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1/rolebinding.go b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1/rolebinding.go index c87e457188..160fc16e6b 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1/rolebinding.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1/rolebinding.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" "time" v1 "k8s.io/api/rbac/v1" @@ -37,14 +38,14 @@ type RoleBindingsGetter interface { // RoleBindingInterface has methods to work with RoleBinding resources. type RoleBindingInterface interface { - Create(*v1.RoleBinding) (*v1.RoleBinding, error) - Update(*v1.RoleBinding) (*v1.RoleBinding, error) - Delete(name string, options *metav1.DeleteOptions) error - DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error - Get(name string, options metav1.GetOptions) (*v1.RoleBinding, error) - List(opts metav1.ListOptions) (*v1.RoleBindingList, error) - Watch(opts metav1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.RoleBinding, err error) + Create(ctx context.Context, roleBinding *v1.RoleBinding, opts metav1.CreateOptions) (*v1.RoleBinding, error) + Update(ctx context.Context, roleBinding *v1.RoleBinding, opts metav1.UpdateOptions) (*v1.RoleBinding, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.RoleBinding, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.RoleBindingList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.RoleBinding, err error) RoleBindingExpansion } @@ -63,20 +64,20 @@ func newRoleBindings(c *RbacV1Client, namespace string) *roleBindings { } // Get takes name of the roleBinding, and returns the corresponding roleBinding object, and an error if there is any. -func (c *roleBindings) Get(name string, options metav1.GetOptions) (result *v1.RoleBinding, err error) { +func (c *roleBindings) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.RoleBinding, err error) { result = &v1.RoleBinding{} err = c.client.Get(). Namespace(c.ns). Resource("rolebindings"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of RoleBindings that match those selectors. -func (c *roleBindings) List(opts metav1.ListOptions) (result *v1.RoleBindingList, err error) { +func (c *roleBindings) List(ctx context.Context, opts metav1.ListOptions) (result *v1.RoleBindingList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -87,13 +88,13 @@ func (c *roleBindings) List(opts metav1.ListOptions) (result *v1.RoleBindingList Resource("rolebindings"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested roleBindings. -func (c *roleBindings) Watch(opts metav1.ListOptions) (watch.Interface, error) { +func (c *roleBindings) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -104,71 +105,74 @@ func (c *roleBindings) Watch(opts metav1.ListOptions) (watch.Interface, error) { Resource("rolebindings"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a roleBinding and creates it. Returns the server's representation of the roleBinding, and an error, if there is any. -func (c *roleBindings) Create(roleBinding *v1.RoleBinding) (result *v1.RoleBinding, err error) { +func (c *roleBindings) Create(ctx context.Context, roleBinding *v1.RoleBinding, opts metav1.CreateOptions) (result *v1.RoleBinding, err error) { result = &v1.RoleBinding{} err = c.client.Post(). Namespace(c.ns). Resource("rolebindings"). + VersionedParams(&opts, scheme.ParameterCodec). Body(roleBinding). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a roleBinding and updates it. Returns the server's representation of the roleBinding, and an error, if there is any. -func (c *roleBindings) Update(roleBinding *v1.RoleBinding) (result *v1.RoleBinding, err error) { +func (c *roleBindings) Update(ctx context.Context, roleBinding *v1.RoleBinding, opts metav1.UpdateOptions) (result *v1.RoleBinding, err error) { result = &v1.RoleBinding{} err = c.client.Put(). Namespace(c.ns). Resource("rolebindings"). Name(roleBinding.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(roleBinding). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the roleBinding and deletes it. Returns an error if one occurs. -func (c *roleBindings) Delete(name string, options *metav1.DeleteOptions) error { +func (c *roleBindings) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("rolebindings"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *roleBindings) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error { +func (c *roleBindings) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Namespace(c.ns). Resource("rolebindings"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched roleBinding. -func (c *roleBindings) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.RoleBinding, err error) { +func (c *roleBindings) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.RoleBinding, err error) { result = &v1.RoleBinding{} err = c.client.Patch(pt). Namespace(c.ns). Resource("rolebindings"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/clusterrole.go b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/clusterrole.go index 77e66877e7..678d3711f3 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/clusterrole.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/clusterrole.go @@ -19,6 +19,7 @@ limitations under the License. package v1alpha1 import ( + "context" "time" v1alpha1 "k8s.io/api/rbac/v1alpha1" @@ -37,14 +38,14 @@ type ClusterRolesGetter interface { // ClusterRoleInterface has methods to work with ClusterRole resources. type ClusterRoleInterface interface { - Create(*v1alpha1.ClusterRole) (*v1alpha1.ClusterRole, error) - Update(*v1alpha1.ClusterRole) (*v1alpha1.ClusterRole, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*v1alpha1.ClusterRole, error) - List(opts v1.ListOptions) (*v1alpha1.ClusterRoleList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.ClusterRole, err error) + Create(ctx context.Context, clusterRole *v1alpha1.ClusterRole, opts v1.CreateOptions) (*v1alpha1.ClusterRole, error) + Update(ctx context.Context, clusterRole *v1alpha1.ClusterRole, opts v1.UpdateOptions) (*v1alpha1.ClusterRole, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.ClusterRole, error) + List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.ClusterRoleList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ClusterRole, err error) ClusterRoleExpansion } @@ -61,19 +62,19 @@ func newClusterRoles(c *RbacV1alpha1Client) *clusterRoles { } // Get takes name of the clusterRole, and returns the corresponding clusterRole object, and an error if there is any. -func (c *clusterRoles) Get(name string, options v1.GetOptions) (result *v1alpha1.ClusterRole, err error) { +func (c *clusterRoles) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.ClusterRole, err error) { result = &v1alpha1.ClusterRole{} err = c.client.Get(). Resource("clusterroles"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of ClusterRoles that match those selectors. -func (c *clusterRoles) List(opts v1.ListOptions) (result *v1alpha1.ClusterRoleList, err error) { +func (c *clusterRoles) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ClusterRoleList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -83,13 +84,13 @@ func (c *clusterRoles) List(opts v1.ListOptions) (result *v1alpha1.ClusterRoleLi Resource("clusterroles"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested clusterRoles. -func (c *clusterRoles) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *clusterRoles) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -99,66 +100,69 @@ func (c *clusterRoles) Watch(opts v1.ListOptions) (watch.Interface, error) { Resource("clusterroles"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a clusterRole and creates it. Returns the server's representation of the clusterRole, and an error, if there is any. -func (c *clusterRoles) Create(clusterRole *v1alpha1.ClusterRole) (result *v1alpha1.ClusterRole, err error) { +func (c *clusterRoles) Create(ctx context.Context, clusterRole *v1alpha1.ClusterRole, opts v1.CreateOptions) (result *v1alpha1.ClusterRole, err error) { result = &v1alpha1.ClusterRole{} err = c.client.Post(). Resource("clusterroles"). + VersionedParams(&opts, scheme.ParameterCodec). Body(clusterRole). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a clusterRole and updates it. Returns the server's representation of the clusterRole, and an error, if there is any. -func (c *clusterRoles) Update(clusterRole *v1alpha1.ClusterRole) (result *v1alpha1.ClusterRole, err error) { +func (c *clusterRoles) Update(ctx context.Context, clusterRole *v1alpha1.ClusterRole, opts v1.UpdateOptions) (result *v1alpha1.ClusterRole, err error) { result = &v1alpha1.ClusterRole{} err = c.client.Put(). Resource("clusterroles"). Name(clusterRole.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(clusterRole). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the clusterRole and deletes it. Returns an error if one occurs. -func (c *clusterRoles) Delete(name string, options *v1.DeleteOptions) error { +func (c *clusterRoles) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). Resource("clusterroles"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *clusterRoles) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *clusterRoles) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Resource("clusterroles"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched clusterRole. -func (c *clusterRoles) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.ClusterRole, err error) { +func (c *clusterRoles) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ClusterRole, err error) { result = &v1alpha1.ClusterRole{} err = c.client.Patch(pt). Resource("clusterroles"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/clusterrolebinding.go b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/clusterrolebinding.go index 0d1b9d2051..7a9ca29533 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/clusterrolebinding.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/clusterrolebinding.go @@ -19,6 +19,7 @@ limitations under the License. package v1alpha1 import ( + "context" "time" v1alpha1 "k8s.io/api/rbac/v1alpha1" @@ -37,14 +38,14 @@ type ClusterRoleBindingsGetter interface { // ClusterRoleBindingInterface has methods to work with ClusterRoleBinding resources. type ClusterRoleBindingInterface interface { - Create(*v1alpha1.ClusterRoleBinding) (*v1alpha1.ClusterRoleBinding, error) - Update(*v1alpha1.ClusterRoleBinding) (*v1alpha1.ClusterRoleBinding, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*v1alpha1.ClusterRoleBinding, error) - List(opts v1.ListOptions) (*v1alpha1.ClusterRoleBindingList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.ClusterRoleBinding, err error) + Create(ctx context.Context, clusterRoleBinding *v1alpha1.ClusterRoleBinding, opts v1.CreateOptions) (*v1alpha1.ClusterRoleBinding, error) + Update(ctx context.Context, clusterRoleBinding *v1alpha1.ClusterRoleBinding, opts v1.UpdateOptions) (*v1alpha1.ClusterRoleBinding, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.ClusterRoleBinding, error) + List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.ClusterRoleBindingList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ClusterRoleBinding, err error) ClusterRoleBindingExpansion } @@ -61,19 +62,19 @@ func newClusterRoleBindings(c *RbacV1alpha1Client) *clusterRoleBindings { } // Get takes name of the clusterRoleBinding, and returns the corresponding clusterRoleBinding object, and an error if there is any. -func (c *clusterRoleBindings) Get(name string, options v1.GetOptions) (result *v1alpha1.ClusterRoleBinding, err error) { +func (c *clusterRoleBindings) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.ClusterRoleBinding, err error) { result = &v1alpha1.ClusterRoleBinding{} err = c.client.Get(). Resource("clusterrolebindings"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of ClusterRoleBindings that match those selectors. -func (c *clusterRoleBindings) List(opts v1.ListOptions) (result *v1alpha1.ClusterRoleBindingList, err error) { +func (c *clusterRoleBindings) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ClusterRoleBindingList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -83,13 +84,13 @@ func (c *clusterRoleBindings) List(opts v1.ListOptions) (result *v1alpha1.Cluste Resource("clusterrolebindings"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested clusterRoleBindings. -func (c *clusterRoleBindings) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *clusterRoleBindings) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -99,66 +100,69 @@ func (c *clusterRoleBindings) Watch(opts v1.ListOptions) (watch.Interface, error Resource("clusterrolebindings"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a clusterRoleBinding and creates it. Returns the server's representation of the clusterRoleBinding, and an error, if there is any. -func (c *clusterRoleBindings) Create(clusterRoleBinding *v1alpha1.ClusterRoleBinding) (result *v1alpha1.ClusterRoleBinding, err error) { +func (c *clusterRoleBindings) Create(ctx context.Context, clusterRoleBinding *v1alpha1.ClusterRoleBinding, opts v1.CreateOptions) (result *v1alpha1.ClusterRoleBinding, err error) { result = &v1alpha1.ClusterRoleBinding{} err = c.client.Post(). Resource("clusterrolebindings"). + VersionedParams(&opts, scheme.ParameterCodec). Body(clusterRoleBinding). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a clusterRoleBinding and updates it. Returns the server's representation of the clusterRoleBinding, and an error, if there is any. -func (c *clusterRoleBindings) Update(clusterRoleBinding *v1alpha1.ClusterRoleBinding) (result *v1alpha1.ClusterRoleBinding, err error) { +func (c *clusterRoleBindings) Update(ctx context.Context, clusterRoleBinding *v1alpha1.ClusterRoleBinding, opts v1.UpdateOptions) (result *v1alpha1.ClusterRoleBinding, err error) { result = &v1alpha1.ClusterRoleBinding{} err = c.client.Put(). Resource("clusterrolebindings"). Name(clusterRoleBinding.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(clusterRoleBinding). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the clusterRoleBinding and deletes it. Returns an error if one occurs. -func (c *clusterRoleBindings) Delete(name string, options *v1.DeleteOptions) error { +func (c *clusterRoleBindings) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). Resource("clusterrolebindings"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *clusterRoleBindings) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *clusterRoleBindings) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Resource("clusterrolebindings"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched clusterRoleBinding. -func (c *clusterRoleBindings) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.ClusterRoleBinding, err error) { +func (c *clusterRoleBindings) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ClusterRoleBinding, err error) { result = &v1alpha1.ClusterRoleBinding{} err = c.client.Patch(pt). Resource("clusterrolebindings"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake/fake_clusterrole.go b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake/fake_clusterrole.go index d2d1b1c74c..3bdccbfad6 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake/fake_clusterrole.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake/fake_clusterrole.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + v1alpha1 "k8s.io/api/rbac/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" @@ -38,7 +40,7 @@ var clusterrolesResource = schema.GroupVersionResource{Group: "rbac.authorizatio var clusterrolesKind = schema.GroupVersionKind{Group: "rbac.authorization.k8s.io", Version: "v1alpha1", Kind: "ClusterRole"} // Get takes name of the clusterRole, and returns the corresponding clusterRole object, and an error if there is any. -func (c *FakeClusterRoles) Get(name string, options v1.GetOptions) (result *v1alpha1.ClusterRole, err error) { +func (c *FakeClusterRoles) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.ClusterRole, err error) { obj, err := c.Fake. Invokes(testing.NewRootGetAction(clusterrolesResource, name), &v1alpha1.ClusterRole{}) if obj == nil { @@ -48,7 +50,7 @@ func (c *FakeClusterRoles) Get(name string, options v1.GetOptions) (result *v1al } // List takes label and field selectors, and returns the list of ClusterRoles that match those selectors. -func (c *FakeClusterRoles) List(opts v1.ListOptions) (result *v1alpha1.ClusterRoleList, err error) { +func (c *FakeClusterRoles) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ClusterRoleList, err error) { obj, err := c.Fake. Invokes(testing.NewRootListAction(clusterrolesResource, clusterrolesKind, opts), &v1alpha1.ClusterRoleList{}) if obj == nil { @@ -69,13 +71,13 @@ func (c *FakeClusterRoles) List(opts v1.ListOptions) (result *v1alpha1.ClusterRo } // Watch returns a watch.Interface that watches the requested clusterRoles. -func (c *FakeClusterRoles) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeClusterRoles) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewRootWatchAction(clusterrolesResource, opts)) } // Create takes the representation of a clusterRole and creates it. Returns the server's representation of the clusterRole, and an error, if there is any. -func (c *FakeClusterRoles) Create(clusterRole *v1alpha1.ClusterRole) (result *v1alpha1.ClusterRole, err error) { +func (c *FakeClusterRoles) Create(ctx context.Context, clusterRole *v1alpha1.ClusterRole, opts v1.CreateOptions) (result *v1alpha1.ClusterRole, err error) { obj, err := c.Fake. Invokes(testing.NewRootCreateAction(clusterrolesResource, clusterRole), &v1alpha1.ClusterRole{}) if obj == nil { @@ -85,7 +87,7 @@ func (c *FakeClusterRoles) Create(clusterRole *v1alpha1.ClusterRole) (result *v1 } // Update takes the representation of a clusterRole and updates it. Returns the server's representation of the clusterRole, and an error, if there is any. -func (c *FakeClusterRoles) Update(clusterRole *v1alpha1.ClusterRole) (result *v1alpha1.ClusterRole, err error) { +func (c *FakeClusterRoles) Update(ctx context.Context, clusterRole *v1alpha1.ClusterRole, opts v1.UpdateOptions) (result *v1alpha1.ClusterRole, err error) { obj, err := c.Fake. Invokes(testing.NewRootUpdateAction(clusterrolesResource, clusterRole), &v1alpha1.ClusterRole{}) if obj == nil { @@ -95,22 +97,22 @@ func (c *FakeClusterRoles) Update(clusterRole *v1alpha1.ClusterRole) (result *v1 } // Delete takes name of the clusterRole and deletes it. Returns an error if one occurs. -func (c *FakeClusterRoles) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeClusterRoles) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewRootDeleteAction(clusterrolesResource, name), &v1alpha1.ClusterRole{}) return err } // DeleteCollection deletes a collection of objects. -func (c *FakeClusterRoles) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewRootDeleteCollectionAction(clusterrolesResource, listOptions) +func (c *FakeClusterRoles) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(clusterrolesResource, listOpts) _, err := c.Fake.Invokes(action, &v1alpha1.ClusterRoleList{}) return err } // Patch applies the patch and returns the patched clusterRole. -func (c *FakeClusterRoles) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.ClusterRole, err error) { +func (c *FakeClusterRoles) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ClusterRole, err error) { obj, err := c.Fake. Invokes(testing.NewRootPatchSubresourceAction(clusterrolesResource, name, pt, data, subresources...), &v1alpha1.ClusterRole{}) if obj == nil { diff --git a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake/fake_clusterrolebinding.go b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake/fake_clusterrolebinding.go index 3e23e5f657..6557f73b0c 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake/fake_clusterrolebinding.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake/fake_clusterrolebinding.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + v1alpha1 "k8s.io/api/rbac/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" @@ -38,7 +40,7 @@ var clusterrolebindingsResource = schema.GroupVersionResource{Group: "rbac.autho var clusterrolebindingsKind = schema.GroupVersionKind{Group: "rbac.authorization.k8s.io", Version: "v1alpha1", Kind: "ClusterRoleBinding"} // Get takes name of the clusterRoleBinding, and returns the corresponding clusterRoleBinding object, and an error if there is any. -func (c *FakeClusterRoleBindings) Get(name string, options v1.GetOptions) (result *v1alpha1.ClusterRoleBinding, err error) { +func (c *FakeClusterRoleBindings) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.ClusterRoleBinding, err error) { obj, err := c.Fake. Invokes(testing.NewRootGetAction(clusterrolebindingsResource, name), &v1alpha1.ClusterRoleBinding{}) if obj == nil { @@ -48,7 +50,7 @@ func (c *FakeClusterRoleBindings) Get(name string, options v1.GetOptions) (resul } // List takes label and field selectors, and returns the list of ClusterRoleBindings that match those selectors. -func (c *FakeClusterRoleBindings) List(opts v1.ListOptions) (result *v1alpha1.ClusterRoleBindingList, err error) { +func (c *FakeClusterRoleBindings) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ClusterRoleBindingList, err error) { obj, err := c.Fake. Invokes(testing.NewRootListAction(clusterrolebindingsResource, clusterrolebindingsKind, opts), &v1alpha1.ClusterRoleBindingList{}) if obj == nil { @@ -69,13 +71,13 @@ func (c *FakeClusterRoleBindings) List(opts v1.ListOptions) (result *v1alpha1.Cl } // Watch returns a watch.Interface that watches the requested clusterRoleBindings. -func (c *FakeClusterRoleBindings) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeClusterRoleBindings) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewRootWatchAction(clusterrolebindingsResource, opts)) } // Create takes the representation of a clusterRoleBinding and creates it. Returns the server's representation of the clusterRoleBinding, and an error, if there is any. -func (c *FakeClusterRoleBindings) Create(clusterRoleBinding *v1alpha1.ClusterRoleBinding) (result *v1alpha1.ClusterRoleBinding, err error) { +func (c *FakeClusterRoleBindings) Create(ctx context.Context, clusterRoleBinding *v1alpha1.ClusterRoleBinding, opts v1.CreateOptions) (result *v1alpha1.ClusterRoleBinding, err error) { obj, err := c.Fake. Invokes(testing.NewRootCreateAction(clusterrolebindingsResource, clusterRoleBinding), &v1alpha1.ClusterRoleBinding{}) if obj == nil { @@ -85,7 +87,7 @@ func (c *FakeClusterRoleBindings) Create(clusterRoleBinding *v1alpha1.ClusterRol } // Update takes the representation of a clusterRoleBinding and updates it. Returns the server's representation of the clusterRoleBinding, and an error, if there is any. -func (c *FakeClusterRoleBindings) Update(clusterRoleBinding *v1alpha1.ClusterRoleBinding) (result *v1alpha1.ClusterRoleBinding, err error) { +func (c *FakeClusterRoleBindings) Update(ctx context.Context, clusterRoleBinding *v1alpha1.ClusterRoleBinding, opts v1.UpdateOptions) (result *v1alpha1.ClusterRoleBinding, err error) { obj, err := c.Fake. Invokes(testing.NewRootUpdateAction(clusterrolebindingsResource, clusterRoleBinding), &v1alpha1.ClusterRoleBinding{}) if obj == nil { @@ -95,22 +97,22 @@ func (c *FakeClusterRoleBindings) Update(clusterRoleBinding *v1alpha1.ClusterRol } // Delete takes name of the clusterRoleBinding and deletes it. Returns an error if one occurs. -func (c *FakeClusterRoleBindings) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeClusterRoleBindings) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewRootDeleteAction(clusterrolebindingsResource, name), &v1alpha1.ClusterRoleBinding{}) return err } // DeleteCollection deletes a collection of objects. -func (c *FakeClusterRoleBindings) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewRootDeleteCollectionAction(clusterrolebindingsResource, listOptions) +func (c *FakeClusterRoleBindings) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(clusterrolebindingsResource, listOpts) _, err := c.Fake.Invokes(action, &v1alpha1.ClusterRoleBindingList{}) return err } // Patch applies the patch and returns the patched clusterRoleBinding. -func (c *FakeClusterRoleBindings) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.ClusterRoleBinding, err error) { +func (c *FakeClusterRoleBindings) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ClusterRoleBinding, err error) { obj, err := c.Fake. Invokes(testing.NewRootPatchSubresourceAction(clusterrolebindingsResource, name, pt, data, subresources...), &v1alpha1.ClusterRoleBinding{}) if obj == nil { diff --git a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake/fake_role.go b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake/fake_role.go index 7bd52373fa..8a7f2fea25 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake/fake_role.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake/fake_role.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + v1alpha1 "k8s.io/api/rbac/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" @@ -39,7 +41,7 @@ var rolesResource = schema.GroupVersionResource{Group: "rbac.authorization.k8s.i var rolesKind = schema.GroupVersionKind{Group: "rbac.authorization.k8s.io", Version: "v1alpha1", Kind: "Role"} // Get takes name of the role, and returns the corresponding role object, and an error if there is any. -func (c *FakeRoles) Get(name string, options v1.GetOptions) (result *v1alpha1.Role, err error) { +func (c *FakeRoles) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.Role, err error) { obj, err := c.Fake. Invokes(testing.NewGetAction(rolesResource, c.ns, name), &v1alpha1.Role{}) @@ -50,7 +52,7 @@ func (c *FakeRoles) Get(name string, options v1.GetOptions) (result *v1alpha1.Ro } // List takes label and field selectors, and returns the list of Roles that match those selectors. -func (c *FakeRoles) List(opts v1.ListOptions) (result *v1alpha1.RoleList, err error) { +func (c *FakeRoles) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.RoleList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(rolesResource, rolesKind, c.ns, opts), &v1alpha1.RoleList{}) @@ -72,14 +74,14 @@ func (c *FakeRoles) List(opts v1.ListOptions) (result *v1alpha1.RoleList, err er } // Watch returns a watch.Interface that watches the requested roles. -func (c *FakeRoles) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeRoles) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(rolesResource, c.ns, opts)) } // Create takes the representation of a role and creates it. Returns the server's representation of the role, and an error, if there is any. -func (c *FakeRoles) Create(role *v1alpha1.Role) (result *v1alpha1.Role, err error) { +func (c *FakeRoles) Create(ctx context.Context, role *v1alpha1.Role, opts v1.CreateOptions) (result *v1alpha1.Role, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(rolesResource, c.ns, role), &v1alpha1.Role{}) @@ -90,7 +92,7 @@ func (c *FakeRoles) Create(role *v1alpha1.Role) (result *v1alpha1.Role, err erro } // Update takes the representation of a role and updates it. Returns the server's representation of the role, and an error, if there is any. -func (c *FakeRoles) Update(role *v1alpha1.Role) (result *v1alpha1.Role, err error) { +func (c *FakeRoles) Update(ctx context.Context, role *v1alpha1.Role, opts v1.UpdateOptions) (result *v1alpha1.Role, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(rolesResource, c.ns, role), &v1alpha1.Role{}) @@ -101,7 +103,7 @@ func (c *FakeRoles) Update(role *v1alpha1.Role) (result *v1alpha1.Role, err erro } // Delete takes name of the role and deletes it. Returns an error if one occurs. -func (c *FakeRoles) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeRoles) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewDeleteAction(rolesResource, c.ns, name), &v1alpha1.Role{}) @@ -109,15 +111,15 @@ func (c *FakeRoles) Delete(name string, options *v1.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *FakeRoles) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(rolesResource, c.ns, listOptions) +func (c *FakeRoles) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(rolesResource, c.ns, listOpts) _, err := c.Fake.Invokes(action, &v1alpha1.RoleList{}) return err } // Patch applies the patch and returns the patched role. -func (c *FakeRoles) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.Role, err error) { +func (c *FakeRoles) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.Role, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(rolesResource, c.ns, name, pt, data, subresources...), &v1alpha1.Role{}) diff --git a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake/fake_rolebinding.go b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake/fake_rolebinding.go index 0150503115..744ce03155 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake/fake_rolebinding.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake/fake_rolebinding.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + v1alpha1 "k8s.io/api/rbac/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" @@ -39,7 +41,7 @@ var rolebindingsResource = schema.GroupVersionResource{Group: "rbac.authorizatio var rolebindingsKind = schema.GroupVersionKind{Group: "rbac.authorization.k8s.io", Version: "v1alpha1", Kind: "RoleBinding"} // Get takes name of the roleBinding, and returns the corresponding roleBinding object, and an error if there is any. -func (c *FakeRoleBindings) Get(name string, options v1.GetOptions) (result *v1alpha1.RoleBinding, err error) { +func (c *FakeRoleBindings) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.RoleBinding, err error) { obj, err := c.Fake. Invokes(testing.NewGetAction(rolebindingsResource, c.ns, name), &v1alpha1.RoleBinding{}) @@ -50,7 +52,7 @@ func (c *FakeRoleBindings) Get(name string, options v1.GetOptions) (result *v1al } // List takes label and field selectors, and returns the list of RoleBindings that match those selectors. -func (c *FakeRoleBindings) List(opts v1.ListOptions) (result *v1alpha1.RoleBindingList, err error) { +func (c *FakeRoleBindings) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.RoleBindingList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(rolebindingsResource, rolebindingsKind, c.ns, opts), &v1alpha1.RoleBindingList{}) @@ -72,14 +74,14 @@ func (c *FakeRoleBindings) List(opts v1.ListOptions) (result *v1alpha1.RoleBindi } // Watch returns a watch.Interface that watches the requested roleBindings. -func (c *FakeRoleBindings) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeRoleBindings) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(rolebindingsResource, c.ns, opts)) } // Create takes the representation of a roleBinding and creates it. Returns the server's representation of the roleBinding, and an error, if there is any. -func (c *FakeRoleBindings) Create(roleBinding *v1alpha1.RoleBinding) (result *v1alpha1.RoleBinding, err error) { +func (c *FakeRoleBindings) Create(ctx context.Context, roleBinding *v1alpha1.RoleBinding, opts v1.CreateOptions) (result *v1alpha1.RoleBinding, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(rolebindingsResource, c.ns, roleBinding), &v1alpha1.RoleBinding{}) @@ -90,7 +92,7 @@ func (c *FakeRoleBindings) Create(roleBinding *v1alpha1.RoleBinding) (result *v1 } // Update takes the representation of a roleBinding and updates it. Returns the server's representation of the roleBinding, and an error, if there is any. -func (c *FakeRoleBindings) Update(roleBinding *v1alpha1.RoleBinding) (result *v1alpha1.RoleBinding, err error) { +func (c *FakeRoleBindings) Update(ctx context.Context, roleBinding *v1alpha1.RoleBinding, opts v1.UpdateOptions) (result *v1alpha1.RoleBinding, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(rolebindingsResource, c.ns, roleBinding), &v1alpha1.RoleBinding{}) @@ -101,7 +103,7 @@ func (c *FakeRoleBindings) Update(roleBinding *v1alpha1.RoleBinding) (result *v1 } // Delete takes name of the roleBinding and deletes it. Returns an error if one occurs. -func (c *FakeRoleBindings) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeRoleBindings) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewDeleteAction(rolebindingsResource, c.ns, name), &v1alpha1.RoleBinding{}) @@ -109,15 +111,15 @@ func (c *FakeRoleBindings) Delete(name string, options *v1.DeleteOptions) error } // DeleteCollection deletes a collection of objects. -func (c *FakeRoleBindings) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(rolebindingsResource, c.ns, listOptions) +func (c *FakeRoleBindings) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(rolebindingsResource, c.ns, listOpts) _, err := c.Fake.Invokes(action, &v1alpha1.RoleBindingList{}) return err } // Patch applies the patch and returns the patched roleBinding. -func (c *FakeRoleBindings) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.RoleBinding, err error) { +func (c *FakeRoleBindings) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.RoleBinding, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(rolebindingsResource, c.ns, name, pt, data, subresources...), &v1alpha1.RoleBinding{}) diff --git a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/role.go b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/role.go index 4a4b67240b..56ec6e373d 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/role.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/role.go @@ -19,6 +19,7 @@ limitations under the License. package v1alpha1 import ( + "context" "time" v1alpha1 "k8s.io/api/rbac/v1alpha1" @@ -37,14 +38,14 @@ type RolesGetter interface { // RoleInterface has methods to work with Role resources. type RoleInterface interface { - Create(*v1alpha1.Role) (*v1alpha1.Role, error) - Update(*v1alpha1.Role) (*v1alpha1.Role, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*v1alpha1.Role, error) - List(opts v1.ListOptions) (*v1alpha1.RoleList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.Role, err error) + Create(ctx context.Context, role *v1alpha1.Role, opts v1.CreateOptions) (*v1alpha1.Role, error) + Update(ctx context.Context, role *v1alpha1.Role, opts v1.UpdateOptions) (*v1alpha1.Role, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.Role, error) + List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.RoleList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.Role, err error) RoleExpansion } @@ -63,20 +64,20 @@ func newRoles(c *RbacV1alpha1Client, namespace string) *roles { } // Get takes name of the role, and returns the corresponding role object, and an error if there is any. -func (c *roles) Get(name string, options v1.GetOptions) (result *v1alpha1.Role, err error) { +func (c *roles) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.Role, err error) { result = &v1alpha1.Role{} err = c.client.Get(). Namespace(c.ns). Resource("roles"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of Roles that match those selectors. -func (c *roles) List(opts v1.ListOptions) (result *v1alpha1.RoleList, err error) { +func (c *roles) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.RoleList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -87,13 +88,13 @@ func (c *roles) List(opts v1.ListOptions) (result *v1alpha1.RoleList, err error) Resource("roles"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested roles. -func (c *roles) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *roles) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -104,71 +105,74 @@ func (c *roles) Watch(opts v1.ListOptions) (watch.Interface, error) { Resource("roles"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a role and creates it. Returns the server's representation of the role, and an error, if there is any. -func (c *roles) Create(role *v1alpha1.Role) (result *v1alpha1.Role, err error) { +func (c *roles) Create(ctx context.Context, role *v1alpha1.Role, opts v1.CreateOptions) (result *v1alpha1.Role, err error) { result = &v1alpha1.Role{} err = c.client.Post(). Namespace(c.ns). Resource("roles"). + VersionedParams(&opts, scheme.ParameterCodec). Body(role). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a role and updates it. Returns the server's representation of the role, and an error, if there is any. -func (c *roles) Update(role *v1alpha1.Role) (result *v1alpha1.Role, err error) { +func (c *roles) Update(ctx context.Context, role *v1alpha1.Role, opts v1.UpdateOptions) (result *v1alpha1.Role, err error) { result = &v1alpha1.Role{} err = c.client.Put(). Namespace(c.ns). Resource("roles"). Name(role.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(role). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the role and deletes it. Returns an error if one occurs. -func (c *roles) Delete(name string, options *v1.DeleteOptions) error { +func (c *roles) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("roles"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *roles) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *roles) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Namespace(c.ns). Resource("roles"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched role. -func (c *roles) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.Role, err error) { +func (c *roles) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.Role, err error) { result = &v1alpha1.Role{} err = c.client.Patch(pt). Namespace(c.ns). Resource("roles"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/rolebinding.go b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/rolebinding.go index bf4e5a10ef..b4b1df5dc3 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/rolebinding.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/rolebinding.go @@ -19,6 +19,7 @@ limitations under the License. package v1alpha1 import ( + "context" "time" v1alpha1 "k8s.io/api/rbac/v1alpha1" @@ -37,14 +38,14 @@ type RoleBindingsGetter interface { // RoleBindingInterface has methods to work with RoleBinding resources. type RoleBindingInterface interface { - Create(*v1alpha1.RoleBinding) (*v1alpha1.RoleBinding, error) - Update(*v1alpha1.RoleBinding) (*v1alpha1.RoleBinding, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*v1alpha1.RoleBinding, error) - List(opts v1.ListOptions) (*v1alpha1.RoleBindingList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.RoleBinding, err error) + Create(ctx context.Context, roleBinding *v1alpha1.RoleBinding, opts v1.CreateOptions) (*v1alpha1.RoleBinding, error) + Update(ctx context.Context, roleBinding *v1alpha1.RoleBinding, opts v1.UpdateOptions) (*v1alpha1.RoleBinding, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.RoleBinding, error) + List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.RoleBindingList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.RoleBinding, err error) RoleBindingExpansion } @@ -63,20 +64,20 @@ func newRoleBindings(c *RbacV1alpha1Client, namespace string) *roleBindings { } // Get takes name of the roleBinding, and returns the corresponding roleBinding object, and an error if there is any. -func (c *roleBindings) Get(name string, options v1.GetOptions) (result *v1alpha1.RoleBinding, err error) { +func (c *roleBindings) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.RoleBinding, err error) { result = &v1alpha1.RoleBinding{} err = c.client.Get(). Namespace(c.ns). Resource("rolebindings"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of RoleBindings that match those selectors. -func (c *roleBindings) List(opts v1.ListOptions) (result *v1alpha1.RoleBindingList, err error) { +func (c *roleBindings) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.RoleBindingList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -87,13 +88,13 @@ func (c *roleBindings) List(opts v1.ListOptions) (result *v1alpha1.RoleBindingLi Resource("rolebindings"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested roleBindings. -func (c *roleBindings) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *roleBindings) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -104,71 +105,74 @@ func (c *roleBindings) Watch(opts v1.ListOptions) (watch.Interface, error) { Resource("rolebindings"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a roleBinding and creates it. Returns the server's representation of the roleBinding, and an error, if there is any. -func (c *roleBindings) Create(roleBinding *v1alpha1.RoleBinding) (result *v1alpha1.RoleBinding, err error) { +func (c *roleBindings) Create(ctx context.Context, roleBinding *v1alpha1.RoleBinding, opts v1.CreateOptions) (result *v1alpha1.RoleBinding, err error) { result = &v1alpha1.RoleBinding{} err = c.client.Post(). Namespace(c.ns). Resource("rolebindings"). + VersionedParams(&opts, scheme.ParameterCodec). Body(roleBinding). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a roleBinding and updates it. Returns the server's representation of the roleBinding, and an error, if there is any. -func (c *roleBindings) Update(roleBinding *v1alpha1.RoleBinding) (result *v1alpha1.RoleBinding, err error) { +func (c *roleBindings) Update(ctx context.Context, roleBinding *v1alpha1.RoleBinding, opts v1.UpdateOptions) (result *v1alpha1.RoleBinding, err error) { result = &v1alpha1.RoleBinding{} err = c.client.Put(). Namespace(c.ns). Resource("rolebindings"). Name(roleBinding.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(roleBinding). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the roleBinding and deletes it. Returns an error if one occurs. -func (c *roleBindings) Delete(name string, options *v1.DeleteOptions) error { +func (c *roleBindings) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("rolebindings"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *roleBindings) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *roleBindings) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Namespace(c.ns). Resource("rolebindings"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched roleBinding. -func (c *roleBindings) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.RoleBinding, err error) { +func (c *roleBindings) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.RoleBinding, err error) { result = &v1alpha1.RoleBinding{} err = c.client.Patch(pt). Namespace(c.ns). Resource("rolebindings"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/clusterrole.go b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/clusterrole.go index 21d3cab373..4db46666ab 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/clusterrole.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/clusterrole.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" "time" v1beta1 "k8s.io/api/rbac/v1beta1" @@ -37,14 +38,14 @@ type ClusterRolesGetter interface { // ClusterRoleInterface has methods to work with ClusterRole resources. type ClusterRoleInterface interface { - Create(*v1beta1.ClusterRole) (*v1beta1.ClusterRole, error) - Update(*v1beta1.ClusterRole) (*v1beta1.ClusterRole, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*v1beta1.ClusterRole, error) - List(opts v1.ListOptions) (*v1beta1.ClusterRoleList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ClusterRole, err error) + Create(ctx context.Context, clusterRole *v1beta1.ClusterRole, opts v1.CreateOptions) (*v1beta1.ClusterRole, error) + Update(ctx context.Context, clusterRole *v1beta1.ClusterRole, opts v1.UpdateOptions) (*v1beta1.ClusterRole, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.ClusterRole, error) + List(ctx context.Context, opts v1.ListOptions) (*v1beta1.ClusterRoleList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.ClusterRole, err error) ClusterRoleExpansion } @@ -61,19 +62,19 @@ func newClusterRoles(c *RbacV1beta1Client) *clusterRoles { } // Get takes name of the clusterRole, and returns the corresponding clusterRole object, and an error if there is any. -func (c *clusterRoles) Get(name string, options v1.GetOptions) (result *v1beta1.ClusterRole, err error) { +func (c *clusterRoles) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.ClusterRole, err error) { result = &v1beta1.ClusterRole{} err = c.client.Get(). Resource("clusterroles"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of ClusterRoles that match those selectors. -func (c *clusterRoles) List(opts v1.ListOptions) (result *v1beta1.ClusterRoleList, err error) { +func (c *clusterRoles) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.ClusterRoleList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -83,13 +84,13 @@ func (c *clusterRoles) List(opts v1.ListOptions) (result *v1beta1.ClusterRoleLis Resource("clusterroles"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested clusterRoles. -func (c *clusterRoles) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *clusterRoles) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -99,66 +100,69 @@ func (c *clusterRoles) Watch(opts v1.ListOptions) (watch.Interface, error) { Resource("clusterroles"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a clusterRole and creates it. Returns the server's representation of the clusterRole, and an error, if there is any. -func (c *clusterRoles) Create(clusterRole *v1beta1.ClusterRole) (result *v1beta1.ClusterRole, err error) { +func (c *clusterRoles) Create(ctx context.Context, clusterRole *v1beta1.ClusterRole, opts v1.CreateOptions) (result *v1beta1.ClusterRole, err error) { result = &v1beta1.ClusterRole{} err = c.client.Post(). Resource("clusterroles"). + VersionedParams(&opts, scheme.ParameterCodec). Body(clusterRole). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a clusterRole and updates it. Returns the server's representation of the clusterRole, and an error, if there is any. -func (c *clusterRoles) Update(clusterRole *v1beta1.ClusterRole) (result *v1beta1.ClusterRole, err error) { +func (c *clusterRoles) Update(ctx context.Context, clusterRole *v1beta1.ClusterRole, opts v1.UpdateOptions) (result *v1beta1.ClusterRole, err error) { result = &v1beta1.ClusterRole{} err = c.client.Put(). Resource("clusterroles"). Name(clusterRole.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(clusterRole). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the clusterRole and deletes it. Returns an error if one occurs. -func (c *clusterRoles) Delete(name string, options *v1.DeleteOptions) error { +func (c *clusterRoles) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). Resource("clusterroles"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *clusterRoles) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *clusterRoles) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Resource("clusterroles"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched clusterRole. -func (c *clusterRoles) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ClusterRole, err error) { +func (c *clusterRoles) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.ClusterRole, err error) { result = &v1beta1.ClusterRole{} err = c.client.Patch(pt). Resource("clusterroles"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/clusterrolebinding.go b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/clusterrolebinding.go index 47eb9e4e77..f45777c232 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/clusterrolebinding.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/clusterrolebinding.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" "time" v1beta1 "k8s.io/api/rbac/v1beta1" @@ -37,14 +38,14 @@ type ClusterRoleBindingsGetter interface { // ClusterRoleBindingInterface has methods to work with ClusterRoleBinding resources. type ClusterRoleBindingInterface interface { - Create(*v1beta1.ClusterRoleBinding) (*v1beta1.ClusterRoleBinding, error) - Update(*v1beta1.ClusterRoleBinding) (*v1beta1.ClusterRoleBinding, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*v1beta1.ClusterRoleBinding, error) - List(opts v1.ListOptions) (*v1beta1.ClusterRoleBindingList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ClusterRoleBinding, err error) + Create(ctx context.Context, clusterRoleBinding *v1beta1.ClusterRoleBinding, opts v1.CreateOptions) (*v1beta1.ClusterRoleBinding, error) + Update(ctx context.Context, clusterRoleBinding *v1beta1.ClusterRoleBinding, opts v1.UpdateOptions) (*v1beta1.ClusterRoleBinding, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.ClusterRoleBinding, error) + List(ctx context.Context, opts v1.ListOptions) (*v1beta1.ClusterRoleBindingList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.ClusterRoleBinding, err error) ClusterRoleBindingExpansion } @@ -61,19 +62,19 @@ func newClusterRoleBindings(c *RbacV1beta1Client) *clusterRoleBindings { } // Get takes name of the clusterRoleBinding, and returns the corresponding clusterRoleBinding object, and an error if there is any. -func (c *clusterRoleBindings) Get(name string, options v1.GetOptions) (result *v1beta1.ClusterRoleBinding, err error) { +func (c *clusterRoleBindings) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.ClusterRoleBinding, err error) { result = &v1beta1.ClusterRoleBinding{} err = c.client.Get(). Resource("clusterrolebindings"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of ClusterRoleBindings that match those selectors. -func (c *clusterRoleBindings) List(opts v1.ListOptions) (result *v1beta1.ClusterRoleBindingList, err error) { +func (c *clusterRoleBindings) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.ClusterRoleBindingList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -83,13 +84,13 @@ func (c *clusterRoleBindings) List(opts v1.ListOptions) (result *v1beta1.Cluster Resource("clusterrolebindings"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested clusterRoleBindings. -func (c *clusterRoleBindings) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *clusterRoleBindings) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -99,66 +100,69 @@ func (c *clusterRoleBindings) Watch(opts v1.ListOptions) (watch.Interface, error Resource("clusterrolebindings"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a clusterRoleBinding and creates it. Returns the server's representation of the clusterRoleBinding, and an error, if there is any. -func (c *clusterRoleBindings) Create(clusterRoleBinding *v1beta1.ClusterRoleBinding) (result *v1beta1.ClusterRoleBinding, err error) { +func (c *clusterRoleBindings) Create(ctx context.Context, clusterRoleBinding *v1beta1.ClusterRoleBinding, opts v1.CreateOptions) (result *v1beta1.ClusterRoleBinding, err error) { result = &v1beta1.ClusterRoleBinding{} err = c.client.Post(). Resource("clusterrolebindings"). + VersionedParams(&opts, scheme.ParameterCodec). Body(clusterRoleBinding). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a clusterRoleBinding and updates it. Returns the server's representation of the clusterRoleBinding, and an error, if there is any. -func (c *clusterRoleBindings) Update(clusterRoleBinding *v1beta1.ClusterRoleBinding) (result *v1beta1.ClusterRoleBinding, err error) { +func (c *clusterRoleBindings) Update(ctx context.Context, clusterRoleBinding *v1beta1.ClusterRoleBinding, opts v1.UpdateOptions) (result *v1beta1.ClusterRoleBinding, err error) { result = &v1beta1.ClusterRoleBinding{} err = c.client.Put(). Resource("clusterrolebindings"). Name(clusterRoleBinding.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(clusterRoleBinding). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the clusterRoleBinding and deletes it. Returns an error if one occurs. -func (c *clusterRoleBindings) Delete(name string, options *v1.DeleteOptions) error { +func (c *clusterRoleBindings) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). Resource("clusterrolebindings"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *clusterRoleBindings) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *clusterRoleBindings) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Resource("clusterrolebindings"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched clusterRoleBinding. -func (c *clusterRoleBindings) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ClusterRoleBinding, err error) { +func (c *clusterRoleBindings) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.ClusterRoleBinding, err error) { result = &v1beta1.ClusterRoleBinding{} err = c.client.Patch(pt). Resource("clusterrolebindings"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake/fake_clusterrole.go b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake/fake_clusterrole.go index 2dbc3f6166..38fdc83f8b 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake/fake_clusterrole.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake/fake_clusterrole.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + v1beta1 "k8s.io/api/rbac/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" @@ -38,7 +40,7 @@ var clusterrolesResource = schema.GroupVersionResource{Group: "rbac.authorizatio var clusterrolesKind = schema.GroupVersionKind{Group: "rbac.authorization.k8s.io", Version: "v1beta1", Kind: "ClusterRole"} // Get takes name of the clusterRole, and returns the corresponding clusterRole object, and an error if there is any. -func (c *FakeClusterRoles) Get(name string, options v1.GetOptions) (result *v1beta1.ClusterRole, err error) { +func (c *FakeClusterRoles) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.ClusterRole, err error) { obj, err := c.Fake. Invokes(testing.NewRootGetAction(clusterrolesResource, name), &v1beta1.ClusterRole{}) if obj == nil { @@ -48,7 +50,7 @@ func (c *FakeClusterRoles) Get(name string, options v1.GetOptions) (result *v1be } // List takes label and field selectors, and returns the list of ClusterRoles that match those selectors. -func (c *FakeClusterRoles) List(opts v1.ListOptions) (result *v1beta1.ClusterRoleList, err error) { +func (c *FakeClusterRoles) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.ClusterRoleList, err error) { obj, err := c.Fake. Invokes(testing.NewRootListAction(clusterrolesResource, clusterrolesKind, opts), &v1beta1.ClusterRoleList{}) if obj == nil { @@ -69,13 +71,13 @@ func (c *FakeClusterRoles) List(opts v1.ListOptions) (result *v1beta1.ClusterRol } // Watch returns a watch.Interface that watches the requested clusterRoles. -func (c *FakeClusterRoles) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeClusterRoles) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewRootWatchAction(clusterrolesResource, opts)) } // Create takes the representation of a clusterRole and creates it. Returns the server's representation of the clusterRole, and an error, if there is any. -func (c *FakeClusterRoles) Create(clusterRole *v1beta1.ClusterRole) (result *v1beta1.ClusterRole, err error) { +func (c *FakeClusterRoles) Create(ctx context.Context, clusterRole *v1beta1.ClusterRole, opts v1.CreateOptions) (result *v1beta1.ClusterRole, err error) { obj, err := c.Fake. Invokes(testing.NewRootCreateAction(clusterrolesResource, clusterRole), &v1beta1.ClusterRole{}) if obj == nil { @@ -85,7 +87,7 @@ func (c *FakeClusterRoles) Create(clusterRole *v1beta1.ClusterRole) (result *v1b } // Update takes the representation of a clusterRole and updates it. Returns the server's representation of the clusterRole, and an error, if there is any. -func (c *FakeClusterRoles) Update(clusterRole *v1beta1.ClusterRole) (result *v1beta1.ClusterRole, err error) { +func (c *FakeClusterRoles) Update(ctx context.Context, clusterRole *v1beta1.ClusterRole, opts v1.UpdateOptions) (result *v1beta1.ClusterRole, err error) { obj, err := c.Fake. Invokes(testing.NewRootUpdateAction(clusterrolesResource, clusterRole), &v1beta1.ClusterRole{}) if obj == nil { @@ -95,22 +97,22 @@ func (c *FakeClusterRoles) Update(clusterRole *v1beta1.ClusterRole) (result *v1b } // Delete takes name of the clusterRole and deletes it. Returns an error if one occurs. -func (c *FakeClusterRoles) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeClusterRoles) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewRootDeleteAction(clusterrolesResource, name), &v1beta1.ClusterRole{}) return err } // DeleteCollection deletes a collection of objects. -func (c *FakeClusterRoles) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewRootDeleteCollectionAction(clusterrolesResource, listOptions) +func (c *FakeClusterRoles) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(clusterrolesResource, listOpts) _, err := c.Fake.Invokes(action, &v1beta1.ClusterRoleList{}) return err } // Patch applies the patch and returns the patched clusterRole. -func (c *FakeClusterRoles) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ClusterRole, err error) { +func (c *FakeClusterRoles) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.ClusterRole, err error) { obj, err := c.Fake. Invokes(testing.NewRootPatchSubresourceAction(clusterrolesResource, name, pt, data, subresources...), &v1beta1.ClusterRole{}) if obj == nil { diff --git a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake/fake_clusterrolebinding.go b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake/fake_clusterrolebinding.go index 14e20bc28c..a47c011b5b 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake/fake_clusterrolebinding.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake/fake_clusterrolebinding.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + v1beta1 "k8s.io/api/rbac/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" @@ -38,7 +40,7 @@ var clusterrolebindingsResource = schema.GroupVersionResource{Group: "rbac.autho var clusterrolebindingsKind = schema.GroupVersionKind{Group: "rbac.authorization.k8s.io", Version: "v1beta1", Kind: "ClusterRoleBinding"} // Get takes name of the clusterRoleBinding, and returns the corresponding clusterRoleBinding object, and an error if there is any. -func (c *FakeClusterRoleBindings) Get(name string, options v1.GetOptions) (result *v1beta1.ClusterRoleBinding, err error) { +func (c *FakeClusterRoleBindings) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.ClusterRoleBinding, err error) { obj, err := c.Fake. Invokes(testing.NewRootGetAction(clusterrolebindingsResource, name), &v1beta1.ClusterRoleBinding{}) if obj == nil { @@ -48,7 +50,7 @@ func (c *FakeClusterRoleBindings) Get(name string, options v1.GetOptions) (resul } // List takes label and field selectors, and returns the list of ClusterRoleBindings that match those selectors. -func (c *FakeClusterRoleBindings) List(opts v1.ListOptions) (result *v1beta1.ClusterRoleBindingList, err error) { +func (c *FakeClusterRoleBindings) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.ClusterRoleBindingList, err error) { obj, err := c.Fake. Invokes(testing.NewRootListAction(clusterrolebindingsResource, clusterrolebindingsKind, opts), &v1beta1.ClusterRoleBindingList{}) if obj == nil { @@ -69,13 +71,13 @@ func (c *FakeClusterRoleBindings) List(opts v1.ListOptions) (result *v1beta1.Clu } // Watch returns a watch.Interface that watches the requested clusterRoleBindings. -func (c *FakeClusterRoleBindings) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeClusterRoleBindings) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewRootWatchAction(clusterrolebindingsResource, opts)) } // Create takes the representation of a clusterRoleBinding and creates it. Returns the server's representation of the clusterRoleBinding, and an error, if there is any. -func (c *FakeClusterRoleBindings) Create(clusterRoleBinding *v1beta1.ClusterRoleBinding) (result *v1beta1.ClusterRoleBinding, err error) { +func (c *FakeClusterRoleBindings) Create(ctx context.Context, clusterRoleBinding *v1beta1.ClusterRoleBinding, opts v1.CreateOptions) (result *v1beta1.ClusterRoleBinding, err error) { obj, err := c.Fake. Invokes(testing.NewRootCreateAction(clusterrolebindingsResource, clusterRoleBinding), &v1beta1.ClusterRoleBinding{}) if obj == nil { @@ -85,7 +87,7 @@ func (c *FakeClusterRoleBindings) Create(clusterRoleBinding *v1beta1.ClusterRole } // Update takes the representation of a clusterRoleBinding and updates it. Returns the server's representation of the clusterRoleBinding, and an error, if there is any. -func (c *FakeClusterRoleBindings) Update(clusterRoleBinding *v1beta1.ClusterRoleBinding) (result *v1beta1.ClusterRoleBinding, err error) { +func (c *FakeClusterRoleBindings) Update(ctx context.Context, clusterRoleBinding *v1beta1.ClusterRoleBinding, opts v1.UpdateOptions) (result *v1beta1.ClusterRoleBinding, err error) { obj, err := c.Fake. Invokes(testing.NewRootUpdateAction(clusterrolebindingsResource, clusterRoleBinding), &v1beta1.ClusterRoleBinding{}) if obj == nil { @@ -95,22 +97,22 @@ func (c *FakeClusterRoleBindings) Update(clusterRoleBinding *v1beta1.ClusterRole } // Delete takes name of the clusterRoleBinding and deletes it. Returns an error if one occurs. -func (c *FakeClusterRoleBindings) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeClusterRoleBindings) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewRootDeleteAction(clusterrolebindingsResource, name), &v1beta1.ClusterRoleBinding{}) return err } // DeleteCollection deletes a collection of objects. -func (c *FakeClusterRoleBindings) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewRootDeleteCollectionAction(clusterrolebindingsResource, listOptions) +func (c *FakeClusterRoleBindings) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(clusterrolebindingsResource, listOpts) _, err := c.Fake.Invokes(action, &v1beta1.ClusterRoleBindingList{}) return err } // Patch applies the patch and returns the patched clusterRoleBinding. -func (c *FakeClusterRoleBindings) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ClusterRoleBinding, err error) { +func (c *FakeClusterRoleBindings) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.ClusterRoleBinding, err error) { obj, err := c.Fake. Invokes(testing.NewRootPatchSubresourceAction(clusterrolebindingsResource, name, pt, data, subresources...), &v1beta1.ClusterRoleBinding{}) if obj == nil { diff --git a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake/fake_role.go b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake/fake_role.go index e31768e4e5..dad8915d07 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake/fake_role.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake/fake_role.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + v1beta1 "k8s.io/api/rbac/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" @@ -39,7 +41,7 @@ var rolesResource = schema.GroupVersionResource{Group: "rbac.authorization.k8s.i var rolesKind = schema.GroupVersionKind{Group: "rbac.authorization.k8s.io", Version: "v1beta1", Kind: "Role"} // Get takes name of the role, and returns the corresponding role object, and an error if there is any. -func (c *FakeRoles) Get(name string, options v1.GetOptions) (result *v1beta1.Role, err error) { +func (c *FakeRoles) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.Role, err error) { obj, err := c.Fake. Invokes(testing.NewGetAction(rolesResource, c.ns, name), &v1beta1.Role{}) @@ -50,7 +52,7 @@ func (c *FakeRoles) Get(name string, options v1.GetOptions) (result *v1beta1.Rol } // List takes label and field selectors, and returns the list of Roles that match those selectors. -func (c *FakeRoles) List(opts v1.ListOptions) (result *v1beta1.RoleList, err error) { +func (c *FakeRoles) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.RoleList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(rolesResource, rolesKind, c.ns, opts), &v1beta1.RoleList{}) @@ -72,14 +74,14 @@ func (c *FakeRoles) List(opts v1.ListOptions) (result *v1beta1.RoleList, err err } // Watch returns a watch.Interface that watches the requested roles. -func (c *FakeRoles) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeRoles) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(rolesResource, c.ns, opts)) } // Create takes the representation of a role and creates it. Returns the server's representation of the role, and an error, if there is any. -func (c *FakeRoles) Create(role *v1beta1.Role) (result *v1beta1.Role, err error) { +func (c *FakeRoles) Create(ctx context.Context, role *v1beta1.Role, opts v1.CreateOptions) (result *v1beta1.Role, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(rolesResource, c.ns, role), &v1beta1.Role{}) @@ -90,7 +92,7 @@ func (c *FakeRoles) Create(role *v1beta1.Role) (result *v1beta1.Role, err error) } // Update takes the representation of a role and updates it. Returns the server's representation of the role, and an error, if there is any. -func (c *FakeRoles) Update(role *v1beta1.Role) (result *v1beta1.Role, err error) { +func (c *FakeRoles) Update(ctx context.Context, role *v1beta1.Role, opts v1.UpdateOptions) (result *v1beta1.Role, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(rolesResource, c.ns, role), &v1beta1.Role{}) @@ -101,7 +103,7 @@ func (c *FakeRoles) Update(role *v1beta1.Role) (result *v1beta1.Role, err error) } // Delete takes name of the role and deletes it. Returns an error if one occurs. -func (c *FakeRoles) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeRoles) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewDeleteAction(rolesResource, c.ns, name), &v1beta1.Role{}) @@ -109,15 +111,15 @@ func (c *FakeRoles) Delete(name string, options *v1.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *FakeRoles) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(rolesResource, c.ns, listOptions) +func (c *FakeRoles) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(rolesResource, c.ns, listOpts) _, err := c.Fake.Invokes(action, &v1beta1.RoleList{}) return err } // Patch applies the patch and returns the patched role. -func (c *FakeRoles) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Role, err error) { +func (c *FakeRoles) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Role, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(rolesResource, c.ns, name, pt, data, subresources...), &v1beta1.Role{}) diff --git a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake/fake_rolebinding.go b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake/fake_rolebinding.go index 06b93c93f6..1d7456b18b 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake/fake_rolebinding.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake/fake_rolebinding.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + v1beta1 "k8s.io/api/rbac/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" @@ -39,7 +41,7 @@ var rolebindingsResource = schema.GroupVersionResource{Group: "rbac.authorizatio var rolebindingsKind = schema.GroupVersionKind{Group: "rbac.authorization.k8s.io", Version: "v1beta1", Kind: "RoleBinding"} // Get takes name of the roleBinding, and returns the corresponding roleBinding object, and an error if there is any. -func (c *FakeRoleBindings) Get(name string, options v1.GetOptions) (result *v1beta1.RoleBinding, err error) { +func (c *FakeRoleBindings) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.RoleBinding, err error) { obj, err := c.Fake. Invokes(testing.NewGetAction(rolebindingsResource, c.ns, name), &v1beta1.RoleBinding{}) @@ -50,7 +52,7 @@ func (c *FakeRoleBindings) Get(name string, options v1.GetOptions) (result *v1be } // List takes label and field selectors, and returns the list of RoleBindings that match those selectors. -func (c *FakeRoleBindings) List(opts v1.ListOptions) (result *v1beta1.RoleBindingList, err error) { +func (c *FakeRoleBindings) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.RoleBindingList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(rolebindingsResource, rolebindingsKind, c.ns, opts), &v1beta1.RoleBindingList{}) @@ -72,14 +74,14 @@ func (c *FakeRoleBindings) List(opts v1.ListOptions) (result *v1beta1.RoleBindin } // Watch returns a watch.Interface that watches the requested roleBindings. -func (c *FakeRoleBindings) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeRoleBindings) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(rolebindingsResource, c.ns, opts)) } // Create takes the representation of a roleBinding and creates it. Returns the server's representation of the roleBinding, and an error, if there is any. -func (c *FakeRoleBindings) Create(roleBinding *v1beta1.RoleBinding) (result *v1beta1.RoleBinding, err error) { +func (c *FakeRoleBindings) Create(ctx context.Context, roleBinding *v1beta1.RoleBinding, opts v1.CreateOptions) (result *v1beta1.RoleBinding, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(rolebindingsResource, c.ns, roleBinding), &v1beta1.RoleBinding{}) @@ -90,7 +92,7 @@ func (c *FakeRoleBindings) Create(roleBinding *v1beta1.RoleBinding) (result *v1b } // Update takes the representation of a roleBinding and updates it. Returns the server's representation of the roleBinding, and an error, if there is any. -func (c *FakeRoleBindings) Update(roleBinding *v1beta1.RoleBinding) (result *v1beta1.RoleBinding, err error) { +func (c *FakeRoleBindings) Update(ctx context.Context, roleBinding *v1beta1.RoleBinding, opts v1.UpdateOptions) (result *v1beta1.RoleBinding, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(rolebindingsResource, c.ns, roleBinding), &v1beta1.RoleBinding{}) @@ -101,7 +103,7 @@ func (c *FakeRoleBindings) Update(roleBinding *v1beta1.RoleBinding) (result *v1b } // Delete takes name of the roleBinding and deletes it. Returns an error if one occurs. -func (c *FakeRoleBindings) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeRoleBindings) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewDeleteAction(rolebindingsResource, c.ns, name), &v1beta1.RoleBinding{}) @@ -109,15 +111,15 @@ func (c *FakeRoleBindings) Delete(name string, options *v1.DeleteOptions) error } // DeleteCollection deletes a collection of objects. -func (c *FakeRoleBindings) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(rolebindingsResource, c.ns, listOptions) +func (c *FakeRoleBindings) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(rolebindingsResource, c.ns, listOpts) _, err := c.Fake.Invokes(action, &v1beta1.RoleBindingList{}) return err } // Patch applies the patch and returns the patched roleBinding. -func (c *FakeRoleBindings) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.RoleBinding, err error) { +func (c *FakeRoleBindings) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.RoleBinding, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(rolebindingsResource, c.ns, name, pt, data, subresources...), &v1beta1.RoleBinding{}) diff --git a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/role.go b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/role.go index 2b61aad523..c172e7f671 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/role.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/role.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" "time" v1beta1 "k8s.io/api/rbac/v1beta1" @@ -37,14 +38,14 @@ type RolesGetter interface { // RoleInterface has methods to work with Role resources. type RoleInterface interface { - Create(*v1beta1.Role) (*v1beta1.Role, error) - Update(*v1beta1.Role) (*v1beta1.Role, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*v1beta1.Role, error) - List(opts v1.ListOptions) (*v1beta1.RoleList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Role, err error) + Create(ctx context.Context, role *v1beta1.Role, opts v1.CreateOptions) (*v1beta1.Role, error) + Update(ctx context.Context, role *v1beta1.Role, opts v1.UpdateOptions) (*v1beta1.Role, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.Role, error) + List(ctx context.Context, opts v1.ListOptions) (*v1beta1.RoleList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Role, err error) RoleExpansion } @@ -63,20 +64,20 @@ func newRoles(c *RbacV1beta1Client, namespace string) *roles { } // Get takes name of the role, and returns the corresponding role object, and an error if there is any. -func (c *roles) Get(name string, options v1.GetOptions) (result *v1beta1.Role, err error) { +func (c *roles) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.Role, err error) { result = &v1beta1.Role{} err = c.client.Get(). Namespace(c.ns). Resource("roles"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of Roles that match those selectors. -func (c *roles) List(opts v1.ListOptions) (result *v1beta1.RoleList, err error) { +func (c *roles) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.RoleList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -87,13 +88,13 @@ func (c *roles) List(opts v1.ListOptions) (result *v1beta1.RoleList, err error) Resource("roles"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested roles. -func (c *roles) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *roles) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -104,71 +105,74 @@ func (c *roles) Watch(opts v1.ListOptions) (watch.Interface, error) { Resource("roles"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a role and creates it. Returns the server's representation of the role, and an error, if there is any. -func (c *roles) Create(role *v1beta1.Role) (result *v1beta1.Role, err error) { +func (c *roles) Create(ctx context.Context, role *v1beta1.Role, opts v1.CreateOptions) (result *v1beta1.Role, err error) { result = &v1beta1.Role{} err = c.client.Post(). Namespace(c.ns). Resource("roles"). + VersionedParams(&opts, scheme.ParameterCodec). Body(role). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a role and updates it. Returns the server's representation of the role, and an error, if there is any. -func (c *roles) Update(role *v1beta1.Role) (result *v1beta1.Role, err error) { +func (c *roles) Update(ctx context.Context, role *v1beta1.Role, opts v1.UpdateOptions) (result *v1beta1.Role, err error) { result = &v1beta1.Role{} err = c.client.Put(). Namespace(c.ns). Resource("roles"). Name(role.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(role). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the role and deletes it. Returns an error if one occurs. -func (c *roles) Delete(name string, options *v1.DeleteOptions) error { +func (c *roles) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("roles"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *roles) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *roles) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Namespace(c.ns). Resource("roles"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched role. -func (c *roles) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Role, err error) { +func (c *roles) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Role, err error) { result = &v1beta1.Role{} err = c.client.Patch(pt). Namespace(c.ns). Resource("roles"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/rolebinding.go b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/rolebinding.go index 0bd118fdfe..f37bfb7441 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/rolebinding.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/rolebinding.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" "time" v1beta1 "k8s.io/api/rbac/v1beta1" @@ -37,14 +38,14 @@ type RoleBindingsGetter interface { // RoleBindingInterface has methods to work with RoleBinding resources. type RoleBindingInterface interface { - Create(*v1beta1.RoleBinding) (*v1beta1.RoleBinding, error) - Update(*v1beta1.RoleBinding) (*v1beta1.RoleBinding, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*v1beta1.RoleBinding, error) - List(opts v1.ListOptions) (*v1beta1.RoleBindingList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.RoleBinding, err error) + Create(ctx context.Context, roleBinding *v1beta1.RoleBinding, opts v1.CreateOptions) (*v1beta1.RoleBinding, error) + Update(ctx context.Context, roleBinding *v1beta1.RoleBinding, opts v1.UpdateOptions) (*v1beta1.RoleBinding, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.RoleBinding, error) + List(ctx context.Context, opts v1.ListOptions) (*v1beta1.RoleBindingList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.RoleBinding, err error) RoleBindingExpansion } @@ -63,20 +64,20 @@ func newRoleBindings(c *RbacV1beta1Client, namespace string) *roleBindings { } // Get takes name of the roleBinding, and returns the corresponding roleBinding object, and an error if there is any. -func (c *roleBindings) Get(name string, options v1.GetOptions) (result *v1beta1.RoleBinding, err error) { +func (c *roleBindings) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.RoleBinding, err error) { result = &v1beta1.RoleBinding{} err = c.client.Get(). Namespace(c.ns). Resource("rolebindings"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of RoleBindings that match those selectors. -func (c *roleBindings) List(opts v1.ListOptions) (result *v1beta1.RoleBindingList, err error) { +func (c *roleBindings) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.RoleBindingList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -87,13 +88,13 @@ func (c *roleBindings) List(opts v1.ListOptions) (result *v1beta1.RoleBindingLis Resource("rolebindings"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested roleBindings. -func (c *roleBindings) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *roleBindings) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -104,71 +105,74 @@ func (c *roleBindings) Watch(opts v1.ListOptions) (watch.Interface, error) { Resource("rolebindings"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a roleBinding and creates it. Returns the server's representation of the roleBinding, and an error, if there is any. -func (c *roleBindings) Create(roleBinding *v1beta1.RoleBinding) (result *v1beta1.RoleBinding, err error) { +func (c *roleBindings) Create(ctx context.Context, roleBinding *v1beta1.RoleBinding, opts v1.CreateOptions) (result *v1beta1.RoleBinding, err error) { result = &v1beta1.RoleBinding{} err = c.client.Post(). Namespace(c.ns). Resource("rolebindings"). + VersionedParams(&opts, scheme.ParameterCodec). Body(roleBinding). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a roleBinding and updates it. Returns the server's representation of the roleBinding, and an error, if there is any. -func (c *roleBindings) Update(roleBinding *v1beta1.RoleBinding) (result *v1beta1.RoleBinding, err error) { +func (c *roleBindings) Update(ctx context.Context, roleBinding *v1beta1.RoleBinding, opts v1.UpdateOptions) (result *v1beta1.RoleBinding, err error) { result = &v1beta1.RoleBinding{} err = c.client.Put(). Namespace(c.ns). Resource("rolebindings"). Name(roleBinding.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(roleBinding). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the roleBinding and deletes it. Returns an error if one occurs. -func (c *roleBindings) Delete(name string, options *v1.DeleteOptions) error { +func (c *roleBindings) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("rolebindings"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *roleBindings) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *roleBindings) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Namespace(c.ns). Resource("rolebindings"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched roleBinding. -func (c *roleBindings) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.RoleBinding, err error) { +func (c *roleBindings) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.RoleBinding, err error) { result = &v1beta1.RoleBinding{} err = c.client.Patch(pt). Namespace(c.ns). Resource("rolebindings"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/k8s.io/client-go/kubernetes/typed/scheduling/v1/fake/fake_priorityclass.go b/vendor/k8s.io/client-go/kubernetes/typed/scheduling/v1/fake/fake_priorityclass.go index 60ad3a8db2..df095d87d1 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/scheduling/v1/fake/fake_priorityclass.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/scheduling/v1/fake/fake_priorityclass.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + schedulingv1 "k8s.io/api/scheduling/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" @@ -38,7 +40,7 @@ var priorityclassesResource = schema.GroupVersionResource{Group: "scheduling.k8s var priorityclassesKind = schema.GroupVersionKind{Group: "scheduling.k8s.io", Version: "v1", Kind: "PriorityClass"} // Get takes name of the priorityClass, and returns the corresponding priorityClass object, and an error if there is any. -func (c *FakePriorityClasses) Get(name string, options v1.GetOptions) (result *schedulingv1.PriorityClass, err error) { +func (c *FakePriorityClasses) Get(ctx context.Context, name string, options v1.GetOptions) (result *schedulingv1.PriorityClass, err error) { obj, err := c.Fake. Invokes(testing.NewRootGetAction(priorityclassesResource, name), &schedulingv1.PriorityClass{}) if obj == nil { @@ -48,7 +50,7 @@ func (c *FakePriorityClasses) Get(name string, options v1.GetOptions) (result *s } // List takes label and field selectors, and returns the list of PriorityClasses that match those selectors. -func (c *FakePriorityClasses) List(opts v1.ListOptions) (result *schedulingv1.PriorityClassList, err error) { +func (c *FakePriorityClasses) List(ctx context.Context, opts v1.ListOptions) (result *schedulingv1.PriorityClassList, err error) { obj, err := c.Fake. Invokes(testing.NewRootListAction(priorityclassesResource, priorityclassesKind, opts), &schedulingv1.PriorityClassList{}) if obj == nil { @@ -69,13 +71,13 @@ func (c *FakePriorityClasses) List(opts v1.ListOptions) (result *schedulingv1.Pr } // Watch returns a watch.Interface that watches the requested priorityClasses. -func (c *FakePriorityClasses) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakePriorityClasses) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewRootWatchAction(priorityclassesResource, opts)) } // Create takes the representation of a priorityClass and creates it. Returns the server's representation of the priorityClass, and an error, if there is any. -func (c *FakePriorityClasses) Create(priorityClass *schedulingv1.PriorityClass) (result *schedulingv1.PriorityClass, err error) { +func (c *FakePriorityClasses) Create(ctx context.Context, priorityClass *schedulingv1.PriorityClass, opts v1.CreateOptions) (result *schedulingv1.PriorityClass, err error) { obj, err := c.Fake. Invokes(testing.NewRootCreateAction(priorityclassesResource, priorityClass), &schedulingv1.PriorityClass{}) if obj == nil { @@ -85,7 +87,7 @@ func (c *FakePriorityClasses) Create(priorityClass *schedulingv1.PriorityClass) } // Update takes the representation of a priorityClass and updates it. Returns the server's representation of the priorityClass, and an error, if there is any. -func (c *FakePriorityClasses) Update(priorityClass *schedulingv1.PriorityClass) (result *schedulingv1.PriorityClass, err error) { +func (c *FakePriorityClasses) Update(ctx context.Context, priorityClass *schedulingv1.PriorityClass, opts v1.UpdateOptions) (result *schedulingv1.PriorityClass, err error) { obj, err := c.Fake. Invokes(testing.NewRootUpdateAction(priorityclassesResource, priorityClass), &schedulingv1.PriorityClass{}) if obj == nil { @@ -95,22 +97,22 @@ func (c *FakePriorityClasses) Update(priorityClass *schedulingv1.PriorityClass) } // Delete takes name of the priorityClass and deletes it. Returns an error if one occurs. -func (c *FakePriorityClasses) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakePriorityClasses) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewRootDeleteAction(priorityclassesResource, name), &schedulingv1.PriorityClass{}) return err } // DeleteCollection deletes a collection of objects. -func (c *FakePriorityClasses) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewRootDeleteCollectionAction(priorityclassesResource, listOptions) +func (c *FakePriorityClasses) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(priorityclassesResource, listOpts) _, err := c.Fake.Invokes(action, &schedulingv1.PriorityClassList{}) return err } // Patch applies the patch and returns the patched priorityClass. -func (c *FakePriorityClasses) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *schedulingv1.PriorityClass, err error) { +func (c *FakePriorityClasses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *schedulingv1.PriorityClass, err error) { obj, err := c.Fake. Invokes(testing.NewRootPatchSubresourceAction(priorityclassesResource, name, pt, data, subresources...), &schedulingv1.PriorityClass{}) if obj == nil { diff --git a/vendor/k8s.io/client-go/kubernetes/typed/scheduling/v1/priorityclass.go b/vendor/k8s.io/client-go/kubernetes/typed/scheduling/v1/priorityclass.go index 3abbb7b8eb..06185d5fb6 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/scheduling/v1/priorityclass.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/scheduling/v1/priorityclass.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" "time" v1 "k8s.io/api/scheduling/v1" @@ -37,14 +38,14 @@ type PriorityClassesGetter interface { // PriorityClassInterface has methods to work with PriorityClass resources. type PriorityClassInterface interface { - Create(*v1.PriorityClass) (*v1.PriorityClass, error) - Update(*v1.PriorityClass) (*v1.PriorityClass, error) - Delete(name string, options *metav1.DeleteOptions) error - DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error - Get(name string, options metav1.GetOptions) (*v1.PriorityClass, error) - List(opts metav1.ListOptions) (*v1.PriorityClassList, error) - Watch(opts metav1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.PriorityClass, err error) + Create(ctx context.Context, priorityClass *v1.PriorityClass, opts metav1.CreateOptions) (*v1.PriorityClass, error) + Update(ctx context.Context, priorityClass *v1.PriorityClass, opts metav1.UpdateOptions) (*v1.PriorityClass, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.PriorityClass, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.PriorityClassList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.PriorityClass, err error) PriorityClassExpansion } @@ -61,19 +62,19 @@ func newPriorityClasses(c *SchedulingV1Client) *priorityClasses { } // Get takes name of the priorityClass, and returns the corresponding priorityClass object, and an error if there is any. -func (c *priorityClasses) Get(name string, options metav1.GetOptions) (result *v1.PriorityClass, err error) { +func (c *priorityClasses) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.PriorityClass, err error) { result = &v1.PriorityClass{} err = c.client.Get(). Resource("priorityclasses"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of PriorityClasses that match those selectors. -func (c *priorityClasses) List(opts metav1.ListOptions) (result *v1.PriorityClassList, err error) { +func (c *priorityClasses) List(ctx context.Context, opts metav1.ListOptions) (result *v1.PriorityClassList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -83,13 +84,13 @@ func (c *priorityClasses) List(opts metav1.ListOptions) (result *v1.PriorityClas Resource("priorityclasses"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested priorityClasses. -func (c *priorityClasses) Watch(opts metav1.ListOptions) (watch.Interface, error) { +func (c *priorityClasses) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -99,66 +100,69 @@ func (c *priorityClasses) Watch(opts metav1.ListOptions) (watch.Interface, error Resource("priorityclasses"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a priorityClass and creates it. Returns the server's representation of the priorityClass, and an error, if there is any. -func (c *priorityClasses) Create(priorityClass *v1.PriorityClass) (result *v1.PriorityClass, err error) { +func (c *priorityClasses) Create(ctx context.Context, priorityClass *v1.PriorityClass, opts metav1.CreateOptions) (result *v1.PriorityClass, err error) { result = &v1.PriorityClass{} err = c.client.Post(). Resource("priorityclasses"). + VersionedParams(&opts, scheme.ParameterCodec). Body(priorityClass). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a priorityClass and updates it. Returns the server's representation of the priorityClass, and an error, if there is any. -func (c *priorityClasses) Update(priorityClass *v1.PriorityClass) (result *v1.PriorityClass, err error) { +func (c *priorityClasses) Update(ctx context.Context, priorityClass *v1.PriorityClass, opts metav1.UpdateOptions) (result *v1.PriorityClass, err error) { result = &v1.PriorityClass{} err = c.client.Put(). Resource("priorityclasses"). Name(priorityClass.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(priorityClass). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the priorityClass and deletes it. Returns an error if one occurs. -func (c *priorityClasses) Delete(name string, options *metav1.DeleteOptions) error { +func (c *priorityClasses) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { return c.client.Delete(). Resource("priorityclasses"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *priorityClasses) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error { +func (c *priorityClasses) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Resource("priorityclasses"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched priorityClass. -func (c *priorityClasses) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.PriorityClass, err error) { +func (c *priorityClasses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.PriorityClass, err error) { result = &v1.PriorityClass{} err = c.client.Patch(pt). Resource("priorityclasses"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1/fake/fake_priorityclass.go b/vendor/k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1/fake/fake_priorityclass.go index e592ed137f..0f246c032d 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1/fake/fake_priorityclass.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1/fake/fake_priorityclass.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + v1alpha1 "k8s.io/api/scheduling/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" @@ -38,7 +40,7 @@ var priorityclassesResource = schema.GroupVersionResource{Group: "scheduling.k8s var priorityclassesKind = schema.GroupVersionKind{Group: "scheduling.k8s.io", Version: "v1alpha1", Kind: "PriorityClass"} // Get takes name of the priorityClass, and returns the corresponding priorityClass object, and an error if there is any. -func (c *FakePriorityClasses) Get(name string, options v1.GetOptions) (result *v1alpha1.PriorityClass, err error) { +func (c *FakePriorityClasses) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.PriorityClass, err error) { obj, err := c.Fake. Invokes(testing.NewRootGetAction(priorityclassesResource, name), &v1alpha1.PriorityClass{}) if obj == nil { @@ -48,7 +50,7 @@ func (c *FakePriorityClasses) Get(name string, options v1.GetOptions) (result *v } // List takes label and field selectors, and returns the list of PriorityClasses that match those selectors. -func (c *FakePriorityClasses) List(opts v1.ListOptions) (result *v1alpha1.PriorityClassList, err error) { +func (c *FakePriorityClasses) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.PriorityClassList, err error) { obj, err := c.Fake. Invokes(testing.NewRootListAction(priorityclassesResource, priorityclassesKind, opts), &v1alpha1.PriorityClassList{}) if obj == nil { @@ -69,13 +71,13 @@ func (c *FakePriorityClasses) List(opts v1.ListOptions) (result *v1alpha1.Priori } // Watch returns a watch.Interface that watches the requested priorityClasses. -func (c *FakePriorityClasses) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakePriorityClasses) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewRootWatchAction(priorityclassesResource, opts)) } // Create takes the representation of a priorityClass and creates it. Returns the server's representation of the priorityClass, and an error, if there is any. -func (c *FakePriorityClasses) Create(priorityClass *v1alpha1.PriorityClass) (result *v1alpha1.PriorityClass, err error) { +func (c *FakePriorityClasses) Create(ctx context.Context, priorityClass *v1alpha1.PriorityClass, opts v1.CreateOptions) (result *v1alpha1.PriorityClass, err error) { obj, err := c.Fake. Invokes(testing.NewRootCreateAction(priorityclassesResource, priorityClass), &v1alpha1.PriorityClass{}) if obj == nil { @@ -85,7 +87,7 @@ func (c *FakePriorityClasses) Create(priorityClass *v1alpha1.PriorityClass) (res } // Update takes the representation of a priorityClass and updates it. Returns the server's representation of the priorityClass, and an error, if there is any. -func (c *FakePriorityClasses) Update(priorityClass *v1alpha1.PriorityClass) (result *v1alpha1.PriorityClass, err error) { +func (c *FakePriorityClasses) Update(ctx context.Context, priorityClass *v1alpha1.PriorityClass, opts v1.UpdateOptions) (result *v1alpha1.PriorityClass, err error) { obj, err := c.Fake. Invokes(testing.NewRootUpdateAction(priorityclassesResource, priorityClass), &v1alpha1.PriorityClass{}) if obj == nil { @@ -95,22 +97,22 @@ func (c *FakePriorityClasses) Update(priorityClass *v1alpha1.PriorityClass) (res } // Delete takes name of the priorityClass and deletes it. Returns an error if one occurs. -func (c *FakePriorityClasses) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakePriorityClasses) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewRootDeleteAction(priorityclassesResource, name), &v1alpha1.PriorityClass{}) return err } // DeleteCollection deletes a collection of objects. -func (c *FakePriorityClasses) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewRootDeleteCollectionAction(priorityclassesResource, listOptions) +func (c *FakePriorityClasses) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(priorityclassesResource, listOpts) _, err := c.Fake.Invokes(action, &v1alpha1.PriorityClassList{}) return err } // Patch applies the patch and returns the patched priorityClass. -func (c *FakePriorityClasses) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.PriorityClass, err error) { +func (c *FakePriorityClasses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.PriorityClass, err error) { obj, err := c.Fake. Invokes(testing.NewRootPatchSubresourceAction(priorityclassesResource, name, pt, data, subresources...), &v1alpha1.PriorityClass{}) if obj == nil { diff --git a/vendor/k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1/priorityclass.go b/vendor/k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1/priorityclass.go index 29d646fb1f..ae9875e9a0 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1/priorityclass.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1/priorityclass.go @@ -19,6 +19,7 @@ limitations under the License. package v1alpha1 import ( + "context" "time" v1alpha1 "k8s.io/api/scheduling/v1alpha1" @@ -37,14 +38,14 @@ type PriorityClassesGetter interface { // PriorityClassInterface has methods to work with PriorityClass resources. type PriorityClassInterface interface { - Create(*v1alpha1.PriorityClass) (*v1alpha1.PriorityClass, error) - Update(*v1alpha1.PriorityClass) (*v1alpha1.PriorityClass, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*v1alpha1.PriorityClass, error) - List(opts v1.ListOptions) (*v1alpha1.PriorityClassList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.PriorityClass, err error) + Create(ctx context.Context, priorityClass *v1alpha1.PriorityClass, opts v1.CreateOptions) (*v1alpha1.PriorityClass, error) + Update(ctx context.Context, priorityClass *v1alpha1.PriorityClass, opts v1.UpdateOptions) (*v1alpha1.PriorityClass, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.PriorityClass, error) + List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.PriorityClassList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.PriorityClass, err error) PriorityClassExpansion } @@ -61,19 +62,19 @@ func newPriorityClasses(c *SchedulingV1alpha1Client) *priorityClasses { } // Get takes name of the priorityClass, and returns the corresponding priorityClass object, and an error if there is any. -func (c *priorityClasses) Get(name string, options v1.GetOptions) (result *v1alpha1.PriorityClass, err error) { +func (c *priorityClasses) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.PriorityClass, err error) { result = &v1alpha1.PriorityClass{} err = c.client.Get(). Resource("priorityclasses"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of PriorityClasses that match those selectors. -func (c *priorityClasses) List(opts v1.ListOptions) (result *v1alpha1.PriorityClassList, err error) { +func (c *priorityClasses) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.PriorityClassList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -83,13 +84,13 @@ func (c *priorityClasses) List(opts v1.ListOptions) (result *v1alpha1.PriorityCl Resource("priorityclasses"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested priorityClasses. -func (c *priorityClasses) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *priorityClasses) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -99,66 +100,69 @@ func (c *priorityClasses) Watch(opts v1.ListOptions) (watch.Interface, error) { Resource("priorityclasses"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a priorityClass and creates it. Returns the server's representation of the priorityClass, and an error, if there is any. -func (c *priorityClasses) Create(priorityClass *v1alpha1.PriorityClass) (result *v1alpha1.PriorityClass, err error) { +func (c *priorityClasses) Create(ctx context.Context, priorityClass *v1alpha1.PriorityClass, opts v1.CreateOptions) (result *v1alpha1.PriorityClass, err error) { result = &v1alpha1.PriorityClass{} err = c.client.Post(). Resource("priorityclasses"). + VersionedParams(&opts, scheme.ParameterCodec). Body(priorityClass). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a priorityClass and updates it. Returns the server's representation of the priorityClass, and an error, if there is any. -func (c *priorityClasses) Update(priorityClass *v1alpha1.PriorityClass) (result *v1alpha1.PriorityClass, err error) { +func (c *priorityClasses) Update(ctx context.Context, priorityClass *v1alpha1.PriorityClass, opts v1.UpdateOptions) (result *v1alpha1.PriorityClass, err error) { result = &v1alpha1.PriorityClass{} err = c.client.Put(). Resource("priorityclasses"). Name(priorityClass.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(priorityClass). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the priorityClass and deletes it. Returns an error if one occurs. -func (c *priorityClasses) Delete(name string, options *v1.DeleteOptions) error { +func (c *priorityClasses) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). Resource("priorityclasses"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *priorityClasses) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *priorityClasses) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Resource("priorityclasses"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched priorityClass. -func (c *priorityClasses) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.PriorityClass, err error) { +func (c *priorityClasses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.PriorityClass, err error) { result = &v1alpha1.PriorityClass{} err = c.client.Patch(pt). Resource("priorityclasses"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/k8s.io/client-go/kubernetes/typed/scheduling/v1beta1/fake/fake_priorityclass.go b/vendor/k8s.io/client-go/kubernetes/typed/scheduling/v1beta1/fake/fake_priorityclass.go index 44ce64b5ce..256590177c 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/scheduling/v1beta1/fake/fake_priorityclass.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/scheduling/v1beta1/fake/fake_priorityclass.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + v1beta1 "k8s.io/api/scheduling/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" @@ -38,7 +40,7 @@ var priorityclassesResource = schema.GroupVersionResource{Group: "scheduling.k8s var priorityclassesKind = schema.GroupVersionKind{Group: "scheduling.k8s.io", Version: "v1beta1", Kind: "PriorityClass"} // Get takes name of the priorityClass, and returns the corresponding priorityClass object, and an error if there is any. -func (c *FakePriorityClasses) Get(name string, options v1.GetOptions) (result *v1beta1.PriorityClass, err error) { +func (c *FakePriorityClasses) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.PriorityClass, err error) { obj, err := c.Fake. Invokes(testing.NewRootGetAction(priorityclassesResource, name), &v1beta1.PriorityClass{}) if obj == nil { @@ -48,7 +50,7 @@ func (c *FakePriorityClasses) Get(name string, options v1.GetOptions) (result *v } // List takes label and field selectors, and returns the list of PriorityClasses that match those selectors. -func (c *FakePriorityClasses) List(opts v1.ListOptions) (result *v1beta1.PriorityClassList, err error) { +func (c *FakePriorityClasses) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.PriorityClassList, err error) { obj, err := c.Fake. Invokes(testing.NewRootListAction(priorityclassesResource, priorityclassesKind, opts), &v1beta1.PriorityClassList{}) if obj == nil { @@ -69,13 +71,13 @@ func (c *FakePriorityClasses) List(opts v1.ListOptions) (result *v1beta1.Priorit } // Watch returns a watch.Interface that watches the requested priorityClasses. -func (c *FakePriorityClasses) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakePriorityClasses) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewRootWatchAction(priorityclassesResource, opts)) } // Create takes the representation of a priorityClass and creates it. Returns the server's representation of the priorityClass, and an error, if there is any. -func (c *FakePriorityClasses) Create(priorityClass *v1beta1.PriorityClass) (result *v1beta1.PriorityClass, err error) { +func (c *FakePriorityClasses) Create(ctx context.Context, priorityClass *v1beta1.PriorityClass, opts v1.CreateOptions) (result *v1beta1.PriorityClass, err error) { obj, err := c.Fake. Invokes(testing.NewRootCreateAction(priorityclassesResource, priorityClass), &v1beta1.PriorityClass{}) if obj == nil { @@ -85,7 +87,7 @@ func (c *FakePriorityClasses) Create(priorityClass *v1beta1.PriorityClass) (resu } // Update takes the representation of a priorityClass and updates it. Returns the server's representation of the priorityClass, and an error, if there is any. -func (c *FakePriorityClasses) Update(priorityClass *v1beta1.PriorityClass) (result *v1beta1.PriorityClass, err error) { +func (c *FakePriorityClasses) Update(ctx context.Context, priorityClass *v1beta1.PriorityClass, opts v1.UpdateOptions) (result *v1beta1.PriorityClass, err error) { obj, err := c.Fake. Invokes(testing.NewRootUpdateAction(priorityclassesResource, priorityClass), &v1beta1.PriorityClass{}) if obj == nil { @@ -95,22 +97,22 @@ func (c *FakePriorityClasses) Update(priorityClass *v1beta1.PriorityClass) (resu } // Delete takes name of the priorityClass and deletes it. Returns an error if one occurs. -func (c *FakePriorityClasses) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakePriorityClasses) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewRootDeleteAction(priorityclassesResource, name), &v1beta1.PriorityClass{}) return err } // DeleteCollection deletes a collection of objects. -func (c *FakePriorityClasses) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewRootDeleteCollectionAction(priorityclassesResource, listOptions) +func (c *FakePriorityClasses) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(priorityclassesResource, listOpts) _, err := c.Fake.Invokes(action, &v1beta1.PriorityClassList{}) return err } // Patch applies the patch and returns the patched priorityClass. -func (c *FakePriorityClasses) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.PriorityClass, err error) { +func (c *FakePriorityClasses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.PriorityClass, err error) { obj, err := c.Fake. Invokes(testing.NewRootPatchSubresourceAction(priorityclassesResource, name, pt, data, subresources...), &v1beta1.PriorityClass{}) if obj == nil { diff --git a/vendor/k8s.io/client-go/kubernetes/typed/scheduling/v1beta1/priorityclass.go b/vendor/k8s.io/client-go/kubernetes/typed/scheduling/v1beta1/priorityclass.go index 5e402f8e34..70ed597bb4 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/scheduling/v1beta1/priorityclass.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/scheduling/v1beta1/priorityclass.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" "time" v1beta1 "k8s.io/api/scheduling/v1beta1" @@ -37,14 +38,14 @@ type PriorityClassesGetter interface { // PriorityClassInterface has methods to work with PriorityClass resources. type PriorityClassInterface interface { - Create(*v1beta1.PriorityClass) (*v1beta1.PriorityClass, error) - Update(*v1beta1.PriorityClass) (*v1beta1.PriorityClass, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*v1beta1.PriorityClass, error) - List(opts v1.ListOptions) (*v1beta1.PriorityClassList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.PriorityClass, err error) + Create(ctx context.Context, priorityClass *v1beta1.PriorityClass, opts v1.CreateOptions) (*v1beta1.PriorityClass, error) + Update(ctx context.Context, priorityClass *v1beta1.PriorityClass, opts v1.UpdateOptions) (*v1beta1.PriorityClass, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.PriorityClass, error) + List(ctx context.Context, opts v1.ListOptions) (*v1beta1.PriorityClassList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.PriorityClass, err error) PriorityClassExpansion } @@ -61,19 +62,19 @@ func newPriorityClasses(c *SchedulingV1beta1Client) *priorityClasses { } // Get takes name of the priorityClass, and returns the corresponding priorityClass object, and an error if there is any. -func (c *priorityClasses) Get(name string, options v1.GetOptions) (result *v1beta1.PriorityClass, err error) { +func (c *priorityClasses) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.PriorityClass, err error) { result = &v1beta1.PriorityClass{} err = c.client.Get(). Resource("priorityclasses"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of PriorityClasses that match those selectors. -func (c *priorityClasses) List(opts v1.ListOptions) (result *v1beta1.PriorityClassList, err error) { +func (c *priorityClasses) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.PriorityClassList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -83,13 +84,13 @@ func (c *priorityClasses) List(opts v1.ListOptions) (result *v1beta1.PriorityCla Resource("priorityclasses"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested priorityClasses. -func (c *priorityClasses) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *priorityClasses) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -99,66 +100,69 @@ func (c *priorityClasses) Watch(opts v1.ListOptions) (watch.Interface, error) { Resource("priorityclasses"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a priorityClass and creates it. Returns the server's representation of the priorityClass, and an error, if there is any. -func (c *priorityClasses) Create(priorityClass *v1beta1.PriorityClass) (result *v1beta1.PriorityClass, err error) { +func (c *priorityClasses) Create(ctx context.Context, priorityClass *v1beta1.PriorityClass, opts v1.CreateOptions) (result *v1beta1.PriorityClass, err error) { result = &v1beta1.PriorityClass{} err = c.client.Post(). Resource("priorityclasses"). + VersionedParams(&opts, scheme.ParameterCodec). Body(priorityClass). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a priorityClass and updates it. Returns the server's representation of the priorityClass, and an error, if there is any. -func (c *priorityClasses) Update(priorityClass *v1beta1.PriorityClass) (result *v1beta1.PriorityClass, err error) { +func (c *priorityClasses) Update(ctx context.Context, priorityClass *v1beta1.PriorityClass, opts v1.UpdateOptions) (result *v1beta1.PriorityClass, err error) { result = &v1beta1.PriorityClass{} err = c.client.Put(). Resource("priorityclasses"). Name(priorityClass.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(priorityClass). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the priorityClass and deletes it. Returns an error if one occurs. -func (c *priorityClasses) Delete(name string, options *v1.DeleteOptions) error { +func (c *priorityClasses) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). Resource("priorityclasses"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *priorityClasses) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *priorityClasses) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Resource("priorityclasses"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched priorityClass. -func (c *priorityClasses) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.PriorityClass, err error) { +func (c *priorityClasses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.PriorityClass, err error) { result = &v1beta1.PriorityClass{} err = c.client.Patch(pt). Resource("priorityclasses"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/fake/fake_podpreset.go b/vendor/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/fake/fake_podpreset.go index 273a027fad..c8ecd09cec 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/fake/fake_podpreset.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/fake/fake_podpreset.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + v1alpha1 "k8s.io/api/settings/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" @@ -39,7 +41,7 @@ var podpresetsResource = schema.GroupVersionResource{Group: "settings.k8s.io", V var podpresetsKind = schema.GroupVersionKind{Group: "settings.k8s.io", Version: "v1alpha1", Kind: "PodPreset"} // Get takes name of the podPreset, and returns the corresponding podPreset object, and an error if there is any. -func (c *FakePodPresets) Get(name string, options v1.GetOptions) (result *v1alpha1.PodPreset, err error) { +func (c *FakePodPresets) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.PodPreset, err error) { obj, err := c.Fake. Invokes(testing.NewGetAction(podpresetsResource, c.ns, name), &v1alpha1.PodPreset{}) @@ -50,7 +52,7 @@ func (c *FakePodPresets) Get(name string, options v1.GetOptions) (result *v1alph } // List takes label and field selectors, and returns the list of PodPresets that match those selectors. -func (c *FakePodPresets) List(opts v1.ListOptions) (result *v1alpha1.PodPresetList, err error) { +func (c *FakePodPresets) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.PodPresetList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(podpresetsResource, podpresetsKind, c.ns, opts), &v1alpha1.PodPresetList{}) @@ -72,14 +74,14 @@ func (c *FakePodPresets) List(opts v1.ListOptions) (result *v1alpha1.PodPresetLi } // Watch returns a watch.Interface that watches the requested podPresets. -func (c *FakePodPresets) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakePodPresets) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(podpresetsResource, c.ns, opts)) } // Create takes the representation of a podPreset and creates it. Returns the server's representation of the podPreset, and an error, if there is any. -func (c *FakePodPresets) Create(podPreset *v1alpha1.PodPreset) (result *v1alpha1.PodPreset, err error) { +func (c *FakePodPresets) Create(ctx context.Context, podPreset *v1alpha1.PodPreset, opts v1.CreateOptions) (result *v1alpha1.PodPreset, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(podpresetsResource, c.ns, podPreset), &v1alpha1.PodPreset{}) @@ -90,7 +92,7 @@ func (c *FakePodPresets) Create(podPreset *v1alpha1.PodPreset) (result *v1alpha1 } // Update takes the representation of a podPreset and updates it. Returns the server's representation of the podPreset, and an error, if there is any. -func (c *FakePodPresets) Update(podPreset *v1alpha1.PodPreset) (result *v1alpha1.PodPreset, err error) { +func (c *FakePodPresets) Update(ctx context.Context, podPreset *v1alpha1.PodPreset, opts v1.UpdateOptions) (result *v1alpha1.PodPreset, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(podpresetsResource, c.ns, podPreset), &v1alpha1.PodPreset{}) @@ -101,7 +103,7 @@ func (c *FakePodPresets) Update(podPreset *v1alpha1.PodPreset) (result *v1alpha1 } // Delete takes name of the podPreset and deletes it. Returns an error if one occurs. -func (c *FakePodPresets) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakePodPresets) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewDeleteAction(podpresetsResource, c.ns, name), &v1alpha1.PodPreset{}) @@ -109,15 +111,15 @@ func (c *FakePodPresets) Delete(name string, options *v1.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *FakePodPresets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(podpresetsResource, c.ns, listOptions) +func (c *FakePodPresets) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(podpresetsResource, c.ns, listOpts) _, err := c.Fake.Invokes(action, &v1alpha1.PodPresetList{}) return err } // Patch applies the patch and returns the patched podPreset. -func (c *FakePodPresets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.PodPreset, err error) { +func (c *FakePodPresets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.PodPreset, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(podpresetsResource, c.ns, name, pt, data, subresources...), &v1alpha1.PodPreset{}) diff --git a/vendor/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/podpreset.go b/vendor/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/podpreset.go index 8fd6adc56b..aa1cb364ea 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/podpreset.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/podpreset.go @@ -19,6 +19,7 @@ limitations under the License. package v1alpha1 import ( + "context" "time" v1alpha1 "k8s.io/api/settings/v1alpha1" @@ -37,14 +38,14 @@ type PodPresetsGetter interface { // PodPresetInterface has methods to work with PodPreset resources. type PodPresetInterface interface { - Create(*v1alpha1.PodPreset) (*v1alpha1.PodPreset, error) - Update(*v1alpha1.PodPreset) (*v1alpha1.PodPreset, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*v1alpha1.PodPreset, error) - List(opts v1.ListOptions) (*v1alpha1.PodPresetList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.PodPreset, err error) + Create(ctx context.Context, podPreset *v1alpha1.PodPreset, opts v1.CreateOptions) (*v1alpha1.PodPreset, error) + Update(ctx context.Context, podPreset *v1alpha1.PodPreset, opts v1.UpdateOptions) (*v1alpha1.PodPreset, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.PodPreset, error) + List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.PodPresetList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.PodPreset, err error) PodPresetExpansion } @@ -63,20 +64,20 @@ func newPodPresets(c *SettingsV1alpha1Client, namespace string) *podPresets { } // Get takes name of the podPreset, and returns the corresponding podPreset object, and an error if there is any. -func (c *podPresets) Get(name string, options v1.GetOptions) (result *v1alpha1.PodPreset, err error) { +func (c *podPresets) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.PodPreset, err error) { result = &v1alpha1.PodPreset{} err = c.client.Get(). Namespace(c.ns). Resource("podpresets"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of PodPresets that match those selectors. -func (c *podPresets) List(opts v1.ListOptions) (result *v1alpha1.PodPresetList, err error) { +func (c *podPresets) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.PodPresetList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -87,13 +88,13 @@ func (c *podPresets) List(opts v1.ListOptions) (result *v1alpha1.PodPresetList, Resource("podpresets"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested podPresets. -func (c *podPresets) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *podPresets) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -104,71 +105,74 @@ func (c *podPresets) Watch(opts v1.ListOptions) (watch.Interface, error) { Resource("podpresets"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a podPreset and creates it. Returns the server's representation of the podPreset, and an error, if there is any. -func (c *podPresets) Create(podPreset *v1alpha1.PodPreset) (result *v1alpha1.PodPreset, err error) { +func (c *podPresets) Create(ctx context.Context, podPreset *v1alpha1.PodPreset, opts v1.CreateOptions) (result *v1alpha1.PodPreset, err error) { result = &v1alpha1.PodPreset{} err = c.client.Post(). Namespace(c.ns). Resource("podpresets"). + VersionedParams(&opts, scheme.ParameterCodec). Body(podPreset). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a podPreset and updates it. Returns the server's representation of the podPreset, and an error, if there is any. -func (c *podPresets) Update(podPreset *v1alpha1.PodPreset) (result *v1alpha1.PodPreset, err error) { +func (c *podPresets) Update(ctx context.Context, podPreset *v1alpha1.PodPreset, opts v1.UpdateOptions) (result *v1alpha1.PodPreset, err error) { result = &v1alpha1.PodPreset{} err = c.client.Put(). Namespace(c.ns). Resource("podpresets"). Name(podPreset.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(podPreset). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the podPreset and deletes it. Returns an error if one occurs. -func (c *podPresets) Delete(name string, options *v1.DeleteOptions) error { +func (c *podPresets) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("podpresets"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *podPresets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *podPresets) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Namespace(c.ns). Resource("podpresets"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched podPreset. -func (c *podPresets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.PodPreset, err error) { +func (c *podPresets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.PodPreset, err error) { result = &v1alpha1.PodPreset{} err = c.client.Patch(pt). Namespace(c.ns). Resource("podpresets"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/csidriver.go b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/csidriver.go new file mode 100644 index 0000000000..92e82251d5 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/csidriver.go @@ -0,0 +1,168 @@ +/* +Copyright The Kubernetes 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 v1 + +import ( + "context" + "time" + + v1 "k8s.io/api/storage/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + scheme "k8s.io/client-go/kubernetes/scheme" + rest "k8s.io/client-go/rest" +) + +// CSIDriversGetter has a method to return a CSIDriverInterface. +// A group's client should implement this interface. +type CSIDriversGetter interface { + CSIDrivers() CSIDriverInterface +} + +// CSIDriverInterface has methods to work with CSIDriver resources. +type CSIDriverInterface interface { + Create(ctx context.Context, cSIDriver *v1.CSIDriver, opts metav1.CreateOptions) (*v1.CSIDriver, error) + Update(ctx context.Context, cSIDriver *v1.CSIDriver, opts metav1.UpdateOptions) (*v1.CSIDriver, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.CSIDriver, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.CSIDriverList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.CSIDriver, err error) + CSIDriverExpansion +} + +// cSIDrivers implements CSIDriverInterface +type cSIDrivers struct { + client rest.Interface +} + +// newCSIDrivers returns a CSIDrivers +func newCSIDrivers(c *StorageV1Client) *cSIDrivers { + return &cSIDrivers{ + client: c.RESTClient(), + } +} + +// Get takes name of the cSIDriver, and returns the corresponding cSIDriver object, and an error if there is any. +func (c *cSIDrivers) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.CSIDriver, err error) { + result = &v1.CSIDriver{} + err = c.client.Get(). + Resource("csidrivers"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of CSIDrivers that match those selectors. +func (c *cSIDrivers) List(ctx context.Context, opts metav1.ListOptions) (result *v1.CSIDriverList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1.CSIDriverList{} + err = c.client.Get(). + Resource("csidrivers"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested cSIDrivers. +func (c *cSIDrivers) Watch(ctx context.Context, opts metav1.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(). + Resource("csidrivers"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a cSIDriver and creates it. Returns the server's representation of the cSIDriver, and an error, if there is any. +func (c *cSIDrivers) Create(ctx context.Context, cSIDriver *v1.CSIDriver, opts metav1.CreateOptions) (result *v1.CSIDriver, err error) { + result = &v1.CSIDriver{} + err = c.client.Post(). + Resource("csidrivers"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(cSIDriver). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a cSIDriver and updates it. Returns the server's representation of the cSIDriver, and an error, if there is any. +func (c *cSIDrivers) Update(ctx context.Context, cSIDriver *v1.CSIDriver, opts metav1.UpdateOptions) (result *v1.CSIDriver, err error) { + result = &v1.CSIDriver{} + err = c.client.Put(). + Resource("csidrivers"). + Name(cSIDriver.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(cSIDriver). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the cSIDriver and deletes it. Returns an error if one occurs. +func (c *cSIDrivers) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { + return c.client.Delete(). + Resource("csidrivers"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *cSIDrivers) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Resource("csidrivers"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched cSIDriver. +func (c *cSIDrivers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.CSIDriver, err error) { + result = &v1.CSIDriver{} + err = c.client.Patch(pt). + Resource("csidrivers"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/csinode.go b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/csinode.go index 209054175a..f8ba245447 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/csinode.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/csinode.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" "time" v1 "k8s.io/api/storage/v1" @@ -37,14 +38,14 @@ type CSINodesGetter interface { // CSINodeInterface has methods to work with CSINode resources. type CSINodeInterface interface { - Create(*v1.CSINode) (*v1.CSINode, error) - Update(*v1.CSINode) (*v1.CSINode, error) - Delete(name string, options *metav1.DeleteOptions) error - DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error - Get(name string, options metav1.GetOptions) (*v1.CSINode, error) - List(opts metav1.ListOptions) (*v1.CSINodeList, error) - Watch(opts metav1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.CSINode, err error) + Create(ctx context.Context, cSINode *v1.CSINode, opts metav1.CreateOptions) (*v1.CSINode, error) + Update(ctx context.Context, cSINode *v1.CSINode, opts metav1.UpdateOptions) (*v1.CSINode, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.CSINode, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.CSINodeList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.CSINode, err error) CSINodeExpansion } @@ -61,19 +62,19 @@ func newCSINodes(c *StorageV1Client) *cSINodes { } // Get takes name of the cSINode, and returns the corresponding cSINode object, and an error if there is any. -func (c *cSINodes) Get(name string, options metav1.GetOptions) (result *v1.CSINode, err error) { +func (c *cSINodes) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.CSINode, err error) { result = &v1.CSINode{} err = c.client.Get(). Resource("csinodes"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of CSINodes that match those selectors. -func (c *cSINodes) List(opts metav1.ListOptions) (result *v1.CSINodeList, err error) { +func (c *cSINodes) List(ctx context.Context, opts metav1.ListOptions) (result *v1.CSINodeList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -83,13 +84,13 @@ func (c *cSINodes) List(opts metav1.ListOptions) (result *v1.CSINodeList, err er Resource("csinodes"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested cSINodes. -func (c *cSINodes) Watch(opts metav1.ListOptions) (watch.Interface, error) { +func (c *cSINodes) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -99,66 +100,69 @@ func (c *cSINodes) Watch(opts metav1.ListOptions) (watch.Interface, error) { Resource("csinodes"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a cSINode and creates it. Returns the server's representation of the cSINode, and an error, if there is any. -func (c *cSINodes) Create(cSINode *v1.CSINode) (result *v1.CSINode, err error) { +func (c *cSINodes) Create(ctx context.Context, cSINode *v1.CSINode, opts metav1.CreateOptions) (result *v1.CSINode, err error) { result = &v1.CSINode{} err = c.client.Post(). Resource("csinodes"). + VersionedParams(&opts, scheme.ParameterCodec). Body(cSINode). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a cSINode and updates it. Returns the server's representation of the cSINode, and an error, if there is any. -func (c *cSINodes) Update(cSINode *v1.CSINode) (result *v1.CSINode, err error) { +func (c *cSINodes) Update(ctx context.Context, cSINode *v1.CSINode, opts metav1.UpdateOptions) (result *v1.CSINode, err error) { result = &v1.CSINode{} err = c.client.Put(). Resource("csinodes"). Name(cSINode.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(cSINode). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the cSINode and deletes it. Returns an error if one occurs. -func (c *cSINodes) Delete(name string, options *metav1.DeleteOptions) error { +func (c *cSINodes) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { return c.client.Delete(). Resource("csinodes"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *cSINodes) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error { +func (c *cSINodes) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Resource("csinodes"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched cSINode. -func (c *cSINodes) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.CSINode, err error) { +func (c *cSINodes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.CSINode, err error) { result = &v1.CSINode{} err = c.client.Patch(pt). Resource("csinodes"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/fake/fake_csidriver.go b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/fake/fake_csidriver.go new file mode 100644 index 0000000000..d3b682c639 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/fake/fake_csidriver.go @@ -0,0 +1,122 @@ +/* +Copyright The Kubernetes 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 ( + "context" + + storagev1 "k8s.io/api/storage/v1" + 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" +) + +// FakeCSIDrivers implements CSIDriverInterface +type FakeCSIDrivers struct { + Fake *FakeStorageV1 +} + +var csidriversResource = schema.GroupVersionResource{Group: "storage.k8s.io", Version: "v1", Resource: "csidrivers"} + +var csidriversKind = schema.GroupVersionKind{Group: "storage.k8s.io", Version: "v1", Kind: "CSIDriver"} + +// Get takes name of the cSIDriver, and returns the corresponding cSIDriver object, and an error if there is any. +func (c *FakeCSIDrivers) Get(ctx context.Context, name string, options v1.GetOptions) (result *storagev1.CSIDriver, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootGetAction(csidriversResource, name), &storagev1.CSIDriver{}) + if obj == nil { + return nil, err + } + return obj.(*storagev1.CSIDriver), err +} + +// List takes label and field selectors, and returns the list of CSIDrivers that match those selectors. +func (c *FakeCSIDrivers) List(ctx context.Context, opts v1.ListOptions) (result *storagev1.CSIDriverList, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootListAction(csidriversResource, csidriversKind, opts), &storagev1.CSIDriverList{}) + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &storagev1.CSIDriverList{ListMeta: obj.(*storagev1.CSIDriverList).ListMeta} + for _, item := range obj.(*storagev1.CSIDriverList).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 cSIDrivers. +func (c *FakeCSIDrivers) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewRootWatchAction(csidriversResource, opts)) +} + +// Create takes the representation of a cSIDriver and creates it. Returns the server's representation of the cSIDriver, and an error, if there is any. +func (c *FakeCSIDrivers) Create(ctx context.Context, cSIDriver *storagev1.CSIDriver, opts v1.CreateOptions) (result *storagev1.CSIDriver, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootCreateAction(csidriversResource, cSIDriver), &storagev1.CSIDriver{}) + if obj == nil { + return nil, err + } + return obj.(*storagev1.CSIDriver), err +} + +// Update takes the representation of a cSIDriver and updates it. Returns the server's representation of the cSIDriver, and an error, if there is any. +func (c *FakeCSIDrivers) Update(ctx context.Context, cSIDriver *storagev1.CSIDriver, opts v1.UpdateOptions) (result *storagev1.CSIDriver, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateAction(csidriversResource, cSIDriver), &storagev1.CSIDriver{}) + if obj == nil { + return nil, err + } + return obj.(*storagev1.CSIDriver), err +} + +// Delete takes name of the cSIDriver and deletes it. Returns an error if one occurs. +func (c *FakeCSIDrivers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewRootDeleteAction(csidriversResource, name), &storagev1.CSIDriver{}) + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeCSIDrivers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(csidriversResource, listOpts) + + _, err := c.Fake.Invokes(action, &storagev1.CSIDriverList{}) + return err +} + +// Patch applies the patch and returns the patched cSIDriver. +func (c *FakeCSIDrivers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *storagev1.CSIDriver, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(csidriversResource, name, pt, data, subresources...), &storagev1.CSIDriver{}) + if obj == nil { + return nil, err + } + return obj.(*storagev1.CSIDriver), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/fake/fake_csinode.go b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/fake/fake_csinode.go index 87ce349a5c..46662d20a3 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/fake/fake_csinode.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/fake/fake_csinode.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + storagev1 "k8s.io/api/storage/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" @@ -38,7 +40,7 @@ var csinodesResource = schema.GroupVersionResource{Group: "storage.k8s.io", Vers var csinodesKind = schema.GroupVersionKind{Group: "storage.k8s.io", Version: "v1", Kind: "CSINode"} // Get takes name of the cSINode, and returns the corresponding cSINode object, and an error if there is any. -func (c *FakeCSINodes) Get(name string, options v1.GetOptions) (result *storagev1.CSINode, err error) { +func (c *FakeCSINodes) Get(ctx context.Context, name string, options v1.GetOptions) (result *storagev1.CSINode, err error) { obj, err := c.Fake. Invokes(testing.NewRootGetAction(csinodesResource, name), &storagev1.CSINode{}) if obj == nil { @@ -48,7 +50,7 @@ func (c *FakeCSINodes) Get(name string, options v1.GetOptions) (result *storagev } // List takes label and field selectors, and returns the list of CSINodes that match those selectors. -func (c *FakeCSINodes) List(opts v1.ListOptions) (result *storagev1.CSINodeList, err error) { +func (c *FakeCSINodes) List(ctx context.Context, opts v1.ListOptions) (result *storagev1.CSINodeList, err error) { obj, err := c.Fake. Invokes(testing.NewRootListAction(csinodesResource, csinodesKind, opts), &storagev1.CSINodeList{}) if obj == nil { @@ -69,13 +71,13 @@ func (c *FakeCSINodes) List(opts v1.ListOptions) (result *storagev1.CSINodeList, } // Watch returns a watch.Interface that watches the requested cSINodes. -func (c *FakeCSINodes) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeCSINodes) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewRootWatchAction(csinodesResource, opts)) } // Create takes the representation of a cSINode and creates it. Returns the server's representation of the cSINode, and an error, if there is any. -func (c *FakeCSINodes) Create(cSINode *storagev1.CSINode) (result *storagev1.CSINode, err error) { +func (c *FakeCSINodes) Create(ctx context.Context, cSINode *storagev1.CSINode, opts v1.CreateOptions) (result *storagev1.CSINode, err error) { obj, err := c.Fake. Invokes(testing.NewRootCreateAction(csinodesResource, cSINode), &storagev1.CSINode{}) if obj == nil { @@ -85,7 +87,7 @@ func (c *FakeCSINodes) Create(cSINode *storagev1.CSINode) (result *storagev1.CSI } // Update takes the representation of a cSINode and updates it. Returns the server's representation of the cSINode, and an error, if there is any. -func (c *FakeCSINodes) Update(cSINode *storagev1.CSINode) (result *storagev1.CSINode, err error) { +func (c *FakeCSINodes) Update(ctx context.Context, cSINode *storagev1.CSINode, opts v1.UpdateOptions) (result *storagev1.CSINode, err error) { obj, err := c.Fake. Invokes(testing.NewRootUpdateAction(csinodesResource, cSINode), &storagev1.CSINode{}) if obj == nil { @@ -95,22 +97,22 @@ func (c *FakeCSINodes) Update(cSINode *storagev1.CSINode) (result *storagev1.CSI } // Delete takes name of the cSINode and deletes it. Returns an error if one occurs. -func (c *FakeCSINodes) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeCSINodes) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewRootDeleteAction(csinodesResource, name), &storagev1.CSINode{}) return err } // DeleteCollection deletes a collection of objects. -func (c *FakeCSINodes) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewRootDeleteCollectionAction(csinodesResource, listOptions) +func (c *FakeCSINodes) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(csinodesResource, listOpts) _, err := c.Fake.Invokes(action, &storagev1.CSINodeList{}) return err } // Patch applies the patch and returns the patched cSINode. -func (c *FakeCSINodes) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *storagev1.CSINode, err error) { +func (c *FakeCSINodes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *storagev1.CSINode, err error) { obj, err := c.Fake. Invokes(testing.NewRootPatchSubresourceAction(csinodesResource, name, pt, data, subresources...), &storagev1.CSINode{}) if obj == nil { diff --git a/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/fake/fake_storage_client.go b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/fake/fake_storage_client.go index f1c37a787e..8878f50484 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/fake/fake_storage_client.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/fake/fake_storage_client.go @@ -28,6 +28,10 @@ type FakeStorageV1 struct { *testing.Fake } +func (c *FakeStorageV1) CSIDrivers() v1.CSIDriverInterface { + return &FakeCSIDrivers{c} +} + func (c *FakeStorageV1) CSINodes() v1.CSINodeInterface { return &FakeCSINodes{c} } diff --git a/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/fake/fake_storageclass.go b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/fake/fake_storageclass.go index c7531d8793..dbd38c7653 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/fake/fake_storageclass.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/fake/fake_storageclass.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + storagev1 "k8s.io/api/storage/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" @@ -38,7 +40,7 @@ var storageclassesResource = schema.GroupVersionResource{Group: "storage.k8s.io" var storageclassesKind = schema.GroupVersionKind{Group: "storage.k8s.io", Version: "v1", Kind: "StorageClass"} // Get takes name of the storageClass, and returns the corresponding storageClass object, and an error if there is any. -func (c *FakeStorageClasses) Get(name string, options v1.GetOptions) (result *storagev1.StorageClass, err error) { +func (c *FakeStorageClasses) Get(ctx context.Context, name string, options v1.GetOptions) (result *storagev1.StorageClass, err error) { obj, err := c.Fake. Invokes(testing.NewRootGetAction(storageclassesResource, name), &storagev1.StorageClass{}) if obj == nil { @@ -48,7 +50,7 @@ func (c *FakeStorageClasses) Get(name string, options v1.GetOptions) (result *st } // List takes label and field selectors, and returns the list of StorageClasses that match those selectors. -func (c *FakeStorageClasses) List(opts v1.ListOptions) (result *storagev1.StorageClassList, err error) { +func (c *FakeStorageClasses) List(ctx context.Context, opts v1.ListOptions) (result *storagev1.StorageClassList, err error) { obj, err := c.Fake. Invokes(testing.NewRootListAction(storageclassesResource, storageclassesKind, opts), &storagev1.StorageClassList{}) if obj == nil { @@ -69,13 +71,13 @@ func (c *FakeStorageClasses) List(opts v1.ListOptions) (result *storagev1.Storag } // Watch returns a watch.Interface that watches the requested storageClasses. -func (c *FakeStorageClasses) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeStorageClasses) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewRootWatchAction(storageclassesResource, opts)) } // Create takes the representation of a storageClass and creates it. Returns the server's representation of the storageClass, and an error, if there is any. -func (c *FakeStorageClasses) Create(storageClass *storagev1.StorageClass) (result *storagev1.StorageClass, err error) { +func (c *FakeStorageClasses) Create(ctx context.Context, storageClass *storagev1.StorageClass, opts v1.CreateOptions) (result *storagev1.StorageClass, err error) { obj, err := c.Fake. Invokes(testing.NewRootCreateAction(storageclassesResource, storageClass), &storagev1.StorageClass{}) if obj == nil { @@ -85,7 +87,7 @@ func (c *FakeStorageClasses) Create(storageClass *storagev1.StorageClass) (resul } // Update takes the representation of a storageClass and updates it. Returns the server's representation of the storageClass, and an error, if there is any. -func (c *FakeStorageClasses) Update(storageClass *storagev1.StorageClass) (result *storagev1.StorageClass, err error) { +func (c *FakeStorageClasses) Update(ctx context.Context, storageClass *storagev1.StorageClass, opts v1.UpdateOptions) (result *storagev1.StorageClass, err error) { obj, err := c.Fake. Invokes(testing.NewRootUpdateAction(storageclassesResource, storageClass), &storagev1.StorageClass{}) if obj == nil { @@ -95,22 +97,22 @@ func (c *FakeStorageClasses) Update(storageClass *storagev1.StorageClass) (resul } // Delete takes name of the storageClass and deletes it. Returns an error if one occurs. -func (c *FakeStorageClasses) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeStorageClasses) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewRootDeleteAction(storageclassesResource, name), &storagev1.StorageClass{}) return err } // DeleteCollection deletes a collection of objects. -func (c *FakeStorageClasses) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewRootDeleteCollectionAction(storageclassesResource, listOptions) +func (c *FakeStorageClasses) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(storageclassesResource, listOpts) _, err := c.Fake.Invokes(action, &storagev1.StorageClassList{}) return err } // Patch applies the patch and returns the patched storageClass. -func (c *FakeStorageClasses) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *storagev1.StorageClass, err error) { +func (c *FakeStorageClasses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *storagev1.StorageClass, err error) { obj, err := c.Fake. Invokes(testing.NewRootPatchSubresourceAction(storageclassesResource, name, pt, data, subresources...), &storagev1.StorageClass{}) if obj == nil { diff --git a/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/fake/fake_volumeattachment.go b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/fake/fake_volumeattachment.go index 58e09da46b..72a3238f97 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/fake/fake_volumeattachment.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/fake/fake_volumeattachment.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + storagev1 "k8s.io/api/storage/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" @@ -38,7 +40,7 @@ var volumeattachmentsResource = schema.GroupVersionResource{Group: "storage.k8s. var volumeattachmentsKind = schema.GroupVersionKind{Group: "storage.k8s.io", Version: "v1", Kind: "VolumeAttachment"} // Get takes name of the volumeAttachment, and returns the corresponding volumeAttachment object, and an error if there is any. -func (c *FakeVolumeAttachments) Get(name string, options v1.GetOptions) (result *storagev1.VolumeAttachment, err error) { +func (c *FakeVolumeAttachments) Get(ctx context.Context, name string, options v1.GetOptions) (result *storagev1.VolumeAttachment, err error) { obj, err := c.Fake. Invokes(testing.NewRootGetAction(volumeattachmentsResource, name), &storagev1.VolumeAttachment{}) if obj == nil { @@ -48,7 +50,7 @@ func (c *FakeVolumeAttachments) Get(name string, options v1.GetOptions) (result } // List takes label and field selectors, and returns the list of VolumeAttachments that match those selectors. -func (c *FakeVolumeAttachments) List(opts v1.ListOptions) (result *storagev1.VolumeAttachmentList, err error) { +func (c *FakeVolumeAttachments) List(ctx context.Context, opts v1.ListOptions) (result *storagev1.VolumeAttachmentList, err error) { obj, err := c.Fake. Invokes(testing.NewRootListAction(volumeattachmentsResource, volumeattachmentsKind, opts), &storagev1.VolumeAttachmentList{}) if obj == nil { @@ -69,13 +71,13 @@ func (c *FakeVolumeAttachments) List(opts v1.ListOptions) (result *storagev1.Vol } // Watch returns a watch.Interface that watches the requested volumeAttachments. -func (c *FakeVolumeAttachments) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeVolumeAttachments) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewRootWatchAction(volumeattachmentsResource, opts)) } // Create takes the representation of a volumeAttachment and creates it. Returns the server's representation of the volumeAttachment, and an error, if there is any. -func (c *FakeVolumeAttachments) Create(volumeAttachment *storagev1.VolumeAttachment) (result *storagev1.VolumeAttachment, err error) { +func (c *FakeVolumeAttachments) Create(ctx context.Context, volumeAttachment *storagev1.VolumeAttachment, opts v1.CreateOptions) (result *storagev1.VolumeAttachment, err error) { obj, err := c.Fake. Invokes(testing.NewRootCreateAction(volumeattachmentsResource, volumeAttachment), &storagev1.VolumeAttachment{}) if obj == nil { @@ -85,7 +87,7 @@ func (c *FakeVolumeAttachments) Create(volumeAttachment *storagev1.VolumeAttachm } // Update takes the representation of a volumeAttachment and updates it. Returns the server's representation of the volumeAttachment, and an error, if there is any. -func (c *FakeVolumeAttachments) Update(volumeAttachment *storagev1.VolumeAttachment) (result *storagev1.VolumeAttachment, err error) { +func (c *FakeVolumeAttachments) Update(ctx context.Context, volumeAttachment *storagev1.VolumeAttachment, opts v1.UpdateOptions) (result *storagev1.VolumeAttachment, err error) { obj, err := c.Fake. Invokes(testing.NewRootUpdateAction(volumeattachmentsResource, volumeAttachment), &storagev1.VolumeAttachment{}) if obj == nil { @@ -96,7 +98,7 @@ func (c *FakeVolumeAttachments) Update(volumeAttachment *storagev1.VolumeAttachm // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeVolumeAttachments) UpdateStatus(volumeAttachment *storagev1.VolumeAttachment) (*storagev1.VolumeAttachment, error) { +func (c *FakeVolumeAttachments) UpdateStatus(ctx context.Context, volumeAttachment *storagev1.VolumeAttachment, opts v1.UpdateOptions) (*storagev1.VolumeAttachment, error) { obj, err := c.Fake. Invokes(testing.NewRootUpdateSubresourceAction(volumeattachmentsResource, "status", volumeAttachment), &storagev1.VolumeAttachment{}) if obj == nil { @@ -106,22 +108,22 @@ func (c *FakeVolumeAttachments) UpdateStatus(volumeAttachment *storagev1.VolumeA } // Delete takes name of the volumeAttachment and deletes it. Returns an error if one occurs. -func (c *FakeVolumeAttachments) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeVolumeAttachments) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewRootDeleteAction(volumeattachmentsResource, name), &storagev1.VolumeAttachment{}) return err } // DeleteCollection deletes a collection of objects. -func (c *FakeVolumeAttachments) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewRootDeleteCollectionAction(volumeattachmentsResource, listOptions) +func (c *FakeVolumeAttachments) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(volumeattachmentsResource, listOpts) _, err := c.Fake.Invokes(action, &storagev1.VolumeAttachmentList{}) return err } // Patch applies the patch and returns the patched volumeAttachment. -func (c *FakeVolumeAttachments) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *storagev1.VolumeAttachment, err error) { +func (c *FakeVolumeAttachments) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *storagev1.VolumeAttachment, err error) { obj, err := c.Fake. Invokes(testing.NewRootPatchSubresourceAction(volumeattachmentsResource, name, pt, data, subresources...), &storagev1.VolumeAttachment{}) if obj == nil { diff --git a/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/generated_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/generated_expansion.go index d147620aef..af81117763 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/generated_expansion.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/generated_expansion.go @@ -18,6 +18,8 @@ limitations under the License. package v1 +type CSIDriverExpansion interface{} + type CSINodeExpansion interface{} type StorageClassExpansion interface{} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/storage_client.go b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/storage_client.go index 822f089144..f03beae855 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/storage_client.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/storage_client.go @@ -26,6 +26,7 @@ import ( type StorageV1Interface interface { RESTClient() rest.Interface + CSIDriversGetter CSINodesGetter StorageClassesGetter VolumeAttachmentsGetter @@ -36,6 +37,10 @@ type StorageV1Client struct { restClient rest.Interface } +func (c *StorageV1Client) CSIDrivers() CSIDriverInterface { + return newCSIDrivers(c) +} + func (c *StorageV1Client) CSINodes() CSINodeInterface { return newCSINodes(c) } diff --git a/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/storageclass.go b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/storageclass.go index 3f4c48f0a0..046ec3a1b9 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/storageclass.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/storageclass.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" "time" v1 "k8s.io/api/storage/v1" @@ -37,14 +38,14 @@ type StorageClassesGetter interface { // StorageClassInterface has methods to work with StorageClass resources. type StorageClassInterface interface { - Create(*v1.StorageClass) (*v1.StorageClass, error) - Update(*v1.StorageClass) (*v1.StorageClass, error) - Delete(name string, options *metav1.DeleteOptions) error - DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error - Get(name string, options metav1.GetOptions) (*v1.StorageClass, error) - List(opts metav1.ListOptions) (*v1.StorageClassList, error) - Watch(opts metav1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.StorageClass, err error) + Create(ctx context.Context, storageClass *v1.StorageClass, opts metav1.CreateOptions) (*v1.StorageClass, error) + Update(ctx context.Context, storageClass *v1.StorageClass, opts metav1.UpdateOptions) (*v1.StorageClass, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.StorageClass, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.StorageClassList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.StorageClass, err error) StorageClassExpansion } @@ -61,19 +62,19 @@ func newStorageClasses(c *StorageV1Client) *storageClasses { } // Get takes name of the storageClass, and returns the corresponding storageClass object, and an error if there is any. -func (c *storageClasses) Get(name string, options metav1.GetOptions) (result *v1.StorageClass, err error) { +func (c *storageClasses) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.StorageClass, err error) { result = &v1.StorageClass{} err = c.client.Get(). Resource("storageclasses"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of StorageClasses that match those selectors. -func (c *storageClasses) List(opts metav1.ListOptions) (result *v1.StorageClassList, err error) { +func (c *storageClasses) List(ctx context.Context, opts metav1.ListOptions) (result *v1.StorageClassList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -83,13 +84,13 @@ func (c *storageClasses) List(opts metav1.ListOptions) (result *v1.StorageClassL Resource("storageclasses"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested storageClasses. -func (c *storageClasses) Watch(opts metav1.ListOptions) (watch.Interface, error) { +func (c *storageClasses) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -99,66 +100,69 @@ func (c *storageClasses) Watch(opts metav1.ListOptions) (watch.Interface, error) Resource("storageclasses"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a storageClass and creates it. Returns the server's representation of the storageClass, and an error, if there is any. -func (c *storageClasses) Create(storageClass *v1.StorageClass) (result *v1.StorageClass, err error) { +func (c *storageClasses) Create(ctx context.Context, storageClass *v1.StorageClass, opts metav1.CreateOptions) (result *v1.StorageClass, err error) { result = &v1.StorageClass{} err = c.client.Post(). Resource("storageclasses"). + VersionedParams(&opts, scheme.ParameterCodec). Body(storageClass). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a storageClass and updates it. Returns the server's representation of the storageClass, and an error, if there is any. -func (c *storageClasses) Update(storageClass *v1.StorageClass) (result *v1.StorageClass, err error) { +func (c *storageClasses) Update(ctx context.Context, storageClass *v1.StorageClass, opts metav1.UpdateOptions) (result *v1.StorageClass, err error) { result = &v1.StorageClass{} err = c.client.Put(). Resource("storageclasses"). Name(storageClass.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(storageClass). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the storageClass and deletes it. Returns an error if one occurs. -func (c *storageClasses) Delete(name string, options *metav1.DeleteOptions) error { +func (c *storageClasses) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { return c.client.Delete(). Resource("storageclasses"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *storageClasses) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error { +func (c *storageClasses) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Resource("storageclasses"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched storageClass. -func (c *storageClasses) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.StorageClass, err error) { +func (c *storageClasses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.StorageClass, err error) { result = &v1.StorageClass{} err = c.client.Patch(pt). Resource("storageclasses"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/volumeattachment.go b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/volumeattachment.go index 0f45097b20..e4162975fc 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/volumeattachment.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/volumeattachment.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" "time" v1 "k8s.io/api/storage/v1" @@ -37,15 +38,15 @@ type VolumeAttachmentsGetter interface { // VolumeAttachmentInterface has methods to work with VolumeAttachment resources. type VolumeAttachmentInterface interface { - Create(*v1.VolumeAttachment) (*v1.VolumeAttachment, error) - Update(*v1.VolumeAttachment) (*v1.VolumeAttachment, error) - UpdateStatus(*v1.VolumeAttachment) (*v1.VolumeAttachment, error) - Delete(name string, options *metav1.DeleteOptions) error - DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error - Get(name string, options metav1.GetOptions) (*v1.VolumeAttachment, error) - List(opts metav1.ListOptions) (*v1.VolumeAttachmentList, error) - Watch(opts metav1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.VolumeAttachment, err error) + Create(ctx context.Context, volumeAttachment *v1.VolumeAttachment, opts metav1.CreateOptions) (*v1.VolumeAttachment, error) + Update(ctx context.Context, volumeAttachment *v1.VolumeAttachment, opts metav1.UpdateOptions) (*v1.VolumeAttachment, error) + UpdateStatus(ctx context.Context, volumeAttachment *v1.VolumeAttachment, opts metav1.UpdateOptions) (*v1.VolumeAttachment, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.VolumeAttachment, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.VolumeAttachmentList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.VolumeAttachment, err error) VolumeAttachmentExpansion } @@ -62,19 +63,19 @@ func newVolumeAttachments(c *StorageV1Client) *volumeAttachments { } // Get takes name of the volumeAttachment, and returns the corresponding volumeAttachment object, and an error if there is any. -func (c *volumeAttachments) Get(name string, options metav1.GetOptions) (result *v1.VolumeAttachment, err error) { +func (c *volumeAttachments) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.VolumeAttachment, err error) { result = &v1.VolumeAttachment{} err = c.client.Get(). Resource("volumeattachments"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of VolumeAttachments that match those selectors. -func (c *volumeAttachments) List(opts metav1.ListOptions) (result *v1.VolumeAttachmentList, err error) { +func (c *volumeAttachments) List(ctx context.Context, opts metav1.ListOptions) (result *v1.VolumeAttachmentList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -84,13 +85,13 @@ func (c *volumeAttachments) List(opts metav1.ListOptions) (result *v1.VolumeAtta Resource("volumeattachments"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested volumeAttachments. -func (c *volumeAttachments) Watch(opts metav1.ListOptions) (watch.Interface, error) { +func (c *volumeAttachments) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -100,81 +101,84 @@ func (c *volumeAttachments) Watch(opts metav1.ListOptions) (watch.Interface, err Resource("volumeattachments"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a volumeAttachment and creates it. Returns the server's representation of the volumeAttachment, and an error, if there is any. -func (c *volumeAttachments) Create(volumeAttachment *v1.VolumeAttachment) (result *v1.VolumeAttachment, err error) { +func (c *volumeAttachments) Create(ctx context.Context, volumeAttachment *v1.VolumeAttachment, opts metav1.CreateOptions) (result *v1.VolumeAttachment, err error) { result = &v1.VolumeAttachment{} err = c.client.Post(). Resource("volumeattachments"). + VersionedParams(&opts, scheme.ParameterCodec). Body(volumeAttachment). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a volumeAttachment and updates it. Returns the server's representation of the volumeAttachment, and an error, if there is any. -func (c *volumeAttachments) Update(volumeAttachment *v1.VolumeAttachment) (result *v1.VolumeAttachment, err error) { +func (c *volumeAttachments) Update(ctx context.Context, volumeAttachment *v1.VolumeAttachment, opts metav1.UpdateOptions) (result *v1.VolumeAttachment, err error) { result = &v1.VolumeAttachment{} err = c.client.Put(). Resource("volumeattachments"). Name(volumeAttachment.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(volumeAttachment). - Do(). + Do(ctx). Into(result) return } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *volumeAttachments) UpdateStatus(volumeAttachment *v1.VolumeAttachment) (result *v1.VolumeAttachment, err error) { +func (c *volumeAttachments) UpdateStatus(ctx context.Context, volumeAttachment *v1.VolumeAttachment, opts metav1.UpdateOptions) (result *v1.VolumeAttachment, err error) { result = &v1.VolumeAttachment{} err = c.client.Put(). Resource("volumeattachments"). Name(volumeAttachment.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(volumeAttachment). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the volumeAttachment and deletes it. Returns an error if one occurs. -func (c *volumeAttachments) Delete(name string, options *metav1.DeleteOptions) error { +func (c *volumeAttachments) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { return c.client.Delete(). Resource("volumeattachments"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *volumeAttachments) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error { +func (c *volumeAttachments) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Resource("volumeattachments"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched volumeAttachment. -func (c *volumeAttachments) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.VolumeAttachment, err error) { +func (c *volumeAttachments) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.VolumeAttachment, err error) { result = &v1.VolumeAttachment{} err = c.client.Patch(pt). Resource("volumeattachments"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/fake/fake_volumeattachment.go b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/fake/fake_volumeattachment.go index 86f53e2d4d..a3140e7217 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/fake/fake_volumeattachment.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/fake/fake_volumeattachment.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + v1alpha1 "k8s.io/api/storage/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" @@ -38,7 +40,7 @@ var volumeattachmentsResource = schema.GroupVersionResource{Group: "storage.k8s. var volumeattachmentsKind = schema.GroupVersionKind{Group: "storage.k8s.io", Version: "v1alpha1", Kind: "VolumeAttachment"} // Get takes name of the volumeAttachment, and returns the corresponding volumeAttachment object, and an error if there is any. -func (c *FakeVolumeAttachments) Get(name string, options v1.GetOptions) (result *v1alpha1.VolumeAttachment, err error) { +func (c *FakeVolumeAttachments) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.VolumeAttachment, err error) { obj, err := c.Fake. Invokes(testing.NewRootGetAction(volumeattachmentsResource, name), &v1alpha1.VolumeAttachment{}) if obj == nil { @@ -48,7 +50,7 @@ func (c *FakeVolumeAttachments) Get(name string, options v1.GetOptions) (result } // List takes label and field selectors, and returns the list of VolumeAttachments that match those selectors. -func (c *FakeVolumeAttachments) List(opts v1.ListOptions) (result *v1alpha1.VolumeAttachmentList, err error) { +func (c *FakeVolumeAttachments) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.VolumeAttachmentList, err error) { obj, err := c.Fake. Invokes(testing.NewRootListAction(volumeattachmentsResource, volumeattachmentsKind, opts), &v1alpha1.VolumeAttachmentList{}) if obj == nil { @@ -69,13 +71,13 @@ func (c *FakeVolumeAttachments) List(opts v1.ListOptions) (result *v1alpha1.Volu } // Watch returns a watch.Interface that watches the requested volumeAttachments. -func (c *FakeVolumeAttachments) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeVolumeAttachments) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewRootWatchAction(volumeattachmentsResource, opts)) } // Create takes the representation of a volumeAttachment and creates it. Returns the server's representation of the volumeAttachment, and an error, if there is any. -func (c *FakeVolumeAttachments) Create(volumeAttachment *v1alpha1.VolumeAttachment) (result *v1alpha1.VolumeAttachment, err error) { +func (c *FakeVolumeAttachments) Create(ctx context.Context, volumeAttachment *v1alpha1.VolumeAttachment, opts v1.CreateOptions) (result *v1alpha1.VolumeAttachment, err error) { obj, err := c.Fake. Invokes(testing.NewRootCreateAction(volumeattachmentsResource, volumeAttachment), &v1alpha1.VolumeAttachment{}) if obj == nil { @@ -85,7 +87,7 @@ func (c *FakeVolumeAttachments) Create(volumeAttachment *v1alpha1.VolumeAttachme } // Update takes the representation of a volumeAttachment and updates it. Returns the server's representation of the volumeAttachment, and an error, if there is any. -func (c *FakeVolumeAttachments) Update(volumeAttachment *v1alpha1.VolumeAttachment) (result *v1alpha1.VolumeAttachment, err error) { +func (c *FakeVolumeAttachments) Update(ctx context.Context, volumeAttachment *v1alpha1.VolumeAttachment, opts v1.UpdateOptions) (result *v1alpha1.VolumeAttachment, err error) { obj, err := c.Fake. Invokes(testing.NewRootUpdateAction(volumeattachmentsResource, volumeAttachment), &v1alpha1.VolumeAttachment{}) if obj == nil { @@ -96,7 +98,7 @@ func (c *FakeVolumeAttachments) Update(volumeAttachment *v1alpha1.VolumeAttachme // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeVolumeAttachments) UpdateStatus(volumeAttachment *v1alpha1.VolumeAttachment) (*v1alpha1.VolumeAttachment, error) { +func (c *FakeVolumeAttachments) UpdateStatus(ctx context.Context, volumeAttachment *v1alpha1.VolumeAttachment, opts v1.UpdateOptions) (*v1alpha1.VolumeAttachment, error) { obj, err := c.Fake. Invokes(testing.NewRootUpdateSubresourceAction(volumeattachmentsResource, "status", volumeAttachment), &v1alpha1.VolumeAttachment{}) if obj == nil { @@ -106,22 +108,22 @@ func (c *FakeVolumeAttachments) UpdateStatus(volumeAttachment *v1alpha1.VolumeAt } // Delete takes name of the volumeAttachment and deletes it. Returns an error if one occurs. -func (c *FakeVolumeAttachments) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeVolumeAttachments) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewRootDeleteAction(volumeattachmentsResource, name), &v1alpha1.VolumeAttachment{}) return err } // DeleteCollection deletes a collection of objects. -func (c *FakeVolumeAttachments) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewRootDeleteCollectionAction(volumeattachmentsResource, listOptions) +func (c *FakeVolumeAttachments) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(volumeattachmentsResource, listOpts) _, err := c.Fake.Invokes(action, &v1alpha1.VolumeAttachmentList{}) return err } // Patch applies the patch and returns the patched volumeAttachment. -func (c *FakeVolumeAttachments) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.VolumeAttachment, err error) { +func (c *FakeVolumeAttachments) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.VolumeAttachment, err error) { obj, err := c.Fake. Invokes(testing.NewRootPatchSubresourceAction(volumeattachmentsResource, name, pt, data, subresources...), &v1alpha1.VolumeAttachment{}) if obj == nil { diff --git a/vendor/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/volumeattachment.go b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/volumeattachment.go index 7fef94e8d8..9012fde99d 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/volumeattachment.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/volumeattachment.go @@ -19,6 +19,7 @@ limitations under the License. package v1alpha1 import ( + "context" "time" v1alpha1 "k8s.io/api/storage/v1alpha1" @@ -37,15 +38,15 @@ type VolumeAttachmentsGetter interface { // VolumeAttachmentInterface has methods to work with VolumeAttachment resources. type VolumeAttachmentInterface interface { - Create(*v1alpha1.VolumeAttachment) (*v1alpha1.VolumeAttachment, error) - Update(*v1alpha1.VolumeAttachment) (*v1alpha1.VolumeAttachment, error) - UpdateStatus(*v1alpha1.VolumeAttachment) (*v1alpha1.VolumeAttachment, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*v1alpha1.VolumeAttachment, error) - List(opts v1.ListOptions) (*v1alpha1.VolumeAttachmentList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.VolumeAttachment, err error) + Create(ctx context.Context, volumeAttachment *v1alpha1.VolumeAttachment, opts v1.CreateOptions) (*v1alpha1.VolumeAttachment, error) + Update(ctx context.Context, volumeAttachment *v1alpha1.VolumeAttachment, opts v1.UpdateOptions) (*v1alpha1.VolumeAttachment, error) + UpdateStatus(ctx context.Context, volumeAttachment *v1alpha1.VolumeAttachment, opts v1.UpdateOptions) (*v1alpha1.VolumeAttachment, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.VolumeAttachment, error) + List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.VolumeAttachmentList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.VolumeAttachment, err error) VolumeAttachmentExpansion } @@ -62,19 +63,19 @@ func newVolumeAttachments(c *StorageV1alpha1Client) *volumeAttachments { } // Get takes name of the volumeAttachment, and returns the corresponding volumeAttachment object, and an error if there is any. -func (c *volumeAttachments) Get(name string, options v1.GetOptions) (result *v1alpha1.VolumeAttachment, err error) { +func (c *volumeAttachments) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.VolumeAttachment, err error) { result = &v1alpha1.VolumeAttachment{} err = c.client.Get(). Resource("volumeattachments"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of VolumeAttachments that match those selectors. -func (c *volumeAttachments) List(opts v1.ListOptions) (result *v1alpha1.VolumeAttachmentList, err error) { +func (c *volumeAttachments) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.VolumeAttachmentList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -84,13 +85,13 @@ func (c *volumeAttachments) List(opts v1.ListOptions) (result *v1alpha1.VolumeAt Resource("volumeattachments"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested volumeAttachments. -func (c *volumeAttachments) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *volumeAttachments) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -100,81 +101,84 @@ func (c *volumeAttachments) Watch(opts v1.ListOptions) (watch.Interface, error) Resource("volumeattachments"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a volumeAttachment and creates it. Returns the server's representation of the volumeAttachment, and an error, if there is any. -func (c *volumeAttachments) Create(volumeAttachment *v1alpha1.VolumeAttachment) (result *v1alpha1.VolumeAttachment, err error) { +func (c *volumeAttachments) Create(ctx context.Context, volumeAttachment *v1alpha1.VolumeAttachment, opts v1.CreateOptions) (result *v1alpha1.VolumeAttachment, err error) { result = &v1alpha1.VolumeAttachment{} err = c.client.Post(). Resource("volumeattachments"). + VersionedParams(&opts, scheme.ParameterCodec). Body(volumeAttachment). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a volumeAttachment and updates it. Returns the server's representation of the volumeAttachment, and an error, if there is any. -func (c *volumeAttachments) Update(volumeAttachment *v1alpha1.VolumeAttachment) (result *v1alpha1.VolumeAttachment, err error) { +func (c *volumeAttachments) Update(ctx context.Context, volumeAttachment *v1alpha1.VolumeAttachment, opts v1.UpdateOptions) (result *v1alpha1.VolumeAttachment, err error) { result = &v1alpha1.VolumeAttachment{} err = c.client.Put(). Resource("volumeattachments"). Name(volumeAttachment.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(volumeAttachment). - Do(). + Do(ctx). Into(result) return } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *volumeAttachments) UpdateStatus(volumeAttachment *v1alpha1.VolumeAttachment) (result *v1alpha1.VolumeAttachment, err error) { +func (c *volumeAttachments) UpdateStatus(ctx context.Context, volumeAttachment *v1alpha1.VolumeAttachment, opts v1.UpdateOptions) (result *v1alpha1.VolumeAttachment, err error) { result = &v1alpha1.VolumeAttachment{} err = c.client.Put(). Resource("volumeattachments"). Name(volumeAttachment.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(volumeAttachment). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the volumeAttachment and deletes it. Returns an error if one occurs. -func (c *volumeAttachments) Delete(name string, options *v1.DeleteOptions) error { +func (c *volumeAttachments) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). Resource("volumeattachments"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *volumeAttachments) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *volumeAttachments) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Resource("volumeattachments"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched volumeAttachment. -func (c *volumeAttachments) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.VolumeAttachment, err error) { +func (c *volumeAttachments) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.VolumeAttachment, err error) { result = &v1alpha1.VolumeAttachment{} err = c.client.Patch(pt). Resource("volumeattachments"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/k8s.io/client-go/kubernetes/typed/storage/v1beta1/csidriver.go b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1beta1/csidriver.go index 86cf9bf180..2ad2630420 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/storage/v1beta1/csidriver.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1beta1/csidriver.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" "time" v1beta1 "k8s.io/api/storage/v1beta1" @@ -37,14 +38,14 @@ type CSIDriversGetter interface { // CSIDriverInterface has methods to work with CSIDriver resources. type CSIDriverInterface interface { - Create(*v1beta1.CSIDriver) (*v1beta1.CSIDriver, error) - Update(*v1beta1.CSIDriver) (*v1beta1.CSIDriver, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*v1beta1.CSIDriver, error) - List(opts v1.ListOptions) (*v1beta1.CSIDriverList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.CSIDriver, err error) + Create(ctx context.Context, cSIDriver *v1beta1.CSIDriver, opts v1.CreateOptions) (*v1beta1.CSIDriver, error) + Update(ctx context.Context, cSIDriver *v1beta1.CSIDriver, opts v1.UpdateOptions) (*v1beta1.CSIDriver, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.CSIDriver, error) + List(ctx context.Context, opts v1.ListOptions) (*v1beta1.CSIDriverList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.CSIDriver, err error) CSIDriverExpansion } @@ -61,19 +62,19 @@ func newCSIDrivers(c *StorageV1beta1Client) *cSIDrivers { } // Get takes name of the cSIDriver, and returns the corresponding cSIDriver object, and an error if there is any. -func (c *cSIDrivers) Get(name string, options v1.GetOptions) (result *v1beta1.CSIDriver, err error) { +func (c *cSIDrivers) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.CSIDriver, err error) { result = &v1beta1.CSIDriver{} err = c.client.Get(). Resource("csidrivers"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of CSIDrivers that match those selectors. -func (c *cSIDrivers) List(opts v1.ListOptions) (result *v1beta1.CSIDriverList, err error) { +func (c *cSIDrivers) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.CSIDriverList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -83,13 +84,13 @@ func (c *cSIDrivers) List(opts v1.ListOptions) (result *v1beta1.CSIDriverList, e Resource("csidrivers"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested cSIDrivers. -func (c *cSIDrivers) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *cSIDrivers) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -99,66 +100,69 @@ func (c *cSIDrivers) Watch(opts v1.ListOptions) (watch.Interface, error) { Resource("csidrivers"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a cSIDriver and creates it. Returns the server's representation of the cSIDriver, and an error, if there is any. -func (c *cSIDrivers) Create(cSIDriver *v1beta1.CSIDriver) (result *v1beta1.CSIDriver, err error) { +func (c *cSIDrivers) Create(ctx context.Context, cSIDriver *v1beta1.CSIDriver, opts v1.CreateOptions) (result *v1beta1.CSIDriver, err error) { result = &v1beta1.CSIDriver{} err = c.client.Post(). Resource("csidrivers"). + VersionedParams(&opts, scheme.ParameterCodec). Body(cSIDriver). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a cSIDriver and updates it. Returns the server's representation of the cSIDriver, and an error, if there is any. -func (c *cSIDrivers) Update(cSIDriver *v1beta1.CSIDriver) (result *v1beta1.CSIDriver, err error) { +func (c *cSIDrivers) Update(ctx context.Context, cSIDriver *v1beta1.CSIDriver, opts v1.UpdateOptions) (result *v1beta1.CSIDriver, err error) { result = &v1beta1.CSIDriver{} err = c.client.Put(). Resource("csidrivers"). Name(cSIDriver.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(cSIDriver). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the cSIDriver and deletes it. Returns an error if one occurs. -func (c *cSIDrivers) Delete(name string, options *v1.DeleteOptions) error { +func (c *cSIDrivers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). Resource("csidrivers"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *cSIDrivers) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *cSIDrivers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Resource("csidrivers"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched cSIDriver. -func (c *cSIDrivers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.CSIDriver, err error) { +func (c *cSIDrivers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.CSIDriver, err error) { result = &v1beta1.CSIDriver{} err = c.client.Patch(pt). Resource("csidrivers"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/k8s.io/client-go/kubernetes/typed/storage/v1beta1/csinode.go b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1beta1/csinode.go index e5540c1287..babb89aba6 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/storage/v1beta1/csinode.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1beta1/csinode.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" "time" v1beta1 "k8s.io/api/storage/v1beta1" @@ -37,14 +38,14 @@ type CSINodesGetter interface { // CSINodeInterface has methods to work with CSINode resources. type CSINodeInterface interface { - Create(*v1beta1.CSINode) (*v1beta1.CSINode, error) - Update(*v1beta1.CSINode) (*v1beta1.CSINode, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*v1beta1.CSINode, error) - List(opts v1.ListOptions) (*v1beta1.CSINodeList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.CSINode, err error) + Create(ctx context.Context, cSINode *v1beta1.CSINode, opts v1.CreateOptions) (*v1beta1.CSINode, error) + Update(ctx context.Context, cSINode *v1beta1.CSINode, opts v1.UpdateOptions) (*v1beta1.CSINode, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.CSINode, error) + List(ctx context.Context, opts v1.ListOptions) (*v1beta1.CSINodeList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.CSINode, err error) CSINodeExpansion } @@ -61,19 +62,19 @@ func newCSINodes(c *StorageV1beta1Client) *cSINodes { } // Get takes name of the cSINode, and returns the corresponding cSINode object, and an error if there is any. -func (c *cSINodes) Get(name string, options v1.GetOptions) (result *v1beta1.CSINode, err error) { +func (c *cSINodes) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.CSINode, err error) { result = &v1beta1.CSINode{} err = c.client.Get(). Resource("csinodes"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of CSINodes that match those selectors. -func (c *cSINodes) List(opts v1.ListOptions) (result *v1beta1.CSINodeList, err error) { +func (c *cSINodes) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.CSINodeList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -83,13 +84,13 @@ func (c *cSINodes) List(opts v1.ListOptions) (result *v1beta1.CSINodeList, err e Resource("csinodes"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested cSINodes. -func (c *cSINodes) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *cSINodes) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -99,66 +100,69 @@ func (c *cSINodes) Watch(opts v1.ListOptions) (watch.Interface, error) { Resource("csinodes"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a cSINode and creates it. Returns the server's representation of the cSINode, and an error, if there is any. -func (c *cSINodes) Create(cSINode *v1beta1.CSINode) (result *v1beta1.CSINode, err error) { +func (c *cSINodes) Create(ctx context.Context, cSINode *v1beta1.CSINode, opts v1.CreateOptions) (result *v1beta1.CSINode, err error) { result = &v1beta1.CSINode{} err = c.client.Post(). Resource("csinodes"). + VersionedParams(&opts, scheme.ParameterCodec). Body(cSINode). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a cSINode and updates it. Returns the server's representation of the cSINode, and an error, if there is any. -func (c *cSINodes) Update(cSINode *v1beta1.CSINode) (result *v1beta1.CSINode, err error) { +func (c *cSINodes) Update(ctx context.Context, cSINode *v1beta1.CSINode, opts v1.UpdateOptions) (result *v1beta1.CSINode, err error) { result = &v1beta1.CSINode{} err = c.client.Put(). Resource("csinodes"). Name(cSINode.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(cSINode). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the cSINode and deletes it. Returns an error if one occurs. -func (c *cSINodes) Delete(name string, options *v1.DeleteOptions) error { +func (c *cSINodes) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). Resource("csinodes"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *cSINodes) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *cSINodes) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Resource("csinodes"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched cSINode. -func (c *cSINodes) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.CSINode, err error) { +func (c *cSINodes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.CSINode, err error) { result = &v1beta1.CSINode{} err = c.client.Patch(pt). Resource("csinodes"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/k8s.io/client-go/kubernetes/typed/storage/v1beta1/fake/fake_csidriver.go b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1beta1/fake/fake_csidriver.go index 2446316b2d..35b2449ee5 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/storage/v1beta1/fake/fake_csidriver.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1beta1/fake/fake_csidriver.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + v1beta1 "k8s.io/api/storage/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" @@ -38,7 +40,7 @@ var csidriversResource = schema.GroupVersionResource{Group: "storage.k8s.io", Ve var csidriversKind = schema.GroupVersionKind{Group: "storage.k8s.io", Version: "v1beta1", Kind: "CSIDriver"} // Get takes name of the cSIDriver, and returns the corresponding cSIDriver object, and an error if there is any. -func (c *FakeCSIDrivers) Get(name string, options v1.GetOptions) (result *v1beta1.CSIDriver, err error) { +func (c *FakeCSIDrivers) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.CSIDriver, err error) { obj, err := c.Fake. Invokes(testing.NewRootGetAction(csidriversResource, name), &v1beta1.CSIDriver{}) if obj == nil { @@ -48,7 +50,7 @@ func (c *FakeCSIDrivers) Get(name string, options v1.GetOptions) (result *v1beta } // List takes label and field selectors, and returns the list of CSIDrivers that match those selectors. -func (c *FakeCSIDrivers) List(opts v1.ListOptions) (result *v1beta1.CSIDriverList, err error) { +func (c *FakeCSIDrivers) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.CSIDriverList, err error) { obj, err := c.Fake. Invokes(testing.NewRootListAction(csidriversResource, csidriversKind, opts), &v1beta1.CSIDriverList{}) if obj == nil { @@ -69,13 +71,13 @@ func (c *FakeCSIDrivers) List(opts v1.ListOptions) (result *v1beta1.CSIDriverLis } // Watch returns a watch.Interface that watches the requested cSIDrivers. -func (c *FakeCSIDrivers) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeCSIDrivers) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewRootWatchAction(csidriversResource, opts)) } // Create takes the representation of a cSIDriver and creates it. Returns the server's representation of the cSIDriver, and an error, if there is any. -func (c *FakeCSIDrivers) Create(cSIDriver *v1beta1.CSIDriver) (result *v1beta1.CSIDriver, err error) { +func (c *FakeCSIDrivers) Create(ctx context.Context, cSIDriver *v1beta1.CSIDriver, opts v1.CreateOptions) (result *v1beta1.CSIDriver, err error) { obj, err := c.Fake. Invokes(testing.NewRootCreateAction(csidriversResource, cSIDriver), &v1beta1.CSIDriver{}) if obj == nil { @@ -85,7 +87,7 @@ func (c *FakeCSIDrivers) Create(cSIDriver *v1beta1.CSIDriver) (result *v1beta1.C } // Update takes the representation of a cSIDriver and updates it. Returns the server's representation of the cSIDriver, and an error, if there is any. -func (c *FakeCSIDrivers) Update(cSIDriver *v1beta1.CSIDriver) (result *v1beta1.CSIDriver, err error) { +func (c *FakeCSIDrivers) Update(ctx context.Context, cSIDriver *v1beta1.CSIDriver, opts v1.UpdateOptions) (result *v1beta1.CSIDriver, err error) { obj, err := c.Fake. Invokes(testing.NewRootUpdateAction(csidriversResource, cSIDriver), &v1beta1.CSIDriver{}) if obj == nil { @@ -95,22 +97,22 @@ func (c *FakeCSIDrivers) Update(cSIDriver *v1beta1.CSIDriver) (result *v1beta1.C } // Delete takes name of the cSIDriver and deletes it. Returns an error if one occurs. -func (c *FakeCSIDrivers) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeCSIDrivers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewRootDeleteAction(csidriversResource, name), &v1beta1.CSIDriver{}) return err } // DeleteCollection deletes a collection of objects. -func (c *FakeCSIDrivers) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewRootDeleteCollectionAction(csidriversResource, listOptions) +func (c *FakeCSIDrivers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(csidriversResource, listOpts) _, err := c.Fake.Invokes(action, &v1beta1.CSIDriverList{}) return err } // Patch applies the patch and returns the patched cSIDriver. -func (c *FakeCSIDrivers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.CSIDriver, err error) { +func (c *FakeCSIDrivers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.CSIDriver, err error) { obj, err := c.Fake. Invokes(testing.NewRootPatchSubresourceAction(csidriversResource, name, pt, data, subresources...), &v1beta1.CSIDriver{}) if obj == nil { diff --git a/vendor/k8s.io/client-go/kubernetes/typed/storage/v1beta1/fake/fake_csinode.go b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1beta1/fake/fake_csinode.go index 0050f4743d..81e5bc6d92 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/storage/v1beta1/fake/fake_csinode.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1beta1/fake/fake_csinode.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + v1beta1 "k8s.io/api/storage/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" @@ -38,7 +40,7 @@ var csinodesResource = schema.GroupVersionResource{Group: "storage.k8s.io", Vers var csinodesKind = schema.GroupVersionKind{Group: "storage.k8s.io", Version: "v1beta1", Kind: "CSINode"} // Get takes name of the cSINode, and returns the corresponding cSINode object, and an error if there is any. -func (c *FakeCSINodes) Get(name string, options v1.GetOptions) (result *v1beta1.CSINode, err error) { +func (c *FakeCSINodes) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.CSINode, err error) { obj, err := c.Fake. Invokes(testing.NewRootGetAction(csinodesResource, name), &v1beta1.CSINode{}) if obj == nil { @@ -48,7 +50,7 @@ func (c *FakeCSINodes) Get(name string, options v1.GetOptions) (result *v1beta1. } // List takes label and field selectors, and returns the list of CSINodes that match those selectors. -func (c *FakeCSINodes) List(opts v1.ListOptions) (result *v1beta1.CSINodeList, err error) { +func (c *FakeCSINodes) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.CSINodeList, err error) { obj, err := c.Fake. Invokes(testing.NewRootListAction(csinodesResource, csinodesKind, opts), &v1beta1.CSINodeList{}) if obj == nil { @@ -69,13 +71,13 @@ func (c *FakeCSINodes) List(opts v1.ListOptions) (result *v1beta1.CSINodeList, e } // Watch returns a watch.Interface that watches the requested cSINodes. -func (c *FakeCSINodes) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeCSINodes) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewRootWatchAction(csinodesResource, opts)) } // Create takes the representation of a cSINode and creates it. Returns the server's representation of the cSINode, and an error, if there is any. -func (c *FakeCSINodes) Create(cSINode *v1beta1.CSINode) (result *v1beta1.CSINode, err error) { +func (c *FakeCSINodes) Create(ctx context.Context, cSINode *v1beta1.CSINode, opts v1.CreateOptions) (result *v1beta1.CSINode, err error) { obj, err := c.Fake. Invokes(testing.NewRootCreateAction(csinodesResource, cSINode), &v1beta1.CSINode{}) if obj == nil { @@ -85,7 +87,7 @@ func (c *FakeCSINodes) Create(cSINode *v1beta1.CSINode) (result *v1beta1.CSINode } // Update takes the representation of a cSINode and updates it. Returns the server's representation of the cSINode, and an error, if there is any. -func (c *FakeCSINodes) Update(cSINode *v1beta1.CSINode) (result *v1beta1.CSINode, err error) { +func (c *FakeCSINodes) Update(ctx context.Context, cSINode *v1beta1.CSINode, opts v1.UpdateOptions) (result *v1beta1.CSINode, err error) { obj, err := c.Fake. Invokes(testing.NewRootUpdateAction(csinodesResource, cSINode), &v1beta1.CSINode{}) if obj == nil { @@ -95,22 +97,22 @@ func (c *FakeCSINodes) Update(cSINode *v1beta1.CSINode) (result *v1beta1.CSINode } // Delete takes name of the cSINode and deletes it. Returns an error if one occurs. -func (c *FakeCSINodes) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeCSINodes) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewRootDeleteAction(csinodesResource, name), &v1beta1.CSINode{}) return err } // DeleteCollection deletes a collection of objects. -func (c *FakeCSINodes) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewRootDeleteCollectionAction(csinodesResource, listOptions) +func (c *FakeCSINodes) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(csinodesResource, listOpts) _, err := c.Fake.Invokes(action, &v1beta1.CSINodeList{}) return err } // Patch applies the patch and returns the patched cSINode. -func (c *FakeCSINodes) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.CSINode, err error) { +func (c *FakeCSINodes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.CSINode, err error) { obj, err := c.Fake. Invokes(testing.NewRootPatchSubresourceAction(csinodesResource, name, pt, data, subresources...), &v1beta1.CSINode{}) if obj == nil { diff --git a/vendor/k8s.io/client-go/kubernetes/typed/storage/v1beta1/fake/fake_storageclass.go b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1beta1/fake/fake_storageclass.go index 9fc8ca991e..3b0a8688cb 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/storage/v1beta1/fake/fake_storageclass.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1beta1/fake/fake_storageclass.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + v1beta1 "k8s.io/api/storage/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" @@ -38,7 +40,7 @@ var storageclassesResource = schema.GroupVersionResource{Group: "storage.k8s.io" var storageclassesKind = schema.GroupVersionKind{Group: "storage.k8s.io", Version: "v1beta1", Kind: "StorageClass"} // Get takes name of the storageClass, and returns the corresponding storageClass object, and an error if there is any. -func (c *FakeStorageClasses) Get(name string, options v1.GetOptions) (result *v1beta1.StorageClass, err error) { +func (c *FakeStorageClasses) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.StorageClass, err error) { obj, err := c.Fake. Invokes(testing.NewRootGetAction(storageclassesResource, name), &v1beta1.StorageClass{}) if obj == nil { @@ -48,7 +50,7 @@ func (c *FakeStorageClasses) Get(name string, options v1.GetOptions) (result *v1 } // List takes label and field selectors, and returns the list of StorageClasses that match those selectors. -func (c *FakeStorageClasses) List(opts v1.ListOptions) (result *v1beta1.StorageClassList, err error) { +func (c *FakeStorageClasses) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.StorageClassList, err error) { obj, err := c.Fake. Invokes(testing.NewRootListAction(storageclassesResource, storageclassesKind, opts), &v1beta1.StorageClassList{}) if obj == nil { @@ -69,13 +71,13 @@ func (c *FakeStorageClasses) List(opts v1.ListOptions) (result *v1beta1.StorageC } // Watch returns a watch.Interface that watches the requested storageClasses. -func (c *FakeStorageClasses) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeStorageClasses) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewRootWatchAction(storageclassesResource, opts)) } // Create takes the representation of a storageClass and creates it. Returns the server's representation of the storageClass, and an error, if there is any. -func (c *FakeStorageClasses) Create(storageClass *v1beta1.StorageClass) (result *v1beta1.StorageClass, err error) { +func (c *FakeStorageClasses) Create(ctx context.Context, storageClass *v1beta1.StorageClass, opts v1.CreateOptions) (result *v1beta1.StorageClass, err error) { obj, err := c.Fake. Invokes(testing.NewRootCreateAction(storageclassesResource, storageClass), &v1beta1.StorageClass{}) if obj == nil { @@ -85,7 +87,7 @@ func (c *FakeStorageClasses) Create(storageClass *v1beta1.StorageClass) (result } // Update takes the representation of a storageClass and updates it. Returns the server's representation of the storageClass, and an error, if there is any. -func (c *FakeStorageClasses) Update(storageClass *v1beta1.StorageClass) (result *v1beta1.StorageClass, err error) { +func (c *FakeStorageClasses) Update(ctx context.Context, storageClass *v1beta1.StorageClass, opts v1.UpdateOptions) (result *v1beta1.StorageClass, err error) { obj, err := c.Fake. Invokes(testing.NewRootUpdateAction(storageclassesResource, storageClass), &v1beta1.StorageClass{}) if obj == nil { @@ -95,22 +97,22 @@ func (c *FakeStorageClasses) Update(storageClass *v1beta1.StorageClass) (result } // Delete takes name of the storageClass and deletes it. Returns an error if one occurs. -func (c *FakeStorageClasses) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeStorageClasses) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewRootDeleteAction(storageclassesResource, name), &v1beta1.StorageClass{}) return err } // DeleteCollection deletes a collection of objects. -func (c *FakeStorageClasses) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewRootDeleteCollectionAction(storageclassesResource, listOptions) +func (c *FakeStorageClasses) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(storageclassesResource, listOpts) _, err := c.Fake.Invokes(action, &v1beta1.StorageClassList{}) return err } // Patch applies the patch and returns the patched storageClass. -func (c *FakeStorageClasses) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.StorageClass, err error) { +func (c *FakeStorageClasses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.StorageClass, err error) { obj, err := c.Fake. Invokes(testing.NewRootPatchSubresourceAction(storageclassesResource, name, pt, data, subresources...), &v1beta1.StorageClass{}) if obj == nil { diff --git a/vendor/k8s.io/client-go/kubernetes/typed/storage/v1beta1/fake/fake_volumeattachment.go b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1beta1/fake/fake_volumeattachment.go index 043098f455..0bc91bf566 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/storage/v1beta1/fake/fake_volumeattachment.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1beta1/fake/fake_volumeattachment.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + v1beta1 "k8s.io/api/storage/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" @@ -38,7 +40,7 @@ var volumeattachmentsResource = schema.GroupVersionResource{Group: "storage.k8s. var volumeattachmentsKind = schema.GroupVersionKind{Group: "storage.k8s.io", Version: "v1beta1", Kind: "VolumeAttachment"} // Get takes name of the volumeAttachment, and returns the corresponding volumeAttachment object, and an error if there is any. -func (c *FakeVolumeAttachments) Get(name string, options v1.GetOptions) (result *v1beta1.VolumeAttachment, err error) { +func (c *FakeVolumeAttachments) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.VolumeAttachment, err error) { obj, err := c.Fake. Invokes(testing.NewRootGetAction(volumeattachmentsResource, name), &v1beta1.VolumeAttachment{}) if obj == nil { @@ -48,7 +50,7 @@ func (c *FakeVolumeAttachments) Get(name string, options v1.GetOptions) (result } // List takes label and field selectors, and returns the list of VolumeAttachments that match those selectors. -func (c *FakeVolumeAttachments) List(opts v1.ListOptions) (result *v1beta1.VolumeAttachmentList, err error) { +func (c *FakeVolumeAttachments) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.VolumeAttachmentList, err error) { obj, err := c.Fake. Invokes(testing.NewRootListAction(volumeattachmentsResource, volumeattachmentsKind, opts), &v1beta1.VolumeAttachmentList{}) if obj == nil { @@ -69,13 +71,13 @@ func (c *FakeVolumeAttachments) List(opts v1.ListOptions) (result *v1beta1.Volum } // Watch returns a watch.Interface that watches the requested volumeAttachments. -func (c *FakeVolumeAttachments) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeVolumeAttachments) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewRootWatchAction(volumeattachmentsResource, opts)) } // Create takes the representation of a volumeAttachment and creates it. Returns the server's representation of the volumeAttachment, and an error, if there is any. -func (c *FakeVolumeAttachments) Create(volumeAttachment *v1beta1.VolumeAttachment) (result *v1beta1.VolumeAttachment, err error) { +func (c *FakeVolumeAttachments) Create(ctx context.Context, volumeAttachment *v1beta1.VolumeAttachment, opts v1.CreateOptions) (result *v1beta1.VolumeAttachment, err error) { obj, err := c.Fake. Invokes(testing.NewRootCreateAction(volumeattachmentsResource, volumeAttachment), &v1beta1.VolumeAttachment{}) if obj == nil { @@ -85,7 +87,7 @@ func (c *FakeVolumeAttachments) Create(volumeAttachment *v1beta1.VolumeAttachmen } // Update takes the representation of a volumeAttachment and updates it. Returns the server's representation of the volumeAttachment, and an error, if there is any. -func (c *FakeVolumeAttachments) Update(volumeAttachment *v1beta1.VolumeAttachment) (result *v1beta1.VolumeAttachment, err error) { +func (c *FakeVolumeAttachments) Update(ctx context.Context, volumeAttachment *v1beta1.VolumeAttachment, opts v1.UpdateOptions) (result *v1beta1.VolumeAttachment, err error) { obj, err := c.Fake. Invokes(testing.NewRootUpdateAction(volumeattachmentsResource, volumeAttachment), &v1beta1.VolumeAttachment{}) if obj == nil { @@ -96,7 +98,7 @@ func (c *FakeVolumeAttachments) Update(volumeAttachment *v1beta1.VolumeAttachmen // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeVolumeAttachments) UpdateStatus(volumeAttachment *v1beta1.VolumeAttachment) (*v1beta1.VolumeAttachment, error) { +func (c *FakeVolumeAttachments) UpdateStatus(ctx context.Context, volumeAttachment *v1beta1.VolumeAttachment, opts v1.UpdateOptions) (*v1beta1.VolumeAttachment, error) { obj, err := c.Fake. Invokes(testing.NewRootUpdateSubresourceAction(volumeattachmentsResource, "status", volumeAttachment), &v1beta1.VolumeAttachment{}) if obj == nil { @@ -106,22 +108,22 @@ func (c *FakeVolumeAttachments) UpdateStatus(volumeAttachment *v1beta1.VolumeAtt } // Delete takes name of the volumeAttachment and deletes it. Returns an error if one occurs. -func (c *FakeVolumeAttachments) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeVolumeAttachments) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewRootDeleteAction(volumeattachmentsResource, name), &v1beta1.VolumeAttachment{}) return err } // DeleteCollection deletes a collection of objects. -func (c *FakeVolumeAttachments) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewRootDeleteCollectionAction(volumeattachmentsResource, listOptions) +func (c *FakeVolumeAttachments) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(volumeattachmentsResource, listOpts) _, err := c.Fake.Invokes(action, &v1beta1.VolumeAttachmentList{}) return err } // Patch applies the patch and returns the patched volumeAttachment. -func (c *FakeVolumeAttachments) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.VolumeAttachment, err error) { +func (c *FakeVolumeAttachments) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.VolumeAttachment, err error) { obj, err := c.Fake. Invokes(testing.NewRootPatchSubresourceAction(volumeattachmentsResource, name, pt, data, subresources...), &v1beta1.VolumeAttachment{}) if obj == nil { diff --git a/vendor/k8s.io/client-go/kubernetes/typed/storage/v1beta1/storageclass.go b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1beta1/storageclass.go index 8a8f389161..d6a8da98a3 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/storage/v1beta1/storageclass.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1beta1/storageclass.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" "time" v1beta1 "k8s.io/api/storage/v1beta1" @@ -37,14 +38,14 @@ type StorageClassesGetter interface { // StorageClassInterface has methods to work with StorageClass resources. type StorageClassInterface interface { - Create(*v1beta1.StorageClass) (*v1beta1.StorageClass, error) - Update(*v1beta1.StorageClass) (*v1beta1.StorageClass, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*v1beta1.StorageClass, error) - List(opts v1.ListOptions) (*v1beta1.StorageClassList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.StorageClass, err error) + Create(ctx context.Context, storageClass *v1beta1.StorageClass, opts v1.CreateOptions) (*v1beta1.StorageClass, error) + Update(ctx context.Context, storageClass *v1beta1.StorageClass, opts v1.UpdateOptions) (*v1beta1.StorageClass, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.StorageClass, error) + List(ctx context.Context, opts v1.ListOptions) (*v1beta1.StorageClassList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.StorageClass, err error) StorageClassExpansion } @@ -61,19 +62,19 @@ func newStorageClasses(c *StorageV1beta1Client) *storageClasses { } // Get takes name of the storageClass, and returns the corresponding storageClass object, and an error if there is any. -func (c *storageClasses) Get(name string, options v1.GetOptions) (result *v1beta1.StorageClass, err error) { +func (c *storageClasses) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.StorageClass, err error) { result = &v1beta1.StorageClass{} err = c.client.Get(). Resource("storageclasses"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of StorageClasses that match those selectors. -func (c *storageClasses) List(opts v1.ListOptions) (result *v1beta1.StorageClassList, err error) { +func (c *storageClasses) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.StorageClassList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -83,13 +84,13 @@ func (c *storageClasses) List(opts v1.ListOptions) (result *v1beta1.StorageClass Resource("storageclasses"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested storageClasses. -func (c *storageClasses) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *storageClasses) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -99,66 +100,69 @@ func (c *storageClasses) Watch(opts v1.ListOptions) (watch.Interface, error) { Resource("storageclasses"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a storageClass and creates it. Returns the server's representation of the storageClass, and an error, if there is any. -func (c *storageClasses) Create(storageClass *v1beta1.StorageClass) (result *v1beta1.StorageClass, err error) { +func (c *storageClasses) Create(ctx context.Context, storageClass *v1beta1.StorageClass, opts v1.CreateOptions) (result *v1beta1.StorageClass, err error) { result = &v1beta1.StorageClass{} err = c.client.Post(). Resource("storageclasses"). + VersionedParams(&opts, scheme.ParameterCodec). Body(storageClass). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a storageClass and updates it. Returns the server's representation of the storageClass, and an error, if there is any. -func (c *storageClasses) Update(storageClass *v1beta1.StorageClass) (result *v1beta1.StorageClass, err error) { +func (c *storageClasses) Update(ctx context.Context, storageClass *v1beta1.StorageClass, opts v1.UpdateOptions) (result *v1beta1.StorageClass, err error) { result = &v1beta1.StorageClass{} err = c.client.Put(). Resource("storageclasses"). Name(storageClass.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(storageClass). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the storageClass and deletes it. Returns an error if one occurs. -func (c *storageClasses) Delete(name string, options *v1.DeleteOptions) error { +func (c *storageClasses) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). Resource("storageclasses"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *storageClasses) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *storageClasses) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Resource("storageclasses"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched storageClass. -func (c *storageClasses) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.StorageClass, err error) { +func (c *storageClasses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.StorageClass, err error) { result = &v1beta1.StorageClass{} err = c.client.Patch(pt). Resource("storageclasses"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/k8s.io/client-go/kubernetes/typed/storage/v1beta1/volumeattachment.go b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1beta1/volumeattachment.go index d319407f27..951a5e71bf 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/storage/v1beta1/volumeattachment.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1beta1/volumeattachment.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" "time" v1beta1 "k8s.io/api/storage/v1beta1" @@ -37,15 +38,15 @@ type VolumeAttachmentsGetter interface { // VolumeAttachmentInterface has methods to work with VolumeAttachment resources. type VolumeAttachmentInterface interface { - Create(*v1beta1.VolumeAttachment) (*v1beta1.VolumeAttachment, error) - Update(*v1beta1.VolumeAttachment) (*v1beta1.VolumeAttachment, error) - UpdateStatus(*v1beta1.VolumeAttachment) (*v1beta1.VolumeAttachment, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*v1beta1.VolumeAttachment, error) - List(opts v1.ListOptions) (*v1beta1.VolumeAttachmentList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.VolumeAttachment, err error) + Create(ctx context.Context, volumeAttachment *v1beta1.VolumeAttachment, opts v1.CreateOptions) (*v1beta1.VolumeAttachment, error) + Update(ctx context.Context, volumeAttachment *v1beta1.VolumeAttachment, opts v1.UpdateOptions) (*v1beta1.VolumeAttachment, error) + UpdateStatus(ctx context.Context, volumeAttachment *v1beta1.VolumeAttachment, opts v1.UpdateOptions) (*v1beta1.VolumeAttachment, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.VolumeAttachment, error) + List(ctx context.Context, opts v1.ListOptions) (*v1beta1.VolumeAttachmentList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.VolumeAttachment, err error) VolumeAttachmentExpansion } @@ -62,19 +63,19 @@ func newVolumeAttachments(c *StorageV1beta1Client) *volumeAttachments { } // Get takes name of the volumeAttachment, and returns the corresponding volumeAttachment object, and an error if there is any. -func (c *volumeAttachments) Get(name string, options v1.GetOptions) (result *v1beta1.VolumeAttachment, err error) { +func (c *volumeAttachments) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.VolumeAttachment, err error) { result = &v1beta1.VolumeAttachment{} err = c.client.Get(). Resource("volumeattachments"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of VolumeAttachments that match those selectors. -func (c *volumeAttachments) List(opts v1.ListOptions) (result *v1beta1.VolumeAttachmentList, err error) { +func (c *volumeAttachments) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.VolumeAttachmentList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -84,13 +85,13 @@ func (c *volumeAttachments) List(opts v1.ListOptions) (result *v1beta1.VolumeAtt Resource("volumeattachments"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested volumeAttachments. -func (c *volumeAttachments) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *volumeAttachments) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -100,81 +101,84 @@ func (c *volumeAttachments) Watch(opts v1.ListOptions) (watch.Interface, error) Resource("volumeattachments"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a volumeAttachment and creates it. Returns the server's representation of the volumeAttachment, and an error, if there is any. -func (c *volumeAttachments) Create(volumeAttachment *v1beta1.VolumeAttachment) (result *v1beta1.VolumeAttachment, err error) { +func (c *volumeAttachments) Create(ctx context.Context, volumeAttachment *v1beta1.VolumeAttachment, opts v1.CreateOptions) (result *v1beta1.VolumeAttachment, err error) { result = &v1beta1.VolumeAttachment{} err = c.client.Post(). Resource("volumeattachments"). + VersionedParams(&opts, scheme.ParameterCodec). Body(volumeAttachment). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a volumeAttachment and updates it. Returns the server's representation of the volumeAttachment, and an error, if there is any. -func (c *volumeAttachments) Update(volumeAttachment *v1beta1.VolumeAttachment) (result *v1beta1.VolumeAttachment, err error) { +func (c *volumeAttachments) Update(ctx context.Context, volumeAttachment *v1beta1.VolumeAttachment, opts v1.UpdateOptions) (result *v1beta1.VolumeAttachment, err error) { result = &v1beta1.VolumeAttachment{} err = c.client.Put(). Resource("volumeattachments"). Name(volumeAttachment.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(volumeAttachment). - Do(). + Do(ctx). Into(result) return } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *volumeAttachments) UpdateStatus(volumeAttachment *v1beta1.VolumeAttachment) (result *v1beta1.VolumeAttachment, err error) { +func (c *volumeAttachments) UpdateStatus(ctx context.Context, volumeAttachment *v1beta1.VolumeAttachment, opts v1.UpdateOptions) (result *v1beta1.VolumeAttachment, err error) { result = &v1beta1.VolumeAttachment{} err = c.client.Put(). Resource("volumeattachments"). Name(volumeAttachment.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(volumeAttachment). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the volumeAttachment and deletes it. Returns an error if one occurs. -func (c *volumeAttachments) Delete(name string, options *v1.DeleteOptions) error { +func (c *volumeAttachments) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). Resource("volumeattachments"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *volumeAttachments) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *volumeAttachments) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Resource("volumeattachments"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched volumeAttachment. -func (c *volumeAttachments) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.VolumeAttachment, err error) { +func (c *volumeAttachments) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.VolumeAttachment, err error) { result = &v1beta1.VolumeAttachment{} err = c.client.Patch(pt). Resource("volumeattachments"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/k8s.io/client-go/listers/apps/v1/deployment_expansion.go b/vendor/k8s.io/client-go/listers/apps/v1/deployment_expansion.go deleted file mode 100644 index 7802eca5a5..0000000000 --- a/vendor/k8s.io/client-go/listers/apps/v1/deployment_expansion.go +++ /dev/null @@ -1,70 +0,0 @@ -/* -Copyright 2017 The Kubernetes 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. -*/ - -package v1 - -import ( - "fmt" - - apps "k8s.io/api/apps/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/labels" -) - -// DeploymentListerExpansion allows custom methods to be added to -// DeploymentLister. -type DeploymentListerExpansion interface { - GetDeploymentsForReplicaSet(rs *apps.ReplicaSet) ([]*apps.Deployment, error) -} - -// DeploymentNamespaceListerExpansion allows custom methods to be added to -// DeploymentNamespaceLister. -type DeploymentNamespaceListerExpansion interface{} - -// GetDeploymentsForReplicaSet returns a list of Deployments that potentially -// match a ReplicaSet. Only the one specified in the ReplicaSet's ControllerRef -// will actually manage it. -// Returns an error only if no matching Deployments are found. -func (s *deploymentLister) GetDeploymentsForReplicaSet(rs *apps.ReplicaSet) ([]*apps.Deployment, error) { - if len(rs.Labels) == 0 { - return nil, fmt.Errorf("no deployments found for ReplicaSet %v because it has no labels", rs.Name) - } - - // TODO: MODIFY THIS METHOD so that it checks for the podTemplateSpecHash label - dList, err := s.Deployments(rs.Namespace).List(labels.Everything()) - if err != nil { - return nil, err - } - - var deployments []*apps.Deployment - for _, d := range dList { - selector, err := metav1.LabelSelectorAsSelector(d.Spec.Selector) - if err != nil { - return nil, fmt.Errorf("invalid label selector: %v", err) - } - // If a deployment with a nil or empty selector creeps in, it should match nothing, not everything. - if selector.Empty() || !selector.Matches(labels.Set(rs.Labels)) { - continue - } - deployments = append(deployments, d) - } - - if len(deployments) == 0 { - return nil, fmt.Errorf("could not find deployments set for ReplicaSet %s in namespace %s with labels: %v", rs.Name, rs.Namespace, rs.Labels) - } - - return deployments, nil -} diff --git a/vendor/k8s.io/client-go/listers/apps/v1/expansion_generated.go b/vendor/k8s.io/client-go/listers/apps/v1/expansion_generated.go index 7f5815f79d..0c357589d0 100644 --- a/vendor/k8s.io/client-go/listers/apps/v1/expansion_generated.go +++ b/vendor/k8s.io/client-go/listers/apps/v1/expansion_generated.go @@ -25,3 +25,11 @@ type ControllerRevisionListerExpansion interface{} // ControllerRevisionNamespaceListerExpansion allows custom methods to be added to // ControllerRevisionNamespaceLister. type ControllerRevisionNamespaceListerExpansion interface{} + +// DeploymentListerExpansion allows custom methods to be added to +// DeploymentLister. +type DeploymentListerExpansion interface{} + +// DeploymentNamespaceListerExpansion allows custom methods to be added to +// DeploymentNamespaceLister. +type DeploymentNamespaceListerExpansion interface{} diff --git a/vendor/k8s.io/client-go/listers/apps/v1beta2/deployment_expansion.go b/vendor/k8s.io/client-go/listers/apps/v1beta2/deployment_expansion.go deleted file mode 100644 index 1537167a0d..0000000000 --- a/vendor/k8s.io/client-go/listers/apps/v1beta2/deployment_expansion.go +++ /dev/null @@ -1,70 +0,0 @@ -/* -Copyright 2017 The Kubernetes 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. -*/ - -package v1beta2 - -import ( - "fmt" - - apps "k8s.io/api/apps/v1beta2" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/labels" -) - -// DeploymentListerExpansion allows custom methods to be added to -// DeploymentLister. -type DeploymentListerExpansion interface { - GetDeploymentsForReplicaSet(rs *apps.ReplicaSet) ([]*apps.Deployment, error) -} - -// DeploymentNamespaceListerExpansion allows custom methods to be added to -// DeploymentNamespaceLister. -type DeploymentNamespaceListerExpansion interface{} - -// GetDeploymentsForReplicaSet returns a list of Deployments that potentially -// match a ReplicaSet. Only the one specified in the ReplicaSet's ControllerRef -// will actually manage it. -// Returns an error only if no matching Deployments are found. -func (s *deploymentLister) GetDeploymentsForReplicaSet(rs *apps.ReplicaSet) ([]*apps.Deployment, error) { - if len(rs.Labels) == 0 { - return nil, fmt.Errorf("no deployments found for ReplicaSet %v because it has no labels", rs.Name) - } - - // TODO: MODIFY THIS METHOD so that it checks for the podTemplateSpecHash label - dList, err := s.Deployments(rs.Namespace).List(labels.Everything()) - if err != nil { - return nil, err - } - - var deployments []*apps.Deployment - for _, d := range dList { - selector, err := metav1.LabelSelectorAsSelector(d.Spec.Selector) - if err != nil { - return nil, fmt.Errorf("invalid label selector: %v", err) - } - // If a deployment with a nil or empty selector creeps in, it should match nothing, not everything. - if selector.Empty() || !selector.Matches(labels.Set(rs.Labels)) { - continue - } - deployments = append(deployments, d) - } - - if len(deployments) == 0 { - return nil, fmt.Errorf("could not find deployments set for ReplicaSet %s in namespace %s with labels: %v", rs.Name, rs.Namespace, rs.Labels) - } - - return deployments, nil -} diff --git a/vendor/k8s.io/client-go/listers/apps/v1beta2/expansion_generated.go b/vendor/k8s.io/client-go/listers/apps/v1beta2/expansion_generated.go index bac6ccb9a7..b6d202118e 100644 --- a/vendor/k8s.io/client-go/listers/apps/v1beta2/expansion_generated.go +++ b/vendor/k8s.io/client-go/listers/apps/v1beta2/expansion_generated.go @@ -25,3 +25,11 @@ type ControllerRevisionListerExpansion interface{} // ControllerRevisionNamespaceListerExpansion allows custom methods to be added to // ControllerRevisionNamespaceLister. type ControllerRevisionNamespaceListerExpansion interface{} + +// DeploymentListerExpansion allows custom methods to be added to +// DeploymentLister. +type DeploymentListerExpansion interface{} + +// DeploymentNamespaceListerExpansion allows custom methods to be added to +// DeploymentNamespaceLister. +type DeploymentNamespaceListerExpansion interface{} diff --git a/vendor/k8s.io/client-go/listers/core/v1/expansion_generated.go b/vendor/k8s.io/client-go/listers/core/v1/expansion_generated.go index fac0221b88..2168a7f483 100644 --- a/vendor/k8s.io/client-go/listers/core/v1/expansion_generated.go +++ b/vendor/k8s.io/client-go/listers/core/v1/expansion_generated.go @@ -58,6 +58,10 @@ type LimitRangeNamespaceListerExpansion interface{} // NamespaceLister. type NamespaceListerExpansion interface{} +// NodeListerExpansion allows custom methods to be added to +// NodeLister. +type NodeListerExpansion interface{} + // PersistentVolumeListerExpansion allows custom methods to be added to // PersistentVolumeLister. type PersistentVolumeListerExpansion interface{} @@ -102,6 +106,14 @@ type SecretListerExpansion interface{} // SecretNamespaceLister. type SecretNamespaceListerExpansion interface{} +// ServiceListerExpansion allows custom methods to be added to +// ServiceLister. +type ServiceListerExpansion interface{} + +// ServiceNamespaceListerExpansion allows custom methods to be added to +// ServiceNamespaceLister. +type ServiceNamespaceListerExpansion interface{} + // ServiceAccountListerExpansion allows custom methods to be added to // ServiceAccountLister. type ServiceAccountListerExpansion interface{} diff --git a/vendor/k8s.io/client-go/listers/core/v1/node_expansion.go b/vendor/k8s.io/client-go/listers/core/v1/node_expansion.go deleted file mode 100644 index 9e5c55ab35..0000000000 --- a/vendor/k8s.io/client-go/listers/core/v1/node_expansion.go +++ /dev/null @@ -1,48 +0,0 @@ -/* -Copyright 2017 The Kubernetes 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. -*/ - -package v1 - -import ( - "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/labels" -) - -// NodeConditionPredicate is a function that indicates whether the given node's conditions meet -// some set of criteria defined by the function. -type NodeConditionPredicate func(node *v1.Node) bool - -// NodeListerExpansion allows custom methods to be added to -// NodeLister. -type NodeListerExpansion interface { - ListWithPredicate(predicate NodeConditionPredicate) ([]*v1.Node, error) -} - -func (l *nodeLister) ListWithPredicate(predicate NodeConditionPredicate) ([]*v1.Node, error) { - nodes, err := l.List(labels.Everything()) - if err != nil { - return nil, err - } - - var filtered []*v1.Node - for i := range nodes { - if predicate(nodes[i]) { - filtered = append(filtered, nodes[i]) - } - } - - return filtered, nil -} diff --git a/vendor/k8s.io/client-go/listers/core/v1/service_expansion.go b/vendor/k8s.io/client-go/listers/core/v1/service_expansion.go deleted file mode 100644 index e283d2509d..0000000000 --- a/vendor/k8s.io/client-go/listers/core/v1/service_expansion.go +++ /dev/null @@ -1,56 +0,0 @@ -/* -Copyright 2017 The Kubernetes 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. -*/ - -package v1 - -import ( - "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/labels" -) - -// ServiceListerExpansion allows custom methods to be added to -// ServiceLister. -type ServiceListerExpansion interface { - GetPodServices(pod *v1.Pod) ([]*v1.Service, error) -} - -// ServiceNamespaceListerExpansion allows custom methods to be added to -// ServiceNamespaceLister. -type ServiceNamespaceListerExpansion interface{} - -// TODO: Move this back to scheduler as a helper function that takes a Store, -// rather than a method of ServiceLister. -func (s *serviceLister) GetPodServices(pod *v1.Pod) ([]*v1.Service, error) { - allServices, err := s.Services(pod.Namespace).List(labels.Everything()) - if err != nil { - return nil, err - } - - var services []*v1.Service - for i := range allServices { - service := allServices[i] - if service.Spec.Selector == nil { - // services with nil selectors match nothing, not everything. - continue - } - selector := labels.Set(service.Spec.Selector).AsSelectorPreValidated() - if selector.Matches(labels.Set(pod.Labels)) { - services = append(services, service) - } - } - - return services, nil -} diff --git a/vendor/k8s.io/client-go/listers/extensions/v1beta1/deployment_expansion.go b/vendor/k8s.io/client-go/listers/extensions/v1beta1/deployment_expansion.go deleted file mode 100644 index b9a14167e0..0000000000 --- a/vendor/k8s.io/client-go/listers/extensions/v1beta1/deployment_expansion.go +++ /dev/null @@ -1,70 +0,0 @@ -/* -Copyright 2017 The Kubernetes 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. -*/ - -package v1beta1 - -import ( - "fmt" - - extensions "k8s.io/api/extensions/v1beta1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/labels" -) - -// DeploymentListerExpansion allows custom methods to be added to -// DeploymentLister. -type DeploymentListerExpansion interface { - GetDeploymentsForReplicaSet(rs *extensions.ReplicaSet) ([]*extensions.Deployment, error) -} - -// DeploymentNamespaceListerExpansion allows custom methods to be added to -// DeploymentNamespaceLister. -type DeploymentNamespaceListerExpansion interface{} - -// GetDeploymentsForReplicaSet returns a list of Deployments that potentially -// match a ReplicaSet. Only the one specified in the ReplicaSet's ControllerRef -// will actually manage it. -// Returns an error only if no matching Deployments are found. -func (s *deploymentLister) GetDeploymentsForReplicaSet(rs *extensions.ReplicaSet) ([]*extensions.Deployment, error) { - if len(rs.Labels) == 0 { - return nil, fmt.Errorf("no deployments found for ReplicaSet %v because it has no labels", rs.Name) - } - - // TODO: MODIFY THIS METHOD so that it checks for the podTemplateSpecHash label - dList, err := s.Deployments(rs.Namespace).List(labels.Everything()) - if err != nil { - return nil, err - } - - var deployments []*extensions.Deployment - for _, d := range dList { - selector, err := metav1.LabelSelectorAsSelector(d.Spec.Selector) - if err != nil { - return nil, fmt.Errorf("invalid label selector: %v", err) - } - // If a deployment with a nil or empty selector creeps in, it should match nothing, not everything. - if selector.Empty() || !selector.Matches(labels.Set(rs.Labels)) { - continue - } - deployments = append(deployments, d) - } - - if len(deployments) == 0 { - return nil, fmt.Errorf("could not find deployments set for ReplicaSet %s in namespace %s with labels: %v", rs.Name, rs.Namespace, rs.Labels) - } - - return deployments, nil -} diff --git a/vendor/k8s.io/client-go/listers/extensions/v1beta1/expansion_generated.go b/vendor/k8s.io/client-go/listers/extensions/v1beta1/expansion_generated.go index 6d55ae9b8b..5599219d9e 100644 --- a/vendor/k8s.io/client-go/listers/extensions/v1beta1/expansion_generated.go +++ b/vendor/k8s.io/client-go/listers/extensions/v1beta1/expansion_generated.go @@ -18,6 +18,14 @@ limitations under the License. package v1beta1 +// DeploymentListerExpansion allows custom methods to be added to +// DeploymentLister. +type DeploymentListerExpansion interface{} + +// DeploymentNamespaceListerExpansion allows custom methods to be added to +// DeploymentNamespaceLister. +type DeploymentNamespaceListerExpansion interface{} + // IngressListerExpansion allows custom methods to be added to // IngressLister. type IngressListerExpansion interface{} diff --git a/vendor/k8s.io/client-go/listers/networking/v1beta1/expansion_generated.go b/vendor/k8s.io/client-go/listers/networking/v1beta1/expansion_generated.go index df6da06ebb..d8c99c186e 100644 --- a/vendor/k8s.io/client-go/listers/networking/v1beta1/expansion_generated.go +++ b/vendor/k8s.io/client-go/listers/networking/v1beta1/expansion_generated.go @@ -25,3 +25,7 @@ type IngressListerExpansion interface{} // IngressNamespaceListerExpansion allows custom methods to be added to // IngressNamespaceLister. type IngressNamespaceListerExpansion interface{} + +// IngressClassListerExpansion allows custom methods to be added to +// IngressClassLister. +type IngressClassListerExpansion interface{} diff --git a/vendor/k8s.io/client-go/listers/networking/v1beta1/ingressclass.go b/vendor/k8s.io/client-go/listers/networking/v1beta1/ingressclass.go new file mode 100644 index 0000000000..1d39956acf --- /dev/null +++ b/vendor/k8s.io/client-go/listers/networking/v1beta1/ingressclass.go @@ -0,0 +1,65 @@ +/* +Copyright The Kubernetes 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 v1beta1 + +import ( + v1beta1 "k8s.io/api/networking/v1beta1" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/tools/cache" +) + +// IngressClassLister helps list IngressClasses. +type IngressClassLister interface { + // List lists all IngressClasses in the indexer. + List(selector labels.Selector) (ret []*v1beta1.IngressClass, err error) + // Get retrieves the IngressClass from the index for a given name. + Get(name string) (*v1beta1.IngressClass, error) + IngressClassListerExpansion +} + +// ingressClassLister implements the IngressClassLister interface. +type ingressClassLister struct { + indexer cache.Indexer +} + +// NewIngressClassLister returns a new IngressClassLister. +func NewIngressClassLister(indexer cache.Indexer) IngressClassLister { + return &ingressClassLister{indexer: indexer} +} + +// List lists all IngressClasses in the indexer. +func (s *ingressClassLister) List(selector labels.Selector) (ret []*v1beta1.IngressClass, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1beta1.IngressClass)) + }) + return ret, err +} + +// Get retrieves the IngressClass from the index for a given name. +func (s *ingressClassLister) Get(name string) (*v1beta1.IngressClass, error) { + obj, exists, err := s.indexer.GetByKey(name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(v1beta1.Resource("ingressclass"), name) + } + return obj.(*v1beta1.IngressClass), nil +} diff --git a/vendor/k8s.io/client-go/listers/storage/v1/csidriver.go b/vendor/k8s.io/client-go/listers/storage/v1/csidriver.go new file mode 100644 index 0000000000..68b2f8be1a --- /dev/null +++ b/vendor/k8s.io/client-go/listers/storage/v1/csidriver.go @@ -0,0 +1,65 @@ +/* +Copyright The Kubernetes 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 v1 + +import ( + v1 "k8s.io/api/storage/v1" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/tools/cache" +) + +// CSIDriverLister helps list CSIDrivers. +type CSIDriverLister interface { + // List lists all CSIDrivers in the indexer. + List(selector labels.Selector) (ret []*v1.CSIDriver, err error) + // Get retrieves the CSIDriver from the index for a given name. + Get(name string) (*v1.CSIDriver, error) + CSIDriverListerExpansion +} + +// cSIDriverLister implements the CSIDriverLister interface. +type cSIDriverLister struct { + indexer cache.Indexer +} + +// NewCSIDriverLister returns a new CSIDriverLister. +func NewCSIDriverLister(indexer cache.Indexer) CSIDriverLister { + return &cSIDriverLister{indexer: indexer} +} + +// List lists all CSIDrivers in the indexer. +func (s *cSIDriverLister) List(selector labels.Selector) (ret []*v1.CSIDriver, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1.CSIDriver)) + }) + return ret, err +} + +// Get retrieves the CSIDriver from the index for a given name. +func (s *cSIDriverLister) Get(name string) (*v1.CSIDriver, error) { + obj, exists, err := s.indexer.GetByKey(name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(v1.Resource("csidriver"), name) + } + return obj.(*v1.CSIDriver), nil +} diff --git a/vendor/k8s.io/client-go/listers/storage/v1/expansion_generated.go b/vendor/k8s.io/client-go/listers/storage/v1/expansion_generated.go index 41efa3245a..172f835f71 100644 --- a/vendor/k8s.io/client-go/listers/storage/v1/expansion_generated.go +++ b/vendor/k8s.io/client-go/listers/storage/v1/expansion_generated.go @@ -18,6 +18,10 @@ limitations under the License. package v1 +// CSIDriverListerExpansion allows custom methods to be added to +// CSIDriverLister. +type CSIDriverListerExpansion interface{} + // CSINodeListerExpansion allows custom methods to be added to // CSINodeLister. type CSINodeListerExpansion interface{} diff --git a/vendor/k8s.io/client-go/plugin/pkg/client/auth/exec/exec.go b/vendor/k8s.io/client-go/plugin/pkg/client/auth/exec/exec.go index 741729bb5d..71ed045acd 100644 --- a/vendor/k8s.io/client-go/plugin/pkg/client/auth/exec/exec.go +++ b/vendor/k8s.io/client-go/plugin/pkg/client/auth/exec/exec.go @@ -20,6 +20,7 @@ import ( "bytes" "context" "crypto/tls" + "crypto/x509" "errors" "fmt" "io" @@ -42,6 +43,7 @@ import ( "k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1" "k8s.io/client-go/pkg/apis/clientauthentication/v1beta1" "k8s.io/client-go/tools/clientcmd/api" + "k8s.io/client-go/tools/metrics" "k8s.io/client-go/transport" "k8s.io/client-go/util/connrotation" "k8s.io/klog" @@ -260,6 +262,7 @@ func (a *Authenticator) cert() (*tls.Certificate, error) { func (a *Authenticator) getCreds() (*credentials, error) { a.mu.Lock() defer a.mu.Unlock() + if a.cachedCreds != nil && !a.credsExpired() { return a.cachedCreds, nil } @@ -267,6 +270,7 @@ func (a *Authenticator) getCreds() (*credentials, error) { if err := a.refreshCredsLocked(nil); err != nil { return nil, err } + return a.cachedCreds, nil } @@ -355,6 +359,17 @@ func (a *Authenticator) refreshCredsLocked(r *clientauthentication.Response) err if err != nil { return fmt.Errorf("failed parsing client key/certificate: %v", err) } + + // Leaf is initialized to be nil: + // https://golang.org/pkg/crypto/tls/#X509KeyPair + // Leaf certificate is the first certificate: + // https://golang.org/pkg/crypto/tls/#Certificate + // Populating leaf is useful for quickly accessing the underlying x509 + // certificate values. + cert.Leaf, err = x509.ParseCertificate(cert.Certificate[0]) + if err != nil { + return fmt.Errorf("failed parsing client leaf certificate: %v", err) + } newCreds.cert = &cert } @@ -362,10 +377,20 @@ func (a *Authenticator) refreshCredsLocked(r *clientauthentication.Response) err a.cachedCreds = newCreds // Only close all connections when TLS cert rotates. Token rotation doesn't // need the extra noise. - if len(a.onRotateList) > 0 && oldCreds != nil && !reflect.DeepEqual(oldCreds.cert, a.cachedCreds.cert) { + if oldCreds != nil && !reflect.DeepEqual(oldCreds.cert, a.cachedCreds.cert) { + // Can be nil if the exec auth plugin only returned token auth. + if oldCreds.cert != nil && oldCreds.cert.Leaf != nil { + metrics.ClientCertRotationAge.Observe(time.Now().Sub(oldCreds.cert.Leaf.NotBefore)) + } for _, onRotate := range a.onRotateList { onRotate() } } + + expiry := time.Time{} + if a.cachedCreds.cert != nil && a.cachedCreds.cert.Leaf != nil { + expiry = a.cachedCreds.cert.Leaf.NotAfter + } + expirationMetrics.set(a, expiry) return nil } diff --git a/vendor/k8s.io/client-go/plugin/pkg/client/auth/exec/metrics.go b/vendor/k8s.io/client-go/plugin/pkg/client/auth/exec/metrics.go new file mode 100644 index 0000000000..caf0cca3e4 --- /dev/null +++ b/vendor/k8s.io/client-go/plugin/pkg/client/auth/exec/metrics.go @@ -0,0 +1,60 @@ +/* +Copyright 2018 The Kubernetes 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. +*/ + +package exec + +import ( + "sync" + "time" + + "k8s.io/client-go/tools/metrics" +) + +type certificateExpirationTracker struct { + mu sync.RWMutex + m map[*Authenticator]time.Time + metricSet func(*time.Time) +} + +var expirationMetrics = &certificateExpirationTracker{ + m: map[*Authenticator]time.Time{}, + metricSet: func(e *time.Time) { + metrics.ClientCertExpiry.Set(e) + }, +} + +// set stores the given expiration time and updates the updates the certificate +// expiry metric to the earliest expiration time. +func (c *certificateExpirationTracker) set(a *Authenticator, t time.Time) { + c.mu.Lock() + defer c.mu.Unlock() + c.m[a] = t + + earliest := time.Time{} + for _, t := range c.m { + if t.IsZero() { + continue + } + if earliest.IsZero() || earliest.After(t) { + earliest = t + } + } + if earliest.IsZero() { + c.metricSet(nil) + } else { + c.metricSet(&earliest) + } +} diff --git a/vendor/k8s.io/client-go/plugin/pkg/client/auth/oidc/oidc.go b/vendor/k8s.io/client-go/plugin/pkg/client/auth/oidc/oidc.go index 1383a97c62..9402120155 100644 --- a/vendor/k8s.io/client-go/plugin/pkg/client/auth/oidc/oidc.go +++ b/vendor/k8s.io/client-go/plugin/pkg/client/auth/oidc/oidc.go @@ -76,24 +76,25 @@ func newClientCache() *clientCache { } type cacheKey struct { + clusterAddress string // Canonical issuer URL string of the provider. issuerURL string clientID string } -func (c *clientCache) getClient(issuer, clientID string) (*oidcAuthProvider, bool) { +func (c *clientCache) getClient(clusterAddress, issuer, clientID string) (*oidcAuthProvider, bool) { c.mu.RLock() defer c.mu.RUnlock() - client, ok := c.cache[cacheKey{issuer, clientID}] + client, ok := c.cache[cacheKey{clusterAddress: clusterAddress, issuerURL: issuer, clientID: clientID}] return client, ok } // setClient attempts to put the client in the cache but may return any clients // with the same keys set before. This is so there's only ever one client for a provider. -func (c *clientCache) setClient(issuer, clientID string, client *oidcAuthProvider) *oidcAuthProvider { +func (c *clientCache) setClient(clusterAddress, issuer, clientID string, client *oidcAuthProvider) *oidcAuthProvider { c.mu.Lock() defer c.mu.Unlock() - key := cacheKey{issuer, clientID} + key := cacheKey{clusterAddress: clusterAddress, issuerURL: issuer, clientID: clientID} // If another client has already initialized a client for the given provider we want // to use that client instead of the one we're trying to set. This is so all transports @@ -107,7 +108,7 @@ func (c *clientCache) setClient(issuer, clientID string, client *oidcAuthProvide return client } -func newOIDCAuthProvider(_ string, cfg map[string]string, persister restclient.AuthProviderConfigPersister) (restclient.AuthProvider, error) { +func newOIDCAuthProvider(clusterAddress string, cfg map[string]string, persister restclient.AuthProviderConfigPersister) (restclient.AuthProvider, error) { issuer := cfg[cfgIssuerUrl] if issuer == "" { return nil, fmt.Errorf("Must provide %s", cfgIssuerUrl) @@ -119,7 +120,7 @@ func newOIDCAuthProvider(_ string, cfg map[string]string, persister restclient.A } // Check cache for existing provider. - if provider, ok := cache.getClient(issuer, clientID); ok { + if provider, ok := cache.getClient(clusterAddress, issuer, clientID); ok { return provider, nil } @@ -157,7 +158,7 @@ func newOIDCAuthProvider(_ string, cfg map[string]string, persister restclient.A persister: persister, } - return cache.setClient(issuer, clientID, provider), nil + return cache.setClient(clusterAddress, issuer, clientID, provider), nil } type oidcAuthProvider struct { diff --git a/vendor/k8s.io/client-go/rest/request.go b/vendor/k8s.io/client-go/rest/request.go index ca582736be..c5bc6a8981 100644 --- a/vendor/k8s.io/client-go/rest/request.go +++ b/vendor/k8s.io/client-go/rest/request.go @@ -30,6 +30,7 @@ import ( "reflect" "strconv" "strings" + "sync" "time" "golang.org/x/net/http2" @@ -38,6 +39,7 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/runtime/serializer/streaming" + utilclock "k8s.io/apimachinery/pkg/util/clock" "k8s.io/apimachinery/pkg/util/net" "k8s.io/apimachinery/pkg/watch" restclientwatch "k8s.io/client-go/rest/watch" @@ -51,6 +53,9 @@ var ( // throttled (via the provided rateLimiter) for more than longThrottleLatency will // be logged. longThrottleLatency = 50 * time.Millisecond + + // extraLongThrottleLatency defines the threshold for logging requests at log level 2. + extraLongThrottleLatency = 1 * time.Second ) // HTTPClient is an interface for testing a request object. @@ -61,8 +66,8 @@ type HTTPClient interface { // ResponseWrapper is an interface for getting a response. // The response may be either accessed as a raw data (the whole output is put into memory) or as a stream. type ResponseWrapper interface { - DoRaw() ([]byte, error) - Stream() (io.ReadCloser, error) + DoRaw(context.Context) ([]byte, error) + Stream(context.Context) (io.ReadCloser, error) } // RequestConstructionError is returned when there's an error assembling a request. @@ -104,9 +109,6 @@ type Request struct { // output err error body io.Reader - - // This is only used for per-request timeouts, deadlines, and cancellations. - ctx context.Context } // NewRequest creates a new request helper object for accessing runtime.Objects on a server. @@ -438,13 +440,6 @@ func (r *Request) Body(obj interface{}) *Request { return r } -// Context adds a context to the request. Contexts are only used for -// timeouts, deadlines, and cancellations. -func (r *Request) Context(ctx context.Context) *Request { - r.ctx = ctx - return r -} - // URL returns the current working URL. func (r *Request) URL() *url.URL { p := r.pathPrefix @@ -548,29 +543,88 @@ func (r Request) finalURLTemplate() url.URL { return *url } -func (r *Request) tryThrottle() error { +func (r *Request) tryThrottle(ctx context.Context) error { if r.rateLimiter == nil { return nil } now := time.Now() - var err error - if r.ctx != nil { - err = r.rateLimiter.Wait(r.ctx) - } else { - r.rateLimiter.Accept() - } - if latency := time.Since(now); latency > longThrottleLatency { - klog.V(4).Infof("Throttling request took %v, request: %s:%s", latency, r.verb, r.URL().String()) + err := r.rateLimiter.Wait(ctx) + + latency := time.Since(now) + if latency > longThrottleLatency { + klog.V(3).Infof("Throttling request took %v, request: %s:%s", latency, r.verb, r.URL().String()) + } + if latency > extraLongThrottleLatency { + // If the rate limiter latency is very high, the log message should be printed at a higher log level, + // but we use a throttled logger to prevent spamming. + globalThrottledLogger.Infof("Throttling request took %v, request: %s:%s", latency, r.verb, r.URL().String()) } + metrics.RateLimiterLatency.Observe(r.verb, r.finalURLTemplate(), latency) return err } +type throttleSettings struct { + logLevel klog.Level + minLogInterval time.Duration + + lastLogTime time.Time + lock sync.RWMutex +} + +type throttledLogger struct { + clock utilclock.PassiveClock + settings []*throttleSettings +} + +var globalThrottledLogger = &throttledLogger{ + clock: utilclock.RealClock{}, + settings: []*throttleSettings{ + { + logLevel: 2, + minLogInterval: 1 * time.Second, + }, { + logLevel: 0, + minLogInterval: 10 * time.Second, + }, + }, +} + +func (b *throttledLogger) attemptToLog() (klog.Level, bool) { + for _, setting := range b.settings { + if bool(klog.V(setting.logLevel)) { + // Return early without write locking if possible. + if func() bool { + setting.lock.RLock() + defer setting.lock.RUnlock() + return b.clock.Since(setting.lastLogTime) >= setting.minLogInterval + }() { + setting.lock.Lock() + defer setting.lock.Unlock() + if b.clock.Since(setting.lastLogTime) >= setting.minLogInterval { + setting.lastLogTime = b.clock.Now() + return setting.logLevel, true + } + } + return -1, false + } + } + return -1, false +} + +// Infof will write a log message at each logLevel specified by the reciever's throttleSettings +// as long as it hasn't written a log message more recently than minLogInterval. +func (b *throttledLogger) Infof(message string, args ...interface{}) { + if logLevel, ok := b.attemptToLog(); ok { + klog.V(logLevel).Infof(message, args...) + } +} + // Watch attempts to begin watching the requested location. // Returns a watch.Interface, or an error. -func (r *Request) Watch() (watch.Interface, error) { +func (r *Request) Watch(ctx context.Context) (watch.Interface, error) { // We specifically don't want to rate limit watches, so we // don't use r.rateLimiter here. if r.err != nil { @@ -582,9 +636,7 @@ func (r *Request) Watch() (watch.Interface, error) { if err != nil { return nil, err } - if r.ctx != nil { - req = req.WithContext(r.ctx) - } + req = req.WithContext(ctx) req.Header = r.headers client := r.c.Client if client == nil { @@ -659,12 +711,12 @@ func updateURLMetrics(req *Request, resp *http.Response, err error) { // Returns io.ReadCloser which could be used for streaming of the response, or an error // Any non-2xx http status code causes an error. If we get a non-2xx code, we try to convert the body into an APIStatus object. // If we can, we return that as an error. Otherwise, we create an error that lists the http status and the content of the response. -func (r *Request) Stream() (io.ReadCloser, error) { +func (r *Request) Stream(ctx context.Context) (io.ReadCloser, error) { if r.err != nil { return nil, r.err } - if err := r.tryThrottle(); err != nil { + if err := r.tryThrottle(ctx); err != nil { return nil, err } @@ -676,9 +728,7 @@ func (r *Request) Stream() (io.ReadCloser, error) { if r.body != nil { req.Body = ioutil.NopCloser(r.body) } - if r.ctx != nil { - req = req.WithContext(r.ctx) - } + req = req.WithContext(ctx) req.Header = r.headers client := r.c.Client if client == nil { @@ -746,7 +796,7 @@ func (r *Request) requestPreflightCheck() error { // received. It handles retry behavior and up front validation of requests. It will invoke // fn at most once. It will return an error if a problem occurred prior to connecting to the // server - the provided function is responsible for handling server errors. -func (r *Request) request(fn func(*http.Request, *http.Response)) error { +func (r *Request) request(ctx context.Context, fn func(*http.Request, *http.Response)) error { //Metrics for total request latency start := time.Now() defer func() { @@ -767,26 +817,30 @@ func (r *Request) request(fn func(*http.Request, *http.Response)) error { client = http.DefaultClient } + // Throttle the first try before setting up the timeout configured on the + // client. We don't want a throttled client to return timeouts to callers + // before it makes a single request. + if err := r.tryThrottle(ctx); err != nil { + return err + } + + if r.timeout > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, r.timeout) + defer cancel() + } + // Right now we make about ten retry attempts if we get a Retry-After response. maxRetries := 10 retries := 0 for { + url := r.URL().String() req, err := http.NewRequest(r.verb, url, r.body) if err != nil { return err } - if r.timeout > 0 { - if r.ctx == nil { - r.ctx = context.Background() - } - var cancelFn context.CancelFunc - r.ctx, cancelFn = context.WithTimeout(r.ctx, r.timeout) - defer cancelFn() - } - if r.ctx != nil { - req = req.WithContext(r.ctx) - } + req = req.WithContext(ctx) req.Header = r.headers r.backoff.Sleep(r.backoff.CalculateBackoff(r.URL())) @@ -794,7 +848,7 @@ func (r *Request) request(fn func(*http.Request, *http.Response)) error { // We are retrying the request that we already send to apiserver // at least once before. // This request should also be throttled with the client-internal rate limiter. - if err := r.tryThrottle(); err != nil { + if err := r.tryThrottle(ctx); err != nil { return err } } @@ -806,19 +860,24 @@ func (r *Request) request(fn func(*http.Request, *http.Response)) error { r.backoff.UpdateBackoff(r.URL(), err, resp.StatusCode) } if err != nil { - // "Connection reset by peer" is usually a transient error. + // "Connection reset by peer" or "apiserver is shutting down" are usually a transient errors. // Thus in case of "GET" operations, we simply retry it. // We are not automatically retrying "write" operations, as // they are not idempotent. - if !net.IsConnectionReset(err) || r.verb != "GET" { + if r.verb != "GET" { return err } - // For the purpose of retry, we set the artificial "retry-after" response. - // TODO: Should we clean the original response if it exists? - resp = &http.Response{ - StatusCode: http.StatusInternalServerError, - Header: http.Header{"Retry-After": []string{"1"}}, - Body: ioutil.NopCloser(bytes.NewReader([]byte{})), + // For connection errors and apiserver shutdown errors retry. + if net.IsConnectionReset(err) || net.IsProbableEOF(err) { + // For the purpose of retry, we set the artificial "retry-after" response. + // TODO: Should we clean the original response if it exists? + resp = &http.Response{ + StatusCode: http.StatusInternalServerError, + Header: http.Header{"Retry-After": []string{"1"}}, + Body: ioutil.NopCloser(bytes.NewReader([]byte{})), + } + } else { + return err } } @@ -864,13 +923,9 @@ func (r *Request) request(fn func(*http.Request, *http.Response)) error { // Error type: // * If the server responds with a status: *errors.StatusError or *errors.UnexpectedObjectError // * http.Client.Do errors are returned directly. -func (r *Request) Do() Result { - if err := r.tryThrottle(); err != nil { - return Result{err: err} - } - +func (r *Request) Do(ctx context.Context) Result { var result Result - err := r.request(func(req *http.Request, resp *http.Response) { + err := r.request(ctx, func(req *http.Request, resp *http.Response) { result = r.transformResponse(resp, req) }) if err != nil { @@ -880,13 +935,9 @@ func (r *Request) Do() Result { } // DoRaw executes the request but does not process the response body. -func (r *Request) DoRaw() ([]byte, error) { - if err := r.tryThrottle(); err != nil { - return nil, err - } - +func (r *Request) DoRaw(ctx context.Context) ([]byte, error) { var result Result - err := r.request(func(req *http.Request, resp *http.Response) { + err := r.request(ctx, func(req *http.Request, resp *http.Response) { result.body, result.err = ioutil.ReadAll(resp.Body) glogBody("Response Body", result.body) if resp.StatusCode < http.StatusOK || resp.StatusCode > http.StatusPartialContent { diff --git a/vendor/k8s.io/client-go/testing/actions.go b/vendor/k8s.io/client-go/testing/actions.go index f56b34ee87..b6b2c1f222 100644 --- a/vendor/k8s.io/client-go/testing/actions.go +++ b/vendor/k8s.io/client-go/testing/actions.go @@ -439,8 +439,18 @@ func (a ActionImpl) GetSubresource() string { return a.Subresource } func (a ActionImpl) Matches(verb, resource string) bool { + // Stay backwards compatible. + if !strings.Contains(resource, "/") { + return strings.EqualFold(verb, a.Verb) && + strings.EqualFold(resource, a.Resource.Resource) + } + + parts := strings.SplitN(resource, "/", 2) + topresource, subresource := parts[0], parts[1] + return strings.EqualFold(verb, a.Verb) && - strings.EqualFold(resource, a.Resource.Resource) + strings.EqualFold(topresource, a.Resource.Resource) && + strings.EqualFold(subresource, a.Subresource) } func (a ActionImpl) DeepCopy() Action { ret := a diff --git a/vendor/k8s.io/client-go/tools/cache/controller.go b/vendor/k8s.io/client-go/tools/cache/controller.go index 27a1c52cdf..5d58211939 100644 --- a/vendor/k8s.io/client-go/tools/cache/controller.go +++ b/vendor/k8s.io/client-go/tools/cache/controller.go @@ -26,7 +26,16 @@ import ( "k8s.io/apimachinery/pkg/util/wait" ) -// Config contains all the settings for a Controller. +// This file implements a low-level controller that is used in +// sharedIndexInformer, which is an implementation of +// SharedIndexInformer. Such informers, in turn, are key components +// in the high level controllers that form the backbone of the +// Kubernetes control plane. Look at those for examples, or the +// example in +// https://github.com/kubernetes/client-go/tree/master/examples/workqueue +// . + +// Config contains all the settings for one of these low-level controllers. type Config struct { // The queue for your objects - has to be a DeltaFIFO due to // assumptions in the implementation. Your Process() function @@ -36,30 +45,29 @@ type Config struct { // Something that can list and watch your objects. ListerWatcher - // Something that can process your objects. + // Something that can process a popped Deltas. Process ProcessFunc - // The type of your objects. + // ObjectType is an example object of the type this controller is + // expected to handle. Only the type needs to be right, except + // that when that is `unstructured.Unstructured` the object's + // `"apiVersion"` and `"kind"` must also be right. ObjectType runtime.Object - // Reprocess everything at least this often. - // Note that if it takes longer for you to clear the queue than this - // period, you will end up processing items in the order determined - // by FIFO.Replace(). Currently, this is random. If this is a - // problem, we can change that replacement policy to append new - // things to the end of the queue instead of replacing the entire - // queue. + // FullResyncPeriod is the period at which ShouldResync is considered. FullResyncPeriod time.Duration - // ShouldResync, if specified, is invoked when the controller's reflector determines the next - // periodic sync should occur. If this returns true, it means the reflector should proceed with - // the resync. + // ShouldResync is periodically used by the reflector to determine + // whether to Resync the Queue. If ShouldResync is `nil` or + // returns true, it means the reflector should proceed with the + // resync. ShouldResync ShouldResyncFunc // If true, when Process() returns an error, re-enqueue the object. // TODO: add interface to let you inject a delay/backoff or drop // the object completely if desired. Pass the object in - // question to this interface as a parameter. + // question to this interface as a parameter. This is probably moot + // now that this functionality appears at a higher level. RetryOnError bool } @@ -71,7 +79,7 @@ type ShouldResyncFunc func() bool // ProcessFunc processes a single object. type ProcessFunc func(obj interface{}) error -// Controller is a generic controller framework. +// `*controller` implements Controller type controller struct { config Config reflector *Reflector @@ -79,10 +87,22 @@ type controller struct { clock clock.Clock } -// Controller is a generic controller framework. +// Controller is a low-level controller that is parameterized by a +// Config and used in sharedIndexInformer. type Controller interface { + // Run does two things. One is to construct and run a Reflector + // to pump objects/notifications from the Config's ListerWatcher + // to the Config's Queue and possibly invoke the occasional Resync + // on that Queue. The other is to repeatedly Pop from the Queue + // and process with the Config's ProcessFunc. Both of these + // continue until `stopCh` is closed. Run(stopCh <-chan struct{}) + + // HasSynced delegates to the Config's Queue HasSynced() bool + + // LastSyncResourceVersion delegates to the Reflector when there + // is one, otherwise returns the empty string LastSyncResourceVersion() string } @@ -95,7 +115,7 @@ func New(c *Config) Controller { return ctlr } -// Run begins processing items, and will continue until a value is sent down stopCh. +// Run begins processing items, and will continue until a value is sent down stopCh or it is closed. // It's an error to call Run more than once. // Run blocks; call via go. func (c *controller) Run(stopCh <-chan struct{}) { @@ -344,7 +364,10 @@ func newInformer( // This will hold incoming changes. Note how we pass clientState in as a // KeyLister, that way resync operations will result in the correct set // of update/delete deltas. - fifo := NewDeltaFIFO(MetaNamespaceKeyFunc, clientState) + fifo := NewDeltaFIFOWithOptions(DeltaFIFOOptions{ + KnownObjects: clientState, + EmitDeltaTypeReplaced: true, + }) cfg := &Config{ Queue: fifo, @@ -357,7 +380,7 @@ func newInformer( // from oldest to newest for _, d := range obj.(Deltas) { switch d.Type { - case Sync, Added, Updated: + case Sync, Replaced, Added, Updated: if old, exists, err := clientState.Get(d.Object); err == nil && exists { if err := clientState.Update(d.Object); err != nil { return err diff --git a/vendor/k8s.io/client-go/tools/cache/delta_fifo.go b/vendor/k8s.io/client-go/tools/cache/delta_fifo.go index 55ecdcdf77..40b6022c09 100644 --- a/vendor/k8s.io/client-go/tools/cache/delta_fifo.go +++ b/vendor/k8s.io/client-go/tools/cache/delta_fifo.go @@ -26,15 +26,16 @@ import ( "k8s.io/klog" ) -// NewDeltaFIFO returns a Store which can be used process changes to items. +// NewDeltaFIFO returns a Queue which can be used to process changes to items. // -// keyFunc is used to figure out what key an object should have. (It's -// exposed in the returned DeltaFIFO's KeyOf() method, with bonus features.) +// keyFunc is used to figure out what key an object should have. (It is +// exposed in the returned DeltaFIFO's KeyOf() method, with additional handling +// around deleted objects and queue state). +// +// 'knownObjects' may be supplied to modify the behavior of Delete, +// Replace, and Resync. It may be nil if you do not need those +// modifications. // -// 'keyLister' is expected to return a list of keys that the consumer of -// this queue "knows about". It is used to decide which items are missing -// when Replace() is called; 'Deleted' deltas are produced for these items. -// It may be nil if you don't need to detect all deletions. // TODO: consider merging keyLister with this object, tracking a list of // "known" keys when Pop() is called. Have to think about how that // affects error retrying. @@ -56,18 +57,79 @@ import ( // and internal tests. // // Also see the comment on DeltaFIFO. +// +// Warning: This constructs a DeltaFIFO that does not differentiate between +// events caused by a call to Replace (e.g., from a relist, which may +// contain object updates), and synthetic events caused by a periodic resync +// (which just emit the existing object). See https://issue.k8s.io/86015 for details. +// +// Use `NewDeltaFIFOWithOptions(DeltaFIFOOptions{..., EmitDeltaTypeReplaced: true})` +// instead to receive a `Replaced` event depending on the type. +// +// Deprecated: Equivalent to NewDeltaFIFOWithOptions(DeltaFIFOOptions{KeyFunction: keyFunc, KnownObjects: knownObjects}) func NewDeltaFIFO(keyFunc KeyFunc, knownObjects KeyListerGetter) *DeltaFIFO { + return NewDeltaFIFOWithOptions(DeltaFIFOOptions{ + KeyFunction: keyFunc, + KnownObjects: knownObjects, + }) +} + +// DeltaFIFOOptions is the configuration parameters for DeltaFIFO. All are +// optional. +type DeltaFIFOOptions struct { + + // KeyFunction is used to figure out what key an object should have. (It's + // exposed in the returned DeltaFIFO's KeyOf() method, with additional + // handling around deleted objects and queue state). + // Optional, the default is MetaNamespaceKeyFunc. + KeyFunction KeyFunc + + // KnownObjects is expected to return a list of keys that the consumer of + // this queue "knows about". It is used to decide which items are missing + // when Replace() is called; 'Deleted' deltas are produced for the missing items. + // KnownObjects may be nil if you can tolerate missing deletions on Replace(). + KnownObjects KeyListerGetter + + // EmitDeltaTypeReplaced indicates that the queue consumer + // understands the Replaced DeltaType. Before the `Replaced` event type was + // added, calls to Replace() were handled the same as Sync(). For + // backwards-compatibility purposes, this is false by default. + // When true, `Replaced` events will be sent for items passed to a Replace() call. + // When false, `Sync` events will be sent instead. + EmitDeltaTypeReplaced bool +} + +// NewDeltaFIFOWithOptions returns a Store which can be used process changes to +// items. See also the comment on DeltaFIFO. +func NewDeltaFIFOWithOptions(opts DeltaFIFOOptions) *DeltaFIFO { + if opts.KeyFunction == nil { + opts.KeyFunction = MetaNamespaceKeyFunc + } + f := &DeltaFIFO{ items: map[string]Deltas{}, queue: []string{}, - keyFunc: keyFunc, - knownObjects: knownObjects, + keyFunc: opts.KeyFunction, + knownObjects: opts.KnownObjects, + + emitDeltaTypeReplaced: opts.EmitDeltaTypeReplaced, } f.cond.L = &f.lock return f } -// DeltaFIFO is like FIFO, but allows you to process deletes. +// DeltaFIFO is like FIFO, but differs in two ways. One is that the +// accumulator associated with a given object's key is not that object +// but rather a Deltas, which is a slice of Delta values for that +// object. Applying an object to a Deltas means to append a Delta +// except when the potentially appended Delta is a Deleted and the +// Deltas already ends with a Deleted. In that case the Deltas does +// not grow, although the terminal Deleted will be replaced by the new +// Deleted if the older Deleted's object is a +// DeletedFinalStateUnknown. +// +// The other difference is that DeltaFIFO has an additional way that +// an object can be applied to an accumulator, called Sync. // // DeltaFIFO is a producer-consumer queue, where a Reflector is // intended to be the producer, and the consumer is whatever calls @@ -77,22 +139,22 @@ func NewDeltaFIFO(keyFunc KeyFunc, knownObjects KeyListerGetter) *DeltaFIFO { // * You want to process every object change (delta) at most once. // * When you process an object, you want to see everything // that's happened to it since you last processed it. -// * You want to process the deletion of objects. +// * You want to process the deletion of some of the objects. // * You might want to periodically reprocess objects. // // DeltaFIFO's Pop(), Get(), and GetByKey() methods return -// interface{} to satisfy the Store/Queue interfaces, but it +// interface{} to satisfy the Store/Queue interfaces, but they // will always return an object of type Deltas. // +// A DeltaFIFO's knownObjects KeyListerGetter provides the abilities +// to list Store keys and to get objects by Store key. The objects in +// question are called "known objects" and this set of objects +// modifies the behavior of the Delete, Replace, and Resync methods +// (each in a different way). +// // A note on threading: If you call Pop() in parallel from multiple // threads, you could end up with multiple threads processing slightly // different versions of the same object. -// -// A note on the KeyLister used by the DeltaFIFO: It's main purpose is -// to list keys that are "known", for the purpose of figuring out which -// items have been deleted when Replace() or Delete() are called. The deleted -// object will be included in the DeleteFinalStateUnknown markers. These objects -// could be stale. type DeltaFIFO struct { // lock/cond protects access to 'items' and 'queue'. lock sync.RWMutex @@ -114,9 +176,8 @@ type DeltaFIFO struct { // insertion and retrieval, and should be deterministic. keyFunc KeyFunc - // knownObjects list keys that are "known", for the - // purpose of figuring out which items have been deleted - // when Replace() or Delete() is called. + // knownObjects list keys that are "known" --- affecting Delete(), + // Replace(), and Resync() knownObjects KeyListerGetter // Indication the queue is closed. @@ -124,6 +185,10 @@ type DeltaFIFO struct { // Currently, not used to gate any of CRED operations. closed bool closedLock sync.Mutex + + // emitDeltaTypeReplaced is whether to emit the Replaced or Sync + // DeltaType when Replace() is called (to preserve backwards compat). + emitDeltaTypeReplaced bool } var ( @@ -185,9 +250,11 @@ func (f *DeltaFIFO) Update(obj interface{}) error { return f.queueActionLocked(Updated, obj) } -// Delete is just like Add, but makes an Deleted Delta. If the item does not -// already exist, it will be ignored. (It may have already been deleted by a -// Replace (re-list), for example. +// Delete is just like Add, but makes a Deleted Delta. If the given +// object does not already exist, it will be ignored. (It may have +// already been deleted by a Replace (re-list), for example.) In this +// method `f.knownObjects`, if not nil, provides (via GetByKey) +// _additional_ objects that are considered to already exist. func (f *DeltaFIFO) Delete(obj interface{}) error { id, err := f.KeyOf(obj) if err != nil { @@ -313,6 +380,9 @@ func (f *DeltaFIFO) queueActionLocked(actionType DeltaType, obj interface{}) err f.items[id] = newDeltas f.cond.Broadcast() } else { + // This never happens, because dedupDeltas never returns an empty list + // when given a non-empty list (as it is here). + // But if somehow it ever does return an empty list, then // We need to remove this from our map (extra items in the queue are // ignored if they are not in the map). delete(f.items, id) @@ -430,22 +500,34 @@ func (f *DeltaFIFO) Pop(process PopProcessFunc) (interface{}, error) { } } -// Replace will delete the contents of 'f', using instead the given map. -// 'f' takes ownership of the map, you should not reference the map again -// after calling this function. f's queue is reset, too; upon return, it -// will contain the items in the map, in no particular order. +// Replace atomically does two things: (1) it adds the given objects +// using the Sync or Replace DeltaType and then (2) it does some deletions. +// In particular: for every pre-existing key K that is not the key of +// an object in `list` there is the effect of +// `Delete(DeletedFinalStateUnknown{K, O})` where O is current object +// of K. If `f.knownObjects == nil` then the pre-existing keys are +// those in `f.items` and the current object of K is the `.Newest()` +// of the Deltas associated with K. Otherwise the pre-existing keys +// are those listed by `f.knownObjects` and the current object of K is +// what `f.knownObjects.GetByKey(K)` returns. func (f *DeltaFIFO) Replace(list []interface{}, resourceVersion string) error { f.lock.Lock() defer f.lock.Unlock() keys := make(sets.String, len(list)) + // keep backwards compat for old clients + action := Sync + if f.emitDeltaTypeReplaced { + action = Replaced + } + for _, item := range list { key, err := f.KeyOf(item) if err != nil { return KeyError{item, err} } keys.Insert(key) - if err := f.queueActionLocked(Sync, item); err != nil { + if err := f.queueActionLocked(action, item); err != nil { return fmt.Errorf("couldn't enqueue object: %v", err) } } @@ -507,7 +589,9 @@ func (f *DeltaFIFO) Replace(list []interface{}, resourceVersion string) error { return nil } -// Resync will send a sync event for each item +// Resync adds, with a Sync type of Delta, every object listed by +// `f.knownObjects` whose key is not already queued for processing. +// If `f.knownObjects` is `nil` then Resync does nothing. func (f *DeltaFIFO) Resync() error { f.lock.Lock() defer f.lock.Unlock() @@ -577,10 +661,14 @@ const ( Added DeltaType = "Added" Updated DeltaType = "Updated" Deleted DeltaType = "Deleted" - // The other types are obvious. You'll get Sync deltas when: - // * A watch expires/errors out and a new list/watch cycle is started. - // * You've turned on periodic syncs. - // (Anything that trigger's DeltaFIFO's Replace() method.) + // Replaced is emitted when we encountered watch errors and had to do a + // relist. We don't know if the replaced object has changed. + // + // NOTE: Previous versions of DeltaFIFO would use Sync for Replace events + // as well. Hence, Replaced is only emitted when the option + // EmitDeltaTypeReplaced is true. + Replaced DeltaType = "Replaced" + // Sync is for synthetic events during a periodic resync. Sync DeltaType = "Sync" ) diff --git a/vendor/k8s.io/client-go/tools/cache/expiration_cache.go b/vendor/k8s.io/client-go/tools/cache/expiration_cache.go index 14ad492ecc..e687593f61 100644 --- a/vendor/k8s.io/client-go/tools/cache/expiration_cache.go +++ b/vendor/k8s.io/client-go/tools/cache/expiration_cache.go @@ -194,9 +194,9 @@ func (c *ExpirationCache) Replace(list []interface{}, resourceVersion string) er return nil } -// Resync will touch all objects to put them into the processing queue +// Resync is a no-op for one of these func (c *ExpirationCache) Resync() error { - return c.cacheStorage.Resync() + return nil } // NewTTLStore creates and returns a ExpirationCache with a TTLPolicy diff --git a/vendor/k8s.io/client-go/tools/cache/fifo.go b/vendor/k8s.io/client-go/tools/cache/fifo.go index 7a3bc3d301..67bb1cba85 100644 --- a/vendor/k8s.io/client-go/tools/cache/fifo.go +++ b/vendor/k8s.io/client-go/tools/cache/fifo.go @@ -24,7 +24,7 @@ import ( ) // PopProcessFunc is passed to Pop() method of Queue interface. -// It is supposed to process the element popped from the queue. +// It is supposed to process the accumulator popped from the queue. type PopProcessFunc func(interface{}) error // ErrRequeue may be returned by a PopProcessFunc to safely requeue @@ -44,26 +44,38 @@ func (e ErrRequeue) Error() string { return e.Err.Error() } -// Queue is exactly like a Store, but has a Pop() method too. +// Queue extends Store with a collection of Store keys to "process". +// Every Add, Update, or Delete may put the object's key in that collection. +// A Queue has a way to derive the corresponding key given an accumulator. +// A Queue can be accessed concurrently from multiple goroutines. +// A Queue can be "closed", after which Pop operations return an error. type Queue interface { Store - // Pop blocks until it has something to process. - // It returns the object that was process and the result of processing. - // The PopProcessFunc may return an ErrRequeue{...} to indicate the item - // should be requeued before releasing the lock on the queue. + // Pop blocks until there is at least one key to process or the + // Queue is closed. In the latter case Pop returns with an error. + // In the former case Pop atomically picks one key to process, + // removes that (key, accumulator) association from the Store, and + // processes the accumulator. Pop returns the accumulator that + // was processed and the result of processing. The PopProcessFunc + // may return an ErrRequeue{inner} and in this case Pop will (a) + // return that (key, accumulator) association to the Queue as part + // of the atomic processing and (b) return the inner error from + // Pop. Pop(PopProcessFunc) (interface{}, error) - // AddIfNotPresent adds a value previously - // returned by Pop back into the queue as long - // as nothing else (presumably more recent) - // has since been added. + // AddIfNotPresent puts the given accumulator into the Queue (in + // association with the accumulator's key) if and only if that key + // is not already associated with a non-empty accumulator. AddIfNotPresent(interface{}) error - // HasSynced returns true if the first batch of items has been popped + // HasSynced returns true if the first batch of keys have all been + // popped. The first batch of keys are those of the first Replace + // operation if that happened before any Add, Update, or Delete; + // otherwise the first batch is empty. HasSynced() bool - // Close queue + // Close the queue Close() } @@ -79,11 +91,16 @@ func Pop(queue Queue) interface{} { return result } -// FIFO receives adds and updates from a Reflector, and puts them in a queue for -// FIFO order processing. If multiple adds/updates of a single item happen while -// an item is in the queue before it has been processed, it will only be -// processed once, and when it is processed, the most recent version will be -// processed. This can't be done with a channel. +// FIFO is a Queue in which (a) each accumulator is simply the most +// recently provided object and (b) the collection of keys to process +// is a FIFO. The accumulators all start out empty, and deleting an +// object from its accumulator empties the accumulator. The Resync +// operation is a no-op. +// +// Thus: if multiple adds/updates of a single object happen while that +// object's key is in the queue before it has been processed then it +// will only be processed once, and when it is processed the most +// recent version will be processed. This can't be done with a channel // // FIFO solves this use case: // * You want to process every object (exactly) once. @@ -94,7 +111,7 @@ func Pop(queue Queue) interface{} { type FIFO struct { lock sync.RWMutex cond sync.Cond - // We depend on the property that items in the set are in the queue and vice versa. + // We depend on the property that every key in `items` is also in `queue` items map[string]interface{} queue []string @@ -326,7 +343,8 @@ func (f *FIFO) Replace(list []interface{}, resourceVersion string) error { return nil } -// Resync will touch all objects to put them into the processing queue +// Resync will ensure that every object in the Store has its key in the queue. +// This should be a no-op, because that property is maintained by all operations. func (f *FIFO) Resync() error { f.lock.Lock() defer f.lock.Unlock() diff --git a/vendor/k8s.io/client-go/tools/cache/index.go b/vendor/k8s.io/client-go/tools/cache/index.go index bbfb3b55f6..fa29e6a704 100644 --- a/vendor/k8s.io/client-go/tools/cache/index.go +++ b/vendor/k8s.io/client-go/tools/cache/index.go @@ -23,12 +23,15 @@ import ( "k8s.io/apimachinery/pkg/util/sets" ) -// Indexer is a storage interface that lets you list objects using multiple indexing functions. -// There are three kinds of strings here. -// One is a storage key, as defined in the Store interface. -// Another kind is a name of an index. -// The third kind of string is an "indexed value", which is produced by an -// IndexFunc and can be a field value or any other string computed from the object. +// Indexer extends Store with multiple indices and restricts each +// accumulator to simply hold the current object (and be empty after +// Delete). +// +// There are three kinds of strings here: +// 1. a storage key, as defined in the Store interface, +// 2. a name of an index, and +// 3. an "indexed value", which is produced by an IndexFunc and +// can be a field value or any other string computed from the object. type Indexer interface { Store // Index returns the stored objects whose set of indexed values diff --git a/vendor/k8s.io/client-go/tools/cache/listwatch.go b/vendor/k8s.io/client-go/tools/cache/listwatch.go index 8227b73b69..10b7e6512e 100644 --- a/vendor/k8s.io/client-go/tools/cache/listwatch.go +++ b/vendor/k8s.io/client-go/tools/cache/listwatch.go @@ -24,7 +24,6 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/watch" restclient "k8s.io/client-go/rest" - "k8s.io/client-go/tools/pager" ) // Lister is any object that knows how to perform an initial list. @@ -85,7 +84,7 @@ func NewFilteredListWatchFromClient(c Getter, resource string, namespace string, Namespace(namespace). Resource(resource). VersionedParams(&options, metav1.ParameterCodec). - Do(). + Do(context.TODO()). Get() } watchFunc := func(options metav1.ListOptions) (watch.Interface, error) { @@ -95,16 +94,15 @@ func NewFilteredListWatchFromClient(c Getter, resource string, namespace string, Namespace(namespace). Resource(resource). VersionedParams(&options, metav1.ParameterCodec). - Watch() + Watch(context.TODO()) } return &ListWatch{ListFunc: listFunc, WatchFunc: watchFunc} } // List a set of apiserver resources func (lw *ListWatch) List(options metav1.ListOptions) (runtime.Object, error) { - if !lw.DisableChunking { - return pager.New(pager.SimplePageFunc(lw.ListFunc)).List(context.TODO(), options) - } + // ListWatch is used in Reflector, which already supports pagination. + // Don't paginate here to avoid duplication. return lw.ListFunc(options) } diff --git a/vendor/k8s.io/client-go/tools/cache/mutation_detector.go b/vendor/k8s.io/client-go/tools/cache/mutation_detector.go index fa6acab3e5..bbec7d062c 100644 --- a/vendor/k8s.io/client-go/tools/cache/mutation_detector.go +++ b/vendor/k8s.io/client-go/tools/cache/mutation_detector.go @@ -36,9 +36,12 @@ func init() { mutationDetectionEnabled, _ = strconv.ParseBool(os.Getenv("KUBE_CACHE_MUTATION_DETECTOR")) } -// MutationDetector is able to monitor if the object be modified outside. +// MutationDetector is able to monitor objects for mutation within a limited window of time type MutationDetector interface { + // AddObject adds the given object to the set being monitored for a while from now AddObject(obj interface{}) + + // Run starts the monitoring and does not return until the monitoring is stopped. Run(stopCh <-chan struct{}) } @@ -65,7 +68,13 @@ type defaultCacheMutationDetector struct { name string period time.Duration - lock sync.Mutex + // compareLock ensures only a single call to CompareObjects runs at a time + compareObjectsLock sync.Mutex + + // addLock guards addedObjs between AddObject and CompareObjects + addedObjsLock sync.Mutex + addedObjs []cacheObj + cachedObjs []cacheObj retainDuration time.Duration @@ -115,15 +124,22 @@ func (d *defaultCacheMutationDetector) AddObject(obj interface{}) { if obj, ok := obj.(runtime.Object); ok { copiedObj := obj.DeepCopyObject() - d.lock.Lock() - defer d.lock.Unlock() - d.cachedObjs = append(d.cachedObjs, cacheObj{cached: obj, copied: copiedObj}) + d.addedObjsLock.Lock() + defer d.addedObjsLock.Unlock() + d.addedObjs = append(d.addedObjs, cacheObj{cached: obj, copied: copiedObj}) } } func (d *defaultCacheMutationDetector) CompareObjects() { - d.lock.Lock() - defer d.lock.Unlock() + d.compareObjectsLock.Lock() + defer d.compareObjectsLock.Unlock() + + // move addedObjs into cachedObjs under lock + // this keeps the critical section small to avoid blocking AddObject while we compare cachedObjs + d.addedObjsLock.Lock() + d.cachedObjs = append(d.cachedObjs, d.addedObjs...) + d.addedObjs = nil + d.addedObjsLock.Unlock() altered := false for i, obj := range d.cachedObjs { diff --git a/vendor/k8s.io/client-go/tools/cache/reflector.go b/vendor/k8s.io/client-go/tools/cache/reflector.go index aa04b21a0d..58f871f519 100644 --- a/vendor/k8s.io/client-go/tools/cache/reflector.go +++ b/vendor/k8s.io/client-go/tools/cache/reflector.go @@ -26,7 +26,7 @@ import ( "sync" "time" - apierrs "k8s.io/apimachinery/pkg/api/errors" + apierrors "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/api/meta" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" @@ -55,7 +55,10 @@ type Reflector struct { // stringification of expectedType otherwise. It is for display // only, and should not be used for parsing or comparison. expectedTypeName string - // The type of object we expect to place in the store. + // An example object of the type we expect to place in the store. + // Only the type needs to be right, except that when that is + // `unstructured.Unstructured` the object's `"apiVersion"` and + // `"kind"` must also be right. expectedType reflect.Type // The GVK of the object we expect to place in the store if unstructured. expectedGVK *schema.GroupVersionKind @@ -63,21 +66,34 @@ type Reflector struct { store Store // listerWatcher is used to perform lists and watches. listerWatcher ListerWatcher - // period controls timing between one watch ending and - // the beginning of the next one. - period time.Duration + + // backoff manages backoff of ListWatch + backoffManager wait.BackoffManager + resyncPeriod time.Duration + // ShouldResync is invoked periodically and whenever it returns `true` the Store's Resync operation is invoked ShouldResync func() bool // clock allows tests to manipulate time clock clock.Clock + // paginatedResult defines whether pagination should be forced for list calls. + // It is set based on the result of the initial list call. + paginatedResult bool // lastSyncResourceVersion is the resource version token last // observed when doing a sync with the underlying store // it is thread safe, but not synchronized with the underlying store lastSyncResourceVersion string + // isLastSyncResourceVersionUnavailable is true if the previous list or watch request with + // lastSyncResourceVersion failed with an "expired" or "too large resource version" error. + isLastSyncResourceVersionUnavailable bool // lastSyncResourceVersionMutex guards read/write access to lastSyncResourceVersion lastSyncResourceVersionMutex sync.RWMutex // WatchListPageSize is the requested chunk size of initial and resync watch lists. - // Defaults to pager.PageSize. + // If unset, for consistent reads (RV="") or reads that opt-into arbitrarily old data + // (RV="0") it will default to pager.PageSize, for the rest (RV != "" && RV != "0") + // it will turn off pagination to allow serving them from watch cache. + // NOTE: It should be used carefully as paginated lists are always served directly from + // etcd, which is significantly less efficient and may lead to serious performance and + // scalability problems. WatchListPageSize int64 } @@ -95,25 +111,33 @@ func NewNamespaceKeyedIndexerAndReflector(lw ListerWatcher, expectedType interfa return indexer, reflector } -// NewReflector creates a new Reflector object which will keep the given store up to -// date with the server's contents for the given resource. Reflector promises to -// only put things in the store that have the type of expectedType, unless expectedType -// is nil. If resyncPeriod is non-zero, then lists will be executed after every -// resyncPeriod, so that you can use reflectors to periodically process everything as -// well as incrementally processing the things that change. +// NewReflector creates a new Reflector object which will keep the +// given store up to date with the server's contents for the given +// resource. Reflector promises to only put things in the store that +// have the type of expectedType, unless expectedType is nil. If +// resyncPeriod is non-zero, then the reflector will periodically +// consult its ShouldResync function to determine whether to invoke +// the Store's Resync operation; `ShouldResync==nil` means always +// "yes". This enables you to use reflectors to periodically process +// everything as well as incrementally processing the things that +// change. func NewReflector(lw ListerWatcher, expectedType interface{}, store Store, resyncPeriod time.Duration) *Reflector { return NewNamedReflector(naming.GetNameFromCallsite(internalPackages...), lw, expectedType, store, resyncPeriod) } // NewNamedReflector same as NewReflector, but with a specified name for logging func NewNamedReflector(name string, lw ListerWatcher, expectedType interface{}, store Store, resyncPeriod time.Duration) *Reflector { + realClock := &clock.RealClock{} r := &Reflector{ name: name, listerWatcher: lw, store: store, - period: time.Second, - resyncPeriod: resyncPeriod, - clock: &clock.RealClock{}, + // We used to make the call every 1sec (1 QPS), the goal here is to achieve ~98% traffic reduction when + // API server is not healthy. With these parameters, backoff will stop at [30,60) sec interval which is + // 0.22 QPS. If we don't backoff for 2min, assume API server is healthy and we reset the backoff. + backoffManager: wait.NewExponentialBackoffManager(800*time.Millisecond, 30*time.Second, 2*time.Minute, 2.0, 1.0, realClock), + resyncPeriod: resyncPeriod, + clock: realClock, } r.setExpectedType(expectedType) return r @@ -144,15 +168,17 @@ func (r *Reflector) setExpectedType(expectedType interface{}) { // call chains to NewReflector, so they'd be low entropy names for reflectors var internalPackages = []string{"client-go/tools/cache/"} -// Run starts a watch and handles watch events. Will restart the watch if it is closed. +// Run repeatedly uses the reflector's ListAndWatch to fetch all the +// objects and subsequent deltas. // Run will exit when stopCh is closed. func (r *Reflector) Run(stopCh <-chan struct{}) { - klog.V(3).Infof("Starting reflector %v (%s) from %s", r.expectedTypeName, r.resyncPeriod, r.name) - wait.Until(func() { + klog.V(2).Infof("Starting reflector %s (%s) from %s", r.expectedTypeName, r.resyncPeriod, r.name) + wait.BackoffUntil(func() { if err := r.ListAndWatch(stopCh); err != nil { utilruntime.HandleError(err) } - }, r.period, stopCh) + }, r.backoffManager, true, stopCh) + klog.V(2).Infof("Stopping reflector %s (%s) from %s", r.expectedTypeName, r.resyncPeriod, r.name) } var ( @@ -185,15 +211,13 @@ func (r *Reflector) ListAndWatch(stopCh <-chan struct{}) error { klog.V(3).Infof("Listing and watching %v from %s", r.expectedTypeName, r.name) var resourceVersion string - // Explicitly set "0" as resource version - it's fine for the List() - // to be served from cache and potentially be delayed relative to - // etcd contents. Reflector framework will catch up via Watch() eventually. - options := metav1.ListOptions{ResourceVersion: "0"} + options := metav1.ListOptions{ResourceVersion: r.relistResourceVersion()} if err := func() error { initTrace := trace.New("Reflector ListAndWatch", trace.Field{"name", r.name}) defer initTrace.LogIfLong(10 * time.Second) var list runtime.Object + var paginatedResult bool var err error listCh := make(chan struct{}, 1) panicCh := make(chan interface{}, 1) @@ -208,11 +232,40 @@ func (r *Reflector) ListAndWatch(stopCh <-chan struct{}) error { pager := pager.New(pager.SimplePageFunc(func(opts metav1.ListOptions) (runtime.Object, error) { return r.listerWatcher.List(opts) })) - if r.WatchListPageSize != 0 { + switch { + case r.WatchListPageSize != 0: pager.PageSize = r.WatchListPageSize + case r.paginatedResult: + // We got a paginated result initially. Assume this resource and server honor + // paging requests (i.e. watch cache is probably disabled) and leave the default + // pager size set. + case options.ResourceVersion != "" && options.ResourceVersion != "0": + // User didn't explicitly request pagination. + // + // With ResourceVersion != "", we have a possibility to list from watch cache, + // but we do that (for ResourceVersion != "0") only if Limit is unset. + // To avoid thundering herd on etcd (e.g. on master upgrades), we explicitly + // switch off pagination to force listing from watch cache (if enabled). + // With the existing semantic of RV (result is at least as fresh as provided RV), + // this is correct and doesn't lead to going back in time. + // + // We also don't turn off pagination for ResourceVersion="0", since watch cache + // is ignoring Limit in that case anyway, and if watch cache is not enabled + // we don't introduce regression. + pager.PageSize = 0 + } + + list, paginatedResult, err = pager.List(context.Background(), options) + if isExpiredError(err) || isTooLargeResourceVersionError(err) { + r.setIsLastSyncResourceVersionUnavailable(true) + // Retry immediately if the resource version used to list is unavailable. + // The pager already falls back to full list if paginated list calls fail due to an "Expired" error on + // continuation pages, but the pager might not be enabled, the full list might fail because the + // resource version it is listing at is expired or the cache may not yet be synced to the provided + // resource version. So we need to fallback to resourceVersion="" in all to recover and ensure + // the reflector makes forward progress. + list, paginatedResult, err = pager.List(context.Background(), metav1.ListOptions{ResourceVersion: r.relistResourceVersion()}) } - // Pager falls back to full list if paginated list calls fail due to an "Expired" error. - list, err = pager.List(context.Background(), options) close(listCh) }() select { @@ -225,6 +278,22 @@ func (r *Reflector) ListAndWatch(stopCh <-chan struct{}) error { if err != nil { return fmt.Errorf("%s: Failed to list %v: %v", r.name, r.expectedTypeName, err) } + + // We check if the list was paginated and if so set the paginatedResult based on that. + // However, we want to do that only for the initial list (which is the only case + // when we set ResourceVersion="0"). The reasoning behind it is that later, in some + // situations we may force listing directly from etcd (by setting ResourceVersion="") + // which will return paginated result, even if watch cache is enabled. However, in + // that case, we still want to prefer sending requests to watch cache if possible. + // + // Paginated result returned for request with ResourceVersion="0" mean that watch + // cache is disabled and there are a lot of objects of a given type. In such case, + // there is no need to prefer listing from watch cache. + if options.ResourceVersion == "0" && paginatedResult { + r.paginatedResult = true + } + + r.setIsLastSyncResourceVersionUnavailable(false) // list was successful initTrace.Step("Objects listed") listMetaInterface, err := meta.ListAccessor(list) if err != nil { @@ -300,10 +369,15 @@ func (r *Reflector) ListAndWatch(stopCh <-chan struct{}) error { start := r.clock.Now() w, err := r.listerWatcher.Watch(options) if err != nil { - switch err { - case io.EOF: + switch { + case isExpiredError(err): + // Don't set LastSyncResourceVersionExpired - LIST call with ResourceVersion=RV already + // has a semantic that it returns data at least as fresh as provided RV. + // So first try to LIST with setting RV to resource version of last observed object. + klog.V(4).Infof("%s: watch of %v closed with: %v", r.name, r.expectedTypeName, err) + case err == io.EOF: // watch closed normally - case io.ErrUnexpectedEOF: + case err == io.ErrUnexpectedEOF: klog.V(1).Infof("%s: Watch for %v closed with unexpected EOF: %v", r.name, r.expectedTypeName, err) default: utilruntime.HandleError(fmt.Errorf("%s: Failed to watch %v: %v", r.name, r.expectedTypeName, err)) @@ -322,8 +396,11 @@ func (r *Reflector) ListAndWatch(stopCh <-chan struct{}) error { if err := r.watchHandler(start, w, &resourceVersion, resyncerrc, stopCh); err != nil { if err != errorStopRequested { switch { - case apierrs.IsResourceExpired(err): - klog.V(4).Infof("%s: watch of %v ended with: %v", r.name, r.expectedTypeName, err) + case isExpiredError(err): + // Don't set LastSyncResourceVersionUnavailable - LIST call with ResourceVersion=RV already + // has a semantic that it returns data at least as fresh as provided RV. + // So first try to LIST with setting RV to resource version of last observed object. + klog.V(4).Infof("%s: watch of %v closed with: %v", r.name, r.expectedTypeName, err) default: klog.Warningf("%s: watch of %v ended with: %v", r.name, r.expectedTypeName, err) } @@ -362,7 +439,7 @@ loop: break loop } if event.Type == watch.Error { - return apierrs.FromObject(event.Object) + return apierrors.FromObject(event.Object) } if r.expectedType != nil { if e, a := r.expectedType, reflect.TypeOf(event.Object); e != a { @@ -433,3 +510,46 @@ func (r *Reflector) setLastSyncResourceVersion(v string) { defer r.lastSyncResourceVersionMutex.Unlock() r.lastSyncResourceVersion = v } + +// relistResourceVersion determines the resource version the reflector should list or relist from. +// Returns either the lastSyncResourceVersion so that this reflector will relist with a resource +// versions no older than has already been observed in relist results or watch events, or, if the last relist resulted +// in an HTTP 410 (Gone) status code, returns "" so that the relist will use the latest resource version available in +// etcd via a quorum read. +func (r *Reflector) relistResourceVersion() string { + r.lastSyncResourceVersionMutex.RLock() + defer r.lastSyncResourceVersionMutex.RUnlock() + + if r.isLastSyncResourceVersionUnavailable { + // Since this reflector makes paginated list requests, and all paginated list requests skip the watch cache + // if the lastSyncResourceVersion is unavailable, we set ResourceVersion="" and list again to re-establish reflector + // to the latest available ResourceVersion, using a consistent read from etcd. + return "" + } + if r.lastSyncResourceVersion == "" { + // For performance reasons, initial list performed by reflector uses "0" as resource version to allow it to + // be served from the watch cache if it is enabled. + return "0" + } + return r.lastSyncResourceVersion +} + +// setIsLastSyncResourceVersionUnavailable sets if the last list or watch request with lastSyncResourceVersion returned +// "expired" or "too large resource version" error. +func (r *Reflector) setIsLastSyncResourceVersionUnavailable(isUnavailable bool) { + r.lastSyncResourceVersionMutex.Lock() + defer r.lastSyncResourceVersionMutex.Unlock() + r.isLastSyncResourceVersionUnavailable = isUnavailable +} + +func isExpiredError(err error) bool { + // In Kubernetes 1.17 and earlier, the api server returns both apierrors.StatusReasonExpired and + // apierrors.StatusReasonGone for HTTP 410 (Gone) status code responses. In 1.18 the kube server is more consistent + // and always returns apierrors.StatusReasonExpired. For backward compatibility we can only remove the apierrors.IsGone + // check when we fully drop support for Kubernetes 1.17 servers from reflectors. + return apierrors.IsResourceExpired(err) || apierrors.IsGone(err) +} + +func isTooLargeResourceVersionError(err error) bool { + return apierrors.HasStatusCause(err, metav1.CauseTypeResourceVersionTooLarge) +} diff --git a/vendor/k8s.io/client-go/tools/cache/shared_informer.go b/vendor/k8s.io/client-go/tools/cache/shared_informer.go index f59a0852fe..df8c67dce4 100644 --- a/vendor/k8s.io/client-go/tools/cache/shared_informer.go +++ b/vendor/k8s.io/client-go/tools/cache/shared_informer.go @@ -21,11 +21,11 @@ import ( "sync" "time" + "k8s.io/apimachinery/pkg/api/meta" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/clock" utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/apimachinery/pkg/util/wait" - "k8s.io/client-go/util/retry" "k8s.io/utils/buffer" "k8s.io/klog" @@ -46,15 +46,6 @@ import ( // An object state is either "absent" or present with a // ResourceVersion and other appropriate content. // -// A SharedInformer gets object states from apiservers using a -// sequence of LIST and WATCH operations. Through this sequence the -// apiservers provide a sequence of "collection states" to the -// informer, where each collection state defines the state of every -// object of the collection. No promise --- beyond what is implied by -// other remarks here --- is made about how one informer's sequence of -// collection states relates to a different informer's sequence of -// collection states. -// // A SharedInformer maintains a local cache, exposed by GetStore() and // by GetIndexer() in the case of an indexed informer, of the state of // each relevant object. This cache is eventually consistent with the @@ -67,10 +58,17 @@ import ( // To be formally complete, we say that the absent state meets any // restriction by label selector or field selector. // +// For a given informer and relevant object ID X, the sequence of +// states that appears in the informer's cache is a subsequence of the +// states authoritatively associated with X. That is, some states +// might never appear in the cache but ordering among the appearing +// states is correct. Note, however, that there is no promise about +// ordering between states seen for different objects. +// // The local cache starts out empty, and gets populated and updated // during `Run()`. // -// As a simple example, if a collection of objects is henceforeth +// As a simple example, if a collection of objects is henceforth // unchanging, a SharedInformer is created that links to that // collection, and that SharedInformer is `Run()` then that // SharedInformer's cache eventually holds an exact copy of that @@ -91,6 +89,10 @@ import ( // a given object, and `SplitMetaNamespaceKey(key)` to split a key // into its constituent parts. // +// Every query against the local cache is answered entirely from one +// snapshot of the cache's state. Thus, the result of a `List` call +// will not contain two entries with the same namespace and name. +// // A client is identified here by a ResourceEventHandler. For every // update to the SharedInformer's local cache and for every client // added before `Run()`, eventually either the SharedInformer is @@ -106,7 +108,16 @@ import ( // and index updates happen before such a prescribed notification. // For a given SharedInformer and client, the notifications are // delivered sequentially. For a given SharedInformer, client, and -// object ID, the notifications are delivered in order. +// object ID, the notifications are delivered in order. Because +// `ObjectMeta.UID` has no role in identifying objects, it is possible +// that when (1) object O1 with ID (e.g. namespace and name) X and +// `ObjectMeta.UID` U1 in the SharedInformer's local cache is deleted +// and later (2) another object O2 with ID X and ObjectMeta.UID U2 is +// created the informer's clients are not notified of (1) and (2) but +// rather are notified only of an update from O1 to O2. Clients that +// need to detect such cases might do so by comparing the `ObjectMeta.UID` +// field of the old and the new object in the code that handles update +// notifications (i.e. `OnUpdate` method of ResourceEventHandler). // // A client must process each notification promptly; a SharedInformer // is not engineered to deal well with a large backlog of @@ -114,11 +125,6 @@ import ( // to something else, for example through a // `client-go/util/workqueue`. // -// Each query to an informer's local cache --- whether a single-object -// lookup, a list operation, or a use of one of its indices --- is -// answered entirely from one of the collection states received by -// that informer. -// // A delete notification exposes the last locally known non-absent // state, except that its ResourceVersion is replaced with a // ResourceVersion in which the object is actually absent. @@ -128,14 +134,23 @@ type SharedInformer interface { // between different handlers. AddEventHandler(handler ResourceEventHandler) // AddEventHandlerWithResyncPeriod adds an event handler to the - // shared informer using the specified resync period. The resync - // operation consists of delivering to the handler a create - // notification for every object in the informer's local cache; it - // does not add any interactions with the authoritative storage. + // shared informer with the requested resync period; zero means + // this handler does not care about resyncs. The resync operation + // consists of delivering to the handler an update notification + // for every object in the informer's local cache; it does not add + // any interactions with the authoritative storage. Some + // informers do no resyncs at all, not even for handlers added + // with a non-zero resyncPeriod. For an informer that does + // resyncs, and for each handler that requests resyncs, that + // informer develops a nominal resync period that is no shorter + // than the requested period but may be longer. The actual time + // between any two resyncs may be longer than the nominal period + // because the implementation takes time to do work and there may + // be competing load and scheduling noise. AddEventHandlerWithResyncPeriod(handler ResourceEventHandler, resyncPeriod time.Duration) // GetStore returns the informer's local cache as a Store. GetStore() Store - // GetController gives back a synthetic interface that "votes" to start the informer + // GetController is deprecated, it does nothing useful GetController() Controller // Run starts and runs the shared informer, returning after it stops. // The informer will be stopped when stopCh is closed. @@ -159,21 +174,32 @@ type SharedIndexInformer interface { } // NewSharedInformer creates a new instance for the listwatcher. -func NewSharedInformer(lw ListerWatcher, objType runtime.Object, resyncPeriod time.Duration) SharedInformer { - return NewSharedIndexInformer(lw, objType, resyncPeriod, Indexers{}) +func NewSharedInformer(lw ListerWatcher, exampleObject runtime.Object, defaultEventHandlerResyncPeriod time.Duration) SharedInformer { + return NewSharedIndexInformer(lw, exampleObject, defaultEventHandlerResyncPeriod, Indexers{}) } // NewSharedIndexInformer creates a new instance for the listwatcher. -func NewSharedIndexInformer(lw ListerWatcher, objType runtime.Object, defaultEventHandlerResyncPeriod time.Duration, indexers Indexers) SharedIndexInformer { +// The created informer will not do resyncs if the given +// defaultEventHandlerResyncPeriod is zero. Otherwise: for each +// handler that with a non-zero requested resync period, whether added +// before or after the informer starts, the nominal resync period is +// the requested resync period rounded up to a multiple of the +// informer's resync checking period. Such an informer's resync +// checking period is established when the informer starts running, +// and is the maximum of (a) the minimum of the resync periods +// requested before the informer starts and the +// defaultEventHandlerResyncPeriod given here and (b) the constant +// `minimumResyncPeriod` defined in this file. +func NewSharedIndexInformer(lw ListerWatcher, exampleObject runtime.Object, defaultEventHandlerResyncPeriod time.Duration, indexers Indexers) SharedIndexInformer { realClock := &clock.RealClock{} sharedIndexInformer := &sharedIndexInformer{ processor: &sharedProcessor{clock: realClock}, indexer: NewIndexer(DeletionHandlingMetaNamespaceKeyFunc, indexers), listerWatcher: lw, - objectType: objType, + objectType: exampleObject, resyncCheckPeriod: defaultEventHandlerResyncPeriod, defaultEventHandlerResyncPeriod: defaultEventHandlerResyncPeriod, - cacheMutationDetector: NewCacheMutationDetector(fmt.Sprintf("%T", objType)), + cacheMutationDetector: NewCacheMutationDetector(fmt.Sprintf("%T", exampleObject)), clock: realClock, } return sharedIndexInformer @@ -228,6 +254,19 @@ func WaitForCacheSync(stopCh <-chan struct{}, cacheSyncs ...InformerSynced) bool return true } +// `*sharedIndexInformer` implements SharedIndexInformer and has three +// main components. One is an indexed local cache, `indexer Indexer`. +// The second main component is a Controller that pulls +// objects/notifications using the ListerWatcher and pushes them into +// a DeltaFIFO --- whose knownObjects is the informer's local cache +// --- while concurrently Popping Deltas values from that fifo and +// processing them with `sharedIndexInformer::HandleDeltas`. Each +// invocation of HandleDeltas, which is done with the fifo's lock +// held, processes each Delta in turn. For each Delta this both +// updates the local cache and stuffs the relevant notification into +// the sharedProcessor. The third main component is that +// sharedProcessor, which is responsible for relaying those +// notifications to each of the informer's clients. type sharedIndexInformer struct { indexer Indexer controller Controller @@ -235,9 +274,13 @@ type sharedIndexInformer struct { processor *sharedProcessor cacheMutationDetector MutationDetector - // This block is tracked to handle late initialization of the controller listerWatcher ListerWatcher - objectType runtime.Object + + // objectType is an example object of the type this informer is + // expected to handle. Only the type needs to be right, except + // that when that is `unstructured.Unstructured` the object's + // `"apiVersion"` and `"kind"` must also be right. + objectType runtime.Object // resyncCheckPeriod is how often we want the reflector's resync timer to fire so it can call // shouldResync to check if any of our listeners need a resync. @@ -293,7 +336,10 @@ type deleteNotification struct { func (s *sharedIndexInformer) Run(stopCh <-chan struct{}) { defer utilruntime.HandleCrash() - fifo := NewDeltaFIFO(MetaNamespaceKeyFunc, s.indexer) + fifo := NewDeltaFIFOWithOptions(DeltaFIFOOptions{ + KnownObjects: s.indexer, + EmitDeltaTypeReplaced: true, + }) cfg := &Config{ Queue: fifo, @@ -452,19 +498,33 @@ func (s *sharedIndexInformer) HandleDeltas(obj interface{}) error { // from oldest to newest for _, d := range obj.(Deltas) { switch d.Type { - case Sync, Added, Updated: - isSync := d.Type == Sync + case Sync, Replaced, Added, Updated: s.cacheMutationDetector.AddObject(d.Object) if old, exists, err := s.indexer.Get(d.Object); err == nil && exists { if err := s.indexer.Update(d.Object); err != nil { return err } + + isSync := false + switch { + case d.Type == Sync: + // Sync events are only propagated to listeners that requested resync + isSync = true + case d.Type == Replaced: + if accessor, err := meta.Accessor(d.Object); err == nil { + if oldAccessor, err := meta.Accessor(old); err == nil { + // Replaced events that didn't change resourceVersion are treated as resync events + // and only propagated to listeners that requested resync + isSync = accessor.GetResourceVersion() == oldAccessor.GetResourceVersion() + } + } + } s.processor.distribute(updateNotification{oldObj: old, newObj: d.Object}, isSync) } else { if err := s.indexer.Add(d.Object); err != nil { return err } - s.processor.distribute(addNotification{newObj: d.Object}, isSync) + s.processor.distribute(addNotification{newObj: d.Object}, false) } case Deleted: if err := s.indexer.Delete(d.Object); err != nil { @@ -476,6 +536,12 @@ func (s *sharedIndexInformer) HandleDeltas(obj interface{}) error { return nil } +// sharedProcessor has a collection of processorListener and can +// distribute a notification object to its listeners. There are two +// kinds of distribute operations. The sync distributions go to a +// subset of the listeners that (a) is recomputed in the occasional +// calls to shouldResync and (b) every listener is initially put in. +// The non-sync distributions go to every listener. type sharedProcessor struct { listenersStarted bool listenersLock sync.RWMutex @@ -567,6 +633,17 @@ func (p *sharedProcessor) resyncCheckPeriodChanged(resyncCheckPeriod time.Durati } } +// processorListener relays notifications from a sharedProcessor to +// one ResourceEventHandler --- using two goroutines, two unbuffered +// channels, and an unbounded ring buffer. The `add(notification)` +// function sends the given notification to `addCh`. One goroutine +// runs `pop()`, which pumps notifications from `addCh` to `nextCh` +// using storage in the ring buffer while `nextCh` is not keeping up. +// Another goroutine runs `run()`, which receives notifications from +// `nextCh` and synchronously invokes the appropriate handler method. +// +// processorListener also keeps track of the adjusted requested resync +// period of the listener. type processorListener struct { nextCh chan interface{} addCh chan interface{} @@ -580,11 +657,22 @@ type processorListener struct { // we should try to do something better. pendingNotifications buffer.RingGrowing - // requestedResyncPeriod is how frequently the listener wants a full resync from the shared informer + // requestedResyncPeriod is how frequently the listener wants a + // full resync from the shared informer, but modified by two + // adjustments. One is imposing a lower bound, + // `minimumResyncPeriod`. The other is another lower bound, the + // sharedProcessor's `resyncCheckPeriod`, that is imposed (a) only + // in AddEventHandlerWithResyncPeriod invocations made after the + // sharedProcessor starts and (b) only if the informer does + // resyncs at all. requestedResyncPeriod time.Duration - // resyncPeriod is how frequently the listener wants a full resync from the shared informer. This - // value may differ from requestedResyncPeriod if the shared informer adjusts it to align with the - // informer's overall resync check period. + // resyncPeriod is the threshold that will be used in the logic + // for this listener. This value differs from + // requestedResyncPeriod only when the sharedIndexInformer does + // not do resyncs, in which case the value here is zero. The + // actual time between resyncs depends on when the + // sharedProcessor's `shouldResync` function is invoked and when + // the sharedIndexInformer processes `Sync` type Delta objects. resyncPeriod time.Duration // nextResync is the earliest time the listener should get a full resync nextResync time.Time @@ -648,29 +736,21 @@ func (p *processorListener) run() { // delivering again. stopCh := make(chan struct{}) wait.Until(func() { - // this gives us a few quick retries before a long pause and then a few more quick retries - err := wait.ExponentialBackoff(retry.DefaultRetry, func() (bool, error) { - for next := range p.nextCh { - switch notification := next.(type) { - case updateNotification: - p.handler.OnUpdate(notification.oldObj, notification.newObj) - case addNotification: - p.handler.OnAdd(notification.newObj) - case deleteNotification: - p.handler.OnDelete(notification.oldObj) - default: - utilruntime.HandleError(fmt.Errorf("unrecognized notification: %T", next)) - } + for next := range p.nextCh { + switch notification := next.(type) { + case updateNotification: + p.handler.OnUpdate(notification.oldObj, notification.newObj) + case addNotification: + p.handler.OnAdd(notification.newObj) + case deleteNotification: + p.handler.OnDelete(notification.oldObj) + default: + utilruntime.HandleError(fmt.Errorf("unrecognized notification: %T", next)) } - // the only way to get here is if the p.nextCh is empty and closed - return true, nil - }) - - // the only way to get here is if the p.nextCh is empty and closed - if err == nil { - close(stopCh) } - }, 1*time.Minute, stopCh) + // the only way to get here is if the p.nextCh is empty and closed + close(stopCh) + }, 1*time.Second, stopCh) } // shouldResync deterimines if the listener needs a resync. If the listener's resyncPeriod is 0, diff --git a/vendor/k8s.io/client-go/tools/cache/store.go b/vendor/k8s.io/client-go/tools/cache/store.go index fc844efe64..886e95d2de 100644 --- a/vendor/k8s.io/client-go/tools/cache/store.go +++ b/vendor/k8s.io/client-go/tools/cache/store.go @@ -23,27 +23,50 @@ import ( "k8s.io/apimachinery/pkg/api/meta" ) -// Store is a generic object storage interface. Reflector knows how to watch a server -// and update a store. A generic store is provided, which allows Reflector to be used -// as a local caching system, and an LRU store, which allows Reflector to work like a -// queue of items yet to be processed. +// Store is a generic object storage and processing interface. A +// Store holds a map from string keys to accumulators, and has +// operations to add, update, and delete a given object to/from the +// accumulator currently associated with a given key. A Store also +// knows how to extract the key from a given object, so many operations +// are given only the object. // -// Store makes no assumptions about stored object identity; it is the responsibility -// of a Store implementation to provide a mechanism to correctly key objects and to -// define the contract for obtaining objects by some arbitrary key type. +// In the simplest Store implementations each accumulator is simply +// the last given object, or empty after Delete, and thus the Store's +// behavior is simple storage. +// +// Reflector knows how to watch a server and update a Store. This +// package provides a variety of implementations of Store. type Store interface { + + // Add adds the given object to the accumulator associated with the given object's key Add(obj interface{}) error + + // Update updates the given object in the accumulator associated with the given object's key Update(obj interface{}) error + + // Delete deletes the given object from the accumulator associated with the given object's key Delete(obj interface{}) error + + // List returns a list of all the currently non-empty accumulators List() []interface{} + + // ListKeys returns a list of all the keys currently associated with non-empty accumulators ListKeys() []string + + // Get returns the accumulator associated with the given object's key Get(obj interface{}) (item interface{}, exists bool, err error) + + // GetByKey returns the accumulator associated with the given key GetByKey(key string) (item interface{}, exists bool, err error) // Replace will delete the contents of the store, using instead the // given list. Store takes ownership of the list, you should not reference // it after calling this function. Replace([]interface{}, string) error + + // Resync is meaningless in the terms appearing here but has + // meaning in some implementations that have non-trivial + // additional behavior (e.g., DeltaFIFO). Resync() error } @@ -106,9 +129,8 @@ func SplitMetaNamespaceKey(key string) (namespace, name string, err error) { return "", "", fmt.Errorf("unexpected key format: %q", key) } -// cache responsibilities are limited to: -// 1. Computing keys for objects via keyFunc -// 2. Invoking methods of a ThreadSafeStorage interface +// `*cache` implements Indexer in terms of a ThreadSafeStore and an +// associated KeyFunc. type cache struct { // cacheStorage bears the burden of thread safety for the cache cacheStorage ThreadSafeStore @@ -222,9 +244,9 @@ func (c *cache) Replace(list []interface{}, resourceVersion string) error { return nil } -// Resync touches all items in the store to force processing +// Resync is meaningless for one of these func (c *cache) Resync() error { - return c.cacheStorage.Resync() + return nil } // NewStore returns a Store implemented simply with a map and a lock. diff --git a/vendor/k8s.io/client-go/tools/cache/thread_safe_store.go b/vendor/k8s.io/client-go/tools/cache/thread_safe_store.go index e72325147b..56251179b5 100644 --- a/vendor/k8s.io/client-go/tools/cache/thread_safe_store.go +++ b/vendor/k8s.io/client-go/tools/cache/thread_safe_store.go @@ -23,7 +23,11 @@ import ( "k8s.io/apimachinery/pkg/util/sets" ) -// ThreadSafeStore is an interface that allows concurrent access to a storage backend. +// ThreadSafeStore is an interface that allows concurrent indexed +// access to a storage backend. It is like Indexer but does not +// (necessarily) know how to extract the Store key from a given +// object. +// // TL;DR caveats: you must not modify anything returned by Get or List as it will break // the indexing feature in addition to not being thread safe. // @@ -51,6 +55,7 @@ type ThreadSafeStore interface { // AddIndexers adds more indexers to this store. If you call this after you already have data // in the store, the results are undefined. AddIndexers(newIndexers Indexers) error + // Resync is a no-op and is deprecated Resync() error } @@ -131,8 +136,8 @@ func (c *threadSafeMap) Replace(items map[string]interface{}, resourceVersion st } } -// Index returns a list of items that match on the index function -// Index is thread-safe so long as you treat all items as immutable +// Index returns a list of items that match the given object on the index function. +// Index is thread-safe so long as you treat all items as immutable. func (c *threadSafeMap) Index(indexName string, obj interface{}) ([]interface{}, error) { c.lock.RLock() defer c.lock.RUnlock() @@ -142,37 +147,37 @@ func (c *threadSafeMap) Index(indexName string, obj interface{}) ([]interface{}, return nil, fmt.Errorf("Index with name %s does not exist", indexName) } - indexKeys, err := indexFunc(obj) + indexedValues, err := indexFunc(obj) if err != nil { return nil, err } index := c.indices[indexName] - var returnKeySet sets.String - if len(indexKeys) == 1 { + var storeKeySet sets.String + if len(indexedValues) == 1 { // In majority of cases, there is exactly one value matching. // Optimize the most common path - deduping is not needed here. - returnKeySet = index[indexKeys[0]] + storeKeySet = index[indexedValues[0]] } else { // Need to de-dupe the return list. // Since multiple keys are allowed, this can happen. - returnKeySet = sets.String{} - for _, indexKey := range indexKeys { - for key := range index[indexKey] { - returnKeySet.Insert(key) + storeKeySet = sets.String{} + for _, indexedValue := range indexedValues { + for key := range index[indexedValue] { + storeKeySet.Insert(key) } } } - list := make([]interface{}, 0, returnKeySet.Len()) - for absoluteKey := range returnKeySet { - list = append(list, c.items[absoluteKey]) + list := make([]interface{}, 0, storeKeySet.Len()) + for storeKey := range storeKeySet { + list = append(list, c.items[storeKey]) } return list, nil } -// ByIndex returns a list of items that match an exact value on the index function -func (c *threadSafeMap) ByIndex(indexName, indexKey string) ([]interface{}, error) { +// ByIndex returns a list of the items whose indexed values in the given index include the given indexed value +func (c *threadSafeMap) ByIndex(indexName, indexedValue string) ([]interface{}, error) { c.lock.RLock() defer c.lock.RUnlock() @@ -183,7 +188,7 @@ func (c *threadSafeMap) ByIndex(indexName, indexKey string) ([]interface{}, erro index := c.indices[indexName] - set := index[indexKey] + set := index[indexedValue] list := make([]interface{}, 0, set.Len()) for key := range set { list = append(list, c.items[key]) @@ -192,9 +197,9 @@ func (c *threadSafeMap) ByIndex(indexName, indexKey string) ([]interface{}, erro return list, nil } -// IndexKeys returns a list of keys that match on the index function. +// IndexKeys returns a list of the Store keys of the objects whose indexed values in the given index include the given indexed value. // IndexKeys is thread-safe so long as you treat all items as immutable. -func (c *threadSafeMap) IndexKeys(indexName, indexKey string) ([]string, error) { +func (c *threadSafeMap) IndexKeys(indexName, indexedValue string) ([]string, error) { c.lock.RLock() defer c.lock.RUnlock() @@ -205,7 +210,7 @@ func (c *threadSafeMap) IndexKeys(indexName, indexKey string) ([]string, error) index := c.indices[indexName] - set := index[indexKey] + set := index[indexedValue] return set.List(), nil } diff --git a/vendor/k8s.io/client-go/tools/clientcmd/api/types.go b/vendor/k8s.io/client-go/tools/clientcmd/api/types.go index 1f1209f8d4..44317dd019 100644 --- a/vendor/k8s.io/client-go/tools/clientcmd/api/types.go +++ b/vendor/k8s.io/client-go/tools/clientcmd/api/types.go @@ -70,6 +70,9 @@ type Cluster struct { LocationOfOrigin string // Server is the address of the kubernetes cluster (https://hostname:port). Server string `json:"server"` + // TLSServerName is used to check server certificate. If TLSServerName is empty, the hostname used to contact the server is used. + // +optional + TLSServerName string `json:"tls-server-name,omitempty"` // InsecureSkipTLSVerify skips the validity check for the server's certificate. This will make your HTTPS connections insecure. // +optional InsecureSkipTLSVerify bool `json:"insecure-skip-tls-verify,omitempty"` diff --git a/vendor/k8s.io/client-go/tools/clientcmd/api/v1/types.go b/vendor/k8s.io/client-go/tools/clientcmd/api/v1/types.go index 2159ffc79d..8ccacd3f87 100644 --- a/vendor/k8s.io/client-go/tools/clientcmd/api/v1/types.go +++ b/vendor/k8s.io/client-go/tools/clientcmd/api/v1/types.go @@ -63,6 +63,9 @@ type Preferences struct { type Cluster struct { // Server is the address of the kubernetes cluster (https://hostname:port). Server string `json:"server"` + // TLSServerName is used to check server certificate. If TLSServerName is empty, the hostname used to contact the server is used. + // +optional + TLSServerName string `json:"tls-server-name,omitempty"` // InsecureSkipTLSVerify skips the validity check for the server's certificate. This will make your HTTPS connections insecure. // +optional InsecureSkipTLSVerify bool `json:"insecure-skip-tls-verify,omitempty"` diff --git a/vendor/k8s.io/client-go/tools/clientcmd/api/v1/zz_generated.conversion.go b/vendor/k8s.io/client-go/tools/clientcmd/api/v1/zz_generated.conversion.go index 31e00ea6e4..8f3631e151 100644 --- a/vendor/k8s.io/client-go/tools/clientcmd/api/v1/zz_generated.conversion.go +++ b/vendor/k8s.io/client-go/tools/clientcmd/api/v1/zz_generated.conversion.go @@ -233,6 +233,7 @@ func Convert_api_AuthProviderConfig_To_v1_AuthProviderConfig(in *api.AuthProvide func autoConvert_v1_Cluster_To_api_Cluster(in *Cluster, out *api.Cluster, s conversion.Scope) error { out.Server = in.Server + out.TLSServerName = in.TLSServerName out.InsecureSkipTLSVerify = in.InsecureSkipTLSVerify out.CertificateAuthority = in.CertificateAuthority out.CertificateAuthorityData = *(*[]byte)(unsafe.Pointer(&in.CertificateAuthorityData)) @@ -250,6 +251,7 @@ func Convert_v1_Cluster_To_api_Cluster(in *Cluster, out *api.Cluster, s conversi func autoConvert_api_Cluster_To_v1_Cluster(in *api.Cluster, out *Cluster, s conversion.Scope) error { // INFO: in.LocationOfOrigin opted out of conversion generation out.Server = in.Server + out.TLSServerName = in.TLSServerName out.InsecureSkipTLSVerify = in.InsecureSkipTLSVerify out.CertificateAuthority = in.CertificateAuthority out.CertificateAuthorityData = *(*[]byte)(unsafe.Pointer(&in.CertificateAuthorityData)) diff --git a/vendor/k8s.io/client-go/tools/clientcmd/client_config.go b/vendor/k8s.io/client-go/tools/clientcmd/client_config.go index 44115130d9..a9806384aa 100644 --- a/vendor/k8s.io/client-go/tools/clientcmd/client_config.go +++ b/vendor/k8s.io/client-go/tools/clientcmd/client_config.go @@ -210,6 +210,7 @@ func getServerIdentificationPartialConfig(configAuthInfo clientcmdapi.AuthInfo, configClientConfig.CAFile = configClusterInfo.CertificateAuthority configClientConfig.CAData = configClusterInfo.CertificateAuthorityData configClientConfig.Insecure = configClusterInfo.InsecureSkipTLSVerify + configClientConfig.ServerName = configClusterInfo.TLSServerName mergo.MergeWithOverwrite(mergedConfig, configClientConfig) return mergedConfig, nil @@ -460,6 +461,14 @@ func (config *DirectClientConfig) getCluster() (clientcmdapi.Cluster, error) { mergedClusterInfo.CertificateAuthorityData = config.overrides.ClusterInfo.CertificateAuthorityData } + // if the --tls-server-name has been set in overrides, use that value. + // if the --server has been set in overrides, then use the value of --tls-server-name specified on the CLI too. This gives the property + // that setting a --server will effectively clear the KUBECONFIG value of tls-server-name if it is specified on the command line which is + // usually correct. + if config.overrides.ClusterInfo.TLSServerName != "" || config.overrides.ClusterInfo.Server != "" { + mergedClusterInfo.TLSServerName = config.overrides.ClusterInfo.TLSServerName + } + return *mergedClusterInfo, nil } diff --git a/vendor/k8s.io/client-go/tools/clientcmd/overrides.go b/vendor/k8s.io/client-go/tools/clientcmd/overrides.go index bfca032847..95cba0fac2 100644 --- a/vendor/k8s.io/client-go/tools/clientcmd/overrides.go +++ b/vendor/k8s.io/client-go/tools/clientcmd/overrides.go @@ -71,6 +71,7 @@ type ClusterOverrideFlags struct { APIVersion FlagInfo CertificateAuthority FlagInfo InsecureSkipTLSVerify FlagInfo + TLSServerName FlagInfo } // FlagInfo contains information about how to register a flag. This struct is useful if you want to provide a way for an extender to @@ -145,6 +146,7 @@ const ( FlagContext = "context" FlagNamespace = "namespace" FlagAPIServer = "server" + FlagTLSServerName = "tls-server-name" FlagInsecure = "insecure-skip-tls-verify" FlagCertFile = "client-certificate" FlagKeyFile = "client-key" @@ -189,6 +191,7 @@ func RecommendedClusterOverrideFlags(prefix string) ClusterOverrideFlags { APIServer: FlagInfo{prefix + FlagAPIServer, "", "", "The address and port of the Kubernetes API server"}, CertificateAuthority: FlagInfo{prefix + FlagCAFile, "", "", "Path to a cert file for the certificate authority"}, InsecureSkipTLSVerify: FlagInfo{prefix + FlagInsecure, "", "false", "If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure"}, + TLSServerName: FlagInfo{prefix + FlagTLSServerName, "", "", "If provided, this name will be used to validate server certificate. If this is not provided, hostname used to contact the server is used."}, } } @@ -226,6 +229,7 @@ func BindClusterFlags(clusterInfo *clientcmdapi.Cluster, flags *pflag.FlagSet, f flagNames.APIServer.BindStringFlag(flags, &clusterInfo.Server) flagNames.CertificateAuthority.BindStringFlag(flags, &clusterInfo.CertificateAuthority) flagNames.InsecureSkipTLSVerify.BindBoolFlag(flags, &clusterInfo.InsecureSkipTLSVerify) + flagNames.TLSServerName.BindStringFlag(flags, &clusterInfo.TLSServerName) } // BindFlags is a convenience method to bind the specified flags to their associated variables diff --git a/vendor/k8s.io/client-go/tools/clientcmd/validation.go b/vendor/k8s.io/client-go/tools/clientcmd/validation.go index 2f927072bd..afe6f80b39 100644 --- a/vendor/k8s.io/client-go/tools/clientcmd/validation.go +++ b/vendor/k8s.io/client-go/tools/clientcmd/validation.go @@ -30,7 +30,7 @@ import ( var ( ErrNoContext = errors.New("no context chosen") - ErrEmptyConfig = errors.New("no configuration has been provided") + ErrEmptyConfig = errors.New("no configuration has been provided, try setting KUBERNETES_MASTER environment variable") // message is for consistency with old behavior ErrEmptyCluster = errors.New("cluster has no server defined") ) @@ -86,11 +86,41 @@ func (e errConfigurationInvalid) Error() string { return fmt.Sprintf("invalid configuration: %v", utilerrors.NewAggregate(e).Error()) } -// Errors implements the AggregateError interface +// Errors implements the utilerrors.Aggregate interface func (e errConfigurationInvalid) Errors() []error { return e } +// Is implements the utilerrors.Aggregate interface +func (e errConfigurationInvalid) Is(target error) bool { + return e.visit(func(err error) bool { + return errors.Is(err, target) + }) +} + +func (e errConfigurationInvalid) visit(f func(err error) bool) bool { + for _, err := range e { + switch err := err.(type) { + case errConfigurationInvalid: + if match := err.visit(f); match { + return match + } + case utilerrors.Aggregate: + for _, nestedErr := range err.Errors() { + if match := f(nestedErr); match { + return match + } + } + default: + if match := f(err); match { + return match + } + } + } + + return false +} + // IsConfigurationInvalid returns true if the provided error indicates the configuration is invalid. func IsConfigurationInvalid(err error) bool { switch err.(type) { diff --git a/vendor/k8s.io/client-go/tools/leaderelection/leaderelection.go b/vendor/k8s.io/client-go/tools/leaderelection/leaderelection.go index 42fffd45ae..61989a2cfa 100644 --- a/vendor/k8s.io/client-go/tools/leaderelection/leaderelection.go +++ b/vendor/k8s.io/client-go/tools/leaderelection/leaderelection.go @@ -241,7 +241,7 @@ func (le *LeaderElector) acquire(ctx context.Context) bool { desc := le.config.Lock.Describe() klog.Infof("attempting to acquire leader lease %v...", desc) wait.JitterUntil(func() { - succeeded = le.tryAcquireOrRenew() + succeeded = le.tryAcquireOrRenew(ctx) le.maybeReportTransition() if !succeeded { klog.V(4).Infof("failed to acquire lease %v", desc) @@ -263,18 +263,7 @@ func (le *LeaderElector) renew(ctx context.Context) { timeoutCtx, timeoutCancel := context.WithTimeout(ctx, le.config.RenewDeadline) defer timeoutCancel() err := wait.PollImmediateUntil(le.config.RetryPeriod, func() (bool, error) { - done := make(chan bool, 1) - go func() { - defer close(done) - done <- le.tryAcquireOrRenew() - }() - - select { - case <-timeoutCtx.Done(): - return false, fmt.Errorf("failed to tryAcquireOrRenew %s", timeoutCtx.Err()) - case result := <-done: - return result, nil - } + return le.tryAcquireOrRenew(timeoutCtx), nil }, timeoutCtx.Done()) le.maybeReportTransition() @@ -303,7 +292,7 @@ func (le *LeaderElector) release() bool { leaderElectionRecord := rl.LeaderElectionRecord{ LeaderTransitions: le.observedRecord.LeaderTransitions, } - if err := le.config.Lock.Update(leaderElectionRecord); err != nil { + if err := le.config.Lock.Update(context.TODO(), leaderElectionRecord); err != nil { klog.Errorf("Failed to release lock: %v", err) return false } @@ -315,7 +304,7 @@ func (le *LeaderElector) release() bool { // tryAcquireOrRenew tries to acquire a leader lease if it is not already acquired, // else it tries to renew the lease if it has already been acquired. Returns true // on success else returns false. -func (le *LeaderElector) tryAcquireOrRenew() bool { +func (le *LeaderElector) tryAcquireOrRenew(ctx context.Context) bool { now := metav1.Now() leaderElectionRecord := rl.LeaderElectionRecord{ HolderIdentity: le.config.Lock.Identity(), @@ -325,13 +314,13 @@ func (le *LeaderElector) tryAcquireOrRenew() bool { } // 1. obtain or create the ElectionRecord - oldLeaderElectionRecord, oldLeaderElectionRawRecord, err := le.config.Lock.Get() + oldLeaderElectionRecord, oldLeaderElectionRawRecord, err := le.config.Lock.Get(ctx) if err != nil { if !errors.IsNotFound(err) { klog.Errorf("error retrieving resource lock %v: %v", le.config.Lock.Describe(), err) return false } - if err = le.config.Lock.Create(leaderElectionRecord); err != nil { + if err = le.config.Lock.Create(ctx, leaderElectionRecord); err != nil { klog.Errorf("error initially creating leader election record: %v", err) return false } @@ -363,7 +352,7 @@ func (le *LeaderElector) tryAcquireOrRenew() bool { } // update the lock itself - if err = le.config.Lock.Update(leaderElectionRecord); err != nil { + if err = le.config.Lock.Update(ctx, leaderElectionRecord); err != nil { klog.Errorf("Failed to update lock: %v", err) return false } diff --git a/vendor/k8s.io/client-go/tools/leaderelection/resourcelock/configmaplock.go b/vendor/k8s.io/client-go/tools/leaderelection/resourcelock/configmaplock.go index fd152b072c..6390b4ef5f 100644 --- a/vendor/k8s.io/client-go/tools/leaderelection/resourcelock/configmaplock.go +++ b/vendor/k8s.io/client-go/tools/leaderelection/resourcelock/configmaplock.go @@ -17,6 +17,7 @@ limitations under the License. package resourcelock import ( + "context" "encoding/json" "errors" "fmt" @@ -41,10 +42,10 @@ type ConfigMapLock struct { } // Get returns the election record from a ConfigMap Annotation -func (cml *ConfigMapLock) Get() (*LeaderElectionRecord, []byte, error) { +func (cml *ConfigMapLock) Get(ctx context.Context) (*LeaderElectionRecord, []byte, error) { var record LeaderElectionRecord var err error - cml.cm, err = cml.Client.ConfigMaps(cml.ConfigMapMeta.Namespace).Get(cml.ConfigMapMeta.Name, metav1.GetOptions{}) + cml.cm, err = cml.Client.ConfigMaps(cml.ConfigMapMeta.Namespace).Get(ctx, cml.ConfigMapMeta.Name, metav1.GetOptions{}) if err != nil { return nil, nil, err } @@ -61,12 +62,12 @@ func (cml *ConfigMapLock) Get() (*LeaderElectionRecord, []byte, error) { } // Create attempts to create a LeaderElectionRecord annotation -func (cml *ConfigMapLock) Create(ler LeaderElectionRecord) error { +func (cml *ConfigMapLock) Create(ctx context.Context, ler LeaderElectionRecord) error { recordBytes, err := json.Marshal(ler) if err != nil { return err } - cml.cm, err = cml.Client.ConfigMaps(cml.ConfigMapMeta.Namespace).Create(&v1.ConfigMap{ + cml.cm, err = cml.Client.ConfigMaps(cml.ConfigMapMeta.Namespace).Create(ctx, &v1.ConfigMap{ ObjectMeta: metav1.ObjectMeta{ Name: cml.ConfigMapMeta.Name, Namespace: cml.ConfigMapMeta.Namespace, @@ -74,12 +75,12 @@ func (cml *ConfigMapLock) Create(ler LeaderElectionRecord) error { LeaderElectionRecordAnnotationKey: string(recordBytes), }, }, - }) + }, metav1.CreateOptions{}) return err } // Update will update an existing annotation on a given resource. -func (cml *ConfigMapLock) Update(ler LeaderElectionRecord) error { +func (cml *ConfigMapLock) Update(ctx context.Context, ler LeaderElectionRecord) error { if cml.cm == nil { return errors.New("configmap not initialized, call get or create first") } @@ -87,8 +88,11 @@ func (cml *ConfigMapLock) Update(ler LeaderElectionRecord) error { if err != nil { return err } + if cml.cm.Annotations == nil { + cml.cm.Annotations = make(map[string]string) + } cml.cm.Annotations[LeaderElectionRecordAnnotationKey] = string(recordBytes) - cml.cm, err = cml.Client.ConfigMaps(cml.ConfigMapMeta.Namespace).Update(cml.cm) + cml.cm, err = cml.Client.ConfigMaps(cml.ConfigMapMeta.Namespace).Update(ctx, cml.cm, metav1.UpdateOptions{}) return err } diff --git a/vendor/k8s.io/client-go/tools/leaderelection/resourcelock/endpointslock.go b/vendor/k8s.io/client-go/tools/leaderelection/resourcelock/endpointslock.go index f5a8ffcc86..132c5a5489 100644 --- a/vendor/k8s.io/client-go/tools/leaderelection/resourcelock/endpointslock.go +++ b/vendor/k8s.io/client-go/tools/leaderelection/resourcelock/endpointslock.go @@ -17,6 +17,7 @@ limitations under the License. package resourcelock import ( + "context" "encoding/json" "errors" "fmt" @@ -36,10 +37,10 @@ type EndpointsLock struct { } // Get returns the election record from a Endpoints Annotation -func (el *EndpointsLock) Get() (*LeaderElectionRecord, []byte, error) { +func (el *EndpointsLock) Get(ctx context.Context) (*LeaderElectionRecord, []byte, error) { var record LeaderElectionRecord var err error - el.e, err = el.Client.Endpoints(el.EndpointsMeta.Namespace).Get(el.EndpointsMeta.Name, metav1.GetOptions{}) + el.e, err = el.Client.Endpoints(el.EndpointsMeta.Namespace).Get(ctx, el.EndpointsMeta.Name, metav1.GetOptions{}) if err != nil { return nil, nil, err } @@ -56,12 +57,12 @@ func (el *EndpointsLock) Get() (*LeaderElectionRecord, []byte, error) { } // Create attempts to create a LeaderElectionRecord annotation -func (el *EndpointsLock) Create(ler LeaderElectionRecord) error { +func (el *EndpointsLock) Create(ctx context.Context, ler LeaderElectionRecord) error { recordBytes, err := json.Marshal(ler) if err != nil { return err } - el.e, err = el.Client.Endpoints(el.EndpointsMeta.Namespace).Create(&v1.Endpoints{ + el.e, err = el.Client.Endpoints(el.EndpointsMeta.Namespace).Create(ctx, &v1.Endpoints{ ObjectMeta: metav1.ObjectMeta{ Name: el.EndpointsMeta.Name, Namespace: el.EndpointsMeta.Namespace, @@ -69,12 +70,12 @@ func (el *EndpointsLock) Create(ler LeaderElectionRecord) error { LeaderElectionRecordAnnotationKey: string(recordBytes), }, }, - }) + }, metav1.CreateOptions{}) return err } // Update will update and existing annotation on a given resource. -func (el *EndpointsLock) Update(ler LeaderElectionRecord) error { +func (el *EndpointsLock) Update(ctx context.Context, ler LeaderElectionRecord) error { if el.e == nil { return errors.New("endpoint not initialized, call get or create first") } @@ -86,7 +87,7 @@ func (el *EndpointsLock) Update(ler LeaderElectionRecord) error { el.e.Annotations = make(map[string]string) } el.e.Annotations[LeaderElectionRecordAnnotationKey] = string(recordBytes) - el.e, err = el.Client.Endpoints(el.EndpointsMeta.Namespace).Update(el.e) + el.e, err = el.Client.Endpoints(el.EndpointsMeta.Namespace).Update(ctx, el.e, metav1.UpdateOptions{}) return err } diff --git a/vendor/k8s.io/client-go/tools/leaderelection/resourcelock/interface.go b/vendor/k8s.io/client-go/tools/leaderelection/resourcelock/interface.go index c9f1759144..74630a31ff 100644 --- a/vendor/k8s.io/client-go/tools/leaderelection/resourcelock/interface.go +++ b/vendor/k8s.io/client-go/tools/leaderelection/resourcelock/interface.go @@ -17,6 +17,7 @@ limitations under the License. package resourcelock import ( + "context" "fmt" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -73,13 +74,13 @@ type ResourceLockConfig struct { // by the leaderelection code. type Interface interface { // Get returns the LeaderElectionRecord - Get() (*LeaderElectionRecord, []byte, error) + Get(ctx context.Context) (*LeaderElectionRecord, []byte, error) // Create attempts to create a LeaderElectionRecord - Create(ler LeaderElectionRecord) error + Create(ctx context.Context, ler LeaderElectionRecord) error // Update will update and existing LeaderElectionRecord - Update(ler LeaderElectionRecord) error + Update(ctx context.Context, ler LeaderElectionRecord) error // RecordEvent is used to record events RecordEvent(string) diff --git a/vendor/k8s.io/client-go/tools/leaderelection/resourcelock/leaselock.go b/vendor/k8s.io/client-go/tools/leaderelection/resourcelock/leaselock.go index 74016b8df1..3d76d174ea 100644 --- a/vendor/k8s.io/client-go/tools/leaderelection/resourcelock/leaselock.go +++ b/vendor/k8s.io/client-go/tools/leaderelection/resourcelock/leaselock.go @@ -17,6 +17,7 @@ limitations under the License. package resourcelock import ( + "context" "encoding/json" "errors" "fmt" @@ -37,9 +38,9 @@ type LeaseLock struct { } // Get returns the election record from a Lease spec -func (ll *LeaseLock) Get() (*LeaderElectionRecord, []byte, error) { +func (ll *LeaseLock) Get(ctx context.Context) (*LeaderElectionRecord, []byte, error) { var err error - ll.lease, err = ll.Client.Leases(ll.LeaseMeta.Namespace).Get(ll.LeaseMeta.Name, metav1.GetOptions{}) + ll.lease, err = ll.Client.Leases(ll.LeaseMeta.Namespace).Get(ctx, ll.LeaseMeta.Name, metav1.GetOptions{}) if err != nil { return nil, nil, err } @@ -52,26 +53,26 @@ func (ll *LeaseLock) Get() (*LeaderElectionRecord, []byte, error) { } // Create attempts to create a Lease -func (ll *LeaseLock) Create(ler LeaderElectionRecord) error { +func (ll *LeaseLock) Create(ctx context.Context, ler LeaderElectionRecord) error { var err error - ll.lease, err = ll.Client.Leases(ll.LeaseMeta.Namespace).Create(&coordinationv1.Lease{ + ll.lease, err = ll.Client.Leases(ll.LeaseMeta.Namespace).Create(ctx, &coordinationv1.Lease{ ObjectMeta: metav1.ObjectMeta{ Name: ll.LeaseMeta.Name, Namespace: ll.LeaseMeta.Namespace, }, Spec: LeaderElectionRecordToLeaseSpec(&ler), - }) + }, metav1.CreateOptions{}) return err } // Update will update an existing Lease spec. -func (ll *LeaseLock) Update(ler LeaderElectionRecord) error { +func (ll *LeaseLock) Update(ctx context.Context, ler LeaderElectionRecord) error { if ll.lease == nil { return errors.New("lease not initialized, call get or create first") } ll.lease.Spec = LeaderElectionRecordToLeaseSpec(&ler) var err error - ll.lease, err = ll.Client.Leases(ll.LeaseMeta.Namespace).Update(ll.lease) + ll.lease, err = ll.Client.Leases(ll.LeaseMeta.Namespace).Update(ctx, ll.lease, metav1.UpdateOptions{}) return err } diff --git a/vendor/k8s.io/client-go/tools/leaderelection/resourcelock/multilock.go b/vendor/k8s.io/client-go/tools/leaderelection/resourcelock/multilock.go index 8cb89dc4f0..5ee1dcbb50 100644 --- a/vendor/k8s.io/client-go/tools/leaderelection/resourcelock/multilock.go +++ b/vendor/k8s.io/client-go/tools/leaderelection/resourcelock/multilock.go @@ -18,6 +18,7 @@ package resourcelock import ( "bytes" + "context" "encoding/json" apierrors "k8s.io/apimachinery/pkg/api/errors" @@ -34,13 +35,13 @@ type MultiLock struct { } // Get returns the older election record of the lock -func (ml *MultiLock) Get() (*LeaderElectionRecord, []byte, error) { - primary, primaryRaw, err := ml.Primary.Get() +func (ml *MultiLock) Get(ctx context.Context) (*LeaderElectionRecord, []byte, error) { + primary, primaryRaw, err := ml.Primary.Get(ctx) if err != nil { return nil, nil, err } - secondary, secondaryRaw, err := ml.Secondary.Get() + secondary, secondaryRaw, err := ml.Secondary.Get(ctx) if err != nil { // Lock is held by old client if apierrors.IsNotFound(err) && primary.HolderIdentity != ml.Identity() { @@ -60,25 +61,25 @@ func (ml *MultiLock) Get() (*LeaderElectionRecord, []byte, error) { } // Create attempts to create both primary lock and secondary lock -func (ml *MultiLock) Create(ler LeaderElectionRecord) error { - err := ml.Primary.Create(ler) +func (ml *MultiLock) Create(ctx context.Context, ler LeaderElectionRecord) error { + err := ml.Primary.Create(ctx, ler) if err != nil && !apierrors.IsAlreadyExists(err) { return err } - return ml.Secondary.Create(ler) + return ml.Secondary.Create(ctx, ler) } // Update will update and existing annotation on both two resources. -func (ml *MultiLock) Update(ler LeaderElectionRecord) error { - err := ml.Primary.Update(ler) +func (ml *MultiLock) Update(ctx context.Context, ler LeaderElectionRecord) error { + err := ml.Primary.Update(ctx, ler) if err != nil { return err } - _, _, err = ml.Secondary.Get() + _, _, err = ml.Secondary.Get(ctx) if err != nil && apierrors.IsNotFound(err) { - return ml.Secondary.Create(ler) + return ml.Secondary.Create(ctx, ler) } - return ml.Secondary.Update(ler) + return ml.Secondary.Update(ctx, ler) } // RecordEvent in leader election while adding meta-data diff --git a/vendor/k8s.io/client-go/tools/metrics/metrics.go b/vendor/k8s.io/client-go/tools/metrics/metrics.go index a01306c65d..5194026bdb 100644 --- a/vendor/k8s.io/client-go/tools/metrics/metrics.go +++ b/vendor/k8s.io/client-go/tools/metrics/metrics.go @@ -26,6 +26,16 @@ import ( var registerMetrics sync.Once +// DurationMetric is a measurement of some amount of time. +type DurationMetric interface { + Observe(duration time.Duration) +} + +// ExpiryMetric sets some time of expiry. If nil, assume not relevant. +type ExpiryMetric interface { + Set(expiry *time.Time) +} + // LatencyMetric observes client latency partitioned by verb and url. type LatencyMetric interface { Observe(verb string, u url.URL, latency time.Duration) @@ -37,21 +47,57 @@ type ResultMetric interface { } var ( + // ClientCertExpiry is the expiry time of a client certificate + ClientCertExpiry ExpiryMetric = noopExpiry{} + // ClientCertRotationAge is the age of a certificate that has just been rotated. + ClientCertRotationAge DurationMetric = noopDuration{} // RequestLatency is the latency metric that rest clients will update. RequestLatency LatencyMetric = noopLatency{} + // RateLimiterLatency is the client side rate limiter latency metric. + RateLimiterLatency LatencyMetric = noopLatency{} // RequestResult is the result metric that rest clients will update. RequestResult ResultMetric = noopResult{} ) +// RegisterOpts contains all the metrics to register. Metrics may be nil. +type RegisterOpts struct { + ClientCertExpiry ExpiryMetric + ClientCertRotationAge DurationMetric + RequestLatency LatencyMetric + RateLimiterLatency LatencyMetric + RequestResult ResultMetric +} + // Register registers metrics for the rest client to use. This can // only be called once. -func Register(lm LatencyMetric, rm ResultMetric) { +func Register(opts RegisterOpts) { registerMetrics.Do(func() { - RequestLatency = lm - RequestResult = rm + if opts.ClientCertExpiry != nil { + ClientCertExpiry = opts.ClientCertExpiry + } + if opts.ClientCertRotationAge != nil { + ClientCertRotationAge = opts.ClientCertRotationAge + } + if opts.RequestLatency != nil { + RequestLatency = opts.RequestLatency + } + if opts.RateLimiterLatency != nil { + RateLimiterLatency = opts.RateLimiterLatency + } + if opts.RequestResult != nil { + RequestResult = opts.RequestResult + } }) } +type noopDuration struct{} + +func (noopDuration) Observe(time.Duration) {} + +type noopExpiry struct{} + +func (noopExpiry) Set(*time.Time) {} + type noopLatency struct{} func (noopLatency) Observe(string, url.URL, time.Duration) {} diff --git a/vendor/k8s.io/client-go/tools/pager/pager.go b/vendor/k8s.io/client-go/tools/pager/pager.go index 307808be1e..f6c6a01298 100644 --- a/vendor/k8s.io/client-go/tools/pager/pager.go +++ b/vendor/k8s.io/client-go/tools/pager/pager.go @@ -73,16 +73,18 @@ func New(fn ListPageFunc) *ListPager { // List returns a single list object, but attempts to retrieve smaller chunks from the // server to reduce the impact on the server. If the chunk attempt fails, it will load // the full list instead. The Limit field on options, if unset, will default to the page size. -func (p *ListPager) List(ctx context.Context, options metav1.ListOptions) (runtime.Object, error) { +func (p *ListPager) List(ctx context.Context, options metav1.ListOptions) (runtime.Object, bool, error) { if options.Limit == 0 { options.Limit = p.PageSize } requestedResourceVersion := options.ResourceVersion var list *metainternalversion.List + paginatedResult := false + for { select { case <-ctx.Done(): - return nil, ctx.Err() + return nil, paginatedResult, ctx.Err() default: } @@ -93,23 +95,24 @@ func (p *ListPager) List(ctx context.Context, options metav1.ListOptions) (runti // failing when the resource versions is established by the first page request falls out of the compaction // during the subsequent list requests). if !errors.IsResourceExpired(err) || !p.FullListIfExpired || options.Continue == "" { - return nil, err + return nil, paginatedResult, err } // the list expired while we were processing, fall back to a full list at // the requested ResourceVersion. options.Limit = 0 options.Continue = "" options.ResourceVersion = requestedResourceVersion - return p.PageFn(ctx, options) + result, err := p.PageFn(ctx, options) + return result, paginatedResult, err } m, err := meta.ListAccessor(obj) if err != nil { - return nil, fmt.Errorf("returned object must be a list: %v", err) + return nil, paginatedResult, fmt.Errorf("returned object must be a list: %v", err) } // exit early and return the object we got if we haven't processed any pages if len(m.GetContinue()) == 0 && list == nil { - return obj, nil + return obj, paginatedResult, nil } // initialize the list and fill its contents @@ -122,12 +125,12 @@ func (p *ListPager) List(ctx context.Context, options metav1.ListOptions) (runti list.Items = append(list.Items, obj) return nil }); err != nil { - return nil, err + return nil, paginatedResult, err } // if we have no more items, return the list if len(m.GetContinue()) == 0 { - return list, nil + return list, paginatedResult, nil } // set the next loop up @@ -136,6 +139,8 @@ func (p *ListPager) List(ctx context.Context, options metav1.ListOptions) (runti // `specifying resource version is not allowed when using continue` error. // See https://github.com/kubernetes/kubernetes/issues/85221#issuecomment-553748143. options.ResourceVersion = "" + // At this point, result is already paginated. + paginatedResult = true } } diff --git a/vendor/k8s.io/client-go/tools/record/event.go b/vendor/k8s.io/client-go/tools/record/event.go index 66f8bd634e..64d1fd2d78 100644 --- a/vendor/k8s.io/client-go/tools/record/event.go +++ b/vendor/k8s.io/client-go/tools/record/event.go @@ -102,9 +102,6 @@ type EventRecorder interface { // Eventf is just like Event, but with Sprintf for the message field. Eventf(object runtime.Object, eventtype, reason, messageFmt string, args ...interface{}) - // PastEventf is just like Eventf, but with an option to specify the event's 'timestamp' field. - PastEventf(object runtime.Object, timestamp metav1.Time, eventtype, reason, messageFmt string, args ...interface{}) - // AnnotatedEventf is just like eventf, but with annotations attached AnnotatedEventf(object runtime.Object, annotations map[string]string, eventtype, reason, messageFmt string, args ...interface{}) } @@ -343,10 +340,6 @@ func (recorder *recorderImpl) Eventf(object runtime.Object, eventtype, reason, m recorder.Event(object, eventtype, reason, fmt.Sprintf(messageFmt, args...)) } -func (recorder *recorderImpl) PastEventf(object runtime.Object, timestamp metav1.Time, eventtype, reason, messageFmt string, args ...interface{}) { - recorder.generateEvent(object, nil, timestamp, eventtype, reason, fmt.Sprintf(messageFmt, args...)) -} - func (recorder *recorderImpl) AnnotatedEventf(object runtime.Object, annotations map[string]string, eventtype, reason, messageFmt string, args ...interface{}) { recorder.generateEvent(object, annotations, metav1.Now(), eventtype, reason, fmt.Sprintf(messageFmt, args...)) } diff --git a/vendor/k8s.io/client-go/tools/record/fake.go b/vendor/k8s.io/client-go/tools/record/fake.go index 6e031daaff..2ff444ea88 100644 --- a/vendor/k8s.io/client-go/tools/record/fake.go +++ b/vendor/k8s.io/client-go/tools/record/fake.go @@ -19,7 +19,6 @@ package record import ( "fmt" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" ) @@ -42,11 +41,8 @@ func (f *FakeRecorder) Eventf(object runtime.Object, eventtype, reason, messageF } } -func (f *FakeRecorder) PastEventf(object runtime.Object, timestamp metav1.Time, eventtype, reason, messageFmt string, args ...interface{}) { -} - func (f *FakeRecorder) AnnotatedEventf(object runtime.Object, annotations map[string]string, eventtype, reason, messageFmt string, args ...interface{}) { - f.Eventf(object, eventtype, reason, messageFmt, args) + f.Eventf(object, eventtype, reason, messageFmt, args...) } // NewFakeRecorder creates new fake event recorder with event channel with diff --git a/vendor/k8s.io/client-go/transport/cache.go b/vendor/k8s.io/client-go/transport/cache.go index 980d36ae12..36d6500f58 100644 --- a/vendor/k8s.io/client-go/transport/cache.go +++ b/vendor/k8s.io/client-go/transport/cache.go @@ -25,6 +25,7 @@ import ( "time" utilnet "k8s.io/apimachinery/pkg/util/net" + "k8s.io/apimachinery/pkg/util/wait" ) // TlsTransportCache caches TLS http.RoundTrippers different configurations. The @@ -44,6 +45,8 @@ type tlsCacheKey struct { caData string certData string keyData string + certFile string + keyFile string getCert string serverName string nextProtos string @@ -91,6 +94,16 @@ func (c *tlsTransportCache) get(config *Config) (http.RoundTripper, error) { KeepAlive: 30 * time.Second, }).DialContext } + + // If we use are reloading files, we need to handle certificate rotation properly + // TODO(jackkleeman): We can also add rotation here when config.HasCertCallback() is true + if config.TLS.ReloadTLSFiles { + dynamicCertDialer := certRotatingDialer(tlsConfig.GetClientCertificate, dial) + tlsConfig.GetClientCertificate = dynamicCertDialer.GetClientCertificate + dial = dynamicCertDialer.connDialer.DialContext + go dynamicCertDialer.Run(wait.NeverStop) + } + // Cache a single transport for these options c.transports[key] = utilnet.SetTransportDefaults(&http.Transport{ Proxy: http.ProxyFromEnvironment, @@ -109,15 +122,23 @@ func tlsConfigKey(c *Config) (tlsCacheKey, error) { if err := loadTLSFiles(c); err != nil { return tlsCacheKey{}, err } - return tlsCacheKey{ + k := tlsCacheKey{ insecure: c.TLS.Insecure, caData: string(c.TLS.CAData), - certData: string(c.TLS.CertData), - keyData: string(c.TLS.KeyData), getCert: fmt.Sprintf("%p", c.TLS.GetCert), serverName: c.TLS.ServerName, nextProtos: strings.Join(c.TLS.NextProtos, ","), dial: fmt.Sprintf("%p", c.Dial), disableCompression: c.DisableCompression, - }, nil + } + + if c.TLS.ReloadTLSFiles { + k.certFile = c.TLS.CertFile + k.keyFile = c.TLS.KeyFile + } else { + k.certData = string(c.TLS.CertData) + k.keyData = string(c.TLS.KeyData) + } + + return k, nil } diff --git a/vendor/k8s.io/client-go/transport/cert_rotation.go b/vendor/k8s.io/client-go/transport/cert_rotation.go new file mode 100644 index 0000000000..918e77f9a7 --- /dev/null +++ b/vendor/k8s.io/client-go/transport/cert_rotation.go @@ -0,0 +1,176 @@ +/* +Copyright 2020 The Kubernetes 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. +*/ + +package transport + +import ( + "bytes" + "crypto/tls" + "fmt" + "reflect" + "sync" + "time" + + utilnet "k8s.io/apimachinery/pkg/util/net" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" + "k8s.io/apimachinery/pkg/util/wait" + "k8s.io/client-go/util/connrotation" + "k8s.io/client-go/util/workqueue" + "k8s.io/klog" +) + +const workItemKey = "key" + +// CertCallbackRefreshDuration is exposed so that integration tests can crank up the reload speed. +var CertCallbackRefreshDuration = 5 * time.Minute + +type reloadFunc func(*tls.CertificateRequestInfo) (*tls.Certificate, error) + +type dynamicClientCert struct { + clientCert *tls.Certificate + certMtx sync.RWMutex + + reload reloadFunc + connDialer *connrotation.Dialer + + // queue only ever has one item, but it has nice error handling backoff/retry semantics + queue workqueue.RateLimitingInterface +} + +func certRotatingDialer(reload reloadFunc, dial utilnet.DialFunc) *dynamicClientCert { + d := &dynamicClientCert{ + reload: reload, + connDialer: connrotation.NewDialer(connrotation.DialFunc(dial)), + queue: workqueue.NewNamedRateLimitingQueue(workqueue.DefaultControllerRateLimiter(), "DynamicClientCertificate"), + } + + return d +} + +// loadClientCert calls the callback and rotates connections if needed +func (c *dynamicClientCert) loadClientCert() (*tls.Certificate, error) { + cert, err := c.reload(nil) + if err != nil { + return nil, err + } + + // check to see if we have a change. If the values are the same, do nothing. + c.certMtx.RLock() + haveCert := c.clientCert != nil + if certsEqual(c.clientCert, cert) { + c.certMtx.RUnlock() + return c.clientCert, nil + } + c.certMtx.RUnlock() + + c.certMtx.Lock() + c.clientCert = cert + c.certMtx.Unlock() + + // The first certificate requested is not a rotation that is worth closing connections for + if !haveCert { + return cert, nil + } + + klog.V(1).Infof("certificate rotation detected, shutting down client connections to start using new credentials") + c.connDialer.CloseAll() + + return cert, nil +} + +// certsEqual compares tls Certificates, ignoring the Leaf which may get filled in dynamically +func certsEqual(left, right *tls.Certificate) bool { + if left == nil || right == nil { + return left == right + } + + if !byteMatrixEqual(left.Certificate, right.Certificate) { + return false + } + + if !reflect.DeepEqual(left.PrivateKey, right.PrivateKey) { + return false + } + + if !byteMatrixEqual(left.SignedCertificateTimestamps, right.SignedCertificateTimestamps) { + return false + } + + if !bytes.Equal(left.OCSPStaple, right.OCSPStaple) { + return false + } + + return true +} + +func byteMatrixEqual(left, right [][]byte) bool { + if len(left) != len(right) { + return false + } + + for i := range left { + if !bytes.Equal(left[i], right[i]) { + return false + } + } + return true +} + +// run starts the controller and blocks until stopCh is closed. +func (c *dynamicClientCert) Run(stopCh <-chan struct{}) { + defer utilruntime.HandleCrash() + defer c.queue.ShutDown() + + klog.V(3).Infof("Starting client certificate rotation controller") + defer klog.V(3).Infof("Shutting down client certificate rotation controller") + + go wait.Until(c.runWorker, time.Second, stopCh) + + go wait.PollImmediateUntil(CertCallbackRefreshDuration, func() (bool, error) { + c.queue.Add(workItemKey) + return false, nil + }, stopCh) + + <-stopCh +} + +func (c *dynamicClientCert) runWorker() { + for c.processNextWorkItem() { + } +} + +func (c *dynamicClientCert) processNextWorkItem() bool { + dsKey, quit := c.queue.Get() + if quit { + return false + } + defer c.queue.Done(dsKey) + + _, err := c.loadClientCert() + if err == nil { + c.queue.Forget(dsKey) + return true + } + + utilruntime.HandleError(fmt.Errorf("%v failed with : %v", dsKey, err)) + c.queue.AddRateLimited(dsKey) + + return true +} + +func (c *dynamicClientCert) GetClientCertificate(*tls.CertificateRequestInfo) (*tls.Certificate, error) { + return c.loadClientCert() +} diff --git a/vendor/k8s.io/client-go/transport/config.go b/vendor/k8s.io/client-go/transport/config.go index 9e18d11d38..c20a4a8fcb 100644 --- a/vendor/k8s.io/client-go/transport/config.go +++ b/vendor/k8s.io/client-go/transport/config.go @@ -115,9 +115,10 @@ func (c *Config) Wrap(fn WrapperFunc) { // TLSConfig holds the information needed to set up a TLS transport. type TLSConfig struct { - CAFile string // Path of the PEM-encoded server trusted root certificates. - CertFile string // Path of the PEM-encoded client certificate. - KeyFile string // Path of the PEM-encoded client key. + CAFile string // Path of the PEM-encoded server trusted root certificates. + CertFile string // Path of the PEM-encoded client certificate. + KeyFile string // Path of the PEM-encoded client key. + ReloadTLSFiles bool // Set to indicate that the original config provided files, and that they should be reloaded Insecure bool // Server should be accessed without verifying the certificate. For testing only. ServerName string // Override for the server name passed to the server for SNI and used to verify certificates. diff --git a/vendor/k8s.io/client-go/transport/transport.go b/vendor/k8s.io/client-go/transport/transport.go index cd8de98285..143ebfa5c8 100644 --- a/vendor/k8s.io/client-go/transport/transport.go +++ b/vendor/k8s.io/client-go/transport/transport.go @@ -23,6 +23,8 @@ import ( "fmt" "io/ioutil" "net/http" + "sync" + "time" utilnet "k8s.io/apimachinery/pkg/util/net" "k8s.io/klog" @@ -81,7 +83,8 @@ func TLSConfigFor(c *Config) (*tls.Config, error) { } var staticCert *tls.Certificate - if c.HasCertAuth() { + // Treat cert as static if either key or cert was data, not a file + if c.HasCertAuth() && !c.TLS.ReloadTLSFiles { // If key/cert were provided, verify them before setting up // tlsConfig.GetClientCertificate. cert, err := tls.X509KeyPair(c.TLS.CertData, c.TLS.KeyData) @@ -91,6 +94,11 @@ func TLSConfigFor(c *Config) (*tls.Config, error) { staticCert = &cert } + var dynamicCertLoader func() (*tls.Certificate, error) + if c.TLS.ReloadTLSFiles { + dynamicCertLoader = cachingCertificateLoader(c.TLS.CertFile, c.TLS.KeyFile) + } + if c.HasCertAuth() || c.HasCertCallback() { tlsConfig.GetClientCertificate = func(*tls.CertificateRequestInfo) (*tls.Certificate, error) { // Note: static key/cert data always take precedence over cert @@ -98,6 +106,10 @@ func TLSConfigFor(c *Config) (*tls.Config, error) { if staticCert != nil { return staticCert, nil } + // key/cert files lead to ReloadTLSFiles being set - takes precedence over cert callback + if dynamicCertLoader != nil { + return dynamicCertLoader() + } if c.HasCertCallback() { cert, err := c.TLS.GetCert() if err != nil { @@ -129,6 +141,11 @@ func loadTLSFiles(c *Config) error { return err } + // Check that we are purely loading from files + if len(c.TLS.CertFile) > 0 && len(c.TLS.CertData) == 0 && len(c.TLS.KeyFile) > 0 && len(c.TLS.KeyData) == 0 { + c.TLS.ReloadTLSFiles = true + } + c.TLS.CertData, err = dataFromSliceOrFile(c.TLS.CertData, c.TLS.CertFile) if err != nil { return err @@ -243,3 +260,44 @@ func tryCancelRequest(rt http.RoundTripper, req *http.Request) { klog.Warningf("Unable to cancel request for %T", rt) } } + +type certificateCacheEntry struct { + cert *tls.Certificate + err error + birth time.Time +} + +// isStale returns true when this cache entry is too old to be usable +func (c *certificateCacheEntry) isStale() bool { + return time.Now().Sub(c.birth) > time.Second +} + +func newCertificateCacheEntry(certFile, keyFile string) certificateCacheEntry { + cert, err := tls.LoadX509KeyPair(certFile, keyFile) + return certificateCacheEntry{cert: &cert, err: err, birth: time.Now()} +} + +// cachingCertificateLoader ensures that we don't hammer the filesystem when opening many connections +// the underlying cert files are read at most once every second +func cachingCertificateLoader(certFile, keyFile string) func() (*tls.Certificate, error) { + current := newCertificateCacheEntry(certFile, keyFile) + var currentMtx sync.RWMutex + + return func() (*tls.Certificate, error) { + currentMtx.RLock() + if current.isStale() { + currentMtx.RUnlock() + + currentMtx.Lock() + defer currentMtx.Unlock() + + if current.isStale() { + current = newCertificateCacheEntry(certFile, keyFile) + } + } else { + defer currentMtx.RUnlock() + } + + return current.cert, current.err + } +} diff --git a/vendor/k8s.io/client-go/util/workqueue/default_rate_limiters.go b/vendor/k8s.io/client-go/util/workqueue/default_rate_limiters.go index 71bb6322e0..6dc8ec5f22 100644 --- a/vendor/k8s.io/client-go/util/workqueue/default_rate_limiters.go +++ b/vendor/k8s.io/client-go/util/workqueue/default_rate_limiters.go @@ -62,6 +62,54 @@ func (r *BucketRateLimiter) NumRequeues(item interface{}) int { func (r *BucketRateLimiter) Forget(item interface{}) { } +// ItemBucketRateLimiter implements a workqueue ratelimiter API using standard rate.Limiter. +// Each key is using a separate limiter. +type ItemBucketRateLimiter struct { + r rate.Limit + burst int + + limitersLock sync.Mutex + limiters map[interface{}]*rate.Limiter +} + +var _ RateLimiter = &ItemBucketRateLimiter{} + +// NewItemBucketRateLimiter creates new ItemBucketRateLimiter instance. +func NewItemBucketRateLimiter(r rate.Limit, burst int) *ItemBucketRateLimiter { + return &ItemBucketRateLimiter{ + r: r, + burst: burst, + limiters: make(map[interface{}]*rate.Limiter), + } +} + +// When returns a time.Duration which we need to wait before item is processed. +func (r *ItemBucketRateLimiter) When(item interface{}) time.Duration { + r.limitersLock.Lock() + defer r.limitersLock.Unlock() + + limiter, ok := r.limiters[item] + if !ok { + limiter = rate.NewLimiter(r.r, r.burst) + r.limiters[item] = limiter + } + + return limiter.Reserve().Delay() +} + +// NumRequeues returns always 0 (doesn't apply to ItemBucketRateLimiter). +func (r *ItemBucketRateLimiter) NumRequeues(item interface{}) int { + return 0 +} + +// Forget removes item from the internal state. +func (r *ItemBucketRateLimiter) Forget(item interface{}) { + r.limitersLock.Lock() + defer r.limitersLock.Unlock() + + delete(r.limiters, item) +} + // ItemExponentialFailureRateLimiter does a simple baseDelay*2^ limit // dealing with max failures and expiration are up to the caller type ItemExponentialFailureRateLimiter struct { diff --git a/vendor/k8s.io/client-go/util/workqueue/metrics.go b/vendor/k8s.io/client-go/util/workqueue/metrics.go index a3911bf2d6..556e6432eb 100644 --- a/vendor/k8s.io/client-go/util/workqueue/metrics.go +++ b/vendor/k8s.io/client-go/util/workqueue/metrics.go @@ -131,16 +131,14 @@ func (m *defaultQueueMetrics) updateUnfinishedWork() { var total float64 var oldest float64 for _, t := range m.processingStartTimes { - age := m.sinceInMicroseconds(t) + age := m.sinceInSeconds(t) total += age if age > oldest { oldest = age } } - // Convert to seconds; microseconds is unhelpfully granular for this. - total /= 1000000 m.unfinishedWorkSeconds.Set(total) - m.longestRunningProcessor.Set(oldest / 1000000) + m.longestRunningProcessor.Set(oldest) } type noMetrics struct{} @@ -150,11 +148,6 @@ func (noMetrics) get(item t) {} func (noMetrics) done(item t) {} func (noMetrics) updateUnfinishedWork() {} -// Gets the time since the specified start in microseconds. -func (m *defaultQueueMetrics) sinceInMicroseconds(start time.Time) float64 { - return float64(m.clock.Since(start).Nanoseconds() / time.Microsecond.Nanoseconds()) -} - // Gets the time since the specified start in seconds. func (m *defaultQueueMetrics) sinceInSeconds(start time.Time) float64 { return m.clock.Since(start).Seconds() diff --git a/vendor/k8s.io/code-generator/cmd/client-gen/args/args.go b/vendor/k8s.io/code-generator/cmd/client-gen/args/args.go index f45be1bb83..949369cd70 100644 --- a/vendor/k8s.io/code-generator/cmd/client-gen/args/args.go +++ b/vendor/k8s.io/code-generator/cmd/client-gen/args/args.go @@ -49,6 +49,9 @@ type CustomArgs struct { ClientsetOnly bool // FakeClient determines if client-gen generates the fake clients. FakeClient bool + // PluralExceptions specify list of exceptions used when pluralizing certain types. + // For example 'Endpoints:Endpoints', otherwise the pluralizer will generate 'Endpointes'. + PluralExceptions []string } func NewDefaults() (*args.GeneratorArgs, *CustomArgs) { @@ -58,6 +61,7 @@ func NewDefaults() (*args.GeneratorArgs, *CustomArgs) { ClientsetAPIPath: "/apis", ClientsetOnly: false, FakeClient: true, + PluralExceptions: []string{"Endpoints:Endpoints"}, } genericArgs.CustomArgs = customArgs genericArgs.InputDirs = DefaultInputDirs @@ -79,6 +83,8 @@ func (ca *CustomArgs) AddFlags(fs *pflag.FlagSet, inputBase string) { pflag.BoolVar(&ca.ClientsetOnly, "clientset-only", ca.ClientsetOnly, "when set, client-gen only generates the clientset shell, without generating the individual typed clients") pflag.BoolVar(&ca.FakeClient, "fake-clientset", ca.FakeClient, "when set, client-gen will generate the fake clientset that can be used in tests") + fs.StringSliceVar(&ca.PluralExceptions, "plural-exceptions", ca.PluralExceptions, "list of comma separated plural exception definitions in Type:PluralizedType form") + // support old flags fs.SetNormalizeFunc(mapFlagName("clientset-path", "output-package", fs.GetNormalizeFunc())) } diff --git a/vendor/k8s.io/code-generator/cmd/client-gen/generators/client_generator.go b/vendor/k8s.io/code-generator/cmd/client-gen/generators/client_generator.go index 18980744f0..a678a357bb 100644 --- a/vendor/k8s.io/code-generator/cmd/client-gen/generators/client_generator.go +++ b/vendor/k8s.io/code-generator/cmd/client-gen/generators/client_generator.go @@ -37,10 +37,7 @@ import ( ) // NameSystems returns the name system used by the generators in this package. -func NameSystems() namer.NameSystems { - pluralExceptions := map[string]string{ - "Endpoints": "Endpoints", - } +func NameSystems(pluralExceptions map[string]string) namer.NameSystems { lowercaseNamer := namer.NewAllLowercasePluralNamer(pluralExceptions) publicNamer := &ExceptionNamer{ diff --git a/vendor/k8s.io/code-generator/cmd/client-gen/generators/fake/generator_fake_for_type.go b/vendor/k8s.io/code-generator/cmd/client-gen/generators/fake/generator_fake_for_type.go index f5888aef15..ebd8506ec9 100644 --- a/vendor/k8s.io/code-generator/cmd/client-gen/generators/fake/generator_fake_for_type.go +++ b/vendor/k8s.io/code-generator/cmd/client-gen/generators/fake/generator_fake_for_type.go @@ -122,9 +122,12 @@ func (g *genFakeForType) GenerateType(c *generator.Context, t *types.Type, w io. "group": canonicalGroup, "groupName": groupName, "version": g.version, + "CreateOptions": c.Universe.Type(types.Name{Package: "k8s.io/apimachinery/pkg/apis/meta/v1", Name: "CreateOptions"}), "DeleteOptions": c.Universe.Type(types.Name{Package: "k8s.io/apimachinery/pkg/apis/meta/v1", Name: "DeleteOptions"}), - "ListOptions": c.Universe.Type(types.Name{Package: "k8s.io/apimachinery/pkg/apis/meta/v1", Name: "ListOptions"}), "GetOptions": c.Universe.Type(types.Name{Package: "k8s.io/apimachinery/pkg/apis/meta/v1", Name: "GetOptions"}), + "ListOptions": c.Universe.Type(types.Name{Package: "k8s.io/apimachinery/pkg/apis/meta/v1", Name: "ListOptions"}), + "PatchOptions": c.Universe.Type(types.Name{Package: "k8s.io/apimachinery/pkg/apis/meta/v1", Name: "PatchOptions"}), + "UpdateOptions": c.Universe.Type(types.Name{Package: "k8s.io/apimachinery/pkg/apis/meta/v1", Name: "UpdateOptions"}), "Everything": c.Universe.Function(types.Name{Package: "k8s.io/apimachinery/pkg/labels", Name: "Everything"}), "GroupVersionResource": c.Universe.Type(types.Name{Package: "k8s.io/apimachinery/pkg/runtime/schema", Name: "GroupVersionResource"}), "GroupVersionKind": c.Universe.Type(types.Name{Package: "k8s.io/apimachinery/pkg/runtime/schema", Name: "GroupVersionKind"}), @@ -309,7 +312,7 @@ var $.type|allLowercasePlural$Kind = $.GroupVersionKind|raw${Group: "$.groupName var listTemplate = ` // List takes label and field selectors, and returns the list of $.type|publicPlural$ that match those selectors. -func (c *Fake$.type|publicPlural$) List(opts $.ListOptions|raw$) (result *$.type|raw$List, err error) { +func (c *Fake$.type|publicPlural$) List(ctx context.Context, opts $.ListOptions|raw$) (result *$.type|raw$List, err error) { obj, err := c.Fake. $if .namespaced$Invokes($.NewListAction|raw$($.type|allLowercasePlural$Resource, $.type|allLowercasePlural$Kind, c.ns, opts), &$.type|raw$List{}) $else$Invokes($.NewRootListAction|raw$($.type|allLowercasePlural$Resource, $.type|allLowercasePlural$Kind, opts), &$.type|raw$List{})$end$ @@ -322,7 +325,7 @@ func (c *Fake$.type|publicPlural$) List(opts $.ListOptions|raw$) (result *$.type var listUsingOptionsTemplate = ` // List takes label and field selectors, and returns the list of $.type|publicPlural$ that match those selectors. -func (c *Fake$.type|publicPlural$) List(opts $.ListOptions|raw$) (result *$.type|raw$List, err error) { +func (c *Fake$.type|publicPlural$) List(ctx context.Context, opts $.ListOptions|raw$) (result *$.type|raw$List, err error) { obj, err := c.Fake. $if .namespaced$Invokes($.NewListAction|raw$($.type|allLowercasePlural$Resource, $.type|allLowercasePlural$Kind, c.ns, opts), &$.type|raw$List{}) $else$Invokes($.NewRootListAction|raw$($.type|allLowercasePlural$Resource, $.type|allLowercasePlural$Kind, opts), &$.type|raw$List{})$end$ @@ -346,7 +349,7 @@ func (c *Fake$.type|publicPlural$) List(opts $.ListOptions|raw$) (result *$.type var getTemplate = ` // Get takes name of the $.type|private$, and returns the corresponding $.resultType|private$ object, and an error if there is any. -func (c *Fake$.type|publicPlural$) Get(name string, options $.GetOptions|raw$) (result *$.resultType|raw$, err error) { +func (c *Fake$.type|publicPlural$) Get(ctx context.Context, name string, options $.GetOptions|raw$) (result *$.resultType|raw$, err error) { obj, err := c.Fake. $if .namespaced$Invokes($.NewGetAction|raw$($.type|allLowercasePlural$Resource, c.ns, name), &$.resultType|raw${}) $else$Invokes($.NewRootGetAction|raw$($.type|allLowercasePlural$Resource, name), &$.resultType|raw${})$end$ @@ -359,7 +362,7 @@ func (c *Fake$.type|publicPlural$) Get(name string, options $.GetOptions|raw$) ( var getSubresourceTemplate = ` // Get takes name of the $.type|private$, and returns the corresponding $.resultType|private$ object, and an error if there is any. -func (c *Fake$.type|publicPlural$) Get($.type|private$Name string, options $.GetOptions|raw$) (result *$.resultType|raw$, err error) { +func (c *Fake$.type|publicPlural$) Get(ctx context.Context, $.type|private$Name string, options $.GetOptions|raw$) (result *$.resultType|raw$, err error) { obj, err := c.Fake. $if .namespaced$Invokes($.NewGetSubresourceAction|raw$($.type|allLowercasePlural$Resource, c.ns, "$.subresourcePath$", $.type|private$Name), &$.resultType|raw${}) $else$Invokes($.NewRootGetSubresourceAction|raw$($.type|allLowercasePlural$Resource, "$.subresourcePath$", $.type|private$Name), &$.resultType|raw${})$end$ @@ -372,7 +375,7 @@ func (c *Fake$.type|publicPlural$) Get($.type|private$Name string, options $.Get var deleteTemplate = ` // Delete takes name of the $.type|private$ and deletes it. Returns an error if one occurs. -func (c *Fake$.type|publicPlural$) Delete(name string, options *$.DeleteOptions|raw$) error { +func (c *Fake$.type|publicPlural$) Delete(ctx context.Context, name string, opts $.DeleteOptions|raw$) error { _, err := c.Fake. $if .namespaced$Invokes($.NewDeleteAction|raw$($.type|allLowercasePlural$Resource, c.ns, name), &$.type|raw${}) $else$Invokes($.NewRootDeleteAction|raw$($.type|allLowercasePlural$Resource, name), &$.type|raw${})$end$ @@ -382,9 +385,9 @@ func (c *Fake$.type|publicPlural$) Delete(name string, options *$.DeleteOptions| var deleteCollectionTemplate = ` // DeleteCollection deletes a collection of objects. -func (c *Fake$.type|publicPlural$) DeleteCollection(options *$.DeleteOptions|raw$, listOptions $.ListOptions|raw$) error { - $if .namespaced$action := $.NewDeleteCollectionAction|raw$($.type|allLowercasePlural$Resource, c.ns, listOptions) - $else$action := $.NewRootDeleteCollectionAction|raw$($.type|allLowercasePlural$Resource, listOptions) +func (c *Fake$.type|publicPlural$) DeleteCollection(ctx context.Context, opts $.DeleteOptions|raw$, listOpts $.ListOptions|raw$) error { + $if .namespaced$action := $.NewDeleteCollectionAction|raw$($.type|allLowercasePlural$Resource, c.ns, listOpts) + $else$action := $.NewRootDeleteCollectionAction|raw$($.type|allLowercasePlural$Resource, listOpts) $end$ _, err := c.Fake.Invokes(action, &$.type|raw$List{}) return err @@ -392,7 +395,7 @@ func (c *Fake$.type|publicPlural$) DeleteCollection(options *$.DeleteOptions|raw ` var createTemplate = ` // Create takes the representation of a $.inputType|private$ and creates it. Returns the server's representation of the $.resultType|private$, and an error, if there is any. -func (c *Fake$.type|publicPlural$) Create($.inputType|private$ *$.inputType|raw$) (result *$.resultType|raw$, err error) { +func (c *Fake$.type|publicPlural$) Create(ctx context.Context, $.inputType|private$ *$.inputType|raw$, opts $.CreateOptions|raw$) (result *$.resultType|raw$, err error) { obj, err := c.Fake. $if .namespaced$Invokes($.NewCreateAction|raw$($.inputType|allLowercasePlural$Resource, c.ns, $.inputType|private$), &$.resultType|raw${}) $else$Invokes($.NewRootCreateAction|raw$($.inputType|allLowercasePlural$Resource, $.inputType|private$), &$.resultType|raw${})$end$ @@ -405,7 +408,7 @@ func (c *Fake$.type|publicPlural$) Create($.inputType|private$ *$.inputType|raw$ var createSubresourceTemplate = ` // Create takes the representation of a $.inputType|private$ and creates it. Returns the server's representation of the $.resultType|private$, and an error, if there is any. -func (c *Fake$.type|publicPlural$) Create($.type|private$Name string, $.inputType|private$ *$.inputType|raw$) (result *$.resultType|raw$, err error) { +func (c *Fake$.type|publicPlural$) Create(ctx context.Context, $.type|private$Name string, $.inputType|private$ *$.inputType|raw$, opts $.CreateOptions|raw$) (result *$.resultType|raw$, err error) { obj, err := c.Fake. $if .namespaced$Invokes($.NewCreateSubresourceAction|raw$($.type|allLowercasePlural$Resource, $.type|private$Name, "$.subresourcePath$", c.ns, $.inputType|private$), &$.resultType|raw${}) $else$Invokes($.NewRootCreateSubresourceAction|raw$($.type|allLowercasePlural$Resource, "$.subresourcePath$", $.inputType|private$), &$.resultType|raw${})$end$ @@ -418,7 +421,7 @@ func (c *Fake$.type|publicPlural$) Create($.type|private$Name string, $.inputTyp var updateTemplate = ` // Update takes the representation of a $.inputType|private$ and updates it. Returns the server's representation of the $.resultType|private$, and an error, if there is any. -func (c *Fake$.type|publicPlural$) Update($.inputType|private$ *$.inputType|raw$) (result *$.resultType|raw$, err error) { +func (c *Fake$.type|publicPlural$) Update(ctx context.Context, $.inputType|private$ *$.inputType|raw$, opts $.UpdateOptions|raw$) (result *$.resultType|raw$, err error) { obj, err := c.Fake. $if .namespaced$Invokes($.NewUpdateAction|raw$($.inputType|allLowercasePlural$Resource, c.ns, $.inputType|private$), &$.resultType|raw${}) $else$Invokes($.NewRootUpdateAction|raw$($.inputType|allLowercasePlural$Resource, $.inputType|private$), &$.resultType|raw${})$end$ @@ -431,7 +434,7 @@ func (c *Fake$.type|publicPlural$) Update($.inputType|private$ *$.inputType|raw$ var updateSubresourceTemplate = ` // Update takes the representation of a $.inputType|private$ and updates it. Returns the server's representation of the $.resultType|private$, and an error, if there is any. -func (c *Fake$.type|publicPlural$) Update($.type|private$Name string, $.inputType|private$ *$.inputType|raw$) (result *$.resultType|raw$, err error) { +func (c *Fake$.type|publicPlural$) Update(ctx context.Context, $.type|private$Name string, $.inputType|private$ *$.inputType|raw$, opts $.UpdateOptions|raw$) (result *$.resultType|raw$, err error) { obj, err := c.Fake. $if .namespaced$Invokes($.NewUpdateSubresourceAction|raw$($.type|allLowercasePlural$Resource, "$.subresourcePath$", c.ns, $.inputType|private$), &$.inputType|raw${}) $else$Invokes($.NewRootUpdateSubresourceAction|raw$($.type|allLowercasePlural$Resource, "$.subresourcePath$", $.inputType|private$), &$.resultType|raw${})$end$ @@ -445,7 +448,7 @@ func (c *Fake$.type|publicPlural$) Update($.type|private$Name string, $.inputTyp var updateStatusTemplate = ` // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *Fake$.type|publicPlural$) UpdateStatus($.type|private$ *$.type|raw$) (*$.type|raw$, error) { +func (c *Fake$.type|publicPlural$) UpdateStatus(ctx context.Context, $.type|private$ *$.type|raw$, opts $.UpdateOptions|raw$) (*$.type|raw$, error) { obj, err := c.Fake. $if .namespaced$Invokes($.NewUpdateSubresourceAction|raw$($.type|allLowercasePlural$Resource, "status", c.ns, $.type|private$), &$.type|raw${}) $else$Invokes($.NewRootUpdateSubresourceAction|raw$($.type|allLowercasePlural$Resource, "status", $.type|private$), &$.type|raw${})$end$ @@ -458,7 +461,7 @@ func (c *Fake$.type|publicPlural$) UpdateStatus($.type|private$ *$.type|raw$) (* var watchTemplate = ` // Watch returns a $.watchInterface|raw$ that watches the requested $.type|privatePlural$. -func (c *Fake$.type|publicPlural$) Watch(opts $.ListOptions|raw$) ($.watchInterface|raw$, error) { +func (c *Fake$.type|publicPlural$) Watch(ctx context.Context, opts $.ListOptions|raw$) ($.watchInterface|raw$, error) { return c.Fake. $if .namespaced$InvokesWatch($.NewWatchAction|raw$($.type|allLowercasePlural$Resource, c.ns, opts)) $else$InvokesWatch($.NewRootWatchAction|raw$($.type|allLowercasePlural$Resource, opts))$end$ @@ -467,7 +470,7 @@ func (c *Fake$.type|publicPlural$) Watch(opts $.ListOptions|raw$) ($.watchInterf var patchTemplate = ` // Patch applies the patch and returns the patched $.resultType|private$. -func (c *Fake$.type|publicPlural$) Patch(name string, pt $.PatchType|raw$, data []byte, subresources ...string) (result *$.resultType|raw$, err error) { +func (c *Fake$.type|publicPlural$) Patch(ctx context.Context, name string, pt $.PatchType|raw$, data []byte, opts $.PatchOptions|raw$, subresources ...string) (result *$.resultType|raw$, err error) { obj, err := c.Fake. $if .namespaced$Invokes($.NewPatchSubresourceAction|raw$($.type|allLowercasePlural$Resource, c.ns, name, pt, data, subresources... ), &$.resultType|raw${}) $else$Invokes($.NewRootPatchSubresourceAction|raw$($.type|allLowercasePlural$Resource, name, pt, data, subresources...), &$.resultType|raw${})$end$ diff --git a/vendor/k8s.io/code-generator/cmd/client-gen/generators/generator_for_clientset.go b/vendor/k8s.io/code-generator/cmd/client-gen/generators/generator_for_clientset.go index f7254343bd..20e8796bfa 100644 --- a/vendor/k8s.io/code-generator/cmd/client-gen/generators/generator_for_clientset.go +++ b/vendor/k8s.io/code-generator/cmd/client-gen/generators/generator_for_clientset.go @@ -140,7 +140,7 @@ func NewForConfig(c *$.Config|raw$) (*Clientset, error) { configShallowCopy := *c if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 { if configShallowCopy.Burst <= 0 { - return nil, fmt.Errorf("Burst is required to be greater than 0 when RateLimiter is not set and QPS is set to greater than 0") + return nil, fmt.Errorf("burst is required to be greater than 0 when RateLimiter is not set and QPS is set to greater than 0") } configShallowCopy.RateLimiter = $.flowcontrolNewTokenBucketRateLimiter|raw$(configShallowCopy.QPS, configShallowCopy.Burst) } diff --git a/vendor/k8s.io/code-generator/cmd/client-gen/generators/generator_for_type.go b/vendor/k8s.io/code-generator/cmd/client-gen/generators/generator_for_type.go index 3e8fc7c4c6..13664d0d92 100644 --- a/vendor/k8s.io/code-generator/cmd/client-gen/generators/generator_for_type.go +++ b/vendor/k8s.io/code-generator/cmd/client-gen/generators/generator_for_type.go @@ -43,7 +43,9 @@ type genClientForType struct { var _ generator.Generator = &genClientForType{} // Filter ignores all but one type because we're making a single file per type. -func (g *genClientForType) Filter(c *generator.Context, t *types.Type) bool { return t == g.typeToMatch } +func (g *genClientForType) Filter(c *generator.Context, t *types.Type) bool { + return t == g.typeToMatch +} func (g *genClientForType) Namers(c *generator.Context) namer.NameSystems { return namer.NameSystems{ @@ -116,9 +118,10 @@ func (g *genClientForType) GenerateType(c *generator.Context, t *types.Type, w i "type": t, "inputType": &inputType, "resultType": &resultType, - "DeleteOptions": c.Universe.Type(types.Name{Package: "k8s.io/apimachinery/pkg/apis/meta/v1", Name: "DeleteOptions"}), - "ListOptions": c.Universe.Type(types.Name{Package: "k8s.io/apimachinery/pkg/apis/meta/v1", Name: "ListOptions"}), + "CreateOptions": c.Universe.Type(types.Name{Package: "k8s.io/apimachinery/pkg/apis/meta/v1", Name: "CreateOptions"}), "GetOptions": c.Universe.Type(types.Name{Package: "k8s.io/apimachinery/pkg/apis/meta/v1", Name: "GetOptions"}), + "ListOptions": c.Universe.Type(types.Name{Package: "k8s.io/apimachinery/pkg/apis/meta/v1", Name: "ListOptions"}), + "UpdateOptions": c.Universe.Type(types.Name{Package: "k8s.io/apimachinery/pkg/apis/meta/v1", Name: "UpdateOptions"}), "PatchType": c.Universe.Type(types.Name{Package: "k8s.io/apimachinery/pkg/types", Name: "PatchType"}), }, }) @@ -135,9 +138,12 @@ func (g *genClientForType) GenerateType(c *generator.Context, t *types.Type, w i "subresourcePath": "", "GroupGoName": g.groupGoName, "Version": namer.IC(g.version), + "CreateOptions": c.Universe.Type(types.Name{Package: "k8s.io/apimachinery/pkg/apis/meta/v1", Name: "CreateOptions"}), "DeleteOptions": c.Universe.Type(types.Name{Package: "k8s.io/apimachinery/pkg/apis/meta/v1", Name: "DeleteOptions"}), - "ListOptions": c.Universe.Type(types.Name{Package: "k8s.io/apimachinery/pkg/apis/meta/v1", Name: "ListOptions"}), "GetOptions": c.Universe.Type(types.Name{Package: "k8s.io/apimachinery/pkg/apis/meta/v1", Name: "GetOptions"}), + "ListOptions": c.Universe.Type(types.Name{Package: "k8s.io/apimachinery/pkg/apis/meta/v1", Name: "ListOptions"}), + "PatchOptions": c.Universe.Type(types.Name{Package: "k8s.io/apimachinery/pkg/apis/meta/v1", Name: "PatchOptions"}), + "UpdateOptions": c.Universe.Type(types.Name{Package: "k8s.io/apimachinery/pkg/apis/meta/v1", Name: "UpdateOptions"}), "PatchType": c.Universe.Type(types.Name{Package: "k8s.io/apimachinery/pkg/types", Name: "PatchType"}), "watchInterface": c.Universe.Type(types.Name{Package: "k8s.io/apimachinery/pkg/watch", Name: "Interface"}), "RESTClientInterface": c.Universe.Type(types.Name{Package: "k8s.io/client-go/rest", Name: "Interface"}), @@ -304,22 +310,22 @@ func generateInterface(tags util.Tags) string { } var subresourceDefaultVerbTemplates = map[string]string{ - "create": `Create($.type|private$Name string, $.inputType|private$ *$.inputType|raw$) (*$.resultType|raw$, error)`, - "list": `List($.type|private$Name string, opts $.ListOptions|raw$) (*$.resultType|raw$List, error)`, - "update": `Update($.type|private$Name string, $.inputType|private$ *$.inputType|raw$) (*$.resultType|raw$, error)`, - "get": `Get($.type|private$Name string, options $.GetOptions|raw$) (*$.resultType|raw$, error)`, + "create": `Create(ctx context.Context, $.type|private$Name string, $.inputType|private$ *$.inputType|raw$, opts $.CreateOptions|raw$) (*$.resultType|raw$, error)`, + "list": `List(ctx context.Context, $.type|private$Name string, opts $.ListOptions|raw$) (*$.resultType|raw$List, error)`, + "update": `Update(ctx context.Context, $.type|private$Name string, $.inputType|private$ *$.inputType|raw$, opts $.UpdateOptions|raw$) (*$.resultType|raw$, error)`, + "get": `Get(ctx context.Context, $.type|private$Name string, options $.GetOptions|raw$) (*$.resultType|raw$, error)`, } var defaultVerbTemplates = map[string]string{ - "create": `Create(*$.inputType|raw$) (*$.resultType|raw$, error)`, - "update": `Update(*$.inputType|raw$) (*$.resultType|raw$, error)`, - "updateStatus": `UpdateStatus(*$.type|raw$) (*$.type|raw$, error)`, - "delete": `Delete(name string, options *$.DeleteOptions|raw$) error`, - "deleteCollection": `DeleteCollection(options *$.DeleteOptions|raw$, listOptions $.ListOptions|raw$) error`, - "get": `Get(name string, options $.GetOptions|raw$) (*$.resultType|raw$, error)`, - "list": `List(opts $.ListOptions|raw$) (*$.resultType|raw$List, error)`, - "watch": `Watch(opts $.ListOptions|raw$) ($.watchInterface|raw$, error)`, - "patch": `Patch(name string, pt $.PatchType|raw$, data []byte, subresources ...string) (result *$.resultType|raw$, err error)`, + "create": `Create(ctx context.Context, $.inputType|private$ *$.inputType|raw$, opts $.CreateOptions|raw$) (*$.resultType|raw$, error)`, + "update": `Update(ctx context.Context, $.inputType|private$ *$.inputType|raw$, opts $.UpdateOptions|raw$) (*$.resultType|raw$, error)`, + "updateStatus": `UpdateStatus(ctx context.Context, $.inputType|private$ *$.type|raw$, opts $.UpdateOptions|raw$) (*$.type|raw$, error)`, + "delete": `Delete(ctx context.Context, name string, opts $.DeleteOptions|raw$) error`, + "deleteCollection": `DeleteCollection(ctx context.Context, opts $.DeleteOptions|raw$, listOpts $.ListOptions|raw$) error`, + "get": `Get(ctx context.Context, name string, opts $.GetOptions|raw$) (*$.resultType|raw$, error)`, + "list": `List(ctx context.Context, opts $.ListOptions|raw$) (*$.resultType|raw$List, error)`, + "watch": `Watch(ctx context.Context, opts $.ListOptions|raw$) ($.watchInterface|raw$, error)`, + "patch": `Patch(ctx context.Context, name string, pt $.PatchType|raw$, data []byte, opts $.PatchOptions|raw$, subresources ...string) (result *$.resultType|raw$, err error)`, } // group client will implement this interface. @@ -386,7 +392,7 @@ func new$.type|publicPlural$(c *$.GroupGoName$$.Version$Client) *$.type|privateP ` var listTemplate = ` // List takes label and field selectors, and returns the list of $.resultType|publicPlural$ that match those selectors. -func (c *$.type|privatePlural$) List(opts $.ListOptions|raw$) (result *$.resultType|raw$List, err error) { +func (c *$.type|privatePlural$) List(ctx context.Context, opts $.ListOptions|raw$) (result *$.resultType|raw$List, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil{ timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -397,7 +403,7 @@ func (c *$.type|privatePlural$) List(opts $.ListOptions|raw$) (result *$.resultT Resource("$.type|resource$"). VersionedParams(&opts, $.schemeParameterCodec|raw$). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } @@ -405,7 +411,7 @@ func (c *$.type|privatePlural$) List(opts $.ListOptions|raw$) (result *$.resultT var listSubresourceTemplate = ` // List takes $.type|raw$ name, label and field selectors, and returns the list of $.resultType|publicPlural$ that match those selectors. -func (c *$.type|privatePlural$) List($.type|private$Name string, opts $.ListOptions|raw$) (result *$.resultType|raw$List, err error) { +func (c *$.type|privatePlural$) List(ctx context.Context, $.type|private$Name string, opts $.ListOptions|raw$) (result *$.resultType|raw$List, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil{ timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -418,7 +424,7 @@ func (c *$.type|privatePlural$) List($.type|private$Name string, opts $.ListOpti SubResource("$.subresourcePath$"). VersionedParams(&opts, $.schemeParameterCodec|raw$). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } @@ -426,14 +432,14 @@ func (c *$.type|privatePlural$) List($.type|private$Name string, opts $.ListOpti var getTemplate = ` // Get takes name of the $.type|private$, and returns the corresponding $.resultType|private$ object, and an error if there is any. -func (c *$.type|privatePlural$) Get(name string, options $.GetOptions|raw$) (result *$.resultType|raw$, err error) { +func (c *$.type|privatePlural$) Get(ctx context.Context, name string, options $.GetOptions|raw$) (result *$.resultType|raw$, err error) { result = &$.resultType|raw${} err = c.client.Get(). $if .namespaced$Namespace(c.ns).$end$ Resource("$.type|resource$"). Name(name). VersionedParams(&options, $.schemeParameterCodec|raw$). - Do(). + Do(ctx). Into(result) return } @@ -441,7 +447,7 @@ func (c *$.type|privatePlural$) Get(name string, options $.GetOptions|raw$) (res var getSubresourceTemplate = ` // Get takes name of the $.type|private$, and returns the corresponding $.resultType|raw$ object, and an error if there is any. -func (c *$.type|privatePlural$) Get($.type|private$Name string, options $.GetOptions|raw$) (result *$.resultType|raw$, err error) { +func (c *$.type|privatePlural$) Get(ctx context.Context, $.type|private$Name string, options $.GetOptions|raw$) (result *$.resultType|raw$, err error) { result = &$.resultType|raw${} err = c.client.Get(). $if .namespaced$Namespace(c.ns).$end$ @@ -449,7 +455,7 @@ func (c *$.type|privatePlural$) Get($.type|private$Name string, options $.GetOpt Name($.type|private$Name). SubResource("$.subresourcePath$"). VersionedParams(&options, $.schemeParameterCodec|raw$). - Do(). + Do(ctx). Into(result) return } @@ -457,46 +463,47 @@ func (c *$.type|privatePlural$) Get($.type|private$Name string, options $.GetOpt var deleteTemplate = ` // Delete takes name of the $.type|private$ and deletes it. Returns an error if one occurs. -func (c *$.type|privatePlural$) Delete(name string, options *$.DeleteOptions|raw$) error { +func (c *$.type|privatePlural$) Delete(ctx context.Context, name string, opts $.DeleteOptions|raw$) error { return c.client.Delete(). $if .namespaced$Namespace(c.ns).$end$ Resource("$.type|resource$"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } ` var deleteCollectionTemplate = ` // DeleteCollection deletes a collection of objects. -func (c *$.type|privatePlural$) DeleteCollection(options *$.DeleteOptions|raw$, listOptions $.ListOptions|raw$) error { +func (c *$.type|privatePlural$) DeleteCollection(ctx context.Context, opts $.DeleteOptions|raw$, listOpts $.ListOptions|raw$) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil{ - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil{ + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). $if .namespaced$Namespace(c.ns).$end$ Resource("$.type|resource$"). - VersionedParams(&listOptions, $.schemeParameterCodec|raw$). + VersionedParams(&listOpts, $.schemeParameterCodec|raw$). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } ` var createSubresourceTemplate = ` // Create takes the representation of a $.inputType|private$ and creates it. Returns the server's representation of the $.resultType|private$, and an error, if there is any. -func (c *$.type|privatePlural$) Create($.type|private$Name string, $.inputType|private$ *$.inputType|raw$) (result *$.resultType|raw$, err error) { +func (c *$.type|privatePlural$) Create(ctx context.Context, $.type|private$Name string, $.inputType|private$ *$.inputType|raw$, opts $.CreateOptions|raw$) (result *$.resultType|raw$, err error) { result = &$.resultType|raw${} err = c.client.Post(). $if .namespaced$Namespace(c.ns).$end$ Resource("$.type|resource$"). Name($.type|private$Name). SubResource("$.subresourcePath$"). + VersionedParams(&opts, $.schemeParameterCodec|raw$). Body($.inputType|private$). - Do(). + Do(ctx). Into(result) return } @@ -504,13 +511,14 @@ func (c *$.type|privatePlural$) Create($.type|private$Name string, $.inputType|p var createTemplate = ` // Create takes the representation of a $.inputType|private$ and creates it. Returns the server's representation of the $.resultType|private$, and an error, if there is any. -func (c *$.type|privatePlural$) Create($.inputType|private$ *$.inputType|raw$) (result *$.resultType|raw$, err error) { +func (c *$.type|privatePlural$) Create(ctx context.Context, $.inputType|private$ *$.inputType|raw$, opts $.CreateOptions|raw$) (result *$.resultType|raw$, err error) { result = &$.resultType|raw${} err = c.client.Post(). $if .namespaced$Namespace(c.ns).$end$ Resource("$.type|resource$"). + VersionedParams(&opts, $.schemeParameterCodec|raw$). Body($.inputType|private$). - Do(). + Do(ctx). Into(result) return } @@ -518,15 +526,16 @@ func (c *$.type|privatePlural$) Create($.inputType|private$ *$.inputType|raw$) ( var updateSubresourceTemplate = ` // Update takes the top resource name and the representation of a $.inputType|private$ and updates it. Returns the server's representation of the $.resultType|private$, and an error, if there is any. -func (c *$.type|privatePlural$) Update($.type|private$Name string, $.inputType|private$ *$.inputType|raw$) (result *$.resultType|raw$, err error) { +func (c *$.type|privatePlural$) Update(ctx context.Context, $.type|private$Name string, $.inputType|private$ *$.inputType|raw$, opts $.UpdateOptions|raw$) (result *$.resultType|raw$, err error) { result = &$.resultType|raw${} err = c.client.Put(). $if .namespaced$Namespace(c.ns).$end$ Resource("$.type|resource$"). Name($.type|private$Name). SubResource("$.subresourcePath$"). + VersionedParams(&opts, $.schemeParameterCodec|raw$). Body($.inputType|private$). - Do(). + Do(ctx). Into(result) return } @@ -534,14 +543,15 @@ func (c *$.type|privatePlural$) Update($.type|private$Name string, $.inputType|p var updateTemplate = ` // Update takes the representation of a $.inputType|private$ and updates it. Returns the server's representation of the $.resultType|private$, and an error, if there is any. -func (c *$.type|privatePlural$) Update($.inputType|private$ *$.inputType|raw$) (result *$.resultType|raw$, err error) { +func (c *$.type|privatePlural$) Update(ctx context.Context, $.inputType|private$ *$.inputType|raw$, opts $.UpdateOptions|raw$) (result *$.resultType|raw$, err error) { result = &$.resultType|raw${} err = c.client.Put(). $if .namespaced$Namespace(c.ns).$end$ Resource("$.type|resource$"). Name($.inputType|private$.Name). + VersionedParams(&opts, $.schemeParameterCodec|raw$). Body($.inputType|private$). - Do(). + Do(ctx). Into(result) return } @@ -550,16 +560,16 @@ func (c *$.type|privatePlural$) Update($.inputType|private$ *$.inputType|raw$) ( var updateStatusTemplate = ` // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *$.type|privatePlural$) UpdateStatus($.type|private$ *$.type|raw$) (result *$.type|raw$, err error) { +func (c *$.type|privatePlural$) UpdateStatus(ctx context.Context, $.type|private$ *$.type|raw$, opts $.UpdateOptions|raw$) (result *$.type|raw$, err error) { result = &$.type|raw${} err = c.client.Put(). $if .namespaced$Namespace(c.ns).$end$ Resource("$.type|resource$"). Name($.type|private$.Name). SubResource("status"). + VersionedParams(&opts, $.schemeParameterCodec|raw$). Body($.type|private$). - Do(). + Do(ctx). Into(result) return } @@ -567,7 +577,7 @@ func (c *$.type|privatePlural$) UpdateStatus($.type|private$ *$.type|raw$) (resu var watchTemplate = ` // Watch returns a $.watchInterface|raw$ that watches the requested $.type|privatePlural$. -func (c *$.type|privatePlural$) Watch(opts $.ListOptions|raw$) ($.watchInterface|raw$, error) { +func (c *$.type|privatePlural$) Watch(ctx context.Context, opts $.ListOptions|raw$) ($.watchInterface|raw$, error) { var timeout time.Duration if opts.TimeoutSeconds != nil{ timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -578,21 +588,22 @@ func (c *$.type|privatePlural$) Watch(opts $.ListOptions|raw$) ($.watchInterface Resource("$.type|resource$"). VersionedParams(&opts, $.schemeParameterCodec|raw$). Timeout(timeout). - Watch() + Watch(ctx) } ` var patchTemplate = ` // Patch applies the patch and returns the patched $.resultType|private$. -func (c *$.type|privatePlural$) Patch(name string, pt $.PatchType|raw$, data []byte, subresources ...string) (result *$.resultType|raw$, err error) { +func (c *$.type|privatePlural$) Patch(ctx context.Context, name string, pt $.PatchType|raw$, data []byte, opts $.PatchOptions|raw$, subresources ...string) (result *$.resultType|raw$, err error) { result = &$.resultType|raw${} err = c.client.Patch(pt). $if .namespaced$Namespace(c.ns).$end$ Resource("$.type|resource$"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, $.schemeParameterCodec|raw$). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/k8s.io/code-generator/cmd/client-gen/main.go b/vendor/k8s.io/code-generator/cmd/client-gen/main.go index 6e0d187f5c..393cc5fee0 100644 --- a/vendor/k8s.io/code-generator/cmd/client-gen/main.go +++ b/vendor/k8s.io/code-generator/cmd/client-gen/main.go @@ -57,7 +57,7 @@ func main() { } if err := genericArgs.Execute( - generators.NameSystems(), + generators.NameSystems(util.PluralExceptionListToMapOrDie(customArgs.PluralExceptions)), generators.DefaultNameSystem(), generators.Packages, ); err != nil { diff --git a/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/cmd.go b/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/cmd.go index 8a7be5260c..de782e98f7 100644 --- a/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/cmd.go +++ b/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/cmd.go @@ -29,9 +29,6 @@ import ( "strings" flag "github.com/spf13/pflag" - "gonum.org/v1/gonum/graph" - "gonum.org/v1/gonum/graph/simple" - "gonum.org/v1/gonum/graph/topo" "k8s.io/code-generator/pkg/util" "k8s.io/gengo/args" @@ -374,38 +371,73 @@ func deps(c *generator.Context, pkgs []*protobufPackage) map[string][]string { return ret } +// given a set of pkg->[]deps, return the order that ensures all deps are processed before the things that depend on them func importOrder(deps map[string][]string) ([]string, error) { - nodes := map[string]graph.Node{} - names := map[int64]string{} - g := simple.NewDirectedGraph() - for pkg, imports := range deps { - for _, imp := range imports { - if _, found := nodes[pkg]; !found { - n := g.NewNode() - g.AddNode(n) - nodes[pkg] = n - names[n.ID()] = pkg - } - if _, found := nodes[imp]; !found { - n := g.NewNode() - g.AddNode(n) - nodes[imp] = n - names[n.ID()] = imp - } - g.SetEdge(g.NewEdge(nodes[imp], nodes[pkg])) + // add all nodes and edges + var remainingNodes = map[string]struct{}{} + var graph = map[edge]struct{}{} + for to, froms := range deps { + remainingNodes[to] = struct{}{} + for _, from := range froms { + remainingNodes[from] = struct{}{} + graph[edge{from: from, to: to}] = struct{}{} } } - ret := []string{} - sorted, err := topo.Sort(g) - if err != nil { - return nil, err + // find initial nodes without any dependencies + sorted := findAndRemoveNodesWithoutDependencies(remainingNodes, graph) + for i := 0; i < len(sorted); i++ { + node := sorted[i] + removeEdgesFrom(node, graph) + sorted = append(sorted, findAndRemoveNodesWithoutDependencies(remainingNodes, graph)...) + } + if len(remainingNodes) > 0 { + return nil, fmt.Errorf("cycle: remaining nodes: %#v, remaining edges: %#v", remainingNodes, graph) } for _, n := range sorted { - ret = append(ret, names[n.ID()]) - fmt.Println("topological order", names[n.ID()]) + fmt.Println("topological order", n) + } + return sorted, nil +} + +// edge describes a from->to relationship in a graph +type edge struct { + from string + to string +} + +// findAndRemoveNodesWithoutDependencies finds nodes in the given set which are not pointed to by any edges in the graph, +// removes them from the set of nodes, and returns them in sorted order +func findAndRemoveNodesWithoutDependencies(nodes map[string]struct{}, graph map[edge]struct{}) []string { + roots := []string{} + // iterate over all nodes as potential "to" nodes + for node := range nodes { + incoming := false + // iterate over all remaining edges + for edge := range graph { + // if there's any edge to the node we care about, it's not a root + if edge.to == node { + incoming = true + break + } + } + // if there are no incoming edges, remove from the set of remaining nodes and add to our results + if !incoming { + delete(nodes, node) + roots = append(roots, node) + } + } + sort.Strings(roots) + return roots +} + +// removeEdgesFrom removes any edges from the graph where edge.from == node +func removeEdgesFrom(node string, graph map[edge]struct{}) { + for edge := range graph { + if edge.from == node { + delete(graph, edge) + } } - return ret, nil } type positionOrder struct { diff --git a/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/parser.go b/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/parser.go index 3115bc688d..b3c8d2e872 100644 --- a/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/parser.go +++ b/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/parser.go @@ -375,6 +375,21 @@ func RewriteTypesWithProtobufStructTags(name string, structTags map[string]map[s }) } +func getFieldName(expr ast.Expr, structname string) (name string, err error) { + for { + switch t := expr.(type) { + case *ast.Ident: + return t.Name, nil + case *ast.SelectorExpr: + return t.Sel.Name, nil + case *ast.StarExpr: + expr = t.X + default: + return "", fmt.Errorf("unable to get name for tag from struct %q, field %#v", structname, t) + } + } +} + func updateStructTags(decl ast.Decl, structTags map[string]map[string]string, toCopy []string) []error { var errs []error t, ok := decl.(*ast.GenDecl) @@ -403,14 +418,11 @@ func updateStructTags(decl ast.Decl, structTags map[string]map[string]string, to for i := range st.Fields.List { f := st.Fields.List[i] var name string + var err error if len(f.Names) == 0 { - switch t := f.Type.(type) { - case *ast.Ident: - name = t.Name - case *ast.SelectorExpr: - name = t.Sel.Name - default: - errs = append(errs, fmt.Errorf("unable to get name for tag from struct %q, field %#v", spec.Name.Name, t)) + name, err = getFieldName(f.Type, spec.Name.Name) + if err != nil { + errs = append(errs, err) continue } } else { diff --git a/vendor/k8s.io/code-generator/cmd/import-boss/main.go b/vendor/k8s.io/code-generator/cmd/import-boss/main.go index 0080f01eb0..9d73eb480b 100644 --- a/vendor/k8s.io/code-generator/cmd/import-boss/main.go +++ b/vendor/k8s.io/code-generator/cmd/import-boss/main.go @@ -77,11 +77,6 @@ func main() { // Override defaults. arguments.GoHeaderFilePath = filepath.Join(args.DefaultSourceTree(), util.BoilerplatePath()) - arguments.InputDirs = []string{ - "k8s.io/kubernetes/pkg/...", - "k8s.io/kubernetes/cmd/...", - "k8s.io/kubernetes/plugin/...", - } pflag.CommandLine.BoolVar(&arguments.IncludeTestFiles, "include-test-files", false, "If true, include *_test.go files.") if err := arguments.Execute( diff --git a/vendor/k8s.io/code-generator/cmd/informer-gen/args/args.go b/vendor/k8s.io/code-generator/cmd/informer-gen/args/args.go index ba7f720917..ffd073a86b 100644 --- a/vendor/k8s.io/code-generator/cmd/informer-gen/args/args.go +++ b/vendor/k8s.io/code-generator/cmd/informer-gen/args/args.go @@ -31,13 +31,18 @@ type CustomArgs struct { InternalClientSetPackage string ListersPackage string SingleDirectory bool + + // PluralExceptions define a list of pluralizer exceptions in Type:PluralType format. + // The default list is "Endpoints:Endpoints" + PluralExceptions []string } // NewDefaults returns default arguments for the generator. func NewDefaults() (*args.GeneratorArgs, *CustomArgs) { genericArgs := args.Default().WithoutDefaultFlagParsing() customArgs := &CustomArgs{ - SingleDirectory: false, + SingleDirectory: false, + PluralExceptions: []string{"Endpoints:Endpoints"}, } genericArgs.CustomArgs = customArgs @@ -57,6 +62,7 @@ func (ca *CustomArgs) AddFlags(fs *pflag.FlagSet) { fs.StringVar(&ca.VersionedClientSetPackage, "versioned-clientset-package", ca.VersionedClientSetPackage, "the full package name for the versioned clientset to use") fs.StringVar(&ca.ListersPackage, "listers-package", ca.ListersPackage, "the full package name for the listers to use") fs.BoolVar(&ca.SingleDirectory, "single-directory", ca.SingleDirectory, "if true, omit the intermediate \"internalversion\" and \"externalversions\" subdirectories") + fs.StringSliceVar(&ca.PluralExceptions, "plural-exceptions", ca.PluralExceptions, "list of comma separated plural exception definitions in Type:PluralizedType format") } // Validate checks the given arguments. diff --git a/vendor/k8s.io/code-generator/cmd/informer-gen/generators/generic.go b/vendor/k8s.io/code-generator/cmd/informer-gen/generators/generic.go index cad907990f..bb73c0db01 100644 --- a/vendor/k8s.io/code-generator/cmd/informer-gen/generators/generic.go +++ b/vendor/k8s.io/code-generator/cmd/informer-gen/generators/generic.go @@ -35,6 +35,7 @@ type genericGenerator struct { imports namer.ImportTracker groupVersions map[string]clientgentypes.GroupVersions groupGoNames map[string]string + pluralExceptions map[string]string typesForGroupVersion map[clientgentypes.GroupVersion][]*types.Type filtered bool } @@ -50,14 +51,11 @@ func (g *genericGenerator) Filter(c *generator.Context, t *types.Type) bool { } func (g *genericGenerator) Namers(c *generator.Context) namer.NameSystems { - pluralExceptions := map[string]string{ - "Endpoints": "Endpoints", - } return namer.NameSystems{ "raw": namer.NewRawNamer(g.outputPackage, g.imports), - "allLowercasePlural": namer.NewAllLowercasePluralNamer(pluralExceptions), - "publicPlural": namer.NewPublicPluralNamer(pluralExceptions), - "resource": codegennamer.NewTagOverrideNamer("resourceName", namer.NewAllLowercasePluralNamer(pluralExceptions)), + "allLowercasePlural": namer.NewAllLowercasePluralNamer(g.pluralExceptions), + "publicPlural": namer.NewPublicPluralNamer(g.pluralExceptions), + "resource": codegennamer.NewTagOverrideNamer("resourceName", namer.NewAllLowercasePluralNamer(g.pluralExceptions)), } } diff --git a/vendor/k8s.io/code-generator/cmd/informer-gen/generators/informer.go b/vendor/k8s.io/code-generator/cmd/informer-gen/generators/informer.go index 9204d6215a..d7b60eccce 100644 --- a/vendor/k8s.io/code-generator/cmd/informer-gen/generators/informer.go +++ b/vendor/k8s.io/code-generator/cmd/informer-gen/generators/informer.go @@ -151,13 +151,13 @@ func NewFiltered$.type|public$Informer(client $.clientSetInterface|raw$$if .name if tweakListOptions != nil { tweakListOptions(&options) } - return client.$.group$$.version$().$.type|publicPlural$($if .namespaced$namespace$end$).List(options) + return client.$.group$$.version$().$.type|publicPlural$($if .namespaced$namespace$end$).List(context.TODO(), options) }, WatchFunc: func(options $.v1ListOptions|raw$) ($.watchInterface|raw$, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.$.group$$.version$().$.type|publicPlural$($if .namespaced$namespace$end$).Watch(options) + return client.$.group$$.version$().$.type|publicPlural$($if .namespaced$namespace$end$).Watch(context.TODO(), options) }, }, &$.type|raw${}, diff --git a/vendor/k8s.io/code-generator/cmd/informer-gen/generators/packages.go b/vendor/k8s.io/code-generator/cmd/informer-gen/generators/packages.go index e936e29f02..04a953122f 100644 --- a/vendor/k8s.io/code-generator/cmd/informer-gen/generators/packages.go +++ b/vendor/k8s.io/code-generator/cmd/informer-gen/generators/packages.go @@ -31,13 +31,11 @@ import ( "k8s.io/code-generator/cmd/client-gen/generators/util" clientgentypes "k8s.io/code-generator/cmd/client-gen/types" informergenargs "k8s.io/code-generator/cmd/informer-gen/args" + genutil "k8s.io/code-generator/pkg/util" ) // NameSystems returns the name system used by the generators in this package. -func NameSystems() namer.NameSystems { - pluralExceptions := map[string]string{ - "Endpoints": "Endpoints", - } +func NameSystems(pluralExceptions map[string]string) namer.NameSystems { return namer.NameSystems{ "public": namer.NewPublicNamer(0), "private": namer.NewPrivateNamer(0), @@ -208,7 +206,9 @@ func Packages(context *generator.Context, arguments *args.GeneratorArgs) generat if len(externalGroupVersions) != 0 { packageList = append(packageList, factoryInterfacePackage(externalVersionPackagePath, boilerplate, customArgs.VersionedClientSetPackage)) - packageList = append(packageList, factoryPackage(externalVersionPackagePath, boilerplate, groupGoNames, externalGroupVersions, customArgs.VersionedClientSetPackage, typesForGroupVersion)) + packageList = append(packageList, factoryPackage(externalVersionPackagePath, boilerplate, groupGoNames, genutil.PluralExceptionListToMapOrDie(customArgs.PluralExceptions), externalGroupVersions, + customArgs.VersionedClientSetPackage, + typesForGroupVersion)) for _, gvs := range externalGroupVersions { packageList = append(packageList, groupPackage(externalVersionPackagePath, gvs, boilerplate)) } @@ -216,7 +216,7 @@ func Packages(context *generator.Context, arguments *args.GeneratorArgs) generat if len(internalGroupVersions) != 0 { packageList = append(packageList, factoryInterfacePackage(internalVersionPackagePath, boilerplate, customArgs.InternalClientSetPackage)) - packageList = append(packageList, factoryPackage(internalVersionPackagePath, boilerplate, groupGoNames, internalGroupVersions, customArgs.InternalClientSetPackage, typesForGroupVersion)) + packageList = append(packageList, factoryPackage(internalVersionPackagePath, boilerplate, groupGoNames, genutil.PluralExceptionListToMapOrDie(customArgs.PluralExceptions), internalGroupVersions, customArgs.InternalClientSetPackage, typesForGroupVersion)) for _, gvs := range internalGroupVersions { packageList = append(packageList, groupPackage(internalVersionPackagePath, gvs, boilerplate)) } @@ -225,7 +225,8 @@ func Packages(context *generator.Context, arguments *args.GeneratorArgs) generat return packageList } -func factoryPackage(basePackage string, boilerplate []byte, groupGoNames map[string]string, groupVersions map[string]clientgentypes.GroupVersions, clientSetPackage string, typesForGroupVersion map[clientgentypes.GroupVersion][]*types.Type) generator.Package { +func factoryPackage(basePackage string, boilerplate []byte, groupGoNames, pluralExceptions map[string]string, groupVersions map[string]clientgentypes.GroupVersions, clientSetPackage string, + typesForGroupVersion map[clientgentypes.GroupVersion][]*types.Type) generator.Package { return &generator.DefaultPackage{ PackageName: filepath.Base(basePackage), PackagePath: basePackage, @@ -250,6 +251,7 @@ func factoryPackage(basePackage string, boilerplate []byte, groupGoNames map[str outputPackage: basePackage, imports: generator.NewImportTracker(), groupVersions: groupVersions, + pluralExceptions: pluralExceptions, typesForGroupVersion: typesForGroupVersion, groupGoNames: groupGoNames, }) diff --git a/vendor/k8s.io/code-generator/cmd/informer-gen/main.go b/vendor/k8s.io/code-generator/cmd/informer-gen/main.go index 14f3e923e6..6a39f85db4 100644 --- a/vendor/k8s.io/code-generator/cmd/informer-gen/main.go +++ b/vendor/k8s.io/code-generator/cmd/informer-gen/main.go @@ -53,7 +53,7 @@ func main() { // Run it. if err := genericArgs.Execute( - generators.NameSystems(), + generators.NameSystems(util.PluralExceptionListToMapOrDie(customArgs.PluralExceptions)), generators.DefaultNameSystem(), generators.Packages, ); err != nil { diff --git a/vendor/k8s.io/code-generator/cmd/lister-gen/args/args.go b/vendor/k8s.io/code-generator/cmd/lister-gen/args/args.go index 34914ea8c9..170334505a 100644 --- a/vendor/k8s.io/code-generator/cmd/lister-gen/args/args.go +++ b/vendor/k8s.io/code-generator/cmd/lister-gen/args/args.go @@ -26,12 +26,18 @@ import ( ) // CustomArgs is used by the gengo framework to pass args specific to this generator. -type CustomArgs struct{} +type CustomArgs struct { + // PluralExceptions specify list of exceptions used when pluralizing certain types. + // For example 'Endpoints:Endpoints', otherwise the pluralizer will generate 'Endpointes'. + PluralExceptions []string +} // NewDefaults returns default arguments for the generator. func NewDefaults() (*args.GeneratorArgs, *CustomArgs) { genericArgs := args.Default().WithoutDefaultFlagParsing() - customArgs := &CustomArgs{} + customArgs := &CustomArgs{ + PluralExceptions: []string{"Endpoints:Endpoints"}, + } genericArgs.CustomArgs = customArgs if pkg := codegenutil.CurrentPackage(); len(pkg) != 0 { @@ -42,7 +48,9 @@ func NewDefaults() (*args.GeneratorArgs, *CustomArgs) { } // AddFlags add the generator flags to the flag set. -func (ca *CustomArgs) AddFlags(fs *pflag.FlagSet) {} +func (ca *CustomArgs) AddFlags(fs *pflag.FlagSet) { + fs.StringSliceVar(&ca.PluralExceptions, "plural-exceptions", ca.PluralExceptions, "list of comma separated plural exception definitions in Type:PluralizedType format") +} // Validate checks the given arguments. func Validate(genericArgs *args.GeneratorArgs) error { diff --git a/vendor/k8s.io/code-generator/cmd/lister-gen/generators/lister.go b/vendor/k8s.io/code-generator/cmd/lister-gen/generators/lister.go index c8ed5ad4d3..e10e9fb2f1 100644 --- a/vendor/k8s.io/code-generator/cmd/lister-gen/generators/lister.go +++ b/vendor/k8s.io/code-generator/cmd/lister-gen/generators/lister.go @@ -34,10 +34,7 @@ import ( ) // NameSystems returns the name system used by the generators in this package. -func NameSystems() namer.NameSystems { - pluralExceptions := map[string]string{ - "Endpoints": "Endpoints", - } +func NameSystems(pluralExceptions map[string]string) namer.NameSystems { return namer.NameSystems{ "public": namer.NewPublicNamer(0), "private": namer.NewPrivateNamer(0), diff --git a/vendor/k8s.io/code-generator/cmd/lister-gen/main.go b/vendor/k8s.io/code-generator/cmd/lister-gen/main.go index aca16b2bda..953a649804 100644 --- a/vendor/k8s.io/code-generator/cmd/lister-gen/main.go +++ b/vendor/k8s.io/code-generator/cmd/lister-gen/main.go @@ -50,7 +50,7 @@ func main() { // Run it. if err := genericArgs.Execute( - generators.NameSystems(), + generators.NameSystems(util.PluralExceptionListToMapOrDie(customArgs.PluralExceptions)), generators.DefaultNameSystem(), generators.Packages, ); err != nil { diff --git a/vendor/k8s.io/code-generator/generate-groups.sh b/vendor/k8s.io/code-generator/generate-groups.sh index d82002ddaf..1c2fd7a55b 100644 --- a/vendor/k8s.io/code-generator/generate-groups.sh +++ b/vendor/k8s.io/code-generator/generate-groups.sh @@ -52,6 +52,9 @@ shift 4 cd "$(dirname "${0}")" go install ./cmd/{defaulter-gen,client-gen,lister-gen,informer-gen,deepcopy-gen} ) +# Go installs the above commands to get installed in $GOBIN if defined, and $GOPATH/bin otherwise: +GOBIN="$(go env GOBIN)" +gobin="${GOBIN:-$(go env GOPATH)/bin}" function codegen::join() { local IFS="$1"; shift; echo "$*"; } @@ -68,22 +71,22 @@ done if [ "${GENS}" = "all" ] || grep -qw "deepcopy" <<<"${GENS}"; then echo "Generating deepcopy funcs" - "${GOPATH}/bin/deepcopy-gen" --input-dirs "$(codegen::join , "${FQ_APIS[@]}")" -O zz_generated.deepcopy --bounding-dirs "${APIS_PKG}" "$@" + "${gobin}/deepcopy-gen" --input-dirs "$(codegen::join , "${FQ_APIS[@]}")" -O zz_generated.deepcopy --bounding-dirs "${APIS_PKG}" "$@" fi if [ "${GENS}" = "all" ] || grep -qw "client" <<<"${GENS}"; then echo "Generating clientset for ${GROUPS_WITH_VERSIONS} at ${OUTPUT_PKG}/${CLIENTSET_PKG_NAME:-clientset}" - "${GOPATH}/bin/client-gen" --clientset-name "${CLIENTSET_NAME_VERSIONED:-versioned}" --input-base "" --input "$(codegen::join , "${FQ_APIS[@]}")" --output-package "${OUTPUT_PKG}/${CLIENTSET_PKG_NAME:-clientset}" "$@" + "${gobin}/client-gen" --clientset-name "${CLIENTSET_NAME_VERSIONED:-versioned}" --input-base "" --input "$(codegen::join , "${FQ_APIS[@]}")" --output-package "${OUTPUT_PKG}/${CLIENTSET_PKG_NAME:-clientset}" "$@" fi if [ "${GENS}" = "all" ] || grep -qw "lister" <<<"${GENS}"; then echo "Generating listers for ${GROUPS_WITH_VERSIONS} at ${OUTPUT_PKG}/listers" - "${GOPATH}/bin/lister-gen" --input-dirs "$(codegen::join , "${FQ_APIS[@]}")" --output-package "${OUTPUT_PKG}/listers" "$@" + "${gobin}/lister-gen" --input-dirs "$(codegen::join , "${FQ_APIS[@]}")" --output-package "${OUTPUT_PKG}/listers" "$@" fi if [ "${GENS}" = "all" ] || grep -qw "informer" <<<"${GENS}"; then echo "Generating informers for ${GROUPS_WITH_VERSIONS} at ${OUTPUT_PKG}/informers" - "${GOPATH}/bin/informer-gen" \ + "${gobin}/informer-gen" \ --input-dirs "$(codegen::join , "${FQ_APIS[@]}")" \ --versioned-clientset-package "${OUTPUT_PKG}/${CLIENTSET_PKG_NAME:-clientset}/${CLIENTSET_NAME_VERSIONED:-versioned}" \ --listers-package "${OUTPUT_PKG}/listers" \ diff --git a/vendor/k8s.io/code-generator/go.mod b/vendor/k8s.io/code-generator/go.mod index 7c8b00d801..71e2d47b00 100644 --- a/vendor/k8s.io/code-generator/go.mod +++ b/vendor/k8s.io/code-generator/go.mod @@ -2,25 +2,24 @@ module k8s.io/code-generator -go 1.12 +go 1.13 require ( github.com/emicklei/go-restful v2.9.5+incompatible // indirect github.com/go-openapi/jsonreference v0.19.3 // indirect github.com/go-openapi/spec v0.19.3 // indirect - github.com/gogo/protobuf v1.2.2-0.20190723190241-65acae22fc9d + github.com/gogo/protobuf v1.3.1 + github.com/google/go-cmp v0.3.0 // indirect github.com/json-iterator/go v1.1.8 // indirect github.com/mailru/easyjson v0.7.0 // indirect github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.4.0 // indirect golang.org/x/net v0.0.0-20191004110552-13f9640d40b9 // indirect golang.org/x/tools v0.0.0-20190920225731-5eefd052ad72 // indirect - gonum.org/v1/gonum v0.0.0-20190331200053-3d26580ed485 - gonum.org/v1/netlib v0.0.0-20190331212654-76723241ea4e // indirect - gopkg.in/yaml.v2 v2.2.8 // indirect - k8s.io/gengo v0.0.0-20190822140433-26a664648505 + k8s.io/gengo v0.0.0-20200114144118-36b2048a9120 k8s.io/klog v1.0.0 - k8s.io/kube-openapi v0.0.0-20200410145947-bcb3869e6f29 // release-1.17 + k8s.io/kube-openapi v0.0.0-20200410145947-61e04a5be9a6 // release-1.18 + sigs.k8s.io/yaml v1.2.0 // indirect ) replace ( diff --git a/vendor/k8s.io/code-generator/go.sum b/vendor/k8s.io/code-generator/go.sum index 4cac7def81..22863c2668 100644 --- a/vendor/k8s.io/code-generator/go.sum +++ b/vendor/k8s.io/code-generator/go.sum @@ -1,4 +1,3 @@ -github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/purell v1.1.1 h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tNFfI= @@ -15,12 +14,10 @@ github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= github.com/go-openapi/jsonpointer v0.0.0-20160704185906-46af16f9f7b1/go.mod h1:+35s3my2LFTysnkMfxsJBAMHj/DoqoB9knIWoYG/Vk0= -github.com/go-openapi/jsonpointer v0.19.2 h1:A9+F4Dc/MCNB5jibxf6rRvOvR/iFgQdyNx9eIhnGqq0= github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= github.com/go-openapi/jsonpointer v0.19.3 h1:gihV7YNZK1iK6Tgwwsxo2rJbD1GTbdm72325Bq8FI3w= github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/jsonreference v0.0.0-20160704190145-13c6e3589ad9/go.mod h1:W3Z9FmVs9qj+KR4zFKmDPGiLdk1D9Rlm7cyMvf57TTg= -github.com/go-openapi/jsonreference v0.19.2 h1:o20suLFB4Ri0tuzpWtyHlh7E7HnkqTNLq6aR6WVNS1w= github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= github.com/go-openapi/jsonreference v0.19.3 h1:5cxNfTy0UVC3X8JL5ymxzyoUZmo8iZb+jeTWn7tUa8o= github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= @@ -28,13 +25,14 @@ github.com/go-openapi/spec v0.0.0-20160808142527-6aced65f8501/go.mod h1:J8+jY1nA github.com/go-openapi/spec v0.19.3 h1:0XRyw8kguri6Yw4SxhsQA/atC88yqrk0+G4YhI2wabc= github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo= github.com/go-openapi/swag v0.0.0-20160704191624-1d0bd113de87/go.mod h1:DXUve3Dpr1UfpPtxFw+EFuQ41HhCWZfha5jSVRG7C7I= -github.com/go-openapi/swag v0.19.2 h1:jvO6bCMBEilGwMfHhrd61zIID4oIFdwb76V17SM88dE= github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.5 h1:lTz6Ys4CmqqCQmZPBlbQENR1/GucA2bzYTE12Pw4tFY= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= -github.com/gogo/protobuf v1.2.2-0.20190723190241-65acae22fc9d h1:3PaI8p3seN09VjbTYC/QWlUZdZ1qS1zGjy7LH2Wt07I= -github.com/gogo/protobuf v1.2.2-0.20190723190241-65acae22fc9d/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= +github.com/gogo/protobuf v1.3.1 h1:DqDEcV5aeaTmdFBePNpYsp3FlcVH/2ISVVM9Qf8PSls= +github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/golang/protobuf v0.0.0-20161109072736-4bd1920723d7/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/google/go-cmp v0.3.0 h1:crn/baboCvb5fXaQ0IJ1SGTsTVrWpDsCWC8EGETZijY= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= @@ -50,7 +48,6 @@ github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e h1:hB2xlXdHp/pmPZq0y3QnmWAArdw9PqbmotexnWx/FU8= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.7.0 h1:aizVhC/NAAcKWb+5QsU1iNOZb4Yws5UO2I+aIprQITM= github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= @@ -65,23 +62,16 @@ github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/remyoudompheng/bigfft v0.0.0-20170806203942-52369c62f446/go.mod h1:uYEyJGbgTkfkS4+E/PavXkNJcbFIpEtjt2B0KDQ5+9M= github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= -github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/exp v0.0.0-20190125153040-c74c464bbbf2/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190312203227-4b39c73a6495 h1:I6A9Ag9FpEKOjcKrRNjQkPHawoXIhKyTGfvvjFAiiAk= -golang.org/x/exp v0.0.0-20190312203227-4b39c73a6495/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= -golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= -golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -98,32 +88,22 @@ golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/tools v0.0.0-20190821162956-65e3620a7ae7 h1:PVCvyir09Xgta5zksNZDkrL+eSm/Y+gQxRG3IfqNQ3A= golang.org/x/tools v0.0.0-20190821162956-65e3620a7ae7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -gonum.org/v1/gonum v0.0.0-20190331200053-3d26580ed485 h1:OB/uP/Puiu5vS5QMRPrXCDWUPb+kt8f1KW8oQzFejQw= -gonum.org/v1/gonum v0.0.0-20190331200053-3d26580ed485/go.mod h1:2ltnJ7xHfj0zHS40VVPYEAAMTa3ZGguvHGBSJeRWqE0= -gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= -gonum.org/v1/netlib v0.0.0-20190331212654-76723241ea4e h1:jRyg0XfpwWlhEV8mDfdNGBeSJM2fuyh9Yjrnd8kF2Ts= -gonum.org/v1/netlib v0.0.0-20190331212654-76723241ea4e/go.mod h1:kS+toOQn6AQKjmKJ7gzohV1XkqsFehRA2FbsbkopSuQ= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6 h1:4s3/R4+OYYYUKptXPhZKjQ04WJ6EhQQVFdjOFvCazDk= k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= -k8s.io/gengo v0.0.0-20190822140433-26a664648505 h1:ZY6yclUKVbZ+SdWnkfY+Je5vrMpKOxmGeKRbsXVmqYM= -k8s.io/gengo v0.0.0-20190822140433-26a664648505/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= +k8s.io/gengo v0.0.0-20200114144118-36b2048a9120 h1:RPscN6KhmG54S33L+lr3GS+oD1jmchIU0ll519K6FA4= +k8s.io/gengo v0.0.0-20200114144118-36b2048a9120/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= k8s.io/klog v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8= k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= -k8s.io/kube-openapi v0.0.0-20200410145947-bcb3869e6f29 h1:NeQXVJ2XFSkRoPzRo8AId01ZER+j8oV4SZADT4iBOXQ= -k8s.io/kube-openapi v0.0.0-20200410145947-bcb3869e6f29/go.mod h1:F+5wygcW0wmRTnM3cOgIqGivxkwSWIWT5YdsDbeAOaU= -modernc.org/cc v1.0.0/go.mod h1:1Sk4//wdnYJiUIxnW8ddKpaOJCF37yAdqYnkxUpaYxw= -modernc.org/golex v1.0.0/go.mod h1:b/QX9oBD/LhixY6NDh+IdGv17hgB+51fET1i2kPSmvk= -modernc.org/mathutil v1.0.0/go.mod h1:wU0vUrJsVWBZ4P6e7xtFJEhFSNsfRLJ8H458uRjg03k= -modernc.org/strutil v1.0.0/go.mod h1:lstksw84oURvj9y3tn8lGvRxyRC1S2+g5uuIzNfIOBs= -modernc.org/xc v1.0.0/go.mod h1:mRNCo0bvLjGhHO9WsyuKVU4q0ceiDDDoEeWDJHrNx8I= -sigs.k8s.io/structured-merge-diff/v2 v2.0.1/go.mod h1:Wb7vfKAodbKgf6tn1Kl0VvGj7mRH6DGaRcixXEJXTsE= +k8s.io/kube-openapi v0.0.0-20200410145947-61e04a5be9a6 h1:Oh3Mzx5pJ+yIumsAD0MOECPVeXsVot0UkiaCGVyfGQY= +k8s.io/kube-openapi v0.0.0-20200410145947-61e04a5be9a6/go.mod h1:GRQhZsXIAJ1xR0C9bd8UpWHZ5plfAS9fzPjJuQ6JL3E= +sigs.k8s.io/structured-merge-diff/v3 v3.0.0-20200116222232-67a7b8c61874/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= +sigs.k8s.io/yaml v1.2.0 h1:kr/MCeFWJWTwyaHoR9c8EjH9OumOmoF9YGiZd7lFm/Q= +sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= diff --git a/vendor/k8s.io/code-generator/pkg/util/plural_exceptions.go b/vendor/k8s.io/code-generator/pkg/util/plural_exceptions.go new file mode 100644 index 0000000000..73c648d5b5 --- /dev/null +++ b/vendor/k8s.io/code-generator/pkg/util/plural_exceptions.go @@ -0,0 +1,37 @@ +/* +Copyright 2017 The Kubernetes 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. +*/ + +package util + +import ( + "fmt" + "strings" +) + +// PluralExceptionListToMapOrDie converts the list in "Type:PluralType" to map[string]string. +// This is used for pluralizer. +// If the format is wrong, this function will panic. +func PluralExceptionListToMapOrDie(pluralExceptions []string) map[string]string { + pluralExceptionMap := make(map[string]string, len(pluralExceptions)) + for i := range pluralExceptions { + parts := strings.Split(pluralExceptions[i], ":") + if len(parts) != 2 { + panic(fmt.Sprintf("invalid plural exception definition: %s", pluralExceptions[i])) + } + pluralExceptionMap[parts[0]] = parts[1] + } + return pluralExceptionMap +} diff --git a/vendor/knative.dev/eventing/pkg/adapter/v2/main.go b/vendor/knative.dev/eventing/pkg/adapter/v2/main.go index 1d01437e6c..f3fe71bf92 100644 --- a/vendor/knative.dev/eventing/pkg/adapter/v2/main.go +++ b/vendor/knative.dev/eventing/pkg/adapter/v2/main.go @@ -146,7 +146,7 @@ func MainWithInformers(ctx context.Context, component string, env EnvConfigAcces if metricsConfig, err := env.GetMetricsConfig(); err != nil { logger.Error("failed to process metrics options", zap.Error(err)) } else if metricsConfig != nil { - if err := metrics.UpdateExporter(*metricsConfig, logger); err != nil { + if err := metrics.UpdateExporter(ctx, *metricsConfig, logger); err != nil { logger.Error("failed to create the metrics exporter", zap.Error(err)) } // Check if metrics config contains profiling flag diff --git a/vendor/knative.dev/eventing/pkg/adapter/v2/main_message.go b/vendor/knative.dev/eventing/pkg/adapter/v2/main_message.go index e34acfe101..e298ad1b9c 100644 --- a/vendor/knative.dev/eventing/pkg/adapter/v2/main_message.go +++ b/vendor/knative.dev/eventing/pkg/adapter/v2/main_message.go @@ -74,7 +74,7 @@ func MainMessageAdapterWithContext(ctx context.Context, component string, ector if err != nil { logger.Error("failed to process metrics options", zap.Error(err)) } else { - if err := metrics.UpdateExporter(*metricsConfig, logger); err != nil { + if err := metrics.UpdateExporter(ctx, *metricsConfig, logger); err != nil { logger.Error("failed to create the metrics exporter", zap.Error(err)) } } diff --git a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/clientset.go b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/clientset.go index 578ed727b4..bfd80aac65 100644 --- a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/clientset.go +++ b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/clientset.go @@ -131,7 +131,7 @@ func NewForConfig(c *rest.Config) (*Clientset, error) { configShallowCopy := *c if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 { if configShallowCopy.Burst <= 0 { - return nil, fmt.Errorf("Burst is required to be greater than 0 when RateLimiter is not set and QPS is set to greater than 0") + return nil, fmt.Errorf("burst is required to be greater than 0 when RateLimiter is not set and QPS is set to greater than 0") } configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst) } diff --git a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/configs/v1alpha1/configmappropagation.go b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/configs/v1alpha1/configmappropagation.go index dc075deec5..b1727532e0 100644 --- a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/configs/v1alpha1/configmappropagation.go +++ b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/configs/v1alpha1/configmappropagation.go @@ -19,6 +19,7 @@ limitations under the License. package v1alpha1 import ( + "context" "time" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -37,15 +38,15 @@ type ConfigMapPropagationsGetter interface { // ConfigMapPropagationInterface has methods to work with ConfigMapPropagation resources. type ConfigMapPropagationInterface interface { - Create(*v1alpha1.ConfigMapPropagation) (*v1alpha1.ConfigMapPropagation, error) - Update(*v1alpha1.ConfigMapPropagation) (*v1alpha1.ConfigMapPropagation, error) - UpdateStatus(*v1alpha1.ConfigMapPropagation) (*v1alpha1.ConfigMapPropagation, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*v1alpha1.ConfigMapPropagation, error) - List(opts v1.ListOptions) (*v1alpha1.ConfigMapPropagationList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.ConfigMapPropagation, err error) + Create(ctx context.Context, configMapPropagation *v1alpha1.ConfigMapPropagation, opts v1.CreateOptions) (*v1alpha1.ConfigMapPropagation, error) + Update(ctx context.Context, configMapPropagation *v1alpha1.ConfigMapPropagation, opts v1.UpdateOptions) (*v1alpha1.ConfigMapPropagation, error) + UpdateStatus(ctx context.Context, configMapPropagation *v1alpha1.ConfigMapPropagation, opts v1.UpdateOptions) (*v1alpha1.ConfigMapPropagation, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.ConfigMapPropagation, error) + List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.ConfigMapPropagationList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ConfigMapPropagation, err error) ConfigMapPropagationExpansion } @@ -64,20 +65,20 @@ func newConfigMapPropagations(c *ConfigsV1alpha1Client, namespace string) *confi } // Get takes name of the configMapPropagation, and returns the corresponding configMapPropagation object, and an error if there is any. -func (c *configMapPropagations) Get(name string, options v1.GetOptions) (result *v1alpha1.ConfigMapPropagation, err error) { +func (c *configMapPropagations) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.ConfigMapPropagation, err error) { result = &v1alpha1.ConfigMapPropagation{} err = c.client.Get(). Namespace(c.ns). Resource("configmappropagations"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of ConfigMapPropagations that match those selectors. -func (c *configMapPropagations) List(opts v1.ListOptions) (result *v1alpha1.ConfigMapPropagationList, err error) { +func (c *configMapPropagations) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ConfigMapPropagationList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -88,13 +89,13 @@ func (c *configMapPropagations) List(opts v1.ListOptions) (result *v1alpha1.Conf Resource("configmappropagations"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested configMapPropagations. -func (c *configMapPropagations) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *configMapPropagations) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -105,87 +106,90 @@ func (c *configMapPropagations) Watch(opts v1.ListOptions) (watch.Interface, err Resource("configmappropagations"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a configMapPropagation and creates it. Returns the server's representation of the configMapPropagation, and an error, if there is any. -func (c *configMapPropagations) Create(configMapPropagation *v1alpha1.ConfigMapPropagation) (result *v1alpha1.ConfigMapPropagation, err error) { +func (c *configMapPropagations) Create(ctx context.Context, configMapPropagation *v1alpha1.ConfigMapPropagation, opts v1.CreateOptions) (result *v1alpha1.ConfigMapPropagation, err error) { result = &v1alpha1.ConfigMapPropagation{} err = c.client.Post(). Namespace(c.ns). Resource("configmappropagations"). + VersionedParams(&opts, scheme.ParameterCodec). Body(configMapPropagation). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a configMapPropagation and updates it. Returns the server's representation of the configMapPropagation, and an error, if there is any. -func (c *configMapPropagations) Update(configMapPropagation *v1alpha1.ConfigMapPropagation) (result *v1alpha1.ConfigMapPropagation, err error) { +func (c *configMapPropagations) Update(ctx context.Context, configMapPropagation *v1alpha1.ConfigMapPropagation, opts v1.UpdateOptions) (result *v1alpha1.ConfigMapPropagation, err error) { result = &v1alpha1.ConfigMapPropagation{} err = c.client.Put(). Namespace(c.ns). Resource("configmappropagations"). Name(configMapPropagation.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(configMapPropagation). - Do(). + Do(ctx). Into(result) return } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *configMapPropagations) UpdateStatus(configMapPropagation *v1alpha1.ConfigMapPropagation) (result *v1alpha1.ConfigMapPropagation, err error) { +func (c *configMapPropagations) UpdateStatus(ctx context.Context, configMapPropagation *v1alpha1.ConfigMapPropagation, opts v1.UpdateOptions) (result *v1alpha1.ConfigMapPropagation, err error) { result = &v1alpha1.ConfigMapPropagation{} err = c.client.Put(). Namespace(c.ns). Resource("configmappropagations"). Name(configMapPropagation.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(configMapPropagation). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the configMapPropagation and deletes it. Returns an error if one occurs. -func (c *configMapPropagations) Delete(name string, options *v1.DeleteOptions) error { +func (c *configMapPropagations) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("configmappropagations"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *configMapPropagations) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *configMapPropagations) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Namespace(c.ns). Resource("configmappropagations"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched configMapPropagation. -func (c *configMapPropagations) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.ConfigMapPropagation, err error) { +func (c *configMapPropagations) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ConfigMapPropagation, err error) { result = &v1alpha1.ConfigMapPropagation{} err = c.client.Patch(pt). Namespace(c.ns). Resource("configmappropagations"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/configs/v1alpha1/fake/fake_configmappropagation.go b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/configs/v1alpha1/fake/fake_configmappropagation.go index 65ce8935d5..72e0feb4c5 100644 --- a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/configs/v1alpha1/fake/fake_configmappropagation.go +++ b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/configs/v1alpha1/fake/fake_configmappropagation.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -39,7 +41,7 @@ var configmappropagationsResource = schema.GroupVersionResource{Group: "configs. var configmappropagationsKind = schema.GroupVersionKind{Group: "configs.internal.knative.dev", Version: "v1alpha1", Kind: "ConfigMapPropagation"} // Get takes name of the configMapPropagation, and returns the corresponding configMapPropagation object, and an error if there is any. -func (c *FakeConfigMapPropagations) Get(name string, options v1.GetOptions) (result *v1alpha1.ConfigMapPropagation, err error) { +func (c *FakeConfigMapPropagations) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.ConfigMapPropagation, err error) { obj, err := c.Fake. Invokes(testing.NewGetAction(configmappropagationsResource, c.ns, name), &v1alpha1.ConfigMapPropagation{}) @@ -50,7 +52,7 @@ func (c *FakeConfigMapPropagations) Get(name string, options v1.GetOptions) (res } // List takes label and field selectors, and returns the list of ConfigMapPropagations that match those selectors. -func (c *FakeConfigMapPropagations) List(opts v1.ListOptions) (result *v1alpha1.ConfigMapPropagationList, err error) { +func (c *FakeConfigMapPropagations) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ConfigMapPropagationList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(configmappropagationsResource, configmappropagationsKind, c.ns, opts), &v1alpha1.ConfigMapPropagationList{}) @@ -72,14 +74,14 @@ func (c *FakeConfigMapPropagations) List(opts v1.ListOptions) (result *v1alpha1. } // Watch returns a watch.Interface that watches the requested configMapPropagations. -func (c *FakeConfigMapPropagations) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeConfigMapPropagations) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(configmappropagationsResource, c.ns, opts)) } // Create takes the representation of a configMapPropagation and creates it. Returns the server's representation of the configMapPropagation, and an error, if there is any. -func (c *FakeConfigMapPropagations) Create(configMapPropagation *v1alpha1.ConfigMapPropagation) (result *v1alpha1.ConfigMapPropagation, err error) { +func (c *FakeConfigMapPropagations) Create(ctx context.Context, configMapPropagation *v1alpha1.ConfigMapPropagation, opts v1.CreateOptions) (result *v1alpha1.ConfigMapPropagation, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(configmappropagationsResource, c.ns, configMapPropagation), &v1alpha1.ConfigMapPropagation{}) @@ -90,7 +92,7 @@ func (c *FakeConfigMapPropagations) Create(configMapPropagation *v1alpha1.Config } // Update takes the representation of a configMapPropagation and updates it. Returns the server's representation of the configMapPropagation, and an error, if there is any. -func (c *FakeConfigMapPropagations) Update(configMapPropagation *v1alpha1.ConfigMapPropagation) (result *v1alpha1.ConfigMapPropagation, err error) { +func (c *FakeConfigMapPropagations) Update(ctx context.Context, configMapPropagation *v1alpha1.ConfigMapPropagation, opts v1.UpdateOptions) (result *v1alpha1.ConfigMapPropagation, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(configmappropagationsResource, c.ns, configMapPropagation), &v1alpha1.ConfigMapPropagation{}) @@ -102,7 +104,7 @@ func (c *FakeConfigMapPropagations) Update(configMapPropagation *v1alpha1.Config // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeConfigMapPropagations) UpdateStatus(configMapPropagation *v1alpha1.ConfigMapPropagation) (*v1alpha1.ConfigMapPropagation, error) { +func (c *FakeConfigMapPropagations) UpdateStatus(ctx context.Context, configMapPropagation *v1alpha1.ConfigMapPropagation, opts v1.UpdateOptions) (*v1alpha1.ConfigMapPropagation, error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(configmappropagationsResource, "status", c.ns, configMapPropagation), &v1alpha1.ConfigMapPropagation{}) @@ -113,7 +115,7 @@ func (c *FakeConfigMapPropagations) UpdateStatus(configMapPropagation *v1alpha1. } // Delete takes name of the configMapPropagation and deletes it. Returns an error if one occurs. -func (c *FakeConfigMapPropagations) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeConfigMapPropagations) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewDeleteAction(configmappropagationsResource, c.ns, name), &v1alpha1.ConfigMapPropagation{}) @@ -121,15 +123,15 @@ func (c *FakeConfigMapPropagations) Delete(name string, options *v1.DeleteOption } // DeleteCollection deletes a collection of objects. -func (c *FakeConfigMapPropagations) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(configmappropagationsResource, c.ns, listOptions) +func (c *FakeConfigMapPropagations) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(configmappropagationsResource, c.ns, listOpts) _, err := c.Fake.Invokes(action, &v1alpha1.ConfigMapPropagationList{}) return err } // Patch applies the patch and returns the patched configMapPropagation. -func (c *FakeConfigMapPropagations) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.ConfigMapPropagation, err error) { +func (c *FakeConfigMapPropagations) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ConfigMapPropagation, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(configmappropagationsResource, c.ns, name, pt, data, subresources...), &v1alpha1.ConfigMapPropagation{}) diff --git a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/eventing/v1/broker.go b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/eventing/v1/broker.go index f7309d95a9..a32bc84655 100644 --- a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/eventing/v1/broker.go +++ b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/eventing/v1/broker.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" "time" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -37,15 +38,15 @@ type BrokersGetter interface { // BrokerInterface has methods to work with Broker resources. type BrokerInterface interface { - Create(*v1.Broker) (*v1.Broker, error) - Update(*v1.Broker) (*v1.Broker, error) - UpdateStatus(*v1.Broker) (*v1.Broker, error) - Delete(name string, options *metav1.DeleteOptions) error - DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error - Get(name string, options metav1.GetOptions) (*v1.Broker, error) - List(opts metav1.ListOptions) (*v1.BrokerList, error) - Watch(opts metav1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Broker, err error) + Create(ctx context.Context, broker *v1.Broker, opts metav1.CreateOptions) (*v1.Broker, error) + Update(ctx context.Context, broker *v1.Broker, opts metav1.UpdateOptions) (*v1.Broker, error) + UpdateStatus(ctx context.Context, broker *v1.Broker, opts metav1.UpdateOptions) (*v1.Broker, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Broker, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.BrokerList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Broker, err error) BrokerExpansion } @@ -64,20 +65,20 @@ func newBrokers(c *EventingV1Client, namespace string) *brokers { } // Get takes name of the broker, and returns the corresponding broker object, and an error if there is any. -func (c *brokers) Get(name string, options metav1.GetOptions) (result *v1.Broker, err error) { +func (c *brokers) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Broker, err error) { result = &v1.Broker{} err = c.client.Get(). Namespace(c.ns). Resource("brokers"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of Brokers that match those selectors. -func (c *brokers) List(opts metav1.ListOptions) (result *v1.BrokerList, err error) { +func (c *brokers) List(ctx context.Context, opts metav1.ListOptions) (result *v1.BrokerList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -88,13 +89,13 @@ func (c *brokers) List(opts metav1.ListOptions) (result *v1.BrokerList, err erro Resource("brokers"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested brokers. -func (c *brokers) Watch(opts metav1.ListOptions) (watch.Interface, error) { +func (c *brokers) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -105,87 +106,90 @@ func (c *brokers) Watch(opts metav1.ListOptions) (watch.Interface, error) { Resource("brokers"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a broker and creates it. Returns the server's representation of the broker, and an error, if there is any. -func (c *brokers) Create(broker *v1.Broker) (result *v1.Broker, err error) { +func (c *brokers) Create(ctx context.Context, broker *v1.Broker, opts metav1.CreateOptions) (result *v1.Broker, err error) { result = &v1.Broker{} err = c.client.Post(). Namespace(c.ns). Resource("brokers"). + VersionedParams(&opts, scheme.ParameterCodec). Body(broker). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a broker and updates it. Returns the server's representation of the broker, and an error, if there is any. -func (c *brokers) Update(broker *v1.Broker) (result *v1.Broker, err error) { +func (c *brokers) Update(ctx context.Context, broker *v1.Broker, opts metav1.UpdateOptions) (result *v1.Broker, err error) { result = &v1.Broker{} err = c.client.Put(). Namespace(c.ns). Resource("brokers"). Name(broker.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(broker). - Do(). + Do(ctx). Into(result) return } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *brokers) UpdateStatus(broker *v1.Broker) (result *v1.Broker, err error) { +func (c *brokers) UpdateStatus(ctx context.Context, broker *v1.Broker, opts metav1.UpdateOptions) (result *v1.Broker, err error) { result = &v1.Broker{} err = c.client.Put(). Namespace(c.ns). Resource("brokers"). Name(broker.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(broker). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the broker and deletes it. Returns an error if one occurs. -func (c *brokers) Delete(name string, options *metav1.DeleteOptions) error { +func (c *brokers) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("brokers"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *brokers) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error { +func (c *brokers) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Namespace(c.ns). Resource("brokers"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched broker. -func (c *brokers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Broker, err error) { +func (c *brokers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Broker, err error) { result = &v1.Broker{} err = c.client.Patch(pt). Namespace(c.ns). Resource("brokers"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/eventing/v1/fake/fake_broker.go b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/eventing/v1/fake/fake_broker.go index fff607109c..06d65a1295 100644 --- a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/eventing/v1/fake/fake_broker.go +++ b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/eventing/v1/fake/fake_broker.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -39,7 +41,7 @@ var brokersResource = schema.GroupVersionResource{Group: "eventing.knative.dev", var brokersKind = schema.GroupVersionKind{Group: "eventing.knative.dev", Version: "v1", Kind: "Broker"} // Get takes name of the broker, and returns the corresponding broker object, and an error if there is any. -func (c *FakeBrokers) Get(name string, options v1.GetOptions) (result *eventingv1.Broker, err error) { +func (c *FakeBrokers) Get(ctx context.Context, name string, options v1.GetOptions) (result *eventingv1.Broker, err error) { obj, err := c.Fake. Invokes(testing.NewGetAction(brokersResource, c.ns, name), &eventingv1.Broker{}) @@ -50,7 +52,7 @@ func (c *FakeBrokers) Get(name string, options v1.GetOptions) (result *eventingv } // List takes label and field selectors, and returns the list of Brokers that match those selectors. -func (c *FakeBrokers) List(opts v1.ListOptions) (result *eventingv1.BrokerList, err error) { +func (c *FakeBrokers) List(ctx context.Context, opts v1.ListOptions) (result *eventingv1.BrokerList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(brokersResource, brokersKind, c.ns, opts), &eventingv1.BrokerList{}) @@ -72,14 +74,14 @@ func (c *FakeBrokers) List(opts v1.ListOptions) (result *eventingv1.BrokerList, } // Watch returns a watch.Interface that watches the requested brokers. -func (c *FakeBrokers) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeBrokers) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(brokersResource, c.ns, opts)) } // Create takes the representation of a broker and creates it. Returns the server's representation of the broker, and an error, if there is any. -func (c *FakeBrokers) Create(broker *eventingv1.Broker) (result *eventingv1.Broker, err error) { +func (c *FakeBrokers) Create(ctx context.Context, broker *eventingv1.Broker, opts v1.CreateOptions) (result *eventingv1.Broker, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(brokersResource, c.ns, broker), &eventingv1.Broker{}) @@ -90,7 +92,7 @@ func (c *FakeBrokers) Create(broker *eventingv1.Broker) (result *eventingv1.Brok } // Update takes the representation of a broker and updates it. Returns the server's representation of the broker, and an error, if there is any. -func (c *FakeBrokers) Update(broker *eventingv1.Broker) (result *eventingv1.Broker, err error) { +func (c *FakeBrokers) Update(ctx context.Context, broker *eventingv1.Broker, opts v1.UpdateOptions) (result *eventingv1.Broker, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(brokersResource, c.ns, broker), &eventingv1.Broker{}) @@ -102,7 +104,7 @@ func (c *FakeBrokers) Update(broker *eventingv1.Broker) (result *eventingv1.Brok // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeBrokers) UpdateStatus(broker *eventingv1.Broker) (*eventingv1.Broker, error) { +func (c *FakeBrokers) UpdateStatus(ctx context.Context, broker *eventingv1.Broker, opts v1.UpdateOptions) (*eventingv1.Broker, error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(brokersResource, "status", c.ns, broker), &eventingv1.Broker{}) @@ -113,7 +115,7 @@ func (c *FakeBrokers) UpdateStatus(broker *eventingv1.Broker) (*eventingv1.Broke } // Delete takes name of the broker and deletes it. Returns an error if one occurs. -func (c *FakeBrokers) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeBrokers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewDeleteAction(brokersResource, c.ns, name), &eventingv1.Broker{}) @@ -121,15 +123,15 @@ func (c *FakeBrokers) Delete(name string, options *v1.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *FakeBrokers) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(brokersResource, c.ns, listOptions) +func (c *FakeBrokers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(brokersResource, c.ns, listOpts) _, err := c.Fake.Invokes(action, &eventingv1.BrokerList{}) return err } // Patch applies the patch and returns the patched broker. -func (c *FakeBrokers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *eventingv1.Broker, err error) { +func (c *FakeBrokers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *eventingv1.Broker, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(brokersResource, c.ns, name, pt, data, subresources...), &eventingv1.Broker{}) diff --git a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/eventing/v1/fake/fake_trigger.go b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/eventing/v1/fake/fake_trigger.go index 6b3795b6fb..a817d34f69 100644 --- a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/eventing/v1/fake/fake_trigger.go +++ b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/eventing/v1/fake/fake_trigger.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -39,7 +41,7 @@ var triggersResource = schema.GroupVersionResource{Group: "eventing.knative.dev" var triggersKind = schema.GroupVersionKind{Group: "eventing.knative.dev", Version: "v1", Kind: "Trigger"} // Get takes name of the trigger, and returns the corresponding trigger object, and an error if there is any. -func (c *FakeTriggers) Get(name string, options v1.GetOptions) (result *eventingv1.Trigger, err error) { +func (c *FakeTriggers) Get(ctx context.Context, name string, options v1.GetOptions) (result *eventingv1.Trigger, err error) { obj, err := c.Fake. Invokes(testing.NewGetAction(triggersResource, c.ns, name), &eventingv1.Trigger{}) @@ -50,7 +52,7 @@ func (c *FakeTriggers) Get(name string, options v1.GetOptions) (result *eventing } // List takes label and field selectors, and returns the list of Triggers that match those selectors. -func (c *FakeTriggers) List(opts v1.ListOptions) (result *eventingv1.TriggerList, err error) { +func (c *FakeTriggers) List(ctx context.Context, opts v1.ListOptions) (result *eventingv1.TriggerList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(triggersResource, triggersKind, c.ns, opts), &eventingv1.TriggerList{}) @@ -72,14 +74,14 @@ func (c *FakeTriggers) List(opts v1.ListOptions) (result *eventingv1.TriggerList } // Watch returns a watch.Interface that watches the requested triggers. -func (c *FakeTriggers) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeTriggers) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(triggersResource, c.ns, opts)) } // Create takes the representation of a trigger and creates it. Returns the server's representation of the trigger, and an error, if there is any. -func (c *FakeTriggers) Create(trigger *eventingv1.Trigger) (result *eventingv1.Trigger, err error) { +func (c *FakeTriggers) Create(ctx context.Context, trigger *eventingv1.Trigger, opts v1.CreateOptions) (result *eventingv1.Trigger, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(triggersResource, c.ns, trigger), &eventingv1.Trigger{}) @@ -90,7 +92,7 @@ func (c *FakeTriggers) Create(trigger *eventingv1.Trigger) (result *eventingv1.T } // Update takes the representation of a trigger and updates it. Returns the server's representation of the trigger, and an error, if there is any. -func (c *FakeTriggers) Update(trigger *eventingv1.Trigger) (result *eventingv1.Trigger, err error) { +func (c *FakeTriggers) Update(ctx context.Context, trigger *eventingv1.Trigger, opts v1.UpdateOptions) (result *eventingv1.Trigger, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(triggersResource, c.ns, trigger), &eventingv1.Trigger{}) @@ -102,7 +104,7 @@ func (c *FakeTriggers) Update(trigger *eventingv1.Trigger) (result *eventingv1.T // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeTriggers) UpdateStatus(trigger *eventingv1.Trigger) (*eventingv1.Trigger, error) { +func (c *FakeTriggers) UpdateStatus(ctx context.Context, trigger *eventingv1.Trigger, opts v1.UpdateOptions) (*eventingv1.Trigger, error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(triggersResource, "status", c.ns, trigger), &eventingv1.Trigger{}) @@ -113,7 +115,7 @@ func (c *FakeTriggers) UpdateStatus(trigger *eventingv1.Trigger) (*eventingv1.Tr } // Delete takes name of the trigger and deletes it. Returns an error if one occurs. -func (c *FakeTriggers) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeTriggers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewDeleteAction(triggersResource, c.ns, name), &eventingv1.Trigger{}) @@ -121,15 +123,15 @@ func (c *FakeTriggers) Delete(name string, options *v1.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *FakeTriggers) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(triggersResource, c.ns, listOptions) +func (c *FakeTriggers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(triggersResource, c.ns, listOpts) _, err := c.Fake.Invokes(action, &eventingv1.TriggerList{}) return err } // Patch applies the patch and returns the patched trigger. -func (c *FakeTriggers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *eventingv1.Trigger, err error) { +func (c *FakeTriggers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *eventingv1.Trigger, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(triggersResource, c.ns, name, pt, data, subresources...), &eventingv1.Trigger{}) diff --git a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/eventing/v1/trigger.go b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/eventing/v1/trigger.go index 9726e4e3c8..4de77391e7 100644 --- a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/eventing/v1/trigger.go +++ b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/eventing/v1/trigger.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" "time" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -37,15 +38,15 @@ type TriggersGetter interface { // TriggerInterface has methods to work with Trigger resources. type TriggerInterface interface { - Create(*v1.Trigger) (*v1.Trigger, error) - Update(*v1.Trigger) (*v1.Trigger, error) - UpdateStatus(*v1.Trigger) (*v1.Trigger, error) - Delete(name string, options *metav1.DeleteOptions) error - DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error - Get(name string, options metav1.GetOptions) (*v1.Trigger, error) - List(opts metav1.ListOptions) (*v1.TriggerList, error) - Watch(opts metav1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Trigger, err error) + Create(ctx context.Context, trigger *v1.Trigger, opts metav1.CreateOptions) (*v1.Trigger, error) + Update(ctx context.Context, trigger *v1.Trigger, opts metav1.UpdateOptions) (*v1.Trigger, error) + UpdateStatus(ctx context.Context, trigger *v1.Trigger, opts metav1.UpdateOptions) (*v1.Trigger, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Trigger, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.TriggerList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Trigger, err error) TriggerExpansion } @@ -64,20 +65,20 @@ func newTriggers(c *EventingV1Client, namespace string) *triggers { } // Get takes name of the trigger, and returns the corresponding trigger object, and an error if there is any. -func (c *triggers) Get(name string, options metav1.GetOptions) (result *v1.Trigger, err error) { +func (c *triggers) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Trigger, err error) { result = &v1.Trigger{} err = c.client.Get(). Namespace(c.ns). Resource("triggers"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of Triggers that match those selectors. -func (c *triggers) List(opts metav1.ListOptions) (result *v1.TriggerList, err error) { +func (c *triggers) List(ctx context.Context, opts metav1.ListOptions) (result *v1.TriggerList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -88,13 +89,13 @@ func (c *triggers) List(opts metav1.ListOptions) (result *v1.TriggerList, err er Resource("triggers"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested triggers. -func (c *triggers) Watch(opts metav1.ListOptions) (watch.Interface, error) { +func (c *triggers) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -105,87 +106,90 @@ func (c *triggers) Watch(opts metav1.ListOptions) (watch.Interface, error) { Resource("triggers"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a trigger and creates it. Returns the server's representation of the trigger, and an error, if there is any. -func (c *triggers) Create(trigger *v1.Trigger) (result *v1.Trigger, err error) { +func (c *triggers) Create(ctx context.Context, trigger *v1.Trigger, opts metav1.CreateOptions) (result *v1.Trigger, err error) { result = &v1.Trigger{} err = c.client.Post(). Namespace(c.ns). Resource("triggers"). + VersionedParams(&opts, scheme.ParameterCodec). Body(trigger). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a trigger and updates it. Returns the server's representation of the trigger, and an error, if there is any. -func (c *triggers) Update(trigger *v1.Trigger) (result *v1.Trigger, err error) { +func (c *triggers) Update(ctx context.Context, trigger *v1.Trigger, opts metav1.UpdateOptions) (result *v1.Trigger, err error) { result = &v1.Trigger{} err = c.client.Put(). Namespace(c.ns). Resource("triggers"). Name(trigger.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(trigger). - Do(). + Do(ctx). Into(result) return } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *triggers) UpdateStatus(trigger *v1.Trigger) (result *v1.Trigger, err error) { +func (c *triggers) UpdateStatus(ctx context.Context, trigger *v1.Trigger, opts metav1.UpdateOptions) (result *v1.Trigger, err error) { result = &v1.Trigger{} err = c.client.Put(). Namespace(c.ns). Resource("triggers"). Name(trigger.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(trigger). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the trigger and deletes it. Returns an error if one occurs. -func (c *triggers) Delete(name string, options *metav1.DeleteOptions) error { +func (c *triggers) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("triggers"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *triggers) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error { +func (c *triggers) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Namespace(c.ns). Resource("triggers"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched trigger. -func (c *triggers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Trigger, err error) { +func (c *triggers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Trigger, err error) { result = &v1.Trigger{} err = c.client.Patch(pt). Namespace(c.ns). Resource("triggers"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/eventing/v1beta1/broker.go b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/eventing/v1beta1/broker.go index d7a1c9f516..a56a44e532 100644 --- a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/eventing/v1beta1/broker.go +++ b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/eventing/v1beta1/broker.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" "time" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -37,15 +38,15 @@ type BrokersGetter interface { // BrokerInterface has methods to work with Broker resources. type BrokerInterface interface { - Create(*v1beta1.Broker) (*v1beta1.Broker, error) - Update(*v1beta1.Broker) (*v1beta1.Broker, error) - UpdateStatus(*v1beta1.Broker) (*v1beta1.Broker, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*v1beta1.Broker, error) - List(opts v1.ListOptions) (*v1beta1.BrokerList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Broker, err error) + Create(ctx context.Context, broker *v1beta1.Broker, opts v1.CreateOptions) (*v1beta1.Broker, error) + Update(ctx context.Context, broker *v1beta1.Broker, opts v1.UpdateOptions) (*v1beta1.Broker, error) + UpdateStatus(ctx context.Context, broker *v1beta1.Broker, opts v1.UpdateOptions) (*v1beta1.Broker, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.Broker, error) + List(ctx context.Context, opts v1.ListOptions) (*v1beta1.BrokerList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Broker, err error) BrokerExpansion } @@ -64,20 +65,20 @@ func newBrokers(c *EventingV1beta1Client, namespace string) *brokers { } // Get takes name of the broker, and returns the corresponding broker object, and an error if there is any. -func (c *brokers) Get(name string, options v1.GetOptions) (result *v1beta1.Broker, err error) { +func (c *brokers) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.Broker, err error) { result = &v1beta1.Broker{} err = c.client.Get(). Namespace(c.ns). Resource("brokers"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of Brokers that match those selectors. -func (c *brokers) List(opts v1.ListOptions) (result *v1beta1.BrokerList, err error) { +func (c *brokers) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.BrokerList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -88,13 +89,13 @@ func (c *brokers) List(opts v1.ListOptions) (result *v1beta1.BrokerList, err err Resource("brokers"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested brokers. -func (c *brokers) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *brokers) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -105,87 +106,90 @@ func (c *brokers) Watch(opts v1.ListOptions) (watch.Interface, error) { Resource("brokers"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a broker and creates it. Returns the server's representation of the broker, and an error, if there is any. -func (c *brokers) Create(broker *v1beta1.Broker) (result *v1beta1.Broker, err error) { +func (c *brokers) Create(ctx context.Context, broker *v1beta1.Broker, opts v1.CreateOptions) (result *v1beta1.Broker, err error) { result = &v1beta1.Broker{} err = c.client.Post(). Namespace(c.ns). Resource("brokers"). + VersionedParams(&opts, scheme.ParameterCodec). Body(broker). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a broker and updates it. Returns the server's representation of the broker, and an error, if there is any. -func (c *brokers) Update(broker *v1beta1.Broker) (result *v1beta1.Broker, err error) { +func (c *brokers) Update(ctx context.Context, broker *v1beta1.Broker, opts v1.UpdateOptions) (result *v1beta1.Broker, err error) { result = &v1beta1.Broker{} err = c.client.Put(). Namespace(c.ns). Resource("brokers"). Name(broker.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(broker). - Do(). + Do(ctx). Into(result) return } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *brokers) UpdateStatus(broker *v1beta1.Broker) (result *v1beta1.Broker, err error) { +func (c *brokers) UpdateStatus(ctx context.Context, broker *v1beta1.Broker, opts v1.UpdateOptions) (result *v1beta1.Broker, err error) { result = &v1beta1.Broker{} err = c.client.Put(). Namespace(c.ns). Resource("brokers"). Name(broker.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(broker). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the broker and deletes it. Returns an error if one occurs. -func (c *brokers) Delete(name string, options *v1.DeleteOptions) error { +func (c *brokers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("brokers"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *brokers) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *brokers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Namespace(c.ns). Resource("brokers"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched broker. -func (c *brokers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Broker, err error) { +func (c *brokers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Broker, err error) { result = &v1beta1.Broker{} err = c.client.Patch(pt). Namespace(c.ns). Resource("brokers"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/eventing/v1beta1/eventtype.go b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/eventing/v1beta1/eventtype.go index 2ce8cf2925..f9623647a3 100644 --- a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/eventing/v1beta1/eventtype.go +++ b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/eventing/v1beta1/eventtype.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" "time" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -37,15 +38,15 @@ type EventTypesGetter interface { // EventTypeInterface has methods to work with EventType resources. type EventTypeInterface interface { - Create(*v1beta1.EventType) (*v1beta1.EventType, error) - Update(*v1beta1.EventType) (*v1beta1.EventType, error) - UpdateStatus(*v1beta1.EventType) (*v1beta1.EventType, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*v1beta1.EventType, error) - List(opts v1.ListOptions) (*v1beta1.EventTypeList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.EventType, err error) + Create(ctx context.Context, eventType *v1beta1.EventType, opts v1.CreateOptions) (*v1beta1.EventType, error) + Update(ctx context.Context, eventType *v1beta1.EventType, opts v1.UpdateOptions) (*v1beta1.EventType, error) + UpdateStatus(ctx context.Context, eventType *v1beta1.EventType, opts v1.UpdateOptions) (*v1beta1.EventType, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.EventType, error) + List(ctx context.Context, opts v1.ListOptions) (*v1beta1.EventTypeList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.EventType, err error) EventTypeExpansion } @@ -64,20 +65,20 @@ func newEventTypes(c *EventingV1beta1Client, namespace string) *eventTypes { } // Get takes name of the eventType, and returns the corresponding eventType object, and an error if there is any. -func (c *eventTypes) Get(name string, options v1.GetOptions) (result *v1beta1.EventType, err error) { +func (c *eventTypes) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.EventType, err error) { result = &v1beta1.EventType{} err = c.client.Get(). Namespace(c.ns). Resource("eventtypes"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of EventTypes that match those selectors. -func (c *eventTypes) List(opts v1.ListOptions) (result *v1beta1.EventTypeList, err error) { +func (c *eventTypes) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.EventTypeList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -88,13 +89,13 @@ func (c *eventTypes) List(opts v1.ListOptions) (result *v1beta1.EventTypeList, e Resource("eventtypes"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested eventTypes. -func (c *eventTypes) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *eventTypes) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -105,87 +106,90 @@ func (c *eventTypes) Watch(opts v1.ListOptions) (watch.Interface, error) { Resource("eventtypes"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a eventType and creates it. Returns the server's representation of the eventType, and an error, if there is any. -func (c *eventTypes) Create(eventType *v1beta1.EventType) (result *v1beta1.EventType, err error) { +func (c *eventTypes) Create(ctx context.Context, eventType *v1beta1.EventType, opts v1.CreateOptions) (result *v1beta1.EventType, err error) { result = &v1beta1.EventType{} err = c.client.Post(). Namespace(c.ns). Resource("eventtypes"). + VersionedParams(&opts, scheme.ParameterCodec). Body(eventType). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a eventType and updates it. Returns the server's representation of the eventType, and an error, if there is any. -func (c *eventTypes) Update(eventType *v1beta1.EventType) (result *v1beta1.EventType, err error) { +func (c *eventTypes) Update(ctx context.Context, eventType *v1beta1.EventType, opts v1.UpdateOptions) (result *v1beta1.EventType, err error) { result = &v1beta1.EventType{} err = c.client.Put(). Namespace(c.ns). Resource("eventtypes"). Name(eventType.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(eventType). - Do(). + Do(ctx). Into(result) return } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *eventTypes) UpdateStatus(eventType *v1beta1.EventType) (result *v1beta1.EventType, err error) { +func (c *eventTypes) UpdateStatus(ctx context.Context, eventType *v1beta1.EventType, opts v1.UpdateOptions) (result *v1beta1.EventType, err error) { result = &v1beta1.EventType{} err = c.client.Put(). Namespace(c.ns). Resource("eventtypes"). Name(eventType.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(eventType). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the eventType and deletes it. Returns an error if one occurs. -func (c *eventTypes) Delete(name string, options *v1.DeleteOptions) error { +func (c *eventTypes) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("eventtypes"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *eventTypes) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *eventTypes) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Namespace(c.ns). Resource("eventtypes"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched eventType. -func (c *eventTypes) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.EventType, err error) { +func (c *eventTypes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.EventType, err error) { result = &v1beta1.EventType{} err = c.client.Patch(pt). Namespace(c.ns). Resource("eventtypes"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/eventing/v1beta1/fake/fake_broker.go b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/eventing/v1beta1/fake/fake_broker.go index 3332d880a4..0b75f0e843 100644 --- a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/eventing/v1beta1/fake/fake_broker.go +++ b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/eventing/v1beta1/fake/fake_broker.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -39,7 +41,7 @@ var brokersResource = schema.GroupVersionResource{Group: "eventing.knative.dev", var brokersKind = schema.GroupVersionKind{Group: "eventing.knative.dev", Version: "v1beta1", Kind: "Broker"} // Get takes name of the broker, and returns the corresponding broker object, and an error if there is any. -func (c *FakeBrokers) Get(name string, options v1.GetOptions) (result *v1beta1.Broker, err error) { +func (c *FakeBrokers) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.Broker, err error) { obj, err := c.Fake. Invokes(testing.NewGetAction(brokersResource, c.ns, name), &v1beta1.Broker{}) @@ -50,7 +52,7 @@ func (c *FakeBrokers) Get(name string, options v1.GetOptions) (result *v1beta1.B } // List takes label and field selectors, and returns the list of Brokers that match those selectors. -func (c *FakeBrokers) List(opts v1.ListOptions) (result *v1beta1.BrokerList, err error) { +func (c *FakeBrokers) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.BrokerList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(brokersResource, brokersKind, c.ns, opts), &v1beta1.BrokerList{}) @@ -72,14 +74,14 @@ func (c *FakeBrokers) List(opts v1.ListOptions) (result *v1beta1.BrokerList, err } // Watch returns a watch.Interface that watches the requested brokers. -func (c *FakeBrokers) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeBrokers) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(brokersResource, c.ns, opts)) } // Create takes the representation of a broker and creates it. Returns the server's representation of the broker, and an error, if there is any. -func (c *FakeBrokers) Create(broker *v1beta1.Broker) (result *v1beta1.Broker, err error) { +func (c *FakeBrokers) Create(ctx context.Context, broker *v1beta1.Broker, opts v1.CreateOptions) (result *v1beta1.Broker, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(brokersResource, c.ns, broker), &v1beta1.Broker{}) @@ -90,7 +92,7 @@ func (c *FakeBrokers) Create(broker *v1beta1.Broker) (result *v1beta1.Broker, er } // Update takes the representation of a broker and updates it. Returns the server's representation of the broker, and an error, if there is any. -func (c *FakeBrokers) Update(broker *v1beta1.Broker) (result *v1beta1.Broker, err error) { +func (c *FakeBrokers) Update(ctx context.Context, broker *v1beta1.Broker, opts v1.UpdateOptions) (result *v1beta1.Broker, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(brokersResource, c.ns, broker), &v1beta1.Broker{}) @@ -102,7 +104,7 @@ func (c *FakeBrokers) Update(broker *v1beta1.Broker) (result *v1beta1.Broker, er // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeBrokers) UpdateStatus(broker *v1beta1.Broker) (*v1beta1.Broker, error) { +func (c *FakeBrokers) UpdateStatus(ctx context.Context, broker *v1beta1.Broker, opts v1.UpdateOptions) (*v1beta1.Broker, error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(brokersResource, "status", c.ns, broker), &v1beta1.Broker{}) @@ -113,7 +115,7 @@ func (c *FakeBrokers) UpdateStatus(broker *v1beta1.Broker) (*v1beta1.Broker, err } // Delete takes name of the broker and deletes it. Returns an error if one occurs. -func (c *FakeBrokers) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeBrokers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewDeleteAction(brokersResource, c.ns, name), &v1beta1.Broker{}) @@ -121,15 +123,15 @@ func (c *FakeBrokers) Delete(name string, options *v1.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *FakeBrokers) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(brokersResource, c.ns, listOptions) +func (c *FakeBrokers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(brokersResource, c.ns, listOpts) _, err := c.Fake.Invokes(action, &v1beta1.BrokerList{}) return err } // Patch applies the patch and returns the patched broker. -func (c *FakeBrokers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Broker, err error) { +func (c *FakeBrokers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Broker, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(brokersResource, c.ns, name, pt, data, subresources...), &v1beta1.Broker{}) diff --git a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/eventing/v1beta1/fake/fake_eventtype.go b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/eventing/v1beta1/fake/fake_eventtype.go index d91c11f781..86ed1d2829 100644 --- a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/eventing/v1beta1/fake/fake_eventtype.go +++ b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/eventing/v1beta1/fake/fake_eventtype.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -39,7 +41,7 @@ var eventtypesResource = schema.GroupVersionResource{Group: "eventing.knative.de var eventtypesKind = schema.GroupVersionKind{Group: "eventing.knative.dev", Version: "v1beta1", Kind: "EventType"} // Get takes name of the eventType, and returns the corresponding eventType object, and an error if there is any. -func (c *FakeEventTypes) Get(name string, options v1.GetOptions) (result *v1beta1.EventType, err error) { +func (c *FakeEventTypes) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.EventType, err error) { obj, err := c.Fake. Invokes(testing.NewGetAction(eventtypesResource, c.ns, name), &v1beta1.EventType{}) @@ -50,7 +52,7 @@ func (c *FakeEventTypes) Get(name string, options v1.GetOptions) (result *v1beta } // List takes label and field selectors, and returns the list of EventTypes that match those selectors. -func (c *FakeEventTypes) List(opts v1.ListOptions) (result *v1beta1.EventTypeList, err error) { +func (c *FakeEventTypes) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.EventTypeList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(eventtypesResource, eventtypesKind, c.ns, opts), &v1beta1.EventTypeList{}) @@ -72,14 +74,14 @@ func (c *FakeEventTypes) List(opts v1.ListOptions) (result *v1beta1.EventTypeLis } // Watch returns a watch.Interface that watches the requested eventTypes. -func (c *FakeEventTypes) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeEventTypes) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(eventtypesResource, c.ns, opts)) } // Create takes the representation of a eventType and creates it. Returns the server's representation of the eventType, and an error, if there is any. -func (c *FakeEventTypes) Create(eventType *v1beta1.EventType) (result *v1beta1.EventType, err error) { +func (c *FakeEventTypes) Create(ctx context.Context, eventType *v1beta1.EventType, opts v1.CreateOptions) (result *v1beta1.EventType, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(eventtypesResource, c.ns, eventType), &v1beta1.EventType{}) @@ -90,7 +92,7 @@ func (c *FakeEventTypes) Create(eventType *v1beta1.EventType) (result *v1beta1.E } // Update takes the representation of a eventType and updates it. Returns the server's representation of the eventType, and an error, if there is any. -func (c *FakeEventTypes) Update(eventType *v1beta1.EventType) (result *v1beta1.EventType, err error) { +func (c *FakeEventTypes) Update(ctx context.Context, eventType *v1beta1.EventType, opts v1.UpdateOptions) (result *v1beta1.EventType, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(eventtypesResource, c.ns, eventType), &v1beta1.EventType{}) @@ -102,7 +104,7 @@ func (c *FakeEventTypes) Update(eventType *v1beta1.EventType) (result *v1beta1.E // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeEventTypes) UpdateStatus(eventType *v1beta1.EventType) (*v1beta1.EventType, error) { +func (c *FakeEventTypes) UpdateStatus(ctx context.Context, eventType *v1beta1.EventType, opts v1.UpdateOptions) (*v1beta1.EventType, error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(eventtypesResource, "status", c.ns, eventType), &v1beta1.EventType{}) @@ -113,7 +115,7 @@ func (c *FakeEventTypes) UpdateStatus(eventType *v1beta1.EventType) (*v1beta1.Ev } // Delete takes name of the eventType and deletes it. Returns an error if one occurs. -func (c *FakeEventTypes) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeEventTypes) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewDeleteAction(eventtypesResource, c.ns, name), &v1beta1.EventType{}) @@ -121,15 +123,15 @@ func (c *FakeEventTypes) Delete(name string, options *v1.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *FakeEventTypes) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(eventtypesResource, c.ns, listOptions) +func (c *FakeEventTypes) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(eventtypesResource, c.ns, listOpts) _, err := c.Fake.Invokes(action, &v1beta1.EventTypeList{}) return err } // Patch applies the patch and returns the patched eventType. -func (c *FakeEventTypes) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.EventType, err error) { +func (c *FakeEventTypes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.EventType, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(eventtypesResource, c.ns, name, pt, data, subresources...), &v1beta1.EventType{}) diff --git a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/eventing/v1beta1/fake/fake_trigger.go b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/eventing/v1beta1/fake/fake_trigger.go index 22388f591b..ae0959b27f 100644 --- a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/eventing/v1beta1/fake/fake_trigger.go +++ b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/eventing/v1beta1/fake/fake_trigger.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -39,7 +41,7 @@ var triggersResource = schema.GroupVersionResource{Group: "eventing.knative.dev" var triggersKind = schema.GroupVersionKind{Group: "eventing.knative.dev", Version: "v1beta1", Kind: "Trigger"} // Get takes name of the trigger, and returns the corresponding trigger object, and an error if there is any. -func (c *FakeTriggers) Get(name string, options v1.GetOptions) (result *v1beta1.Trigger, err error) { +func (c *FakeTriggers) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.Trigger, err error) { obj, err := c.Fake. Invokes(testing.NewGetAction(triggersResource, c.ns, name), &v1beta1.Trigger{}) @@ -50,7 +52,7 @@ func (c *FakeTriggers) Get(name string, options v1.GetOptions) (result *v1beta1. } // List takes label and field selectors, and returns the list of Triggers that match those selectors. -func (c *FakeTriggers) List(opts v1.ListOptions) (result *v1beta1.TriggerList, err error) { +func (c *FakeTriggers) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.TriggerList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(triggersResource, triggersKind, c.ns, opts), &v1beta1.TriggerList{}) @@ -72,14 +74,14 @@ func (c *FakeTriggers) List(opts v1.ListOptions) (result *v1beta1.TriggerList, e } // Watch returns a watch.Interface that watches the requested triggers. -func (c *FakeTriggers) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeTriggers) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(triggersResource, c.ns, opts)) } // Create takes the representation of a trigger and creates it. Returns the server's representation of the trigger, and an error, if there is any. -func (c *FakeTriggers) Create(trigger *v1beta1.Trigger) (result *v1beta1.Trigger, err error) { +func (c *FakeTriggers) Create(ctx context.Context, trigger *v1beta1.Trigger, opts v1.CreateOptions) (result *v1beta1.Trigger, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(triggersResource, c.ns, trigger), &v1beta1.Trigger{}) @@ -90,7 +92,7 @@ func (c *FakeTriggers) Create(trigger *v1beta1.Trigger) (result *v1beta1.Trigger } // Update takes the representation of a trigger and updates it. Returns the server's representation of the trigger, and an error, if there is any. -func (c *FakeTriggers) Update(trigger *v1beta1.Trigger) (result *v1beta1.Trigger, err error) { +func (c *FakeTriggers) Update(ctx context.Context, trigger *v1beta1.Trigger, opts v1.UpdateOptions) (result *v1beta1.Trigger, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(triggersResource, c.ns, trigger), &v1beta1.Trigger{}) @@ -102,7 +104,7 @@ func (c *FakeTriggers) Update(trigger *v1beta1.Trigger) (result *v1beta1.Trigger // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeTriggers) UpdateStatus(trigger *v1beta1.Trigger) (*v1beta1.Trigger, error) { +func (c *FakeTriggers) UpdateStatus(ctx context.Context, trigger *v1beta1.Trigger, opts v1.UpdateOptions) (*v1beta1.Trigger, error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(triggersResource, "status", c.ns, trigger), &v1beta1.Trigger{}) @@ -113,7 +115,7 @@ func (c *FakeTriggers) UpdateStatus(trigger *v1beta1.Trigger) (*v1beta1.Trigger, } // Delete takes name of the trigger and deletes it. Returns an error if one occurs. -func (c *FakeTriggers) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeTriggers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewDeleteAction(triggersResource, c.ns, name), &v1beta1.Trigger{}) @@ -121,15 +123,15 @@ func (c *FakeTriggers) Delete(name string, options *v1.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *FakeTriggers) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(triggersResource, c.ns, listOptions) +func (c *FakeTriggers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(triggersResource, c.ns, listOpts) _, err := c.Fake.Invokes(action, &v1beta1.TriggerList{}) return err } // Patch applies the patch and returns the patched trigger. -func (c *FakeTriggers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Trigger, err error) { +func (c *FakeTriggers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Trigger, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(triggersResource, c.ns, name, pt, data, subresources...), &v1beta1.Trigger{}) diff --git a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/eventing/v1beta1/trigger.go b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/eventing/v1beta1/trigger.go index 27982f7d37..e02ff1496e 100644 --- a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/eventing/v1beta1/trigger.go +++ b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/eventing/v1beta1/trigger.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" "time" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -37,15 +38,15 @@ type TriggersGetter interface { // TriggerInterface has methods to work with Trigger resources. type TriggerInterface interface { - Create(*v1beta1.Trigger) (*v1beta1.Trigger, error) - Update(*v1beta1.Trigger) (*v1beta1.Trigger, error) - UpdateStatus(*v1beta1.Trigger) (*v1beta1.Trigger, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*v1beta1.Trigger, error) - List(opts v1.ListOptions) (*v1beta1.TriggerList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Trigger, err error) + Create(ctx context.Context, trigger *v1beta1.Trigger, opts v1.CreateOptions) (*v1beta1.Trigger, error) + Update(ctx context.Context, trigger *v1beta1.Trigger, opts v1.UpdateOptions) (*v1beta1.Trigger, error) + UpdateStatus(ctx context.Context, trigger *v1beta1.Trigger, opts v1.UpdateOptions) (*v1beta1.Trigger, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.Trigger, error) + List(ctx context.Context, opts v1.ListOptions) (*v1beta1.TriggerList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Trigger, err error) TriggerExpansion } @@ -64,20 +65,20 @@ func newTriggers(c *EventingV1beta1Client, namespace string) *triggers { } // Get takes name of the trigger, and returns the corresponding trigger object, and an error if there is any. -func (c *triggers) Get(name string, options v1.GetOptions) (result *v1beta1.Trigger, err error) { +func (c *triggers) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.Trigger, err error) { result = &v1beta1.Trigger{} err = c.client.Get(). Namespace(c.ns). Resource("triggers"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of Triggers that match those selectors. -func (c *triggers) List(opts v1.ListOptions) (result *v1beta1.TriggerList, err error) { +func (c *triggers) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.TriggerList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -88,13 +89,13 @@ func (c *triggers) List(opts v1.ListOptions) (result *v1beta1.TriggerList, err e Resource("triggers"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested triggers. -func (c *triggers) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *triggers) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -105,87 +106,90 @@ func (c *triggers) Watch(opts v1.ListOptions) (watch.Interface, error) { Resource("triggers"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a trigger and creates it. Returns the server's representation of the trigger, and an error, if there is any. -func (c *triggers) Create(trigger *v1beta1.Trigger) (result *v1beta1.Trigger, err error) { +func (c *triggers) Create(ctx context.Context, trigger *v1beta1.Trigger, opts v1.CreateOptions) (result *v1beta1.Trigger, err error) { result = &v1beta1.Trigger{} err = c.client.Post(). Namespace(c.ns). Resource("triggers"). + VersionedParams(&opts, scheme.ParameterCodec). Body(trigger). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a trigger and updates it. Returns the server's representation of the trigger, and an error, if there is any. -func (c *triggers) Update(trigger *v1beta1.Trigger) (result *v1beta1.Trigger, err error) { +func (c *triggers) Update(ctx context.Context, trigger *v1beta1.Trigger, opts v1.UpdateOptions) (result *v1beta1.Trigger, err error) { result = &v1beta1.Trigger{} err = c.client.Put(). Namespace(c.ns). Resource("triggers"). Name(trigger.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(trigger). - Do(). + Do(ctx). Into(result) return } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *triggers) UpdateStatus(trigger *v1beta1.Trigger) (result *v1beta1.Trigger, err error) { +func (c *triggers) UpdateStatus(ctx context.Context, trigger *v1beta1.Trigger, opts v1.UpdateOptions) (result *v1beta1.Trigger, err error) { result = &v1beta1.Trigger{} err = c.client.Put(). Namespace(c.ns). Resource("triggers"). Name(trigger.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(trigger). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the trigger and deletes it. Returns an error if one occurs. -func (c *triggers) Delete(name string, options *v1.DeleteOptions) error { +func (c *triggers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("triggers"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *triggers) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *triggers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Namespace(c.ns). Resource("triggers"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched trigger. -func (c *triggers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Trigger, err error) { +func (c *triggers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Trigger, err error) { result = &v1beta1.Trigger{} err = c.client.Patch(pt). Namespace(c.ns). Resource("triggers"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/flows/v1/fake/fake_parallel.go b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/flows/v1/fake/fake_parallel.go index 3483ead0be..fa11c10138 100644 --- a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/flows/v1/fake/fake_parallel.go +++ b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/flows/v1/fake/fake_parallel.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -39,7 +41,7 @@ var parallelsResource = schema.GroupVersionResource{Group: "flows.knative.dev", var parallelsKind = schema.GroupVersionKind{Group: "flows.knative.dev", Version: "v1", Kind: "Parallel"} // Get takes name of the parallel, and returns the corresponding parallel object, and an error if there is any. -func (c *FakeParallels) Get(name string, options v1.GetOptions) (result *flowsv1.Parallel, err error) { +func (c *FakeParallels) Get(ctx context.Context, name string, options v1.GetOptions) (result *flowsv1.Parallel, err error) { obj, err := c.Fake. Invokes(testing.NewGetAction(parallelsResource, c.ns, name), &flowsv1.Parallel{}) @@ -50,7 +52,7 @@ func (c *FakeParallels) Get(name string, options v1.GetOptions) (result *flowsv1 } // List takes label and field selectors, and returns the list of Parallels that match those selectors. -func (c *FakeParallels) List(opts v1.ListOptions) (result *flowsv1.ParallelList, err error) { +func (c *FakeParallels) List(ctx context.Context, opts v1.ListOptions) (result *flowsv1.ParallelList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(parallelsResource, parallelsKind, c.ns, opts), &flowsv1.ParallelList{}) @@ -72,14 +74,14 @@ func (c *FakeParallels) List(opts v1.ListOptions) (result *flowsv1.ParallelList, } // Watch returns a watch.Interface that watches the requested parallels. -func (c *FakeParallels) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeParallels) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(parallelsResource, c.ns, opts)) } // Create takes the representation of a parallel and creates it. Returns the server's representation of the parallel, and an error, if there is any. -func (c *FakeParallels) Create(parallel *flowsv1.Parallel) (result *flowsv1.Parallel, err error) { +func (c *FakeParallels) Create(ctx context.Context, parallel *flowsv1.Parallel, opts v1.CreateOptions) (result *flowsv1.Parallel, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(parallelsResource, c.ns, parallel), &flowsv1.Parallel{}) @@ -90,7 +92,7 @@ func (c *FakeParallels) Create(parallel *flowsv1.Parallel) (result *flowsv1.Para } // Update takes the representation of a parallel and updates it. Returns the server's representation of the parallel, and an error, if there is any. -func (c *FakeParallels) Update(parallel *flowsv1.Parallel) (result *flowsv1.Parallel, err error) { +func (c *FakeParallels) Update(ctx context.Context, parallel *flowsv1.Parallel, opts v1.UpdateOptions) (result *flowsv1.Parallel, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(parallelsResource, c.ns, parallel), &flowsv1.Parallel{}) @@ -102,7 +104,7 @@ func (c *FakeParallels) Update(parallel *flowsv1.Parallel) (result *flowsv1.Para // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeParallels) UpdateStatus(parallel *flowsv1.Parallel) (*flowsv1.Parallel, error) { +func (c *FakeParallels) UpdateStatus(ctx context.Context, parallel *flowsv1.Parallel, opts v1.UpdateOptions) (*flowsv1.Parallel, error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(parallelsResource, "status", c.ns, parallel), &flowsv1.Parallel{}) @@ -113,7 +115,7 @@ func (c *FakeParallels) UpdateStatus(parallel *flowsv1.Parallel) (*flowsv1.Paral } // Delete takes name of the parallel and deletes it. Returns an error if one occurs. -func (c *FakeParallels) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeParallels) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewDeleteAction(parallelsResource, c.ns, name), &flowsv1.Parallel{}) @@ -121,15 +123,15 @@ func (c *FakeParallels) Delete(name string, options *v1.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *FakeParallels) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(parallelsResource, c.ns, listOptions) +func (c *FakeParallels) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(parallelsResource, c.ns, listOpts) _, err := c.Fake.Invokes(action, &flowsv1.ParallelList{}) return err } // Patch applies the patch and returns the patched parallel. -func (c *FakeParallels) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *flowsv1.Parallel, err error) { +func (c *FakeParallels) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *flowsv1.Parallel, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(parallelsResource, c.ns, name, pt, data, subresources...), &flowsv1.Parallel{}) diff --git a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/flows/v1/fake/fake_sequence.go b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/flows/v1/fake/fake_sequence.go index bd35aa3917..0a321c097f 100644 --- a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/flows/v1/fake/fake_sequence.go +++ b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/flows/v1/fake/fake_sequence.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -39,7 +41,7 @@ var sequencesResource = schema.GroupVersionResource{Group: "flows.knative.dev", var sequencesKind = schema.GroupVersionKind{Group: "flows.knative.dev", Version: "v1", Kind: "Sequence"} // Get takes name of the sequence, and returns the corresponding sequence object, and an error if there is any. -func (c *FakeSequences) Get(name string, options v1.GetOptions) (result *flowsv1.Sequence, err error) { +func (c *FakeSequences) Get(ctx context.Context, name string, options v1.GetOptions) (result *flowsv1.Sequence, err error) { obj, err := c.Fake. Invokes(testing.NewGetAction(sequencesResource, c.ns, name), &flowsv1.Sequence{}) @@ -50,7 +52,7 @@ func (c *FakeSequences) Get(name string, options v1.GetOptions) (result *flowsv1 } // List takes label and field selectors, and returns the list of Sequences that match those selectors. -func (c *FakeSequences) List(opts v1.ListOptions) (result *flowsv1.SequenceList, err error) { +func (c *FakeSequences) List(ctx context.Context, opts v1.ListOptions) (result *flowsv1.SequenceList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(sequencesResource, sequencesKind, c.ns, opts), &flowsv1.SequenceList{}) @@ -72,14 +74,14 @@ func (c *FakeSequences) List(opts v1.ListOptions) (result *flowsv1.SequenceList, } // Watch returns a watch.Interface that watches the requested sequences. -func (c *FakeSequences) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeSequences) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(sequencesResource, c.ns, opts)) } // Create takes the representation of a sequence and creates it. Returns the server's representation of the sequence, and an error, if there is any. -func (c *FakeSequences) Create(sequence *flowsv1.Sequence) (result *flowsv1.Sequence, err error) { +func (c *FakeSequences) Create(ctx context.Context, sequence *flowsv1.Sequence, opts v1.CreateOptions) (result *flowsv1.Sequence, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(sequencesResource, c.ns, sequence), &flowsv1.Sequence{}) @@ -90,7 +92,7 @@ func (c *FakeSequences) Create(sequence *flowsv1.Sequence) (result *flowsv1.Sequ } // Update takes the representation of a sequence and updates it. Returns the server's representation of the sequence, and an error, if there is any. -func (c *FakeSequences) Update(sequence *flowsv1.Sequence) (result *flowsv1.Sequence, err error) { +func (c *FakeSequences) Update(ctx context.Context, sequence *flowsv1.Sequence, opts v1.UpdateOptions) (result *flowsv1.Sequence, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(sequencesResource, c.ns, sequence), &flowsv1.Sequence{}) @@ -102,7 +104,7 @@ func (c *FakeSequences) Update(sequence *flowsv1.Sequence) (result *flowsv1.Sequ // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeSequences) UpdateStatus(sequence *flowsv1.Sequence) (*flowsv1.Sequence, error) { +func (c *FakeSequences) UpdateStatus(ctx context.Context, sequence *flowsv1.Sequence, opts v1.UpdateOptions) (*flowsv1.Sequence, error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(sequencesResource, "status", c.ns, sequence), &flowsv1.Sequence{}) @@ -113,7 +115,7 @@ func (c *FakeSequences) UpdateStatus(sequence *flowsv1.Sequence) (*flowsv1.Seque } // Delete takes name of the sequence and deletes it. Returns an error if one occurs. -func (c *FakeSequences) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeSequences) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewDeleteAction(sequencesResource, c.ns, name), &flowsv1.Sequence{}) @@ -121,15 +123,15 @@ func (c *FakeSequences) Delete(name string, options *v1.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *FakeSequences) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(sequencesResource, c.ns, listOptions) +func (c *FakeSequences) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(sequencesResource, c.ns, listOpts) _, err := c.Fake.Invokes(action, &flowsv1.SequenceList{}) return err } // Patch applies the patch and returns the patched sequence. -func (c *FakeSequences) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *flowsv1.Sequence, err error) { +func (c *FakeSequences) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *flowsv1.Sequence, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(sequencesResource, c.ns, name, pt, data, subresources...), &flowsv1.Sequence{}) diff --git a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/flows/v1/parallel.go b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/flows/v1/parallel.go index 32b162bbac..ebedb416c1 100644 --- a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/flows/v1/parallel.go +++ b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/flows/v1/parallel.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" "time" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -37,15 +38,15 @@ type ParallelsGetter interface { // ParallelInterface has methods to work with Parallel resources. type ParallelInterface interface { - Create(*v1.Parallel) (*v1.Parallel, error) - Update(*v1.Parallel) (*v1.Parallel, error) - UpdateStatus(*v1.Parallel) (*v1.Parallel, error) - Delete(name string, options *metav1.DeleteOptions) error - DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error - Get(name string, options metav1.GetOptions) (*v1.Parallel, error) - List(opts metav1.ListOptions) (*v1.ParallelList, error) - Watch(opts metav1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Parallel, err error) + Create(ctx context.Context, parallel *v1.Parallel, opts metav1.CreateOptions) (*v1.Parallel, error) + Update(ctx context.Context, parallel *v1.Parallel, opts metav1.UpdateOptions) (*v1.Parallel, error) + UpdateStatus(ctx context.Context, parallel *v1.Parallel, opts metav1.UpdateOptions) (*v1.Parallel, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Parallel, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.ParallelList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Parallel, err error) ParallelExpansion } @@ -64,20 +65,20 @@ func newParallels(c *FlowsV1Client, namespace string) *parallels { } // Get takes name of the parallel, and returns the corresponding parallel object, and an error if there is any. -func (c *parallels) Get(name string, options metav1.GetOptions) (result *v1.Parallel, err error) { +func (c *parallels) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Parallel, err error) { result = &v1.Parallel{} err = c.client.Get(). Namespace(c.ns). Resource("parallels"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of Parallels that match those selectors. -func (c *parallels) List(opts metav1.ListOptions) (result *v1.ParallelList, err error) { +func (c *parallels) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ParallelList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -88,13 +89,13 @@ func (c *parallels) List(opts metav1.ListOptions) (result *v1.ParallelList, err Resource("parallels"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested parallels. -func (c *parallels) Watch(opts metav1.ListOptions) (watch.Interface, error) { +func (c *parallels) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -105,87 +106,90 @@ func (c *parallels) Watch(opts metav1.ListOptions) (watch.Interface, error) { Resource("parallels"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a parallel and creates it. Returns the server's representation of the parallel, and an error, if there is any. -func (c *parallels) Create(parallel *v1.Parallel) (result *v1.Parallel, err error) { +func (c *parallels) Create(ctx context.Context, parallel *v1.Parallel, opts metav1.CreateOptions) (result *v1.Parallel, err error) { result = &v1.Parallel{} err = c.client.Post(). Namespace(c.ns). Resource("parallels"). + VersionedParams(&opts, scheme.ParameterCodec). Body(parallel). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a parallel and updates it. Returns the server's representation of the parallel, and an error, if there is any. -func (c *parallels) Update(parallel *v1.Parallel) (result *v1.Parallel, err error) { +func (c *parallels) Update(ctx context.Context, parallel *v1.Parallel, opts metav1.UpdateOptions) (result *v1.Parallel, err error) { result = &v1.Parallel{} err = c.client.Put(). Namespace(c.ns). Resource("parallels"). Name(parallel.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(parallel). - Do(). + Do(ctx). Into(result) return } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *parallels) UpdateStatus(parallel *v1.Parallel) (result *v1.Parallel, err error) { +func (c *parallels) UpdateStatus(ctx context.Context, parallel *v1.Parallel, opts metav1.UpdateOptions) (result *v1.Parallel, err error) { result = &v1.Parallel{} err = c.client.Put(). Namespace(c.ns). Resource("parallels"). Name(parallel.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(parallel). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the parallel and deletes it. Returns an error if one occurs. -func (c *parallels) Delete(name string, options *metav1.DeleteOptions) error { +func (c *parallels) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("parallels"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *parallels) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error { +func (c *parallels) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Namespace(c.ns). Resource("parallels"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched parallel. -func (c *parallels) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Parallel, err error) { +func (c *parallels) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Parallel, err error) { result = &v1.Parallel{} err = c.client.Patch(pt). Namespace(c.ns). Resource("parallels"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/flows/v1/sequence.go b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/flows/v1/sequence.go index 414c70b41e..cdbdecbbda 100644 --- a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/flows/v1/sequence.go +++ b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/flows/v1/sequence.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" "time" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -37,15 +38,15 @@ type SequencesGetter interface { // SequenceInterface has methods to work with Sequence resources. type SequenceInterface interface { - Create(*v1.Sequence) (*v1.Sequence, error) - Update(*v1.Sequence) (*v1.Sequence, error) - UpdateStatus(*v1.Sequence) (*v1.Sequence, error) - Delete(name string, options *metav1.DeleteOptions) error - DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error - Get(name string, options metav1.GetOptions) (*v1.Sequence, error) - List(opts metav1.ListOptions) (*v1.SequenceList, error) - Watch(opts metav1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Sequence, err error) + Create(ctx context.Context, sequence *v1.Sequence, opts metav1.CreateOptions) (*v1.Sequence, error) + Update(ctx context.Context, sequence *v1.Sequence, opts metav1.UpdateOptions) (*v1.Sequence, error) + UpdateStatus(ctx context.Context, sequence *v1.Sequence, opts metav1.UpdateOptions) (*v1.Sequence, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Sequence, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.SequenceList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Sequence, err error) SequenceExpansion } @@ -64,20 +65,20 @@ func newSequences(c *FlowsV1Client, namespace string) *sequences { } // Get takes name of the sequence, and returns the corresponding sequence object, and an error if there is any. -func (c *sequences) Get(name string, options metav1.GetOptions) (result *v1.Sequence, err error) { +func (c *sequences) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Sequence, err error) { result = &v1.Sequence{} err = c.client.Get(). Namespace(c.ns). Resource("sequences"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of Sequences that match those selectors. -func (c *sequences) List(opts metav1.ListOptions) (result *v1.SequenceList, err error) { +func (c *sequences) List(ctx context.Context, opts metav1.ListOptions) (result *v1.SequenceList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -88,13 +89,13 @@ func (c *sequences) List(opts metav1.ListOptions) (result *v1.SequenceList, err Resource("sequences"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested sequences. -func (c *sequences) Watch(opts metav1.ListOptions) (watch.Interface, error) { +func (c *sequences) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -105,87 +106,90 @@ func (c *sequences) Watch(opts metav1.ListOptions) (watch.Interface, error) { Resource("sequences"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a sequence and creates it. Returns the server's representation of the sequence, and an error, if there is any. -func (c *sequences) Create(sequence *v1.Sequence) (result *v1.Sequence, err error) { +func (c *sequences) Create(ctx context.Context, sequence *v1.Sequence, opts metav1.CreateOptions) (result *v1.Sequence, err error) { result = &v1.Sequence{} err = c.client.Post(). Namespace(c.ns). Resource("sequences"). + VersionedParams(&opts, scheme.ParameterCodec). Body(sequence). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a sequence and updates it. Returns the server's representation of the sequence, and an error, if there is any. -func (c *sequences) Update(sequence *v1.Sequence) (result *v1.Sequence, err error) { +func (c *sequences) Update(ctx context.Context, sequence *v1.Sequence, opts metav1.UpdateOptions) (result *v1.Sequence, err error) { result = &v1.Sequence{} err = c.client.Put(). Namespace(c.ns). Resource("sequences"). Name(sequence.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(sequence). - Do(). + Do(ctx). Into(result) return } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *sequences) UpdateStatus(sequence *v1.Sequence) (result *v1.Sequence, err error) { +func (c *sequences) UpdateStatus(ctx context.Context, sequence *v1.Sequence, opts metav1.UpdateOptions) (result *v1.Sequence, err error) { result = &v1.Sequence{} err = c.client.Put(). Namespace(c.ns). Resource("sequences"). Name(sequence.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(sequence). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the sequence and deletes it. Returns an error if one occurs. -func (c *sequences) Delete(name string, options *metav1.DeleteOptions) error { +func (c *sequences) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("sequences"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *sequences) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error { +func (c *sequences) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Namespace(c.ns). Resource("sequences"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched sequence. -func (c *sequences) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Sequence, err error) { +func (c *sequences) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Sequence, err error) { result = &v1.Sequence{} err = c.client.Patch(pt). Namespace(c.ns). Resource("sequences"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/flows/v1beta1/fake/fake_parallel.go b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/flows/v1beta1/fake/fake_parallel.go index 2e8ba42ba4..2a80f5dd86 100644 --- a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/flows/v1beta1/fake/fake_parallel.go +++ b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/flows/v1beta1/fake/fake_parallel.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -39,7 +41,7 @@ var parallelsResource = schema.GroupVersionResource{Group: "flows.knative.dev", var parallelsKind = schema.GroupVersionKind{Group: "flows.knative.dev", Version: "v1beta1", Kind: "Parallel"} // Get takes name of the parallel, and returns the corresponding parallel object, and an error if there is any. -func (c *FakeParallels) Get(name string, options v1.GetOptions) (result *v1beta1.Parallel, err error) { +func (c *FakeParallels) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.Parallel, err error) { obj, err := c.Fake. Invokes(testing.NewGetAction(parallelsResource, c.ns, name), &v1beta1.Parallel{}) @@ -50,7 +52,7 @@ func (c *FakeParallels) Get(name string, options v1.GetOptions) (result *v1beta1 } // List takes label and field selectors, and returns the list of Parallels that match those selectors. -func (c *FakeParallels) List(opts v1.ListOptions) (result *v1beta1.ParallelList, err error) { +func (c *FakeParallels) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.ParallelList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(parallelsResource, parallelsKind, c.ns, opts), &v1beta1.ParallelList{}) @@ -72,14 +74,14 @@ func (c *FakeParallels) List(opts v1.ListOptions) (result *v1beta1.ParallelList, } // Watch returns a watch.Interface that watches the requested parallels. -func (c *FakeParallels) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeParallels) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(parallelsResource, c.ns, opts)) } // Create takes the representation of a parallel and creates it. Returns the server's representation of the parallel, and an error, if there is any. -func (c *FakeParallels) Create(parallel *v1beta1.Parallel) (result *v1beta1.Parallel, err error) { +func (c *FakeParallels) Create(ctx context.Context, parallel *v1beta1.Parallel, opts v1.CreateOptions) (result *v1beta1.Parallel, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(parallelsResource, c.ns, parallel), &v1beta1.Parallel{}) @@ -90,7 +92,7 @@ func (c *FakeParallels) Create(parallel *v1beta1.Parallel) (result *v1beta1.Para } // Update takes the representation of a parallel and updates it. Returns the server's representation of the parallel, and an error, if there is any. -func (c *FakeParallels) Update(parallel *v1beta1.Parallel) (result *v1beta1.Parallel, err error) { +func (c *FakeParallels) Update(ctx context.Context, parallel *v1beta1.Parallel, opts v1.UpdateOptions) (result *v1beta1.Parallel, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(parallelsResource, c.ns, parallel), &v1beta1.Parallel{}) @@ -102,7 +104,7 @@ func (c *FakeParallels) Update(parallel *v1beta1.Parallel) (result *v1beta1.Para // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeParallels) UpdateStatus(parallel *v1beta1.Parallel) (*v1beta1.Parallel, error) { +func (c *FakeParallels) UpdateStatus(ctx context.Context, parallel *v1beta1.Parallel, opts v1.UpdateOptions) (*v1beta1.Parallel, error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(parallelsResource, "status", c.ns, parallel), &v1beta1.Parallel{}) @@ -113,7 +115,7 @@ func (c *FakeParallels) UpdateStatus(parallel *v1beta1.Parallel) (*v1beta1.Paral } // Delete takes name of the parallel and deletes it. Returns an error if one occurs. -func (c *FakeParallels) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeParallels) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewDeleteAction(parallelsResource, c.ns, name), &v1beta1.Parallel{}) @@ -121,15 +123,15 @@ func (c *FakeParallels) Delete(name string, options *v1.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *FakeParallels) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(parallelsResource, c.ns, listOptions) +func (c *FakeParallels) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(parallelsResource, c.ns, listOpts) _, err := c.Fake.Invokes(action, &v1beta1.ParallelList{}) return err } // Patch applies the patch and returns the patched parallel. -func (c *FakeParallels) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Parallel, err error) { +func (c *FakeParallels) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Parallel, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(parallelsResource, c.ns, name, pt, data, subresources...), &v1beta1.Parallel{}) diff --git a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/flows/v1beta1/fake/fake_sequence.go b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/flows/v1beta1/fake/fake_sequence.go index d6fff3cc30..20ad9dbe4f 100644 --- a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/flows/v1beta1/fake/fake_sequence.go +++ b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/flows/v1beta1/fake/fake_sequence.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -39,7 +41,7 @@ var sequencesResource = schema.GroupVersionResource{Group: "flows.knative.dev", var sequencesKind = schema.GroupVersionKind{Group: "flows.knative.dev", Version: "v1beta1", Kind: "Sequence"} // Get takes name of the sequence, and returns the corresponding sequence object, and an error if there is any. -func (c *FakeSequences) Get(name string, options v1.GetOptions) (result *v1beta1.Sequence, err error) { +func (c *FakeSequences) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.Sequence, err error) { obj, err := c.Fake. Invokes(testing.NewGetAction(sequencesResource, c.ns, name), &v1beta1.Sequence{}) @@ -50,7 +52,7 @@ func (c *FakeSequences) Get(name string, options v1.GetOptions) (result *v1beta1 } // List takes label and field selectors, and returns the list of Sequences that match those selectors. -func (c *FakeSequences) List(opts v1.ListOptions) (result *v1beta1.SequenceList, err error) { +func (c *FakeSequences) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.SequenceList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(sequencesResource, sequencesKind, c.ns, opts), &v1beta1.SequenceList{}) @@ -72,14 +74,14 @@ func (c *FakeSequences) List(opts v1.ListOptions) (result *v1beta1.SequenceList, } // Watch returns a watch.Interface that watches the requested sequences. -func (c *FakeSequences) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeSequences) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(sequencesResource, c.ns, opts)) } // Create takes the representation of a sequence and creates it. Returns the server's representation of the sequence, and an error, if there is any. -func (c *FakeSequences) Create(sequence *v1beta1.Sequence) (result *v1beta1.Sequence, err error) { +func (c *FakeSequences) Create(ctx context.Context, sequence *v1beta1.Sequence, opts v1.CreateOptions) (result *v1beta1.Sequence, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(sequencesResource, c.ns, sequence), &v1beta1.Sequence{}) @@ -90,7 +92,7 @@ func (c *FakeSequences) Create(sequence *v1beta1.Sequence) (result *v1beta1.Sequ } // Update takes the representation of a sequence and updates it. Returns the server's representation of the sequence, and an error, if there is any. -func (c *FakeSequences) Update(sequence *v1beta1.Sequence) (result *v1beta1.Sequence, err error) { +func (c *FakeSequences) Update(ctx context.Context, sequence *v1beta1.Sequence, opts v1.UpdateOptions) (result *v1beta1.Sequence, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(sequencesResource, c.ns, sequence), &v1beta1.Sequence{}) @@ -102,7 +104,7 @@ func (c *FakeSequences) Update(sequence *v1beta1.Sequence) (result *v1beta1.Sequ // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeSequences) UpdateStatus(sequence *v1beta1.Sequence) (*v1beta1.Sequence, error) { +func (c *FakeSequences) UpdateStatus(ctx context.Context, sequence *v1beta1.Sequence, opts v1.UpdateOptions) (*v1beta1.Sequence, error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(sequencesResource, "status", c.ns, sequence), &v1beta1.Sequence{}) @@ -113,7 +115,7 @@ func (c *FakeSequences) UpdateStatus(sequence *v1beta1.Sequence) (*v1beta1.Seque } // Delete takes name of the sequence and deletes it. Returns an error if one occurs. -func (c *FakeSequences) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeSequences) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewDeleteAction(sequencesResource, c.ns, name), &v1beta1.Sequence{}) @@ -121,15 +123,15 @@ func (c *FakeSequences) Delete(name string, options *v1.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *FakeSequences) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(sequencesResource, c.ns, listOptions) +func (c *FakeSequences) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(sequencesResource, c.ns, listOpts) _, err := c.Fake.Invokes(action, &v1beta1.SequenceList{}) return err } // Patch applies the patch and returns the patched sequence. -func (c *FakeSequences) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Sequence, err error) { +func (c *FakeSequences) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Sequence, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(sequencesResource, c.ns, name, pt, data, subresources...), &v1beta1.Sequence{}) diff --git a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/flows/v1beta1/parallel.go b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/flows/v1beta1/parallel.go index 163fd30b95..e4b5dbc6aa 100644 --- a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/flows/v1beta1/parallel.go +++ b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/flows/v1beta1/parallel.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" "time" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -37,15 +38,15 @@ type ParallelsGetter interface { // ParallelInterface has methods to work with Parallel resources. type ParallelInterface interface { - Create(*v1beta1.Parallel) (*v1beta1.Parallel, error) - Update(*v1beta1.Parallel) (*v1beta1.Parallel, error) - UpdateStatus(*v1beta1.Parallel) (*v1beta1.Parallel, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*v1beta1.Parallel, error) - List(opts v1.ListOptions) (*v1beta1.ParallelList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Parallel, err error) + Create(ctx context.Context, parallel *v1beta1.Parallel, opts v1.CreateOptions) (*v1beta1.Parallel, error) + Update(ctx context.Context, parallel *v1beta1.Parallel, opts v1.UpdateOptions) (*v1beta1.Parallel, error) + UpdateStatus(ctx context.Context, parallel *v1beta1.Parallel, opts v1.UpdateOptions) (*v1beta1.Parallel, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.Parallel, error) + List(ctx context.Context, opts v1.ListOptions) (*v1beta1.ParallelList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Parallel, err error) ParallelExpansion } @@ -64,20 +65,20 @@ func newParallels(c *FlowsV1beta1Client, namespace string) *parallels { } // Get takes name of the parallel, and returns the corresponding parallel object, and an error if there is any. -func (c *parallels) Get(name string, options v1.GetOptions) (result *v1beta1.Parallel, err error) { +func (c *parallels) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.Parallel, err error) { result = &v1beta1.Parallel{} err = c.client.Get(). Namespace(c.ns). Resource("parallels"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of Parallels that match those selectors. -func (c *parallels) List(opts v1.ListOptions) (result *v1beta1.ParallelList, err error) { +func (c *parallels) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.ParallelList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -88,13 +89,13 @@ func (c *parallels) List(opts v1.ListOptions) (result *v1beta1.ParallelList, err Resource("parallels"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested parallels. -func (c *parallels) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *parallels) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -105,87 +106,90 @@ func (c *parallels) Watch(opts v1.ListOptions) (watch.Interface, error) { Resource("parallels"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a parallel and creates it. Returns the server's representation of the parallel, and an error, if there is any. -func (c *parallels) Create(parallel *v1beta1.Parallel) (result *v1beta1.Parallel, err error) { +func (c *parallels) Create(ctx context.Context, parallel *v1beta1.Parallel, opts v1.CreateOptions) (result *v1beta1.Parallel, err error) { result = &v1beta1.Parallel{} err = c.client.Post(). Namespace(c.ns). Resource("parallels"). + VersionedParams(&opts, scheme.ParameterCodec). Body(parallel). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a parallel and updates it. Returns the server's representation of the parallel, and an error, if there is any. -func (c *parallels) Update(parallel *v1beta1.Parallel) (result *v1beta1.Parallel, err error) { +func (c *parallels) Update(ctx context.Context, parallel *v1beta1.Parallel, opts v1.UpdateOptions) (result *v1beta1.Parallel, err error) { result = &v1beta1.Parallel{} err = c.client.Put(). Namespace(c.ns). Resource("parallels"). Name(parallel.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(parallel). - Do(). + Do(ctx). Into(result) return } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *parallels) UpdateStatus(parallel *v1beta1.Parallel) (result *v1beta1.Parallel, err error) { +func (c *parallels) UpdateStatus(ctx context.Context, parallel *v1beta1.Parallel, opts v1.UpdateOptions) (result *v1beta1.Parallel, err error) { result = &v1beta1.Parallel{} err = c.client.Put(). Namespace(c.ns). Resource("parallels"). Name(parallel.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(parallel). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the parallel and deletes it. Returns an error if one occurs. -func (c *parallels) Delete(name string, options *v1.DeleteOptions) error { +func (c *parallels) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("parallels"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *parallels) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *parallels) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Namespace(c.ns). Resource("parallels"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched parallel. -func (c *parallels) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Parallel, err error) { +func (c *parallels) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Parallel, err error) { result = &v1beta1.Parallel{} err = c.client.Patch(pt). Namespace(c.ns). Resource("parallels"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/flows/v1beta1/sequence.go b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/flows/v1beta1/sequence.go index f1cfcc46b4..449f7b071e 100644 --- a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/flows/v1beta1/sequence.go +++ b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/flows/v1beta1/sequence.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" "time" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -37,15 +38,15 @@ type SequencesGetter interface { // SequenceInterface has methods to work with Sequence resources. type SequenceInterface interface { - Create(*v1beta1.Sequence) (*v1beta1.Sequence, error) - Update(*v1beta1.Sequence) (*v1beta1.Sequence, error) - UpdateStatus(*v1beta1.Sequence) (*v1beta1.Sequence, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*v1beta1.Sequence, error) - List(opts v1.ListOptions) (*v1beta1.SequenceList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Sequence, err error) + Create(ctx context.Context, sequence *v1beta1.Sequence, opts v1.CreateOptions) (*v1beta1.Sequence, error) + Update(ctx context.Context, sequence *v1beta1.Sequence, opts v1.UpdateOptions) (*v1beta1.Sequence, error) + UpdateStatus(ctx context.Context, sequence *v1beta1.Sequence, opts v1.UpdateOptions) (*v1beta1.Sequence, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.Sequence, error) + List(ctx context.Context, opts v1.ListOptions) (*v1beta1.SequenceList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Sequence, err error) SequenceExpansion } @@ -64,20 +65,20 @@ func newSequences(c *FlowsV1beta1Client, namespace string) *sequences { } // Get takes name of the sequence, and returns the corresponding sequence object, and an error if there is any. -func (c *sequences) Get(name string, options v1.GetOptions) (result *v1beta1.Sequence, err error) { +func (c *sequences) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.Sequence, err error) { result = &v1beta1.Sequence{} err = c.client.Get(). Namespace(c.ns). Resource("sequences"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of Sequences that match those selectors. -func (c *sequences) List(opts v1.ListOptions) (result *v1beta1.SequenceList, err error) { +func (c *sequences) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.SequenceList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -88,13 +89,13 @@ func (c *sequences) List(opts v1.ListOptions) (result *v1beta1.SequenceList, err Resource("sequences"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested sequences. -func (c *sequences) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *sequences) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -105,87 +106,90 @@ func (c *sequences) Watch(opts v1.ListOptions) (watch.Interface, error) { Resource("sequences"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a sequence and creates it. Returns the server's representation of the sequence, and an error, if there is any. -func (c *sequences) Create(sequence *v1beta1.Sequence) (result *v1beta1.Sequence, err error) { +func (c *sequences) Create(ctx context.Context, sequence *v1beta1.Sequence, opts v1.CreateOptions) (result *v1beta1.Sequence, err error) { result = &v1beta1.Sequence{} err = c.client.Post(). Namespace(c.ns). Resource("sequences"). + VersionedParams(&opts, scheme.ParameterCodec). Body(sequence). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a sequence and updates it. Returns the server's representation of the sequence, and an error, if there is any. -func (c *sequences) Update(sequence *v1beta1.Sequence) (result *v1beta1.Sequence, err error) { +func (c *sequences) Update(ctx context.Context, sequence *v1beta1.Sequence, opts v1.UpdateOptions) (result *v1beta1.Sequence, err error) { result = &v1beta1.Sequence{} err = c.client.Put(). Namespace(c.ns). Resource("sequences"). Name(sequence.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(sequence). - Do(). + Do(ctx). Into(result) return } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *sequences) UpdateStatus(sequence *v1beta1.Sequence) (result *v1beta1.Sequence, err error) { +func (c *sequences) UpdateStatus(ctx context.Context, sequence *v1beta1.Sequence, opts v1.UpdateOptions) (result *v1beta1.Sequence, err error) { result = &v1beta1.Sequence{} err = c.client.Put(). Namespace(c.ns). Resource("sequences"). Name(sequence.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(sequence). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the sequence and deletes it. Returns an error if one occurs. -func (c *sequences) Delete(name string, options *v1.DeleteOptions) error { +func (c *sequences) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("sequences"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *sequences) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *sequences) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Namespace(c.ns). Resource("sequences"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched sequence. -func (c *sequences) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Sequence, err error) { +func (c *sequences) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Sequence, err error) { result = &v1beta1.Sequence{} err = c.client.Patch(pt). Namespace(c.ns). Resource("sequences"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/messaging/v1/channel.go b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/messaging/v1/channel.go index 012acc7c93..fdf6cc659f 100644 --- a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/messaging/v1/channel.go +++ b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/messaging/v1/channel.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" "time" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -37,15 +38,15 @@ type ChannelsGetter interface { // ChannelInterface has methods to work with Channel resources. type ChannelInterface interface { - Create(*v1.Channel) (*v1.Channel, error) - Update(*v1.Channel) (*v1.Channel, error) - UpdateStatus(*v1.Channel) (*v1.Channel, error) - Delete(name string, options *metav1.DeleteOptions) error - DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error - Get(name string, options metav1.GetOptions) (*v1.Channel, error) - List(opts metav1.ListOptions) (*v1.ChannelList, error) - Watch(opts metav1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Channel, err error) + Create(ctx context.Context, channel *v1.Channel, opts metav1.CreateOptions) (*v1.Channel, error) + Update(ctx context.Context, channel *v1.Channel, opts metav1.UpdateOptions) (*v1.Channel, error) + UpdateStatus(ctx context.Context, channel *v1.Channel, opts metav1.UpdateOptions) (*v1.Channel, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Channel, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.ChannelList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Channel, err error) ChannelExpansion } @@ -64,20 +65,20 @@ func newChannels(c *MessagingV1Client, namespace string) *channels { } // Get takes name of the channel, and returns the corresponding channel object, and an error if there is any. -func (c *channels) Get(name string, options metav1.GetOptions) (result *v1.Channel, err error) { +func (c *channels) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Channel, err error) { result = &v1.Channel{} err = c.client.Get(). Namespace(c.ns). Resource("channels"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of Channels that match those selectors. -func (c *channels) List(opts metav1.ListOptions) (result *v1.ChannelList, err error) { +func (c *channels) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ChannelList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -88,13 +89,13 @@ func (c *channels) List(opts metav1.ListOptions) (result *v1.ChannelList, err er Resource("channels"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested channels. -func (c *channels) Watch(opts metav1.ListOptions) (watch.Interface, error) { +func (c *channels) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -105,87 +106,90 @@ func (c *channels) Watch(opts metav1.ListOptions) (watch.Interface, error) { Resource("channels"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a channel and creates it. Returns the server's representation of the channel, and an error, if there is any. -func (c *channels) Create(channel *v1.Channel) (result *v1.Channel, err error) { +func (c *channels) Create(ctx context.Context, channel *v1.Channel, opts metav1.CreateOptions) (result *v1.Channel, err error) { result = &v1.Channel{} err = c.client.Post(). Namespace(c.ns). Resource("channels"). + VersionedParams(&opts, scheme.ParameterCodec). Body(channel). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a channel and updates it. Returns the server's representation of the channel, and an error, if there is any. -func (c *channels) Update(channel *v1.Channel) (result *v1.Channel, err error) { +func (c *channels) Update(ctx context.Context, channel *v1.Channel, opts metav1.UpdateOptions) (result *v1.Channel, err error) { result = &v1.Channel{} err = c.client.Put(). Namespace(c.ns). Resource("channels"). Name(channel.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(channel). - Do(). + Do(ctx). Into(result) return } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *channels) UpdateStatus(channel *v1.Channel) (result *v1.Channel, err error) { +func (c *channels) UpdateStatus(ctx context.Context, channel *v1.Channel, opts metav1.UpdateOptions) (result *v1.Channel, err error) { result = &v1.Channel{} err = c.client.Put(). Namespace(c.ns). Resource("channels"). Name(channel.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(channel). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the channel and deletes it. Returns an error if one occurs. -func (c *channels) Delete(name string, options *metav1.DeleteOptions) error { +func (c *channels) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("channels"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *channels) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error { +func (c *channels) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Namespace(c.ns). Resource("channels"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched channel. -func (c *channels) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Channel, err error) { +func (c *channels) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Channel, err error) { result = &v1.Channel{} err = c.client.Patch(pt). Namespace(c.ns). Resource("channels"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/messaging/v1/fake/fake_channel.go b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/messaging/v1/fake/fake_channel.go index 32b1547ce4..f687312d9c 100644 --- a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/messaging/v1/fake/fake_channel.go +++ b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/messaging/v1/fake/fake_channel.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -39,7 +41,7 @@ var channelsResource = schema.GroupVersionResource{Group: "messaging.knative.dev var channelsKind = schema.GroupVersionKind{Group: "messaging.knative.dev", Version: "v1", Kind: "Channel"} // Get takes name of the channel, and returns the corresponding channel object, and an error if there is any. -func (c *FakeChannels) Get(name string, options v1.GetOptions) (result *messagingv1.Channel, err error) { +func (c *FakeChannels) Get(ctx context.Context, name string, options v1.GetOptions) (result *messagingv1.Channel, err error) { obj, err := c.Fake. Invokes(testing.NewGetAction(channelsResource, c.ns, name), &messagingv1.Channel{}) @@ -50,7 +52,7 @@ func (c *FakeChannels) Get(name string, options v1.GetOptions) (result *messagin } // List takes label and field selectors, and returns the list of Channels that match those selectors. -func (c *FakeChannels) List(opts v1.ListOptions) (result *messagingv1.ChannelList, err error) { +func (c *FakeChannels) List(ctx context.Context, opts v1.ListOptions) (result *messagingv1.ChannelList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(channelsResource, channelsKind, c.ns, opts), &messagingv1.ChannelList{}) @@ -72,14 +74,14 @@ func (c *FakeChannels) List(opts v1.ListOptions) (result *messagingv1.ChannelLis } // Watch returns a watch.Interface that watches the requested channels. -func (c *FakeChannels) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeChannels) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(channelsResource, c.ns, opts)) } // Create takes the representation of a channel and creates it. Returns the server's representation of the channel, and an error, if there is any. -func (c *FakeChannels) Create(channel *messagingv1.Channel) (result *messagingv1.Channel, err error) { +func (c *FakeChannels) Create(ctx context.Context, channel *messagingv1.Channel, opts v1.CreateOptions) (result *messagingv1.Channel, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(channelsResource, c.ns, channel), &messagingv1.Channel{}) @@ -90,7 +92,7 @@ func (c *FakeChannels) Create(channel *messagingv1.Channel) (result *messagingv1 } // Update takes the representation of a channel and updates it. Returns the server's representation of the channel, and an error, if there is any. -func (c *FakeChannels) Update(channel *messagingv1.Channel) (result *messagingv1.Channel, err error) { +func (c *FakeChannels) Update(ctx context.Context, channel *messagingv1.Channel, opts v1.UpdateOptions) (result *messagingv1.Channel, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(channelsResource, c.ns, channel), &messagingv1.Channel{}) @@ -102,7 +104,7 @@ func (c *FakeChannels) Update(channel *messagingv1.Channel) (result *messagingv1 // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeChannels) UpdateStatus(channel *messagingv1.Channel) (*messagingv1.Channel, error) { +func (c *FakeChannels) UpdateStatus(ctx context.Context, channel *messagingv1.Channel, opts v1.UpdateOptions) (*messagingv1.Channel, error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(channelsResource, "status", c.ns, channel), &messagingv1.Channel{}) @@ -113,7 +115,7 @@ func (c *FakeChannels) UpdateStatus(channel *messagingv1.Channel) (*messagingv1. } // Delete takes name of the channel and deletes it. Returns an error if one occurs. -func (c *FakeChannels) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeChannels) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewDeleteAction(channelsResource, c.ns, name), &messagingv1.Channel{}) @@ -121,15 +123,15 @@ func (c *FakeChannels) Delete(name string, options *v1.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *FakeChannels) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(channelsResource, c.ns, listOptions) +func (c *FakeChannels) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(channelsResource, c.ns, listOpts) _, err := c.Fake.Invokes(action, &messagingv1.ChannelList{}) return err } // Patch applies the patch and returns the patched channel. -func (c *FakeChannels) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *messagingv1.Channel, err error) { +func (c *FakeChannels) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *messagingv1.Channel, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(channelsResource, c.ns, name, pt, data, subresources...), &messagingv1.Channel{}) diff --git a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/messaging/v1/fake/fake_inmemorychannel.go b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/messaging/v1/fake/fake_inmemorychannel.go index 2d1a536cf5..54921ff97a 100644 --- a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/messaging/v1/fake/fake_inmemorychannel.go +++ b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/messaging/v1/fake/fake_inmemorychannel.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -39,7 +41,7 @@ var inmemorychannelsResource = schema.GroupVersionResource{Group: "messaging.kna var inmemorychannelsKind = schema.GroupVersionKind{Group: "messaging.knative.dev", Version: "v1", Kind: "InMemoryChannel"} // Get takes name of the inMemoryChannel, and returns the corresponding inMemoryChannel object, and an error if there is any. -func (c *FakeInMemoryChannels) Get(name string, options v1.GetOptions) (result *messagingv1.InMemoryChannel, err error) { +func (c *FakeInMemoryChannels) Get(ctx context.Context, name string, options v1.GetOptions) (result *messagingv1.InMemoryChannel, err error) { obj, err := c.Fake. Invokes(testing.NewGetAction(inmemorychannelsResource, c.ns, name), &messagingv1.InMemoryChannel{}) @@ -50,7 +52,7 @@ func (c *FakeInMemoryChannels) Get(name string, options v1.GetOptions) (result * } // List takes label and field selectors, and returns the list of InMemoryChannels that match those selectors. -func (c *FakeInMemoryChannels) List(opts v1.ListOptions) (result *messagingv1.InMemoryChannelList, err error) { +func (c *FakeInMemoryChannels) List(ctx context.Context, opts v1.ListOptions) (result *messagingv1.InMemoryChannelList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(inmemorychannelsResource, inmemorychannelsKind, c.ns, opts), &messagingv1.InMemoryChannelList{}) @@ -72,14 +74,14 @@ func (c *FakeInMemoryChannels) List(opts v1.ListOptions) (result *messagingv1.In } // Watch returns a watch.Interface that watches the requested inMemoryChannels. -func (c *FakeInMemoryChannels) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeInMemoryChannels) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(inmemorychannelsResource, c.ns, opts)) } // Create takes the representation of a inMemoryChannel and creates it. Returns the server's representation of the inMemoryChannel, and an error, if there is any. -func (c *FakeInMemoryChannels) Create(inMemoryChannel *messagingv1.InMemoryChannel) (result *messagingv1.InMemoryChannel, err error) { +func (c *FakeInMemoryChannels) Create(ctx context.Context, inMemoryChannel *messagingv1.InMemoryChannel, opts v1.CreateOptions) (result *messagingv1.InMemoryChannel, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(inmemorychannelsResource, c.ns, inMemoryChannel), &messagingv1.InMemoryChannel{}) @@ -90,7 +92,7 @@ func (c *FakeInMemoryChannels) Create(inMemoryChannel *messagingv1.InMemoryChann } // Update takes the representation of a inMemoryChannel and updates it. Returns the server's representation of the inMemoryChannel, and an error, if there is any. -func (c *FakeInMemoryChannels) Update(inMemoryChannel *messagingv1.InMemoryChannel) (result *messagingv1.InMemoryChannel, err error) { +func (c *FakeInMemoryChannels) Update(ctx context.Context, inMemoryChannel *messagingv1.InMemoryChannel, opts v1.UpdateOptions) (result *messagingv1.InMemoryChannel, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(inmemorychannelsResource, c.ns, inMemoryChannel), &messagingv1.InMemoryChannel{}) @@ -102,7 +104,7 @@ func (c *FakeInMemoryChannels) Update(inMemoryChannel *messagingv1.InMemoryChann // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeInMemoryChannels) UpdateStatus(inMemoryChannel *messagingv1.InMemoryChannel) (*messagingv1.InMemoryChannel, error) { +func (c *FakeInMemoryChannels) UpdateStatus(ctx context.Context, inMemoryChannel *messagingv1.InMemoryChannel, opts v1.UpdateOptions) (*messagingv1.InMemoryChannel, error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(inmemorychannelsResource, "status", c.ns, inMemoryChannel), &messagingv1.InMemoryChannel{}) @@ -113,7 +115,7 @@ func (c *FakeInMemoryChannels) UpdateStatus(inMemoryChannel *messagingv1.InMemor } // Delete takes name of the inMemoryChannel and deletes it. Returns an error if one occurs. -func (c *FakeInMemoryChannels) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeInMemoryChannels) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewDeleteAction(inmemorychannelsResource, c.ns, name), &messagingv1.InMemoryChannel{}) @@ -121,15 +123,15 @@ func (c *FakeInMemoryChannels) Delete(name string, options *v1.DeleteOptions) er } // DeleteCollection deletes a collection of objects. -func (c *FakeInMemoryChannels) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(inmemorychannelsResource, c.ns, listOptions) +func (c *FakeInMemoryChannels) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(inmemorychannelsResource, c.ns, listOpts) _, err := c.Fake.Invokes(action, &messagingv1.InMemoryChannelList{}) return err } // Patch applies the patch and returns the patched inMemoryChannel. -func (c *FakeInMemoryChannels) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *messagingv1.InMemoryChannel, err error) { +func (c *FakeInMemoryChannels) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *messagingv1.InMemoryChannel, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(inmemorychannelsResource, c.ns, name, pt, data, subresources...), &messagingv1.InMemoryChannel{}) diff --git a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/messaging/v1/fake/fake_subscription.go b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/messaging/v1/fake/fake_subscription.go index 350d902643..39a5503b11 100644 --- a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/messaging/v1/fake/fake_subscription.go +++ b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/messaging/v1/fake/fake_subscription.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -39,7 +41,7 @@ var subscriptionsResource = schema.GroupVersionResource{Group: "messaging.knativ var subscriptionsKind = schema.GroupVersionKind{Group: "messaging.knative.dev", Version: "v1", Kind: "Subscription"} // Get takes name of the subscription, and returns the corresponding subscription object, and an error if there is any. -func (c *FakeSubscriptions) Get(name string, options v1.GetOptions) (result *messagingv1.Subscription, err error) { +func (c *FakeSubscriptions) Get(ctx context.Context, name string, options v1.GetOptions) (result *messagingv1.Subscription, err error) { obj, err := c.Fake. Invokes(testing.NewGetAction(subscriptionsResource, c.ns, name), &messagingv1.Subscription{}) @@ -50,7 +52,7 @@ func (c *FakeSubscriptions) Get(name string, options v1.GetOptions) (result *mes } // List takes label and field selectors, and returns the list of Subscriptions that match those selectors. -func (c *FakeSubscriptions) List(opts v1.ListOptions) (result *messagingv1.SubscriptionList, err error) { +func (c *FakeSubscriptions) List(ctx context.Context, opts v1.ListOptions) (result *messagingv1.SubscriptionList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(subscriptionsResource, subscriptionsKind, c.ns, opts), &messagingv1.SubscriptionList{}) @@ -72,14 +74,14 @@ func (c *FakeSubscriptions) List(opts v1.ListOptions) (result *messagingv1.Subsc } // Watch returns a watch.Interface that watches the requested subscriptions. -func (c *FakeSubscriptions) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeSubscriptions) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(subscriptionsResource, c.ns, opts)) } // Create takes the representation of a subscription and creates it. Returns the server's representation of the subscription, and an error, if there is any. -func (c *FakeSubscriptions) Create(subscription *messagingv1.Subscription) (result *messagingv1.Subscription, err error) { +func (c *FakeSubscriptions) Create(ctx context.Context, subscription *messagingv1.Subscription, opts v1.CreateOptions) (result *messagingv1.Subscription, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(subscriptionsResource, c.ns, subscription), &messagingv1.Subscription{}) @@ -90,7 +92,7 @@ func (c *FakeSubscriptions) Create(subscription *messagingv1.Subscription) (resu } // Update takes the representation of a subscription and updates it. Returns the server's representation of the subscription, and an error, if there is any. -func (c *FakeSubscriptions) Update(subscription *messagingv1.Subscription) (result *messagingv1.Subscription, err error) { +func (c *FakeSubscriptions) Update(ctx context.Context, subscription *messagingv1.Subscription, opts v1.UpdateOptions) (result *messagingv1.Subscription, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(subscriptionsResource, c.ns, subscription), &messagingv1.Subscription{}) @@ -102,7 +104,7 @@ func (c *FakeSubscriptions) Update(subscription *messagingv1.Subscription) (resu // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeSubscriptions) UpdateStatus(subscription *messagingv1.Subscription) (*messagingv1.Subscription, error) { +func (c *FakeSubscriptions) UpdateStatus(ctx context.Context, subscription *messagingv1.Subscription, opts v1.UpdateOptions) (*messagingv1.Subscription, error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(subscriptionsResource, "status", c.ns, subscription), &messagingv1.Subscription{}) @@ -113,7 +115,7 @@ func (c *FakeSubscriptions) UpdateStatus(subscription *messagingv1.Subscription) } // Delete takes name of the subscription and deletes it. Returns an error if one occurs. -func (c *FakeSubscriptions) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeSubscriptions) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewDeleteAction(subscriptionsResource, c.ns, name), &messagingv1.Subscription{}) @@ -121,15 +123,15 @@ func (c *FakeSubscriptions) Delete(name string, options *v1.DeleteOptions) error } // DeleteCollection deletes a collection of objects. -func (c *FakeSubscriptions) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(subscriptionsResource, c.ns, listOptions) +func (c *FakeSubscriptions) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(subscriptionsResource, c.ns, listOpts) _, err := c.Fake.Invokes(action, &messagingv1.SubscriptionList{}) return err } // Patch applies the patch and returns the patched subscription. -func (c *FakeSubscriptions) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *messagingv1.Subscription, err error) { +func (c *FakeSubscriptions) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *messagingv1.Subscription, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(subscriptionsResource, c.ns, name, pt, data, subresources...), &messagingv1.Subscription{}) diff --git a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/messaging/v1/inmemorychannel.go b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/messaging/v1/inmemorychannel.go index d7496ac63e..34c4e00e30 100644 --- a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/messaging/v1/inmemorychannel.go +++ b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/messaging/v1/inmemorychannel.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" "time" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -37,15 +38,15 @@ type InMemoryChannelsGetter interface { // InMemoryChannelInterface has methods to work with InMemoryChannel resources. type InMemoryChannelInterface interface { - Create(*v1.InMemoryChannel) (*v1.InMemoryChannel, error) - Update(*v1.InMemoryChannel) (*v1.InMemoryChannel, error) - UpdateStatus(*v1.InMemoryChannel) (*v1.InMemoryChannel, error) - Delete(name string, options *metav1.DeleteOptions) error - DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error - Get(name string, options metav1.GetOptions) (*v1.InMemoryChannel, error) - List(opts metav1.ListOptions) (*v1.InMemoryChannelList, error) - Watch(opts metav1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.InMemoryChannel, err error) + Create(ctx context.Context, inMemoryChannel *v1.InMemoryChannel, opts metav1.CreateOptions) (*v1.InMemoryChannel, error) + Update(ctx context.Context, inMemoryChannel *v1.InMemoryChannel, opts metav1.UpdateOptions) (*v1.InMemoryChannel, error) + UpdateStatus(ctx context.Context, inMemoryChannel *v1.InMemoryChannel, opts metav1.UpdateOptions) (*v1.InMemoryChannel, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.InMemoryChannel, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.InMemoryChannelList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.InMemoryChannel, err error) InMemoryChannelExpansion } @@ -64,20 +65,20 @@ func newInMemoryChannels(c *MessagingV1Client, namespace string) *inMemoryChanne } // Get takes name of the inMemoryChannel, and returns the corresponding inMemoryChannel object, and an error if there is any. -func (c *inMemoryChannels) Get(name string, options metav1.GetOptions) (result *v1.InMemoryChannel, err error) { +func (c *inMemoryChannels) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.InMemoryChannel, err error) { result = &v1.InMemoryChannel{} err = c.client.Get(). Namespace(c.ns). Resource("inmemorychannels"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of InMemoryChannels that match those selectors. -func (c *inMemoryChannels) List(opts metav1.ListOptions) (result *v1.InMemoryChannelList, err error) { +func (c *inMemoryChannels) List(ctx context.Context, opts metav1.ListOptions) (result *v1.InMemoryChannelList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -88,13 +89,13 @@ func (c *inMemoryChannels) List(opts metav1.ListOptions) (result *v1.InMemoryCha Resource("inmemorychannels"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested inMemoryChannels. -func (c *inMemoryChannels) Watch(opts metav1.ListOptions) (watch.Interface, error) { +func (c *inMemoryChannels) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -105,87 +106,90 @@ func (c *inMemoryChannels) Watch(opts metav1.ListOptions) (watch.Interface, erro Resource("inmemorychannels"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a inMemoryChannel and creates it. Returns the server's representation of the inMemoryChannel, and an error, if there is any. -func (c *inMemoryChannels) Create(inMemoryChannel *v1.InMemoryChannel) (result *v1.InMemoryChannel, err error) { +func (c *inMemoryChannels) Create(ctx context.Context, inMemoryChannel *v1.InMemoryChannel, opts metav1.CreateOptions) (result *v1.InMemoryChannel, err error) { result = &v1.InMemoryChannel{} err = c.client.Post(). Namespace(c.ns). Resource("inmemorychannels"). + VersionedParams(&opts, scheme.ParameterCodec). Body(inMemoryChannel). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a inMemoryChannel and updates it. Returns the server's representation of the inMemoryChannel, and an error, if there is any. -func (c *inMemoryChannels) Update(inMemoryChannel *v1.InMemoryChannel) (result *v1.InMemoryChannel, err error) { +func (c *inMemoryChannels) Update(ctx context.Context, inMemoryChannel *v1.InMemoryChannel, opts metav1.UpdateOptions) (result *v1.InMemoryChannel, err error) { result = &v1.InMemoryChannel{} err = c.client.Put(). Namespace(c.ns). Resource("inmemorychannels"). Name(inMemoryChannel.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(inMemoryChannel). - Do(). + Do(ctx). Into(result) return } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *inMemoryChannels) UpdateStatus(inMemoryChannel *v1.InMemoryChannel) (result *v1.InMemoryChannel, err error) { +func (c *inMemoryChannels) UpdateStatus(ctx context.Context, inMemoryChannel *v1.InMemoryChannel, opts metav1.UpdateOptions) (result *v1.InMemoryChannel, err error) { result = &v1.InMemoryChannel{} err = c.client.Put(). Namespace(c.ns). Resource("inmemorychannels"). Name(inMemoryChannel.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(inMemoryChannel). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the inMemoryChannel and deletes it. Returns an error if one occurs. -func (c *inMemoryChannels) Delete(name string, options *metav1.DeleteOptions) error { +func (c *inMemoryChannels) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("inmemorychannels"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *inMemoryChannels) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error { +func (c *inMemoryChannels) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Namespace(c.ns). Resource("inmemorychannels"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched inMemoryChannel. -func (c *inMemoryChannels) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.InMemoryChannel, err error) { +func (c *inMemoryChannels) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.InMemoryChannel, err error) { result = &v1.InMemoryChannel{} err = c.client.Patch(pt). Namespace(c.ns). Resource("inmemorychannels"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/messaging/v1/subscription.go b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/messaging/v1/subscription.go index 749a5ca04c..cf36c48743 100644 --- a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/messaging/v1/subscription.go +++ b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/messaging/v1/subscription.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" "time" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -37,15 +38,15 @@ type SubscriptionsGetter interface { // SubscriptionInterface has methods to work with Subscription resources. type SubscriptionInterface interface { - Create(*v1.Subscription) (*v1.Subscription, error) - Update(*v1.Subscription) (*v1.Subscription, error) - UpdateStatus(*v1.Subscription) (*v1.Subscription, error) - Delete(name string, options *metav1.DeleteOptions) error - DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error - Get(name string, options metav1.GetOptions) (*v1.Subscription, error) - List(opts metav1.ListOptions) (*v1.SubscriptionList, error) - Watch(opts metav1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Subscription, err error) + Create(ctx context.Context, subscription *v1.Subscription, opts metav1.CreateOptions) (*v1.Subscription, error) + Update(ctx context.Context, subscription *v1.Subscription, opts metav1.UpdateOptions) (*v1.Subscription, error) + UpdateStatus(ctx context.Context, subscription *v1.Subscription, opts metav1.UpdateOptions) (*v1.Subscription, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Subscription, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.SubscriptionList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Subscription, err error) SubscriptionExpansion } @@ -64,20 +65,20 @@ func newSubscriptions(c *MessagingV1Client, namespace string) *subscriptions { } // Get takes name of the subscription, and returns the corresponding subscription object, and an error if there is any. -func (c *subscriptions) Get(name string, options metav1.GetOptions) (result *v1.Subscription, err error) { +func (c *subscriptions) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Subscription, err error) { result = &v1.Subscription{} err = c.client.Get(). Namespace(c.ns). Resource("subscriptions"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of Subscriptions that match those selectors. -func (c *subscriptions) List(opts metav1.ListOptions) (result *v1.SubscriptionList, err error) { +func (c *subscriptions) List(ctx context.Context, opts metav1.ListOptions) (result *v1.SubscriptionList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -88,13 +89,13 @@ func (c *subscriptions) List(opts metav1.ListOptions) (result *v1.SubscriptionLi Resource("subscriptions"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested subscriptions. -func (c *subscriptions) Watch(opts metav1.ListOptions) (watch.Interface, error) { +func (c *subscriptions) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -105,87 +106,90 @@ func (c *subscriptions) Watch(opts metav1.ListOptions) (watch.Interface, error) Resource("subscriptions"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a subscription and creates it. Returns the server's representation of the subscription, and an error, if there is any. -func (c *subscriptions) Create(subscription *v1.Subscription) (result *v1.Subscription, err error) { +func (c *subscriptions) Create(ctx context.Context, subscription *v1.Subscription, opts metav1.CreateOptions) (result *v1.Subscription, err error) { result = &v1.Subscription{} err = c.client.Post(). Namespace(c.ns). Resource("subscriptions"). + VersionedParams(&opts, scheme.ParameterCodec). Body(subscription). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a subscription and updates it. Returns the server's representation of the subscription, and an error, if there is any. -func (c *subscriptions) Update(subscription *v1.Subscription) (result *v1.Subscription, err error) { +func (c *subscriptions) Update(ctx context.Context, subscription *v1.Subscription, opts metav1.UpdateOptions) (result *v1.Subscription, err error) { result = &v1.Subscription{} err = c.client.Put(). Namespace(c.ns). Resource("subscriptions"). Name(subscription.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(subscription). - Do(). + Do(ctx). Into(result) return } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *subscriptions) UpdateStatus(subscription *v1.Subscription) (result *v1.Subscription, err error) { +func (c *subscriptions) UpdateStatus(ctx context.Context, subscription *v1.Subscription, opts metav1.UpdateOptions) (result *v1.Subscription, err error) { result = &v1.Subscription{} err = c.client.Put(). Namespace(c.ns). Resource("subscriptions"). Name(subscription.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(subscription). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the subscription and deletes it. Returns an error if one occurs. -func (c *subscriptions) Delete(name string, options *metav1.DeleteOptions) error { +func (c *subscriptions) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("subscriptions"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *subscriptions) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error { +func (c *subscriptions) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Namespace(c.ns). Resource("subscriptions"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched subscription. -func (c *subscriptions) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Subscription, err error) { +func (c *subscriptions) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Subscription, err error) { result = &v1.Subscription{} err = c.client.Patch(pt). Namespace(c.ns). Resource("subscriptions"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/messaging/v1beta1/channel.go b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/messaging/v1beta1/channel.go index 4538453f83..df8a7d5fb8 100644 --- a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/messaging/v1beta1/channel.go +++ b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/messaging/v1beta1/channel.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" "time" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -37,15 +38,15 @@ type ChannelsGetter interface { // ChannelInterface has methods to work with Channel resources. type ChannelInterface interface { - Create(*v1beta1.Channel) (*v1beta1.Channel, error) - Update(*v1beta1.Channel) (*v1beta1.Channel, error) - UpdateStatus(*v1beta1.Channel) (*v1beta1.Channel, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*v1beta1.Channel, error) - List(opts v1.ListOptions) (*v1beta1.ChannelList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Channel, err error) + Create(ctx context.Context, channel *v1beta1.Channel, opts v1.CreateOptions) (*v1beta1.Channel, error) + Update(ctx context.Context, channel *v1beta1.Channel, opts v1.UpdateOptions) (*v1beta1.Channel, error) + UpdateStatus(ctx context.Context, channel *v1beta1.Channel, opts v1.UpdateOptions) (*v1beta1.Channel, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.Channel, error) + List(ctx context.Context, opts v1.ListOptions) (*v1beta1.ChannelList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Channel, err error) ChannelExpansion } @@ -64,20 +65,20 @@ func newChannels(c *MessagingV1beta1Client, namespace string) *channels { } // Get takes name of the channel, and returns the corresponding channel object, and an error if there is any. -func (c *channels) Get(name string, options v1.GetOptions) (result *v1beta1.Channel, err error) { +func (c *channels) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.Channel, err error) { result = &v1beta1.Channel{} err = c.client.Get(). Namespace(c.ns). Resource("channels"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of Channels that match those selectors. -func (c *channels) List(opts v1.ListOptions) (result *v1beta1.ChannelList, err error) { +func (c *channels) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.ChannelList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -88,13 +89,13 @@ func (c *channels) List(opts v1.ListOptions) (result *v1beta1.ChannelList, err e Resource("channels"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested channels. -func (c *channels) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *channels) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -105,87 +106,90 @@ func (c *channels) Watch(opts v1.ListOptions) (watch.Interface, error) { Resource("channels"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a channel and creates it. Returns the server's representation of the channel, and an error, if there is any. -func (c *channels) Create(channel *v1beta1.Channel) (result *v1beta1.Channel, err error) { +func (c *channels) Create(ctx context.Context, channel *v1beta1.Channel, opts v1.CreateOptions) (result *v1beta1.Channel, err error) { result = &v1beta1.Channel{} err = c.client.Post(). Namespace(c.ns). Resource("channels"). + VersionedParams(&opts, scheme.ParameterCodec). Body(channel). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a channel and updates it. Returns the server's representation of the channel, and an error, if there is any. -func (c *channels) Update(channel *v1beta1.Channel) (result *v1beta1.Channel, err error) { +func (c *channels) Update(ctx context.Context, channel *v1beta1.Channel, opts v1.UpdateOptions) (result *v1beta1.Channel, err error) { result = &v1beta1.Channel{} err = c.client.Put(). Namespace(c.ns). Resource("channels"). Name(channel.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(channel). - Do(). + Do(ctx). Into(result) return } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *channels) UpdateStatus(channel *v1beta1.Channel) (result *v1beta1.Channel, err error) { +func (c *channels) UpdateStatus(ctx context.Context, channel *v1beta1.Channel, opts v1.UpdateOptions) (result *v1beta1.Channel, err error) { result = &v1beta1.Channel{} err = c.client.Put(). Namespace(c.ns). Resource("channels"). Name(channel.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(channel). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the channel and deletes it. Returns an error if one occurs. -func (c *channels) Delete(name string, options *v1.DeleteOptions) error { +func (c *channels) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("channels"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *channels) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *channels) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Namespace(c.ns). Resource("channels"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched channel. -func (c *channels) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Channel, err error) { +func (c *channels) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Channel, err error) { result = &v1beta1.Channel{} err = c.client.Patch(pt). Namespace(c.ns). Resource("channels"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/messaging/v1beta1/fake/fake_channel.go b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/messaging/v1beta1/fake/fake_channel.go index b81e0314a9..1a8fe52b24 100644 --- a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/messaging/v1beta1/fake/fake_channel.go +++ b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/messaging/v1beta1/fake/fake_channel.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -39,7 +41,7 @@ var channelsResource = schema.GroupVersionResource{Group: "messaging.knative.dev var channelsKind = schema.GroupVersionKind{Group: "messaging.knative.dev", Version: "v1beta1", Kind: "Channel"} // Get takes name of the channel, and returns the corresponding channel object, and an error if there is any. -func (c *FakeChannels) Get(name string, options v1.GetOptions) (result *v1beta1.Channel, err error) { +func (c *FakeChannels) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.Channel, err error) { obj, err := c.Fake. Invokes(testing.NewGetAction(channelsResource, c.ns, name), &v1beta1.Channel{}) @@ -50,7 +52,7 @@ func (c *FakeChannels) Get(name string, options v1.GetOptions) (result *v1beta1. } // List takes label and field selectors, and returns the list of Channels that match those selectors. -func (c *FakeChannels) List(opts v1.ListOptions) (result *v1beta1.ChannelList, err error) { +func (c *FakeChannels) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.ChannelList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(channelsResource, channelsKind, c.ns, opts), &v1beta1.ChannelList{}) @@ -72,14 +74,14 @@ func (c *FakeChannels) List(opts v1.ListOptions) (result *v1beta1.ChannelList, e } // Watch returns a watch.Interface that watches the requested channels. -func (c *FakeChannels) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeChannels) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(channelsResource, c.ns, opts)) } // Create takes the representation of a channel and creates it. Returns the server's representation of the channel, and an error, if there is any. -func (c *FakeChannels) Create(channel *v1beta1.Channel) (result *v1beta1.Channel, err error) { +func (c *FakeChannels) Create(ctx context.Context, channel *v1beta1.Channel, opts v1.CreateOptions) (result *v1beta1.Channel, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(channelsResource, c.ns, channel), &v1beta1.Channel{}) @@ -90,7 +92,7 @@ func (c *FakeChannels) Create(channel *v1beta1.Channel) (result *v1beta1.Channel } // Update takes the representation of a channel and updates it. Returns the server's representation of the channel, and an error, if there is any. -func (c *FakeChannels) Update(channel *v1beta1.Channel) (result *v1beta1.Channel, err error) { +func (c *FakeChannels) Update(ctx context.Context, channel *v1beta1.Channel, opts v1.UpdateOptions) (result *v1beta1.Channel, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(channelsResource, c.ns, channel), &v1beta1.Channel{}) @@ -102,7 +104,7 @@ func (c *FakeChannels) Update(channel *v1beta1.Channel) (result *v1beta1.Channel // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeChannels) UpdateStatus(channel *v1beta1.Channel) (*v1beta1.Channel, error) { +func (c *FakeChannels) UpdateStatus(ctx context.Context, channel *v1beta1.Channel, opts v1.UpdateOptions) (*v1beta1.Channel, error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(channelsResource, "status", c.ns, channel), &v1beta1.Channel{}) @@ -113,7 +115,7 @@ func (c *FakeChannels) UpdateStatus(channel *v1beta1.Channel) (*v1beta1.Channel, } // Delete takes name of the channel and deletes it. Returns an error if one occurs. -func (c *FakeChannels) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeChannels) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewDeleteAction(channelsResource, c.ns, name), &v1beta1.Channel{}) @@ -121,15 +123,15 @@ func (c *FakeChannels) Delete(name string, options *v1.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *FakeChannels) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(channelsResource, c.ns, listOptions) +func (c *FakeChannels) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(channelsResource, c.ns, listOpts) _, err := c.Fake.Invokes(action, &v1beta1.ChannelList{}) return err } // Patch applies the patch and returns the patched channel. -func (c *FakeChannels) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Channel, err error) { +func (c *FakeChannels) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Channel, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(channelsResource, c.ns, name, pt, data, subresources...), &v1beta1.Channel{}) diff --git a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/messaging/v1beta1/fake/fake_inmemorychannel.go b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/messaging/v1beta1/fake/fake_inmemorychannel.go index 1542ff5bf8..d2d319597c 100644 --- a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/messaging/v1beta1/fake/fake_inmemorychannel.go +++ b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/messaging/v1beta1/fake/fake_inmemorychannel.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -39,7 +41,7 @@ var inmemorychannelsResource = schema.GroupVersionResource{Group: "messaging.kna var inmemorychannelsKind = schema.GroupVersionKind{Group: "messaging.knative.dev", Version: "v1beta1", Kind: "InMemoryChannel"} // Get takes name of the inMemoryChannel, and returns the corresponding inMemoryChannel object, and an error if there is any. -func (c *FakeInMemoryChannels) Get(name string, options v1.GetOptions) (result *v1beta1.InMemoryChannel, err error) { +func (c *FakeInMemoryChannels) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.InMemoryChannel, err error) { obj, err := c.Fake. Invokes(testing.NewGetAction(inmemorychannelsResource, c.ns, name), &v1beta1.InMemoryChannel{}) @@ -50,7 +52,7 @@ func (c *FakeInMemoryChannels) Get(name string, options v1.GetOptions) (result * } // List takes label and field selectors, and returns the list of InMemoryChannels that match those selectors. -func (c *FakeInMemoryChannels) List(opts v1.ListOptions) (result *v1beta1.InMemoryChannelList, err error) { +func (c *FakeInMemoryChannels) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.InMemoryChannelList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(inmemorychannelsResource, inmemorychannelsKind, c.ns, opts), &v1beta1.InMemoryChannelList{}) @@ -72,14 +74,14 @@ func (c *FakeInMemoryChannels) List(opts v1.ListOptions) (result *v1beta1.InMemo } // Watch returns a watch.Interface that watches the requested inMemoryChannels. -func (c *FakeInMemoryChannels) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeInMemoryChannels) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(inmemorychannelsResource, c.ns, opts)) } // Create takes the representation of a inMemoryChannel and creates it. Returns the server's representation of the inMemoryChannel, and an error, if there is any. -func (c *FakeInMemoryChannels) Create(inMemoryChannel *v1beta1.InMemoryChannel) (result *v1beta1.InMemoryChannel, err error) { +func (c *FakeInMemoryChannels) Create(ctx context.Context, inMemoryChannel *v1beta1.InMemoryChannel, opts v1.CreateOptions) (result *v1beta1.InMemoryChannel, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(inmemorychannelsResource, c.ns, inMemoryChannel), &v1beta1.InMemoryChannel{}) @@ -90,7 +92,7 @@ func (c *FakeInMemoryChannels) Create(inMemoryChannel *v1beta1.InMemoryChannel) } // Update takes the representation of a inMemoryChannel and updates it. Returns the server's representation of the inMemoryChannel, and an error, if there is any. -func (c *FakeInMemoryChannels) Update(inMemoryChannel *v1beta1.InMemoryChannel) (result *v1beta1.InMemoryChannel, err error) { +func (c *FakeInMemoryChannels) Update(ctx context.Context, inMemoryChannel *v1beta1.InMemoryChannel, opts v1.UpdateOptions) (result *v1beta1.InMemoryChannel, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(inmemorychannelsResource, c.ns, inMemoryChannel), &v1beta1.InMemoryChannel{}) @@ -102,7 +104,7 @@ func (c *FakeInMemoryChannels) Update(inMemoryChannel *v1beta1.InMemoryChannel) // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeInMemoryChannels) UpdateStatus(inMemoryChannel *v1beta1.InMemoryChannel) (*v1beta1.InMemoryChannel, error) { +func (c *FakeInMemoryChannels) UpdateStatus(ctx context.Context, inMemoryChannel *v1beta1.InMemoryChannel, opts v1.UpdateOptions) (*v1beta1.InMemoryChannel, error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(inmemorychannelsResource, "status", c.ns, inMemoryChannel), &v1beta1.InMemoryChannel{}) @@ -113,7 +115,7 @@ func (c *FakeInMemoryChannels) UpdateStatus(inMemoryChannel *v1beta1.InMemoryCha } // Delete takes name of the inMemoryChannel and deletes it. Returns an error if one occurs. -func (c *FakeInMemoryChannels) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeInMemoryChannels) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewDeleteAction(inmemorychannelsResource, c.ns, name), &v1beta1.InMemoryChannel{}) @@ -121,15 +123,15 @@ func (c *FakeInMemoryChannels) Delete(name string, options *v1.DeleteOptions) er } // DeleteCollection deletes a collection of objects. -func (c *FakeInMemoryChannels) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(inmemorychannelsResource, c.ns, listOptions) +func (c *FakeInMemoryChannels) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(inmemorychannelsResource, c.ns, listOpts) _, err := c.Fake.Invokes(action, &v1beta1.InMemoryChannelList{}) return err } // Patch applies the patch and returns the patched inMemoryChannel. -func (c *FakeInMemoryChannels) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.InMemoryChannel, err error) { +func (c *FakeInMemoryChannels) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.InMemoryChannel, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(inmemorychannelsResource, c.ns, name, pt, data, subresources...), &v1beta1.InMemoryChannel{}) diff --git a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/messaging/v1beta1/fake/fake_subscription.go b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/messaging/v1beta1/fake/fake_subscription.go index 6c3a3d592a..148814ec92 100644 --- a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/messaging/v1beta1/fake/fake_subscription.go +++ b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/messaging/v1beta1/fake/fake_subscription.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -39,7 +41,7 @@ var subscriptionsResource = schema.GroupVersionResource{Group: "messaging.knativ var subscriptionsKind = schema.GroupVersionKind{Group: "messaging.knative.dev", Version: "v1beta1", Kind: "Subscription"} // Get takes name of the subscription, and returns the corresponding subscription object, and an error if there is any. -func (c *FakeSubscriptions) Get(name string, options v1.GetOptions) (result *v1beta1.Subscription, err error) { +func (c *FakeSubscriptions) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.Subscription, err error) { obj, err := c.Fake. Invokes(testing.NewGetAction(subscriptionsResource, c.ns, name), &v1beta1.Subscription{}) @@ -50,7 +52,7 @@ func (c *FakeSubscriptions) Get(name string, options v1.GetOptions) (result *v1b } // List takes label and field selectors, and returns the list of Subscriptions that match those selectors. -func (c *FakeSubscriptions) List(opts v1.ListOptions) (result *v1beta1.SubscriptionList, err error) { +func (c *FakeSubscriptions) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.SubscriptionList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(subscriptionsResource, subscriptionsKind, c.ns, opts), &v1beta1.SubscriptionList{}) @@ -72,14 +74,14 @@ func (c *FakeSubscriptions) List(opts v1.ListOptions) (result *v1beta1.Subscript } // Watch returns a watch.Interface that watches the requested subscriptions. -func (c *FakeSubscriptions) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeSubscriptions) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(subscriptionsResource, c.ns, opts)) } // Create takes the representation of a subscription and creates it. Returns the server's representation of the subscription, and an error, if there is any. -func (c *FakeSubscriptions) Create(subscription *v1beta1.Subscription) (result *v1beta1.Subscription, err error) { +func (c *FakeSubscriptions) Create(ctx context.Context, subscription *v1beta1.Subscription, opts v1.CreateOptions) (result *v1beta1.Subscription, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(subscriptionsResource, c.ns, subscription), &v1beta1.Subscription{}) @@ -90,7 +92,7 @@ func (c *FakeSubscriptions) Create(subscription *v1beta1.Subscription) (result * } // Update takes the representation of a subscription and updates it. Returns the server's representation of the subscription, and an error, if there is any. -func (c *FakeSubscriptions) Update(subscription *v1beta1.Subscription) (result *v1beta1.Subscription, err error) { +func (c *FakeSubscriptions) Update(ctx context.Context, subscription *v1beta1.Subscription, opts v1.UpdateOptions) (result *v1beta1.Subscription, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(subscriptionsResource, c.ns, subscription), &v1beta1.Subscription{}) @@ -102,7 +104,7 @@ func (c *FakeSubscriptions) Update(subscription *v1beta1.Subscription) (result * // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeSubscriptions) UpdateStatus(subscription *v1beta1.Subscription) (*v1beta1.Subscription, error) { +func (c *FakeSubscriptions) UpdateStatus(ctx context.Context, subscription *v1beta1.Subscription, opts v1.UpdateOptions) (*v1beta1.Subscription, error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(subscriptionsResource, "status", c.ns, subscription), &v1beta1.Subscription{}) @@ -113,7 +115,7 @@ func (c *FakeSubscriptions) UpdateStatus(subscription *v1beta1.Subscription) (*v } // Delete takes name of the subscription and deletes it. Returns an error if one occurs. -func (c *FakeSubscriptions) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeSubscriptions) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewDeleteAction(subscriptionsResource, c.ns, name), &v1beta1.Subscription{}) @@ -121,15 +123,15 @@ func (c *FakeSubscriptions) Delete(name string, options *v1.DeleteOptions) error } // DeleteCollection deletes a collection of objects. -func (c *FakeSubscriptions) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(subscriptionsResource, c.ns, listOptions) +func (c *FakeSubscriptions) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(subscriptionsResource, c.ns, listOpts) _, err := c.Fake.Invokes(action, &v1beta1.SubscriptionList{}) return err } // Patch applies the patch and returns the patched subscription. -func (c *FakeSubscriptions) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Subscription, err error) { +func (c *FakeSubscriptions) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Subscription, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(subscriptionsResource, c.ns, name, pt, data, subresources...), &v1beta1.Subscription{}) diff --git a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/messaging/v1beta1/inmemorychannel.go b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/messaging/v1beta1/inmemorychannel.go index cc3541fe8e..3c04c6bb12 100644 --- a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/messaging/v1beta1/inmemorychannel.go +++ b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/messaging/v1beta1/inmemorychannel.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" "time" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -37,15 +38,15 @@ type InMemoryChannelsGetter interface { // InMemoryChannelInterface has methods to work with InMemoryChannel resources. type InMemoryChannelInterface interface { - Create(*v1beta1.InMemoryChannel) (*v1beta1.InMemoryChannel, error) - Update(*v1beta1.InMemoryChannel) (*v1beta1.InMemoryChannel, error) - UpdateStatus(*v1beta1.InMemoryChannel) (*v1beta1.InMemoryChannel, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*v1beta1.InMemoryChannel, error) - List(opts v1.ListOptions) (*v1beta1.InMemoryChannelList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.InMemoryChannel, err error) + Create(ctx context.Context, inMemoryChannel *v1beta1.InMemoryChannel, opts v1.CreateOptions) (*v1beta1.InMemoryChannel, error) + Update(ctx context.Context, inMemoryChannel *v1beta1.InMemoryChannel, opts v1.UpdateOptions) (*v1beta1.InMemoryChannel, error) + UpdateStatus(ctx context.Context, inMemoryChannel *v1beta1.InMemoryChannel, opts v1.UpdateOptions) (*v1beta1.InMemoryChannel, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.InMemoryChannel, error) + List(ctx context.Context, opts v1.ListOptions) (*v1beta1.InMemoryChannelList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.InMemoryChannel, err error) InMemoryChannelExpansion } @@ -64,20 +65,20 @@ func newInMemoryChannels(c *MessagingV1beta1Client, namespace string) *inMemoryC } // Get takes name of the inMemoryChannel, and returns the corresponding inMemoryChannel object, and an error if there is any. -func (c *inMemoryChannels) Get(name string, options v1.GetOptions) (result *v1beta1.InMemoryChannel, err error) { +func (c *inMemoryChannels) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.InMemoryChannel, err error) { result = &v1beta1.InMemoryChannel{} err = c.client.Get(). Namespace(c.ns). Resource("inmemorychannels"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of InMemoryChannels that match those selectors. -func (c *inMemoryChannels) List(opts v1.ListOptions) (result *v1beta1.InMemoryChannelList, err error) { +func (c *inMemoryChannels) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.InMemoryChannelList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -88,13 +89,13 @@ func (c *inMemoryChannels) List(opts v1.ListOptions) (result *v1beta1.InMemoryCh Resource("inmemorychannels"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested inMemoryChannels. -func (c *inMemoryChannels) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *inMemoryChannels) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -105,87 +106,90 @@ func (c *inMemoryChannels) Watch(opts v1.ListOptions) (watch.Interface, error) { Resource("inmemorychannels"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a inMemoryChannel and creates it. Returns the server's representation of the inMemoryChannel, and an error, if there is any. -func (c *inMemoryChannels) Create(inMemoryChannel *v1beta1.InMemoryChannel) (result *v1beta1.InMemoryChannel, err error) { +func (c *inMemoryChannels) Create(ctx context.Context, inMemoryChannel *v1beta1.InMemoryChannel, opts v1.CreateOptions) (result *v1beta1.InMemoryChannel, err error) { result = &v1beta1.InMemoryChannel{} err = c.client.Post(). Namespace(c.ns). Resource("inmemorychannels"). + VersionedParams(&opts, scheme.ParameterCodec). Body(inMemoryChannel). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a inMemoryChannel and updates it. Returns the server's representation of the inMemoryChannel, and an error, if there is any. -func (c *inMemoryChannels) Update(inMemoryChannel *v1beta1.InMemoryChannel) (result *v1beta1.InMemoryChannel, err error) { +func (c *inMemoryChannels) Update(ctx context.Context, inMemoryChannel *v1beta1.InMemoryChannel, opts v1.UpdateOptions) (result *v1beta1.InMemoryChannel, err error) { result = &v1beta1.InMemoryChannel{} err = c.client.Put(). Namespace(c.ns). Resource("inmemorychannels"). Name(inMemoryChannel.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(inMemoryChannel). - Do(). + Do(ctx). Into(result) return } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *inMemoryChannels) UpdateStatus(inMemoryChannel *v1beta1.InMemoryChannel) (result *v1beta1.InMemoryChannel, err error) { +func (c *inMemoryChannels) UpdateStatus(ctx context.Context, inMemoryChannel *v1beta1.InMemoryChannel, opts v1.UpdateOptions) (result *v1beta1.InMemoryChannel, err error) { result = &v1beta1.InMemoryChannel{} err = c.client.Put(). Namespace(c.ns). Resource("inmemorychannels"). Name(inMemoryChannel.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(inMemoryChannel). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the inMemoryChannel and deletes it. Returns an error if one occurs. -func (c *inMemoryChannels) Delete(name string, options *v1.DeleteOptions) error { +func (c *inMemoryChannels) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("inmemorychannels"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *inMemoryChannels) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *inMemoryChannels) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Namespace(c.ns). Resource("inmemorychannels"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched inMemoryChannel. -func (c *inMemoryChannels) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.InMemoryChannel, err error) { +func (c *inMemoryChannels) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.InMemoryChannel, err error) { result = &v1beta1.InMemoryChannel{} err = c.client.Patch(pt). Namespace(c.ns). Resource("inmemorychannels"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/messaging/v1beta1/subscription.go b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/messaging/v1beta1/subscription.go index a610b08522..8ed1d0686c 100644 --- a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/messaging/v1beta1/subscription.go +++ b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/messaging/v1beta1/subscription.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" "time" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -37,15 +38,15 @@ type SubscriptionsGetter interface { // SubscriptionInterface has methods to work with Subscription resources. type SubscriptionInterface interface { - Create(*v1beta1.Subscription) (*v1beta1.Subscription, error) - Update(*v1beta1.Subscription) (*v1beta1.Subscription, error) - UpdateStatus(*v1beta1.Subscription) (*v1beta1.Subscription, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*v1beta1.Subscription, error) - List(opts v1.ListOptions) (*v1beta1.SubscriptionList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Subscription, err error) + Create(ctx context.Context, subscription *v1beta1.Subscription, opts v1.CreateOptions) (*v1beta1.Subscription, error) + Update(ctx context.Context, subscription *v1beta1.Subscription, opts v1.UpdateOptions) (*v1beta1.Subscription, error) + UpdateStatus(ctx context.Context, subscription *v1beta1.Subscription, opts v1.UpdateOptions) (*v1beta1.Subscription, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.Subscription, error) + List(ctx context.Context, opts v1.ListOptions) (*v1beta1.SubscriptionList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Subscription, err error) SubscriptionExpansion } @@ -64,20 +65,20 @@ func newSubscriptions(c *MessagingV1beta1Client, namespace string) *subscription } // Get takes name of the subscription, and returns the corresponding subscription object, and an error if there is any. -func (c *subscriptions) Get(name string, options v1.GetOptions) (result *v1beta1.Subscription, err error) { +func (c *subscriptions) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.Subscription, err error) { result = &v1beta1.Subscription{} err = c.client.Get(). Namespace(c.ns). Resource("subscriptions"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of Subscriptions that match those selectors. -func (c *subscriptions) List(opts v1.ListOptions) (result *v1beta1.SubscriptionList, err error) { +func (c *subscriptions) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.SubscriptionList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -88,13 +89,13 @@ func (c *subscriptions) List(opts v1.ListOptions) (result *v1beta1.SubscriptionL Resource("subscriptions"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested subscriptions. -func (c *subscriptions) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *subscriptions) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -105,87 +106,90 @@ func (c *subscriptions) Watch(opts v1.ListOptions) (watch.Interface, error) { Resource("subscriptions"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a subscription and creates it. Returns the server's representation of the subscription, and an error, if there is any. -func (c *subscriptions) Create(subscription *v1beta1.Subscription) (result *v1beta1.Subscription, err error) { +func (c *subscriptions) Create(ctx context.Context, subscription *v1beta1.Subscription, opts v1.CreateOptions) (result *v1beta1.Subscription, err error) { result = &v1beta1.Subscription{} err = c.client.Post(). Namespace(c.ns). Resource("subscriptions"). + VersionedParams(&opts, scheme.ParameterCodec). Body(subscription). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a subscription and updates it. Returns the server's representation of the subscription, and an error, if there is any. -func (c *subscriptions) Update(subscription *v1beta1.Subscription) (result *v1beta1.Subscription, err error) { +func (c *subscriptions) Update(ctx context.Context, subscription *v1beta1.Subscription, opts v1.UpdateOptions) (result *v1beta1.Subscription, err error) { result = &v1beta1.Subscription{} err = c.client.Put(). Namespace(c.ns). Resource("subscriptions"). Name(subscription.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(subscription). - Do(). + Do(ctx). Into(result) return } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *subscriptions) UpdateStatus(subscription *v1beta1.Subscription) (result *v1beta1.Subscription, err error) { +func (c *subscriptions) UpdateStatus(ctx context.Context, subscription *v1beta1.Subscription, opts v1.UpdateOptions) (result *v1beta1.Subscription, err error) { result = &v1beta1.Subscription{} err = c.client.Put(). Namespace(c.ns). Resource("subscriptions"). Name(subscription.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(subscription). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the subscription and deletes it. Returns an error if one occurs. -func (c *subscriptions) Delete(name string, options *v1.DeleteOptions) error { +func (c *subscriptions) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("subscriptions"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *subscriptions) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *subscriptions) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Namespace(c.ns). Resource("subscriptions"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched subscription. -func (c *subscriptions) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Subscription, err error) { +func (c *subscriptions) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Subscription, err error) { result = &v1beta1.Subscription{} err = c.client.Patch(pt). Namespace(c.ns). Resource("subscriptions"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1alpha1/apiserversource.go b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1alpha1/apiserversource.go index 8c30ef3c25..f0caabf166 100644 --- a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1alpha1/apiserversource.go +++ b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1alpha1/apiserversource.go @@ -19,6 +19,7 @@ limitations under the License. package v1alpha1 import ( + "context" "time" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -37,15 +38,15 @@ type ApiServerSourcesGetter interface { // ApiServerSourceInterface has methods to work with ApiServerSource resources. type ApiServerSourceInterface interface { - Create(*v1alpha1.ApiServerSource) (*v1alpha1.ApiServerSource, error) - Update(*v1alpha1.ApiServerSource) (*v1alpha1.ApiServerSource, error) - UpdateStatus(*v1alpha1.ApiServerSource) (*v1alpha1.ApiServerSource, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*v1alpha1.ApiServerSource, error) - List(opts v1.ListOptions) (*v1alpha1.ApiServerSourceList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.ApiServerSource, err error) + Create(ctx context.Context, apiServerSource *v1alpha1.ApiServerSource, opts v1.CreateOptions) (*v1alpha1.ApiServerSource, error) + Update(ctx context.Context, apiServerSource *v1alpha1.ApiServerSource, opts v1.UpdateOptions) (*v1alpha1.ApiServerSource, error) + UpdateStatus(ctx context.Context, apiServerSource *v1alpha1.ApiServerSource, opts v1.UpdateOptions) (*v1alpha1.ApiServerSource, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.ApiServerSource, error) + List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.ApiServerSourceList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ApiServerSource, err error) ApiServerSourceExpansion } @@ -64,20 +65,20 @@ func newApiServerSources(c *SourcesV1alpha1Client, namespace string) *apiServerS } // Get takes name of the apiServerSource, and returns the corresponding apiServerSource object, and an error if there is any. -func (c *apiServerSources) Get(name string, options v1.GetOptions) (result *v1alpha1.ApiServerSource, err error) { +func (c *apiServerSources) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.ApiServerSource, err error) { result = &v1alpha1.ApiServerSource{} err = c.client.Get(). Namespace(c.ns). Resource("apiserversources"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of ApiServerSources that match those selectors. -func (c *apiServerSources) List(opts v1.ListOptions) (result *v1alpha1.ApiServerSourceList, err error) { +func (c *apiServerSources) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ApiServerSourceList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -88,13 +89,13 @@ func (c *apiServerSources) List(opts v1.ListOptions) (result *v1alpha1.ApiServer Resource("apiserversources"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested apiServerSources. -func (c *apiServerSources) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *apiServerSources) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -105,87 +106,90 @@ func (c *apiServerSources) Watch(opts v1.ListOptions) (watch.Interface, error) { Resource("apiserversources"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a apiServerSource and creates it. Returns the server's representation of the apiServerSource, and an error, if there is any. -func (c *apiServerSources) Create(apiServerSource *v1alpha1.ApiServerSource) (result *v1alpha1.ApiServerSource, err error) { +func (c *apiServerSources) Create(ctx context.Context, apiServerSource *v1alpha1.ApiServerSource, opts v1.CreateOptions) (result *v1alpha1.ApiServerSource, err error) { result = &v1alpha1.ApiServerSource{} err = c.client.Post(). Namespace(c.ns). Resource("apiserversources"). + VersionedParams(&opts, scheme.ParameterCodec). Body(apiServerSource). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a apiServerSource and updates it. Returns the server's representation of the apiServerSource, and an error, if there is any. -func (c *apiServerSources) Update(apiServerSource *v1alpha1.ApiServerSource) (result *v1alpha1.ApiServerSource, err error) { +func (c *apiServerSources) Update(ctx context.Context, apiServerSource *v1alpha1.ApiServerSource, opts v1.UpdateOptions) (result *v1alpha1.ApiServerSource, err error) { result = &v1alpha1.ApiServerSource{} err = c.client.Put(). Namespace(c.ns). Resource("apiserversources"). Name(apiServerSource.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(apiServerSource). - Do(). + Do(ctx). Into(result) return } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *apiServerSources) UpdateStatus(apiServerSource *v1alpha1.ApiServerSource) (result *v1alpha1.ApiServerSource, err error) { +func (c *apiServerSources) UpdateStatus(ctx context.Context, apiServerSource *v1alpha1.ApiServerSource, opts v1.UpdateOptions) (result *v1alpha1.ApiServerSource, err error) { result = &v1alpha1.ApiServerSource{} err = c.client.Put(). Namespace(c.ns). Resource("apiserversources"). Name(apiServerSource.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(apiServerSource). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the apiServerSource and deletes it. Returns an error if one occurs. -func (c *apiServerSources) Delete(name string, options *v1.DeleteOptions) error { +func (c *apiServerSources) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("apiserversources"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *apiServerSources) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *apiServerSources) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Namespace(c.ns). Resource("apiserversources"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched apiServerSource. -func (c *apiServerSources) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.ApiServerSource, err error) { +func (c *apiServerSources) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ApiServerSource, err error) { result = &v1alpha1.ApiServerSource{} err = c.client.Patch(pt). Namespace(c.ns). Resource("apiserversources"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1alpha1/fake/fake_apiserversource.go b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1alpha1/fake/fake_apiserversource.go index 8424f3b2af..8400470ab3 100644 --- a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1alpha1/fake/fake_apiserversource.go +++ b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1alpha1/fake/fake_apiserversource.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -39,7 +41,7 @@ var apiserversourcesResource = schema.GroupVersionResource{Group: "sources.knati var apiserversourcesKind = schema.GroupVersionKind{Group: "sources.knative.dev", Version: "v1alpha1", Kind: "ApiServerSource"} // Get takes name of the apiServerSource, and returns the corresponding apiServerSource object, and an error if there is any. -func (c *FakeApiServerSources) Get(name string, options v1.GetOptions) (result *v1alpha1.ApiServerSource, err error) { +func (c *FakeApiServerSources) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.ApiServerSource, err error) { obj, err := c.Fake. Invokes(testing.NewGetAction(apiserversourcesResource, c.ns, name), &v1alpha1.ApiServerSource{}) @@ -50,7 +52,7 @@ func (c *FakeApiServerSources) Get(name string, options v1.GetOptions) (result * } // List takes label and field selectors, and returns the list of ApiServerSources that match those selectors. -func (c *FakeApiServerSources) List(opts v1.ListOptions) (result *v1alpha1.ApiServerSourceList, err error) { +func (c *FakeApiServerSources) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ApiServerSourceList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(apiserversourcesResource, apiserversourcesKind, c.ns, opts), &v1alpha1.ApiServerSourceList{}) @@ -72,14 +74,14 @@ func (c *FakeApiServerSources) List(opts v1.ListOptions) (result *v1alpha1.ApiSe } // Watch returns a watch.Interface that watches the requested apiServerSources. -func (c *FakeApiServerSources) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeApiServerSources) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(apiserversourcesResource, c.ns, opts)) } // Create takes the representation of a apiServerSource and creates it. Returns the server's representation of the apiServerSource, and an error, if there is any. -func (c *FakeApiServerSources) Create(apiServerSource *v1alpha1.ApiServerSource) (result *v1alpha1.ApiServerSource, err error) { +func (c *FakeApiServerSources) Create(ctx context.Context, apiServerSource *v1alpha1.ApiServerSource, opts v1.CreateOptions) (result *v1alpha1.ApiServerSource, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(apiserversourcesResource, c.ns, apiServerSource), &v1alpha1.ApiServerSource{}) @@ -90,7 +92,7 @@ func (c *FakeApiServerSources) Create(apiServerSource *v1alpha1.ApiServerSource) } // Update takes the representation of a apiServerSource and updates it. Returns the server's representation of the apiServerSource, and an error, if there is any. -func (c *FakeApiServerSources) Update(apiServerSource *v1alpha1.ApiServerSource) (result *v1alpha1.ApiServerSource, err error) { +func (c *FakeApiServerSources) Update(ctx context.Context, apiServerSource *v1alpha1.ApiServerSource, opts v1.UpdateOptions) (result *v1alpha1.ApiServerSource, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(apiserversourcesResource, c.ns, apiServerSource), &v1alpha1.ApiServerSource{}) @@ -102,7 +104,7 @@ func (c *FakeApiServerSources) Update(apiServerSource *v1alpha1.ApiServerSource) // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeApiServerSources) UpdateStatus(apiServerSource *v1alpha1.ApiServerSource) (*v1alpha1.ApiServerSource, error) { +func (c *FakeApiServerSources) UpdateStatus(ctx context.Context, apiServerSource *v1alpha1.ApiServerSource, opts v1.UpdateOptions) (*v1alpha1.ApiServerSource, error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(apiserversourcesResource, "status", c.ns, apiServerSource), &v1alpha1.ApiServerSource{}) @@ -113,7 +115,7 @@ func (c *FakeApiServerSources) UpdateStatus(apiServerSource *v1alpha1.ApiServerS } // Delete takes name of the apiServerSource and deletes it. Returns an error if one occurs. -func (c *FakeApiServerSources) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeApiServerSources) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewDeleteAction(apiserversourcesResource, c.ns, name), &v1alpha1.ApiServerSource{}) @@ -121,15 +123,15 @@ func (c *FakeApiServerSources) Delete(name string, options *v1.DeleteOptions) er } // DeleteCollection deletes a collection of objects. -func (c *FakeApiServerSources) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(apiserversourcesResource, c.ns, listOptions) +func (c *FakeApiServerSources) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(apiserversourcesResource, c.ns, listOpts) _, err := c.Fake.Invokes(action, &v1alpha1.ApiServerSourceList{}) return err } // Patch applies the patch and returns the patched apiServerSource. -func (c *FakeApiServerSources) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.ApiServerSource, err error) { +func (c *FakeApiServerSources) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ApiServerSource, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(apiserversourcesResource, c.ns, name, pt, data, subresources...), &v1alpha1.ApiServerSource{}) diff --git a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1alpha1/fake/fake_sinkbinding.go b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1alpha1/fake/fake_sinkbinding.go index c9c446b0a0..7916b7a606 100644 --- a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1alpha1/fake/fake_sinkbinding.go +++ b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1alpha1/fake/fake_sinkbinding.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -39,7 +41,7 @@ var sinkbindingsResource = schema.GroupVersionResource{Group: "sources.knative.d var sinkbindingsKind = schema.GroupVersionKind{Group: "sources.knative.dev", Version: "v1alpha1", Kind: "SinkBinding"} // Get takes name of the sinkBinding, and returns the corresponding sinkBinding object, and an error if there is any. -func (c *FakeSinkBindings) Get(name string, options v1.GetOptions) (result *v1alpha1.SinkBinding, err error) { +func (c *FakeSinkBindings) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.SinkBinding, err error) { obj, err := c.Fake. Invokes(testing.NewGetAction(sinkbindingsResource, c.ns, name), &v1alpha1.SinkBinding{}) @@ -50,7 +52,7 @@ func (c *FakeSinkBindings) Get(name string, options v1.GetOptions) (result *v1al } // List takes label and field selectors, and returns the list of SinkBindings that match those selectors. -func (c *FakeSinkBindings) List(opts v1.ListOptions) (result *v1alpha1.SinkBindingList, err error) { +func (c *FakeSinkBindings) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.SinkBindingList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(sinkbindingsResource, sinkbindingsKind, c.ns, opts), &v1alpha1.SinkBindingList{}) @@ -72,14 +74,14 @@ func (c *FakeSinkBindings) List(opts v1.ListOptions) (result *v1alpha1.SinkBindi } // Watch returns a watch.Interface that watches the requested sinkBindings. -func (c *FakeSinkBindings) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeSinkBindings) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(sinkbindingsResource, c.ns, opts)) } // Create takes the representation of a sinkBinding and creates it. Returns the server's representation of the sinkBinding, and an error, if there is any. -func (c *FakeSinkBindings) Create(sinkBinding *v1alpha1.SinkBinding) (result *v1alpha1.SinkBinding, err error) { +func (c *FakeSinkBindings) Create(ctx context.Context, sinkBinding *v1alpha1.SinkBinding, opts v1.CreateOptions) (result *v1alpha1.SinkBinding, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(sinkbindingsResource, c.ns, sinkBinding), &v1alpha1.SinkBinding{}) @@ -90,7 +92,7 @@ func (c *FakeSinkBindings) Create(sinkBinding *v1alpha1.SinkBinding) (result *v1 } // Update takes the representation of a sinkBinding and updates it. Returns the server's representation of the sinkBinding, and an error, if there is any. -func (c *FakeSinkBindings) Update(sinkBinding *v1alpha1.SinkBinding) (result *v1alpha1.SinkBinding, err error) { +func (c *FakeSinkBindings) Update(ctx context.Context, sinkBinding *v1alpha1.SinkBinding, opts v1.UpdateOptions) (result *v1alpha1.SinkBinding, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(sinkbindingsResource, c.ns, sinkBinding), &v1alpha1.SinkBinding{}) @@ -102,7 +104,7 @@ func (c *FakeSinkBindings) Update(sinkBinding *v1alpha1.SinkBinding) (result *v1 // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeSinkBindings) UpdateStatus(sinkBinding *v1alpha1.SinkBinding) (*v1alpha1.SinkBinding, error) { +func (c *FakeSinkBindings) UpdateStatus(ctx context.Context, sinkBinding *v1alpha1.SinkBinding, opts v1.UpdateOptions) (*v1alpha1.SinkBinding, error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(sinkbindingsResource, "status", c.ns, sinkBinding), &v1alpha1.SinkBinding{}) @@ -113,7 +115,7 @@ func (c *FakeSinkBindings) UpdateStatus(sinkBinding *v1alpha1.SinkBinding) (*v1a } // Delete takes name of the sinkBinding and deletes it. Returns an error if one occurs. -func (c *FakeSinkBindings) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeSinkBindings) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewDeleteAction(sinkbindingsResource, c.ns, name), &v1alpha1.SinkBinding{}) @@ -121,15 +123,15 @@ func (c *FakeSinkBindings) Delete(name string, options *v1.DeleteOptions) error } // DeleteCollection deletes a collection of objects. -func (c *FakeSinkBindings) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(sinkbindingsResource, c.ns, listOptions) +func (c *FakeSinkBindings) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(sinkbindingsResource, c.ns, listOpts) _, err := c.Fake.Invokes(action, &v1alpha1.SinkBindingList{}) return err } // Patch applies the patch and returns the patched sinkBinding. -func (c *FakeSinkBindings) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.SinkBinding, err error) { +func (c *FakeSinkBindings) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.SinkBinding, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(sinkbindingsResource, c.ns, name, pt, data, subresources...), &v1alpha1.SinkBinding{}) diff --git a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1alpha1/sinkbinding.go b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1alpha1/sinkbinding.go index f3654923cb..2a1d6edc89 100644 --- a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1alpha1/sinkbinding.go +++ b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1alpha1/sinkbinding.go @@ -19,6 +19,7 @@ limitations under the License. package v1alpha1 import ( + "context" "time" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -37,15 +38,15 @@ type SinkBindingsGetter interface { // SinkBindingInterface has methods to work with SinkBinding resources. type SinkBindingInterface interface { - Create(*v1alpha1.SinkBinding) (*v1alpha1.SinkBinding, error) - Update(*v1alpha1.SinkBinding) (*v1alpha1.SinkBinding, error) - UpdateStatus(*v1alpha1.SinkBinding) (*v1alpha1.SinkBinding, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*v1alpha1.SinkBinding, error) - List(opts v1.ListOptions) (*v1alpha1.SinkBindingList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.SinkBinding, err error) + Create(ctx context.Context, sinkBinding *v1alpha1.SinkBinding, opts v1.CreateOptions) (*v1alpha1.SinkBinding, error) + Update(ctx context.Context, sinkBinding *v1alpha1.SinkBinding, opts v1.UpdateOptions) (*v1alpha1.SinkBinding, error) + UpdateStatus(ctx context.Context, sinkBinding *v1alpha1.SinkBinding, opts v1.UpdateOptions) (*v1alpha1.SinkBinding, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.SinkBinding, error) + List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.SinkBindingList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.SinkBinding, err error) SinkBindingExpansion } @@ -64,20 +65,20 @@ func newSinkBindings(c *SourcesV1alpha1Client, namespace string) *sinkBindings { } // Get takes name of the sinkBinding, and returns the corresponding sinkBinding object, and an error if there is any. -func (c *sinkBindings) Get(name string, options v1.GetOptions) (result *v1alpha1.SinkBinding, err error) { +func (c *sinkBindings) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.SinkBinding, err error) { result = &v1alpha1.SinkBinding{} err = c.client.Get(). Namespace(c.ns). Resource("sinkbindings"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of SinkBindings that match those selectors. -func (c *sinkBindings) List(opts v1.ListOptions) (result *v1alpha1.SinkBindingList, err error) { +func (c *sinkBindings) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.SinkBindingList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -88,13 +89,13 @@ func (c *sinkBindings) List(opts v1.ListOptions) (result *v1alpha1.SinkBindingLi Resource("sinkbindings"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested sinkBindings. -func (c *sinkBindings) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *sinkBindings) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -105,87 +106,90 @@ func (c *sinkBindings) Watch(opts v1.ListOptions) (watch.Interface, error) { Resource("sinkbindings"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a sinkBinding and creates it. Returns the server's representation of the sinkBinding, and an error, if there is any. -func (c *sinkBindings) Create(sinkBinding *v1alpha1.SinkBinding) (result *v1alpha1.SinkBinding, err error) { +func (c *sinkBindings) Create(ctx context.Context, sinkBinding *v1alpha1.SinkBinding, opts v1.CreateOptions) (result *v1alpha1.SinkBinding, err error) { result = &v1alpha1.SinkBinding{} err = c.client.Post(). Namespace(c.ns). Resource("sinkbindings"). + VersionedParams(&opts, scheme.ParameterCodec). Body(sinkBinding). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a sinkBinding and updates it. Returns the server's representation of the sinkBinding, and an error, if there is any. -func (c *sinkBindings) Update(sinkBinding *v1alpha1.SinkBinding) (result *v1alpha1.SinkBinding, err error) { +func (c *sinkBindings) Update(ctx context.Context, sinkBinding *v1alpha1.SinkBinding, opts v1.UpdateOptions) (result *v1alpha1.SinkBinding, err error) { result = &v1alpha1.SinkBinding{} err = c.client.Put(). Namespace(c.ns). Resource("sinkbindings"). Name(sinkBinding.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(sinkBinding). - Do(). + Do(ctx). Into(result) return } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *sinkBindings) UpdateStatus(sinkBinding *v1alpha1.SinkBinding) (result *v1alpha1.SinkBinding, err error) { +func (c *sinkBindings) UpdateStatus(ctx context.Context, sinkBinding *v1alpha1.SinkBinding, opts v1.UpdateOptions) (result *v1alpha1.SinkBinding, err error) { result = &v1alpha1.SinkBinding{} err = c.client.Put(). Namespace(c.ns). Resource("sinkbindings"). Name(sinkBinding.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(sinkBinding). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the sinkBinding and deletes it. Returns an error if one occurs. -func (c *sinkBindings) Delete(name string, options *v1.DeleteOptions) error { +func (c *sinkBindings) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("sinkbindings"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *sinkBindings) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *sinkBindings) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Namespace(c.ns). Resource("sinkbindings"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched sinkBinding. -func (c *sinkBindings) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.SinkBinding, err error) { +func (c *sinkBindings) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.SinkBinding, err error) { result = &v1alpha1.SinkBinding{} err = c.client.Patch(pt). Namespace(c.ns). Resource("sinkbindings"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1alpha2/apiserversource.go b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1alpha2/apiserversource.go index a44535b84f..46213b59b4 100644 --- a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1alpha2/apiserversource.go +++ b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1alpha2/apiserversource.go @@ -19,6 +19,7 @@ limitations under the License. package v1alpha2 import ( + "context" "time" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -37,15 +38,15 @@ type ApiServerSourcesGetter interface { // ApiServerSourceInterface has methods to work with ApiServerSource resources. type ApiServerSourceInterface interface { - Create(*v1alpha2.ApiServerSource) (*v1alpha2.ApiServerSource, error) - Update(*v1alpha2.ApiServerSource) (*v1alpha2.ApiServerSource, error) - UpdateStatus(*v1alpha2.ApiServerSource) (*v1alpha2.ApiServerSource, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*v1alpha2.ApiServerSource, error) - List(opts v1.ListOptions) (*v1alpha2.ApiServerSourceList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha2.ApiServerSource, err error) + Create(ctx context.Context, apiServerSource *v1alpha2.ApiServerSource, opts v1.CreateOptions) (*v1alpha2.ApiServerSource, error) + Update(ctx context.Context, apiServerSource *v1alpha2.ApiServerSource, opts v1.UpdateOptions) (*v1alpha2.ApiServerSource, error) + UpdateStatus(ctx context.Context, apiServerSource *v1alpha2.ApiServerSource, opts v1.UpdateOptions) (*v1alpha2.ApiServerSource, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha2.ApiServerSource, error) + List(ctx context.Context, opts v1.ListOptions) (*v1alpha2.ApiServerSourceList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.ApiServerSource, err error) ApiServerSourceExpansion } @@ -64,20 +65,20 @@ func newApiServerSources(c *SourcesV1alpha2Client, namespace string) *apiServerS } // Get takes name of the apiServerSource, and returns the corresponding apiServerSource object, and an error if there is any. -func (c *apiServerSources) Get(name string, options v1.GetOptions) (result *v1alpha2.ApiServerSource, err error) { +func (c *apiServerSources) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha2.ApiServerSource, err error) { result = &v1alpha2.ApiServerSource{} err = c.client.Get(). Namespace(c.ns). Resource("apiserversources"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of ApiServerSources that match those selectors. -func (c *apiServerSources) List(opts v1.ListOptions) (result *v1alpha2.ApiServerSourceList, err error) { +func (c *apiServerSources) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha2.ApiServerSourceList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -88,13 +89,13 @@ func (c *apiServerSources) List(opts v1.ListOptions) (result *v1alpha2.ApiServer Resource("apiserversources"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested apiServerSources. -func (c *apiServerSources) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *apiServerSources) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -105,87 +106,90 @@ func (c *apiServerSources) Watch(opts v1.ListOptions) (watch.Interface, error) { Resource("apiserversources"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a apiServerSource and creates it. Returns the server's representation of the apiServerSource, and an error, if there is any. -func (c *apiServerSources) Create(apiServerSource *v1alpha2.ApiServerSource) (result *v1alpha2.ApiServerSource, err error) { +func (c *apiServerSources) Create(ctx context.Context, apiServerSource *v1alpha2.ApiServerSource, opts v1.CreateOptions) (result *v1alpha2.ApiServerSource, err error) { result = &v1alpha2.ApiServerSource{} err = c.client.Post(). Namespace(c.ns). Resource("apiserversources"). + VersionedParams(&opts, scheme.ParameterCodec). Body(apiServerSource). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a apiServerSource and updates it. Returns the server's representation of the apiServerSource, and an error, if there is any. -func (c *apiServerSources) Update(apiServerSource *v1alpha2.ApiServerSource) (result *v1alpha2.ApiServerSource, err error) { +func (c *apiServerSources) Update(ctx context.Context, apiServerSource *v1alpha2.ApiServerSource, opts v1.UpdateOptions) (result *v1alpha2.ApiServerSource, err error) { result = &v1alpha2.ApiServerSource{} err = c.client.Put(). Namespace(c.ns). Resource("apiserversources"). Name(apiServerSource.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(apiServerSource). - Do(). + Do(ctx). Into(result) return } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *apiServerSources) UpdateStatus(apiServerSource *v1alpha2.ApiServerSource) (result *v1alpha2.ApiServerSource, err error) { +func (c *apiServerSources) UpdateStatus(ctx context.Context, apiServerSource *v1alpha2.ApiServerSource, opts v1.UpdateOptions) (result *v1alpha2.ApiServerSource, err error) { result = &v1alpha2.ApiServerSource{} err = c.client.Put(). Namespace(c.ns). Resource("apiserversources"). Name(apiServerSource.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(apiServerSource). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the apiServerSource and deletes it. Returns an error if one occurs. -func (c *apiServerSources) Delete(name string, options *v1.DeleteOptions) error { +func (c *apiServerSources) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("apiserversources"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *apiServerSources) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *apiServerSources) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Namespace(c.ns). Resource("apiserversources"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched apiServerSource. -func (c *apiServerSources) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha2.ApiServerSource, err error) { +func (c *apiServerSources) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.ApiServerSource, err error) { result = &v1alpha2.ApiServerSource{} err = c.client.Patch(pt). Namespace(c.ns). Resource("apiserversources"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1alpha2/containersource.go b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1alpha2/containersource.go index 1e884bf20c..9ae3f3bee5 100644 --- a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1alpha2/containersource.go +++ b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1alpha2/containersource.go @@ -19,6 +19,7 @@ limitations under the License. package v1alpha2 import ( + "context" "time" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -37,15 +38,15 @@ type ContainerSourcesGetter interface { // ContainerSourceInterface has methods to work with ContainerSource resources. type ContainerSourceInterface interface { - Create(*v1alpha2.ContainerSource) (*v1alpha2.ContainerSource, error) - Update(*v1alpha2.ContainerSource) (*v1alpha2.ContainerSource, error) - UpdateStatus(*v1alpha2.ContainerSource) (*v1alpha2.ContainerSource, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*v1alpha2.ContainerSource, error) - List(opts v1.ListOptions) (*v1alpha2.ContainerSourceList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha2.ContainerSource, err error) + Create(ctx context.Context, containerSource *v1alpha2.ContainerSource, opts v1.CreateOptions) (*v1alpha2.ContainerSource, error) + Update(ctx context.Context, containerSource *v1alpha2.ContainerSource, opts v1.UpdateOptions) (*v1alpha2.ContainerSource, error) + UpdateStatus(ctx context.Context, containerSource *v1alpha2.ContainerSource, opts v1.UpdateOptions) (*v1alpha2.ContainerSource, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha2.ContainerSource, error) + List(ctx context.Context, opts v1.ListOptions) (*v1alpha2.ContainerSourceList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.ContainerSource, err error) ContainerSourceExpansion } @@ -64,20 +65,20 @@ func newContainerSources(c *SourcesV1alpha2Client, namespace string) *containerS } // Get takes name of the containerSource, and returns the corresponding containerSource object, and an error if there is any. -func (c *containerSources) Get(name string, options v1.GetOptions) (result *v1alpha2.ContainerSource, err error) { +func (c *containerSources) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha2.ContainerSource, err error) { result = &v1alpha2.ContainerSource{} err = c.client.Get(). Namespace(c.ns). Resource("containersources"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of ContainerSources that match those selectors. -func (c *containerSources) List(opts v1.ListOptions) (result *v1alpha2.ContainerSourceList, err error) { +func (c *containerSources) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha2.ContainerSourceList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -88,13 +89,13 @@ func (c *containerSources) List(opts v1.ListOptions) (result *v1alpha2.Container Resource("containersources"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested containerSources. -func (c *containerSources) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *containerSources) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -105,87 +106,90 @@ func (c *containerSources) Watch(opts v1.ListOptions) (watch.Interface, error) { Resource("containersources"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a containerSource and creates it. Returns the server's representation of the containerSource, and an error, if there is any. -func (c *containerSources) Create(containerSource *v1alpha2.ContainerSource) (result *v1alpha2.ContainerSource, err error) { +func (c *containerSources) Create(ctx context.Context, containerSource *v1alpha2.ContainerSource, opts v1.CreateOptions) (result *v1alpha2.ContainerSource, err error) { result = &v1alpha2.ContainerSource{} err = c.client.Post(). Namespace(c.ns). Resource("containersources"). + VersionedParams(&opts, scheme.ParameterCodec). Body(containerSource). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a containerSource and updates it. Returns the server's representation of the containerSource, and an error, if there is any. -func (c *containerSources) Update(containerSource *v1alpha2.ContainerSource) (result *v1alpha2.ContainerSource, err error) { +func (c *containerSources) Update(ctx context.Context, containerSource *v1alpha2.ContainerSource, opts v1.UpdateOptions) (result *v1alpha2.ContainerSource, err error) { result = &v1alpha2.ContainerSource{} err = c.client.Put(). Namespace(c.ns). Resource("containersources"). Name(containerSource.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(containerSource). - Do(). + Do(ctx). Into(result) return } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *containerSources) UpdateStatus(containerSource *v1alpha2.ContainerSource) (result *v1alpha2.ContainerSource, err error) { +func (c *containerSources) UpdateStatus(ctx context.Context, containerSource *v1alpha2.ContainerSource, opts v1.UpdateOptions) (result *v1alpha2.ContainerSource, err error) { result = &v1alpha2.ContainerSource{} err = c.client.Put(). Namespace(c.ns). Resource("containersources"). Name(containerSource.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(containerSource). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the containerSource and deletes it. Returns an error if one occurs. -func (c *containerSources) Delete(name string, options *v1.DeleteOptions) error { +func (c *containerSources) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("containersources"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *containerSources) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *containerSources) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Namespace(c.ns). Resource("containersources"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched containerSource. -func (c *containerSources) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha2.ContainerSource, err error) { +func (c *containerSources) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.ContainerSource, err error) { result = &v1alpha2.ContainerSource{} err = c.client.Patch(pt). Namespace(c.ns). Resource("containersources"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1alpha2/fake/fake_apiserversource.go b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1alpha2/fake/fake_apiserversource.go index 1e9426db7d..ca0aa65df3 100644 --- a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1alpha2/fake/fake_apiserversource.go +++ b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1alpha2/fake/fake_apiserversource.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -39,7 +41,7 @@ var apiserversourcesResource = schema.GroupVersionResource{Group: "sources.knati var apiserversourcesKind = schema.GroupVersionKind{Group: "sources.knative.dev", Version: "v1alpha2", Kind: "ApiServerSource"} // Get takes name of the apiServerSource, and returns the corresponding apiServerSource object, and an error if there is any. -func (c *FakeApiServerSources) Get(name string, options v1.GetOptions) (result *v1alpha2.ApiServerSource, err error) { +func (c *FakeApiServerSources) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha2.ApiServerSource, err error) { obj, err := c.Fake. Invokes(testing.NewGetAction(apiserversourcesResource, c.ns, name), &v1alpha2.ApiServerSource{}) @@ -50,7 +52,7 @@ func (c *FakeApiServerSources) Get(name string, options v1.GetOptions) (result * } // List takes label and field selectors, and returns the list of ApiServerSources that match those selectors. -func (c *FakeApiServerSources) List(opts v1.ListOptions) (result *v1alpha2.ApiServerSourceList, err error) { +func (c *FakeApiServerSources) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha2.ApiServerSourceList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(apiserversourcesResource, apiserversourcesKind, c.ns, opts), &v1alpha2.ApiServerSourceList{}) @@ -72,14 +74,14 @@ func (c *FakeApiServerSources) List(opts v1.ListOptions) (result *v1alpha2.ApiSe } // Watch returns a watch.Interface that watches the requested apiServerSources. -func (c *FakeApiServerSources) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeApiServerSources) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(apiserversourcesResource, c.ns, opts)) } // Create takes the representation of a apiServerSource and creates it. Returns the server's representation of the apiServerSource, and an error, if there is any. -func (c *FakeApiServerSources) Create(apiServerSource *v1alpha2.ApiServerSource) (result *v1alpha2.ApiServerSource, err error) { +func (c *FakeApiServerSources) Create(ctx context.Context, apiServerSource *v1alpha2.ApiServerSource, opts v1.CreateOptions) (result *v1alpha2.ApiServerSource, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(apiserversourcesResource, c.ns, apiServerSource), &v1alpha2.ApiServerSource{}) @@ -90,7 +92,7 @@ func (c *FakeApiServerSources) Create(apiServerSource *v1alpha2.ApiServerSource) } // Update takes the representation of a apiServerSource and updates it. Returns the server's representation of the apiServerSource, and an error, if there is any. -func (c *FakeApiServerSources) Update(apiServerSource *v1alpha2.ApiServerSource) (result *v1alpha2.ApiServerSource, err error) { +func (c *FakeApiServerSources) Update(ctx context.Context, apiServerSource *v1alpha2.ApiServerSource, opts v1.UpdateOptions) (result *v1alpha2.ApiServerSource, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(apiserversourcesResource, c.ns, apiServerSource), &v1alpha2.ApiServerSource{}) @@ -102,7 +104,7 @@ func (c *FakeApiServerSources) Update(apiServerSource *v1alpha2.ApiServerSource) // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeApiServerSources) UpdateStatus(apiServerSource *v1alpha2.ApiServerSource) (*v1alpha2.ApiServerSource, error) { +func (c *FakeApiServerSources) UpdateStatus(ctx context.Context, apiServerSource *v1alpha2.ApiServerSource, opts v1.UpdateOptions) (*v1alpha2.ApiServerSource, error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(apiserversourcesResource, "status", c.ns, apiServerSource), &v1alpha2.ApiServerSource{}) @@ -113,7 +115,7 @@ func (c *FakeApiServerSources) UpdateStatus(apiServerSource *v1alpha2.ApiServerS } // Delete takes name of the apiServerSource and deletes it. Returns an error if one occurs. -func (c *FakeApiServerSources) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeApiServerSources) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewDeleteAction(apiserversourcesResource, c.ns, name), &v1alpha2.ApiServerSource{}) @@ -121,15 +123,15 @@ func (c *FakeApiServerSources) Delete(name string, options *v1.DeleteOptions) er } // DeleteCollection deletes a collection of objects. -func (c *FakeApiServerSources) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(apiserversourcesResource, c.ns, listOptions) +func (c *FakeApiServerSources) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(apiserversourcesResource, c.ns, listOpts) _, err := c.Fake.Invokes(action, &v1alpha2.ApiServerSourceList{}) return err } // Patch applies the patch and returns the patched apiServerSource. -func (c *FakeApiServerSources) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha2.ApiServerSource, err error) { +func (c *FakeApiServerSources) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.ApiServerSource, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(apiserversourcesResource, c.ns, name, pt, data, subresources...), &v1alpha2.ApiServerSource{}) diff --git a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1alpha2/fake/fake_containersource.go b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1alpha2/fake/fake_containersource.go index c990e643f2..9031cfb779 100644 --- a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1alpha2/fake/fake_containersource.go +++ b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1alpha2/fake/fake_containersource.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -39,7 +41,7 @@ var containersourcesResource = schema.GroupVersionResource{Group: "sources.knati var containersourcesKind = schema.GroupVersionKind{Group: "sources.knative.dev", Version: "v1alpha2", Kind: "ContainerSource"} // Get takes name of the containerSource, and returns the corresponding containerSource object, and an error if there is any. -func (c *FakeContainerSources) Get(name string, options v1.GetOptions) (result *v1alpha2.ContainerSource, err error) { +func (c *FakeContainerSources) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha2.ContainerSource, err error) { obj, err := c.Fake. Invokes(testing.NewGetAction(containersourcesResource, c.ns, name), &v1alpha2.ContainerSource{}) @@ -50,7 +52,7 @@ func (c *FakeContainerSources) Get(name string, options v1.GetOptions) (result * } // List takes label and field selectors, and returns the list of ContainerSources that match those selectors. -func (c *FakeContainerSources) List(opts v1.ListOptions) (result *v1alpha2.ContainerSourceList, err error) { +func (c *FakeContainerSources) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha2.ContainerSourceList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(containersourcesResource, containersourcesKind, c.ns, opts), &v1alpha2.ContainerSourceList{}) @@ -72,14 +74,14 @@ func (c *FakeContainerSources) List(opts v1.ListOptions) (result *v1alpha2.Conta } // Watch returns a watch.Interface that watches the requested containerSources. -func (c *FakeContainerSources) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeContainerSources) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(containersourcesResource, c.ns, opts)) } // Create takes the representation of a containerSource and creates it. Returns the server's representation of the containerSource, and an error, if there is any. -func (c *FakeContainerSources) Create(containerSource *v1alpha2.ContainerSource) (result *v1alpha2.ContainerSource, err error) { +func (c *FakeContainerSources) Create(ctx context.Context, containerSource *v1alpha2.ContainerSource, opts v1.CreateOptions) (result *v1alpha2.ContainerSource, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(containersourcesResource, c.ns, containerSource), &v1alpha2.ContainerSource{}) @@ -90,7 +92,7 @@ func (c *FakeContainerSources) Create(containerSource *v1alpha2.ContainerSource) } // Update takes the representation of a containerSource and updates it. Returns the server's representation of the containerSource, and an error, if there is any. -func (c *FakeContainerSources) Update(containerSource *v1alpha2.ContainerSource) (result *v1alpha2.ContainerSource, err error) { +func (c *FakeContainerSources) Update(ctx context.Context, containerSource *v1alpha2.ContainerSource, opts v1.UpdateOptions) (result *v1alpha2.ContainerSource, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(containersourcesResource, c.ns, containerSource), &v1alpha2.ContainerSource{}) @@ -102,7 +104,7 @@ func (c *FakeContainerSources) Update(containerSource *v1alpha2.ContainerSource) // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeContainerSources) UpdateStatus(containerSource *v1alpha2.ContainerSource) (*v1alpha2.ContainerSource, error) { +func (c *FakeContainerSources) UpdateStatus(ctx context.Context, containerSource *v1alpha2.ContainerSource, opts v1.UpdateOptions) (*v1alpha2.ContainerSource, error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(containersourcesResource, "status", c.ns, containerSource), &v1alpha2.ContainerSource{}) @@ -113,7 +115,7 @@ func (c *FakeContainerSources) UpdateStatus(containerSource *v1alpha2.ContainerS } // Delete takes name of the containerSource and deletes it. Returns an error if one occurs. -func (c *FakeContainerSources) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeContainerSources) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewDeleteAction(containersourcesResource, c.ns, name), &v1alpha2.ContainerSource{}) @@ -121,15 +123,15 @@ func (c *FakeContainerSources) Delete(name string, options *v1.DeleteOptions) er } // DeleteCollection deletes a collection of objects. -func (c *FakeContainerSources) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(containersourcesResource, c.ns, listOptions) +func (c *FakeContainerSources) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(containersourcesResource, c.ns, listOpts) _, err := c.Fake.Invokes(action, &v1alpha2.ContainerSourceList{}) return err } // Patch applies the patch and returns the patched containerSource. -func (c *FakeContainerSources) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha2.ContainerSource, err error) { +func (c *FakeContainerSources) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.ContainerSource, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(containersourcesResource, c.ns, name, pt, data, subresources...), &v1alpha2.ContainerSource{}) diff --git a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1alpha2/fake/fake_pingsource.go b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1alpha2/fake/fake_pingsource.go index 5f4b62c2c0..6f40ef4142 100644 --- a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1alpha2/fake/fake_pingsource.go +++ b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1alpha2/fake/fake_pingsource.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -39,7 +41,7 @@ var pingsourcesResource = schema.GroupVersionResource{Group: "sources.knative.de var pingsourcesKind = schema.GroupVersionKind{Group: "sources.knative.dev", Version: "v1alpha2", Kind: "PingSource"} // Get takes name of the pingSource, and returns the corresponding pingSource object, and an error if there is any. -func (c *FakePingSources) Get(name string, options v1.GetOptions) (result *v1alpha2.PingSource, err error) { +func (c *FakePingSources) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha2.PingSource, err error) { obj, err := c.Fake. Invokes(testing.NewGetAction(pingsourcesResource, c.ns, name), &v1alpha2.PingSource{}) @@ -50,7 +52,7 @@ func (c *FakePingSources) Get(name string, options v1.GetOptions) (result *v1alp } // List takes label and field selectors, and returns the list of PingSources that match those selectors. -func (c *FakePingSources) List(opts v1.ListOptions) (result *v1alpha2.PingSourceList, err error) { +func (c *FakePingSources) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha2.PingSourceList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(pingsourcesResource, pingsourcesKind, c.ns, opts), &v1alpha2.PingSourceList{}) @@ -72,14 +74,14 @@ func (c *FakePingSources) List(opts v1.ListOptions) (result *v1alpha2.PingSource } // Watch returns a watch.Interface that watches the requested pingSources. -func (c *FakePingSources) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakePingSources) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(pingsourcesResource, c.ns, opts)) } // Create takes the representation of a pingSource and creates it. Returns the server's representation of the pingSource, and an error, if there is any. -func (c *FakePingSources) Create(pingSource *v1alpha2.PingSource) (result *v1alpha2.PingSource, err error) { +func (c *FakePingSources) Create(ctx context.Context, pingSource *v1alpha2.PingSource, opts v1.CreateOptions) (result *v1alpha2.PingSource, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(pingsourcesResource, c.ns, pingSource), &v1alpha2.PingSource{}) @@ -90,7 +92,7 @@ func (c *FakePingSources) Create(pingSource *v1alpha2.PingSource) (result *v1alp } // Update takes the representation of a pingSource and updates it. Returns the server's representation of the pingSource, and an error, if there is any. -func (c *FakePingSources) Update(pingSource *v1alpha2.PingSource) (result *v1alpha2.PingSource, err error) { +func (c *FakePingSources) Update(ctx context.Context, pingSource *v1alpha2.PingSource, opts v1.UpdateOptions) (result *v1alpha2.PingSource, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(pingsourcesResource, c.ns, pingSource), &v1alpha2.PingSource{}) @@ -102,7 +104,7 @@ func (c *FakePingSources) Update(pingSource *v1alpha2.PingSource) (result *v1alp // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakePingSources) UpdateStatus(pingSource *v1alpha2.PingSource) (*v1alpha2.PingSource, error) { +func (c *FakePingSources) UpdateStatus(ctx context.Context, pingSource *v1alpha2.PingSource, opts v1.UpdateOptions) (*v1alpha2.PingSource, error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(pingsourcesResource, "status", c.ns, pingSource), &v1alpha2.PingSource{}) @@ -113,7 +115,7 @@ func (c *FakePingSources) UpdateStatus(pingSource *v1alpha2.PingSource) (*v1alph } // Delete takes name of the pingSource and deletes it. Returns an error if one occurs. -func (c *FakePingSources) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakePingSources) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewDeleteAction(pingsourcesResource, c.ns, name), &v1alpha2.PingSource{}) @@ -121,15 +123,15 @@ func (c *FakePingSources) Delete(name string, options *v1.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *FakePingSources) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(pingsourcesResource, c.ns, listOptions) +func (c *FakePingSources) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(pingsourcesResource, c.ns, listOpts) _, err := c.Fake.Invokes(action, &v1alpha2.PingSourceList{}) return err } // Patch applies the patch and returns the patched pingSource. -func (c *FakePingSources) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha2.PingSource, err error) { +func (c *FakePingSources) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.PingSource, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(pingsourcesResource, c.ns, name, pt, data, subresources...), &v1alpha2.PingSource{}) diff --git a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1alpha2/fake/fake_sinkbinding.go b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1alpha2/fake/fake_sinkbinding.go index 56db2671f0..5562ffe4a9 100644 --- a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1alpha2/fake/fake_sinkbinding.go +++ b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1alpha2/fake/fake_sinkbinding.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -39,7 +41,7 @@ var sinkbindingsResource = schema.GroupVersionResource{Group: "sources.knative.d var sinkbindingsKind = schema.GroupVersionKind{Group: "sources.knative.dev", Version: "v1alpha2", Kind: "SinkBinding"} // Get takes name of the sinkBinding, and returns the corresponding sinkBinding object, and an error if there is any. -func (c *FakeSinkBindings) Get(name string, options v1.GetOptions) (result *v1alpha2.SinkBinding, err error) { +func (c *FakeSinkBindings) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha2.SinkBinding, err error) { obj, err := c.Fake. Invokes(testing.NewGetAction(sinkbindingsResource, c.ns, name), &v1alpha2.SinkBinding{}) @@ -50,7 +52,7 @@ func (c *FakeSinkBindings) Get(name string, options v1.GetOptions) (result *v1al } // List takes label and field selectors, and returns the list of SinkBindings that match those selectors. -func (c *FakeSinkBindings) List(opts v1.ListOptions) (result *v1alpha2.SinkBindingList, err error) { +func (c *FakeSinkBindings) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha2.SinkBindingList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(sinkbindingsResource, sinkbindingsKind, c.ns, opts), &v1alpha2.SinkBindingList{}) @@ -72,14 +74,14 @@ func (c *FakeSinkBindings) List(opts v1.ListOptions) (result *v1alpha2.SinkBindi } // Watch returns a watch.Interface that watches the requested sinkBindings. -func (c *FakeSinkBindings) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeSinkBindings) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(sinkbindingsResource, c.ns, opts)) } // Create takes the representation of a sinkBinding and creates it. Returns the server's representation of the sinkBinding, and an error, if there is any. -func (c *FakeSinkBindings) Create(sinkBinding *v1alpha2.SinkBinding) (result *v1alpha2.SinkBinding, err error) { +func (c *FakeSinkBindings) Create(ctx context.Context, sinkBinding *v1alpha2.SinkBinding, opts v1.CreateOptions) (result *v1alpha2.SinkBinding, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(sinkbindingsResource, c.ns, sinkBinding), &v1alpha2.SinkBinding{}) @@ -90,7 +92,7 @@ func (c *FakeSinkBindings) Create(sinkBinding *v1alpha2.SinkBinding) (result *v1 } // Update takes the representation of a sinkBinding and updates it. Returns the server's representation of the sinkBinding, and an error, if there is any. -func (c *FakeSinkBindings) Update(sinkBinding *v1alpha2.SinkBinding) (result *v1alpha2.SinkBinding, err error) { +func (c *FakeSinkBindings) Update(ctx context.Context, sinkBinding *v1alpha2.SinkBinding, opts v1.UpdateOptions) (result *v1alpha2.SinkBinding, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(sinkbindingsResource, c.ns, sinkBinding), &v1alpha2.SinkBinding{}) @@ -102,7 +104,7 @@ func (c *FakeSinkBindings) Update(sinkBinding *v1alpha2.SinkBinding) (result *v1 // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeSinkBindings) UpdateStatus(sinkBinding *v1alpha2.SinkBinding) (*v1alpha2.SinkBinding, error) { +func (c *FakeSinkBindings) UpdateStatus(ctx context.Context, sinkBinding *v1alpha2.SinkBinding, opts v1.UpdateOptions) (*v1alpha2.SinkBinding, error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(sinkbindingsResource, "status", c.ns, sinkBinding), &v1alpha2.SinkBinding{}) @@ -113,7 +115,7 @@ func (c *FakeSinkBindings) UpdateStatus(sinkBinding *v1alpha2.SinkBinding) (*v1a } // Delete takes name of the sinkBinding and deletes it. Returns an error if one occurs. -func (c *FakeSinkBindings) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeSinkBindings) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewDeleteAction(sinkbindingsResource, c.ns, name), &v1alpha2.SinkBinding{}) @@ -121,15 +123,15 @@ func (c *FakeSinkBindings) Delete(name string, options *v1.DeleteOptions) error } // DeleteCollection deletes a collection of objects. -func (c *FakeSinkBindings) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(sinkbindingsResource, c.ns, listOptions) +func (c *FakeSinkBindings) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(sinkbindingsResource, c.ns, listOpts) _, err := c.Fake.Invokes(action, &v1alpha2.SinkBindingList{}) return err } // Patch applies the patch and returns the patched sinkBinding. -func (c *FakeSinkBindings) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha2.SinkBinding, err error) { +func (c *FakeSinkBindings) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.SinkBinding, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(sinkbindingsResource, c.ns, name, pt, data, subresources...), &v1alpha2.SinkBinding{}) diff --git a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1alpha2/pingsource.go b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1alpha2/pingsource.go index faf8fa24b0..6898cca0d3 100644 --- a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1alpha2/pingsource.go +++ b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1alpha2/pingsource.go @@ -19,6 +19,7 @@ limitations under the License. package v1alpha2 import ( + "context" "time" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -37,15 +38,15 @@ type PingSourcesGetter interface { // PingSourceInterface has methods to work with PingSource resources. type PingSourceInterface interface { - Create(*v1alpha2.PingSource) (*v1alpha2.PingSource, error) - Update(*v1alpha2.PingSource) (*v1alpha2.PingSource, error) - UpdateStatus(*v1alpha2.PingSource) (*v1alpha2.PingSource, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*v1alpha2.PingSource, error) - List(opts v1.ListOptions) (*v1alpha2.PingSourceList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha2.PingSource, err error) + Create(ctx context.Context, pingSource *v1alpha2.PingSource, opts v1.CreateOptions) (*v1alpha2.PingSource, error) + Update(ctx context.Context, pingSource *v1alpha2.PingSource, opts v1.UpdateOptions) (*v1alpha2.PingSource, error) + UpdateStatus(ctx context.Context, pingSource *v1alpha2.PingSource, opts v1.UpdateOptions) (*v1alpha2.PingSource, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha2.PingSource, error) + List(ctx context.Context, opts v1.ListOptions) (*v1alpha2.PingSourceList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.PingSource, err error) PingSourceExpansion } @@ -64,20 +65,20 @@ func newPingSources(c *SourcesV1alpha2Client, namespace string) *pingSources { } // Get takes name of the pingSource, and returns the corresponding pingSource object, and an error if there is any. -func (c *pingSources) Get(name string, options v1.GetOptions) (result *v1alpha2.PingSource, err error) { +func (c *pingSources) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha2.PingSource, err error) { result = &v1alpha2.PingSource{} err = c.client.Get(). Namespace(c.ns). Resource("pingsources"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of PingSources that match those selectors. -func (c *pingSources) List(opts v1.ListOptions) (result *v1alpha2.PingSourceList, err error) { +func (c *pingSources) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha2.PingSourceList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -88,13 +89,13 @@ func (c *pingSources) List(opts v1.ListOptions) (result *v1alpha2.PingSourceList Resource("pingsources"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested pingSources. -func (c *pingSources) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *pingSources) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -105,87 +106,90 @@ func (c *pingSources) Watch(opts v1.ListOptions) (watch.Interface, error) { Resource("pingsources"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a pingSource and creates it. Returns the server's representation of the pingSource, and an error, if there is any. -func (c *pingSources) Create(pingSource *v1alpha2.PingSource) (result *v1alpha2.PingSource, err error) { +func (c *pingSources) Create(ctx context.Context, pingSource *v1alpha2.PingSource, opts v1.CreateOptions) (result *v1alpha2.PingSource, err error) { result = &v1alpha2.PingSource{} err = c.client.Post(). Namespace(c.ns). Resource("pingsources"). + VersionedParams(&opts, scheme.ParameterCodec). Body(pingSource). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a pingSource and updates it. Returns the server's representation of the pingSource, and an error, if there is any. -func (c *pingSources) Update(pingSource *v1alpha2.PingSource) (result *v1alpha2.PingSource, err error) { +func (c *pingSources) Update(ctx context.Context, pingSource *v1alpha2.PingSource, opts v1.UpdateOptions) (result *v1alpha2.PingSource, err error) { result = &v1alpha2.PingSource{} err = c.client.Put(). Namespace(c.ns). Resource("pingsources"). Name(pingSource.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(pingSource). - Do(). + Do(ctx). Into(result) return } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *pingSources) UpdateStatus(pingSource *v1alpha2.PingSource) (result *v1alpha2.PingSource, err error) { +func (c *pingSources) UpdateStatus(ctx context.Context, pingSource *v1alpha2.PingSource, opts v1.UpdateOptions) (result *v1alpha2.PingSource, err error) { result = &v1alpha2.PingSource{} err = c.client.Put(). Namespace(c.ns). Resource("pingsources"). Name(pingSource.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(pingSource). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the pingSource and deletes it. Returns an error if one occurs. -func (c *pingSources) Delete(name string, options *v1.DeleteOptions) error { +func (c *pingSources) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("pingsources"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *pingSources) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *pingSources) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Namespace(c.ns). Resource("pingsources"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched pingSource. -func (c *pingSources) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha2.PingSource, err error) { +func (c *pingSources) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.PingSource, err error) { result = &v1alpha2.PingSource{} err = c.client.Patch(pt). Namespace(c.ns). Resource("pingsources"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1alpha2/sinkbinding.go b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1alpha2/sinkbinding.go index b17d7f077c..adf05b2af9 100644 --- a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1alpha2/sinkbinding.go +++ b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1alpha2/sinkbinding.go @@ -19,6 +19,7 @@ limitations under the License. package v1alpha2 import ( + "context" "time" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -37,15 +38,15 @@ type SinkBindingsGetter interface { // SinkBindingInterface has methods to work with SinkBinding resources. type SinkBindingInterface interface { - Create(*v1alpha2.SinkBinding) (*v1alpha2.SinkBinding, error) - Update(*v1alpha2.SinkBinding) (*v1alpha2.SinkBinding, error) - UpdateStatus(*v1alpha2.SinkBinding) (*v1alpha2.SinkBinding, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*v1alpha2.SinkBinding, error) - List(opts v1.ListOptions) (*v1alpha2.SinkBindingList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha2.SinkBinding, err error) + Create(ctx context.Context, sinkBinding *v1alpha2.SinkBinding, opts v1.CreateOptions) (*v1alpha2.SinkBinding, error) + Update(ctx context.Context, sinkBinding *v1alpha2.SinkBinding, opts v1.UpdateOptions) (*v1alpha2.SinkBinding, error) + UpdateStatus(ctx context.Context, sinkBinding *v1alpha2.SinkBinding, opts v1.UpdateOptions) (*v1alpha2.SinkBinding, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha2.SinkBinding, error) + List(ctx context.Context, opts v1.ListOptions) (*v1alpha2.SinkBindingList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.SinkBinding, err error) SinkBindingExpansion } @@ -64,20 +65,20 @@ func newSinkBindings(c *SourcesV1alpha2Client, namespace string) *sinkBindings { } // Get takes name of the sinkBinding, and returns the corresponding sinkBinding object, and an error if there is any. -func (c *sinkBindings) Get(name string, options v1.GetOptions) (result *v1alpha2.SinkBinding, err error) { +func (c *sinkBindings) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha2.SinkBinding, err error) { result = &v1alpha2.SinkBinding{} err = c.client.Get(). Namespace(c.ns). Resource("sinkbindings"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of SinkBindings that match those selectors. -func (c *sinkBindings) List(opts v1.ListOptions) (result *v1alpha2.SinkBindingList, err error) { +func (c *sinkBindings) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha2.SinkBindingList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -88,13 +89,13 @@ func (c *sinkBindings) List(opts v1.ListOptions) (result *v1alpha2.SinkBindingLi Resource("sinkbindings"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested sinkBindings. -func (c *sinkBindings) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *sinkBindings) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -105,87 +106,90 @@ func (c *sinkBindings) Watch(opts v1.ListOptions) (watch.Interface, error) { Resource("sinkbindings"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a sinkBinding and creates it. Returns the server's representation of the sinkBinding, and an error, if there is any. -func (c *sinkBindings) Create(sinkBinding *v1alpha2.SinkBinding) (result *v1alpha2.SinkBinding, err error) { +func (c *sinkBindings) Create(ctx context.Context, sinkBinding *v1alpha2.SinkBinding, opts v1.CreateOptions) (result *v1alpha2.SinkBinding, err error) { result = &v1alpha2.SinkBinding{} err = c.client.Post(). Namespace(c.ns). Resource("sinkbindings"). + VersionedParams(&opts, scheme.ParameterCodec). Body(sinkBinding). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a sinkBinding and updates it. Returns the server's representation of the sinkBinding, and an error, if there is any. -func (c *sinkBindings) Update(sinkBinding *v1alpha2.SinkBinding) (result *v1alpha2.SinkBinding, err error) { +func (c *sinkBindings) Update(ctx context.Context, sinkBinding *v1alpha2.SinkBinding, opts v1.UpdateOptions) (result *v1alpha2.SinkBinding, err error) { result = &v1alpha2.SinkBinding{} err = c.client.Put(). Namespace(c.ns). Resource("sinkbindings"). Name(sinkBinding.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(sinkBinding). - Do(). + Do(ctx). Into(result) return } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *sinkBindings) UpdateStatus(sinkBinding *v1alpha2.SinkBinding) (result *v1alpha2.SinkBinding, err error) { +func (c *sinkBindings) UpdateStatus(ctx context.Context, sinkBinding *v1alpha2.SinkBinding, opts v1.UpdateOptions) (result *v1alpha2.SinkBinding, err error) { result = &v1alpha2.SinkBinding{} err = c.client.Put(). Namespace(c.ns). Resource("sinkbindings"). Name(sinkBinding.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(sinkBinding). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the sinkBinding and deletes it. Returns an error if one occurs. -func (c *sinkBindings) Delete(name string, options *v1.DeleteOptions) error { +func (c *sinkBindings) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("sinkbindings"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *sinkBindings) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *sinkBindings) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Namespace(c.ns). Resource("sinkbindings"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched sinkBinding. -func (c *sinkBindings) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha2.SinkBinding, err error) { +func (c *sinkBindings) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.SinkBinding, err error) { result = &v1alpha2.SinkBinding{} err = c.client.Patch(pt). Namespace(c.ns). Resource("sinkbindings"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1beta1/apiserversource.go b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1beta1/apiserversource.go index 929886e32d..af04ef8a68 100644 --- a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1beta1/apiserversource.go +++ b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1beta1/apiserversource.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" "time" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -37,15 +38,15 @@ type ApiServerSourcesGetter interface { // ApiServerSourceInterface has methods to work with ApiServerSource resources. type ApiServerSourceInterface interface { - Create(*v1beta1.ApiServerSource) (*v1beta1.ApiServerSource, error) - Update(*v1beta1.ApiServerSource) (*v1beta1.ApiServerSource, error) - UpdateStatus(*v1beta1.ApiServerSource) (*v1beta1.ApiServerSource, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*v1beta1.ApiServerSource, error) - List(opts v1.ListOptions) (*v1beta1.ApiServerSourceList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ApiServerSource, err error) + Create(ctx context.Context, apiServerSource *v1beta1.ApiServerSource, opts v1.CreateOptions) (*v1beta1.ApiServerSource, error) + Update(ctx context.Context, apiServerSource *v1beta1.ApiServerSource, opts v1.UpdateOptions) (*v1beta1.ApiServerSource, error) + UpdateStatus(ctx context.Context, apiServerSource *v1beta1.ApiServerSource, opts v1.UpdateOptions) (*v1beta1.ApiServerSource, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.ApiServerSource, error) + List(ctx context.Context, opts v1.ListOptions) (*v1beta1.ApiServerSourceList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.ApiServerSource, err error) ApiServerSourceExpansion } @@ -64,20 +65,20 @@ func newApiServerSources(c *SourcesV1beta1Client, namespace string) *apiServerSo } // Get takes name of the apiServerSource, and returns the corresponding apiServerSource object, and an error if there is any. -func (c *apiServerSources) Get(name string, options v1.GetOptions) (result *v1beta1.ApiServerSource, err error) { +func (c *apiServerSources) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.ApiServerSource, err error) { result = &v1beta1.ApiServerSource{} err = c.client.Get(). Namespace(c.ns). Resource("apiserversources"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of ApiServerSources that match those selectors. -func (c *apiServerSources) List(opts v1.ListOptions) (result *v1beta1.ApiServerSourceList, err error) { +func (c *apiServerSources) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.ApiServerSourceList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -88,13 +89,13 @@ func (c *apiServerSources) List(opts v1.ListOptions) (result *v1beta1.ApiServerS Resource("apiserversources"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested apiServerSources. -func (c *apiServerSources) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *apiServerSources) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -105,87 +106,90 @@ func (c *apiServerSources) Watch(opts v1.ListOptions) (watch.Interface, error) { Resource("apiserversources"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a apiServerSource and creates it. Returns the server's representation of the apiServerSource, and an error, if there is any. -func (c *apiServerSources) Create(apiServerSource *v1beta1.ApiServerSource) (result *v1beta1.ApiServerSource, err error) { +func (c *apiServerSources) Create(ctx context.Context, apiServerSource *v1beta1.ApiServerSource, opts v1.CreateOptions) (result *v1beta1.ApiServerSource, err error) { result = &v1beta1.ApiServerSource{} err = c.client.Post(). Namespace(c.ns). Resource("apiserversources"). + VersionedParams(&opts, scheme.ParameterCodec). Body(apiServerSource). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a apiServerSource and updates it. Returns the server's representation of the apiServerSource, and an error, if there is any. -func (c *apiServerSources) Update(apiServerSource *v1beta1.ApiServerSource) (result *v1beta1.ApiServerSource, err error) { +func (c *apiServerSources) Update(ctx context.Context, apiServerSource *v1beta1.ApiServerSource, opts v1.UpdateOptions) (result *v1beta1.ApiServerSource, err error) { result = &v1beta1.ApiServerSource{} err = c.client.Put(). Namespace(c.ns). Resource("apiserversources"). Name(apiServerSource.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(apiServerSource). - Do(). + Do(ctx). Into(result) return } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *apiServerSources) UpdateStatus(apiServerSource *v1beta1.ApiServerSource) (result *v1beta1.ApiServerSource, err error) { +func (c *apiServerSources) UpdateStatus(ctx context.Context, apiServerSource *v1beta1.ApiServerSource, opts v1.UpdateOptions) (result *v1beta1.ApiServerSource, err error) { result = &v1beta1.ApiServerSource{} err = c.client.Put(). Namespace(c.ns). Resource("apiserversources"). Name(apiServerSource.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(apiServerSource). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the apiServerSource and deletes it. Returns an error if one occurs. -func (c *apiServerSources) Delete(name string, options *v1.DeleteOptions) error { +func (c *apiServerSources) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("apiserversources"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *apiServerSources) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *apiServerSources) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Namespace(c.ns). Resource("apiserversources"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched apiServerSource. -func (c *apiServerSources) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ApiServerSource, err error) { +func (c *apiServerSources) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.ApiServerSource, err error) { result = &v1beta1.ApiServerSource{} err = c.client.Patch(pt). Namespace(c.ns). Resource("apiserversources"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1beta1/containersource.go b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1beta1/containersource.go index 0d200a3c2c..4807257b71 100644 --- a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1beta1/containersource.go +++ b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1beta1/containersource.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" "time" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -37,15 +38,15 @@ type ContainerSourcesGetter interface { // ContainerSourceInterface has methods to work with ContainerSource resources. type ContainerSourceInterface interface { - Create(*v1beta1.ContainerSource) (*v1beta1.ContainerSource, error) - Update(*v1beta1.ContainerSource) (*v1beta1.ContainerSource, error) - UpdateStatus(*v1beta1.ContainerSource) (*v1beta1.ContainerSource, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*v1beta1.ContainerSource, error) - List(opts v1.ListOptions) (*v1beta1.ContainerSourceList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ContainerSource, err error) + Create(ctx context.Context, containerSource *v1beta1.ContainerSource, opts v1.CreateOptions) (*v1beta1.ContainerSource, error) + Update(ctx context.Context, containerSource *v1beta1.ContainerSource, opts v1.UpdateOptions) (*v1beta1.ContainerSource, error) + UpdateStatus(ctx context.Context, containerSource *v1beta1.ContainerSource, opts v1.UpdateOptions) (*v1beta1.ContainerSource, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.ContainerSource, error) + List(ctx context.Context, opts v1.ListOptions) (*v1beta1.ContainerSourceList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.ContainerSource, err error) ContainerSourceExpansion } @@ -64,20 +65,20 @@ func newContainerSources(c *SourcesV1beta1Client, namespace string) *containerSo } // Get takes name of the containerSource, and returns the corresponding containerSource object, and an error if there is any. -func (c *containerSources) Get(name string, options v1.GetOptions) (result *v1beta1.ContainerSource, err error) { +func (c *containerSources) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.ContainerSource, err error) { result = &v1beta1.ContainerSource{} err = c.client.Get(). Namespace(c.ns). Resource("containersources"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of ContainerSources that match those selectors. -func (c *containerSources) List(opts v1.ListOptions) (result *v1beta1.ContainerSourceList, err error) { +func (c *containerSources) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.ContainerSourceList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -88,13 +89,13 @@ func (c *containerSources) List(opts v1.ListOptions) (result *v1beta1.ContainerS Resource("containersources"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested containerSources. -func (c *containerSources) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *containerSources) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -105,87 +106,90 @@ func (c *containerSources) Watch(opts v1.ListOptions) (watch.Interface, error) { Resource("containersources"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a containerSource and creates it. Returns the server's representation of the containerSource, and an error, if there is any. -func (c *containerSources) Create(containerSource *v1beta1.ContainerSource) (result *v1beta1.ContainerSource, err error) { +func (c *containerSources) Create(ctx context.Context, containerSource *v1beta1.ContainerSource, opts v1.CreateOptions) (result *v1beta1.ContainerSource, err error) { result = &v1beta1.ContainerSource{} err = c.client.Post(). Namespace(c.ns). Resource("containersources"). + VersionedParams(&opts, scheme.ParameterCodec). Body(containerSource). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a containerSource and updates it. Returns the server's representation of the containerSource, and an error, if there is any. -func (c *containerSources) Update(containerSource *v1beta1.ContainerSource) (result *v1beta1.ContainerSource, err error) { +func (c *containerSources) Update(ctx context.Context, containerSource *v1beta1.ContainerSource, opts v1.UpdateOptions) (result *v1beta1.ContainerSource, err error) { result = &v1beta1.ContainerSource{} err = c.client.Put(). Namespace(c.ns). Resource("containersources"). Name(containerSource.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(containerSource). - Do(). + Do(ctx). Into(result) return } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *containerSources) UpdateStatus(containerSource *v1beta1.ContainerSource) (result *v1beta1.ContainerSource, err error) { +func (c *containerSources) UpdateStatus(ctx context.Context, containerSource *v1beta1.ContainerSource, opts v1.UpdateOptions) (result *v1beta1.ContainerSource, err error) { result = &v1beta1.ContainerSource{} err = c.client.Put(). Namespace(c.ns). Resource("containersources"). Name(containerSource.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(containerSource). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the containerSource and deletes it. Returns an error if one occurs. -func (c *containerSources) Delete(name string, options *v1.DeleteOptions) error { +func (c *containerSources) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("containersources"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *containerSources) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *containerSources) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Namespace(c.ns). Resource("containersources"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched containerSource. -func (c *containerSources) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ContainerSource, err error) { +func (c *containerSources) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.ContainerSource, err error) { result = &v1beta1.ContainerSource{} err = c.client.Patch(pt). Namespace(c.ns). Resource("containersources"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1beta1/fake/fake_apiserversource.go b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1beta1/fake/fake_apiserversource.go index eebb4bda47..ab6b59deca 100644 --- a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1beta1/fake/fake_apiserversource.go +++ b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1beta1/fake/fake_apiserversource.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -39,7 +41,7 @@ var apiserversourcesResource = schema.GroupVersionResource{Group: "sources.knati var apiserversourcesKind = schema.GroupVersionKind{Group: "sources.knative.dev", Version: "v1beta1", Kind: "ApiServerSource"} // Get takes name of the apiServerSource, and returns the corresponding apiServerSource object, and an error if there is any. -func (c *FakeApiServerSources) Get(name string, options v1.GetOptions) (result *v1beta1.ApiServerSource, err error) { +func (c *FakeApiServerSources) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.ApiServerSource, err error) { obj, err := c.Fake. Invokes(testing.NewGetAction(apiserversourcesResource, c.ns, name), &v1beta1.ApiServerSource{}) @@ -50,7 +52,7 @@ func (c *FakeApiServerSources) Get(name string, options v1.GetOptions) (result * } // List takes label and field selectors, and returns the list of ApiServerSources that match those selectors. -func (c *FakeApiServerSources) List(opts v1.ListOptions) (result *v1beta1.ApiServerSourceList, err error) { +func (c *FakeApiServerSources) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.ApiServerSourceList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(apiserversourcesResource, apiserversourcesKind, c.ns, opts), &v1beta1.ApiServerSourceList{}) @@ -72,14 +74,14 @@ func (c *FakeApiServerSources) List(opts v1.ListOptions) (result *v1beta1.ApiSer } // Watch returns a watch.Interface that watches the requested apiServerSources. -func (c *FakeApiServerSources) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeApiServerSources) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(apiserversourcesResource, c.ns, opts)) } // Create takes the representation of a apiServerSource and creates it. Returns the server's representation of the apiServerSource, and an error, if there is any. -func (c *FakeApiServerSources) Create(apiServerSource *v1beta1.ApiServerSource) (result *v1beta1.ApiServerSource, err error) { +func (c *FakeApiServerSources) Create(ctx context.Context, apiServerSource *v1beta1.ApiServerSource, opts v1.CreateOptions) (result *v1beta1.ApiServerSource, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(apiserversourcesResource, c.ns, apiServerSource), &v1beta1.ApiServerSource{}) @@ -90,7 +92,7 @@ func (c *FakeApiServerSources) Create(apiServerSource *v1beta1.ApiServerSource) } // Update takes the representation of a apiServerSource and updates it. Returns the server's representation of the apiServerSource, and an error, if there is any. -func (c *FakeApiServerSources) Update(apiServerSource *v1beta1.ApiServerSource) (result *v1beta1.ApiServerSource, err error) { +func (c *FakeApiServerSources) Update(ctx context.Context, apiServerSource *v1beta1.ApiServerSource, opts v1.UpdateOptions) (result *v1beta1.ApiServerSource, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(apiserversourcesResource, c.ns, apiServerSource), &v1beta1.ApiServerSource{}) @@ -102,7 +104,7 @@ func (c *FakeApiServerSources) Update(apiServerSource *v1beta1.ApiServerSource) // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeApiServerSources) UpdateStatus(apiServerSource *v1beta1.ApiServerSource) (*v1beta1.ApiServerSource, error) { +func (c *FakeApiServerSources) UpdateStatus(ctx context.Context, apiServerSource *v1beta1.ApiServerSource, opts v1.UpdateOptions) (*v1beta1.ApiServerSource, error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(apiserversourcesResource, "status", c.ns, apiServerSource), &v1beta1.ApiServerSource{}) @@ -113,7 +115,7 @@ func (c *FakeApiServerSources) UpdateStatus(apiServerSource *v1beta1.ApiServerSo } // Delete takes name of the apiServerSource and deletes it. Returns an error if one occurs. -func (c *FakeApiServerSources) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeApiServerSources) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewDeleteAction(apiserversourcesResource, c.ns, name), &v1beta1.ApiServerSource{}) @@ -121,15 +123,15 @@ func (c *FakeApiServerSources) Delete(name string, options *v1.DeleteOptions) er } // DeleteCollection deletes a collection of objects. -func (c *FakeApiServerSources) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(apiserversourcesResource, c.ns, listOptions) +func (c *FakeApiServerSources) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(apiserversourcesResource, c.ns, listOpts) _, err := c.Fake.Invokes(action, &v1beta1.ApiServerSourceList{}) return err } // Patch applies the patch and returns the patched apiServerSource. -func (c *FakeApiServerSources) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ApiServerSource, err error) { +func (c *FakeApiServerSources) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.ApiServerSource, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(apiserversourcesResource, c.ns, name, pt, data, subresources...), &v1beta1.ApiServerSource{}) diff --git a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1beta1/fake/fake_containersource.go b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1beta1/fake/fake_containersource.go index ced7268671..82a67b749b 100644 --- a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1beta1/fake/fake_containersource.go +++ b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1beta1/fake/fake_containersource.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -39,7 +41,7 @@ var containersourcesResource = schema.GroupVersionResource{Group: "sources.knati var containersourcesKind = schema.GroupVersionKind{Group: "sources.knative.dev", Version: "v1beta1", Kind: "ContainerSource"} // Get takes name of the containerSource, and returns the corresponding containerSource object, and an error if there is any. -func (c *FakeContainerSources) Get(name string, options v1.GetOptions) (result *v1beta1.ContainerSource, err error) { +func (c *FakeContainerSources) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.ContainerSource, err error) { obj, err := c.Fake. Invokes(testing.NewGetAction(containersourcesResource, c.ns, name), &v1beta1.ContainerSource{}) @@ -50,7 +52,7 @@ func (c *FakeContainerSources) Get(name string, options v1.GetOptions) (result * } // List takes label and field selectors, and returns the list of ContainerSources that match those selectors. -func (c *FakeContainerSources) List(opts v1.ListOptions) (result *v1beta1.ContainerSourceList, err error) { +func (c *FakeContainerSources) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.ContainerSourceList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(containersourcesResource, containersourcesKind, c.ns, opts), &v1beta1.ContainerSourceList{}) @@ -72,14 +74,14 @@ func (c *FakeContainerSources) List(opts v1.ListOptions) (result *v1beta1.Contai } // Watch returns a watch.Interface that watches the requested containerSources. -func (c *FakeContainerSources) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeContainerSources) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(containersourcesResource, c.ns, opts)) } // Create takes the representation of a containerSource and creates it. Returns the server's representation of the containerSource, and an error, if there is any. -func (c *FakeContainerSources) Create(containerSource *v1beta1.ContainerSource) (result *v1beta1.ContainerSource, err error) { +func (c *FakeContainerSources) Create(ctx context.Context, containerSource *v1beta1.ContainerSource, opts v1.CreateOptions) (result *v1beta1.ContainerSource, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(containersourcesResource, c.ns, containerSource), &v1beta1.ContainerSource{}) @@ -90,7 +92,7 @@ func (c *FakeContainerSources) Create(containerSource *v1beta1.ContainerSource) } // Update takes the representation of a containerSource and updates it. Returns the server's representation of the containerSource, and an error, if there is any. -func (c *FakeContainerSources) Update(containerSource *v1beta1.ContainerSource) (result *v1beta1.ContainerSource, err error) { +func (c *FakeContainerSources) Update(ctx context.Context, containerSource *v1beta1.ContainerSource, opts v1.UpdateOptions) (result *v1beta1.ContainerSource, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(containersourcesResource, c.ns, containerSource), &v1beta1.ContainerSource{}) @@ -102,7 +104,7 @@ func (c *FakeContainerSources) Update(containerSource *v1beta1.ContainerSource) // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeContainerSources) UpdateStatus(containerSource *v1beta1.ContainerSource) (*v1beta1.ContainerSource, error) { +func (c *FakeContainerSources) UpdateStatus(ctx context.Context, containerSource *v1beta1.ContainerSource, opts v1.UpdateOptions) (*v1beta1.ContainerSource, error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(containersourcesResource, "status", c.ns, containerSource), &v1beta1.ContainerSource{}) @@ -113,7 +115,7 @@ func (c *FakeContainerSources) UpdateStatus(containerSource *v1beta1.ContainerSo } // Delete takes name of the containerSource and deletes it. Returns an error if one occurs. -func (c *FakeContainerSources) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeContainerSources) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewDeleteAction(containersourcesResource, c.ns, name), &v1beta1.ContainerSource{}) @@ -121,15 +123,15 @@ func (c *FakeContainerSources) Delete(name string, options *v1.DeleteOptions) er } // DeleteCollection deletes a collection of objects. -func (c *FakeContainerSources) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(containersourcesResource, c.ns, listOptions) +func (c *FakeContainerSources) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(containersourcesResource, c.ns, listOpts) _, err := c.Fake.Invokes(action, &v1beta1.ContainerSourceList{}) return err } // Patch applies the patch and returns the patched containerSource. -func (c *FakeContainerSources) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ContainerSource, err error) { +func (c *FakeContainerSources) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.ContainerSource, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(containersourcesResource, c.ns, name, pt, data, subresources...), &v1beta1.ContainerSource{}) diff --git a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1beta1/fake/fake_pingsource.go b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1beta1/fake/fake_pingsource.go index 15e3728c0c..644515398a 100644 --- a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1beta1/fake/fake_pingsource.go +++ b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1beta1/fake/fake_pingsource.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -39,7 +41,7 @@ var pingsourcesResource = schema.GroupVersionResource{Group: "sources.knative.de var pingsourcesKind = schema.GroupVersionKind{Group: "sources.knative.dev", Version: "v1beta1", Kind: "PingSource"} // Get takes name of the pingSource, and returns the corresponding pingSource object, and an error if there is any. -func (c *FakePingSources) Get(name string, options v1.GetOptions) (result *v1beta1.PingSource, err error) { +func (c *FakePingSources) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.PingSource, err error) { obj, err := c.Fake. Invokes(testing.NewGetAction(pingsourcesResource, c.ns, name), &v1beta1.PingSource{}) @@ -50,7 +52,7 @@ func (c *FakePingSources) Get(name string, options v1.GetOptions) (result *v1bet } // List takes label and field selectors, and returns the list of PingSources that match those selectors. -func (c *FakePingSources) List(opts v1.ListOptions) (result *v1beta1.PingSourceList, err error) { +func (c *FakePingSources) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.PingSourceList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(pingsourcesResource, pingsourcesKind, c.ns, opts), &v1beta1.PingSourceList{}) @@ -72,14 +74,14 @@ func (c *FakePingSources) List(opts v1.ListOptions) (result *v1beta1.PingSourceL } // Watch returns a watch.Interface that watches the requested pingSources. -func (c *FakePingSources) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakePingSources) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(pingsourcesResource, c.ns, opts)) } // Create takes the representation of a pingSource and creates it. Returns the server's representation of the pingSource, and an error, if there is any. -func (c *FakePingSources) Create(pingSource *v1beta1.PingSource) (result *v1beta1.PingSource, err error) { +func (c *FakePingSources) Create(ctx context.Context, pingSource *v1beta1.PingSource, opts v1.CreateOptions) (result *v1beta1.PingSource, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(pingsourcesResource, c.ns, pingSource), &v1beta1.PingSource{}) @@ -90,7 +92,7 @@ func (c *FakePingSources) Create(pingSource *v1beta1.PingSource) (result *v1beta } // Update takes the representation of a pingSource and updates it. Returns the server's representation of the pingSource, and an error, if there is any. -func (c *FakePingSources) Update(pingSource *v1beta1.PingSource) (result *v1beta1.PingSource, err error) { +func (c *FakePingSources) Update(ctx context.Context, pingSource *v1beta1.PingSource, opts v1.UpdateOptions) (result *v1beta1.PingSource, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(pingsourcesResource, c.ns, pingSource), &v1beta1.PingSource{}) @@ -102,7 +104,7 @@ func (c *FakePingSources) Update(pingSource *v1beta1.PingSource) (result *v1beta // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakePingSources) UpdateStatus(pingSource *v1beta1.PingSource) (*v1beta1.PingSource, error) { +func (c *FakePingSources) UpdateStatus(ctx context.Context, pingSource *v1beta1.PingSource, opts v1.UpdateOptions) (*v1beta1.PingSource, error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(pingsourcesResource, "status", c.ns, pingSource), &v1beta1.PingSource{}) @@ -113,7 +115,7 @@ func (c *FakePingSources) UpdateStatus(pingSource *v1beta1.PingSource) (*v1beta1 } // Delete takes name of the pingSource and deletes it. Returns an error if one occurs. -func (c *FakePingSources) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakePingSources) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewDeleteAction(pingsourcesResource, c.ns, name), &v1beta1.PingSource{}) @@ -121,15 +123,15 @@ func (c *FakePingSources) Delete(name string, options *v1.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *FakePingSources) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(pingsourcesResource, c.ns, listOptions) +func (c *FakePingSources) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(pingsourcesResource, c.ns, listOpts) _, err := c.Fake.Invokes(action, &v1beta1.PingSourceList{}) return err } // Patch applies the patch and returns the patched pingSource. -func (c *FakePingSources) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.PingSource, err error) { +func (c *FakePingSources) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.PingSource, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(pingsourcesResource, c.ns, name, pt, data, subresources...), &v1beta1.PingSource{}) diff --git a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1beta1/fake/fake_sinkbinding.go b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1beta1/fake/fake_sinkbinding.go index 1d5d81e9c4..fdaaac0e6e 100644 --- a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1beta1/fake/fake_sinkbinding.go +++ b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1beta1/fake/fake_sinkbinding.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -39,7 +41,7 @@ var sinkbindingsResource = schema.GroupVersionResource{Group: "sources.knative.d var sinkbindingsKind = schema.GroupVersionKind{Group: "sources.knative.dev", Version: "v1beta1", Kind: "SinkBinding"} // Get takes name of the sinkBinding, and returns the corresponding sinkBinding object, and an error if there is any. -func (c *FakeSinkBindings) Get(name string, options v1.GetOptions) (result *v1beta1.SinkBinding, err error) { +func (c *FakeSinkBindings) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.SinkBinding, err error) { obj, err := c.Fake. Invokes(testing.NewGetAction(sinkbindingsResource, c.ns, name), &v1beta1.SinkBinding{}) @@ -50,7 +52,7 @@ func (c *FakeSinkBindings) Get(name string, options v1.GetOptions) (result *v1be } // List takes label and field selectors, and returns the list of SinkBindings that match those selectors. -func (c *FakeSinkBindings) List(opts v1.ListOptions) (result *v1beta1.SinkBindingList, err error) { +func (c *FakeSinkBindings) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.SinkBindingList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(sinkbindingsResource, sinkbindingsKind, c.ns, opts), &v1beta1.SinkBindingList{}) @@ -72,14 +74,14 @@ func (c *FakeSinkBindings) List(opts v1.ListOptions) (result *v1beta1.SinkBindin } // Watch returns a watch.Interface that watches the requested sinkBindings. -func (c *FakeSinkBindings) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeSinkBindings) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(sinkbindingsResource, c.ns, opts)) } // Create takes the representation of a sinkBinding and creates it. Returns the server's representation of the sinkBinding, and an error, if there is any. -func (c *FakeSinkBindings) Create(sinkBinding *v1beta1.SinkBinding) (result *v1beta1.SinkBinding, err error) { +func (c *FakeSinkBindings) Create(ctx context.Context, sinkBinding *v1beta1.SinkBinding, opts v1.CreateOptions) (result *v1beta1.SinkBinding, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(sinkbindingsResource, c.ns, sinkBinding), &v1beta1.SinkBinding{}) @@ -90,7 +92,7 @@ func (c *FakeSinkBindings) Create(sinkBinding *v1beta1.SinkBinding) (result *v1b } // Update takes the representation of a sinkBinding and updates it. Returns the server's representation of the sinkBinding, and an error, if there is any. -func (c *FakeSinkBindings) Update(sinkBinding *v1beta1.SinkBinding) (result *v1beta1.SinkBinding, err error) { +func (c *FakeSinkBindings) Update(ctx context.Context, sinkBinding *v1beta1.SinkBinding, opts v1.UpdateOptions) (result *v1beta1.SinkBinding, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(sinkbindingsResource, c.ns, sinkBinding), &v1beta1.SinkBinding{}) @@ -102,7 +104,7 @@ func (c *FakeSinkBindings) Update(sinkBinding *v1beta1.SinkBinding) (result *v1b // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeSinkBindings) UpdateStatus(sinkBinding *v1beta1.SinkBinding) (*v1beta1.SinkBinding, error) { +func (c *FakeSinkBindings) UpdateStatus(ctx context.Context, sinkBinding *v1beta1.SinkBinding, opts v1.UpdateOptions) (*v1beta1.SinkBinding, error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(sinkbindingsResource, "status", c.ns, sinkBinding), &v1beta1.SinkBinding{}) @@ -113,7 +115,7 @@ func (c *FakeSinkBindings) UpdateStatus(sinkBinding *v1beta1.SinkBinding) (*v1be } // Delete takes name of the sinkBinding and deletes it. Returns an error if one occurs. -func (c *FakeSinkBindings) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeSinkBindings) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewDeleteAction(sinkbindingsResource, c.ns, name), &v1beta1.SinkBinding{}) @@ -121,15 +123,15 @@ func (c *FakeSinkBindings) Delete(name string, options *v1.DeleteOptions) error } // DeleteCollection deletes a collection of objects. -func (c *FakeSinkBindings) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(sinkbindingsResource, c.ns, listOptions) +func (c *FakeSinkBindings) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(sinkbindingsResource, c.ns, listOpts) _, err := c.Fake.Invokes(action, &v1beta1.SinkBindingList{}) return err } // Patch applies the patch and returns the patched sinkBinding. -func (c *FakeSinkBindings) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.SinkBinding, err error) { +func (c *FakeSinkBindings) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.SinkBinding, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(sinkbindingsResource, c.ns, name, pt, data, subresources...), &v1beta1.SinkBinding{}) diff --git a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1beta1/pingsource.go b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1beta1/pingsource.go index cb9fb2a71c..153f31ea76 100644 --- a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1beta1/pingsource.go +++ b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1beta1/pingsource.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" "time" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -37,15 +38,15 @@ type PingSourcesGetter interface { // PingSourceInterface has methods to work with PingSource resources. type PingSourceInterface interface { - Create(*v1beta1.PingSource) (*v1beta1.PingSource, error) - Update(*v1beta1.PingSource) (*v1beta1.PingSource, error) - UpdateStatus(*v1beta1.PingSource) (*v1beta1.PingSource, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*v1beta1.PingSource, error) - List(opts v1.ListOptions) (*v1beta1.PingSourceList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.PingSource, err error) + Create(ctx context.Context, pingSource *v1beta1.PingSource, opts v1.CreateOptions) (*v1beta1.PingSource, error) + Update(ctx context.Context, pingSource *v1beta1.PingSource, opts v1.UpdateOptions) (*v1beta1.PingSource, error) + UpdateStatus(ctx context.Context, pingSource *v1beta1.PingSource, opts v1.UpdateOptions) (*v1beta1.PingSource, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.PingSource, error) + List(ctx context.Context, opts v1.ListOptions) (*v1beta1.PingSourceList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.PingSource, err error) PingSourceExpansion } @@ -64,20 +65,20 @@ func newPingSources(c *SourcesV1beta1Client, namespace string) *pingSources { } // Get takes name of the pingSource, and returns the corresponding pingSource object, and an error if there is any. -func (c *pingSources) Get(name string, options v1.GetOptions) (result *v1beta1.PingSource, err error) { +func (c *pingSources) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.PingSource, err error) { result = &v1beta1.PingSource{} err = c.client.Get(). Namespace(c.ns). Resource("pingsources"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of PingSources that match those selectors. -func (c *pingSources) List(opts v1.ListOptions) (result *v1beta1.PingSourceList, err error) { +func (c *pingSources) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.PingSourceList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -88,13 +89,13 @@ func (c *pingSources) List(opts v1.ListOptions) (result *v1beta1.PingSourceList, Resource("pingsources"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested pingSources. -func (c *pingSources) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *pingSources) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -105,87 +106,90 @@ func (c *pingSources) Watch(opts v1.ListOptions) (watch.Interface, error) { Resource("pingsources"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a pingSource and creates it. Returns the server's representation of the pingSource, and an error, if there is any. -func (c *pingSources) Create(pingSource *v1beta1.PingSource) (result *v1beta1.PingSource, err error) { +func (c *pingSources) Create(ctx context.Context, pingSource *v1beta1.PingSource, opts v1.CreateOptions) (result *v1beta1.PingSource, err error) { result = &v1beta1.PingSource{} err = c.client.Post(). Namespace(c.ns). Resource("pingsources"). + VersionedParams(&opts, scheme.ParameterCodec). Body(pingSource). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a pingSource and updates it. Returns the server's representation of the pingSource, and an error, if there is any. -func (c *pingSources) Update(pingSource *v1beta1.PingSource) (result *v1beta1.PingSource, err error) { +func (c *pingSources) Update(ctx context.Context, pingSource *v1beta1.PingSource, opts v1.UpdateOptions) (result *v1beta1.PingSource, err error) { result = &v1beta1.PingSource{} err = c.client.Put(). Namespace(c.ns). Resource("pingsources"). Name(pingSource.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(pingSource). - Do(). + Do(ctx). Into(result) return } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *pingSources) UpdateStatus(pingSource *v1beta1.PingSource) (result *v1beta1.PingSource, err error) { +func (c *pingSources) UpdateStatus(ctx context.Context, pingSource *v1beta1.PingSource, opts v1.UpdateOptions) (result *v1beta1.PingSource, err error) { result = &v1beta1.PingSource{} err = c.client.Put(). Namespace(c.ns). Resource("pingsources"). Name(pingSource.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(pingSource). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the pingSource and deletes it. Returns an error if one occurs. -func (c *pingSources) Delete(name string, options *v1.DeleteOptions) error { +func (c *pingSources) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("pingsources"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *pingSources) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *pingSources) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Namespace(c.ns). Resource("pingsources"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched pingSource. -func (c *pingSources) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.PingSource, err error) { +func (c *pingSources) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.PingSource, err error) { result = &v1beta1.PingSource{} err = c.client.Patch(pt). Namespace(c.ns). Resource("pingsources"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1beta1/sinkbinding.go b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1beta1/sinkbinding.go index 1a963ac0b9..008f151a3b 100644 --- a/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1beta1/sinkbinding.go +++ b/vendor/knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1beta1/sinkbinding.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" "time" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -37,15 +38,15 @@ type SinkBindingsGetter interface { // SinkBindingInterface has methods to work with SinkBinding resources. type SinkBindingInterface interface { - Create(*v1beta1.SinkBinding) (*v1beta1.SinkBinding, error) - Update(*v1beta1.SinkBinding) (*v1beta1.SinkBinding, error) - UpdateStatus(*v1beta1.SinkBinding) (*v1beta1.SinkBinding, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*v1beta1.SinkBinding, error) - List(opts v1.ListOptions) (*v1beta1.SinkBindingList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.SinkBinding, err error) + Create(ctx context.Context, sinkBinding *v1beta1.SinkBinding, opts v1.CreateOptions) (*v1beta1.SinkBinding, error) + Update(ctx context.Context, sinkBinding *v1beta1.SinkBinding, opts v1.UpdateOptions) (*v1beta1.SinkBinding, error) + UpdateStatus(ctx context.Context, sinkBinding *v1beta1.SinkBinding, opts v1.UpdateOptions) (*v1beta1.SinkBinding, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.SinkBinding, error) + List(ctx context.Context, opts v1.ListOptions) (*v1beta1.SinkBindingList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.SinkBinding, err error) SinkBindingExpansion } @@ -64,20 +65,20 @@ func newSinkBindings(c *SourcesV1beta1Client, namespace string) *sinkBindings { } // Get takes name of the sinkBinding, and returns the corresponding sinkBinding object, and an error if there is any. -func (c *sinkBindings) Get(name string, options v1.GetOptions) (result *v1beta1.SinkBinding, err error) { +func (c *sinkBindings) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.SinkBinding, err error) { result = &v1beta1.SinkBinding{} err = c.client.Get(). Namespace(c.ns). Resource("sinkbindings"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of SinkBindings that match those selectors. -func (c *sinkBindings) List(opts v1.ListOptions) (result *v1beta1.SinkBindingList, err error) { +func (c *sinkBindings) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.SinkBindingList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -88,13 +89,13 @@ func (c *sinkBindings) List(opts v1.ListOptions) (result *v1beta1.SinkBindingLis Resource("sinkbindings"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested sinkBindings. -func (c *sinkBindings) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *sinkBindings) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -105,87 +106,90 @@ func (c *sinkBindings) Watch(opts v1.ListOptions) (watch.Interface, error) { Resource("sinkbindings"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a sinkBinding and creates it. Returns the server's representation of the sinkBinding, and an error, if there is any. -func (c *sinkBindings) Create(sinkBinding *v1beta1.SinkBinding) (result *v1beta1.SinkBinding, err error) { +func (c *sinkBindings) Create(ctx context.Context, sinkBinding *v1beta1.SinkBinding, opts v1.CreateOptions) (result *v1beta1.SinkBinding, err error) { result = &v1beta1.SinkBinding{} err = c.client.Post(). Namespace(c.ns). Resource("sinkbindings"). + VersionedParams(&opts, scheme.ParameterCodec). Body(sinkBinding). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a sinkBinding and updates it. Returns the server's representation of the sinkBinding, and an error, if there is any. -func (c *sinkBindings) Update(sinkBinding *v1beta1.SinkBinding) (result *v1beta1.SinkBinding, err error) { +func (c *sinkBindings) Update(ctx context.Context, sinkBinding *v1beta1.SinkBinding, opts v1.UpdateOptions) (result *v1beta1.SinkBinding, err error) { result = &v1beta1.SinkBinding{} err = c.client.Put(). Namespace(c.ns). Resource("sinkbindings"). Name(sinkBinding.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(sinkBinding). - Do(). + Do(ctx). Into(result) return } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *sinkBindings) UpdateStatus(sinkBinding *v1beta1.SinkBinding) (result *v1beta1.SinkBinding, err error) { +func (c *sinkBindings) UpdateStatus(ctx context.Context, sinkBinding *v1beta1.SinkBinding, opts v1.UpdateOptions) (result *v1beta1.SinkBinding, err error) { result = &v1beta1.SinkBinding{} err = c.client.Put(). Namespace(c.ns). Resource("sinkbindings"). Name(sinkBinding.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(sinkBinding). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the sinkBinding and deletes it. Returns an error if one occurs. -func (c *sinkBindings) Delete(name string, options *v1.DeleteOptions) error { +func (c *sinkBindings) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("sinkbindings"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *sinkBindings) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *sinkBindings) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Namespace(c.ns). Resource("sinkbindings"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched sinkBinding. -func (c *sinkBindings) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.SinkBinding, err error) { +func (c *sinkBindings) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.SinkBinding, err error) { result = &v1beta1.SinkBinding{} err = c.client.Patch(pt). Namespace(c.ns). Resource("sinkbindings"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/configs/v1alpha1/configmappropagation.go b/vendor/knative.dev/eventing/pkg/client/informers/externalversions/configs/v1alpha1/configmappropagation.go index c36690cbfe..6cda41d0dc 100644 --- a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/configs/v1alpha1/configmappropagation.go +++ b/vendor/knative.dev/eventing/pkg/client/informers/externalversions/configs/v1alpha1/configmappropagation.go @@ -19,6 +19,7 @@ limitations under the License. package v1alpha1 import ( + "context" time "time" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -61,13 +62,13 @@ func NewFilteredConfigMapPropagationInformer(client versioned.Interface, namespa if tweakListOptions != nil { tweakListOptions(&options) } - return client.ConfigsV1alpha1().ConfigMapPropagations(namespace).List(options) + return client.ConfigsV1alpha1().ConfigMapPropagations(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.ConfigsV1alpha1().ConfigMapPropagations(namespace).Watch(options) + return client.ConfigsV1alpha1().ConfigMapPropagations(namespace).Watch(context.TODO(), options) }, }, &configsv1alpha1.ConfigMapPropagation{}, diff --git a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/eventing/v1/broker.go b/vendor/knative.dev/eventing/pkg/client/informers/externalversions/eventing/v1/broker.go index b35aa4ee2f..dbef58e572 100644 --- a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/eventing/v1/broker.go +++ b/vendor/knative.dev/eventing/pkg/client/informers/externalversions/eventing/v1/broker.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" time "time" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -61,13 +62,13 @@ func NewFilteredBrokerInformer(client versioned.Interface, namespace string, res if tweakListOptions != nil { tweakListOptions(&options) } - return client.EventingV1().Brokers(namespace).List(options) + return client.EventingV1().Brokers(namespace).List(context.TODO(), options) }, WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.EventingV1().Brokers(namespace).Watch(options) + return client.EventingV1().Brokers(namespace).Watch(context.TODO(), options) }, }, &eventingv1.Broker{}, diff --git a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/eventing/v1/trigger.go b/vendor/knative.dev/eventing/pkg/client/informers/externalversions/eventing/v1/trigger.go index 6f99981bf7..45dfb7eaea 100644 --- a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/eventing/v1/trigger.go +++ b/vendor/knative.dev/eventing/pkg/client/informers/externalversions/eventing/v1/trigger.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" time "time" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -61,13 +62,13 @@ func NewFilteredTriggerInformer(client versioned.Interface, namespace string, re if tweakListOptions != nil { tweakListOptions(&options) } - return client.EventingV1().Triggers(namespace).List(options) + return client.EventingV1().Triggers(namespace).List(context.TODO(), options) }, WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.EventingV1().Triggers(namespace).Watch(options) + return client.EventingV1().Triggers(namespace).Watch(context.TODO(), options) }, }, &eventingv1.Trigger{}, diff --git a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/eventing/v1beta1/broker.go b/vendor/knative.dev/eventing/pkg/client/informers/externalversions/eventing/v1beta1/broker.go index ce88b4da85..9bc2d2be35 100644 --- a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/eventing/v1beta1/broker.go +++ b/vendor/knative.dev/eventing/pkg/client/informers/externalversions/eventing/v1beta1/broker.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" time "time" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -61,13 +62,13 @@ func NewFilteredBrokerInformer(client versioned.Interface, namespace string, res if tweakListOptions != nil { tweakListOptions(&options) } - return client.EventingV1beta1().Brokers(namespace).List(options) + return client.EventingV1beta1().Brokers(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.EventingV1beta1().Brokers(namespace).Watch(options) + return client.EventingV1beta1().Brokers(namespace).Watch(context.TODO(), options) }, }, &eventingv1beta1.Broker{}, diff --git a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/eventing/v1beta1/eventtype.go b/vendor/knative.dev/eventing/pkg/client/informers/externalversions/eventing/v1beta1/eventtype.go index 910c5f8055..0b9d50f505 100644 --- a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/eventing/v1beta1/eventtype.go +++ b/vendor/knative.dev/eventing/pkg/client/informers/externalversions/eventing/v1beta1/eventtype.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" time "time" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -61,13 +62,13 @@ func NewFilteredEventTypeInformer(client versioned.Interface, namespace string, if tweakListOptions != nil { tweakListOptions(&options) } - return client.EventingV1beta1().EventTypes(namespace).List(options) + return client.EventingV1beta1().EventTypes(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.EventingV1beta1().EventTypes(namespace).Watch(options) + return client.EventingV1beta1().EventTypes(namespace).Watch(context.TODO(), options) }, }, &eventingv1beta1.EventType{}, diff --git a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/eventing/v1beta1/trigger.go b/vendor/knative.dev/eventing/pkg/client/informers/externalversions/eventing/v1beta1/trigger.go index 262c81185c..a6a6f58d11 100644 --- a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/eventing/v1beta1/trigger.go +++ b/vendor/knative.dev/eventing/pkg/client/informers/externalversions/eventing/v1beta1/trigger.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" time "time" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -61,13 +62,13 @@ func NewFilteredTriggerInformer(client versioned.Interface, namespace string, re if tweakListOptions != nil { tweakListOptions(&options) } - return client.EventingV1beta1().Triggers(namespace).List(options) + return client.EventingV1beta1().Triggers(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.EventingV1beta1().Triggers(namespace).Watch(options) + return client.EventingV1beta1().Triggers(namespace).Watch(context.TODO(), options) }, }, &eventingv1beta1.Trigger{}, diff --git a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/flows/v1/parallel.go b/vendor/knative.dev/eventing/pkg/client/informers/externalversions/flows/v1/parallel.go index d647ea206b..57e31e249c 100644 --- a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/flows/v1/parallel.go +++ b/vendor/knative.dev/eventing/pkg/client/informers/externalversions/flows/v1/parallel.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" time "time" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -61,13 +62,13 @@ func NewFilteredParallelInformer(client versioned.Interface, namespace string, r if tweakListOptions != nil { tweakListOptions(&options) } - return client.FlowsV1().Parallels(namespace).List(options) + return client.FlowsV1().Parallels(namespace).List(context.TODO(), options) }, WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.FlowsV1().Parallels(namespace).Watch(options) + return client.FlowsV1().Parallels(namespace).Watch(context.TODO(), options) }, }, &flowsv1.Parallel{}, diff --git a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/flows/v1/sequence.go b/vendor/knative.dev/eventing/pkg/client/informers/externalversions/flows/v1/sequence.go index 6a03d2a238..77fd0ded02 100644 --- a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/flows/v1/sequence.go +++ b/vendor/knative.dev/eventing/pkg/client/informers/externalversions/flows/v1/sequence.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" time "time" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -61,13 +62,13 @@ func NewFilteredSequenceInformer(client versioned.Interface, namespace string, r if tweakListOptions != nil { tweakListOptions(&options) } - return client.FlowsV1().Sequences(namespace).List(options) + return client.FlowsV1().Sequences(namespace).List(context.TODO(), options) }, WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.FlowsV1().Sequences(namespace).Watch(options) + return client.FlowsV1().Sequences(namespace).Watch(context.TODO(), options) }, }, &flowsv1.Sequence{}, diff --git a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/flows/v1beta1/parallel.go b/vendor/knative.dev/eventing/pkg/client/informers/externalversions/flows/v1beta1/parallel.go index ea8949a845..adce42e2b6 100644 --- a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/flows/v1beta1/parallel.go +++ b/vendor/knative.dev/eventing/pkg/client/informers/externalversions/flows/v1beta1/parallel.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" time "time" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -61,13 +62,13 @@ func NewFilteredParallelInformer(client versioned.Interface, namespace string, r if tweakListOptions != nil { tweakListOptions(&options) } - return client.FlowsV1beta1().Parallels(namespace).List(options) + return client.FlowsV1beta1().Parallels(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.FlowsV1beta1().Parallels(namespace).Watch(options) + return client.FlowsV1beta1().Parallels(namespace).Watch(context.TODO(), options) }, }, &flowsv1beta1.Parallel{}, diff --git a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/flows/v1beta1/sequence.go b/vendor/knative.dev/eventing/pkg/client/informers/externalversions/flows/v1beta1/sequence.go index bc3c3141a5..8a8dda3005 100644 --- a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/flows/v1beta1/sequence.go +++ b/vendor/knative.dev/eventing/pkg/client/informers/externalversions/flows/v1beta1/sequence.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" time "time" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -61,13 +62,13 @@ func NewFilteredSequenceInformer(client versioned.Interface, namespace string, r if tweakListOptions != nil { tweakListOptions(&options) } - return client.FlowsV1beta1().Sequences(namespace).List(options) + return client.FlowsV1beta1().Sequences(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.FlowsV1beta1().Sequences(namespace).Watch(options) + return client.FlowsV1beta1().Sequences(namespace).Watch(context.TODO(), options) }, }, &flowsv1beta1.Sequence{}, diff --git a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/messaging/v1/channel.go b/vendor/knative.dev/eventing/pkg/client/informers/externalversions/messaging/v1/channel.go index a283f6975e..174ad4d5f4 100644 --- a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/messaging/v1/channel.go +++ b/vendor/knative.dev/eventing/pkg/client/informers/externalversions/messaging/v1/channel.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" time "time" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -61,13 +62,13 @@ func NewFilteredChannelInformer(client versioned.Interface, namespace string, re if tweakListOptions != nil { tweakListOptions(&options) } - return client.MessagingV1().Channels(namespace).List(options) + return client.MessagingV1().Channels(namespace).List(context.TODO(), options) }, WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.MessagingV1().Channels(namespace).Watch(options) + return client.MessagingV1().Channels(namespace).Watch(context.TODO(), options) }, }, &messagingv1.Channel{}, diff --git a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/messaging/v1/inmemorychannel.go b/vendor/knative.dev/eventing/pkg/client/informers/externalversions/messaging/v1/inmemorychannel.go index 6ad602dfbe..72869cbb34 100644 --- a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/messaging/v1/inmemorychannel.go +++ b/vendor/knative.dev/eventing/pkg/client/informers/externalversions/messaging/v1/inmemorychannel.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" time "time" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -61,13 +62,13 @@ func NewFilteredInMemoryChannelInformer(client versioned.Interface, namespace st if tweakListOptions != nil { tweakListOptions(&options) } - return client.MessagingV1().InMemoryChannels(namespace).List(options) + return client.MessagingV1().InMemoryChannels(namespace).List(context.TODO(), options) }, WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.MessagingV1().InMemoryChannels(namespace).Watch(options) + return client.MessagingV1().InMemoryChannels(namespace).Watch(context.TODO(), options) }, }, &messagingv1.InMemoryChannel{}, diff --git a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/messaging/v1/subscription.go b/vendor/knative.dev/eventing/pkg/client/informers/externalversions/messaging/v1/subscription.go index 6634a5e030..0a852bedc6 100644 --- a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/messaging/v1/subscription.go +++ b/vendor/knative.dev/eventing/pkg/client/informers/externalversions/messaging/v1/subscription.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" time "time" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -61,13 +62,13 @@ func NewFilteredSubscriptionInformer(client versioned.Interface, namespace strin if tweakListOptions != nil { tweakListOptions(&options) } - return client.MessagingV1().Subscriptions(namespace).List(options) + return client.MessagingV1().Subscriptions(namespace).List(context.TODO(), options) }, WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.MessagingV1().Subscriptions(namespace).Watch(options) + return client.MessagingV1().Subscriptions(namespace).Watch(context.TODO(), options) }, }, &messagingv1.Subscription{}, diff --git a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/messaging/v1beta1/channel.go b/vendor/knative.dev/eventing/pkg/client/informers/externalversions/messaging/v1beta1/channel.go index 5a176043b0..a8b0b6ed2e 100644 --- a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/messaging/v1beta1/channel.go +++ b/vendor/knative.dev/eventing/pkg/client/informers/externalversions/messaging/v1beta1/channel.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" time "time" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -61,13 +62,13 @@ func NewFilteredChannelInformer(client versioned.Interface, namespace string, re if tweakListOptions != nil { tweakListOptions(&options) } - return client.MessagingV1beta1().Channels(namespace).List(options) + return client.MessagingV1beta1().Channels(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.MessagingV1beta1().Channels(namespace).Watch(options) + return client.MessagingV1beta1().Channels(namespace).Watch(context.TODO(), options) }, }, &messagingv1beta1.Channel{}, diff --git a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/messaging/v1beta1/inmemorychannel.go b/vendor/knative.dev/eventing/pkg/client/informers/externalversions/messaging/v1beta1/inmemorychannel.go index c6c3cd0eeb..19ce6c58cd 100644 --- a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/messaging/v1beta1/inmemorychannel.go +++ b/vendor/knative.dev/eventing/pkg/client/informers/externalversions/messaging/v1beta1/inmemorychannel.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" time "time" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -61,13 +62,13 @@ func NewFilteredInMemoryChannelInformer(client versioned.Interface, namespace st if tweakListOptions != nil { tweakListOptions(&options) } - return client.MessagingV1beta1().InMemoryChannels(namespace).List(options) + return client.MessagingV1beta1().InMemoryChannels(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.MessagingV1beta1().InMemoryChannels(namespace).Watch(options) + return client.MessagingV1beta1().InMemoryChannels(namespace).Watch(context.TODO(), options) }, }, &messagingv1beta1.InMemoryChannel{}, diff --git a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/messaging/v1beta1/subscription.go b/vendor/knative.dev/eventing/pkg/client/informers/externalversions/messaging/v1beta1/subscription.go index 6900efde64..c73cf4cba8 100644 --- a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/messaging/v1beta1/subscription.go +++ b/vendor/knative.dev/eventing/pkg/client/informers/externalversions/messaging/v1beta1/subscription.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" time "time" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -61,13 +62,13 @@ func NewFilteredSubscriptionInformer(client versioned.Interface, namespace strin if tweakListOptions != nil { tweakListOptions(&options) } - return client.MessagingV1beta1().Subscriptions(namespace).List(options) + return client.MessagingV1beta1().Subscriptions(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.MessagingV1beta1().Subscriptions(namespace).Watch(options) + return client.MessagingV1beta1().Subscriptions(namespace).Watch(context.TODO(), options) }, }, &messagingv1beta1.Subscription{}, diff --git a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/sources/v1alpha1/apiserversource.go b/vendor/knative.dev/eventing/pkg/client/informers/externalversions/sources/v1alpha1/apiserversource.go index a8904dabab..6c1c72ca50 100644 --- a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/sources/v1alpha1/apiserversource.go +++ b/vendor/knative.dev/eventing/pkg/client/informers/externalversions/sources/v1alpha1/apiserversource.go @@ -19,6 +19,7 @@ limitations under the License. package v1alpha1 import ( + "context" time "time" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -61,13 +62,13 @@ func NewFilteredApiServerSourceInformer(client versioned.Interface, namespace st if tweakListOptions != nil { tweakListOptions(&options) } - return client.SourcesV1alpha1().ApiServerSources(namespace).List(options) + return client.SourcesV1alpha1().ApiServerSources(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.SourcesV1alpha1().ApiServerSources(namespace).Watch(options) + return client.SourcesV1alpha1().ApiServerSources(namespace).Watch(context.TODO(), options) }, }, &sourcesv1alpha1.ApiServerSource{}, diff --git a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/sources/v1alpha1/sinkbinding.go b/vendor/knative.dev/eventing/pkg/client/informers/externalversions/sources/v1alpha1/sinkbinding.go index fdbfd8a26c..38198fc940 100644 --- a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/sources/v1alpha1/sinkbinding.go +++ b/vendor/knative.dev/eventing/pkg/client/informers/externalversions/sources/v1alpha1/sinkbinding.go @@ -19,6 +19,7 @@ limitations under the License. package v1alpha1 import ( + "context" time "time" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -61,13 +62,13 @@ func NewFilteredSinkBindingInformer(client versioned.Interface, namespace string if tweakListOptions != nil { tweakListOptions(&options) } - return client.SourcesV1alpha1().SinkBindings(namespace).List(options) + return client.SourcesV1alpha1().SinkBindings(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.SourcesV1alpha1().SinkBindings(namespace).Watch(options) + return client.SourcesV1alpha1().SinkBindings(namespace).Watch(context.TODO(), options) }, }, &sourcesv1alpha1.SinkBinding{}, diff --git a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/sources/v1alpha2/apiserversource.go b/vendor/knative.dev/eventing/pkg/client/informers/externalversions/sources/v1alpha2/apiserversource.go index e65221ba86..5e068a974a 100644 --- a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/sources/v1alpha2/apiserversource.go +++ b/vendor/knative.dev/eventing/pkg/client/informers/externalversions/sources/v1alpha2/apiserversource.go @@ -19,6 +19,7 @@ limitations under the License. package v1alpha2 import ( + "context" time "time" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -61,13 +62,13 @@ func NewFilteredApiServerSourceInformer(client versioned.Interface, namespace st if tweakListOptions != nil { tweakListOptions(&options) } - return client.SourcesV1alpha2().ApiServerSources(namespace).List(options) + return client.SourcesV1alpha2().ApiServerSources(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.SourcesV1alpha2().ApiServerSources(namespace).Watch(options) + return client.SourcesV1alpha2().ApiServerSources(namespace).Watch(context.TODO(), options) }, }, &sourcesv1alpha2.ApiServerSource{}, diff --git a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/sources/v1alpha2/containersource.go b/vendor/knative.dev/eventing/pkg/client/informers/externalversions/sources/v1alpha2/containersource.go index 0c25af1ed5..8eb3ec82c9 100644 --- a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/sources/v1alpha2/containersource.go +++ b/vendor/knative.dev/eventing/pkg/client/informers/externalversions/sources/v1alpha2/containersource.go @@ -19,6 +19,7 @@ limitations under the License. package v1alpha2 import ( + "context" time "time" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -61,13 +62,13 @@ func NewFilteredContainerSourceInformer(client versioned.Interface, namespace st if tweakListOptions != nil { tweakListOptions(&options) } - return client.SourcesV1alpha2().ContainerSources(namespace).List(options) + return client.SourcesV1alpha2().ContainerSources(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.SourcesV1alpha2().ContainerSources(namespace).Watch(options) + return client.SourcesV1alpha2().ContainerSources(namespace).Watch(context.TODO(), options) }, }, &sourcesv1alpha2.ContainerSource{}, diff --git a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/sources/v1alpha2/pingsource.go b/vendor/knative.dev/eventing/pkg/client/informers/externalversions/sources/v1alpha2/pingsource.go index d2ab973d69..403ce2b2ef 100644 --- a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/sources/v1alpha2/pingsource.go +++ b/vendor/knative.dev/eventing/pkg/client/informers/externalversions/sources/v1alpha2/pingsource.go @@ -19,6 +19,7 @@ limitations under the License. package v1alpha2 import ( + "context" time "time" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -61,13 +62,13 @@ func NewFilteredPingSourceInformer(client versioned.Interface, namespace string, if tweakListOptions != nil { tweakListOptions(&options) } - return client.SourcesV1alpha2().PingSources(namespace).List(options) + return client.SourcesV1alpha2().PingSources(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.SourcesV1alpha2().PingSources(namespace).Watch(options) + return client.SourcesV1alpha2().PingSources(namespace).Watch(context.TODO(), options) }, }, &sourcesv1alpha2.PingSource{}, diff --git a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/sources/v1alpha2/sinkbinding.go b/vendor/knative.dev/eventing/pkg/client/informers/externalversions/sources/v1alpha2/sinkbinding.go index 39aa655ce9..2470216b64 100644 --- a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/sources/v1alpha2/sinkbinding.go +++ b/vendor/knative.dev/eventing/pkg/client/informers/externalversions/sources/v1alpha2/sinkbinding.go @@ -19,6 +19,7 @@ limitations under the License. package v1alpha2 import ( + "context" time "time" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -61,13 +62,13 @@ func NewFilteredSinkBindingInformer(client versioned.Interface, namespace string if tweakListOptions != nil { tweakListOptions(&options) } - return client.SourcesV1alpha2().SinkBindings(namespace).List(options) + return client.SourcesV1alpha2().SinkBindings(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.SourcesV1alpha2().SinkBindings(namespace).Watch(options) + return client.SourcesV1alpha2().SinkBindings(namespace).Watch(context.TODO(), options) }, }, &sourcesv1alpha2.SinkBinding{}, diff --git a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/sources/v1beta1/apiserversource.go b/vendor/knative.dev/eventing/pkg/client/informers/externalversions/sources/v1beta1/apiserversource.go index 05e8febc2e..171e2926d6 100644 --- a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/sources/v1beta1/apiserversource.go +++ b/vendor/knative.dev/eventing/pkg/client/informers/externalversions/sources/v1beta1/apiserversource.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" time "time" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -61,13 +62,13 @@ func NewFilteredApiServerSourceInformer(client versioned.Interface, namespace st if tweakListOptions != nil { tweakListOptions(&options) } - return client.SourcesV1beta1().ApiServerSources(namespace).List(options) + return client.SourcesV1beta1().ApiServerSources(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.SourcesV1beta1().ApiServerSources(namespace).Watch(options) + return client.SourcesV1beta1().ApiServerSources(namespace).Watch(context.TODO(), options) }, }, &sourcesv1beta1.ApiServerSource{}, diff --git a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/sources/v1beta1/containersource.go b/vendor/knative.dev/eventing/pkg/client/informers/externalversions/sources/v1beta1/containersource.go index f8eec45f0d..e3c095672c 100644 --- a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/sources/v1beta1/containersource.go +++ b/vendor/knative.dev/eventing/pkg/client/informers/externalversions/sources/v1beta1/containersource.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" time "time" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -61,13 +62,13 @@ func NewFilteredContainerSourceInformer(client versioned.Interface, namespace st if tweakListOptions != nil { tweakListOptions(&options) } - return client.SourcesV1beta1().ContainerSources(namespace).List(options) + return client.SourcesV1beta1().ContainerSources(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.SourcesV1beta1().ContainerSources(namespace).Watch(options) + return client.SourcesV1beta1().ContainerSources(namespace).Watch(context.TODO(), options) }, }, &sourcesv1beta1.ContainerSource{}, diff --git a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/sources/v1beta1/pingsource.go b/vendor/knative.dev/eventing/pkg/client/informers/externalversions/sources/v1beta1/pingsource.go index 3092d4fd74..07a2544721 100644 --- a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/sources/v1beta1/pingsource.go +++ b/vendor/knative.dev/eventing/pkg/client/informers/externalversions/sources/v1beta1/pingsource.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" time "time" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -61,13 +62,13 @@ func NewFilteredPingSourceInformer(client versioned.Interface, namespace string, if tweakListOptions != nil { tweakListOptions(&options) } - return client.SourcesV1beta1().PingSources(namespace).List(options) + return client.SourcesV1beta1().PingSources(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.SourcesV1beta1().PingSources(namespace).Watch(options) + return client.SourcesV1beta1().PingSources(namespace).Watch(context.TODO(), options) }, }, &sourcesv1beta1.PingSource{}, diff --git a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/sources/v1beta1/sinkbinding.go b/vendor/knative.dev/eventing/pkg/client/informers/externalversions/sources/v1beta1/sinkbinding.go index ea8045e373..12c1e9ad81 100644 --- a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/sources/v1beta1/sinkbinding.go +++ b/vendor/knative.dev/eventing/pkg/client/informers/externalversions/sources/v1beta1/sinkbinding.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" time "time" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -61,13 +62,13 @@ func NewFilteredSinkBindingInformer(client versioned.Interface, namespace string if tweakListOptions != nil { tweakListOptions(&options) } - return client.SourcesV1beta1().SinkBindings(namespace).List(options) + return client.SourcesV1beta1().SinkBindings(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.SourcesV1beta1().SinkBindings(namespace).Watch(options) + return client.SourcesV1beta1().SinkBindings(namespace).Watch(context.TODO(), options) }, }, &sourcesv1beta1.SinkBinding{}, diff --git a/vendor/knative.dev/eventing/pkg/client/injection/reconciler/eventing/v1/broker/reconciler.go b/vendor/knative.dev/eventing/pkg/client/injection/reconciler/eventing/v1/broker/reconciler.go index d90a8e962c..48f0aaa1b3 100644 --- a/vendor/knative.dev/eventing/pkg/client/injection/reconciler/eventing/v1/broker/reconciler.go +++ b/vendor/knative.dev/eventing/pkg/client/injection/reconciler/eventing/v1/broker/reconciler.go @@ -326,7 +326,7 @@ func (r *reconcilerImpl) updateStatus(ctx context.Context, existing *v1.Broker, getter := r.Client.EventingV1().Brokers(desired.Namespace) - existing, err = getter.Get(desired.Name, metav1.GetOptions{}) + existing, err = getter.Get(ctx, desired.Name, metav1.GetOptions{}) if err != nil { return err } @@ -345,7 +345,7 @@ func (r *reconcilerImpl) updateStatus(ctx context.Context, existing *v1.Broker, updater := r.Client.EventingV1().Brokers(existing.Namespace) - _, err = updater.UpdateStatus(existing) + _, err = updater.UpdateStatus(ctx, existing, metav1.UpdateOptions{}) return err }) } @@ -403,7 +403,7 @@ func (r *reconcilerImpl) updateFinalizersFiltered(ctx context.Context, resource patcher := r.Client.EventingV1().Brokers(resource.Namespace) resourceName := resource.Name - resource, err = patcher.Patch(resourceName, types.MergePatchType, patch) + resource, err = patcher.Patch(ctx, resourceName, types.MergePatchType, patch, metav1.PatchOptions{}) if err != nil { r.Recorder.Eventf(resource, corev1.EventTypeWarning, "FinalizerUpdateFailed", "Failed to update finalizers for %q: %v", resourceName, err) diff --git a/vendor/knative.dev/eventing/pkg/client/injection/reconciler/eventing/v1beta1/broker/reconciler.go b/vendor/knative.dev/eventing/pkg/client/injection/reconciler/eventing/v1beta1/broker/reconciler.go index 2cdb70537d..42cc213fc1 100644 --- a/vendor/knative.dev/eventing/pkg/client/injection/reconciler/eventing/v1beta1/broker/reconciler.go +++ b/vendor/knative.dev/eventing/pkg/client/injection/reconciler/eventing/v1beta1/broker/reconciler.go @@ -326,7 +326,7 @@ func (r *reconcilerImpl) updateStatus(ctx context.Context, existing *v1beta1.Bro getter := r.Client.EventingV1beta1().Brokers(desired.Namespace) - existing, err = getter.Get(desired.Name, metav1.GetOptions{}) + existing, err = getter.Get(ctx, desired.Name, metav1.GetOptions{}) if err != nil { return err } @@ -345,7 +345,7 @@ func (r *reconcilerImpl) updateStatus(ctx context.Context, existing *v1beta1.Bro updater := r.Client.EventingV1beta1().Brokers(existing.Namespace) - _, err = updater.UpdateStatus(existing) + _, err = updater.UpdateStatus(ctx, existing, metav1.UpdateOptions{}) return err }) } @@ -403,7 +403,7 @@ func (r *reconcilerImpl) updateFinalizersFiltered(ctx context.Context, resource patcher := r.Client.EventingV1beta1().Brokers(resource.Namespace) resourceName := resource.Name - resource, err = patcher.Patch(resourceName, types.MergePatchType, patch) + resource, err = patcher.Patch(ctx, resourceName, types.MergePatchType, patch, metav1.PatchOptions{}) if err != nil { r.Recorder.Eventf(resource, v1.EventTypeWarning, "FinalizerUpdateFailed", "Failed to update finalizers for %q: %v", resourceName, err) diff --git a/vendor/knative.dev/eventing/pkg/utils/cache/persisted_store.go b/vendor/knative.dev/eventing/pkg/utils/cache/persisted_store.go index 6644db9f4e..10da00e716 100644 --- a/vendor/knative.dev/eventing/pkg/utils/cache/persisted_store.go +++ b/vendor/knative.dev/eventing/pkg/utils/cache/persisted_store.go @@ -185,7 +185,7 @@ func (p *persistedStore) doSync(stopCh <-chan struct{}) error { if oldconfig, ok := cm.Data[ResourcesKey]; !ok || oldconfig != newconfig { cm.Data[ResourcesKey] = newconfig - _, err = p.kubeClient.CoreV1().ConfigMaps(p.namespace).Update(cm) + _, err = p.kubeClient.CoreV1().ConfigMaps(p.namespace).Update(context.Background(), cm, metav1.UpdateOptions{}) if err != nil { return err @@ -195,7 +195,7 @@ func (p *persistedStore) doSync(stopCh <-chan struct{}) error { } func (p *persistedStore) load() (*corev1.ConfigMap, error) { - cm, err := p.kubeClient.CoreV1().ConfigMaps(p.namespace).Get(p.name, metav1.GetOptions{}) + cm, err := p.kubeClient.CoreV1().ConfigMaps(p.namespace).Get(context.Background(), p.name, metav1.GetOptions{}) if err != nil { if !errors.IsNotFound(err) { return nil, err @@ -216,7 +216,7 @@ func (p *persistedStore) load() (*corev1.ConfigMap, error) { Data: map[string]string{}, } - return p.kubeClient.CoreV1().ConfigMaps(p.namespace).Create(cm) + return p.kubeClient.CoreV1().ConfigMaps(p.namespace).Create(context.Background(), cm, metav1.CreateOptions{}) } return cm, nil diff --git a/vendor/knative.dev/eventing/pkg/utils/secret.go b/vendor/knative.dev/eventing/pkg/utils/secret.go index 0d74567ad6..26e24ce37f 100644 --- a/vendor/knative.dev/eventing/pkg/utils/secret.go +++ b/vendor/knative.dev/eventing/pkg/utils/secret.go @@ -17,6 +17,7 @@ limitations under the License. package utils import ( + "context" "errors" "fmt" @@ -38,7 +39,7 @@ func CopySecret(corev1Input clientcorev1.CoreV1Interface, srcNS string, srcSecre tgtNamespaceSecrets := corev1Input.Secrets(tgtNS) // First try to find the secret we're supposed to copy - srcSecret, err := srcSecrets.Get(srcSecretName, metav1.GetOptions{}) + srcSecret, err := srcSecrets.Get(context.Background(), srcSecretName, metav1.GetOptions{}) if err != nil { return nil, err } @@ -50,21 +51,23 @@ func CopySecret(corev1Input clientcorev1.CoreV1Interface, srcNS string, srcSecre // Found the secret, so now make a copy in our new namespace newSecret, err := tgtNamespaceSecrets.Create( + context.Background(), &corev1.Secret{ ObjectMeta: metav1.ObjectMeta{ Name: srcSecretName, }, Data: srcSecret.Data, Type: srcSecret.Type, - }) + }, + metav1.CreateOptions{}) // If the secret already exists then that's ok - may have already been created if err != nil && !apierrs.IsAlreadyExists(err) { return nil, fmt.Errorf("error copying the Secret: %s", err) } - _, err = tgtNamespaceSvcAcct.Patch(svcAccount, types.StrategicMergePatchType, - []byte(`{"imagePullSecrets":[{"name":"`+srcSecretName+`"}]}`)) + _, err = tgtNamespaceSvcAcct.Patch(context.Background(), svcAccount, types.StrategicMergePatchType, + []byte(`{"imagePullSecrets":[{"name":"`+srcSecretName+`"}]}`), metav1.PatchOptions{}) if err != nil { return nil, fmt.Errorf("patch failed on NS/SA (%s/%s): %s", tgtNS, srcSecretName, err) diff --git a/vendor/knative.dev/eventing/test/conformance/helpers/broker_control_plane_test_helper.go b/vendor/knative.dev/eventing/test/conformance/helpers/broker_control_plane_test_helper.go index c9a975fded..6c309fe6c7 100644 --- a/vendor/knative.dev/eventing/test/conformance/helpers/broker_control_plane_test_helper.go +++ b/vendor/knative.dev/eventing/test/conformance/helpers/broker_control_plane_test_helper.go @@ -17,6 +17,7 @@ limitations under the License. package helpers import ( + "context" "testing" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -83,7 +84,7 @@ func triggerV1Beta1BeforeBrokerHelper(triggerName string, client *testlib.Client logPod := resources.EventRecordPod(loggerPodName) client.CreatePodOrFail(logPod, testlib.WithService(loggerPodName)) - client.WaitForAllTestResourcesReadyOrFail() // Can't do this for the trigger because it's not 'ready' yet + client.WaitForAllTestResourcesReadyOrFail(context.Background()) // Can't do this for the trigger because it's not 'ready' yet client.CreateTriggerOrFailV1Beta1(triggerName, resources.WithAttributesTriggerFilterV1Beta1(eventingv1beta1.TriggerAnyFilter, etLogger, map[string]interface{}{}), resources.WithSubscriberServiceRefForTriggerV1Beta1(loggerPodName), @@ -121,12 +122,12 @@ func triggerV1Beta1ReadyBrokerReadyHelper(triggerName, brokerName string, client func triggerV1Beta1ReadyAfterBrokerIncludesSubURI(t *testing.T, triggerName, brokerName string, client *testlib.Client) { err := reconciler.RetryUpdateConflicts(func(attempts int) (err error) { - tr, err := client.Eventing.EventingV1beta1().Triggers(client.Namespace).Get(triggerName, metav1.GetOptions{}) + tr, err := client.Eventing.EventingV1beta1().Triggers(client.Namespace).Get(context.Background(), triggerName, metav1.GetOptions{}) if err != nil { t.Fatalf("Error: Could not get trigger %s: %v", triggerName, err) } tr.Spec.Broker = brokerName - _, e := client.Eventing.EventingV1beta1().Triggers(client.Namespace).Update(tr) + _, e := client.Eventing.EventingV1beta1().Triggers(client.Namespace).Update(context.Background(), tr, metav1.UpdateOptions{}) return e }) if err != nil { @@ -135,7 +136,7 @@ func triggerV1Beta1ReadyAfterBrokerIncludesSubURI(t *testing.T, triggerName, bro client.WaitForResourceReadyOrFail(triggerName, testlib.TriggerTypeMeta) - tr, err := client.Eventing.EventingV1beta1().Triggers(client.Namespace).Get(triggerName, metav1.GetOptions{}) + tr, err := client.Eventing.EventingV1beta1().Triggers(client.Namespace).Get(context.Background(), triggerName, metav1.GetOptions{}) if err != nil { t.Fatalf("Error: Could not get trigger %s: %v", triggerName, err) } @@ -146,7 +147,7 @@ func triggerV1Beta1ReadyAfterBrokerIncludesSubURI(t *testing.T, triggerName, bro func triggerV1Beta1ReadyIncludesSubURI(t *testing.T, triggerName string, client *testlib.Client) { client.WaitForResourceReadyOrFail(triggerName, testlib.TriggerTypeMeta) - tr, err := client.Eventing.EventingV1beta1().Triggers(client.Namespace).Get(triggerName, metav1.GetOptions{}) + tr, err := client.Eventing.EventingV1beta1().Triggers(client.Namespace).Get(context.Background(), triggerName, metav1.GetOptions{}) if err != nil { t.Fatalf("Error: Could not get trigger %s: %v", triggerName, err) } diff --git a/vendor/knative.dev/eventing/test/conformance/helpers/broker_data_plane_test_helper.go b/vendor/knative.dev/eventing/test/conformance/helpers/broker_data_plane_test_helper.go index d58476c0f3..6dcc47142d 100644 --- a/vendor/knative.dev/eventing/test/conformance/helpers/broker_data_plane_test_helper.go +++ b/vendor/knative.dev/eventing/test/conformance/helpers/broker_data_plane_test_helper.go @@ -17,6 +17,7 @@ limitations under the License. package helpers import ( + "context" "fmt" "testing" @@ -37,7 +38,7 @@ var podMeta = metav1.TypeMeta{ APIVersion: "v1", } -func BrokerDataPlaneSetupHelper(client *testlib.Client, brokerClass string, brokerTestRunner testlib.ComponentsTestRunner) *eventingv1beta1.Broker { +func BrokerDataPlaneSetupHelper(ctx context.Context, client *testlib.Client, brokerClass string, brokerTestRunner testlib.ComponentsTestRunner) *eventingv1beta1.Broker { var broker *eventingv1beta1.Broker var err error brokerName := brokerTestRunner.ComponentName @@ -53,17 +54,17 @@ func BrokerDataPlaneSetupHelper(client *testlib.Client, brokerClass string, brok ) client.WaitForResourceReadyOrFail(broker.Name, testlib.BrokerTypeMeta) } else { - if broker, err = client.Eventing.EventingV1beta1().Brokers(brokerNamespace).Get(brokerName, metav1.GetOptions{}); err != nil { + if broker, err = client.Eventing.EventingV1beta1().Brokers(brokerNamespace).Get(ctx, brokerName, metav1.GetOptions{}); err != nil { client.T.Fatalf("Could not Get broker %s/%s: %v", brokerNamespace, brokerName, err) } } return broker } -func BrokerDataPlaneNamespaceSetupOption(namespace string) testlib.SetupClientOption { +func BrokerDataPlaneNamespaceSetupOption(ctx context.Context, namespace string) testlib.SetupClientOption { return func(client *testlib.Client) { if namespace != "" { - client.Kube.Kube.CoreV1().Namespaces().Delete(client.Namespace, nil) + client.Kube.Kube.CoreV1().Namespaces().Delete(ctx, client.Namespace, metav1.DeleteOptions{}) client.Namespace = namespace } } @@ -76,6 +77,7 @@ func BrokerDataPlaneNamespaceSetupOption(namespace string) testlib.SetupClientOp //Respond with 400 on bad CE //Reject non-POST requests to publish URI func BrokerV1Beta1IngressDataPlaneTestHelper( + ctx context.Context, t *testing.T, brokerClass string, brokerTestRunner testlib.ComponentsTestRunner, @@ -84,11 +86,11 @@ func BrokerV1Beta1IngressDataPlaneTestHelper( client := testlib.Setup(t, false, options...) defer testlib.TearDown(client) - broker := BrokerDataPlaneSetupHelper(client, brokerClass, brokerTestRunner) + broker := BrokerDataPlaneSetupHelper(ctx, client, brokerClass, brokerTestRunner) triggerName := "trigger" loggerName := "logger-pod" - eventTracker, _ := recordevents.StartEventRecordOrFail(client, loggerName) - client.WaitForAllTestResourcesReadyOrFail() + eventTracker, _ := recordevents.StartEventRecordOrFail(ctx, client, loggerName) + client.WaitForAllTestResourcesReadyOrFail(ctx) trigger := client.CreateTriggerOrFailV1Beta1( triggerName, @@ -112,7 +114,7 @@ func BrokerV1Beta1IngressDataPlaneTestHelper( event.Context.AsV03() event.SetSpecVersion("0.3") senderName := "v03-test-sender" - client.SendEventToAddressable(senderName, broker.Name, testlib.BrokerTypeMeta, event, sender.WithEncoding(ce.EncodingStructured)) + client.SendEventToAddressable(ctx, senderName, broker.Name, testlib.BrokerTypeMeta, event, sender.WithEncoding(ce.EncodingStructured)) originalEventMatcher := recordevents.MatchEvent(cetest.AllOf( cetest.HasId(eventID), cetest.HasSpecVersion("0.3"), @@ -133,7 +135,7 @@ func BrokerV1Beta1IngressDataPlaneTestHelper( } senderName := "v10-test-sender" - client.SendEventToAddressable(senderName, broker.Name, testlib.BrokerTypeMeta, event, sender.WithEncoding(ce.EncodingStructured)) + client.SendEventToAddressable(ctx, senderName, broker.Name, testlib.BrokerTypeMeta, event, sender.WithEncoding(ce.EncodingStructured)) originalEventMatcher := recordevents.MatchEvent(cetest.AllOf( cetest.HasId(eventID), cetest.HasSpecVersion("1.0"), @@ -154,7 +156,7 @@ func BrokerV1Beta1IngressDataPlaneTestHelper( t.Fatalf("Cannot set the payload of the event: %s", err.Error()) } senderName := "structured-test-sender" - client.SendEventToAddressable(senderName, broker.Name, testlib.BrokerTypeMeta, event, sender.WithEncoding(ce.EncodingStructured)) + client.SendEventToAddressable(ctx, senderName, broker.Name, testlib.BrokerTypeMeta, event, sender.WithEncoding(ce.EncodingStructured)) originalEventMatcher := recordevents.MatchEvent(cetest.AllOf( cetest.HasId(eventID), )) @@ -173,7 +175,7 @@ func BrokerV1Beta1IngressDataPlaneTestHelper( t.Fatalf("Cannot set the payload of the event: %s", err.Error()) } senderName := "binary-test-sender" - client.SendEventToAddressable(senderName, broker.Name, testlib.BrokerTypeMeta, event, sender.WithEncoding(ce.EncodingBinary)) + client.SendEventToAddressable(ctx, senderName, broker.Name, testlib.BrokerTypeMeta, event, sender.WithEncoding(ce.EncodingBinary)) originalEventMatcher := recordevents.MatchEvent(cetest.AllOf( cetest.HasId(eventID), )) @@ -186,7 +188,7 @@ func BrokerV1Beta1IngressDataPlaneTestHelper( body := fmt.Sprintf(`{"msg":%q}`, eventID) responseSink := "http://" + client.GetServiceHost(loggerName) senderName := "twohundred-test-sender" - client.SendRequestToAddressable(senderName, broker.Name, testlib.BrokerTypeMeta, + client.SendRequestToAddressable(ctx, senderName, broker.Name, testlib.BrokerTypeMeta, map[string]string{ "ce-specversion": "1.0", "ce-type": testlib.DefaultEventType, @@ -207,7 +209,7 @@ func BrokerV1Beta1IngressDataPlaneTestHelper( body := ";la}{kjsdf;oai2095{}{}8234092349807asdfashdf" responseSink := "http://" + client.GetServiceHost(loggerName) senderName := "fourhundres-test-sender" - client.SendRequestToAddressable(senderName, broker.Name, testlib.BrokerTypeMeta, + client.SendRequestToAddressable(ctx, senderName, broker.Name, testlib.BrokerTypeMeta, map[string]string{ "ce-specversion": "9000.1", //its over 9,000! "ce-type": testlib.DefaultEventType, @@ -232,6 +234,7 @@ func BrokerV1Beta1IngressDataPlaneTestHelper( //Replies are accepted and delivered //Replies that are unsuccessfully forwarded cause initial message to be redelivered (Very difficult to test, can be ignored) func BrokerV1Beta1ConsumerDataPlaneTestHelper( + ctx context.Context, t *testing.T, brokerClass string, brokerTestRunner testlib.ComponentsTestRunner, @@ -240,7 +243,7 @@ func BrokerV1Beta1ConsumerDataPlaneTestHelper( client := testlib.Setup(t, false, options...) defer testlib.TearDown(client) - broker := BrokerDataPlaneSetupHelper(client, brokerClass, brokerTestRunner) + broker := BrokerDataPlaneSetupHelper(ctx, client, brokerClass, brokerTestRunner) triggerName := "trigger" secondTriggerName := "second-trigger" @@ -250,8 +253,8 @@ func BrokerV1Beta1ConsumerDataPlaneTestHelper( replySource := "origin-for-reply" eventID := "consumer-broker-tests" baseSource := "consumer-test-sender" - eventTracker, _ := recordevents.StartEventRecordOrFail(client, loggerName) - secondTracker, _ := recordevents.StartEventRecordOrFail(client, secondLoggerName) + eventTracker, _ := recordevents.StartEventRecordOrFail(ctx, client, loggerName) + secondTracker, _ := recordevents.StartEventRecordOrFail(ctx, client, secondLoggerName) baseEvent := ce.NewEvent() baseEvent.SetID(eventID) @@ -271,7 +274,7 @@ func BrokerV1Beta1ConsumerDataPlaneTestHelper( transformMsg, ) client.CreatePodOrFail(transformPod, testlib.WithService(transformerName)) - client.WaitForAllTestResourcesReadyOrFail() + client.WaitForAllTestResourcesReadyOrFail(ctx) trigger := client.CreateTriggerOrFailV1Beta1( triggerName, @@ -310,7 +313,7 @@ func BrokerV1Beta1ConsumerDataPlaneTestHelper( event.SetID(source) event.Context = event.Context.AsV03() senderName := source + "-sender" - client.SendEventToAddressable(senderName, broker.Name, testlib.BrokerTypeMeta, event, sender.WithEncoding(ce.EncodingStructured)) + client.SendEventToAddressable(ctx, senderName, broker.Name, testlib.BrokerTypeMeta, event, sender.WithEncoding(ce.EncodingStructured)) originalEventMatcher := recordevents.MatchEvent(cetest.AllOf( cetest.HasSpecVersion("0.3"), cetest.HasId("no-upgrade"), @@ -325,7 +328,7 @@ func BrokerV1Beta1ConsumerDataPlaneTestHelper( id := "identical-attributes" event.SetID(id) senderName := id + "-sender" - client.SendEventToAddressable(senderName, broker.Name, testlib.BrokerTypeMeta, event, sender.WithEncoding(ce.EncodingStructured)) + client.SendEventToAddressable(ctx, senderName, broker.Name, testlib.BrokerTypeMeta, event, sender.WithEncoding(ce.EncodingStructured)) originalEventMatcher := recordevents.MatchEvent( cetest.HasId(id), cetest.HasType(testlib.DefaultEventType), @@ -343,8 +346,8 @@ func BrokerV1Beta1ConsumerDataPlaneTestHelper( secondEvent := baseEvent firstSenderName := "first-" + source + "-sender" secondSenderName := "second-" + source + "-sender" - client.SendEventToAddressable(firstSenderName, broker.Name, testlib.BrokerTypeMeta, event, sender.WithEncoding(ce.EncodingStructured)) - client.SendEventToAddressable(secondSenderName, broker.Name, testlib.BrokerTypeMeta, secondEvent, sender.WithEncoding(ce.EncodingStructured)) + client.SendEventToAddressable(ctx, firstSenderName, broker.Name, testlib.BrokerTypeMeta, event, sender.WithEncoding(ce.EncodingStructured)) + client.SendEventToAddressable(ctx, secondSenderName, broker.Name, testlib.BrokerTypeMeta, secondEvent, sender.WithEncoding(ce.EncodingStructured)) filteredEventMatcher := recordevents.MatchEvent( cetest.HasSource(source), ) @@ -362,7 +365,7 @@ func BrokerV1Beta1ConsumerDataPlaneTestHelper( source := "filtered-event" event.SetSource(source) senderName := source + "-sender" - client.SendEventToAddressable(senderName, broker.Name, testlib.BrokerTypeMeta, event, sender.WithEncoding(ce.EncodingStructured)) + client.SendEventToAddressable(ctx, senderName, broker.Name, testlib.BrokerTypeMeta, event, sender.WithEncoding(ce.EncodingStructured)) filteredEventMatcher := recordevents.MatchEvent( cetest.HasSource(source), ) @@ -376,7 +379,7 @@ func BrokerV1Beta1ConsumerDataPlaneTestHelper( source := "delivery-check" event.SetSource(source) senderName := source + "-sender" - client.SendEventToAddressable(senderName, broker.Name, testlib.BrokerTypeMeta, event, sender.WithEncoding(ce.EncodingStructured)) + client.SendEventToAddressable(ctx, senderName, broker.Name, testlib.BrokerTypeMeta, event, sender.WithEncoding(ce.EncodingStructured)) originalEventMatcher := recordevents.MatchEvent( cetest.HasSource(source), ) @@ -388,10 +391,10 @@ func BrokerV1Beta1ConsumerDataPlaneTestHelper( event := baseEvent event.SetSource(replySource) senderName := replySource + "-sender" - client.WaitForServiceEndpointsOrFail(transformerName, 1) + client.WaitForServiceEndpointsOrFail(ctx, transformerName, 1) client.WaitForResourceReadyOrFail(transformTrigger.Name, testlib.TriggerTypeMeta) client.WaitForResourceReadyOrFail(replyTrigger.Name, testlib.TriggerTypeMeta) - client.SendEventToAddressable(senderName, broker.Name, testlib.BrokerTypeMeta, event, sender.WithEncoding(ce.EncodingStructured)) + client.SendEventToAddressable(ctx, senderName, broker.Name, testlib.BrokerTypeMeta, event, sender.WithEncoding(ce.EncodingStructured)) transformedEventMatcher := recordevents.MatchEvent( cetest.HasSource("reply-check-source"), cetest.HasType("reply-check-type"), diff --git a/vendor/knative.dev/eventing/test/conformance/helpers/broker_tracing_test_helper.go b/vendor/knative.dev/eventing/test/conformance/helpers/broker_tracing_test_helper.go index 597a2c6884..19b12be797 100644 --- a/vendor/knative.dev/eventing/test/conformance/helpers/broker_tracing_test_helper.go +++ b/vendor/knative.dev/eventing/test/conformance/helpers/broker_tracing_test_helper.go @@ -17,6 +17,7 @@ limitations under the License. package helpers import ( + "context" "fmt" "testing" @@ -36,13 +37,14 @@ import ( // BrokerTracingTestHelperWithChannelTestRunner runs the Broker tracing tests for all Channels in // the ComponentsTestRunner. func BrokerTracingTestHelperWithChannelTestRunner( + ctx context.Context, t *testing.T, brokerClass string, channelTestRunner testlib.ComponentsTestRunner, setupClient testlib.SetupClientOption, ) { channelTestRunner.RunTests(t, testlib.FeatureBasic, func(t *testing.T, channel metav1.TypeMeta) { - tracingTest(t, setupClient, setupBrokerTracing(brokerClass), channel) + tracingTest(ctx, t, setupClient, setupBrokerTracing(ctx, brokerClass), channel) }) } @@ -53,7 +55,7 @@ func BrokerTracingTestHelperWithChannelTestRunner( // 4. Sender Pod which sends a 'foo' event. // It returns a string that is expected to be sent by the SendEvents Pod and should be present in // the LogEvents Pod logs. -func setupBrokerTracing(brokerClass string) SetupTracingTestInfrastructureFunc { +func setupBrokerTracing(ctx context.Context, brokerClass string) SetupTracingTestInfrastructureFunc { const ( etTransformer = "transformer" etLogger = "logger" @@ -62,6 +64,7 @@ func setupBrokerTracing(brokerClass string) SetupTracingTestInfrastructureFunc { eventBody = `{"msg":"TestBrokerTracing event-1"}` ) return func( + ctx context.Context, t *testing.T, channel *metav1.TypeMeta, client *testlib.Client, @@ -108,7 +111,7 @@ func setupBrokerTracing(brokerClass string) SetupTracingTestInfrastructureFunc { ) // Wait for all test resources to be ready, so that we can start sending events. - client.WaitForAllTestResourcesReadyOrFail() + client.WaitForAllTestResourcesReadyOrFail(ctx) // Everything is setup to receive an event. Generate a CloudEvent. event := cloudevents.NewEvent() @@ -121,9 +124,9 @@ func setupBrokerTracing(brokerClass string) SetupTracingTestInfrastructureFunc { // Send the CloudEvent (either with or without tracing inside the SendEvents Pod). if senderPublishTrace { - client.SendEventToAddressable(senderName, broker.Name, testlib.BrokerTypeMeta, event, sender.EnableTracing()) + client.SendEventToAddressable(ctx, senderName, broker.Name, testlib.BrokerTypeMeta, event, sender.EnableTracing()) } else { - client.SendEventToAddressable(senderName, broker.Name, testlib.BrokerTypeMeta, event) + client.SendEventToAddressable(ctx, senderName, broker.Name, testlib.BrokerTypeMeta, event) } domain := utils.GetClusterDomainName() diff --git a/vendor/knative.dev/eventing/test/conformance/helpers/channel_addressable_resolver_cluster_role_test_helper.go b/vendor/knative.dev/eventing/test/conformance/helpers/channel_addressable_resolver_cluster_role_test_helper.go index 99373f156d..d55584513f 100644 --- a/vendor/knative.dev/eventing/test/conformance/helpers/channel_addressable_resolver_cluster_role_test_helper.go +++ b/vendor/knative.dev/eventing/test/conformance/helpers/channel_addressable_resolver_cluster_role_test_helper.go @@ -17,6 +17,7 @@ limitations under the License. package helpers import ( + "context" "testing" "fmt" @@ -50,7 +51,7 @@ func TestChannelAddressableResolverClusterRoleTestRunner( aggregationClusterRoleName, saName+"-cluster-role-binding", ) - client.WaitForAllTestResourcesReadyOrFail() + client.WaitForAllTestResourcesReadyOrFail(context.Background()) for _, verb := range permissionTestCaseVerbs { t.Run(fmt.Sprintf("AddressableResolverClusterRole can do %s on %s", verb, gvr), func(t *testing.T) { diff --git a/vendor/knative.dev/eventing/test/conformance/helpers/channel_channelable_manipulator_cluster_role_test_helper.go b/vendor/knative.dev/eventing/test/conformance/helpers/channel_channelable_manipulator_cluster_role_test_helper.go index edc0b986cd..7c4ad1286e 100644 --- a/vendor/knative.dev/eventing/test/conformance/helpers/channel_channelable_manipulator_cluster_role_test_helper.go +++ b/vendor/knative.dev/eventing/test/conformance/helpers/channel_channelable_manipulator_cluster_role_test_helper.go @@ -17,6 +17,7 @@ limitations under the License. package helpers import ( + "context" "testing" "fmt" @@ -29,6 +30,7 @@ import ( ) func TestChannelChannelableManipulatorClusterRoleTestRunner( + ctx context.Context, t *testing.T, channelTestRunner testlib.ComponentsTestRunner, options ...testlib.SetupClientOption, @@ -50,7 +52,7 @@ func TestChannelChannelableManipulatorClusterRoleTestRunner( aggregationClusterRoleName, saName+"-cluster-role-binding", ) - client.WaitForAllTestResourcesReadyOrFail() + client.WaitForAllTestResourcesReadyOrFail(ctx) // From spec: (...) ClusterRole MUST include permissions to create, get, list, watch, patch, // and update the CRD's custom objects and their status. diff --git a/vendor/knative.dev/eventing/test/conformance/helpers/channel_data_plane_helper.go b/vendor/knative.dev/eventing/test/conformance/helpers/channel_data_plane_helper.go index c5d4a6053b..e806c31b02 100644 --- a/vendor/knative.dev/eventing/test/conformance/helpers/channel_data_plane_helper.go +++ b/vendor/knative.dev/eventing/test/conformance/helpers/channel_data_plane_helper.go @@ -17,6 +17,7 @@ limitations under the License. package helpers import ( + "context" "fmt" "net/http" "strconv" @@ -36,6 +37,7 @@ import ( // ChannelDataPlaneSuccessTestRunner tests the support of the channel ingress for different spec versions and message modes func ChannelDataPlaneSuccessTestRunner( + ctx context.Context, t *testing.T, channelTestRunner testlib.ComponentsTestRunner, options ...testlib.SetupClientOption, @@ -60,14 +62,14 @@ func ChannelDataPlaneSuccessTestRunner( channelTestRunner.RunTests(t, testlib.FeatureBasic, func(t *testing.T, channel metav1.TypeMeta) { for _, tc := range testCases { t.Run(tc.event.ID()+"_encoding_"+tc.encoding.String()+"_version_"+tc.version, func(t *testing.T) { - channelDataPlaneSuccessTest(t, channel, tc.event, tc.encoding, tc.version, options...) + channelDataPlaneSuccessTest(ctx, t, channel, tc.event, tc.encoding, tc.version, options...) }) } }) } // Sender -> Channel -> Subscriber -> Record Events -func channelDataPlaneSuccessTest(t *testing.T, channel metav1.TypeMeta, event cloudevents.Event, encoding cloudevents.Encoding, version string, options ...testlib.SetupClientOption) { +func channelDataPlaneSuccessTest(ctx context.Context, t *testing.T, channel metav1.TypeMeta, event cloudevents.Event, encoding cloudevents.Encoding, version string, options ...testlib.SetupClientOption) { client := testlib.Setup(t, true, options...) defer testlib.TearDown(client) @@ -77,7 +79,7 @@ func channelDataPlaneSuccessTest(t *testing.T, channel metav1.TypeMeta, event cl client.CreateChannelOrFail(channelName, &channel) subscriberName := resourcesNamePrefix + "-recordevents" - eventTracker, _ := recordevents.StartEventRecordOrFail(client, subscriberName) + eventTracker, _ := recordevents.StartEventRecordOrFail(ctx, client, subscriberName) client.CreateSubscriptionOrFail( resourcesNamePrefix+"-sub", @@ -86,7 +88,7 @@ func channelDataPlaneSuccessTest(t *testing.T, channel metav1.TypeMeta, event cl resources.WithSubscriberForSubscription(subscriberName), ) - client.WaitForAllTestResourcesReadyOrFail() + client.WaitForAllTestResourcesReadyOrFail(ctx) switch version { case cloudevents.VersionV1: @@ -96,6 +98,7 @@ func channelDataPlaneSuccessTest(t *testing.T, channel metav1.TypeMeta, event cl } client.SendEventToAddressable( + ctx, resourcesNamePrefix+"-sender", channelName, &channel, @@ -140,6 +143,7 @@ func channelDataPlaneSuccessTest(t *testing.T, channel metav1.TypeMeta, event cl // ChannelDataPlaneFailureTestRunner tests some status codes from the spec func ChannelDataPlaneFailureTestRunner( + ctx context.Context, t *testing.T, channelTestRunner testlib.ComponentsTestRunner, options ...testlib.SetupClientOption, @@ -152,6 +156,7 @@ func ChannelDataPlaneFailureTestRunner( statusCode: http.StatusMethodNotAllowed, senderFn: func(c *testlib.Client, senderName string, channelName string, channel metav1.TypeMeta, eventId string, responseSink string) { c.SendRequestToAddressable( + ctx, senderName, channelName, &channel, @@ -171,6 +176,7 @@ func ChannelDataPlaneFailureTestRunner( statusCode: http.StatusBadRequest, senderFn: func(c *testlib.Client, senderName string, channelName string, channel metav1.TypeMeta, eventId string, responseSink string) { c.SendRequestToAddressable( + ctx, senderName, channelName, &channel, @@ -190,7 +196,7 @@ func ChannelDataPlaneFailureTestRunner( channelTestRunner.RunTests(t, testlib.FeatureBasic, func(t *testing.T, channel metav1.TypeMeta) { for _, tc := range testCases { t.Run("expecting-"+strconv.Itoa(tc.statusCode), func(t *testing.T) { - channelDataPlaneFailureTest(t, channel, tc.senderFn, tc.statusCode, options...) + channelDataPlaneFailureTest(ctx, t, channel, tc.senderFn, tc.statusCode, options...) }) } }) @@ -198,6 +204,7 @@ func ChannelDataPlaneFailureTestRunner( // (Request) Sender -> Channel -> Subscriber -> Record Events func channelDataPlaneFailureTest( + ctx context.Context, t *testing.T, channel metav1.TypeMeta, senderFn func(c *testlib.Client, senderName string, channelName string, channel metav1.TypeMeta, eventId string, responseSink string), @@ -213,7 +220,7 @@ func channelDataPlaneFailureTest( client.CreateChannelOrFail(channelName, &channel) subscriberName := resourcesNamePrefix + "-recordevents" - eventTracker, _ := recordevents.StartEventRecordOrFail(client, subscriberName) + eventTracker, _ := recordevents.StartEventRecordOrFail(ctx, client, subscriberName) client.CreateSubscriptionOrFail( resourcesNamePrefix+"-sub", @@ -222,7 +229,7 @@ func channelDataPlaneFailureTest( resources.WithSubscriberForSubscription(subscriberName), ) - client.WaitForAllTestResourcesReadyOrFail() + client.WaitForAllTestResourcesReadyOrFail(ctx) eventId := "xyz" senderFn(client, resourcesNamePrefix+"-sender", channelName, channel, eventId, "http://"+client.GetServiceHost(subscriberName)) diff --git a/vendor/knative.dev/eventing/test/conformance/helpers/channel_header_single_event_helper.go b/vendor/knative.dev/eventing/test/conformance/helpers/channel_header_single_event_helper.go index 615414d16a..de3061c9fb 100644 --- a/vendor/knative.dev/eventing/test/conformance/helpers/channel_header_single_event_helper.go +++ b/vendor/knative.dev/eventing/test/conformance/helpers/channel_header_single_event_helper.go @@ -17,6 +17,7 @@ limitations under the License. package helpers import ( + "context" "fmt" "testing" @@ -40,6 +41,7 @@ EventSource ---> Channel ---> Subscription ---> Service(Logger) // SingleEventWithKnativeHeaderHelperForChannelTestHelper is the helper function for header_test func SingleEventWithKnativeHeaderHelperForChannelTestHelper( + ctx context.Context, t *testing.T, encoding cloudevents.Encoding, channelTestRunner testlib.ComponentsTestRunner, @@ -60,7 +62,7 @@ func SingleEventWithKnativeHeaderHelperForChannelTestHelper( client.CreateChannelOrFail(channelName, &channel) // create logger service as the subscriber - eventTracker, _ := recordevents.StartEventRecordOrFail(client, recordEventsPodName) + eventTracker, _ := recordevents.StartEventRecordOrFail(ctx, client, recordEventsPodName) // create subscription to subscribe the channel, and forward the received events to the logger service client.CreateSubscriptionOrFail( subscriptionName, @@ -70,7 +72,7 @@ func SingleEventWithKnativeHeaderHelperForChannelTestHelper( ) // wait for all test resources to be ready, so that we can start sending events - client.WaitForAllTestResourcesReadyOrFail() + client.WaitForAllTestResourcesReadyOrFail(ctx) // send CloudEvent to the channel eventID := uuid.New().String() @@ -85,6 +87,7 @@ func SingleEventWithKnativeHeaderHelperForChannelTestHelper( st.Logf("Sending event with knative headers to %s", senderName) client.SendEventToAddressable( + ctx, senderName, channelName, &channel, diff --git a/vendor/knative.dev/eventing/test/conformance/helpers/channel_spec_test_helper.go b/vendor/knative.dev/eventing/test/conformance/helpers/channel_spec_test_helper.go index 9fe8a0f161..2c13d15eaf 100644 --- a/vendor/knative.dev/eventing/test/conformance/helpers/channel_spec_test_helper.go +++ b/vendor/knative.dev/eventing/test/conformance/helpers/channel_spec_test_helper.go @@ -17,6 +17,7 @@ limitations under the License. package helpers import ( + "context" "testing" "encoding/json" @@ -120,7 +121,7 @@ func channelSpecAllowsSubscribersArray(st *testing.T, client *testlib.Client, ch } err = client.RetryWebhookErrors(func(attempt int) error { - _, e := client.Dynamic.Resource(gvr).Namespace(client.Namespace).Update(u, metav1.UpdateOptions{}) + _, e := client.Dynamic.Resource(gvr).Namespace(client.Namespace).Update(context.Background(), u, metav1.UpdateOptions{}) if e != nil { client.T.Logf("Failed to update channel spec at attempt %d %q %q: %v", attempt, channel.Kind, channelName, e) } diff --git a/vendor/knative.dev/eventing/test/conformance/helpers/channel_status_subscriber_test_helper.go b/vendor/knative.dev/eventing/test/conformance/helpers/channel_status_subscriber_test_helper.go index 21f0bfa1c4..d148e26d68 100644 --- a/vendor/knative.dev/eventing/test/conformance/helpers/channel_status_subscriber_test_helper.go +++ b/vendor/knative.dev/eventing/test/conformance/helpers/channel_status_subscriber_test_helper.go @@ -17,6 +17,7 @@ limitations under the License. package helpers import ( + "context" "testing" duckv1 "knative.dev/eventing/pkg/apis/duck/v1" @@ -32,6 +33,7 @@ import ( // ChannelStatusSubscriberTestHelperWithChannelTestRunner runs the tests of // subscriber field of status for all Channels in the ComponentsTestRunner. func ChannelStatusSubscriberTestHelperWithChannelTestRunner( + ctx context.Context, t *testing.T, channelTestRunner testlib.ComponentsTestRunner, options ...testlib.SetupClientOption, @@ -42,12 +44,12 @@ func ChannelStatusSubscriberTestHelperWithChannelTestRunner( defer testlib.TearDown(client) t.Run("Channel has required status subscriber fields", func(t *testing.T) { - channelHasRequiredSubscriberStatus(st, client, channel, options...) + channelHasRequiredSubscriberStatus(ctx, st, client, channel, options...) }) }) } -func channelHasRequiredSubscriberStatus(st *testing.T, client *testlib.Client, channel metav1.TypeMeta, options ...testlib.SetupClientOption) { +func channelHasRequiredSubscriberStatus(ctx context.Context, st *testing.T, client *testlib.Client, channel metav1.TypeMeta, options ...testlib.SetupClientOption) { st.Logf("Running channel subscriber status conformance test with channel %q", channel) channelName := "channel-req-status-subscriber" @@ -68,7 +70,7 @@ func channelHasRequiredSubscriberStatus(st *testing.T, client *testlib.Client, c ) // wait for all test resources to be ready, so that we can start sending events - client.WaitForAllTestResourcesReadyOrFail() + client.WaitForAllTestResourcesReadyOrFail(ctx) dtsv, err := getChannelDuckTypeSupportVersion(channelName, client, &channel) if err != nil { diff --git a/vendor/knative.dev/eventing/test/conformance/helpers/channel_tracing_test_helper.go b/vendor/knative.dev/eventing/test/conformance/helpers/channel_tracing_test_helper.go index 2447971b1c..49888b3be0 100644 --- a/vendor/knative.dev/eventing/test/conformance/helpers/channel_tracing_test_helper.go +++ b/vendor/knative.dev/eventing/test/conformance/helpers/channel_tracing_test_helper.go @@ -17,6 +17,7 @@ limitations under the License. package helpers import ( + "context" "fmt" "testing" @@ -35,12 +36,13 @@ import ( // ChannelTracingTestHelperWithChannelTestRunner runs the Channel tracing tests for all Channels in // the ComponentsTestRunner. func ChannelTracingTestHelperWithChannelTestRunner( + ctx context.Context, t *testing.T, channelTestRunner testlib.ComponentsTestRunner, setupClient testlib.SetupClientOption, ) { channelTestRunner.RunTests(t, testlib.FeatureBasic, func(t *testing.T, channel metav1.TypeMeta) { - tracingTest(t, setupClient, setupChannelTracingWithReply, channel) + tracingTest(ctx, t, setupClient, setupChannelTracingWithReply, channel) }) } @@ -51,6 +53,7 @@ func ChannelTracingTestHelperWithChannelTestRunner( // It returns the expected trace tree and a match function that is expected to be sent // by the SendEvents Pod and should be present in the RecordEvents list of events. func setupChannelTracingWithReply( + ctx context.Context, t *testing.T, channel *metav1.TypeMeta, client *testlib.Client, @@ -95,7 +98,7 @@ func setupChannelTracingWithReply( ) // Wait for all test resources to be ready, so that we can start sending events. - client.WaitForAllTestResourcesReadyOrFail() + client.WaitForAllTestResourcesReadyOrFail(ctx) // Everything is setup to receive an event. Generate a CloudEvent. senderName := "sender" @@ -111,9 +114,9 @@ func setupChannelTracingWithReply( // Send the CloudEvent (either with or without tracing inside the SendEvents Pod). if senderPublishTrace { - client.SendEventToAddressable(senderName, channelName, channel, event, sender.EnableTracing()) + client.SendEventToAddressable(ctx, senderName, channelName, channel, event, sender.EnableTracing()) } else { - client.SendEventToAddressable(senderName, channelName, channel, event) + client.SendEventToAddressable(ctx, senderName, channelName, channel, event) } // We expect the following spans: diff --git a/vendor/knative.dev/eventing/test/conformance/helpers/metadata.go b/vendor/knative.dev/eventing/test/conformance/helpers/metadata.go index e00e1fb1a6..78a15e7a63 100644 --- a/vendor/knative.dev/eventing/test/conformance/helpers/metadata.go +++ b/vendor/knative.dev/eventing/test/conformance/helpers/metadata.go @@ -17,6 +17,8 @@ limitations under the License. package helpers import ( + "context" + "k8s.io/apimachinery/pkg/api/meta" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" testlib "knative.dev/eventing/test/lib" @@ -34,7 +36,7 @@ func objectHasRequiredLabel(client *testlib.Client, object metav1.TypeMeta, key gvr, _ := meta.UnsafeGuessKindToResource(object.GroupVersionKind()) crdName := gvr.Resource + "." + gvr.Group - crd, err := client.Apiextensions.CustomResourceDefinitions().Get(crdName, metav1.GetOptions{ + crd, err := client.Apiextensions.CustomResourceDefinitions().Get(context.Background(), crdName, metav1.GetOptions{ TypeMeta: metav1.TypeMeta{}, }) if err != nil { diff --git a/vendor/knative.dev/eventing/test/conformance/helpers/rbac.go b/vendor/knative.dev/eventing/test/conformance/helpers/rbac.go index 7da99b8a0e..703ff658d0 100644 --- a/vendor/knative.dev/eventing/test/conformance/helpers/rbac.go +++ b/vendor/knative.dev/eventing/test/conformance/helpers/rbac.go @@ -17,15 +17,17 @@ limitations under the License. package helpers import ( + "context" "fmt" authv1 "k8s.io/api/authorization/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/schema" testlib "knative.dev/eventing/test/lib" ) func ServiceAccountCanDoVerbOnResourceOrFail(client *testlib.Client, gvr schema.GroupVersionResource, subresource string, saName string, verb string) { - r, err := client.Kube.Kube.AuthorizationV1().SubjectAccessReviews().Create(&authv1.SubjectAccessReview{ + r, err := client.Kube.Kube.AuthorizationV1().SubjectAccessReviews().Create(context.Background(), &authv1.SubjectAccessReview{ Spec: authv1.SubjectAccessReviewSpec{ User: fmt.Sprintf("system:serviceaccount:%s:%s", client.Namespace, saName), ResourceAttributes: &authv1.ResourceAttributes{ @@ -36,7 +38,7 @@ func ServiceAccountCanDoVerbOnResourceOrFail(client *testlib.Client, gvr schema. Subresource: subresource, }, }, - }) + }, metav1.CreateOptions{}) if err != nil { client.T.Fatalf("Error while checking if %q is not allowed on %s.%s/%s subresource:%q. err: %q", verb, gvr.Resource, gvr.Group, gvr.Version, subresource, err) } diff --git a/vendor/knative.dev/eventing/test/conformance/helpers/tracing/zipkin.go b/vendor/knative.dev/eventing/test/conformance/helpers/tracing/zipkin.go index 5d30c36bbe..5d555cf08e 100644 --- a/vendor/knative.dev/eventing/test/conformance/helpers/tracing/zipkin.go +++ b/vendor/knative.dev/eventing/test/conformance/helpers/tracing/zipkin.go @@ -17,15 +17,15 @@ limitations under the License. package tracing import ( + "context" "testing" - "knative.dev/pkg/test/zipkin" - testlib "knative.dev/eventing/test/lib" "knative.dev/eventing/test/lib/resources" + "knative.dev/pkg/test/zipkin" ) // Setup sets up port forwarding to Zipkin. func Setup(t *testing.T, client *testlib.Client) { - zipkin.SetupZipkinTracingFromConfigTracingOrFail(t, client.Kube.Kube, resources.SystemNamespace) + zipkin.SetupZipkinTracingFromConfigTracingOrFail(context.Background(), t, client.Kube.Kube, resources.SystemNamespace) } diff --git a/vendor/knative.dev/eventing/test/conformance/helpers/tracing_test_helper.go b/vendor/knative.dev/eventing/test/conformance/helpers/tracing_test_helper.go index 9f4d5772f0..67a7f3a593 100644 --- a/vendor/knative.dev/eventing/test/conformance/helpers/tracing_test_helper.go +++ b/vendor/knative.dev/eventing/test/conformance/helpers/tracing_test_helper.go @@ -36,6 +36,7 @@ import ( // SetupTracingTestInfrastructureFunc sets up the infrastructure for running tracing tests. It returns the // expected trace as well as a string that is expected to be in the logger Pod's logs. type SetupTracingTestInfrastructureFunc func( + ctx context.Context, t *testing.T, channel *metav1.TypeMeta, client *testlib.Client, @@ -45,6 +46,7 @@ type SetupTracingTestInfrastructureFunc func( // tracingTest bootstraps the test and then executes the assertions on the received event and on the spans func tracingTest( + ctx context.Context, t *testing.T, setupClient testlib.SetupClientOption, setupInfrastructure SetupTracingTestInfrastructureFunc, @@ -62,7 +64,7 @@ func tracingTest( tracinghelper.Setup(t, client) // Setup the test infrastructure - expectedTestSpan, eventMatcher := setupInfrastructure(t, &channel, client, recordEventsPodName, true) + expectedTestSpan, eventMatcher := setupInfrastructure(ctx, t, &channel, client, recordEventsPodName, true) // Start the event info store and assert the event was received correctly targetTracker, err := recordevents.NewEventInfoStore(client, recordEventsPodName) diff --git a/vendor/knative.dev/eventing/test/e2e/helpers/broker_channel_flow_helper.go b/vendor/knative.dev/eventing/test/e2e/helpers/broker_channel_flow_helper.go index ce216c5ce7..0e3b3adb6a 100644 --- a/vendor/knative.dev/eventing/test/e2e/helpers/broker_channel_flow_helper.go +++ b/vendor/knative.dev/eventing/test/e2e/helpers/broker_channel_flow_helper.go @@ -16,6 +16,7 @@ limitations under the License. package helpers import ( + "context" "testing" cloudevents "github.com/cloudevents/sdk-go/v2" @@ -49,7 +50,9 @@ Trigger2 logs all events, Trigger3 filters the transformed event and sends it to Channel. */ -func BrokerChannelFlowWithTransformation(t *testing.T, +func BrokerChannelFlowWithTransformation( + ctx context.Context, + t *testing.T, brokerClass string, brokerVersion string, triggerVersion string, @@ -129,7 +132,7 @@ func BrokerChannelFlowWithTransformation(t *testing.T, ) } // create event tracker that should receive all sent events - allEventTracker, _ := recordevents.StartEventRecordOrFail(client, allEventsRecorderPodName) + allEventTracker, _ := recordevents.StartEventRecordOrFail(ctx, client, allEventsRecorderPodName) // create trigger to receive all the events if triggerVersion == "v1" { @@ -173,7 +176,7 @@ func BrokerChannelFlowWithTransformation(t *testing.T, } // create event tracker that should receive only transformed events - transformedEventTracker, _ := recordevents.StartEventRecordOrFail(client, transformedEventsRecorderPodName) + transformedEventTracker, _ := recordevents.StartEventRecordOrFail(ctx, client, transformedEventsRecorderPodName) // create subscription client.CreateSubscriptionOrFail( @@ -184,10 +187,10 @@ func BrokerChannelFlowWithTransformation(t *testing.T, ) // wait for all test resources to be ready, so that we can start sending events - client.WaitForAllTestResourcesReadyOrFail() + client.WaitForAllTestResourcesReadyOrFail(ctx) // send CloudEvent to the broker - client.SendEventToAddressable(senderName, brokerName, testlib.BrokerTypeMeta, eventToSend) + client.SendEventToAddressable(ctx, senderName, brokerName, testlib.BrokerTypeMeta, eventToSend) // Assert the results on the event trackers originalEventMatcher := recordevents.MatchEvent(AllOf( diff --git a/vendor/knative.dev/eventing/test/e2e/helpers/broker_event_transformation_test_helper.go b/vendor/knative.dev/eventing/test/e2e/helpers/broker_event_transformation_test_helper.go index dae341369b..f20d3a011c 100644 --- a/vendor/knative.dev/eventing/test/e2e/helpers/broker_event_transformation_test_helper.go +++ b/vendor/knative.dev/eventing/test/e2e/helpers/broker_event_transformation_test_helper.go @@ -16,6 +16,7 @@ limitations under the License. package helpers import ( + "context" "testing" cloudevents "github.com/cloudevents/sdk-go/v2" @@ -41,7 +42,9 @@ EventSource ---> Broker ---> Trigger1 -------> Service(Transformation) Note: the number denotes the sequence of the event that flows in this test case. */ -func EventTransformationForTriggerTestHelper(t *testing.T, +func EventTransformationForTriggerTestHelper( + ctx context.Context, + t *testing.T, brokerVersion string, triggerVersion string, creator BrokerCreator, @@ -96,7 +99,7 @@ func EventTransformationForTriggerTestHelper(t *testing.T, } // create logger pod and service - eventTracker, _ := recordevents.StartEventRecordOrFail(client, recordEventsPodName) + eventTracker, _ := recordevents.StartEventRecordOrFail(ctx, client, recordEventsPodName) // create trigger2 for event receiving if triggerVersion == "v1" { client.CreateTriggerV1OrFail( @@ -115,7 +118,7 @@ func EventTransformationForTriggerTestHelper(t *testing.T, } // wait for all test resources to be ready, so that we can start sending events - client.WaitForAllTestResourcesReadyOrFail() + client.WaitForAllTestResourcesReadyOrFail(ctx) // eventToSend is the event sent as input of the test eventToSend := cloudevents.NewEvent() @@ -125,7 +128,7 @@ func EventTransformationForTriggerTestHelper(t *testing.T, if err := eventToSend.SetData(cloudevents.ApplicationJSON, []byte(eventBody)); err != nil { t.Fatalf("Cannot set the payload of the event: %s", err.Error()) } - client.SendEventToAddressable(senderName, brokerName, testlib.BrokerTypeMeta, eventToSend) + client.SendEventToAddressable(ctx, senderName, brokerName, testlib.BrokerTypeMeta, eventToSend) // check if the logging service receives the correct event eventTracker.AssertAtLeast(1, recordevents.MatchEvent( diff --git a/vendor/knative.dev/eventing/test/e2e/helpers/broker_redelivery_helper.go b/vendor/knative.dev/eventing/test/e2e/helpers/broker_redelivery_helper.go index 5437a9639c..fab308dd3c 100644 --- a/vendor/knative.dev/eventing/test/e2e/helpers/broker_redelivery_helper.go +++ b/vendor/knative.dev/eventing/test/e2e/helpers/broker_redelivery_helper.go @@ -17,6 +17,7 @@ package helpers import ( + "context" "fmt" "testing" @@ -34,12 +35,12 @@ import ( // BrokerCreator creates a broker and returns its broker name. type BrokerCreatorWithRetries func(client *testlib.Client, numRetries int32) string -func BrokerRedelivery(t *testing.T, creator BrokerCreatorWithRetries) { +func BrokerRedelivery(ctx context.Context, t *testing.T, creator BrokerCreatorWithRetries) { numRetries := int32(5) t.Run(dropevents.Fibonacci, func(t *testing.T) { - brokerRedelivery(t, creator, numRetries, func(pod *corev1.Pod, client *testlib.Client) error { + brokerRedelivery(ctx, t, creator, numRetries, func(pod *corev1.Pod, client *testlib.Client) error { container := pod.Spec.Containers[0] container.Env = append(container.Env, corev1.EnvVar{ @@ -52,7 +53,7 @@ func BrokerRedelivery(t *testing.T, creator BrokerCreatorWithRetries) { }) t.Run(dropevents.Sequence, func(t *testing.T) { - brokerRedelivery(t, creator, numRetries, func(pod *corev1.Pod, client *testlib.Client) error { + brokerRedelivery(ctx, t, creator, numRetries, func(pod *corev1.Pod, client *testlib.Client) error { container := pod.Spec.Containers[0] container.Env = append(container.Env, corev1.EnvVar{ @@ -69,7 +70,7 @@ func BrokerRedelivery(t *testing.T, creator BrokerCreatorWithRetries) { }) } -func brokerRedelivery(t *testing.T, creator BrokerCreatorWithRetries, numRetries int32, options ...recordevents.EventRecordOption) { +func brokerRedelivery(ctx context.Context, t *testing.T, creator BrokerCreatorWithRetries, numRetries int32, options ...recordevents.EventRecordOption) { const ( triggerName = "trigger" @@ -86,6 +87,7 @@ func brokerRedelivery(t *testing.T, creator BrokerCreatorWithRetries, numRetries // Create event tracker that should receive all events. allEventTracker, _ := recordevents.StartEventRecordOrFail( + ctx, client, eventRecord, options..., @@ -100,7 +102,7 @@ func brokerRedelivery(t *testing.T, creator BrokerCreatorWithRetries, numRetries resources.WithSubscriberServiceRefForTriggerV1(eventRecord), ) - client.WaitForAllTestResourcesReadyOrFail() + client.WaitForAllTestResourcesReadyOrFail(ctx) // send CloudEvent to the broker @@ -112,7 +114,7 @@ func brokerRedelivery(t *testing.T, creator BrokerCreatorWithRetries, numRetries t.Fatalf("Cannot set the payload of the event: %s", err.Error()) } - client.SendEventToAddressable(senderName, brokerName, testlib.BrokerTypeMeta, eventToSend) + client.SendEventToAddressable(ctx, senderName, brokerName, testlib.BrokerTypeMeta, eventToSend) allEventTracker.AssertAtLeast(1, recordevents.MatchEvent(AllOf( HasSource(eventSource), diff --git a/vendor/knative.dev/eventing/test/e2e/helpers/broker_test_helper.go b/vendor/knative.dev/eventing/test/e2e/helpers/broker_test_helper.go index f232378b5c..3e5b207fe0 100644 --- a/vendor/knative.dev/eventing/test/e2e/helpers/broker_test_helper.go +++ b/vendor/knative.dev/eventing/test/e2e/helpers/broker_test_helper.go @@ -17,6 +17,7 @@ limitations under the License. package helpers import ( + "context" "fmt" "net/url" "sort" @@ -127,7 +128,7 @@ func ChannelBasedBrokerCreator(channel metav1.TypeMeta, brokerClass string) Brok // It then binds many triggers with different filtering patterns to the broker created by brokerCreator, and sends // different events to the broker's address. // Finally, it verifies that only the appropriate events are routed to the subscribers. -func TestBrokerWithManyTriggers(t *testing.T, brokerCreator BrokerCreator, shouldLabelNamespace bool) { +func TestBrokerWithManyTriggers(ctx context.Context, t *testing.T, brokerCreator BrokerCreator, shouldLabelNamespace bool) { const ( any = v1beta1.TriggerAnyFilter eventType1 = "type1" @@ -246,7 +247,7 @@ func TestBrokerWithManyTriggers(t *testing.T, brokerCreator BrokerCreator, shoul if shouldLabelNamespace { // Test if namespace reconciler would recreate broker once broker was deleted. - if err := client.Eventing.EventingV1beta1().Brokers(client.Namespace).Delete(brokerName, &metav1.DeleteOptions{}); err != nil { + if err := client.Eventing.EventingV1beta1().Brokers(client.Namespace).Delete(context.Background(), brokerName, metav1.DeleteOptions{}); err != nil { t.Fatalf("Can't delete default broker in namespace: %v", client.Namespace) } client.WaitForResourceReadyOrFail(brokerName, testlib.BrokerTypeMeta) @@ -257,7 +258,7 @@ func TestBrokerWithManyTriggers(t *testing.T, brokerCreator BrokerCreator, shoul for _, event := range test.eventFilters { // Create event recorder pod and service subscriberName := "dumper-" + event.String() - eventTracker, _ := recordevents.StartEventRecordOrFail(client, subscriberName) + eventTracker, _ := recordevents.StartEventRecordOrFail(ctx, client, subscriberName) eventTrackers[subscriberName] = eventTracker // Create trigger. triggerName := "trigger-" + event.String() @@ -268,7 +269,7 @@ func TestBrokerWithManyTriggers(t *testing.T, brokerCreator BrokerCreator, shoul ) } // Wait for all test resources to become ready before sending the events. - client.WaitForAllTestResourcesReadyOrFail() + client.WaitForAllTestResourcesReadyOrFail(ctx) // Map to save the expected matchers per dumper so that we can verify the delivery. expectedMatchers := make(map[string][]recordevents.EventInfoMatcher) @@ -295,7 +296,7 @@ func TestBrokerWithManyTriggers(t *testing.T, brokerCreator BrokerCreator, shoul // Send event senderPodName := "sender-" + eventTestCase.String() - client.SendEventToAddressable(senderPodName, brokerName, testlib.BrokerTypeMeta, eventToSend) + client.SendEventToAddressable(ctx, senderPodName, brokerName, testlib.BrokerTypeMeta, eventToSend) // Sent event matcher sentEventMatcher := cetest.AllOf( diff --git a/vendor/knative.dev/eventing/test/e2e/helpers/channel_chain_test_helper.go b/vendor/knative.dev/eventing/test/e2e/helpers/channel_chain_test_helper.go index 2328f7f38f..572ed86672 100644 --- a/vendor/knative.dev/eventing/test/e2e/helpers/channel_chain_test_helper.go +++ b/vendor/knative.dev/eventing/test/e2e/helpers/channel_chain_test_helper.go @@ -17,6 +17,7 @@ limitations under the License. package helpers import ( + "context" "fmt" "testing" @@ -31,7 +32,9 @@ import ( ) // ChannelChainTestHelper is the helper function for channel_chain_test -func ChannelChainTestHelper(t *testing.T, +func ChannelChainTestHelper( + ctx context.Context, + t *testing.T, subscriptionVersion SubscriptionVersion, channelTestRunner testlib.ComponentsTestRunner, options ...testlib.SetupClientOption) { @@ -55,7 +58,7 @@ func ChannelChainTestHelper(t *testing.T, client.WaitForResourcesReadyOrFail(&channel) // create loggerPod and expose it as a service - eventTracker, _ := recordevents.StartEventRecordOrFail(client, recordEventsPodName) + eventTracker, _ := recordevents.StartEventRecordOrFail(ctx, client, recordEventsPodName) // create subscription to subscribe the channel, and forward the received events to the logger service switch subscriptionVersion { case SubscriptionV1: @@ -93,7 +96,7 @@ func ChannelChainTestHelper(t *testing.T, t.Fatalf("Invalid subscription version") } // wait for all test resources to be ready, so that we can start sending events - client.WaitForAllTestResourcesReadyOrFail() + client.WaitForAllTestResourcesReadyOrFail(ctx) // send CloudEvent to the first channel event := cloudevents.NewEvent() @@ -106,7 +109,7 @@ func ChannelChainTestHelper(t *testing.T, st.Fatalf("Cannot set the payload of the event: %s", err.Error()) } - client.SendEventToAddressable(senderName, channelNames[0], &channel, event) + client.SendEventToAddressable(ctx, senderName, channelNames[0], &channel, event) // verify the logger service receives the event eventTracker.AssertAtLeast(len(subscriptionNames1)*len(subscriptionNames2), recordevents.MatchEvent( diff --git a/vendor/knative.dev/eventing/test/e2e/helpers/channel_defaulter_test_helper.go b/vendor/knative.dev/eventing/test/e2e/helpers/channel_defaulter_test_helper.go index 78be8c9320..d39219833a 100644 --- a/vendor/knative.dev/eventing/test/e2e/helpers/channel_defaulter_test_helper.go +++ b/vendor/knative.dev/eventing/test/e2e/helpers/channel_defaulter_test_helper.go @@ -17,6 +17,7 @@ limitations under the License. package helpers import ( + "context" "fmt" "testing" "time" @@ -50,7 +51,9 @@ const ( ) // ChannelClusterDefaulterTestHelper is the helper function for channel_defaulter_test -func ChannelClusterDefaulterTestHelper(t *testing.T, +func ChannelClusterDefaulterTestHelper( + ctx context.Context, + t *testing.T, channelTestRunner testlib.ComponentsTestRunner, options ...testlib.SetupClientOption) { channelTestRunner.RunTests(t, testlib.FeatureBasic, func(st *testing.T, channel metav1.TypeMeta) { @@ -64,12 +67,14 @@ func ChannelClusterDefaulterTestHelper(t *testing.T, st.Fatalf("Failed to update the defaultchannel configmap: %v", err) } - defaultChannelTestHelper(st, client, channel) + defaultChannelTestHelper(ctx, st, client, channel) }) } // ChannelNamespaceDefaulterTestHelper is the helper function for channel_defaulter_test -func ChannelNamespaceDefaulterTestHelper(t *testing.T, +func ChannelNamespaceDefaulterTestHelper( + ctx context.Context, + t *testing.T, channelTestRunner testlib.ComponentsTestRunner, options ...testlib.SetupClientOption) { channelTestRunner.RunTests(t, testlib.FeatureBasic, func(st *testing.T, channel metav1.TypeMeta) { @@ -84,11 +89,11 @@ func ChannelNamespaceDefaulterTestHelper(t *testing.T, st.Fatalf("Failed to update the defaultchannel configmap: %v", err) } - defaultChannelTestHelper(st, client, channel) + defaultChannelTestHelper(ctx, st, client, channel) }) } -func defaultChannelTestHelper(t *testing.T, client *testlib.Client, expectedChannel metav1.TypeMeta) { +func defaultChannelTestHelper(ctx context.Context, t *testing.T, client *testlib.Client, expectedChannel metav1.TypeMeta) { channelName := "e2e-defaulter-channel" senderName := "e2e-defaulter-sender" subscriptionName := "e2e-defaulter-subscription" @@ -98,7 +103,7 @@ func defaultChannelTestHelper(t *testing.T, client *testlib.Client, expectedChan client.CreateChannelWithDefaultOrFail(eventingtesting.NewChannel(channelName, client.Namespace)) // create event logger pod and service as the subscriber - eventTracker, _ := recordevents.StartEventRecordOrFail(client, recordEventsPodName) + eventTracker, _ := recordevents.StartEventRecordOrFail(ctx, client, recordEventsPodName) // create subscription to subscribe the channel, and forward the received events to the logger service client.CreateSubscriptionOrFail( subscriptionName, @@ -108,7 +113,7 @@ func defaultChannelTestHelper(t *testing.T, client *testlib.Client, expectedChan ) // wait for all test resources to be ready, so that we can start sending events - client.WaitForAllTestResourcesReadyOrFail() + client.WaitForAllTestResourcesReadyOrFail(ctx) // check if the defaultchannel creates exactly one underlying channel given the spec metaResourceList := resources.NewMetaResourceList(client.Namespace, &expectedChannel) @@ -146,7 +151,7 @@ func defaultChannelTestHelper(t *testing.T, client *testlib.Client, expectedChan if err := event.SetData(cloudevents.ApplicationJSON, []byte(body)); err != nil { t.Fatalf("Cannot set the payload of the event: %s", err.Error()) } - client.SendEventToAddressable(senderName, channelName, testlib.ChannelTypeMeta, event) + client.SendEventToAddressable(ctx, senderName, channelName, testlib.ChannelTypeMeta, event) // verify the logger service receives the event eventTracker.AssertAtLeast(1, recordevents.MatchEvent( @@ -161,7 +166,7 @@ func updateDefaultChannelCM(client *testlib.Client, updateConfig func(config *co err := reconciler.RetryUpdateConflicts(func(attempts int) (err error) { // get the defaultchannel configmap - configMap, err := cmInterface.Get(configMapName, metav1.GetOptions{}) + configMap, err := cmInterface.Get(context.Background(), configMapName, metav1.GetOptions{}) if err != nil { return err } @@ -182,7 +187,7 @@ func updateDefaultChannelCM(client *testlib.Client, updateConfig func(config *co } // update the defaultchannel configmap configMap.Data[channelDefaulterKey] = string(configBytes) - _, err = cmInterface.Update(configMap) + _, err = cmInterface.Update(context.Background(), configMap, metav1.UpdateOptions{}) return err }) if err != nil { diff --git a/vendor/knative.dev/eventing/test/e2e/helpers/channel_dls_test_helper.go b/vendor/knative.dev/eventing/test/e2e/helpers/channel_dls_test_helper.go index a9b677b4f4..f5a6d507fa 100644 --- a/vendor/knative.dev/eventing/test/e2e/helpers/channel_dls_test_helper.go +++ b/vendor/knative.dev/eventing/test/e2e/helpers/channel_dls_test_helper.go @@ -17,6 +17,7 @@ limitations under the License. package helpers import ( + "context" "fmt" "testing" @@ -31,7 +32,9 @@ import ( ) // ChannelDeadLetterSinkTestHelper is the helper function for channel_deadlettersink_test -func ChannelDeadLetterSinkTestHelper(t *testing.T, +func ChannelDeadLetterSinkTestHelper( + ctx context.Context, + t *testing.T, subscriptionVersion SubscriptionVersion, channelTestRunner testlib.ComponentsTestRunner, options ...testlib.SetupClientOption) { @@ -52,7 +55,7 @@ func ChannelDeadLetterSinkTestHelper(t *testing.T, client.WaitForResourcesReadyOrFail(&channel) // create event logger pod and service as the subscriber - eventTracker, _ := recordevents.StartEventRecordOrFail(client, recordEventsPodName) + eventTracker, _ := recordevents.StartEventRecordOrFail(ctx, client, recordEventsPodName) // create subscriptions that subscribe to a service that does not exist switch subscriptionVersion { case SubscriptionV1: @@ -76,7 +79,7 @@ func ChannelDeadLetterSinkTestHelper(t *testing.T, } // wait for all test resources to be ready, so that we can start sending events - client.WaitForAllTestResourcesReadyOrFail() + client.WaitForAllTestResourcesReadyOrFail(ctx) // send CloudEvent to the first channel event := cloudevents.NewEvent() @@ -88,7 +91,7 @@ func ChannelDeadLetterSinkTestHelper(t *testing.T, if err := event.SetData(cloudevents.ApplicationJSON, []byte(body)); err != nil { t.Fatalf("Cannot set the payload of the event: %s", err.Error()) } - client.SendEventToAddressable(senderName, channelNames[0], &channel, event) + client.SendEventToAddressable(ctx, senderName, channelNames[0], &channel, event) // check if the logging service receives the correct number of event messages eventTracker.AssertAtLeast(len(subscriptionNames), recordevents.MatchEvent( diff --git a/vendor/knative.dev/eventing/test/e2e/helpers/channel_event_tranformation_test_helper.go b/vendor/knative.dev/eventing/test/e2e/helpers/channel_event_tranformation_test_helper.go index 9b252ff4f3..87de6c1984 100644 --- a/vendor/knative.dev/eventing/test/e2e/helpers/channel_event_tranformation_test_helper.go +++ b/vendor/knative.dev/eventing/test/e2e/helpers/channel_event_tranformation_test_helper.go @@ -17,6 +17,7 @@ limitations under the License. package helpers import ( + "context" "fmt" "testing" @@ -31,7 +32,9 @@ import ( ) // EventTransformationForSubscriptionTestHelper is the helper function for channel_event_tranformation_test -func EventTransformationForSubscriptionTestHelper(t *testing.T, +func EventTransformationForSubscriptionTestHelper( + ctx context.Context, + t *testing.T, subscriptionVersion SubscriptionVersion, channelTestRunner testlib.ComponentsTestRunner, options ...testlib.SetupClientOption) { @@ -71,7 +74,7 @@ func EventTransformationForSubscriptionTestHelper(t *testing.T, client.CreatePodOrFail(transformationPod, testlib.WithService(transformationPodName)) // create event logger pod and service as the subscriber - eventTracker, _ := recordevents.StartEventRecordOrFail(client, recordEventsPodName) + eventTracker, _ := recordevents.StartEventRecordOrFail(ctx, client, recordEventsPodName) switch subscriptionVersion { case SubscriptionV1: // create subscriptions that subscribe the first channel, use the transformation service to transform the events and then forward the transformed events to the second channel @@ -111,7 +114,7 @@ func EventTransformationForSubscriptionTestHelper(t *testing.T, } // wait for all test resources to be ready, so that we can start sending events - client.WaitForAllTestResourcesReadyOrFail() + client.WaitForAllTestResourcesReadyOrFail(ctx) // send CloudEvent to the first channel eventToSend := cloudevents.NewEvent() @@ -122,7 +125,7 @@ func EventTransformationForSubscriptionTestHelper(t *testing.T, if err := eventToSend.SetData(cloudevents.ApplicationJSON, []byte(eventBody)); err != nil { t.Fatalf("Cannot set the payload of the event: %s", err.Error()) } - client.SendEventToAddressable(senderName, channelNames[0], &channel, eventToSend) + client.SendEventToAddressable(ctx, senderName, channelNames[0], &channel, eventToSend) // check if the logging service receives the correct number of event messages eventTracker.AssertAtLeast(len(subscriptionNames1)*len(subscriptionNames2), recordevents.MatchEvent( diff --git a/vendor/knative.dev/eventing/test/e2e/helpers/channel_single_event_helper.go b/vendor/knative.dev/eventing/test/e2e/helpers/channel_single_event_helper.go index 2e0131eca0..ed1d2ec2a4 100644 --- a/vendor/knative.dev/eventing/test/e2e/helpers/channel_single_event_helper.go +++ b/vendor/knative.dev/eventing/test/e2e/helpers/channel_single_event_helper.go @@ -17,6 +17,7 @@ limitations under the License. package helpers import ( + "context" "fmt" "testing" @@ -45,7 +46,9 @@ const ( // a subscription to its v1alpha1 version by using channelVersion to override it. // channelVersion == "" means that the version of the channel subscribed to is not // modified. -func SingleEventForChannelTestHelper(t *testing.T, encoding cloudevents.Encoding, +func SingleEventForChannelTestHelper( + ctx context.Context, + t *testing.T, encoding cloudevents.Encoding, subscriptionVersion SubscriptionVersion, channelVersion string, channelTestRunner testlib.ComponentsTestRunner, @@ -64,7 +67,7 @@ func SingleEventForChannelTestHelper(t *testing.T, encoding cloudevents.Encoding client.CreateChannelOrFail(channelName, &channel) // create event logger pod and service - eventTracker, _ := recordevents.StartEventRecordOrFail(client, eventRecorder) + eventTracker, _ := recordevents.StartEventRecordOrFail(ctx, client, eventRecorder) // If the caller specified a different version, override it here. if channelVersion != "" { st.Logf("Changing API version from: %q to %q", channel.APIVersion, channelVersion) @@ -91,7 +94,7 @@ func SingleEventForChannelTestHelper(t *testing.T, encoding cloudevents.Encoding } // wait for all test resources to be ready, so that we can start sending events - client.WaitForAllTestResourcesReadyOrFail() + client.WaitForAllTestResourcesReadyOrFail(ctx) // send CloudEvent to the channel event := cloudevents.NewEvent() @@ -107,6 +110,7 @@ func SingleEventForChannelTestHelper(t *testing.T, encoding cloudevents.Encoding } client.SendEventToAddressable( + ctx, senderName, channelName, &channel, diff --git a/vendor/knative.dev/eventing/test/e2e/helpers/parallel_test_helper.go b/vendor/knative.dev/eventing/test/e2e/helpers/parallel_test_helper.go index daf2edfda6..4c4c4416cb 100644 --- a/vendor/knative.dev/eventing/test/e2e/helpers/parallel_test_helper.go +++ b/vendor/knative.dev/eventing/test/e2e/helpers/parallel_test_helper.go @@ -16,6 +16,7 @@ limitations under the License. package helpers import ( + "context" "fmt" "testing" "time" @@ -42,7 +43,9 @@ type branchConfig struct { filter bool } -func ParallelTestHelper(t *testing.T, +func ParallelTestHelper( + ctx context.Context, + t *testing.T, channelTestRunner testlib.ComponentsTestRunner, options ...testlib.SetupClientOption) { const ( @@ -95,7 +98,7 @@ func ParallelTestHelper(t *testing.T, // create event logger pod and service eventRecorder := fmt.Sprintf("%s-event-record-pod", tc.name) - eventTracker, _ := recordevents.StartEventRecordOrFail(client, eventRecorder) + eventTracker, _ := recordevents.StartEventRecordOrFail(ctx, client, eventRecorder) // create channel as reply of the Parallel // TODO(chizhg): now we'll have to use a channel plus its subscription here, as reply of the Subscription @@ -117,7 +120,7 @@ func ParallelTestHelper(t *testing.T, client.CreateFlowsParallelOrFail(parallel) - client.WaitForAllTestResourcesReadyOrFail() + client.WaitForAllTestResourcesReadyOrFail(ctx) // send CloudEvent to the Parallel event := cloudevents.NewEvent() @@ -133,6 +136,7 @@ func ParallelTestHelper(t *testing.T, } client.SendEventToAddressable( + ctx, senderPodName, tc.name, testlib.FlowsParallelTypeMeta, @@ -148,7 +152,9 @@ func ParallelTestHelper(t *testing.T, }) } -func ParallelV1TestHelper(t *testing.T, +func ParallelV1TestHelper( + ctx context.Context, + t *testing.T, channelTestRunner testlib.ComponentsTestRunner, options ...testlib.SetupClientOption) { const ( @@ -201,7 +207,7 @@ func ParallelV1TestHelper(t *testing.T, // create event logger pod and service eventRecorder := fmt.Sprintf("%s-event-record-pod", tc.name) - eventTracker, _ := recordevents.StartEventRecordOrFail(client, eventRecorder) + eventTracker, _ := recordevents.StartEventRecordOrFail(ctx, client, eventRecorder) // create channel as reply of the Parallel // TODO(chizhg): now we'll have to use a channel plus its subscription here, as reply of the Subscription @@ -223,7 +229,7 @@ func ParallelV1TestHelper(t *testing.T, client.CreateFlowsParallelV1OrFail(parallel) - client.WaitForAllTestResourcesReadyOrFail() + client.WaitForAllTestResourcesReadyOrFail(ctx) // send CloudEvent to the Parallel event := cloudevents.NewEvent() @@ -239,6 +245,7 @@ func ParallelV1TestHelper(t *testing.T, } client.SendEventToAddressable( + ctx, senderPodName, tc.name, testlib.FlowsParallelTypeMeta, diff --git a/vendor/knative.dev/eventing/test/e2e/helpers/sequence_test_helper.go b/vendor/knative.dev/eventing/test/e2e/helpers/sequence_test_helper.go index 321957d96b..807384498e 100644 --- a/vendor/knative.dev/eventing/test/e2e/helpers/sequence_test_helper.go +++ b/vendor/knative.dev/eventing/test/e2e/helpers/sequence_test_helper.go @@ -16,6 +16,7 @@ limitations under the License. package helpers import ( + "context" "fmt" "testing" @@ -37,7 +38,9 @@ import ( "knative.dev/eventing/test/lib/resources" ) -func SequenceTestHelper(t *testing.T, +func SequenceTestHelper( + ctx context.Context, + t *testing.T, channelTestRunner testlib.ComponentsTestRunner, options ...testlib.SetupClientOption) { const ( @@ -96,7 +99,7 @@ func SequenceTestHelper(t *testing.T, // make the logger service as a Knative service, and remove the channel and subscription. client.CreateChannelOrFail(channelName, &channel) // create event logger pod and service as the subscriber - eventTracker, _ := recordevents.StartEventRecordOrFail(client, recordEventsPodName) + eventTracker, _ := recordevents.StartEventRecordOrFail(ctx, client, recordEventsPodName) // create subscription to subscribe the channel, and forward the received events to the logger service client.CreateSubscriptionOrFail( subscriptionName, @@ -119,7 +122,7 @@ func SequenceTestHelper(t *testing.T, client.CreateFlowsSequenceOrFail(sequence) // wait for all test resources to be ready, so that we can start sending events - client.WaitForAllTestResourcesReadyOrFail() + client.WaitForAllTestResourcesReadyOrFail(ctx) // send CloudEvent to the Sequence event := cloudevents.NewEvent() @@ -133,6 +136,7 @@ func SequenceTestHelper(t *testing.T, st.Fatalf("Cannot set the payload of the event: %s", err.Error()) } client.SendEventToAddressable( + ctx, senderPodName, sequenceName, testlib.FlowsSequenceTypeMeta, @@ -150,7 +154,9 @@ func SequenceTestHelper(t *testing.T, }) } -func SequenceV1TestHelper(t *testing.T, +func SequenceV1TestHelper( + ctx context.Context, + t *testing.T, channelTestRunner testlib.ComponentsTestRunner, options ...testlib.SetupClientOption) { const ( @@ -209,7 +215,7 @@ func SequenceV1TestHelper(t *testing.T, // make the logger service as a Knative service, and remove the channel and subscription. client.CreateChannelOrFail(channelName, &channel) // create event logger pod and service as the subscriber - eventTracker, _ := recordevents.StartEventRecordOrFail(client, recordEventsPodName) + eventTracker, _ := recordevents.StartEventRecordOrFail(ctx, client, recordEventsPodName) // create subscription to subscribe the channel, and forward the received events to the logger service client.CreateSubscriptionOrFail( subscriptionName, @@ -232,7 +238,7 @@ func SequenceV1TestHelper(t *testing.T, client.CreateFlowsSequenceV1OrFail(sequence) // wait for all test resources to be ready, so that we can start sending events - client.WaitForAllTestResourcesReadyOrFail() + client.WaitForAllTestResourcesReadyOrFail(ctx) // send CloudEvent to the Sequence event := cloudevents.NewEvent() @@ -246,6 +252,7 @@ func SequenceV1TestHelper(t *testing.T, st.Fatalf("Cannot set the payload of the event: %s", err.Error()) } client.SendEventToAddressable( + ctx, senderPodName, sequenceName, testlib.FlowsSequenceTypeMeta, diff --git a/vendor/knative.dev/eventing/test/e2e/helpers/trigger_no_broker_test_helper.go b/vendor/knative.dev/eventing/test/e2e/helpers/trigger_no_broker_test_helper.go index 0f7d04f244..a514fb9c4e 100644 --- a/vendor/knative.dev/eventing/test/e2e/helpers/trigger_no_broker_test_helper.go +++ b/vendor/knative.dev/eventing/test/e2e/helpers/trigger_no_broker_test_helper.go @@ -17,6 +17,7 @@ limitations under the License. package helpers import ( + "context" "strings" "testing" "time" @@ -32,7 +33,7 @@ import ( // TestTriggerNoBroker will create a Trigger with a non-existent broker, then it will ensure // the Status is correctly reflected as failed with BrokerDoesNotExist. Then it will create // the broker and ensure that Trigger / Broker will get to Ready state. -func TestTriggerNoBroker(t *testing.T, channel string, brokerCreator BrokerCreator) { +func TestTriggerNoBroker(ctx context.Context, t *testing.T, channel string, brokerCreator BrokerCreator) { t.Skipf("triggers no longer get status written to them by the generic trigger controller.") client := testlib.Setup(t, true) @@ -49,7 +50,7 @@ func TestTriggerNoBroker(t *testing.T, channel string, brokerCreator BrokerCreat // Then make sure the trigger is marked as not ready since there's no broker. err := wait.PollImmediate(1*time.Second, 10*time.Second, func() (bool, error) { - trigger, err := client.Eventing.EventingV1beta1().Triggers(client.Namespace).Get("testtrigger", metav1.GetOptions{}) + trigger, err := client.Eventing.EventingV1beta1().Triggers(client.Namespace).Get(context.Background(), "testtrigger", metav1.GetOptions{}) if err != nil { return false, err } @@ -70,5 +71,5 @@ func TestTriggerNoBroker(t *testing.T, channel string, brokerCreator BrokerCreat } // Wait for all test resources to become ready before sending the events. - client.WaitForAllTestResourcesReadyOrFail() + client.WaitForAllTestResourcesReadyOrFail(ctx) } diff --git a/vendor/knative.dev/eventing/test/lib/client.go b/vendor/knative.dev/eventing/test/lib/client.go index b26e043473..1eaef6ecec 100644 --- a/vendor/knative.dev/eventing/test/lib/client.go +++ b/vendor/knative.dev/eventing/test/lib/client.go @@ -20,6 +20,7 @@ limitations under the License. package lib import ( + "context" "fmt" "testing" @@ -126,7 +127,7 @@ func (c *Client) runCleanup() (err error) { } func getTracingConfig(c *kubernetes.Clientset) (corev1.EnvVar, error) { - cm, err := c.CoreV1().ConfigMaps(resources.SystemNamespace).Get("config-tracing", metav1.GetOptions{}) + cm, err := c.CoreV1().ConfigMaps(resources.SystemNamespace).Get(context.Background(), "config-tracing", metav1.GetOptions{}) if err != nil { return corev1.EnvVar{}, fmt.Errorf("error while retrieving the config-tracing config map: %+v", errors.WithStack(err)) } diff --git a/vendor/knative.dev/eventing/test/lib/creation.go b/vendor/knative.dev/eventing/test/lib/creation.go index 832f59d2cf..d5d650fb2b 100644 --- a/vendor/knative.dev/eventing/test/lib/creation.go +++ b/vendor/knative.dev/eventing/test/lib/creation.go @@ -17,6 +17,7 @@ limitations under the License. package lib import ( + "context" "fmt" "strings" @@ -105,7 +106,7 @@ func (c *Client) CreateChannelWithDefaultOrFail(channel *messagingv1beta1.Channe c.T.Logf("Creating default v1beta1 channel %+v", channel) channels := c.Eventing.MessagingV1beta1().Channels(c.Namespace) err := c.RetryWebhookErrors(func(attempts int) (err error) { - _, e := channels.Create(channel) + _, e := channels.Create(context.Background(), channel, metav1.CreateOptions{}) if e != nil { c.T.Logf("Failed to create channel %q: %v", channel.Name, e) } @@ -122,7 +123,7 @@ func (c *Client) CreateChannelV1WithDefaultOrFail(channel *messagingv1.Channel) c.T.Logf("Creating default v1 channel %+v", channel) channels := c.Eventing.MessagingV1().Channels(c.Namespace) err := c.RetryWebhookErrors(func(attempts int) (err error) { - _, e := channels.Create(channel) + _, e := channels.Create(context.Background(), channel, metav1.CreateOptions{}) if e != nil { c.T.Logf("Failed to create channel %q: %v", channel.Name, e) } @@ -148,7 +149,7 @@ func (c *Client) CreateSubscriptionOrFail( c.T.Logf("Creating v1beta1 subscription %s for channel %+v-%s", name, channelTypeMeta, channelName) // update subscription with the new reference var e error - retSubscription, e = subscriptions.Create(subscription) + retSubscription, e = subscriptions.Create(context.Background(), subscription, metav1.CreateOptions{}) if e != nil { c.T.Logf("Failed to create subscription %q: %v", name, e) } @@ -163,7 +164,7 @@ func (c *Client) CreateSubscriptionOrFail( c.T.Logf("Getting v1beta1 subscription %s for channel %+v-%s", name, channelTypeMeta, channelName) // update subscription with the new reference var e error - retSubscription, e = subscriptions.Get(name, metav1.GetOptions{}) + retSubscription, e = subscriptions.Get(context.Background(), name, metav1.GetOptions{}) if e != nil { c.T.Logf("Failed to get subscription %q: %v", name, e) } @@ -191,7 +192,7 @@ func (c *Client) CreateSubscriptionV1OrFail( c.T.Logf("Creating v1 subscription %s for channel %+v-%s", name, channelTypeMeta, channelName) // update subscription with the new reference var e error - retSubscription, e = subscriptions.Create(subscription) + retSubscription, e = subscriptions.Create(context.Background(), subscription, metav1.CreateOptions{}) if e != nil { c.T.Logf("Failed to create subscription %q: %v", name, e) } @@ -205,7 +206,7 @@ func (c *Client) CreateSubscriptionV1OrFail( c.T.Logf("Getting v1 subscription %s for channel %+v-%s", name, channelTypeMeta, channelName) // update subscription with the new reference var e error - retSubscription, e = subscriptions.Get(name, metav1.GetOptions{}) + retSubscription, e = subscriptions.Get(context.Background(), name, metav1.GetOptions{}) if e != nil { c.T.Logf("Failed to create subscription %q: %v", name, e) } @@ -248,7 +249,7 @@ func (c *Client) CreateSubscriptionsV1OrFail( // CreateConfigMapOrFail will create a configmap or fail the test if there is an error. func (c *Client) CreateConfigMapOrFail(name, namespace string, data map[string]string) *corev1.ConfigMap { c.T.Logf("Creating configmap %s", name) - configMap, err := c.Kube.Kube.CoreV1().ConfigMaps(namespace).Create(resources.ConfigMap(name, namespace, data)) + configMap, err := c.Kube.Kube.CoreV1().ConfigMaps(namespace).Create(context.Background(), resources.ConfigMap(name, namespace, data), metav1.CreateOptions{}) if err != nil { c.T.Fatalf("Failed to create configmap %s: %v", name, err) } @@ -269,7 +270,7 @@ func (c *Client) CreateBrokerConfigMapOrFail(name string, channel *metav1.TypeMe `, channel.APIVersion, channel.Kind), }, } - _, err := c.Kube.Kube.CoreV1().ConfigMaps(c.Namespace).Create(cm) + _, err := c.Kube.Kube.CoreV1().ConfigMaps(c.Namespace).Create(context.Background(), cm, metav1.CreateOptions{}) if err != nil { c.T.Fatalf("Failed to create broker config %q: %v", name, err) } @@ -291,7 +292,7 @@ func (c *Client) CreateBrokerV1Beta1OrFail(name string, options ...resources.Bro c.T.Logf("Creating v1beta1 broker %s", name) // update broker with the new reference var e error - retBroker, e = brokers.Create(broker) + retBroker, e = brokers.Create(context.Background(), broker, metav1.CreateOptions{}) if e != nil { c.T.Logf("Failed to create v1beta1 broker %q: %v", name, e) } @@ -305,7 +306,7 @@ func (c *Client) CreateBrokerV1Beta1OrFail(name string, options ...resources.Bro c.T.Logf("Getting v1beta1 broker %s", name) // update broker with the new reference var e error - retBroker, e = brokers.Get(name, metav1.GetOptions{}) + retBroker, e = brokers.Get(context.Background(), name, metav1.GetOptions{}) if e != nil { c.T.Fatalf("Failed to get created v1beta1 broker %q: %v", name, e) } @@ -326,7 +327,7 @@ func (c *Client) CreateTriggerOrFailV1Beta1(name string, options ...resources.Tr c.T.Logf("Creating v1beta1 trigger %s", name) // update trigger with the new reference var e error - retTrigger, e = triggers.Create(trigger) + retTrigger, e = triggers.Create(context.Background(), trigger, metav1.CreateOptions{}) if e != nil { c.T.Logf("Failed to create v1beta1 trigger %q: %v", name, e) } @@ -342,7 +343,7 @@ func (c *Client) CreateTriggerOrFailV1Beta1(name string, options ...resources.Tr c.T.Logf("Getting v1beta1 trigger %s", name) // update trigger with the new reference var e error - retTrigger, e = triggers.Get(name, metav1.GetOptions{}) + retTrigger, e = triggers.Get(context.Background(), name, metav1.GetOptions{}) if e != nil { c.T.Logf("Failed to get created v1beta1 trigger %q: %v", name, e) } @@ -367,7 +368,7 @@ func (c *Client) CreateBrokerV1OrFail(name string, options ...resources.BrokerV1 c.T.Logf("Creating v1 broker %s", name) // update broker with the new reference var e error - retBroker, e = brokers.Create(broker) + retBroker, e = brokers.Create(context.Background(), broker, metav1.CreateOptions{}) if e != nil { c.T.Logf("Failed to create v1 broker %q: %v", name, e) } @@ -382,7 +383,7 @@ func (c *Client) CreateBrokerV1OrFail(name string, options ...resources.BrokerV1 c.T.Logf("Getting v1 broker %s", name) // update broker with the new reference var e error - retBroker, e = brokers.Get(name, metav1.GetOptions{}) + retBroker, e = brokers.Get(context.Background(), name, metav1.GetOptions{}) if e != nil { c.T.Logf("Failed to get created v1 broker %q: %v", name, e) } @@ -406,7 +407,7 @@ func (c *Client) CreateTriggerV1OrFail(name string, options ...resources.Trigger c.T.Logf("Creating v1 trigger %s", name) // update trigger with the new reference var e error - retTrigger, e = triggers.Create(trigger) + retTrigger, e = triggers.Create(context.Background(), trigger, metav1.CreateOptions{}) if e != nil { c.T.Logf("Failed to create v1 trigger %q: %v", name, e) } @@ -420,7 +421,7 @@ func (c *Client) CreateTriggerV1OrFail(name string, options ...resources.Trigger c.T.Logf("Getting v1 trigger %s", name) // update trigger with the new reference var e error - retTrigger, e = triggers.Get(name, metav1.GetOptions{}) + retTrigger, e = triggers.Get(context.Background(), name, metav1.GetOptions{}) if e != nil { c.T.Logf("Failed to get created v1 trigger %q: %v", name, e) } @@ -440,7 +441,7 @@ func (c *Client) CreateFlowsSequenceOrFail(sequence *flowsv1beta1.Sequence) { c.T.Logf("Creating flows sequence %+v", sequence) sequences := c.Eventing.FlowsV1beta1().Sequences(c.Namespace) err := c.RetryWebhookErrors(func(attempts int) (err error) { - _, e := sequences.Create(sequence) + _, e := sequences.Create(context.Background(), sequence, metav1.CreateOptions{}) if e != nil { c.T.Logf("Failed to create flows sequence %q: %v", sequence.Name, e) } @@ -458,7 +459,7 @@ func (c *Client) CreateFlowsSequenceV1OrFail(sequence *flowsv1.Sequence) { c.T.Logf("Creating flows sequence %+v", sequence) sequences := c.Eventing.FlowsV1().Sequences(c.Namespace) err := c.RetryWebhookErrors(func(attempts int) (err error) { - _, e := sequences.Create(sequence) + _, e := sequences.Create(context.Background(), sequence, metav1.CreateOptions{}) if e != nil { c.T.Logf("Failed to create flows sequence %q: %v", sequence.Name, e) } @@ -476,7 +477,7 @@ func (c *Client) CreateFlowsParallelOrFail(parallel *flowsv1beta1.Parallel) { c.T.Logf("Creating flows parallel %+v", parallel) parallels := c.Eventing.FlowsV1beta1().Parallels(c.Namespace) err := c.RetryWebhookErrors(func(attempts int) (err error) { - _, e := parallels.Create(parallel) + _, e := parallels.Create(context.Background(), parallel, metav1.CreateOptions{}) if e != nil { c.T.Logf("Failed to create flows parallel %q: %v", parallel.Name, e) } @@ -494,7 +495,7 @@ func (c *Client) CreateFlowsParallelV1OrFail(parallel *flowsv1.Parallel) { c.T.Logf("Creating flows parallel %+v", parallel) parallels := c.Eventing.FlowsV1().Parallels(c.Namespace) err := c.RetryWebhookErrors(func(attempts int) (err error) { - _, e := parallels.Create(parallel) + _, e := parallels.Create(context.Background(), parallel, metav1.CreateOptions{}) if e != nil { c.T.Logf("Failed to create flows parallel %q: %v", parallel.Name, e) } @@ -511,7 +512,7 @@ func (c *Client) CreateSinkBindingV1Alpha1OrFail(sb *sourcesv1alpha1.SinkBinding c.T.Logf("Creating sinkbinding %+v", sb) sbInterface := c.Eventing.SourcesV1alpha1().SinkBindings(c.Namespace) err := c.RetryWebhookErrors(func(attempts int) (err error) { - _, e := sbInterface.Create(sb) + _, e := sbInterface.Create(context.Background(), sb, metav1.CreateOptions{}) if e != nil { c.T.Logf("Failed to create sinkbinding %q: %v", sb.Name, e) } @@ -528,7 +529,7 @@ func (c *Client) CreateSinkBindingV1Alpha2OrFail(sb *sourcesv1alpha2.SinkBinding c.T.Logf("Creating sinkbinding %+v", sb) sbInterface := c.Eventing.SourcesV1alpha2().SinkBindings(c.Namespace) err := c.RetryWebhookErrors(func(attempts int) (err error) { - _, e := sbInterface.Create(sb) + _, e := sbInterface.Create(context.Background(), sb, metav1.CreateOptions{}) if e != nil { c.T.Logf("Failed to create sinkbinding %q: %v", sb.Name, e) } @@ -545,7 +546,7 @@ func (c *Client) CreateSinkBindingV1Beta1OrFail(sb *sourcesv1beta1.SinkBinding) c.T.Logf("Creating sinkbinding %+v", sb) sbInterface := c.Eventing.SourcesV1beta1().SinkBindings(c.Namespace) err := c.RetryWebhookErrors(func(attempts int) (err error) { - _, e := sbInterface.Create(sb) + _, e := sbInterface.Create(context.Background(), sb, metav1.CreateOptions{}) if e != nil { c.T.Logf("Failed to create sinkbinding %q: %v", sb.Name, e) } @@ -562,7 +563,7 @@ func (c *Client) CreateApiServerSourceV1Alpha2OrFail(apiServerSource *sourcesv1a c.T.Logf("Creating apiserversource %+v", apiServerSource) apiServerInterface := c.Eventing.SourcesV1alpha2().ApiServerSources(c.Namespace) err := c.RetryWebhookErrors(func(attempts int) (err error) { - _, e := apiServerInterface.Create(apiServerSource) + _, e := apiServerInterface.Create(context.Background(), apiServerSource, metav1.CreateOptions{}) if e != nil { c.T.Logf("Failed to create apiserversource %q: %v", apiServerSource.Name, err) } @@ -579,7 +580,7 @@ func (c *Client) CreateApiServerSourceV1Beta1OrFail(apiServerSource *sourcesv1be c.T.Logf("Creating apiserversource %+v", apiServerSource) apiServerInterface := c.Eventing.SourcesV1beta1().ApiServerSources(c.Namespace) err := c.RetryWebhookErrors(func(attempts int) (err error) { - _, e := apiServerInterface.Create(apiServerSource) + _, e := apiServerInterface.Create(context.Background(), apiServerSource, metav1.CreateOptions{}) if e != nil { c.T.Logf("Failed to create apiserversource %q: %v", apiServerSource.Name, e) } @@ -596,7 +597,7 @@ func (c *Client) CreateContainerSourceV1Alpha2OrFail(containerSource *sourcesv1a c.T.Logf("Creating containersource %+v", containerSource) containerInterface := c.Eventing.SourcesV1alpha2().ContainerSources(c.Namespace) err := c.RetryWebhookErrors(func(attempts int) (err error) { - _, e := containerInterface.Create(containerSource) + _, e := containerInterface.Create(context.Background(), containerSource, metav1.CreateOptions{}) if e != nil { c.T.Logf("Failed to create containersource %q: %v", containerSource.Name, e) } @@ -613,7 +614,7 @@ func (c *Client) CreateContainerSourceV1Beta1OrFail(containerSource *sourcesv1be c.T.Logf("Creating containersource %+v", containerSource) containerInterface := c.Eventing.SourcesV1beta1().ContainerSources(c.Namespace) err := c.RetryWebhookErrors(func(attempts int) (err error) { - _, e := containerInterface.Create(containerSource) + _, e := containerInterface.Create(context.Background(), containerSource, metav1.CreateOptions{}) if e != nil { c.T.Logf("Failed to create containersource %q: %v", containerSource.Name, e) } @@ -630,7 +631,7 @@ func (c *Client) CreatePingSourceV1Alpha2OrFail(pingSource *sourcesv1alpha2.Ping c.T.Logf("Creating pingsource %+v", pingSource) pingInterface := c.Eventing.SourcesV1alpha2().PingSources(c.Namespace) err := c.RetryWebhookErrors(func(attempts int) (err error) { - _, e := pingInterface.Create(pingSource) + _, e := pingInterface.Create(context.Background(), pingSource, metav1.CreateOptions{}) if e != nil { c.T.Logf("Failed to create pingsource %q: %v", pingSource.Name, e) } @@ -647,7 +648,7 @@ func (c *Client) CreatePingSourceV1Beta1OrFail(pingSource *sourcesv1beta1.PingSo c.T.Logf("Creating pingsource %+v", pingSource) pingInterface := c.Eventing.SourcesV1beta1().PingSources(c.Namespace) err := c.RetryWebhookErrors(func(attempts int) (err error) { - _, e := pingInterface.Create(pingSource) + _, e := pingInterface.Create(context.Background(), pingSource, metav1.CreateOptions{}) if e != nil { c.T.Logf("Failed to create pingsource %q: %v", pingSource.Name, e) } @@ -662,7 +663,7 @@ func (c *Client) CreatePingSourceV1Beta1OrFail(pingSource *sourcesv1beta1.PingSo func (c *Client) CreateServiceOrFail(svc *corev1.Service) *corev1.Service { c.T.Logf("Creating service %+v", svc) namespace := c.Namespace - if newSvc, err := c.Kube.Kube.CoreV1().Services(namespace).Create(svc); err != nil { + if newSvc, err := c.Kube.Kube.CoreV1().Services(namespace).Create(context.Background(), svc, metav1.CreateOptions{}); err != nil { c.T.Fatalf("Failed to create service %q: %v", svc.Name, err) return nil } else { @@ -678,7 +679,7 @@ func WithService(name string) func(*corev1.Pod, *Client) error { svc := resources.ServiceDefaultHTTP(name, pod.Labels) svcs := client.Kube.Kube.CoreV1().Services(namespace) - if _, err := svcs.Create(svc); err != nil { + if _, err := svcs.Create(context.Background(), svc, metav1.CreateOptions{}); err != nil { return err } client.Tracker.Add(coreAPIGroup, coreAPIVersion, "services", namespace, name) @@ -702,7 +703,7 @@ func (c *Client) CreatePodOrFail(pod *corev1.Pod, options ...func(*corev1.Pod, * err := reconciler.RetryUpdateConflicts(func(attempts int) (err error) { c.T.Logf("Creating pod %+v", pod) - _, e := c.Kube.CreatePod(pod) + _, e := c.Kube.CreatePod(context.Background(), pod) return e }) if err != nil { @@ -732,7 +733,7 @@ func (c *Client) CreateDeploymentOrFail(deploy *appsv1.Deployment, options ...fu c.applyTracingEnv(&deploy.Spec.Template.Spec) c.T.Logf("Creating deployment %+v", deploy) - if _, err := c.Kube.Kube.AppsV1().Deployments(deploy.Namespace).Create(deploy); err != nil { + if _, err := c.Kube.Kube.AppsV1().Deployments(deploy.Namespace).Create(context.Background(), deploy, metav1.CreateOptions{}); err != nil { c.T.Fatalf("Failed to create deploy %q: %v", deploy.Name, err) } c.Tracker.Add("apps", "v1", "deployments", namespace, deploy.Name) @@ -753,7 +754,7 @@ func (c *Client) CreateCronJobOrFail(cronjob *batchv1beta1.CronJob, options ...f c.applyTracingEnv(&cronjob.Spec.JobTemplate.Spec.Template.Spec) c.T.Logf("Creating cronjob %+v", cronjob) - if _, err := c.Kube.Kube.BatchV1beta1().CronJobs(cronjob.Namespace).Create(cronjob); err != nil { + if _, err := c.Kube.Kube.BatchV1beta1().CronJobs(cronjob.Namespace).Create(context.Background(), cronjob, metav1.CreateOptions{}); err != nil { c.T.Fatalf("Failed to create cronjob %q: %v", cronjob.Name, err) } c.Tracker.Add("batch", "v1beta1", "cronjobs", namespace, cronjob.Name) @@ -765,7 +766,7 @@ func (c *Client) CreateServiceAccountOrFail(saName string) { sa := resources.ServiceAccount(saName, namespace) sas := c.Kube.Kube.CoreV1().ServiceAccounts(namespace) c.T.Logf("Creating service account %+v", sa) - if _, err := sas.Create(sa); err != nil { + if _, err := sas.Create(context.Background(), sa, metav1.CreateOptions{}); err != nil { c.T.Fatalf("Failed to create service account %q: %v", saName, err) } c.Tracker.Add(coreAPIGroup, coreAPIVersion, "serviceaccounts", namespace, saName) @@ -784,7 +785,7 @@ func (c *Client) CreateServiceAccountOrFail(saName string) { func (c *Client) CreateClusterRoleOrFail(cr *rbacv1.ClusterRole) { c.T.Logf("Creating cluster role %+v", cr) crs := c.Kube.Kube.RbacV1().ClusterRoles() - if _, err := crs.Create(cr); err != nil && !errors.IsAlreadyExists(err) { + if _, err := crs.Create(context.Background(), cr, metav1.CreateOptions{}); err != nil && !errors.IsAlreadyExists(err) { c.T.Fatalf("Failed to create cluster role %q: %v", cr.Name, err) } c.Tracker.Add(rbacAPIGroup, rbacAPIVersion, "clusterroles", "", cr.Name) @@ -795,7 +796,7 @@ func (c *Client) CreateRoleOrFail(r *rbacv1.Role) { c.T.Logf("Creating role %+v", r) namespace := c.Namespace rs := c.Kube.Kube.RbacV1().Roles(namespace) - if _, err := rs.Create(r); err != nil && !errors.IsAlreadyExists(err) { + if _, err := rs.Create(context.Background(), r, metav1.CreateOptions{}); err != nil && !errors.IsAlreadyExists(err) { c.T.Fatalf("Failed to create role %q: %v", r.Name, err) } c.Tracker.Add(rbacAPIGroup, rbacAPIVersion, "roles", namespace, r.Name) @@ -813,7 +814,7 @@ func (c *Client) CreateRoleBindingOrFail(saName, rKind, rName, rbName, rbNamespa rbs := c.Kube.Kube.RbacV1().RoleBindings(rbNamespace) c.T.Logf("Creating role binding %+v", rb) - if _, err := rbs.Create(rb); err != nil && !errors.IsAlreadyExists(err) { + if _, err := rbs.Create(context.Background(), rb, metav1.CreateOptions{}); err != nil && !errors.IsAlreadyExists(err) { c.T.Fatalf("Failed to create role binding %q: %v", rbName, err) } c.Tracker.Add(rbacAPIGroup, rbacAPIVersion, "rolebindings", rbNamespace, rb.GetName()) @@ -826,7 +827,7 @@ func (c *Client) CreateClusterRoleBindingOrFail(saName, crName, crbName string) crbs := c.Kube.Kube.RbacV1().ClusterRoleBindings() c.T.Logf("Creating cluster role binding %+v", crb) - if _, err := crbs.Create(crb); err != nil && !errors.IsAlreadyExists(err) { + if _, err := crbs.Create(context.Background(), crb, metav1.CreateOptions{}); err != nil && !errors.IsAlreadyExists(err) { c.T.Fatalf("Failed to create cluster role binding %q: %v", crbName, err) } c.Tracker.Add(rbacAPIGroup, rbacAPIVersion, "clusterrolebindings", "", crb.GetName()) diff --git a/vendor/knative.dev/eventing/test/lib/duck/resource_creators.go b/vendor/knative.dev/eventing/test/lib/duck/resource_creators.go index d9ee439173..0869cb8c0a 100644 --- a/vendor/knative.dev/eventing/test/lib/duck/resource_creators.go +++ b/vendor/knative.dev/eventing/test/lib/duck/resource_creators.go @@ -19,6 +19,7 @@ limitations under the License. package duck import ( + "context" "encoding/json" "k8s.io/apimachinery/pkg/api/meta" @@ -46,7 +47,7 @@ func CreateGenericChannelObject( } channelResourceInterface := dynamicClient.Resource(gvr).Namespace(obj.Namespace) - _, err = channelResourceInterface.Create(newChannel, metav1.CreateOptions{}) + _, err = channelResourceInterface.Create(context.Background(), newChannel, metav1.CreateOptions{}) return gvr, err } diff --git a/vendor/knative.dev/eventing/test/lib/duck/resource_getters.go b/vendor/knative.dev/eventing/test/lib/duck/resource_getters.go index 78f5c295ec..35812337d4 100644 --- a/vendor/knative.dev/eventing/test/lib/duck/resource_getters.go +++ b/vendor/knative.dev/eventing/test/lib/duck/resource_getters.go @@ -19,6 +19,7 @@ limitations under the License. package duck import ( + "context" "fmt" "strings" @@ -65,7 +66,7 @@ func GetGenericObject( var u *unstructured.Unstructured err := RetryWebhookErrors(func(attempts int) (err error) { var e error - u, e = dynamicClient.Resource(gvr).Namespace(obj.Namespace).Get(obj.Name, metav1.GetOptions{}) + u, e = dynamicClient.Resource(gvr).Namespace(obj.Namespace).Get(context.Background(), obj.Name, metav1.GetOptions{}) if e != nil { // TODO: Plumb some sort of logging here fmt.Printf("Failed to get %s/%s: %v", obj.Namespace, obj.Name, e) @@ -93,7 +94,7 @@ func GetGenericObjectList( ) ([]runtime.Object, error) { // get the resource's namespace and gvr gvr, _ := meta.UnsafeGuessKindToResource(objList.GroupVersionKind()) - ul, err := dynamicClient.Resource(gvr).Namespace(objList.Namespace).List(metav1.ListOptions{}) + ul, err := dynamicClient.Resource(gvr).Namespace(objList.Namespace).List(context.Background(), metav1.ListOptions{}) if err != nil { return nil, err diff --git a/vendor/knative.dev/eventing/test/lib/duck/serving_checks.go b/vendor/knative.dev/eventing/test/lib/duck/serving_checks.go index 123e6241c4..bcfb37c267 100644 --- a/vendor/knative.dev/eventing/test/lib/duck/serving_checks.go +++ b/vendor/knative.dev/eventing/test/lib/duck/serving_checks.go @@ -16,6 +16,8 @@ package duck import ( + "context" + appsv1 "k8s.io/api/apps/v1" "k8s.io/apimachinery/pkg/util/wait" "knative.dev/eventing/test/lib/resources" @@ -29,7 +31,7 @@ func WaitForKServiceReady(client resources.ServingClient, name, namespace string } // WaitForKServiceScales will wait until ksvc scale is satisfied -func WaitForKServiceScales(client resources.ServingClient, name, namespace string, satisfyScale func(int) bool) error { +func WaitForKServiceScales(ctx context.Context, client resources.ServingClient, name, namespace string, satisfyScale func(int) bool) error { err := WaitForKServiceReady(client, name, namespace) if err != nil { return err @@ -42,7 +44,7 @@ func WaitForKServiceScales(client resources.ServingClient, name, namespace strin return satisfyScale(int(dep.Status.ReadyReplicas)), nil } return test.WaitForDeploymentState( - client.Kube, deploymentName, inState, "scales", namespace, timeout, + ctx, client.Kube, deploymentName, inState, "scales", namespace, timeout, ) } diff --git a/vendor/knative.dev/eventing/test/lib/logexporter.go b/vendor/knative.dev/eventing/test/lib/logexporter.go index fd163ba92e..a4f3c54c22 100644 --- a/vendor/knative.dev/eventing/test/lib/logexporter.go +++ b/vendor/knative.dev/eventing/test/lib/logexporter.go @@ -17,6 +17,7 @@ limitations under the License. package lib import ( + "context" "fmt" "log" "os" @@ -41,7 +42,7 @@ func exportLogs(kubeClient *test.KubeClient, namespace, dir string, logFunc func return fmt.Errorf("error creating directory %q: %w", namespace, err) } - pods, err := kubeClient.Kube.CoreV1().Pods(namespace).List(metav1.ListOptions{}) + pods, err := kubeClient.Kube.CoreV1().Pods(namespace).List(context.Background(), metav1.ListOptions{}) if err != nil { return fmt.Errorf("error listing pods in namespace %q: %w", namespace, err) } @@ -55,7 +56,7 @@ func exportLogs(kubeClient *test.KubeClient, namespace, dir string, logFunc func if err != nil { errs = append(errs, fmt.Errorf("error creating file %q: %w", fn, err)) } - log, err := kubeClient.PodLogs(pod.Name, ct.Name, pod.Namespace) + log, err := kubeClient.PodLogs(context.Background(), pod.Name, ct.Name, pod.Namespace) if err != nil { errs = append(errs, fmt.Errorf("error getting logs for pod %q container %q: %w", pod.Name, ct.Name, err)) } diff --git a/vendor/knative.dev/eventing/test/lib/operation.go b/vendor/knative.dev/eventing/test/lib/operation.go index b74bc85238..35cdac11b8 100644 --- a/vendor/knative.dev/eventing/test/lib/operation.go +++ b/vendor/knative.dev/eventing/test/lib/operation.go @@ -17,6 +17,7 @@ limitations under the License. package lib import ( + "context" "fmt" "time" @@ -32,7 +33,7 @@ import ( // LabelNamespace labels the given namespace with the labels map. func (c *Client) LabelNamespace(labels map[string]string) error { namespace := c.Namespace - nsSpec, err := c.Kube.Kube.CoreV1().Namespaces().Get(namespace, metav1.GetOptions{}) + nsSpec, err := c.Kube.Kube.CoreV1().Namespaces().Get(context.Background(), namespace, metav1.GetOptions{}) if err != nil { return err } @@ -42,7 +43,7 @@ func (c *Client) LabelNamespace(labels map[string]string) error { for k, v := range labels { nsSpec.Labels[k] = v } - _, err = c.Kube.Kube.CoreV1().Namespaces().Update(nsSpec) + _, err = c.Kube.Kube.CoreV1().Namespaces().Update(context.Background(), nsSpec, metav1.UpdateOptions{}) return err } @@ -86,7 +87,7 @@ func (c *Client) WaitForResourcesReadyOrFail(typemeta *metav1.TypeMeta) { } // WaitForAllTestResourcesReady waits until all test resources in the namespace are Ready. -func (c *Client) WaitForAllTestResourcesReady() error { +func (c *Client) WaitForAllTestResourcesReady(ctx context.Context) error { // wait for all Knative resources created in this test to become ready. err := c.RetryWebhookErrors(func(attempts int) (err error) { e := c.Tracker.WaitForKResourcesReady() @@ -100,7 +101,7 @@ func (c *Client) WaitForAllTestResourcesReady() error { } // Explicitly wait for all pods that were created directly by this test to become ready. for _, n := range c.podsCreated { - if err := pkgTest.WaitForPodRunning(c.Kube, n, c.Namespace); err != nil { + if err := pkgTest.WaitForPodRunning(ctx, c.Kube, n, c.Namespace); err != nil { return fmt.Errorf("created Pod %q did not become ready: %+v", n, errors.WithStack(err)) } } @@ -110,15 +111,15 @@ func (c *Client) WaitForAllTestResourcesReady() error { return nil } -func (c *Client) WaitForAllTestResourcesReadyOrFail() { - if err := c.WaitForAllTestResourcesReady(); err != nil { +func (c *Client) WaitForAllTestResourcesReadyOrFail(ctx context.Context) { + if err := c.WaitForAllTestResourcesReady(ctx); err != nil { c.T.Fatalf("Failed to get all test resources ready: %+v", errors.WithStack(err)) } } -func (c *Client) WaitForServiceEndpointsOrFail(svcName string, numberOfExpectedEndpoints int) { +func (c *Client) WaitForServiceEndpointsOrFail(ctx context.Context, svcName string, numberOfExpectedEndpoints int) { c.T.Logf("Waiting for %d endpoints in service %s", numberOfExpectedEndpoints, svcName) - if err := pkgTest.WaitForServiceEndpoints(c.Kube, svcName, c.Namespace, numberOfExpectedEndpoints); err != nil { + if err := pkgTest.WaitForServiceEndpoints(ctx, c.Kube, svcName, c.Namespace, numberOfExpectedEndpoints); err != nil { c.T.Fatalf("Failed while waiting for %d endpoints in service %s: %+v", numberOfExpectedEndpoints, svcName, errors.WithStack(err)) } } diff --git a/vendor/knative.dev/eventing/test/lib/recordevents/event_info.go b/vendor/knative.dev/eventing/test/lib/recordevents/event_info.go index e3fac76795..dc0ffd1f0b 100644 --- a/vendor/knative.dev/eventing/test/lib/recordevents/event_info.go +++ b/vendor/knative.dev/eventing/test/lib/recordevents/event_info.go @@ -17,6 +17,7 @@ limitations under the License. package recordevents import ( + "context" "encoding/json" "fmt" "io/ioutil" @@ -129,7 +130,7 @@ func newEventGetter(podName string, client *testlib.Client, logf logging.FormatL // returns a pod list for compatibility with the monitoring.PortForward // interface func (eg *eventGetter) getRunningPodInfo(podName, namespace string) (*v1.PodList, error) { - pods, err := eg.kubeClientset.CoreV1().Pods(namespace).List( + pods, err := eg.kubeClientset.CoreV1().Pods(namespace).List(context.Background(), metav1.ListOptions{FieldSelector: fmt.Sprintf("metadata.name=%s", podName)}) if err == nil && len(pods.Items) != 1 { err = fmt.Errorf("no %s Pod found on the cluster", podName) diff --git a/vendor/knative.dev/eventing/test/lib/recordevents/event_info_store.go b/vendor/knative.dev/eventing/test/lib/recordevents/event_info_store.go index 3b0c46cf44..52fcbae3cd 100644 --- a/vendor/knative.dev/eventing/test/lib/recordevents/event_info_store.go +++ b/vendor/knative.dev/eventing/test/lib/recordevents/event_info_store.go @@ -17,6 +17,7 @@ limitations under the License. package recordevents import ( + "context" "fmt" "strconv" "strings" @@ -100,14 +101,14 @@ func NewEventInfoStore(client *testlib.Client, podName string) (*EventInfoStore, type EventRecordOption = func(*corev1.Pod, *testlib.Client) error // Deploys a new recordevents pod and start the associated EventInfoStore -func StartEventRecordOrFail(client *testlib.Client, podName string, options ...EventRecordOption) (*EventInfoStore, *corev1.Pod) { +func StartEventRecordOrFail(ctx context.Context, client *testlib.Client, podName string, options ...EventRecordOption) (*EventInfoStore, *corev1.Pod) { eventRecordPod := resources.EventRecordPod(podName) client.CreatePodOrFail(eventRecordPod, append(options, testlib.WithService(podName))...) - err := pkgTest.WaitForPodRunning(client.Kube, podName, client.Namespace) + err := pkgTest.WaitForPodRunning(ctx, client.Kube, podName, client.Namespace) if err != nil { client.T.Fatalf("Failed to start the recordevent pod '%s': %v", podName, errors.WithStack(err)) } - client.WaitForServiceEndpointsOrFail(podName, 1) + client.WaitForServiceEndpointsOrFail(ctx, podName, 1) eventTracker, err := NewEventInfoStore(client, podName) if err != nil { diff --git a/vendor/knative.dev/eventing/test/lib/resources/serving.go b/vendor/knative.dev/eventing/test/lib/resources/serving.go index ec0d8f7654..e015aadd71 100644 --- a/vendor/knative.dev/eventing/test/lib/resources/serving.go +++ b/vendor/knative.dev/eventing/test/lib/resources/serving.go @@ -19,6 +19,7 @@ package resources // This file contains functions that construct Serving resources. import ( + "context" "fmt" corev1 "k8s.io/api/core/v1" @@ -74,7 +75,7 @@ func KServiceRef(name string) *corev1.ObjectReference { // If ksvc isn't ready yet second return value will be false. func KServiceRoutes(client ServingClient, name, namespace string) ([]KServiceRoute, bool, error) { serving := client.Dynamic.Resource(KServicesGVR).Namespace(namespace) - unstruct, err := serving.Get(name, metav1.GetOptions{}) + unstruct, err := serving.Get(context.Background(), name, metav1.GetOptions{}) if k8serrors.IsNotFound(err) { // Return false as we are not done yet. // We swallow the error to keep on polling. diff --git a/vendor/knative.dev/eventing/test/lib/send_event.go b/vendor/knative.dev/eventing/test/lib/send_event.go index 94466ee170..162bd0ddf1 100644 --- a/vendor/knative.dev/eventing/test/lib/send_event.go +++ b/vendor/knative.dev/eventing/test/lib/send_event.go @@ -17,6 +17,8 @@ limitations under the License. package lib import ( + "context" + "github.com/pkg/errors" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -29,6 +31,7 @@ import ( // SendEventToAddressable will send the given event to the given Addressable. func (c *Client) SendEventToAddressable( + ctx context.Context, senderName, addressableName string, typemeta *metav1.TypeMeta, @@ -39,11 +42,12 @@ func (c *Client) SendEventToAddressable( if err != nil { c.T.Fatalf("Failed to get the URI for %+v-%s", typemeta, addressableName) } - c.SendEvent(senderName, uri, event, option...) + c.SendEvent(ctx, senderName, uri, event, option...) } // SendEvent will create a sender pod, which will send the given event to the given url. func (c *Client) SendEvent( + ctx context.Context, senderName string, uri string, event cloudevents.Event, @@ -55,13 +59,14 @@ func (c *Client) SendEvent( c.T.Fatalf("Failed to create event-sender pod: %+v", errors.WithStack(err)) } c.CreatePodOrFail(pod) - if err := pkgTest.WaitForPodRunning(c.Kube, senderName, namespace); err != nil { + if err := pkgTest.WaitForPodRunning(ctx, c.Kube, senderName, namespace); err != nil { c.T.Fatalf("Failed to send event %v to %s: %+v", event, uri, errors.WithStack(err)) } } // SendRequestToAddressable will send the given request to the given Addressable. func (c *Client) SendRequestToAddressable( + ctx context.Context, senderName, addressableName string, typemeta *metav1.TypeMeta, @@ -73,11 +78,12 @@ func (c *Client) SendRequestToAddressable( if err != nil { c.T.Fatalf("Failed to get the URI for %+v-%s", typemeta, addressableName) } - c.SendRequest(senderName, uri, headers, body, option...) + c.SendRequest(ctx, senderName, uri, headers, body, option...) } // SendRequest will create a sender pod, which will send the given request to the given url. func (c *Client) SendRequest( + ctx context.Context, senderName string, uri string, headers map[string]string, @@ -90,7 +96,7 @@ func (c *Client) SendRequest( c.T.Fatalf("Failed to create request-sender pod: %+v", errors.WithStack(err)) } c.CreatePodOrFail(pod) - if err := pkgTest.WaitForPodRunning(c.Kube, senderName, namespace); err != nil { + if err := pkgTest.WaitForPodRunning(ctx, c.Kube, senderName, namespace); err != nil { c.T.Fatalf("Failed to send request to %s: %+v", uri, errors.WithStack(err)) } } diff --git a/vendor/knative.dev/eventing/test/lib/test_runner.go b/vendor/knative.dev/eventing/test/lib/test_runner.go index ec14909f25..745bd67de0 100644 --- a/vendor/knative.dev/eventing/test/lib/test_runner.go +++ b/vendor/knative.dev/eventing/test/lib/test_runner.go @@ -17,6 +17,7 @@ limitations under the License. package lib import ( + "context" "fmt" "path/filepath" "testing" @@ -187,7 +188,7 @@ func TearDown(client *Client) { } // Dump the events in the namespace - el, err := client.Kube.Kube.CoreV1().Events(client.Namespace).List(metav1.ListOptions{}) + el, err := client.Kube.Kube.CoreV1().Events(client.Namespace).List(context.Background(), metav1.ListOptions{}) if err != nil { client.T.Logf("Could not list events in the namespace %q: %v", client.Namespace, err) } else { @@ -214,11 +215,11 @@ func TearDown(client *Client) { // CreateNamespaceIfNeeded creates a new namespace if it does not exist. func CreateNamespaceIfNeeded(t *testing.T, client *Client, namespace string) { - _, err := client.Kube.Kube.CoreV1().Namespaces().Get(namespace, metav1.GetOptions{}) + _, err := client.Kube.Kube.CoreV1().Namespaces().Get(context.Background(), namespace, metav1.GetOptions{}) if err != nil && apierrs.IsNotFound(err) { nsSpec := &corev1.Namespace{ObjectMeta: metav1.ObjectMeta{Name: namespace}} - _, err = client.Kube.Kube.CoreV1().Namespaces().Create(nsSpec) + _, err = client.Kube.Kube.CoreV1().Namespaces().Create(context.Background(), nsSpec, metav1.CreateOptions{}) if err != nil { t.Fatalf("Failed to create Namespace: %s; %v", namespace, err) @@ -246,7 +247,7 @@ func CreateNamespaceIfNeeded(t *testing.T, client *Client, namespace string) { func waitForServiceAccountExists(client *Client, name, namespace string) error { return wait.PollImmediate(1*time.Second, 2*time.Minute, func() (bool, error) { sas := client.Kube.Kube.CoreV1().ServiceAccounts(namespace) - if _, err := sas.Get(name, metav1.GetOptions{}); err == nil { + if _, err := sas.Get(context.Background(), name, metav1.GetOptions{}); err == nil { return true, nil } return false, nil @@ -255,9 +256,9 @@ func waitForServiceAccountExists(client *Client, name, namespace string) error { // DeleteNameSpace deletes the namespace that has the given name. func DeleteNameSpace(client *Client) error { - _, err := client.Kube.Kube.CoreV1().Namespaces().Get(client.Namespace, metav1.GetOptions{}) + _, err := client.Kube.Kube.CoreV1().Namespaces().Get(context.Background(), client.Namespace, metav1.GetOptions{}) if err == nil || !apierrs.IsNotFound(err) { - return client.Kube.Kube.CoreV1().Namespaces().Delete(client.Namespace, nil) + return client.Kube.Kube.CoreV1().Namespaces().Delete(context.Background(), client.Namespace, metav1.DeleteOptions{}) } return err } diff --git a/vendor/knative.dev/eventing/test/lib/tracker.go b/vendor/knative.dev/eventing/test/lib/tracker.go index 6c718edfb9..0fca5aef43 100644 --- a/vendor/knative.dev/eventing/test/lib/tracker.go +++ b/vendor/knative.dev/eventing/test/lib/tracker.go @@ -20,6 +20,7 @@ limitations under the License. package lib import ( + "context" "encoding/json" "fmt" "testing" @@ -118,7 +119,7 @@ func (t *Tracker) AddObj(obj kmeta.OwnerRefable) { func (t *Tracker) Clean(awaitDeletion bool) error { logf := t.tc.Logf for _, deleter := range t.resourcesToClean { - r, err := deleter.Resource.Get(deleter.Name, metav1.GetOptions{}) + r, err := deleter.Resource.Get(context.Background(), deleter.Name, metav1.GetOptions{}) if err != nil { logf("Failed to get to-be cleaned resource %q : %v", deleter.Name, err) } else { @@ -130,12 +131,12 @@ func (t *Tracker) Clean(awaitDeletion bool) error { logf("Cleaning resource: %q", deleter.Name) } } - if err := deleter.Resource.Delete(deleter.Name, nil); err != nil { + if err := deleter.Resource.Delete(context.Background(), deleter.Name, metav1.DeleteOptions{}); err != nil { logf("Failed to clean the resource %q : %v", deleter.Name, err) } else if awaitDeletion { logf("Waiting for %s to be deleted", deleter.Name) if err := wait.PollImmediate(interval, timeout, func() (bool, error) { - if _, err := deleter.Resource.Get(deleter.Name, metav1.GetOptions{}); err != nil { + if _, err := deleter.Resource.Get(context.Background(), deleter.Name, metav1.GetOptions{}); err != nil { return true, nil } return false, nil diff --git a/vendor/knative.dev/eventing/test/performance/infra/image_helpers.go b/vendor/knative.dev/eventing/test/performance/infra/image_helpers.go index 65512702b4..c6d65eb6d3 100644 --- a/vendor/knative.dev/eventing/test/performance/infra/image_helpers.go +++ b/vendor/knative.dev/eventing/test/performance/infra/image_helpers.go @@ -17,6 +17,7 @@ limitations under the License. package infra import ( + "context" "flag" "fmt" "log" @@ -159,5 +160,5 @@ func waitForPods(namespace string) error { return err } - return pkgtest.WaitForAllPodsRunning(c, namespace) + return pkgtest.WaitForAllPodsRunning(context.Background(), c, namespace) } diff --git a/vendor/knative.dev/pkg/apis/duck/cached.go b/vendor/knative.dev/pkg/apis/duck/cached.go index 67aebc6d7d..e0958f1bb9 100644 --- a/vendor/knative.dev/pkg/apis/duck/cached.go +++ b/vendor/knative.dev/pkg/apis/duck/cached.go @@ -17,6 +17,7 @@ limitations under the License. package duck import ( + "context" "sync" "k8s.io/apimachinery/pkg/runtime/schema" @@ -36,7 +37,7 @@ type CachedInformerFactory struct { var _ InformerFactory = (*CachedInformerFactory)(nil) // Get implements InformerFactory. -func (cif *CachedInformerFactory) Get(gvr schema.GroupVersionResource) (cache.SharedIndexInformer, cache.GenericLister, error) { +func (cif *CachedInformerFactory) Get(ctx context.Context, gvr schema.GroupVersionResource) (cache.SharedIndexInformer, cache.GenericLister, error) { cif.m.Lock() if cif.cache == nil { @@ -57,7 +58,7 @@ func (cif *CachedInformerFactory) Get(gvr schema.GroupVersionResource) (cache.Sh return } - ic.inf, ic.lister, ic.err = cif.Delegate.Get(gvr) + ic.inf, ic.lister, ic.err = cif.Delegate.Get(ctx, gvr) } cif.cache[gvr] = ic } diff --git a/vendor/knative.dev/pkg/apis/duck/enqueue.go b/vendor/knative.dev/pkg/apis/duck/enqueue.go index 1ef966ec74..ec5026f5f1 100644 --- a/vendor/knative.dev/pkg/apis/duck/enqueue.go +++ b/vendor/knative.dev/pkg/apis/duck/enqueue.go @@ -17,6 +17,8 @@ limitations under the License. package duck import ( + "context" + "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/client-go/tools/cache" ) @@ -33,8 +35,8 @@ type EnqueueInformerFactory struct { var _ InformerFactory = (*EnqueueInformerFactory)(nil) // Get implements InformerFactory. -func (cif *EnqueueInformerFactory) Get(gvr schema.GroupVersionResource) (cache.SharedIndexInformer, cache.GenericLister, error) { - inf, lister, err := cif.Delegate.Get(gvr) +func (cif *EnqueueInformerFactory) Get(ctx context.Context, gvr schema.GroupVersionResource) (cache.SharedIndexInformer, cache.GenericLister, error) { + inf, lister, err := cif.Delegate.Get(ctx, gvr) if err != nil { return nil, nil, err } diff --git a/vendor/knative.dev/pkg/apis/duck/interface.go b/vendor/knative.dev/pkg/apis/duck/interface.go index 99cf4ac29c..6adc58bf95 100644 --- a/vendor/knative.dev/pkg/apis/duck/interface.go +++ b/vendor/knative.dev/pkg/apis/duck/interface.go @@ -17,6 +17,8 @@ limitations under the License. package duck import ( + "context" + "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/client-go/tools/cache" "knative.dev/pkg/kmeta" @@ -26,7 +28,7 @@ import ( // InformerFactory is used to create Informer/Lister pairs for a schema.GroupVersionResource type InformerFactory interface { // Get returns a synced Informer/Lister pair for the provided schema.GroupVersionResource. - Get(schema.GroupVersionResource) (cache.SharedIndexInformer, cache.GenericLister, error) + Get(context.Context, schema.GroupVersionResource) (cache.SharedIndexInformer, cache.GenericLister, error) } // OneOfOurs is the union of our Accessor interface and the OwnerRefable interface diff --git a/vendor/knative.dev/pkg/apis/duck/typed.go b/vendor/knative.dev/pkg/apis/duck/typed.go index d6fa034515..a43defadff 100644 --- a/vendor/knative.dev/pkg/apis/duck/typed.go +++ b/vendor/knative.dev/pkg/apis/duck/typed.go @@ -17,6 +17,7 @@ limitations under the License. package duck import ( + "context" "fmt" "net/http" "time" @@ -45,17 +46,17 @@ type TypedInformerFactory struct { var _ InformerFactory = (*TypedInformerFactory)(nil) // Get implements InformerFactory. -func (dif *TypedInformerFactory) Get(gvr schema.GroupVersionResource) (cache.SharedIndexInformer, cache.GenericLister, error) { +func (dif *TypedInformerFactory) Get(ctx context.Context, gvr schema.GroupVersionResource) (cache.SharedIndexInformer, cache.GenericLister, error) { // Avoid error cases, like the GVR does not exist. // It is not a full check. Some RBACs might sneak by, but the window is very small. - if _, err := dif.Client.Resource(gvr).List(metav1.ListOptions{}); err != nil { + if _, err := dif.Client.Resource(gvr).List(ctx, metav1.ListOptions{}); err != nil { return nil, nil, err } listObj := dif.Type.GetListType() lw := &cache.ListWatch{ - ListFunc: asStructuredLister(dif.Client.Resource(gvr).List, listObj), - WatchFunc: AsStructuredWatcher(dif.Client.Resource(gvr).Watch, dif.Type), + ListFunc: asStructuredLister(ctx, dif.Client.Resource(gvr).List, listObj), + WatchFunc: AsStructuredWatcher(ctx, dif.Client.Resource(gvr).Watch, dif.Type), } inf := cache.NewSharedIndexInformer(lw, dif.Type, dif.ResyncPeriod, cache.Indexers{ cache.NamespaceIndex: cache.MetaNamespaceIndexFunc, @@ -72,11 +73,11 @@ func (dif *TypedInformerFactory) Get(gvr schema.GroupVersionResource) (cache.Sha return inf, lister, nil } -type unstructuredLister func(metav1.ListOptions) (*unstructured.UnstructuredList, error) +type unstructuredLister func(context.Context, metav1.ListOptions) (*unstructured.UnstructuredList, error) -func asStructuredLister(ulist unstructuredLister, listObj runtime.Object) cache.ListFunc { +func asStructuredLister(ctx context.Context, ulist unstructuredLister, listObj runtime.Object) cache.ListFunc { return func(opts metav1.ListOptions) (runtime.Object, error) { - ul, err := ulist(opts) + ul, err := ulist(ctx, opts) if err != nil { return nil, err } @@ -88,11 +89,13 @@ func asStructuredLister(ulist unstructuredLister, listObj runtime.Object) cache. } } +type structuredWatcher func(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + // AsStructuredWatcher is public for testing only. // TODO(mattmoor): Move tests for this to `package duck` and make private. -func AsStructuredWatcher(wf cache.WatchFunc, obj runtime.Object) cache.WatchFunc { +func AsStructuredWatcher(ctx context.Context, wf structuredWatcher, obj runtime.Object) cache.WatchFunc { return func(lo metav1.ListOptions) (watch.Interface, error) { - uw, err := wf(lo) + uw, err := wf(ctx, lo) if err != nil { return nil, err } diff --git a/vendor/knative.dev/pkg/codegen/cmd/injection-gen/generators/reconciler_reconciler.go b/vendor/knative.dev/pkg/codegen/cmd/injection-gen/generators/reconciler_reconciler.go index bf58061464..16c8a01611 100644 --- a/vendor/knative.dev/pkg/codegen/cmd/injection-gen/generators/reconciler_reconciler.go +++ b/vendor/knative.dev/pkg/codegen/cmd/injection-gen/generators/reconciler_reconciler.go @@ -131,6 +131,14 @@ func (g *reconcilerReconcilerGenerator) GenerateType(c *generator.Context, t *ty Package: "k8s.io/apimachinery/pkg/apis/meta/v1", Name: "GetOptions", }), + "metav1PatchOptions": c.Universe.Function(types.Name{ + Package: "k8s.io/apimachinery/pkg/apis/meta/v1", + Name: "PatchOptions", + }), + "metav1UpdateOptions": c.Universe.Function(types.Name{ + Package: "k8s.io/apimachinery/pkg/apis/meta/v1", + Name: "UpdateOptions", + }), "zapSugaredLogger": c.Universe.Type(types.Name{ Package: "go.uber.org/zap", Name: "SugaredLogger", @@ -508,7 +516,7 @@ func (r *reconcilerImpl) updateStatus(ctx {{.contextContext|raw}}, existing *{{. {{else}} getter := r.Client.{{.group}}{{.version}}().{{.type|apiGroup}}(desired.Namespace) {{end}} - existing, err = getter.Get(desired.Name, {{.metav1GetOptions|raw}}{}) + existing, err = getter.Get(ctx, desired.Name, {{.metav1GetOptions|raw}}{}) if err != nil { return err } @@ -530,7 +538,7 @@ func (r *reconcilerImpl) updateStatus(ctx {{.contextContext|raw}}, existing *{{. {{else}} updater := r.Client.{{.group}}{{.version}}().{{.type|apiGroup}}(existing.Namespace) {{end}} - _, err = updater.UpdateStatus(existing) + _, err = updater.UpdateStatus(ctx, existing, {{.metav1UpdateOptions|raw}}{}) return err }) } @@ -595,7 +603,7 @@ func (r *reconcilerImpl) updateFinalizersFiltered(ctx {{.contextContext|raw}}, r patcher := r.Client.{{.group}}{{.version}}().{{.type|apiGroup}}(resource.Namespace) {{end}} resourceName := resource.Name - resource, err = patcher.Patch(resourceName, {{.typesMergePatchType|raw}}, patch) + resource, err = patcher.Patch(ctx, resourceName, {{.typesMergePatchType|raw}}, patch, {{.metav1PatchOptions|raw}}{}) if err != nil { r.Recorder.Eventf(resource, {{.corev1EventTypeWarning|raw}}, "FinalizerUpdateFailed", "Failed to update finalizers for %q: %v", resourceName, err) diff --git a/vendor/knative.dev/pkg/controller/stats_reporter.go b/vendor/knative.dev/pkg/controller/stats_reporter.go index 6efaeca0f8..7ffa80d7b4 100644 --- a/vendor/knative.dev/pkg/controller/stats_reporter.go +++ b/vendor/knative.dev/pkg/controller/stats_reporter.go @@ -155,7 +155,11 @@ func init() { stats.UnitNone, ), } - kubemetrics.Register(cp.NewLatencyMetric(), cp.NewResultMetric()) + opts := kubemetrics.RegisterOpts{ + RequestLatency: cp.NewLatencyMetric(), + RequestResult: cp.NewResultMetric(), + } + kubemetrics.Register(opts) views := []*view.View{{ Description: "Depth of the work queue", diff --git a/vendor/knative.dev/pkg/injection/sharedmain/main.go b/vendor/knative.dev/pkg/injection/sharedmain/main.go index e27bb8763a..66b602e932 100644 --- a/vendor/knative.dev/pkg/injection/sharedmain/main.go +++ b/vendor/knative.dev/pkg/injection/sharedmain/main.go @@ -104,7 +104,7 @@ func GetLoggingConfig(ctx context.Context) (*logging.Config, error) { // e.g. istio sidecar needs a few seconds to configure the pod network. if err := wait.PollImmediate(1*time.Second, 5*time.Second, func() (bool, error) { var err error - loggingConfigMap, err = kubeclient.Get(ctx).CoreV1().ConfigMaps(system.Namespace()).Get(logging.ConfigMapName(), metav1.GetOptions{}) + loggingConfigMap, err = kubeclient.Get(ctx).CoreV1().ConfigMaps(system.Namespace()).Get(ctx, logging.ConfigMapName(), metav1.GetOptions{}) return err == nil || apierrors.IsNotFound(err), nil }); err != nil { return nil, err @@ -117,7 +117,7 @@ func GetLoggingConfig(ctx context.Context) (*logging.Config, error) { // GetLeaderElectionConfig gets the leader election config. func GetLeaderElectionConfig(ctx context.Context) (*leaderelection.Config, error) { - leaderElectionConfigMap, err := kubeclient.Get(ctx).CoreV1().ConfigMaps(system.Namespace()).Get(leaderelection.ConfigMapName(), metav1.GetOptions{}) + leaderElectionConfigMap, err := kubeclient.Get(ctx).CoreV1().ConfigMaps(system.Namespace()).Get(ctx, leaderelection.ConfigMapName(), metav1.GetOptions{}) if apierrors.IsNotFound(err) { return leaderelection.NewConfigFromConfigMap(nil) } else if err != nil { @@ -373,7 +373,7 @@ func SetupConfigMapWatchOrDie(ctx context.Context, logger *zap.SugaredLogger) *c // calling log.Fatalw. Note, if the config does not exist, it will be defaulted // and this method will not die. func WatchLoggingConfigOrDie(ctx context.Context, cmw *configmap.InformedWatcher, logger *zap.SugaredLogger, atomicLevel zap.AtomicLevel, component string) { - if _, err := kubeclient.Get(ctx).CoreV1().ConfigMaps(system.Namespace()).Get(logging.ConfigMapName(), + if _, err := kubeclient.Get(ctx).CoreV1().ConfigMaps(system.Namespace()).Get(ctx, logging.ConfigMapName(), metav1.GetOptions{}); err == nil { cmw.Watch(logging.ConfigMapName(), logging.UpdateLevelFromConfigMap(logger, atomicLevel, component)) } else if !apierrors.IsNotFound(err) { @@ -385,10 +385,10 @@ func WatchLoggingConfigOrDie(ctx context.Context, cmw *configmap.InformedWatcher // or dies by calling log.Fatalw. Note, if the config does not exist, it will be // defaulted and this method will not die. func WatchObservabilityConfigOrDie(ctx context.Context, cmw *configmap.InformedWatcher, profilingHandler *profiling.Handler, logger *zap.SugaredLogger, component string) { - if _, err := kubeclient.Get(ctx).CoreV1().ConfigMaps(system.Namespace()).Get(metrics.ConfigMapName(), + if _, err := kubeclient.Get(ctx).CoreV1().ConfigMaps(system.Namespace()).Get(ctx, metrics.ConfigMapName(), metav1.GetOptions{}); err == nil { cmw.Watch(metrics.ConfigMapName(), - metrics.ConfigMapWatcher(component, SecretFetcher(ctx), logger), + metrics.ConfigMapWatcher(ctx, component, SecretFetcher(ctx), logger), profilingHandler.UpdateFromConfigMap) } else if !apierrors.IsNotFound(err) { logger.Fatalw("Error reading ConfigMap "+metrics.ConfigMapName(), zap.Error(err)) @@ -407,7 +407,7 @@ func SecretFetcher(ctx context.Context) metrics.SecretFetcher { // TODO(evankanderson): If this direct request to the apiserver on each TLS connection // to the opencensus agent is too much load, switch to a cached Secret. return func(name string) (*corev1.Secret, error) { - return kubeclient.Get(ctx).CoreV1().Secrets(system.Namespace()).Get(name, metav1.GetOptions{}) + return kubeclient.Get(ctx).CoreV1().Secrets(system.Namespace()).Get(ctx, name, metav1.GetOptions{}) } } diff --git a/vendor/knative.dev/pkg/metrics/config.go b/vendor/knative.dev/pkg/metrics/config.go index 593d4a890d..e62250fb0c 100644 --- a/vendor/knative.dev/pkg/metrics/config.go +++ b/vendor/knative.dev/pkg/metrics/config.go @@ -174,7 +174,7 @@ func (mc *metricsConfig) record(ctx context.Context, mss []stats.Measurement, ro return mc.recorder(ctx, mss, ros...) } -func createMetricsConfig(ops ExporterOptions, logger *zap.SugaredLogger) (*metricsConfig, error) { +func createMetricsConfig(ctx context.Context, ops ExporterOptions, logger *zap.SugaredLogger) (*metricsConfig, error) { var mc metricsConfig if ops.Domain == "" { @@ -270,7 +270,7 @@ func createMetricsConfig(ops ExporterOptions, logger *zap.SugaredLogger) (*metri mc.recorder = sdCustomMetricsRecorder(mc, allowCustomMetrics) if scc.UseSecret { - secret, err := getStackdriverSecret(ops.Secrets) + secret, err := getStackdriverSecret(ctx, ops.Secrets) if err != nil { return nil, err } diff --git a/vendor/knative.dev/pkg/metrics/exporter.go b/vendor/knative.dev/pkg/metrics/exporter.go index b361261867..da5c510c9e 100644 --- a/vendor/knative.dev/pkg/metrics/exporter.go +++ b/vendor/knative.dev/pkg/metrics/exporter.go @@ -17,6 +17,7 @@ limitations under the License. package metrics import ( + "context" "errors" "fmt" "strings" @@ -81,22 +82,23 @@ type ExporterOptions struct { // UpdateExporterFromConfigMap returns a helper func that can be used to update the exporter // when a config map is updated. // DEPRECATED: Callers should migrate to ConfigMapWatcher. -func UpdateExporterFromConfigMap(component string, logger *zap.SugaredLogger) func(configMap *corev1.ConfigMap) { - return ConfigMapWatcher(component, nil, logger) +func UpdateExporterFromConfigMap(ctx context.Context, component string, logger *zap.SugaredLogger) func(configMap *corev1.ConfigMap) { + return ConfigMapWatcher(ctx, component, nil, logger) } // ConfigMapWatcher returns a helper func which updates the exporter configuration based on // values in the supplied ConfigMap. This method captures a corev1.SecretLister which is used // to configure mTLS with the opencensus agent. -func ConfigMapWatcher(component string, secrets SecretFetcher, logger *zap.SugaredLogger) func(*corev1.ConfigMap) { +func ConfigMapWatcher(ctx context.Context, component string, secrets SecretFetcher, logger *zap.SugaredLogger) func(*corev1.ConfigMap) { domain := Domain() return func(configMap *corev1.ConfigMap) { - UpdateExporter(ExporterOptions{ - Domain: domain, - Component: strings.ReplaceAll(component, "-", "_"), - ConfigMap: configMap.Data, - Secrets: secrets, - }, logger) + UpdateExporter(ctx, + ExporterOptions{ + Domain: domain, + Component: strings.ReplaceAll(component, "-", "_"), + ConfigMap: configMap.Data, + Secrets: secrets, + }, logger) } } @@ -104,7 +106,7 @@ func ConfigMapWatcher(component string, secrets SecretFetcher, logger *zap.Sugar // when a config map is updated. // opts.Component must be present. // opts.ConfigMap must not be present as the value from the ConfigMap will be used instead. -func UpdateExporterFromConfigMapWithOpts(opts ExporterOptions, logger *zap.SugaredLogger) (func(configMap *corev1.ConfigMap), error) { +func UpdateExporterFromConfigMapWithOpts(ctx context.Context, opts ExporterOptions, logger *zap.SugaredLogger) (func(configMap *corev1.ConfigMap), error) { if opts.Component == "" { return nil, errors.New("UpdateExporterFromConfigMapWithDefaults must provide Component") } @@ -116,13 +118,14 @@ func UpdateExporterFromConfigMapWithOpts(opts ExporterOptions, logger *zap.Sugar domain = Domain() } return func(configMap *corev1.ConfigMap) { - UpdateExporter(ExporterOptions{ - Domain: domain, - Component: opts.Component, - ConfigMap: configMap.Data, - PrometheusPort: opts.PrometheusPort, - Secrets: opts.Secrets, - }, logger) + UpdateExporter(ctx, + ExporterOptions{ + Domain: domain, + Component: opts.Component, + ConfigMap: configMap.Data, + PrometheusPort: opts.PrometheusPort, + Secrets: opts.Secrets, + }, logger) }, nil } @@ -130,9 +133,9 @@ func UpdateExporterFromConfigMapWithOpts(opts ExporterOptions, logger *zap.Sugar // This is a thread-safe function. The entire series of operations is locked // to prevent a race condition between reading the current configuration // and updating the current exporter. -func UpdateExporter(ops ExporterOptions, logger *zap.SugaredLogger) error { +func UpdateExporter(ctx context.Context, ops ExporterOptions, logger *zap.SugaredLogger) error { // TODO(https://github.com/knative/pkg/issues/1273): check if ops.secrets is `nil` after new metrics plan lands - newConfig, err := createMetricsConfig(ops, logger) + newConfig, err := createMetricsConfig(ctx, ops, logger) if err != nil { if getCurMetricsConfig() == nil { // Fail the process if there doesn't exist an exporter. diff --git a/vendor/knative.dev/pkg/metrics/stackdriver_exporter.go b/vendor/knative.dev/pkg/metrics/stackdriver_exporter.go index befb95dbae..848420d5c3 100644 --- a/vendor/knative.dev/pkg/metrics/stackdriver_exporter.go +++ b/vendor/knative.dev/pkg/metrics/stackdriver_exporter.go @@ -336,7 +336,7 @@ func getMetricPrefixFunc(metricTypePrefix, customMetricTypePrefix string) func(n // getStackdriverSecret returns the Kubernetes Secret specified in the given config. // SetStackdriverSecretLocation must have been called by calling package for this to work. // TODO(anniefu): Update exporter if Secret changes (https://github.com/knative/pkg/issues/842) -func getStackdriverSecret(secretFetcher SecretFetcher) (*corev1.Secret, error) { +func getStackdriverSecret(ctx context.Context, secretFetcher SecretFetcher) (*corev1.Secret, error) { stackdriverMtx.RLock() defer stackdriverMtx.RUnlock() @@ -354,7 +354,7 @@ func getStackdriverSecret(secretFetcher SecretFetcher) (*corev1.Secret, error) { return nil, err } - sec, secErr = kubeclient.CoreV1().Secrets(secretNamespace).Get(secretName, metav1.GetOptions{}) + sec, secErr = kubeclient.CoreV1().Secrets(secretNamespace).Get(ctx, secretName, metav1.GetOptions{}) } if secErr != nil { diff --git a/vendor/knative.dev/pkg/resolver/addressable_resolver.go b/vendor/knative.dev/pkg/resolver/addressable_resolver.go index 14c59a6039..890207ec3e 100644 --- a/vendor/knative.dev/pkg/resolver/addressable_resolver.go +++ b/vendor/knative.dev/pkg/resolver/addressable_resolver.go @@ -60,7 +60,7 @@ func NewURIResolver(ctx context.Context, callback func(types.NamespacedName)) *U } // URIFromDestination resolves a v1beta1.Destination into a URI string. -func (r *URIResolver) URIFromDestination(dest duckv1beta1.Destination, parent interface{}) (string, error) { +func (r *URIResolver) URIFromDestination(ctx context.Context, dest duckv1beta1.Destination, parent interface{}) (string, error) { var deprecatedObjectReference *corev1.ObjectReference if !(dest.DeprecatedAPIVersion == "" && dest.DeprecatedKind == "" && dest.DeprecatedName == "" && dest.DeprecatedNamespace == "") { deprecatedObjectReference = &corev1.ObjectReference{ @@ -80,7 +80,7 @@ func (r *URIResolver) URIFromDestination(dest duckv1beta1.Destination, parent in ref = deprecatedObjectReference } if ref != nil { - url, err := r.URIFromObjectReference(ref, parent) + url, err := r.URIFromObjectReference(ctx, ref, parent) if err != nil { return "", err } @@ -105,9 +105,9 @@ func (r *URIResolver) URIFromDestination(dest duckv1beta1.Destination, parent in } // URIFromDestinationV1 resolves a v1.Destination into a URL. -func (r *URIResolver) URIFromDestinationV1(dest duckv1.Destination, parent interface{}) (*apis.URL, error) { +func (r *URIResolver) URIFromDestinationV1(ctx context.Context, dest duckv1.Destination, parent interface{}) (*apis.URL, error) { if dest.Ref != nil { - url, err := r.URIFromKReference(dest.Ref, parent) + url, err := r.URIFromKReference(ctx, dest.Ref, parent) if err != nil { return nil, err } @@ -131,12 +131,12 @@ func (r *URIResolver) URIFromDestinationV1(dest duckv1.Destination, parent inter return nil, errors.New("destination missing Ref and URI, expected at least one") } -func (r *URIResolver) URIFromKReference(ref *duckv1.KReference, parent interface{}) (*apis.URL, error) { - return r.URIFromObjectReference(&corev1.ObjectReference{Name: ref.Name, Namespace: ref.Namespace, APIVersion: ref.APIVersion, Kind: ref.Kind}, parent) +func (r *URIResolver) URIFromKReference(ctx context.Context, ref *duckv1.KReference, parent interface{}) (*apis.URL, error) { + return r.URIFromObjectReference(ctx, &corev1.ObjectReference{Name: ref.Name, Namespace: ref.Namespace, APIVersion: ref.APIVersion, Kind: ref.Kind}, parent) } // URIFromObjectReference resolves an ObjectReference to a URI string. -func (r *URIResolver) URIFromObjectReference(ref *corev1.ObjectReference, parent interface{}) (*apis.URL, error) { +func (r *URIResolver) URIFromObjectReference(ctx context.Context, ref *corev1.ObjectReference, parent interface{}) (*apis.URL, error) { if ref == nil { return nil, apierrs.NewBadRequest("ref is nil") } @@ -163,7 +163,7 @@ func (r *URIResolver) URIFromObjectReference(ref *corev1.ObjectReference, parent return url, nil } - _, lister, err := r.informerFactory.Get(gvr) + _, lister, err := r.informerFactory.Get(ctx, gvr) if err != nil { return nil, apierrs.NewNotFound(gvr.GroupResource(), "Lister") } diff --git a/vendor/knative.dev/pkg/test/clients.go b/vendor/knative.dev/pkg/test/clients.go index 374ef5acaa..fbff159ef6 100644 --- a/vendor/knative.dev/pkg/test/clients.go +++ b/vendor/knative.dev/pkg/test/clients.go @@ -19,6 +19,7 @@ limitations under the License. package test import ( + "context" "fmt" "strings" @@ -38,8 +39,8 @@ type KubeClient struct { } // NewSpoofingClient returns a spoofing client to make requests -func NewSpoofingClient(client *KubeClient, logf logging.FormatLogger, domain string, resolvable bool, opts ...spoof.TransportOption) (*spoof.SpoofingClient, error) { - return spoof.New(client.Kube, logf, domain, resolvable, Flags.IngressEndpoint, Flags.SpoofRequestInterval, Flags.SpoofRequestTimeout, opts...) +func NewSpoofingClient(ctx context.Context, client *KubeClient, logf logging.FormatLogger, domain string, resolvable bool, opts ...spoof.TransportOption) (*spoof.SpoofingClient, error) { + return spoof.New(ctx, client.Kube, logf, domain, resolvable, Flags.IngressEndpoint, Flags.SpoofRequestInterval, Flags.SpoofRequestTimeout, opts...) } // NewKubeClient instantiates and returns several clientsets required for making request to the @@ -70,8 +71,8 @@ func BuildClientConfig(kubeConfigPath string, clusterName string) (*rest.Config, } // UpdateConfigMap updates the config map for specified @name with values -func (client *KubeClient) UpdateConfigMap(name string, configName string, values map[string]string) error { - configMap, err := client.GetConfigMap(name).Get(configName, metav1.GetOptions{}) +func (client *KubeClient) UpdateConfigMap(ctx context.Context, name string, configName string, values map[string]string) error { + configMap, err := client.GetConfigMap(name).Get(ctx, configName, metav1.GetOptions{}) if err != nil { return err } @@ -80,7 +81,7 @@ func (client *KubeClient) UpdateConfigMap(name string, configName string, values configMap.Data[key] = value } - _, err = client.GetConfigMap(name).Update(configMap) + _, err = client.GetConfigMap(name).Update(ctx, configMap, metav1.UpdateOptions{}) return err } @@ -90,15 +91,15 @@ func (client *KubeClient) GetConfigMap(name string) k8styped.ConfigMapInterface } // CreatePod will create a Pod -func (client *KubeClient) CreatePod(pod *corev1.Pod) (*corev1.Pod, error) { +func (client *KubeClient) CreatePod(ctx context.Context, pod *corev1.Pod) (*corev1.Pod, error) { pods := client.Kube.CoreV1().Pods(pod.GetNamespace()) - return pods.Create(pod) + return pods.Create(ctx, pod, metav1.CreateOptions{}) } // PodLogs returns Pod logs for given Pod and Container in the namespace -func (client *KubeClient) PodLogs(podName, containerName, namespace string) ([]byte, error) { +func (client *KubeClient) PodLogs(ctx context.Context, podName, containerName, namespace string) ([]byte, error) { pods := client.Kube.CoreV1().Pods(namespace) - podList, err := pods.List(metav1.ListOptions{}) + podList, err := pods.List(ctx, metav1.ListOptions{}) if err != nil { return nil, err } @@ -108,7 +109,7 @@ func (client *KubeClient) PodLogs(podName, containerName, namespace string) ([]b if strings.Contains(pod.Name, podName) { result := pods.GetLogs(pod.Name, &corev1.PodLogOptions{ Container: containerName, - }).Do() + }).Do(ctx) return result.Raw() } } diff --git a/vendor/knative.dev/pkg/test/ingress/ingress.go b/vendor/knative.dev/pkg/test/ingress/ingress.go index af298a9917..7cf8f92407 100644 --- a/vendor/knative.dev/pkg/test/ingress/ingress.go +++ b/vendor/knative.dev/pkg/test/ingress/ingress.go @@ -17,6 +17,7 @@ limitations under the License. package ingress import ( + "context" "fmt" "os" @@ -32,7 +33,7 @@ const ( ) // GetIngressEndpoint gets the ingress public IP or hostname. -func GetIngressEndpoint(kubeClientset *kubernetes.Clientset) (string, error) { +func GetIngressEndpoint(ctx context.Context, kubeClientset *kubernetes.Clientset) (string, error) { ingressName := istioIngressName if gatewayOverride := os.Getenv("GATEWAY_OVERRIDE"); gatewayOverride != "" { ingressName = gatewayOverride @@ -42,7 +43,7 @@ func GetIngressEndpoint(kubeClientset *kubernetes.Clientset) (string, error) { ingressNamespace = gatewayNsOverride } - ingress, err := kubeClientset.CoreV1().Services(ingressNamespace).Get(ingressName, metav1.GetOptions{}) + ingress, err := kubeClientset.CoreV1().Services(ingressNamespace).Get(ctx, ingressName, metav1.GetOptions{}) if err != nil { return "", err } diff --git a/vendor/knative.dev/pkg/test/kube_checks.go b/vendor/knative.dev/pkg/test/kube_checks.go index 897dac0863..a406f211aa 100644 --- a/vendor/knative.dev/pkg/test/kube_checks.go +++ b/vendor/knative.dev/pkg/test/kube_checks.go @@ -45,13 +45,13 @@ const ( // from client every interval until inState returns `true` indicating it // is done, returns an error or timeout. desc will be used to name the metric // that is emitted to track how long it took for name to get into the state checked by inState. -func WaitForDeploymentState(client *KubeClient, name string, inState func(d *appsv1.Deployment) (bool, error), desc string, namespace string, timeout time.Duration) error { +func WaitForDeploymentState(ctx context.Context, client *KubeClient, name string, inState func(d *appsv1.Deployment) (bool, error), desc string, namespace string, timeout time.Duration) error { d := client.Kube.AppsV1().Deployments(namespace) - span := logging.GetEmitableSpan(context.Background(), fmt.Sprintf("WaitForDeploymentState/%s/%s", name, desc)) + span := logging.GetEmitableSpan(ctx, fmt.Sprintf("WaitForDeploymentState/%s/%s", name, desc)) defer span.End() return wait.PollImmediate(interval, timeout, func() (bool, error) { - d, err := d.Get(name, metav1.GetOptions{}) + d, err := d.Get(ctx, name, metav1.GetOptions{}) if err != nil { return true, err } @@ -63,13 +63,13 @@ func WaitForDeploymentState(client *KubeClient, name string, inState func(d *app // from client every interval until inState returns `true` indicating it // is done, returns an error or timeout. desc will be used to name the metric // that is emitted to track how long it took to get into the state checked by inState. -func WaitForPodListState(client *KubeClient, inState func(p *corev1.PodList) (bool, error), desc string, namespace string) error { +func WaitForPodListState(ctx context.Context, client *KubeClient, inState func(p *corev1.PodList) (bool, error), desc string, namespace string) error { p := client.Kube.CoreV1().Pods(namespace) - span := logging.GetEmitableSpan(context.Background(), fmt.Sprintf("WaitForPodListState/%s", desc)) + span := logging.GetEmitableSpan(ctx, fmt.Sprintf("WaitForPodListState/%s", desc)) defer span.End() return wait.PollImmediate(interval, podTimeout, func() (bool, error) { - p, err := p.List(metav1.ListOptions{}) + p, err := p.List(ctx, metav1.ListOptions{}) if err != nil { return true, err } @@ -81,13 +81,13 @@ func WaitForPodListState(client *KubeClient, inState func(p *corev1.PodList) (bo // from client every interval until inState returns `true` indicating it // is done, returns an error or timeout. desc will be used to name the metric // that is emitted to track how long it took to get into the state checked by inState. -func WaitForPodState(client *KubeClient, inState func(p *corev1.Pod) (bool, error), name string, namespace string) error { +func WaitForPodState(ctx context.Context, client *KubeClient, inState func(p *corev1.Pod) (bool, error), name string, namespace string) error { p := client.Kube.CoreV1().Pods(namespace) - span := logging.GetEmitableSpan(context.Background(), "WaitForPodState/"+name) + span := logging.GetEmitableSpan(ctx, "WaitForPodState/"+name) defer span.End() return wait.PollImmediate(interval, podTimeout, func() (bool, error) { - p, err := p.Get(name, metav1.GetOptions{}) + p, err := p.Get(ctx, name, metav1.GetOptions{}) if err != nil { return false, err } @@ -96,8 +96,8 @@ func WaitForPodState(client *KubeClient, inState func(p *corev1.Pod) (bool, erro } // WaitForPodDeleted waits for the given pod to disappear from the given namespace. -func WaitForPodDeleted(client *KubeClient, name, namespace string) error { - if err := WaitForPodState(client, func(p *corev1.Pod) (bool, error) { +func WaitForPodDeleted(ctx context.Context, client *KubeClient, name, namespace string) error { + if err := WaitForPodState(ctx, client, func(p *corev1.Pod) (bool, error) { // Always return false. We're oly interested in the error which indicates pod deletion or timeout. return false, nil }, name, namespace); err != nil { @@ -110,13 +110,13 @@ func WaitForPodDeleted(client *KubeClient, name, namespace string) error { // WaitForServiceHasAtLeastOneEndpoint polls the status of the specified Service // from client every interval until number of service endpoints = numOfEndpoints -func WaitForServiceEndpoints(client *KubeClient, svcName string, svcNamespace string, numOfEndpoints int) error { +func WaitForServiceEndpoints(ctx context.Context, client *KubeClient, svcName string, svcNamespace string, numOfEndpoints int) error { endpointsService := client.Kube.CoreV1().Endpoints(svcNamespace) - span := logging.GetEmitableSpan(context.Background(), "WaitForServiceHasAtLeastOneEndpoint/"+svcName) + span := logging.GetEmitableSpan(ctx, "WaitForServiceHasAtLeastOneEndpoint/"+svcName) defer span.End() return wait.PollImmediate(interval, podTimeout, func() (bool, error) { - endpoint, err := endpointsService.Get(svcName, metav1.GetOptions{}) + endpoint, err := endpointsService.Get(ctx, svcName, metav1.GetOptions{}) if err != nil { return false, err } @@ -137,8 +137,8 @@ func countEndpointsNum(e *corev1.Endpoints) int { } // GetEndpointAddresses returns addresses of endpoints for the given service. -func GetEndpointAddresses(client *KubeClient, svcName, svcNamespace string) ([]string, error) { - endpoints, err := client.Kube.CoreV1().Endpoints(svcNamespace).Get(svcName, metav1.GetOptions{}) +func GetEndpointAddresses(ctx context.Context, client *KubeClient, svcName, svcNamespace string) ([]string, error) { + endpoints, err := client.Kube.CoreV1().Endpoints(svcNamespace).Get(ctx, svcName, metav1.GetOptions{}) if err != nil || countEndpointsNum(endpoints) == 0 { return nil, fmt.Errorf("no endpoints or error: %w", err) } @@ -152,9 +152,9 @@ func GetEndpointAddresses(client *KubeClient, svcName, svcNamespace string) ([]s } // WaitForChangedEndpoints waits until the endpoints for the given service differ from origEndpoints. -func WaitForChangedEndpoints(client *KubeClient, svcName, svcNamespace string, origEndpoints []string) error { +func WaitForChangedEndpoints(ctx context.Context, client *KubeClient, svcName, svcNamespace string, origEndpoints []string) error { return wait.PollImmediate(1*time.Second, 2*time.Minute, func() (bool, error) { - newEndpoints, err := GetEndpointAddresses(client, svcName, svcNamespace) + newEndpoints, err := GetEndpointAddresses(ctx, client, svcName, svcNamespace) return !cmp.Equal(origEndpoints, newEndpoints), err }) } @@ -173,9 +173,9 @@ func DeploymentScaledToZeroFunc() func(d *appsv1.Deployment) (bool, error) { // WaitForLogContent waits until logs for given Pod/Container include the given content. // If the content is not present within timeout it returns error. -func WaitForLogContent(client *KubeClient, podName, containerName, namespace, content string) error { +func WaitForLogContent(ctx context.Context, client *KubeClient, podName, containerName, namespace, content string) error { return wait.PollImmediate(interval, logTimeout, func() (bool, error) { - logs, err := client.PodLogs(podName, containerName, namespace) + logs, err := client.PodLogs(ctx, podName, containerName, namespace) if err != nil { return true, err } @@ -184,15 +184,15 @@ func WaitForLogContent(client *KubeClient, podName, containerName, namespace, co } // WaitForAllPodsRunning waits for all the pods to be in running state -func WaitForAllPodsRunning(client *KubeClient, namespace string) error { - return WaitForPodListState(client, podsRunning, "PodsAreRunning", namespace) +func WaitForAllPodsRunning(ctx context.Context, client *KubeClient, namespace string) error { + return WaitForPodListState(ctx, client, podsRunning, "PodsAreRunning", namespace) } // WaitForPodRunning waits for the given pod to be in running state -func WaitForPodRunning(client *KubeClient, name string, namespace string) error { +func WaitForPodRunning(ctx context.Context, client *KubeClient, name string, namespace string) error { p := client.Kube.CoreV1().Pods(namespace) return wait.PollImmediate(interval, podTimeout, func() (bool, error) { - p, err := p.Get(name, metav1.GetOptions{}) + p, err := p.Get(ctx, name, metav1.GetOptions{}) if err != nil { return true, err } @@ -217,8 +217,9 @@ func podRunning(pod *corev1.Pod) bool { } // WaitForDeploymentScale waits until the given deployment has the expected scale. -func WaitForDeploymentScale(client *KubeClient, name, namespace string, scale int) error { +func WaitForDeploymentScale(ctx context.Context, client *KubeClient, name, namespace string, scale int) error { return WaitForDeploymentState( + ctx, client, name, func(d *appsv1.Deployment) (bool, error) { diff --git a/vendor/knative.dev/pkg/test/mako/sidecar.go b/vendor/knative.dev/pkg/test/mako/sidecar.go index fb5e505215..92377143ab 100644 --- a/vendor/knative.dev/pkg/test/mako/sidecar.go +++ b/vendor/knative.dev/pkg/test/mako/sidecar.go @@ -115,7 +115,7 @@ func SetupHelper(ctx context.Context, benchmarkKey *string, benchmarkName *strin } // Determine the number of Kubernetes nodes through the kubernetes client. - nodes, err := kc.CoreV1().Nodes().List(metav1.ListOptions{}) + nodes, err := kc.CoreV1().Nodes().List(ctx, metav1.ListOptions{}) if err != nil { return nil, err } diff --git a/vendor/knative.dev/pkg/test/monitoring/monitoring.go b/vendor/knative.dev/pkg/test/monitoring/monitoring.go index 2e618f2471..031a8834bc 100644 --- a/vendor/knative.dev/pkg/test/monitoring/monitoring.go +++ b/vendor/knative.dev/pkg/test/monitoring/monitoring.go @@ -17,6 +17,7 @@ limitations under the License. package monitoring import ( + "context" "fmt" "net" "os" @@ -44,8 +45,8 @@ func CheckPortAvailability(port int) error { // GetPods retrieves the current existing podlist for the app in monitoring namespace // This uses app= as labelselector for selecting pods -func GetPods(kubeClientset *kubernetes.Clientset, app, namespace string) (*v1.PodList, error) { - pods, err := kubeClientset.CoreV1().Pods(namespace).List(metav1.ListOptions{LabelSelector: fmt.Sprintf("app=%s", app)}) +func GetPods(ctx context.Context, kubeClientset *kubernetes.Clientset, app, namespace string) (*v1.PodList, error) { + pods, err := kubeClientset.CoreV1().Pods(namespace).List(ctx, metav1.ListOptions{LabelSelector: fmt.Sprintf("app=%s", app)}) if err == nil && len(pods.Items) == 0 { err = fmt.Errorf("no %s Pod found on the cluster. Ensure monitoring is switched on for your Knative Setup", app) } diff --git a/vendor/knative.dev/pkg/test/request.go b/vendor/knative.dev/pkg/test/request.go index 86cbb677d5..20fd73c115 100644 --- a/vendor/knative.dev/pkg/test/request.go +++ b/vendor/knative.dev/pkg/test/request.go @@ -163,6 +163,7 @@ func MatchesAllOf(checkers ...spoof.ResponseChecker) spoof.ResponseChecker { // desc will be used to name the metric that is emitted to track how long it took for the // domain to get into the state checked by inState. Commas in `desc` must be escaped. func WaitForEndpointState( + ctx context.Context, kubeClient *KubeClient, logf logging.FormatLogger, url *url.URL, @@ -170,7 +171,7 @@ func WaitForEndpointState( desc string, resolvable bool, opts ...interface{}) (*spoof.Response, error) { - return WaitForEndpointStateWithTimeout(kubeClient, logf, url, inState, desc, resolvable, Flags.SpoofRequestTimeout, opts...) + return WaitForEndpointStateWithTimeout(ctx, kubeClient, logf, url, inState, desc, resolvable, Flags.SpoofRequestTimeout, opts...) } // WaitForEndpointStateWithTimeout will poll an endpoint until inState indicates the state is achieved @@ -180,6 +181,7 @@ func WaitForEndpointState( // desc will be used to name the metric that is emitted to track how long it took for the // domain to get into the state checked by inState. Commas in `desc` must be escaped. func WaitForEndpointStateWithTimeout( + ctx context.Context, kubeClient *KubeClient, logf logging.FormatLogger, url *url.URL, @@ -188,7 +190,7 @@ func WaitForEndpointStateWithTimeout( resolvable bool, timeout time.Duration, opts ...interface{}) (*spoof.Response, error) { - defer logging.GetEmitableSpan(context.Background(), fmt.Sprintf("WaitForEndpointState/%s", desc)).End() + defer logging.GetEmitableSpan(ctx, fmt.Sprintf("WaitForEndpointState/%s", desc)).End() if url.Scheme == "" || url.Host == "" { return nil, fmt.Errorf("invalid URL: %q", url.String()) @@ -209,7 +211,7 @@ func WaitForEndpointStateWithTimeout( } } - client, err := NewSpoofingClient(kubeClient, logf, url.Hostname(), resolvable, tOpts...) + client, err := NewSpoofingClient(ctx, kubeClient, logf, url.Hostname(), resolvable, tOpts...) if err != nil { return nil, err } diff --git a/vendor/knative.dev/pkg/test/spoof/spoof.go b/vendor/knative.dev/pkg/test/spoof/spoof.go index 3fe945cc20..85cb9f9540 100644 --- a/vendor/knative.dev/pkg/test/spoof/spoof.go +++ b/vendor/knative.dev/pkg/test/spoof/spoof.go @@ -101,6 +101,7 @@ type TransportOption func(transport *http.Transport) *http.Transport // // If that's a problem, see test/request.go#WaitForEndpointState for oneshot spoofing. func New( + ctx context.Context, kubeClientset *kubernetes.Clientset, logf logging.FormatLogger, domain string, @@ -109,7 +110,7 @@ func New( requestInterval time.Duration, requestTimeout time.Duration, opts ...TransportOption) (*SpoofingClient, error) { - endpoint, err := ResolveEndpoint(kubeClientset, domain, resolvable, endpointOverride) + endpoint, err := ResolveEndpoint(ctx, kubeClientset, domain, resolvable, endpointOverride) if err != nil { return nil, fmt.Errorf("failed get the cluster endpoint: %w", err) } @@ -149,7 +150,7 @@ func New( // ResolveEndpoint resolves the endpoint address considering whether the domain is resolvable and taking into // account whether the user overrode the endpoint address externally -func ResolveEndpoint(kubeClientset *kubernetes.Clientset, domain string, resolvable bool, endpointOverride string) (string, error) { +func ResolveEndpoint(ctx context.Context, kubeClientset *kubernetes.Clientset, domain string, resolvable bool, endpointOverride string) (string, error) { // If the domain is resolvable, it can be used directly if resolvable { return domain, nil @@ -159,7 +160,7 @@ func ResolveEndpoint(kubeClientset *kubernetes.Clientset, domain string, resolva return endpointOverride, nil } // Otherwise, use the actual cluster endpoint - return ingress.GetIngressEndpoint(kubeClientset) + return ingress.GetIngressEndpoint(ctx, kubeClientset) } // Do dispatches to the underlying http.Client.Do, spoofing domains as needed diff --git a/vendor/knative.dev/pkg/test/zipkin/util.go b/vendor/knative.dev/pkg/test/zipkin/util.go index b5b5749113..01ad465b50 100644 --- a/vendor/knative.dev/pkg/test/zipkin/util.go +++ b/vendor/knative.dev/pkg/test/zipkin/util.go @@ -19,6 +19,7 @@ limitations under the License. package zipkin import ( + "context" "encoding/json" "fmt" "io/ioutil" @@ -71,8 +72,8 @@ var ( // SetupZipkinTracingFromConfigTracing setups zipkin tracing like SetupZipkinTracing but retrieving the zipkin configuration // from config-tracing config map -func SetupZipkinTracingFromConfigTracing(kubeClientset *kubernetes.Clientset, logf logging.FormatLogger, configMapNamespace string) error { - cm, err := kubeClientset.CoreV1().ConfigMaps(configMapNamespace).Get("config-tracing", metav1.GetOptions{}) +func SetupZipkinTracingFromConfigTracing(ctx context.Context, kubeClientset *kubernetes.Clientset, logf logging.FormatLogger, configMapNamespace string) error { + cm, err := kubeClientset.CoreV1().ConfigMaps(configMapNamespace).Get(ctx, "config-tracing", metav1.GetOptions{}) if err != nil { return fmt.Errorf("error while retrieving config-tracing config map: %w", err) } @@ -98,12 +99,12 @@ func SetupZipkinTracingFromConfigTracing(kubeClientset *kubernetes.Clientset, lo return fmt.Errorf("error while parsing the Zipkin endpoint in config-tracing config map: %w", err) } - return SetupZipkinTracing(kubeClientset, logf, int(port), namespace) + return SetupZipkinTracing(ctx, kubeClientset, logf, int(port), namespace) } // SetupZipkinTracingFromConfigTracingOrFail is same as SetupZipkinTracingFromConfigTracing, but fails the test if an error happens -func SetupZipkinTracingFromConfigTracingOrFail(t testing.TB, kubeClientset *kubernetes.Clientset, configMapNamespace string) { - if err := SetupZipkinTracingFromConfigTracing(kubeClientset, t.Logf, configMapNamespace); err != nil { +func SetupZipkinTracingFromConfigTracingOrFail(ctx context.Context, t testing.TB, kubeClientset *kubernetes.Clientset, configMapNamespace string) { + if err := SetupZipkinTracingFromConfigTracing(ctx, kubeClientset, t.Logf, configMapNamespace); err != nil { t.Fatalf("Error while setup Zipkin tracing: %v", err) } } @@ -113,14 +114,14 @@ func SetupZipkinTracingFromConfigTracingOrFail(t testing.TB, kubeClientset *kube // (pid of the process doing Port-Forward is stored in a global variable). // 2. Enable AlwaysSample config for tracing for the SpoofingClient. // The zipkin deployment must have the label app=zipkin -func SetupZipkinTracing(kubeClientset *kubernetes.Clientset, logf logging.FormatLogger, zipkinRemotePort int, zipkinNamespace string) (err error) { +func SetupZipkinTracing(ctx context.Context, kubeClientset *kubernetes.Clientset, logf logging.FormatLogger, zipkinRemotePort int, zipkinNamespace string) (err error) { setupOnce.Do(func() { if e := monitoring.CheckPortAvailability(zipkinRemotePort); e != nil { err = fmt.Errorf("Zipkin port not available on the machine: %w", err) return } - zipkinPods, e := monitoring.GetPods(kubeClientset, appLabel, zipkinNamespace) + zipkinPods, e := monitoring.GetPods(ctx, kubeClientset, appLabel, zipkinNamespace) if e != nil { err = fmt.Errorf("error retrieving Zipkin pod details: %w", err) return @@ -142,8 +143,8 @@ func SetupZipkinTracing(kubeClientset *kubernetes.Clientset, logf logging.Format } // SetupZipkinTracingOrFail is same as SetupZipkinTracing, but fails the test if an error happens -func SetupZipkinTracingOrFail(t testing.TB, kubeClientset *kubernetes.Clientset, zipkinRemotePort int, zipkinNamespace string) { - if err := SetupZipkinTracing(kubeClientset, t.Logf, zipkinRemotePort, zipkinNamespace); err != nil { +func SetupZipkinTracingOrFail(ctx context.Context, t testing.TB, kubeClientset *kubernetes.Clientset, zipkinRemotePort int, zipkinNamespace string) { + if err := SetupZipkinTracing(ctx, kubeClientset, t.Logf, zipkinRemotePort, zipkinNamespace); err != nil { t.Fatalf("Error while setup zipkin tracing: %v", err) } } diff --git a/vendor/knative.dev/pkg/webhook/certificates/certificates.go b/vendor/knative.dev/pkg/webhook/certificates/certificates.go index 5e698d762b..d83a6004f4 100644 --- a/vendor/knative.dev/pkg/webhook/certificates/certificates.go +++ b/vendor/knative.dev/pkg/webhook/certificates/certificates.go @@ -23,6 +23,7 @@ import ( "time" apierrors "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/client-go/kubernetes" corelisters "k8s.io/client-go/listers/core/v1" @@ -101,6 +102,6 @@ func (r *reconciler) reconcileCertificate(ctx context.Context) error { return err } secret.Data = newSecret.Data - _, err = r.client.CoreV1().Secrets(secret.Namespace).Update(secret) + _, err = r.client.CoreV1().Secrets(secret.Namespace).Update(ctx, secret, metav1.UpdateOptions{}) return err } diff --git a/vendor/knative.dev/pkg/webhook/psbinding/psbinding.go b/vendor/knative.dev/pkg/webhook/psbinding/psbinding.go index ec94ebf874..59676052e7 100644 --- a/vendor/knative.dev/pkg/webhook/psbinding/psbinding.go +++ b/vendor/knative.dev/pkg/webhook/psbinding/psbinding.go @@ -379,7 +379,7 @@ func (ac *Reconciler) reconcileMutatingWebhook(ctx context.Context, caCert []byt if ok := equality.Semantic.DeepEqual(configuredWebhook, webhook); !ok { logging.FromContext(ctx).Info("Updating webhook") mwhclient := ac.Client.AdmissionregistrationV1().MutatingWebhookConfigurations() - if _, err := mwhclient.Update(webhook); err != nil { + if _, err := mwhclient.Update(ctx, webhook, metav1.UpdateOptions{}); err != nil { return fmt.Errorf("failed to update webhook: %w", err) } } else { diff --git a/vendor/knative.dev/pkg/webhook/psbinding/reconciler.go b/vendor/knative.dev/pkg/webhook/psbinding/reconciler.go index eced30b4ae..ba9f35c5f9 100644 --- a/vendor/knative.dev/pkg/webhook/psbinding/reconciler.go +++ b/vendor/knative.dev/pkg/webhook/psbinding/reconciler.go @@ -224,7 +224,7 @@ func (r *BaseReconciler) EnsureFinalizer(ctx context.Context, fb kmeta.Accessor) } // ... and apply it. - _, err = r.DynamicClient.Resource(r.GVR).Namespace(fb.GetNamespace()).Patch(fb.GetName(), + _, err = r.DynamicClient.Resource(r.GVR).Namespace(fb.GetNamespace()).Patch(ctx, fb.GetName(), types.MergePatchType, patch, metav1.PatchOptions{}) return err } @@ -247,7 +247,7 @@ func (r *BaseReconciler) RemoveFinalizer(ctx context.Context, fb kmeta.Accessor) } // ... and apply it. - _, err = r.DynamicClient.Resource(r.GVR).Namespace(fb.GetNamespace()).Patch(fb.GetName(), + _, err = r.DynamicClient.Resource(r.GVR).Namespace(fb.GetNamespace()).Patch(ctx, fb.GetName(), types.MergePatchType, patch, metav1.PatchOptions{}) return err } @@ -281,7 +281,7 @@ func (r *BaseReconciler) labelNamespace(ctx context.Context, subject tracker.Ref Resource: "namespaces", } - _, err = r.DynamicClient.Resource(gvr).Patch(subject.Namespace, types.MergePatchType, patch, metav1.PatchOptions{}) + _, err = r.DynamicClient.Resource(gvr).Patch(ctx, subject.Namespace, types.MergePatchType, patch, metav1.PatchOptions{}) if err != nil { logging.FromContext(ctx).Infof("Error applying patch to namespace: %s: %v", subject.Namespace, err) return err @@ -311,7 +311,7 @@ func (r *BaseReconciler) ReconcileSubject(ctx context.Context, fb Bindable, muta // Use the GVR of the subject(s) to get ahold of a lister that we can // use to fetch our PodSpecable resources. - _, lister, err := r.Factory.Get(gvr) + _, lister, err := r.Factory.Get(ctx, gvr) if err != nil { logging.FromContext(ctx).Errorf("Error getting a lister for resource '%+v': %v", gvr, err) fb.GetBindingStatus().MarkBindingUnavailable("SubjectUnavailable", err.Error()) @@ -390,7 +390,7 @@ func (r *BaseReconciler) ReconcileSubject(ctx context.Context, fb Bindable, muta // a Job started or completed, which can be fine. Consider treating // certain error codes as acceptable. _, err = r.DynamicClient.Resource(gvr).Namespace(ps.Namespace).Patch( - ps.Name, types.JSONPatchType, patchBytes, metav1.PatchOptions{}) + ctx, ps.Name, types.JSONPatchType, patchBytes, metav1.PatchOptions{}) if err != nil { return fmt.Errorf("failed binding subject %s: %w", ps.Name, err) } @@ -440,6 +440,6 @@ func (r *BaseReconciler) UpdateStatus(ctx context.Context, desired Bindable) err forUpdate := ua forUpdate.Object["status"] = desiredStatus _, err = r.DynamicClient.Resource(r.GVR).Namespace(desired.GetNamespace()).UpdateStatus( - forUpdate, metav1.UpdateOptions{}) + ctx, forUpdate, metav1.UpdateOptions{}) return err } diff --git a/vendor/knative.dev/pkg/webhook/resourcesemantics/conversion/reconciler.go b/vendor/knative.dev/pkg/webhook/resourcesemantics/conversion/reconciler.go index e2709ee800..97d45ac2ac 100644 --- a/vendor/knative.dev/pkg/webhook/resourcesemantics/conversion/reconciler.go +++ b/vendor/knative.dev/pkg/webhook/resourcesemantics/conversion/reconciler.go @@ -23,6 +23,7 @@ import ( apixv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" apixclient "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset" apixlisters "k8s.io/apiextensions-apiserver/pkg/client/listers/apiextensions/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/types" corelisters "k8s.io/client-go/listers/core/v1" @@ -107,7 +108,7 @@ func (r *reconciler) reconcileCRD(ctx context.Context, cacert []byte, key string } else if !ok { logger.Infof("updating CRD") crdClient := r.client.ApiextensionsV1().CustomResourceDefinitions() - if _, err := crdClient.Update(crd); err != nil { + if _, err := crdClient.Update(ctx, crd, metav1.UpdateOptions{}); err != nil { return fmt.Errorf("failed to update webhook: %w", err) } } else { diff --git a/vendor/knative.dev/pkg/webhook/resourcesemantics/defaulting/defaulting.go b/vendor/knative.dev/pkg/webhook/resourcesemantics/defaulting/defaulting.go index 9c82de1375..9a844e7d53 100644 --- a/vendor/knative.dev/pkg/webhook/resourcesemantics/defaulting/defaulting.go +++ b/vendor/knative.dev/pkg/webhook/resourcesemantics/defaulting/defaulting.go @@ -205,7 +205,7 @@ func (ac *reconciler) reconcileMutatingWebhook(ctx context.Context, caCert []byt } else if !ok { logger.Info("Updating webhook") mwhclient := ac.client.AdmissionregistrationV1().MutatingWebhookConfigurations() - if _, err := mwhclient.Update(webhook); err != nil { + if _, err := mwhclient.Update(ctx, webhook, metav1.UpdateOptions{}); err != nil { return fmt.Errorf("failed to update webhook: %w", err) } } else { diff --git a/vendor/knative.dev/pkg/webhook/resourcesemantics/validation/reconcile_config.go b/vendor/knative.dev/pkg/webhook/resourcesemantics/validation/reconcile_config.go index e598ec5fd1..2408e28c2a 100644 --- a/vendor/knative.dev/pkg/webhook/resourcesemantics/validation/reconcile_config.go +++ b/vendor/knative.dev/pkg/webhook/resourcesemantics/validation/reconcile_config.go @@ -168,7 +168,7 @@ func (ac *reconciler) reconcileValidatingWebhook(ctx context.Context, caCert []b } else if !ok { logger.Info("Updating webhook") vwhclient := ac.client.AdmissionregistrationV1().ValidatingWebhookConfigurations() - if _, err := vwhclient.Update(webhook); err != nil { + if _, err := vwhclient.Update(ctx, webhook, metav1.UpdateOptions{}); err != nil { return fmt.Errorf("failed to update webhook: %w", err) } } else { diff --git a/vendor/knative.dev/serving/pkg/client/clientset/versioned/clientset.go b/vendor/knative.dev/serving/pkg/client/clientset/versioned/clientset.go index 70fa743309..6ee33ac26f 100644 --- a/vendor/knative.dev/serving/pkg/client/clientset/versioned/clientset.go +++ b/vendor/knative.dev/serving/pkg/client/clientset/versioned/clientset.go @@ -83,7 +83,7 @@ func NewForConfig(c *rest.Config) (*Clientset, error) { configShallowCopy := *c if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 { if configShallowCopy.Burst <= 0 { - return nil, fmt.Errorf("Burst is required to be greater than 0 when RateLimiter is not set and QPS is set to greater than 0") + return nil, fmt.Errorf("burst is required to be greater than 0 when RateLimiter is not set and QPS is set to greater than 0") } configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst) } diff --git a/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/autoscaling/v1alpha1/metric.go b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/autoscaling/v1alpha1/metric.go index 5441e307ee..5848fdedb3 100644 --- a/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/autoscaling/v1alpha1/metric.go +++ b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/autoscaling/v1alpha1/metric.go @@ -19,6 +19,7 @@ limitations under the License. package v1alpha1 import ( + "context" "time" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -37,15 +38,15 @@ type MetricsGetter interface { // MetricInterface has methods to work with Metric resources. type MetricInterface interface { - Create(*v1alpha1.Metric) (*v1alpha1.Metric, error) - Update(*v1alpha1.Metric) (*v1alpha1.Metric, error) - UpdateStatus(*v1alpha1.Metric) (*v1alpha1.Metric, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*v1alpha1.Metric, error) - List(opts v1.ListOptions) (*v1alpha1.MetricList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.Metric, err error) + Create(ctx context.Context, metric *v1alpha1.Metric, opts v1.CreateOptions) (*v1alpha1.Metric, error) + Update(ctx context.Context, metric *v1alpha1.Metric, opts v1.UpdateOptions) (*v1alpha1.Metric, error) + UpdateStatus(ctx context.Context, metric *v1alpha1.Metric, opts v1.UpdateOptions) (*v1alpha1.Metric, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.Metric, error) + List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.MetricList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.Metric, err error) MetricExpansion } @@ -64,20 +65,20 @@ func newMetrics(c *AutoscalingV1alpha1Client, namespace string) *metrics { } // Get takes name of the metric, and returns the corresponding metric object, and an error if there is any. -func (c *metrics) Get(name string, options v1.GetOptions) (result *v1alpha1.Metric, err error) { +func (c *metrics) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.Metric, err error) { result = &v1alpha1.Metric{} err = c.client.Get(). Namespace(c.ns). Resource("metrics"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of Metrics that match those selectors. -func (c *metrics) List(opts v1.ListOptions) (result *v1alpha1.MetricList, err error) { +func (c *metrics) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.MetricList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -88,13 +89,13 @@ func (c *metrics) List(opts v1.ListOptions) (result *v1alpha1.MetricList, err er Resource("metrics"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested metrics. -func (c *metrics) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *metrics) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -105,87 +106,90 @@ func (c *metrics) Watch(opts v1.ListOptions) (watch.Interface, error) { Resource("metrics"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a metric and creates it. Returns the server's representation of the metric, and an error, if there is any. -func (c *metrics) Create(metric *v1alpha1.Metric) (result *v1alpha1.Metric, err error) { +func (c *metrics) Create(ctx context.Context, metric *v1alpha1.Metric, opts v1.CreateOptions) (result *v1alpha1.Metric, err error) { result = &v1alpha1.Metric{} err = c.client.Post(). Namespace(c.ns). Resource("metrics"). + VersionedParams(&opts, scheme.ParameterCodec). Body(metric). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a metric and updates it. Returns the server's representation of the metric, and an error, if there is any. -func (c *metrics) Update(metric *v1alpha1.Metric) (result *v1alpha1.Metric, err error) { +func (c *metrics) Update(ctx context.Context, metric *v1alpha1.Metric, opts v1.UpdateOptions) (result *v1alpha1.Metric, err error) { result = &v1alpha1.Metric{} err = c.client.Put(). Namespace(c.ns). Resource("metrics"). Name(metric.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(metric). - Do(). + Do(ctx). Into(result) return } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *metrics) UpdateStatus(metric *v1alpha1.Metric) (result *v1alpha1.Metric, err error) { +func (c *metrics) UpdateStatus(ctx context.Context, metric *v1alpha1.Metric, opts v1.UpdateOptions) (result *v1alpha1.Metric, err error) { result = &v1alpha1.Metric{} err = c.client.Put(). Namespace(c.ns). Resource("metrics"). Name(metric.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(metric). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the metric and deletes it. Returns an error if one occurs. -func (c *metrics) Delete(name string, options *v1.DeleteOptions) error { +func (c *metrics) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("metrics"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *metrics) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *metrics) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Namespace(c.ns). Resource("metrics"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched metric. -func (c *metrics) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.Metric, err error) { +func (c *metrics) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.Metric, err error) { result = &v1alpha1.Metric{} err = c.client.Patch(pt). Namespace(c.ns). Resource("metrics"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/autoscaling/v1alpha1/podautoscaler.go b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/autoscaling/v1alpha1/podautoscaler.go index 64fcbe2137..0c08fd7d44 100644 --- a/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/autoscaling/v1alpha1/podautoscaler.go +++ b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/autoscaling/v1alpha1/podautoscaler.go @@ -19,6 +19,7 @@ limitations under the License. package v1alpha1 import ( + "context" "time" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -37,15 +38,15 @@ type PodAutoscalersGetter interface { // PodAutoscalerInterface has methods to work with PodAutoscaler resources. type PodAutoscalerInterface interface { - Create(*v1alpha1.PodAutoscaler) (*v1alpha1.PodAutoscaler, error) - Update(*v1alpha1.PodAutoscaler) (*v1alpha1.PodAutoscaler, error) - UpdateStatus(*v1alpha1.PodAutoscaler) (*v1alpha1.PodAutoscaler, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*v1alpha1.PodAutoscaler, error) - List(opts v1.ListOptions) (*v1alpha1.PodAutoscalerList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.PodAutoscaler, err error) + Create(ctx context.Context, podAutoscaler *v1alpha1.PodAutoscaler, opts v1.CreateOptions) (*v1alpha1.PodAutoscaler, error) + Update(ctx context.Context, podAutoscaler *v1alpha1.PodAutoscaler, opts v1.UpdateOptions) (*v1alpha1.PodAutoscaler, error) + UpdateStatus(ctx context.Context, podAutoscaler *v1alpha1.PodAutoscaler, opts v1.UpdateOptions) (*v1alpha1.PodAutoscaler, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.PodAutoscaler, error) + List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.PodAutoscalerList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.PodAutoscaler, err error) PodAutoscalerExpansion } @@ -64,20 +65,20 @@ func newPodAutoscalers(c *AutoscalingV1alpha1Client, namespace string) *podAutos } // Get takes name of the podAutoscaler, and returns the corresponding podAutoscaler object, and an error if there is any. -func (c *podAutoscalers) Get(name string, options v1.GetOptions) (result *v1alpha1.PodAutoscaler, err error) { +func (c *podAutoscalers) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.PodAutoscaler, err error) { result = &v1alpha1.PodAutoscaler{} err = c.client.Get(). Namespace(c.ns). Resource("podautoscalers"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of PodAutoscalers that match those selectors. -func (c *podAutoscalers) List(opts v1.ListOptions) (result *v1alpha1.PodAutoscalerList, err error) { +func (c *podAutoscalers) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.PodAutoscalerList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -88,13 +89,13 @@ func (c *podAutoscalers) List(opts v1.ListOptions) (result *v1alpha1.PodAutoscal Resource("podautoscalers"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested podAutoscalers. -func (c *podAutoscalers) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *podAutoscalers) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -105,87 +106,90 @@ func (c *podAutoscalers) Watch(opts v1.ListOptions) (watch.Interface, error) { Resource("podautoscalers"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a podAutoscaler and creates it. Returns the server's representation of the podAutoscaler, and an error, if there is any. -func (c *podAutoscalers) Create(podAutoscaler *v1alpha1.PodAutoscaler) (result *v1alpha1.PodAutoscaler, err error) { +func (c *podAutoscalers) Create(ctx context.Context, podAutoscaler *v1alpha1.PodAutoscaler, opts v1.CreateOptions) (result *v1alpha1.PodAutoscaler, err error) { result = &v1alpha1.PodAutoscaler{} err = c.client.Post(). Namespace(c.ns). Resource("podautoscalers"). + VersionedParams(&opts, scheme.ParameterCodec). Body(podAutoscaler). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a podAutoscaler and updates it. Returns the server's representation of the podAutoscaler, and an error, if there is any. -func (c *podAutoscalers) Update(podAutoscaler *v1alpha1.PodAutoscaler) (result *v1alpha1.PodAutoscaler, err error) { +func (c *podAutoscalers) Update(ctx context.Context, podAutoscaler *v1alpha1.PodAutoscaler, opts v1.UpdateOptions) (result *v1alpha1.PodAutoscaler, err error) { result = &v1alpha1.PodAutoscaler{} err = c.client.Put(). Namespace(c.ns). Resource("podautoscalers"). Name(podAutoscaler.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(podAutoscaler). - Do(). + Do(ctx). Into(result) return } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *podAutoscalers) UpdateStatus(podAutoscaler *v1alpha1.PodAutoscaler) (result *v1alpha1.PodAutoscaler, err error) { +func (c *podAutoscalers) UpdateStatus(ctx context.Context, podAutoscaler *v1alpha1.PodAutoscaler, opts v1.UpdateOptions) (result *v1alpha1.PodAutoscaler, err error) { result = &v1alpha1.PodAutoscaler{} err = c.client.Put(). Namespace(c.ns). Resource("podautoscalers"). Name(podAutoscaler.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(podAutoscaler). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the podAutoscaler and deletes it. Returns an error if one occurs. -func (c *podAutoscalers) Delete(name string, options *v1.DeleteOptions) error { +func (c *podAutoscalers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("podautoscalers"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *podAutoscalers) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *podAutoscalers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Namespace(c.ns). Resource("podautoscalers"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched podAutoscaler. -func (c *podAutoscalers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.PodAutoscaler, err error) { +func (c *podAutoscalers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.PodAutoscaler, err error) { result = &v1alpha1.PodAutoscaler{} err = c.client.Patch(pt). Namespace(c.ns). Resource("podautoscalers"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1/configuration.go b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1/configuration.go index 2bff52a806..0caac939f3 100644 --- a/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1/configuration.go +++ b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1/configuration.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" "time" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -37,15 +38,15 @@ type ConfigurationsGetter interface { // ConfigurationInterface has methods to work with Configuration resources. type ConfigurationInterface interface { - Create(*v1.Configuration) (*v1.Configuration, error) - Update(*v1.Configuration) (*v1.Configuration, error) - UpdateStatus(*v1.Configuration) (*v1.Configuration, error) - Delete(name string, options *metav1.DeleteOptions) error - DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error - Get(name string, options metav1.GetOptions) (*v1.Configuration, error) - List(opts metav1.ListOptions) (*v1.ConfigurationList, error) - Watch(opts metav1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Configuration, err error) + Create(ctx context.Context, configuration *v1.Configuration, opts metav1.CreateOptions) (*v1.Configuration, error) + Update(ctx context.Context, configuration *v1.Configuration, opts metav1.UpdateOptions) (*v1.Configuration, error) + UpdateStatus(ctx context.Context, configuration *v1.Configuration, opts metav1.UpdateOptions) (*v1.Configuration, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Configuration, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.ConfigurationList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Configuration, err error) ConfigurationExpansion } @@ -64,20 +65,20 @@ func newConfigurations(c *ServingV1Client, namespace string) *configurations { } // Get takes name of the configuration, and returns the corresponding configuration object, and an error if there is any. -func (c *configurations) Get(name string, options metav1.GetOptions) (result *v1.Configuration, err error) { +func (c *configurations) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Configuration, err error) { result = &v1.Configuration{} err = c.client.Get(). Namespace(c.ns). Resource("configurations"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of Configurations that match those selectors. -func (c *configurations) List(opts metav1.ListOptions) (result *v1.ConfigurationList, err error) { +func (c *configurations) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ConfigurationList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -88,13 +89,13 @@ func (c *configurations) List(opts metav1.ListOptions) (result *v1.Configuration Resource("configurations"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested configurations. -func (c *configurations) Watch(opts metav1.ListOptions) (watch.Interface, error) { +func (c *configurations) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -105,87 +106,90 @@ func (c *configurations) Watch(opts metav1.ListOptions) (watch.Interface, error) Resource("configurations"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a configuration and creates it. Returns the server's representation of the configuration, and an error, if there is any. -func (c *configurations) Create(configuration *v1.Configuration) (result *v1.Configuration, err error) { +func (c *configurations) Create(ctx context.Context, configuration *v1.Configuration, opts metav1.CreateOptions) (result *v1.Configuration, err error) { result = &v1.Configuration{} err = c.client.Post(). Namespace(c.ns). Resource("configurations"). + VersionedParams(&opts, scheme.ParameterCodec). Body(configuration). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a configuration and updates it. Returns the server's representation of the configuration, and an error, if there is any. -func (c *configurations) Update(configuration *v1.Configuration) (result *v1.Configuration, err error) { +func (c *configurations) Update(ctx context.Context, configuration *v1.Configuration, opts metav1.UpdateOptions) (result *v1.Configuration, err error) { result = &v1.Configuration{} err = c.client.Put(). Namespace(c.ns). Resource("configurations"). Name(configuration.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(configuration). - Do(). + Do(ctx). Into(result) return } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *configurations) UpdateStatus(configuration *v1.Configuration) (result *v1.Configuration, err error) { +func (c *configurations) UpdateStatus(ctx context.Context, configuration *v1.Configuration, opts metav1.UpdateOptions) (result *v1.Configuration, err error) { result = &v1.Configuration{} err = c.client.Put(). Namespace(c.ns). Resource("configurations"). Name(configuration.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(configuration). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the configuration and deletes it. Returns an error if one occurs. -func (c *configurations) Delete(name string, options *metav1.DeleteOptions) error { +func (c *configurations) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("configurations"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *configurations) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error { +func (c *configurations) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Namespace(c.ns). Resource("configurations"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched configuration. -func (c *configurations) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Configuration, err error) { +func (c *configurations) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Configuration, err error) { result = &v1.Configuration{} err = c.client.Patch(pt). Namespace(c.ns). Resource("configurations"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1/revision.go b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1/revision.go index e6d5120437..f0d7e92ed1 100644 --- a/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1/revision.go +++ b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1/revision.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" "time" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -37,15 +38,15 @@ type RevisionsGetter interface { // RevisionInterface has methods to work with Revision resources. type RevisionInterface interface { - Create(*v1.Revision) (*v1.Revision, error) - Update(*v1.Revision) (*v1.Revision, error) - UpdateStatus(*v1.Revision) (*v1.Revision, error) - Delete(name string, options *metav1.DeleteOptions) error - DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error - Get(name string, options metav1.GetOptions) (*v1.Revision, error) - List(opts metav1.ListOptions) (*v1.RevisionList, error) - Watch(opts metav1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Revision, err error) + Create(ctx context.Context, revision *v1.Revision, opts metav1.CreateOptions) (*v1.Revision, error) + Update(ctx context.Context, revision *v1.Revision, opts metav1.UpdateOptions) (*v1.Revision, error) + UpdateStatus(ctx context.Context, revision *v1.Revision, opts metav1.UpdateOptions) (*v1.Revision, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Revision, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.RevisionList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Revision, err error) RevisionExpansion } @@ -64,20 +65,20 @@ func newRevisions(c *ServingV1Client, namespace string) *revisions { } // Get takes name of the revision, and returns the corresponding revision object, and an error if there is any. -func (c *revisions) Get(name string, options metav1.GetOptions) (result *v1.Revision, err error) { +func (c *revisions) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Revision, err error) { result = &v1.Revision{} err = c.client.Get(). Namespace(c.ns). Resource("revisions"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of Revisions that match those selectors. -func (c *revisions) List(opts metav1.ListOptions) (result *v1.RevisionList, err error) { +func (c *revisions) List(ctx context.Context, opts metav1.ListOptions) (result *v1.RevisionList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -88,13 +89,13 @@ func (c *revisions) List(opts metav1.ListOptions) (result *v1.RevisionList, err Resource("revisions"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested revisions. -func (c *revisions) Watch(opts metav1.ListOptions) (watch.Interface, error) { +func (c *revisions) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -105,87 +106,90 @@ func (c *revisions) Watch(opts metav1.ListOptions) (watch.Interface, error) { Resource("revisions"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a revision and creates it. Returns the server's representation of the revision, and an error, if there is any. -func (c *revisions) Create(revision *v1.Revision) (result *v1.Revision, err error) { +func (c *revisions) Create(ctx context.Context, revision *v1.Revision, opts metav1.CreateOptions) (result *v1.Revision, err error) { result = &v1.Revision{} err = c.client.Post(). Namespace(c.ns). Resource("revisions"). + VersionedParams(&opts, scheme.ParameterCodec). Body(revision). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a revision and updates it. Returns the server's representation of the revision, and an error, if there is any. -func (c *revisions) Update(revision *v1.Revision) (result *v1.Revision, err error) { +func (c *revisions) Update(ctx context.Context, revision *v1.Revision, opts metav1.UpdateOptions) (result *v1.Revision, err error) { result = &v1.Revision{} err = c.client.Put(). Namespace(c.ns). Resource("revisions"). Name(revision.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(revision). - Do(). + Do(ctx). Into(result) return } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *revisions) UpdateStatus(revision *v1.Revision) (result *v1.Revision, err error) { +func (c *revisions) UpdateStatus(ctx context.Context, revision *v1.Revision, opts metav1.UpdateOptions) (result *v1.Revision, err error) { result = &v1.Revision{} err = c.client.Put(). Namespace(c.ns). Resource("revisions"). Name(revision.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(revision). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the revision and deletes it. Returns an error if one occurs. -func (c *revisions) Delete(name string, options *metav1.DeleteOptions) error { +func (c *revisions) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("revisions"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *revisions) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error { +func (c *revisions) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Namespace(c.ns). Resource("revisions"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched revision. -func (c *revisions) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Revision, err error) { +func (c *revisions) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Revision, err error) { result = &v1.Revision{} err = c.client.Patch(pt). Namespace(c.ns). Resource("revisions"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1/route.go b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1/route.go index b3105f3a95..e2e7b446c4 100644 --- a/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1/route.go +++ b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1/route.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" "time" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -37,15 +38,15 @@ type RoutesGetter interface { // RouteInterface has methods to work with Route resources. type RouteInterface interface { - Create(*v1.Route) (*v1.Route, error) - Update(*v1.Route) (*v1.Route, error) - UpdateStatus(*v1.Route) (*v1.Route, error) - Delete(name string, options *metav1.DeleteOptions) error - DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error - Get(name string, options metav1.GetOptions) (*v1.Route, error) - List(opts metav1.ListOptions) (*v1.RouteList, error) - Watch(opts metav1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Route, err error) + Create(ctx context.Context, route *v1.Route, opts metav1.CreateOptions) (*v1.Route, error) + Update(ctx context.Context, route *v1.Route, opts metav1.UpdateOptions) (*v1.Route, error) + UpdateStatus(ctx context.Context, route *v1.Route, opts metav1.UpdateOptions) (*v1.Route, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Route, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.RouteList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Route, err error) RouteExpansion } @@ -64,20 +65,20 @@ func newRoutes(c *ServingV1Client, namespace string) *routes { } // Get takes name of the route, and returns the corresponding route object, and an error if there is any. -func (c *routes) Get(name string, options metav1.GetOptions) (result *v1.Route, err error) { +func (c *routes) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Route, err error) { result = &v1.Route{} err = c.client.Get(). Namespace(c.ns). Resource("routes"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of Routes that match those selectors. -func (c *routes) List(opts metav1.ListOptions) (result *v1.RouteList, err error) { +func (c *routes) List(ctx context.Context, opts metav1.ListOptions) (result *v1.RouteList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -88,13 +89,13 @@ func (c *routes) List(opts metav1.ListOptions) (result *v1.RouteList, err error) Resource("routes"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested routes. -func (c *routes) Watch(opts metav1.ListOptions) (watch.Interface, error) { +func (c *routes) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -105,87 +106,90 @@ func (c *routes) Watch(opts metav1.ListOptions) (watch.Interface, error) { Resource("routes"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a route and creates it. Returns the server's representation of the route, and an error, if there is any. -func (c *routes) Create(route *v1.Route) (result *v1.Route, err error) { +func (c *routes) Create(ctx context.Context, route *v1.Route, opts metav1.CreateOptions) (result *v1.Route, err error) { result = &v1.Route{} err = c.client.Post(). Namespace(c.ns). Resource("routes"). + VersionedParams(&opts, scheme.ParameterCodec). Body(route). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a route and updates it. Returns the server's representation of the route, and an error, if there is any. -func (c *routes) Update(route *v1.Route) (result *v1.Route, err error) { +func (c *routes) Update(ctx context.Context, route *v1.Route, opts metav1.UpdateOptions) (result *v1.Route, err error) { result = &v1.Route{} err = c.client.Put(). Namespace(c.ns). Resource("routes"). Name(route.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(route). - Do(). + Do(ctx). Into(result) return } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *routes) UpdateStatus(route *v1.Route) (result *v1.Route, err error) { +func (c *routes) UpdateStatus(ctx context.Context, route *v1.Route, opts metav1.UpdateOptions) (result *v1.Route, err error) { result = &v1.Route{} err = c.client.Put(). Namespace(c.ns). Resource("routes"). Name(route.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(route). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the route and deletes it. Returns an error if one occurs. -func (c *routes) Delete(name string, options *metav1.DeleteOptions) error { +func (c *routes) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("routes"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *routes) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error { +func (c *routes) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Namespace(c.ns). Resource("routes"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched route. -func (c *routes) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Route, err error) { +func (c *routes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Route, err error) { result = &v1.Route{} err = c.client.Patch(pt). Namespace(c.ns). Resource("routes"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1/service.go b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1/service.go index a2148ae012..5411fb7f6b 100644 --- a/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1/service.go +++ b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1/service.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" "time" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -37,15 +38,15 @@ type ServicesGetter interface { // ServiceInterface has methods to work with Service resources. type ServiceInterface interface { - Create(*v1.Service) (*v1.Service, error) - Update(*v1.Service) (*v1.Service, error) - UpdateStatus(*v1.Service) (*v1.Service, error) - Delete(name string, options *metav1.DeleteOptions) error - DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error - Get(name string, options metav1.GetOptions) (*v1.Service, error) - List(opts metav1.ListOptions) (*v1.ServiceList, error) - Watch(opts metav1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Service, err error) + Create(ctx context.Context, service *v1.Service, opts metav1.CreateOptions) (*v1.Service, error) + Update(ctx context.Context, service *v1.Service, opts metav1.UpdateOptions) (*v1.Service, error) + UpdateStatus(ctx context.Context, service *v1.Service, opts metav1.UpdateOptions) (*v1.Service, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Service, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.ServiceList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Service, err error) ServiceExpansion } @@ -64,20 +65,20 @@ func newServices(c *ServingV1Client, namespace string) *services { } // Get takes name of the service, and returns the corresponding service object, and an error if there is any. -func (c *services) Get(name string, options metav1.GetOptions) (result *v1.Service, err error) { +func (c *services) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Service, err error) { result = &v1.Service{} err = c.client.Get(). Namespace(c.ns). Resource("services"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of Services that match those selectors. -func (c *services) List(opts metav1.ListOptions) (result *v1.ServiceList, err error) { +func (c *services) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ServiceList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -88,13 +89,13 @@ func (c *services) List(opts metav1.ListOptions) (result *v1.ServiceList, err er Resource("services"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested services. -func (c *services) Watch(opts metav1.ListOptions) (watch.Interface, error) { +func (c *services) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -105,87 +106,90 @@ func (c *services) Watch(opts metav1.ListOptions) (watch.Interface, error) { Resource("services"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a service and creates it. Returns the server's representation of the service, and an error, if there is any. -func (c *services) Create(service *v1.Service) (result *v1.Service, err error) { +func (c *services) Create(ctx context.Context, service *v1.Service, opts metav1.CreateOptions) (result *v1.Service, err error) { result = &v1.Service{} err = c.client.Post(). Namespace(c.ns). Resource("services"). + VersionedParams(&opts, scheme.ParameterCodec). Body(service). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a service and updates it. Returns the server's representation of the service, and an error, if there is any. -func (c *services) Update(service *v1.Service) (result *v1.Service, err error) { +func (c *services) Update(ctx context.Context, service *v1.Service, opts metav1.UpdateOptions) (result *v1.Service, err error) { result = &v1.Service{} err = c.client.Put(). Namespace(c.ns). Resource("services"). Name(service.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(service). - Do(). + Do(ctx). Into(result) return } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *services) UpdateStatus(service *v1.Service) (result *v1.Service, err error) { +func (c *services) UpdateStatus(ctx context.Context, service *v1.Service, opts metav1.UpdateOptions) (result *v1.Service, err error) { result = &v1.Service{} err = c.client.Put(). Namespace(c.ns). Resource("services"). Name(service.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(service). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the service and deletes it. Returns an error if one occurs. -func (c *services) Delete(name string, options *metav1.DeleteOptions) error { +func (c *services) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("services"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *services) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error { +func (c *services) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Namespace(c.ns). Resource("services"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched service. -func (c *services) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Service, err error) { +func (c *services) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Service, err error) { result = &v1.Service{} err = c.client.Patch(pt). Namespace(c.ns). Resource("services"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1alpha1/configuration.go b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1alpha1/configuration.go index 1d583fdbaf..6f1b5ca453 100644 --- a/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1alpha1/configuration.go +++ b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1alpha1/configuration.go @@ -19,6 +19,7 @@ limitations under the License. package v1alpha1 import ( + "context" "time" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -37,15 +38,15 @@ type ConfigurationsGetter interface { // ConfigurationInterface has methods to work with Configuration resources. type ConfigurationInterface interface { - Create(*v1alpha1.Configuration) (*v1alpha1.Configuration, error) - Update(*v1alpha1.Configuration) (*v1alpha1.Configuration, error) - UpdateStatus(*v1alpha1.Configuration) (*v1alpha1.Configuration, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*v1alpha1.Configuration, error) - List(opts v1.ListOptions) (*v1alpha1.ConfigurationList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.Configuration, err error) + Create(ctx context.Context, configuration *v1alpha1.Configuration, opts v1.CreateOptions) (*v1alpha1.Configuration, error) + Update(ctx context.Context, configuration *v1alpha1.Configuration, opts v1.UpdateOptions) (*v1alpha1.Configuration, error) + UpdateStatus(ctx context.Context, configuration *v1alpha1.Configuration, opts v1.UpdateOptions) (*v1alpha1.Configuration, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.Configuration, error) + List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.ConfigurationList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.Configuration, err error) ConfigurationExpansion } @@ -64,20 +65,20 @@ func newConfigurations(c *ServingV1alpha1Client, namespace string) *configuratio } // Get takes name of the configuration, and returns the corresponding configuration object, and an error if there is any. -func (c *configurations) Get(name string, options v1.GetOptions) (result *v1alpha1.Configuration, err error) { +func (c *configurations) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.Configuration, err error) { result = &v1alpha1.Configuration{} err = c.client.Get(). Namespace(c.ns). Resource("configurations"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of Configurations that match those selectors. -func (c *configurations) List(opts v1.ListOptions) (result *v1alpha1.ConfigurationList, err error) { +func (c *configurations) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ConfigurationList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -88,13 +89,13 @@ func (c *configurations) List(opts v1.ListOptions) (result *v1alpha1.Configurati Resource("configurations"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested configurations. -func (c *configurations) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *configurations) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -105,87 +106,90 @@ func (c *configurations) Watch(opts v1.ListOptions) (watch.Interface, error) { Resource("configurations"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a configuration and creates it. Returns the server's representation of the configuration, and an error, if there is any. -func (c *configurations) Create(configuration *v1alpha1.Configuration) (result *v1alpha1.Configuration, err error) { +func (c *configurations) Create(ctx context.Context, configuration *v1alpha1.Configuration, opts v1.CreateOptions) (result *v1alpha1.Configuration, err error) { result = &v1alpha1.Configuration{} err = c.client.Post(). Namespace(c.ns). Resource("configurations"). + VersionedParams(&opts, scheme.ParameterCodec). Body(configuration). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a configuration and updates it. Returns the server's representation of the configuration, and an error, if there is any. -func (c *configurations) Update(configuration *v1alpha1.Configuration) (result *v1alpha1.Configuration, err error) { +func (c *configurations) Update(ctx context.Context, configuration *v1alpha1.Configuration, opts v1.UpdateOptions) (result *v1alpha1.Configuration, err error) { result = &v1alpha1.Configuration{} err = c.client.Put(). Namespace(c.ns). Resource("configurations"). Name(configuration.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(configuration). - Do(). + Do(ctx). Into(result) return } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *configurations) UpdateStatus(configuration *v1alpha1.Configuration) (result *v1alpha1.Configuration, err error) { +func (c *configurations) UpdateStatus(ctx context.Context, configuration *v1alpha1.Configuration, opts v1.UpdateOptions) (result *v1alpha1.Configuration, err error) { result = &v1alpha1.Configuration{} err = c.client.Put(). Namespace(c.ns). Resource("configurations"). Name(configuration.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(configuration). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the configuration and deletes it. Returns an error if one occurs. -func (c *configurations) Delete(name string, options *v1.DeleteOptions) error { +func (c *configurations) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("configurations"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *configurations) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *configurations) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Namespace(c.ns). Resource("configurations"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched configuration. -func (c *configurations) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.Configuration, err error) { +func (c *configurations) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.Configuration, err error) { result = &v1alpha1.Configuration{} err = c.client.Patch(pt). Namespace(c.ns). Resource("configurations"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1alpha1/revision.go b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1alpha1/revision.go index efac4f465a..5ba0f83f25 100644 --- a/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1alpha1/revision.go +++ b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1alpha1/revision.go @@ -19,6 +19,7 @@ limitations under the License. package v1alpha1 import ( + "context" "time" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -37,15 +38,15 @@ type RevisionsGetter interface { // RevisionInterface has methods to work with Revision resources. type RevisionInterface interface { - Create(*v1alpha1.Revision) (*v1alpha1.Revision, error) - Update(*v1alpha1.Revision) (*v1alpha1.Revision, error) - UpdateStatus(*v1alpha1.Revision) (*v1alpha1.Revision, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*v1alpha1.Revision, error) - List(opts v1.ListOptions) (*v1alpha1.RevisionList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.Revision, err error) + Create(ctx context.Context, revision *v1alpha1.Revision, opts v1.CreateOptions) (*v1alpha1.Revision, error) + Update(ctx context.Context, revision *v1alpha1.Revision, opts v1.UpdateOptions) (*v1alpha1.Revision, error) + UpdateStatus(ctx context.Context, revision *v1alpha1.Revision, opts v1.UpdateOptions) (*v1alpha1.Revision, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.Revision, error) + List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.RevisionList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.Revision, err error) RevisionExpansion } @@ -64,20 +65,20 @@ func newRevisions(c *ServingV1alpha1Client, namespace string) *revisions { } // Get takes name of the revision, and returns the corresponding revision object, and an error if there is any. -func (c *revisions) Get(name string, options v1.GetOptions) (result *v1alpha1.Revision, err error) { +func (c *revisions) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.Revision, err error) { result = &v1alpha1.Revision{} err = c.client.Get(). Namespace(c.ns). Resource("revisions"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of Revisions that match those selectors. -func (c *revisions) List(opts v1.ListOptions) (result *v1alpha1.RevisionList, err error) { +func (c *revisions) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.RevisionList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -88,13 +89,13 @@ func (c *revisions) List(opts v1.ListOptions) (result *v1alpha1.RevisionList, er Resource("revisions"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested revisions. -func (c *revisions) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *revisions) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -105,87 +106,90 @@ func (c *revisions) Watch(opts v1.ListOptions) (watch.Interface, error) { Resource("revisions"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a revision and creates it. Returns the server's representation of the revision, and an error, if there is any. -func (c *revisions) Create(revision *v1alpha1.Revision) (result *v1alpha1.Revision, err error) { +func (c *revisions) Create(ctx context.Context, revision *v1alpha1.Revision, opts v1.CreateOptions) (result *v1alpha1.Revision, err error) { result = &v1alpha1.Revision{} err = c.client.Post(). Namespace(c.ns). Resource("revisions"). + VersionedParams(&opts, scheme.ParameterCodec). Body(revision). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a revision and updates it. Returns the server's representation of the revision, and an error, if there is any. -func (c *revisions) Update(revision *v1alpha1.Revision) (result *v1alpha1.Revision, err error) { +func (c *revisions) Update(ctx context.Context, revision *v1alpha1.Revision, opts v1.UpdateOptions) (result *v1alpha1.Revision, err error) { result = &v1alpha1.Revision{} err = c.client.Put(). Namespace(c.ns). Resource("revisions"). Name(revision.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(revision). - Do(). + Do(ctx). Into(result) return } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *revisions) UpdateStatus(revision *v1alpha1.Revision) (result *v1alpha1.Revision, err error) { +func (c *revisions) UpdateStatus(ctx context.Context, revision *v1alpha1.Revision, opts v1.UpdateOptions) (result *v1alpha1.Revision, err error) { result = &v1alpha1.Revision{} err = c.client.Put(). Namespace(c.ns). Resource("revisions"). Name(revision.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(revision). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the revision and deletes it. Returns an error if one occurs. -func (c *revisions) Delete(name string, options *v1.DeleteOptions) error { +func (c *revisions) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("revisions"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *revisions) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *revisions) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Namespace(c.ns). Resource("revisions"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched revision. -func (c *revisions) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.Revision, err error) { +func (c *revisions) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.Revision, err error) { result = &v1alpha1.Revision{} err = c.client.Patch(pt). Namespace(c.ns). Resource("revisions"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1alpha1/route.go b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1alpha1/route.go index 82e9d2373b..1fe86782d2 100644 --- a/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1alpha1/route.go +++ b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1alpha1/route.go @@ -19,6 +19,7 @@ limitations under the License. package v1alpha1 import ( + "context" "time" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -37,15 +38,15 @@ type RoutesGetter interface { // RouteInterface has methods to work with Route resources. type RouteInterface interface { - Create(*v1alpha1.Route) (*v1alpha1.Route, error) - Update(*v1alpha1.Route) (*v1alpha1.Route, error) - UpdateStatus(*v1alpha1.Route) (*v1alpha1.Route, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*v1alpha1.Route, error) - List(opts v1.ListOptions) (*v1alpha1.RouteList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.Route, err error) + Create(ctx context.Context, route *v1alpha1.Route, opts v1.CreateOptions) (*v1alpha1.Route, error) + Update(ctx context.Context, route *v1alpha1.Route, opts v1.UpdateOptions) (*v1alpha1.Route, error) + UpdateStatus(ctx context.Context, route *v1alpha1.Route, opts v1.UpdateOptions) (*v1alpha1.Route, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.Route, error) + List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.RouteList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.Route, err error) RouteExpansion } @@ -64,20 +65,20 @@ func newRoutes(c *ServingV1alpha1Client, namespace string) *routes { } // Get takes name of the route, and returns the corresponding route object, and an error if there is any. -func (c *routes) Get(name string, options v1.GetOptions) (result *v1alpha1.Route, err error) { +func (c *routes) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.Route, err error) { result = &v1alpha1.Route{} err = c.client.Get(). Namespace(c.ns). Resource("routes"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of Routes that match those selectors. -func (c *routes) List(opts v1.ListOptions) (result *v1alpha1.RouteList, err error) { +func (c *routes) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.RouteList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -88,13 +89,13 @@ func (c *routes) List(opts v1.ListOptions) (result *v1alpha1.RouteList, err erro Resource("routes"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested routes. -func (c *routes) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *routes) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -105,87 +106,90 @@ func (c *routes) Watch(opts v1.ListOptions) (watch.Interface, error) { Resource("routes"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a route and creates it. Returns the server's representation of the route, and an error, if there is any. -func (c *routes) Create(route *v1alpha1.Route) (result *v1alpha1.Route, err error) { +func (c *routes) Create(ctx context.Context, route *v1alpha1.Route, opts v1.CreateOptions) (result *v1alpha1.Route, err error) { result = &v1alpha1.Route{} err = c.client.Post(). Namespace(c.ns). Resource("routes"). + VersionedParams(&opts, scheme.ParameterCodec). Body(route). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a route and updates it. Returns the server's representation of the route, and an error, if there is any. -func (c *routes) Update(route *v1alpha1.Route) (result *v1alpha1.Route, err error) { +func (c *routes) Update(ctx context.Context, route *v1alpha1.Route, opts v1.UpdateOptions) (result *v1alpha1.Route, err error) { result = &v1alpha1.Route{} err = c.client.Put(). Namespace(c.ns). Resource("routes"). Name(route.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(route). - Do(). + Do(ctx). Into(result) return } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *routes) UpdateStatus(route *v1alpha1.Route) (result *v1alpha1.Route, err error) { +func (c *routes) UpdateStatus(ctx context.Context, route *v1alpha1.Route, opts v1.UpdateOptions) (result *v1alpha1.Route, err error) { result = &v1alpha1.Route{} err = c.client.Put(). Namespace(c.ns). Resource("routes"). Name(route.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(route). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the route and deletes it. Returns an error if one occurs. -func (c *routes) Delete(name string, options *v1.DeleteOptions) error { +func (c *routes) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("routes"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *routes) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *routes) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Namespace(c.ns). Resource("routes"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched route. -func (c *routes) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.Route, err error) { +func (c *routes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.Route, err error) { result = &v1alpha1.Route{} err = c.client.Patch(pt). Namespace(c.ns). Resource("routes"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1alpha1/service.go b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1alpha1/service.go index a5b669ab38..e87d359f0d 100644 --- a/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1alpha1/service.go +++ b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1alpha1/service.go @@ -19,6 +19,7 @@ limitations under the License. package v1alpha1 import ( + "context" "time" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -37,15 +38,15 @@ type ServicesGetter interface { // ServiceInterface has methods to work with Service resources. type ServiceInterface interface { - Create(*v1alpha1.Service) (*v1alpha1.Service, error) - Update(*v1alpha1.Service) (*v1alpha1.Service, error) - UpdateStatus(*v1alpha1.Service) (*v1alpha1.Service, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*v1alpha1.Service, error) - List(opts v1.ListOptions) (*v1alpha1.ServiceList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.Service, err error) + Create(ctx context.Context, service *v1alpha1.Service, opts v1.CreateOptions) (*v1alpha1.Service, error) + Update(ctx context.Context, service *v1alpha1.Service, opts v1.UpdateOptions) (*v1alpha1.Service, error) + UpdateStatus(ctx context.Context, service *v1alpha1.Service, opts v1.UpdateOptions) (*v1alpha1.Service, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.Service, error) + List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.ServiceList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.Service, err error) ServiceExpansion } @@ -64,20 +65,20 @@ func newServices(c *ServingV1alpha1Client, namespace string) *services { } // Get takes name of the service, and returns the corresponding service object, and an error if there is any. -func (c *services) Get(name string, options v1.GetOptions) (result *v1alpha1.Service, err error) { +func (c *services) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.Service, err error) { result = &v1alpha1.Service{} err = c.client.Get(). Namespace(c.ns). Resource("services"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of Services that match those selectors. -func (c *services) List(opts v1.ListOptions) (result *v1alpha1.ServiceList, err error) { +func (c *services) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ServiceList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -88,13 +89,13 @@ func (c *services) List(opts v1.ListOptions) (result *v1alpha1.ServiceList, err Resource("services"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested services. -func (c *services) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *services) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -105,87 +106,90 @@ func (c *services) Watch(opts v1.ListOptions) (watch.Interface, error) { Resource("services"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a service and creates it. Returns the server's representation of the service, and an error, if there is any. -func (c *services) Create(service *v1alpha1.Service) (result *v1alpha1.Service, err error) { +func (c *services) Create(ctx context.Context, service *v1alpha1.Service, opts v1.CreateOptions) (result *v1alpha1.Service, err error) { result = &v1alpha1.Service{} err = c.client.Post(). Namespace(c.ns). Resource("services"). + VersionedParams(&opts, scheme.ParameterCodec). Body(service). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a service and updates it. Returns the server's representation of the service, and an error, if there is any. -func (c *services) Update(service *v1alpha1.Service) (result *v1alpha1.Service, err error) { +func (c *services) Update(ctx context.Context, service *v1alpha1.Service, opts v1.UpdateOptions) (result *v1alpha1.Service, err error) { result = &v1alpha1.Service{} err = c.client.Put(). Namespace(c.ns). Resource("services"). Name(service.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(service). - Do(). + Do(ctx). Into(result) return } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *services) UpdateStatus(service *v1alpha1.Service) (result *v1alpha1.Service, err error) { +func (c *services) UpdateStatus(ctx context.Context, service *v1alpha1.Service, opts v1.UpdateOptions) (result *v1alpha1.Service, err error) { result = &v1alpha1.Service{} err = c.client.Put(). Namespace(c.ns). Resource("services"). Name(service.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(service). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the service and deletes it. Returns an error if one occurs. -func (c *services) Delete(name string, options *v1.DeleteOptions) error { +func (c *services) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("services"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *services) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *services) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Namespace(c.ns). Resource("services"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched service. -func (c *services) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.Service, err error) { +func (c *services) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.Service, err error) { result = &v1alpha1.Service{} err = c.client.Patch(pt). Namespace(c.ns). Resource("services"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1beta1/configuration.go b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1beta1/configuration.go index abc50b8a1b..1f51961844 100644 --- a/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1beta1/configuration.go +++ b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1beta1/configuration.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" "time" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -37,15 +38,15 @@ type ConfigurationsGetter interface { // ConfigurationInterface has methods to work with Configuration resources. type ConfigurationInterface interface { - Create(*v1beta1.Configuration) (*v1beta1.Configuration, error) - Update(*v1beta1.Configuration) (*v1beta1.Configuration, error) - UpdateStatus(*v1beta1.Configuration) (*v1beta1.Configuration, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*v1beta1.Configuration, error) - List(opts v1.ListOptions) (*v1beta1.ConfigurationList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Configuration, err error) + Create(ctx context.Context, configuration *v1beta1.Configuration, opts v1.CreateOptions) (*v1beta1.Configuration, error) + Update(ctx context.Context, configuration *v1beta1.Configuration, opts v1.UpdateOptions) (*v1beta1.Configuration, error) + UpdateStatus(ctx context.Context, configuration *v1beta1.Configuration, opts v1.UpdateOptions) (*v1beta1.Configuration, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.Configuration, error) + List(ctx context.Context, opts v1.ListOptions) (*v1beta1.ConfigurationList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Configuration, err error) ConfigurationExpansion } @@ -64,20 +65,20 @@ func newConfigurations(c *ServingV1beta1Client, namespace string) *configuration } // Get takes name of the configuration, and returns the corresponding configuration object, and an error if there is any. -func (c *configurations) Get(name string, options v1.GetOptions) (result *v1beta1.Configuration, err error) { +func (c *configurations) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.Configuration, err error) { result = &v1beta1.Configuration{} err = c.client.Get(). Namespace(c.ns). Resource("configurations"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of Configurations that match those selectors. -func (c *configurations) List(opts v1.ListOptions) (result *v1beta1.ConfigurationList, err error) { +func (c *configurations) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.ConfigurationList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -88,13 +89,13 @@ func (c *configurations) List(opts v1.ListOptions) (result *v1beta1.Configuratio Resource("configurations"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested configurations. -func (c *configurations) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *configurations) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -105,87 +106,90 @@ func (c *configurations) Watch(opts v1.ListOptions) (watch.Interface, error) { Resource("configurations"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a configuration and creates it. Returns the server's representation of the configuration, and an error, if there is any. -func (c *configurations) Create(configuration *v1beta1.Configuration) (result *v1beta1.Configuration, err error) { +func (c *configurations) Create(ctx context.Context, configuration *v1beta1.Configuration, opts v1.CreateOptions) (result *v1beta1.Configuration, err error) { result = &v1beta1.Configuration{} err = c.client.Post(). Namespace(c.ns). Resource("configurations"). + VersionedParams(&opts, scheme.ParameterCodec). Body(configuration). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a configuration and updates it. Returns the server's representation of the configuration, and an error, if there is any. -func (c *configurations) Update(configuration *v1beta1.Configuration) (result *v1beta1.Configuration, err error) { +func (c *configurations) Update(ctx context.Context, configuration *v1beta1.Configuration, opts v1.UpdateOptions) (result *v1beta1.Configuration, err error) { result = &v1beta1.Configuration{} err = c.client.Put(). Namespace(c.ns). Resource("configurations"). Name(configuration.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(configuration). - Do(). + Do(ctx). Into(result) return } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *configurations) UpdateStatus(configuration *v1beta1.Configuration) (result *v1beta1.Configuration, err error) { +func (c *configurations) UpdateStatus(ctx context.Context, configuration *v1beta1.Configuration, opts v1.UpdateOptions) (result *v1beta1.Configuration, err error) { result = &v1beta1.Configuration{} err = c.client.Put(). Namespace(c.ns). Resource("configurations"). Name(configuration.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(configuration). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the configuration and deletes it. Returns an error if one occurs. -func (c *configurations) Delete(name string, options *v1.DeleteOptions) error { +func (c *configurations) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("configurations"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *configurations) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *configurations) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Namespace(c.ns). Resource("configurations"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched configuration. -func (c *configurations) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Configuration, err error) { +func (c *configurations) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Configuration, err error) { result = &v1beta1.Configuration{} err = c.client.Patch(pt). Namespace(c.ns). Resource("configurations"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1beta1/revision.go b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1beta1/revision.go index a8ca29f396..d18980edc3 100644 --- a/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1beta1/revision.go +++ b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1beta1/revision.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" "time" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -37,15 +38,15 @@ type RevisionsGetter interface { // RevisionInterface has methods to work with Revision resources. type RevisionInterface interface { - Create(*v1beta1.Revision) (*v1beta1.Revision, error) - Update(*v1beta1.Revision) (*v1beta1.Revision, error) - UpdateStatus(*v1beta1.Revision) (*v1beta1.Revision, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*v1beta1.Revision, error) - List(opts v1.ListOptions) (*v1beta1.RevisionList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Revision, err error) + Create(ctx context.Context, revision *v1beta1.Revision, opts v1.CreateOptions) (*v1beta1.Revision, error) + Update(ctx context.Context, revision *v1beta1.Revision, opts v1.UpdateOptions) (*v1beta1.Revision, error) + UpdateStatus(ctx context.Context, revision *v1beta1.Revision, opts v1.UpdateOptions) (*v1beta1.Revision, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.Revision, error) + List(ctx context.Context, opts v1.ListOptions) (*v1beta1.RevisionList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Revision, err error) RevisionExpansion } @@ -64,20 +65,20 @@ func newRevisions(c *ServingV1beta1Client, namespace string) *revisions { } // Get takes name of the revision, and returns the corresponding revision object, and an error if there is any. -func (c *revisions) Get(name string, options v1.GetOptions) (result *v1beta1.Revision, err error) { +func (c *revisions) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.Revision, err error) { result = &v1beta1.Revision{} err = c.client.Get(). Namespace(c.ns). Resource("revisions"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of Revisions that match those selectors. -func (c *revisions) List(opts v1.ListOptions) (result *v1beta1.RevisionList, err error) { +func (c *revisions) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.RevisionList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -88,13 +89,13 @@ func (c *revisions) List(opts v1.ListOptions) (result *v1beta1.RevisionList, err Resource("revisions"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested revisions. -func (c *revisions) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *revisions) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -105,87 +106,90 @@ func (c *revisions) Watch(opts v1.ListOptions) (watch.Interface, error) { Resource("revisions"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a revision and creates it. Returns the server's representation of the revision, and an error, if there is any. -func (c *revisions) Create(revision *v1beta1.Revision) (result *v1beta1.Revision, err error) { +func (c *revisions) Create(ctx context.Context, revision *v1beta1.Revision, opts v1.CreateOptions) (result *v1beta1.Revision, err error) { result = &v1beta1.Revision{} err = c.client.Post(). Namespace(c.ns). Resource("revisions"). + VersionedParams(&opts, scheme.ParameterCodec). Body(revision). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a revision and updates it. Returns the server's representation of the revision, and an error, if there is any. -func (c *revisions) Update(revision *v1beta1.Revision) (result *v1beta1.Revision, err error) { +func (c *revisions) Update(ctx context.Context, revision *v1beta1.Revision, opts v1.UpdateOptions) (result *v1beta1.Revision, err error) { result = &v1beta1.Revision{} err = c.client.Put(). Namespace(c.ns). Resource("revisions"). Name(revision.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(revision). - Do(). + Do(ctx). Into(result) return } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *revisions) UpdateStatus(revision *v1beta1.Revision) (result *v1beta1.Revision, err error) { +func (c *revisions) UpdateStatus(ctx context.Context, revision *v1beta1.Revision, opts v1.UpdateOptions) (result *v1beta1.Revision, err error) { result = &v1beta1.Revision{} err = c.client.Put(). Namespace(c.ns). Resource("revisions"). Name(revision.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(revision). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the revision and deletes it. Returns an error if one occurs. -func (c *revisions) Delete(name string, options *v1.DeleteOptions) error { +func (c *revisions) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("revisions"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *revisions) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *revisions) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Namespace(c.ns). Resource("revisions"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched revision. -func (c *revisions) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Revision, err error) { +func (c *revisions) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Revision, err error) { result = &v1beta1.Revision{} err = c.client.Patch(pt). Namespace(c.ns). Resource("revisions"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1beta1/route.go b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1beta1/route.go index b893abcf27..455b5ff1eb 100644 --- a/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1beta1/route.go +++ b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1beta1/route.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" "time" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -37,15 +38,15 @@ type RoutesGetter interface { // RouteInterface has methods to work with Route resources. type RouteInterface interface { - Create(*v1beta1.Route) (*v1beta1.Route, error) - Update(*v1beta1.Route) (*v1beta1.Route, error) - UpdateStatus(*v1beta1.Route) (*v1beta1.Route, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*v1beta1.Route, error) - List(opts v1.ListOptions) (*v1beta1.RouteList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Route, err error) + Create(ctx context.Context, route *v1beta1.Route, opts v1.CreateOptions) (*v1beta1.Route, error) + Update(ctx context.Context, route *v1beta1.Route, opts v1.UpdateOptions) (*v1beta1.Route, error) + UpdateStatus(ctx context.Context, route *v1beta1.Route, opts v1.UpdateOptions) (*v1beta1.Route, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.Route, error) + List(ctx context.Context, opts v1.ListOptions) (*v1beta1.RouteList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Route, err error) RouteExpansion } @@ -64,20 +65,20 @@ func newRoutes(c *ServingV1beta1Client, namespace string) *routes { } // Get takes name of the route, and returns the corresponding route object, and an error if there is any. -func (c *routes) Get(name string, options v1.GetOptions) (result *v1beta1.Route, err error) { +func (c *routes) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.Route, err error) { result = &v1beta1.Route{} err = c.client.Get(). Namespace(c.ns). Resource("routes"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of Routes that match those selectors. -func (c *routes) List(opts v1.ListOptions) (result *v1beta1.RouteList, err error) { +func (c *routes) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.RouteList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -88,13 +89,13 @@ func (c *routes) List(opts v1.ListOptions) (result *v1beta1.RouteList, err error Resource("routes"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested routes. -func (c *routes) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *routes) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -105,87 +106,90 @@ func (c *routes) Watch(opts v1.ListOptions) (watch.Interface, error) { Resource("routes"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a route and creates it. Returns the server's representation of the route, and an error, if there is any. -func (c *routes) Create(route *v1beta1.Route) (result *v1beta1.Route, err error) { +func (c *routes) Create(ctx context.Context, route *v1beta1.Route, opts v1.CreateOptions) (result *v1beta1.Route, err error) { result = &v1beta1.Route{} err = c.client.Post(). Namespace(c.ns). Resource("routes"). + VersionedParams(&opts, scheme.ParameterCodec). Body(route). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a route and updates it. Returns the server's representation of the route, and an error, if there is any. -func (c *routes) Update(route *v1beta1.Route) (result *v1beta1.Route, err error) { +func (c *routes) Update(ctx context.Context, route *v1beta1.Route, opts v1.UpdateOptions) (result *v1beta1.Route, err error) { result = &v1beta1.Route{} err = c.client.Put(). Namespace(c.ns). Resource("routes"). Name(route.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(route). - Do(). + Do(ctx). Into(result) return } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *routes) UpdateStatus(route *v1beta1.Route) (result *v1beta1.Route, err error) { +func (c *routes) UpdateStatus(ctx context.Context, route *v1beta1.Route, opts v1.UpdateOptions) (result *v1beta1.Route, err error) { result = &v1beta1.Route{} err = c.client.Put(). Namespace(c.ns). Resource("routes"). Name(route.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(route). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the route and deletes it. Returns an error if one occurs. -func (c *routes) Delete(name string, options *v1.DeleteOptions) error { +func (c *routes) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("routes"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *routes) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *routes) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Namespace(c.ns). Resource("routes"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched route. -func (c *routes) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Route, err error) { +func (c *routes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Route, err error) { result = &v1beta1.Route{} err = c.client.Patch(pt). Namespace(c.ns). Resource("routes"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1beta1/service.go b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1beta1/service.go index 12985f2c77..6c3a48b27d 100644 --- a/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1beta1/service.go +++ b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1beta1/service.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" "time" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -37,15 +38,15 @@ type ServicesGetter interface { // ServiceInterface has methods to work with Service resources. type ServiceInterface interface { - Create(*v1beta1.Service) (*v1beta1.Service, error) - Update(*v1beta1.Service) (*v1beta1.Service, error) - UpdateStatus(*v1beta1.Service) (*v1beta1.Service, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*v1beta1.Service, error) - List(opts v1.ListOptions) (*v1beta1.ServiceList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Service, err error) + Create(ctx context.Context, service *v1beta1.Service, opts v1.CreateOptions) (*v1beta1.Service, error) + Update(ctx context.Context, service *v1beta1.Service, opts v1.UpdateOptions) (*v1beta1.Service, error) + UpdateStatus(ctx context.Context, service *v1beta1.Service, opts v1.UpdateOptions) (*v1beta1.Service, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.Service, error) + List(ctx context.Context, opts v1.ListOptions) (*v1beta1.ServiceList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Service, err error) ServiceExpansion } @@ -64,20 +65,20 @@ func newServices(c *ServingV1beta1Client, namespace string) *services { } // Get takes name of the service, and returns the corresponding service object, and an error if there is any. -func (c *services) Get(name string, options v1.GetOptions) (result *v1beta1.Service, err error) { +func (c *services) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.Service, err error) { result = &v1beta1.Service{} err = c.client.Get(). Namespace(c.ns). Resource("services"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of Services that match those selectors. -func (c *services) List(opts v1.ListOptions) (result *v1beta1.ServiceList, err error) { +func (c *services) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.ServiceList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -88,13 +89,13 @@ func (c *services) List(opts v1.ListOptions) (result *v1beta1.ServiceList, err e Resource("services"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested services. -func (c *services) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *services) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -105,87 +106,90 @@ func (c *services) Watch(opts v1.ListOptions) (watch.Interface, error) { Resource("services"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a service and creates it. Returns the server's representation of the service, and an error, if there is any. -func (c *services) Create(service *v1beta1.Service) (result *v1beta1.Service, err error) { +func (c *services) Create(ctx context.Context, service *v1beta1.Service, opts v1.CreateOptions) (result *v1beta1.Service, err error) { result = &v1beta1.Service{} err = c.client.Post(). Namespace(c.ns). Resource("services"). + VersionedParams(&opts, scheme.ParameterCodec). Body(service). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a service and updates it. Returns the server's representation of the service, and an error, if there is any. -func (c *services) Update(service *v1beta1.Service) (result *v1beta1.Service, err error) { +func (c *services) Update(ctx context.Context, service *v1beta1.Service, opts v1.UpdateOptions) (result *v1beta1.Service, err error) { result = &v1beta1.Service{} err = c.client.Put(). Namespace(c.ns). Resource("services"). Name(service.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(service). - Do(). + Do(ctx). Into(result) return } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *services) UpdateStatus(service *v1beta1.Service) (result *v1beta1.Service, err error) { +func (c *services) UpdateStatus(ctx context.Context, service *v1beta1.Service, opts v1.UpdateOptions) (result *v1beta1.Service, err error) { result = &v1beta1.Service{} err = c.client.Put(). Namespace(c.ns). Resource("services"). Name(service.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(service). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the service and deletes it. Returns an error if one occurs. -func (c *services) Delete(name string, options *v1.DeleteOptions) error { +func (c *services) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("services"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *services) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *services) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Namespace(c.ns). Resource("services"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched service. -func (c *services) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Service, err error) { +func (c *services) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Service, err error) { result = &v1beta1.Service{} err = c.client.Patch(pt). Namespace(c.ns). Resource("services"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/vendor/knative.dev/serving/pkg/client/informers/externalversions/autoscaling/v1alpha1/metric.go b/vendor/knative.dev/serving/pkg/client/informers/externalversions/autoscaling/v1alpha1/metric.go index 5a5a8f4515..4ae981da2b 100644 --- a/vendor/knative.dev/serving/pkg/client/informers/externalversions/autoscaling/v1alpha1/metric.go +++ b/vendor/knative.dev/serving/pkg/client/informers/externalversions/autoscaling/v1alpha1/metric.go @@ -19,6 +19,7 @@ limitations under the License. package v1alpha1 import ( + "context" time "time" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -61,13 +62,13 @@ func NewFilteredMetricInformer(client versioned.Interface, namespace string, res if tweakListOptions != nil { tweakListOptions(&options) } - return client.AutoscalingV1alpha1().Metrics(namespace).List(options) + return client.AutoscalingV1alpha1().Metrics(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.AutoscalingV1alpha1().Metrics(namespace).Watch(options) + return client.AutoscalingV1alpha1().Metrics(namespace).Watch(context.TODO(), options) }, }, &autoscalingv1alpha1.Metric{}, diff --git a/vendor/knative.dev/serving/pkg/client/informers/externalversions/autoscaling/v1alpha1/podautoscaler.go b/vendor/knative.dev/serving/pkg/client/informers/externalversions/autoscaling/v1alpha1/podautoscaler.go index eb872c4f55..d7da120870 100644 --- a/vendor/knative.dev/serving/pkg/client/informers/externalversions/autoscaling/v1alpha1/podautoscaler.go +++ b/vendor/knative.dev/serving/pkg/client/informers/externalversions/autoscaling/v1alpha1/podautoscaler.go @@ -19,6 +19,7 @@ limitations under the License. package v1alpha1 import ( + "context" time "time" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -61,13 +62,13 @@ func NewFilteredPodAutoscalerInformer(client versioned.Interface, namespace stri if tweakListOptions != nil { tweakListOptions(&options) } - return client.AutoscalingV1alpha1().PodAutoscalers(namespace).List(options) + return client.AutoscalingV1alpha1().PodAutoscalers(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.AutoscalingV1alpha1().PodAutoscalers(namespace).Watch(options) + return client.AutoscalingV1alpha1().PodAutoscalers(namespace).Watch(context.TODO(), options) }, }, &autoscalingv1alpha1.PodAutoscaler{}, diff --git a/vendor/knative.dev/serving/pkg/client/informers/externalversions/serving/v1/configuration.go b/vendor/knative.dev/serving/pkg/client/informers/externalversions/serving/v1/configuration.go index 6e5b5e5e32..3056d742f2 100644 --- a/vendor/knative.dev/serving/pkg/client/informers/externalversions/serving/v1/configuration.go +++ b/vendor/knative.dev/serving/pkg/client/informers/externalversions/serving/v1/configuration.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" time "time" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -61,13 +62,13 @@ func NewFilteredConfigurationInformer(client versioned.Interface, namespace stri if tweakListOptions != nil { tweakListOptions(&options) } - return client.ServingV1().Configurations(namespace).List(options) + return client.ServingV1().Configurations(namespace).List(context.TODO(), options) }, WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.ServingV1().Configurations(namespace).Watch(options) + return client.ServingV1().Configurations(namespace).Watch(context.TODO(), options) }, }, &servingv1.Configuration{}, diff --git a/vendor/knative.dev/serving/pkg/client/informers/externalversions/serving/v1/revision.go b/vendor/knative.dev/serving/pkg/client/informers/externalversions/serving/v1/revision.go index 759a009327..de376c5911 100644 --- a/vendor/knative.dev/serving/pkg/client/informers/externalversions/serving/v1/revision.go +++ b/vendor/knative.dev/serving/pkg/client/informers/externalversions/serving/v1/revision.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" time "time" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -61,13 +62,13 @@ func NewFilteredRevisionInformer(client versioned.Interface, namespace string, r if tweakListOptions != nil { tweakListOptions(&options) } - return client.ServingV1().Revisions(namespace).List(options) + return client.ServingV1().Revisions(namespace).List(context.TODO(), options) }, WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.ServingV1().Revisions(namespace).Watch(options) + return client.ServingV1().Revisions(namespace).Watch(context.TODO(), options) }, }, &servingv1.Revision{}, diff --git a/vendor/knative.dev/serving/pkg/client/informers/externalversions/serving/v1/route.go b/vendor/knative.dev/serving/pkg/client/informers/externalversions/serving/v1/route.go index dd94268445..edf0bbc2f9 100644 --- a/vendor/knative.dev/serving/pkg/client/informers/externalversions/serving/v1/route.go +++ b/vendor/knative.dev/serving/pkg/client/informers/externalversions/serving/v1/route.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" time "time" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -61,13 +62,13 @@ func NewFilteredRouteInformer(client versioned.Interface, namespace string, resy if tweakListOptions != nil { tweakListOptions(&options) } - return client.ServingV1().Routes(namespace).List(options) + return client.ServingV1().Routes(namespace).List(context.TODO(), options) }, WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.ServingV1().Routes(namespace).Watch(options) + return client.ServingV1().Routes(namespace).Watch(context.TODO(), options) }, }, &servingv1.Route{}, diff --git a/vendor/knative.dev/serving/pkg/client/informers/externalversions/serving/v1/service.go b/vendor/knative.dev/serving/pkg/client/informers/externalversions/serving/v1/service.go index 2f17a4fc92..ecc3d6a7ef 100644 --- a/vendor/knative.dev/serving/pkg/client/informers/externalversions/serving/v1/service.go +++ b/vendor/knative.dev/serving/pkg/client/informers/externalversions/serving/v1/service.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" time "time" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -61,13 +62,13 @@ func NewFilteredServiceInformer(client versioned.Interface, namespace string, re if tweakListOptions != nil { tweakListOptions(&options) } - return client.ServingV1().Services(namespace).List(options) + return client.ServingV1().Services(namespace).List(context.TODO(), options) }, WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.ServingV1().Services(namespace).Watch(options) + return client.ServingV1().Services(namespace).Watch(context.TODO(), options) }, }, &servingv1.Service{}, diff --git a/vendor/knative.dev/serving/pkg/client/informers/externalversions/serving/v1alpha1/configuration.go b/vendor/knative.dev/serving/pkg/client/informers/externalversions/serving/v1alpha1/configuration.go index a7f4b47e25..2f396318ec 100644 --- a/vendor/knative.dev/serving/pkg/client/informers/externalversions/serving/v1alpha1/configuration.go +++ b/vendor/knative.dev/serving/pkg/client/informers/externalversions/serving/v1alpha1/configuration.go @@ -19,6 +19,7 @@ limitations under the License. package v1alpha1 import ( + "context" time "time" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -61,13 +62,13 @@ func NewFilteredConfigurationInformer(client versioned.Interface, namespace stri if tweakListOptions != nil { tweakListOptions(&options) } - return client.ServingV1alpha1().Configurations(namespace).List(options) + return client.ServingV1alpha1().Configurations(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.ServingV1alpha1().Configurations(namespace).Watch(options) + return client.ServingV1alpha1().Configurations(namespace).Watch(context.TODO(), options) }, }, &servingv1alpha1.Configuration{}, diff --git a/vendor/knative.dev/serving/pkg/client/informers/externalversions/serving/v1alpha1/revision.go b/vendor/knative.dev/serving/pkg/client/informers/externalversions/serving/v1alpha1/revision.go index 3fccf1d3b6..ac22f20243 100644 --- a/vendor/knative.dev/serving/pkg/client/informers/externalversions/serving/v1alpha1/revision.go +++ b/vendor/knative.dev/serving/pkg/client/informers/externalversions/serving/v1alpha1/revision.go @@ -19,6 +19,7 @@ limitations under the License. package v1alpha1 import ( + "context" time "time" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -61,13 +62,13 @@ func NewFilteredRevisionInformer(client versioned.Interface, namespace string, r if tweakListOptions != nil { tweakListOptions(&options) } - return client.ServingV1alpha1().Revisions(namespace).List(options) + return client.ServingV1alpha1().Revisions(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.ServingV1alpha1().Revisions(namespace).Watch(options) + return client.ServingV1alpha1().Revisions(namespace).Watch(context.TODO(), options) }, }, &servingv1alpha1.Revision{}, diff --git a/vendor/knative.dev/serving/pkg/client/informers/externalversions/serving/v1alpha1/route.go b/vendor/knative.dev/serving/pkg/client/informers/externalversions/serving/v1alpha1/route.go index 79db675ef0..a9219be001 100644 --- a/vendor/knative.dev/serving/pkg/client/informers/externalversions/serving/v1alpha1/route.go +++ b/vendor/knative.dev/serving/pkg/client/informers/externalversions/serving/v1alpha1/route.go @@ -19,6 +19,7 @@ limitations under the License. package v1alpha1 import ( + "context" time "time" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -61,13 +62,13 @@ func NewFilteredRouteInformer(client versioned.Interface, namespace string, resy if tweakListOptions != nil { tweakListOptions(&options) } - return client.ServingV1alpha1().Routes(namespace).List(options) + return client.ServingV1alpha1().Routes(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.ServingV1alpha1().Routes(namespace).Watch(options) + return client.ServingV1alpha1().Routes(namespace).Watch(context.TODO(), options) }, }, &servingv1alpha1.Route{}, diff --git a/vendor/knative.dev/serving/pkg/client/informers/externalversions/serving/v1alpha1/service.go b/vendor/knative.dev/serving/pkg/client/informers/externalversions/serving/v1alpha1/service.go index 1b141a6f3f..95ea1ec4b8 100644 --- a/vendor/knative.dev/serving/pkg/client/informers/externalversions/serving/v1alpha1/service.go +++ b/vendor/knative.dev/serving/pkg/client/informers/externalversions/serving/v1alpha1/service.go @@ -19,6 +19,7 @@ limitations under the License. package v1alpha1 import ( + "context" time "time" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -61,13 +62,13 @@ func NewFilteredServiceInformer(client versioned.Interface, namespace string, re if tweakListOptions != nil { tweakListOptions(&options) } - return client.ServingV1alpha1().Services(namespace).List(options) + return client.ServingV1alpha1().Services(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.ServingV1alpha1().Services(namespace).Watch(options) + return client.ServingV1alpha1().Services(namespace).Watch(context.TODO(), options) }, }, &servingv1alpha1.Service{}, diff --git a/vendor/knative.dev/serving/pkg/client/informers/externalversions/serving/v1beta1/configuration.go b/vendor/knative.dev/serving/pkg/client/informers/externalversions/serving/v1beta1/configuration.go index 338b8d014c..44ad9cd53d 100644 --- a/vendor/knative.dev/serving/pkg/client/informers/externalversions/serving/v1beta1/configuration.go +++ b/vendor/knative.dev/serving/pkg/client/informers/externalversions/serving/v1beta1/configuration.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" time "time" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -61,13 +62,13 @@ func NewFilteredConfigurationInformer(client versioned.Interface, namespace stri if tweakListOptions != nil { tweakListOptions(&options) } - return client.ServingV1beta1().Configurations(namespace).List(options) + return client.ServingV1beta1().Configurations(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.ServingV1beta1().Configurations(namespace).Watch(options) + return client.ServingV1beta1().Configurations(namespace).Watch(context.TODO(), options) }, }, &servingv1beta1.Configuration{}, diff --git a/vendor/knative.dev/serving/pkg/client/informers/externalversions/serving/v1beta1/revision.go b/vendor/knative.dev/serving/pkg/client/informers/externalversions/serving/v1beta1/revision.go index 1d44246d0c..a1d5cdb464 100644 --- a/vendor/knative.dev/serving/pkg/client/informers/externalversions/serving/v1beta1/revision.go +++ b/vendor/knative.dev/serving/pkg/client/informers/externalversions/serving/v1beta1/revision.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" time "time" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -61,13 +62,13 @@ func NewFilteredRevisionInformer(client versioned.Interface, namespace string, r if tweakListOptions != nil { tweakListOptions(&options) } - return client.ServingV1beta1().Revisions(namespace).List(options) + return client.ServingV1beta1().Revisions(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.ServingV1beta1().Revisions(namespace).Watch(options) + return client.ServingV1beta1().Revisions(namespace).Watch(context.TODO(), options) }, }, &servingv1beta1.Revision{}, diff --git a/vendor/knative.dev/serving/pkg/client/informers/externalversions/serving/v1beta1/route.go b/vendor/knative.dev/serving/pkg/client/informers/externalversions/serving/v1beta1/route.go index 3d22f848f5..100c3146ab 100644 --- a/vendor/knative.dev/serving/pkg/client/informers/externalversions/serving/v1beta1/route.go +++ b/vendor/knative.dev/serving/pkg/client/informers/externalversions/serving/v1beta1/route.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" time "time" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -61,13 +62,13 @@ func NewFilteredRouteInformer(client versioned.Interface, namespace string, resy if tweakListOptions != nil { tweakListOptions(&options) } - return client.ServingV1beta1().Routes(namespace).List(options) + return client.ServingV1beta1().Routes(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.ServingV1beta1().Routes(namespace).Watch(options) + return client.ServingV1beta1().Routes(namespace).Watch(context.TODO(), options) }, }, &servingv1beta1.Route{}, diff --git a/vendor/knative.dev/serving/pkg/client/informers/externalversions/serving/v1beta1/service.go b/vendor/knative.dev/serving/pkg/client/informers/externalversions/serving/v1beta1/service.go index e06575d1ef..22e27b54c4 100644 --- a/vendor/knative.dev/serving/pkg/client/informers/externalversions/serving/v1beta1/service.go +++ b/vendor/knative.dev/serving/pkg/client/informers/externalversions/serving/v1beta1/service.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" time "time" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -61,13 +62,13 @@ func NewFilteredServiceInformer(client versioned.Interface, namespace string, re if tweakListOptions != nil { tweakListOptions(&options) } - return client.ServingV1beta1().Services(namespace).List(options) + return client.ServingV1beta1().Services(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.ServingV1beta1().Services(namespace).Watch(options) + return client.ServingV1beta1().Services(namespace).Watch(context.TODO(), options) }, }, &servingv1beta1.Service{}, diff --git a/vendor/modules.txt b/vendor/modules.txt index f4322a3015..b7f4402487 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -36,22 +36,6 @@ github.com/alecthomas/template github.com/alecthomas/template/parse # github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d github.com/alecthomas/units -# github.com/apache/camel-k/pkg/apis/camel v1.1.0 -## explicit -github.com/apache/camel-k/pkg/apis/camel/v1 -github.com/apache/camel-k/pkg/apis/camel/v1/knative -# github.com/apache/camel-k/pkg/client/camel v1.1.0 -## explicit -github.com/apache/camel-k/pkg/client/camel/clientset/versioned -github.com/apache/camel-k/pkg/client/camel/clientset/versioned/fake -github.com/apache/camel-k/pkg/client/camel/clientset/versioned/scheme -github.com/apache/camel-k/pkg/client/camel/clientset/versioned/typed/camel/v1 -github.com/apache/camel-k/pkg/client/camel/clientset/versioned/typed/camel/v1/fake -github.com/apache/camel-k/pkg/client/camel/informers/externalversions -github.com/apache/camel-k/pkg/client/camel/informers/externalversions/camel -github.com/apache/camel-k/pkg/client/camel/informers/externalversions/camel/v1 -github.com/apache/camel-k/pkg/client/camel/informers/externalversions/internalinterfaces -github.com/apache/camel-k/pkg/client/camel/listers/camel/v1 # github.com/aws/aws-sdk-go v1.31.12 ## explicit github.com/aws/aws-sdk-go/aws @@ -203,7 +187,7 @@ github.com/google/go-cmp/cmp/internal/diff github.com/google/go-cmp/cmp/internal/flags github.com/google/go-cmp/cmp/internal/function github.com/google/go-cmp/cmp/internal/value -# github.com/google/go-containerregistry v0.1.2-0.20200717224239-a84993334b27 +# github.com/google/go-containerregistry v0.1.3-0.20200910230023-d42b6a2ddfd1 github.com/google/go-containerregistry/pkg/name # github.com/google/go-github/v27 v27.0.6 github.com/google/go-github/v27/github @@ -443,7 +427,7 @@ golang.org/x/lint/golint # golang.org/x/mod v0.3.0 golang.org/x/mod/module golang.org/x/mod/semver -# golang.org/x/net v0.0.0-20200707034311-ab3426394381 +# golang.org/x/net v0.0.0-20200822124328-c89045814202 ## explicit golang.org/x/net/context golang.org/x/net/context/ctxhttp @@ -481,7 +465,7 @@ golang.org/x/text/unicode/norm golang.org/x/text/width # golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e golang.org/x/time/rate -# golang.org/x/tools v0.0.0-20200731060945-b5fad4ed8dd6 +# golang.org/x/tools v0.0.0-20200910222312-571a207697e7 golang.org/x/tools/cmd/goimports golang.org/x/tools/go/analysis golang.org/x/tools/go/analysis/passes/inspect @@ -506,38 +490,14 @@ golang.org/x/tools/internal/fastwalk golang.org/x/tools/internal/gocommand golang.org/x/tools/internal/gopathwalk golang.org/x/tools/internal/imports +golang.org/x/tools/internal/lsp/fuzzy golang.org/x/tools/internal/packagesinternal golang.org/x/tools/internal/typesinternal -# golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 +# golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 golang.org/x/xerrors golang.org/x/xerrors/internal # gomodules.xyz/jsonpatch/v2 v2.1.0 gomodules.xyz/jsonpatch/v2 -# gonum.org/v1/gonum v0.0.0-20190331200053-3d26580ed485 -gonum.org/v1/gonum/blas -gonum.org/v1/gonum/blas/blas64 -gonum.org/v1/gonum/blas/cblas128 -gonum.org/v1/gonum/blas/gonum -gonum.org/v1/gonum/floats -gonum.org/v1/gonum/graph -gonum.org/v1/gonum/graph/internal/linear -gonum.org/v1/gonum/graph/internal/ordered -gonum.org/v1/gonum/graph/internal/set -gonum.org/v1/gonum/graph/internal/uid -gonum.org/v1/gonum/graph/iterator -gonum.org/v1/gonum/graph/simple -gonum.org/v1/gonum/graph/topo -gonum.org/v1/gonum/graph/traverse -gonum.org/v1/gonum/internal/asm/c128 -gonum.org/v1/gonum/internal/asm/c64 -gonum.org/v1/gonum/internal/asm/f32 -gonum.org/v1/gonum/internal/asm/f64 -gonum.org/v1/gonum/internal/cmplx64 -gonum.org/v1/gonum/internal/math32 -gonum.org/v1/gonum/lapack -gonum.org/v1/gonum/lapack/gonum -gonum.org/v1/gonum/lapack/lapack64 -gonum.org/v1/gonum/mat # google.golang.org/api v0.29.0 google.golang.org/api/googleapi google.golang.org/api/googleapi/transport @@ -724,11 +684,10 @@ gopkg.in/jcmturner/gokrb5.v7/types gopkg.in/jcmturner/rpc.v1/mstypes gopkg.in/jcmturner/rpc.v1/ndr # gopkg.in/yaml.v2 v2.3.0 -## explicit gopkg.in/yaml.v2 # gopkg.in/yaml.v3 v3.0.0-20200601152816-913338de1bd2 gopkg.in/yaml.v3 -# honnef.co/go/tools v0.0.1-2020.1.4 +# honnef.co/go/tools v0.0.1-2020.1.5 honnef.co/go/tools/arg honnef.co/go/tools/cmd/staticcheck honnef.co/go/tools/code @@ -758,7 +717,7 @@ honnef.co/go/tools/staticcheck honnef.co/go/tools/stylecheck honnef.co/go/tools/unused honnef.co/go/tools/version -# k8s.io/api v0.18.7-rc.0 => k8s.io/api v0.17.6 +# k8s.io/api v0.18.8 => k8s.io/api v0.18.8 ## explicit k8s.io/api/admission/v1 k8s.io/api/admissionregistration/v1 @@ -801,7 +760,7 @@ k8s.io/api/settings/v1alpha1 k8s.io/api/storage/v1 k8s.io/api/storage/v1alpha1 k8s.io/api/storage/v1beta1 -# k8s.io/apiextensions-apiserver v0.18.4 => k8s.io/apiextensions-apiserver v0.17.6 +# k8s.io/apiextensions-apiserver v0.18.4 => k8s.io/apiextensions-apiserver v0.18.8 k8s.io/apiextensions-apiserver/pkg/apis/apiextensions k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1 k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1 @@ -819,7 +778,7 @@ k8s.io/apiextensions-apiserver/pkg/client/informers/externalversions/apiextensio k8s.io/apiextensions-apiserver/pkg/client/informers/externalversions/internalinterfaces k8s.io/apiextensions-apiserver/pkg/client/listers/apiextensions/v1 k8s.io/apiextensions-apiserver/pkg/client/listers/apiextensions/v1beta1 -# k8s.io/apimachinery v0.18.7-rc.0 => k8s.io/apimachinery v0.17.6 +# k8s.io/apimachinery v0.18.8 => k8s.io/apimachinery v0.18.8 ## explicit k8s.io/apimachinery/pkg/api/apitesting/fuzzer k8s.io/apimachinery/pkg/api/equality @@ -869,9 +828,9 @@ k8s.io/apimachinery/pkg/version k8s.io/apimachinery/pkg/watch k8s.io/apimachinery/third_party/forked/golang/json k8s.io/apimachinery/third_party/forked/golang/reflect -# k8s.io/apiserver v0.17.6 => k8s.io/apiserver v0.17.6 +# k8s.io/apiserver v0.18.8 => k8s.io/apiserver v0.18.8 k8s.io/apiserver/pkg/storage/names -# k8s.io/client-go v11.0.1-0.20190805182717-6502b5e7b1b5+incompatible => k8s.io/client-go v0.17.6 +# k8s.io/client-go v11.0.1-0.20190805182717-6502b5e7b1b5+incompatible => k8s.io/client-go v0.18.8 ## explicit k8s.io/client-go/discovery k8s.io/client-go/discovery/fake @@ -1086,7 +1045,7 @@ k8s.io/client-go/util/jsonpath k8s.io/client-go/util/keyutil k8s.io/client-go/util/retry k8s.io/client-go/util/workqueue -# k8s.io/code-generator v0.18.6 => k8s.io/code-generator v0.17.6 +# k8s.io/code-generator v0.18.8 => k8s.io/code-generator v0.18.8 k8s.io/code-generator k8s.io/code-generator/cmd/client-gen k8s.io/code-generator/cmd/client-gen/args @@ -1148,7 +1107,7 @@ k8s.io/utils/buffer k8s.io/utils/integer k8s.io/utils/pointer k8s.io/utils/trace -# knative.dev/eventing v0.17.1-0.20200911130100-1fec6b5212c0 +# knative.dev/eventing v0.17.1-0.20200911202500-2a052dbdc2fb ## explicit knative.dev/eventing/pkg/adapter/v2 knative.dev/eventing/pkg/adapter/v2/test @@ -1274,11 +1233,11 @@ knative.dev/eventing/test/test_images/print knative.dev/eventing/test/test_images/recordevents knative.dev/eventing/test/test_images/sequencestepper knative.dev/eventing/test/test_images/transformevents -# knative.dev/networking v0.0.0-20200910005051-91f8ce8c55f7 +# knative.dev/networking v0.0.0-20200911160100-731bfc03416d knative.dev/networking/pkg knative.dev/networking/pkg/apis/networking knative.dev/networking/pkg/apis/networking/v1alpha1 -# knative.dev/pkg v0.0.0-20200910143251-0761d6b47e4d +# knative.dev/pkg v0.0.0-20200911145400-2d4efecc6bc1 ## explicit knative.dev/pkg/apis knative.dev/pkg/apis/duck @@ -1372,7 +1331,7 @@ knative.dev/pkg/webhook/resourcesemantics knative.dev/pkg/webhook/resourcesemantics/conversion knative.dev/pkg/webhook/resourcesemantics/defaulting knative.dev/pkg/webhook/resourcesemantics/validation -# knative.dev/serving v0.17.1-0.20200910185451-e82b666ecbbb +# knative.dev/serving v0.17.1-0.20200911183800-3e7b71d67f00 ## explicit knative.dev/serving/pkg/apis/autoscaling knative.dev/serving/pkg/apis/autoscaling/v1alpha1 @@ -1406,14 +1365,16 @@ knative.dev/serving/pkg/client/listers/serving/v1beta1 # knative.dev/test-infra v0.0.0-20200910231400-cfba2288403d ## explicit knative.dev/test-infra/scripts +# sigs.k8s.io/structured-merge-diff/v3 v3.0.1-0.20200706213357-43c19bbb7fba +sigs.k8s.io/structured-merge-diff/v3/value # sigs.k8s.io/yaml v1.2.0 sigs.k8s.io/yaml # github.com/Azure/go-autorest/autorest => github.com/Azure/go-autorest/autorest v0.9.6 # github.com/googleapis/gnostic => github.com/googleapis/gnostic v0.3.1 # github.com/prometheus/client_golang => github.com/prometheus/client_golang v0.9.2 -# k8s.io/api => k8s.io/api v0.17.6 -# k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.17.6 -# k8s.io/apimachinery => k8s.io/apimachinery v0.17.6 -# k8s.io/apiserver => k8s.io/apiserver v0.17.6 -# k8s.io/client-go => k8s.io/client-go v0.17.6 -# k8s.io/code-generator => k8s.io/code-generator v0.17.6 +# k8s.io/api => k8s.io/api v0.18.8 +# k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.18.8 +# k8s.io/apimachinery => k8s.io/apimachinery v0.18.8 +# k8s.io/apiserver => k8s.io/apiserver v0.18.8 +# k8s.io/client-go => k8s.io/client-go v0.18.8 +# k8s.io/code-generator => k8s.io/code-generator v0.18.8 diff --git a/third_party/VENDOR-LICENSE/github.com/apache/camel-k/pkg/apis/camel/v1/LICENSE b/vendor/sigs.k8s.io/structured-merge-diff/v3/LICENSE similarity index 99% rename from third_party/VENDOR-LICENSE/github.com/apache/camel-k/pkg/apis/camel/v1/LICENSE rename to vendor/sigs.k8s.io/structured-merge-diff/v3/LICENSE index 6b0b1270ff..8dada3edaf 100644 --- a/third_party/VENDOR-LICENSE/github.com/apache/camel-k/pkg/apis/camel/v1/LICENSE +++ b/vendor/sigs.k8s.io/structured-merge-diff/v3/LICENSE @@ -1,4 +1,3 @@ - Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ @@ -179,7 +178,7 @@ APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" + boilerplate notice, with the fields enclosed by brackets "{}" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a @@ -187,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright [yyyy] [name of copyright owner] + Copyright {yyyy} {name of copyright owner} Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -200,4 +199,3 @@ 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. - diff --git a/vendor/sigs.k8s.io/structured-merge-diff/v3/value/allocator.go b/vendor/sigs.k8s.io/structured-merge-diff/v3/value/allocator.go new file mode 100644 index 0000000000..f70cd41674 --- /dev/null +++ b/vendor/sigs.k8s.io/structured-merge-diff/v3/value/allocator.go @@ -0,0 +1,203 @@ +/* +Copyright 2020 The Kubernetes 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. +*/ + +package value + +// Allocator provides a value object allocation strategy. +// Value objects can be allocated by passing an allocator to the "Using" +// receiver functions on the value interfaces, e.g. Map.ZipUsing(allocator, ...). +// Value objects returned from "Using" functions should be given back to the allocator +// once longer needed by calling Allocator.Free(Value). +type Allocator interface { + // Free gives the allocator back any value objects returned by the "Using" + // receiver functions on the value interfaces. + // interface{} may be any of: Value, Map, List or Range. + Free(interface{}) + + // The unexported functions are for "Using" receiver functions of the value types + // to request what they need from the allocator. + allocValueUnstructured() *valueUnstructured + allocListUnstructuredRange() *listUnstructuredRange + allocValueReflect() *valueReflect + allocMapReflect() *mapReflect + allocStructReflect() *structReflect + allocListReflect() *listReflect + allocListReflectRange() *listReflectRange +} + +// HeapAllocator simply allocates objects to the heap. It is the default +// allocator used receiver functions on the value interfaces that do not accept +// an allocator and should be used whenever allocating objects that will not +// be given back to an allocator by calling Allocator.Free(Value). +var HeapAllocator = &heapAllocator{} + +type heapAllocator struct{} + +func (p *heapAllocator) allocValueUnstructured() *valueUnstructured { + return &valueUnstructured{} +} + +func (p *heapAllocator) allocListUnstructuredRange() *listUnstructuredRange { + return &listUnstructuredRange{vv: &valueUnstructured{}} +} + +func (p *heapAllocator) allocValueReflect() *valueReflect { + return &valueReflect{} +} + +func (p *heapAllocator) allocStructReflect() *structReflect { + return &structReflect{} +} + +func (p *heapAllocator) allocMapReflect() *mapReflect { + return &mapReflect{} +} + +func (p *heapAllocator) allocListReflect() *listReflect { + return &listReflect{} +} + +func (p *heapAllocator) allocListReflectRange() *listReflectRange { + return &listReflectRange{vr: &valueReflect{}} +} + +func (p *heapAllocator) Free(_ interface{}) {} + +// NewFreelistAllocator creates freelist based allocator. +// This allocator provides fast allocation and freeing of short lived value objects. +// +// The freelists are bounded in size by freelistMaxSize. If more than this amount of value objects is +// allocated at once, the excess will be returned to the heap for garbage collection when freed. +// +// This allocator is unsafe and must not be accessed concurrently by goroutines. +// +// This allocator works well for traversal of value data trees. Typical usage is to acquire +// a freelist at the beginning of the traversal and use it through out +// for all temporary value access. +func NewFreelistAllocator() Allocator { + return &freelistAllocator{ + valueUnstructured: &freelist{new: func() interface{} { + return &valueUnstructured{} + }}, + listUnstructuredRange: &freelist{new: func() interface{} { + return &listUnstructuredRange{vv: &valueUnstructured{}} + }}, + valueReflect: &freelist{new: func() interface{} { + return &valueReflect{} + }}, + mapReflect: &freelist{new: func() interface{} { + return &mapReflect{} + }}, + structReflect: &freelist{new: func() interface{} { + return &structReflect{} + }}, + listReflect: &freelist{new: func() interface{} { + return &listReflect{} + }}, + listReflectRange: &freelist{new: func() interface{} { + return &listReflectRange{vr: &valueReflect{}} + }}, + } +} + +// Bound memory usage of freelists. This prevents the processing of very large lists from leaking memory. +// This limit is large enough for endpoints objects containing 1000 IP address entries. Freed objects +// that don't fit into the freelist are orphaned on the heap to be garbage collected. +const freelistMaxSize = 1000 + +type freelistAllocator struct { + valueUnstructured *freelist + listUnstructuredRange *freelist + valueReflect *freelist + mapReflect *freelist + structReflect *freelist + listReflect *freelist + listReflectRange *freelist +} + +type freelist struct { + list []interface{} + new func() interface{} +} + +func (f *freelist) allocate() interface{} { + var w2 interface{} + if n := len(f.list); n > 0 { + w2, f.list = f.list[n-1], f.list[:n-1] + } else { + w2 = f.new() + } + return w2 +} + +func (f *freelist) free(v interface{}) { + if len(f.list) < freelistMaxSize { + f.list = append(f.list, v) + } +} + +func (w *freelistAllocator) Free(value interface{}) { + switch v := value.(type) { + case *valueUnstructured: + v.Value = nil // don't hold references to unstructured objects + w.valueUnstructured.free(v) + case *listUnstructuredRange: + v.vv.Value = nil // don't hold references to unstructured objects + w.listUnstructuredRange.free(v) + case *valueReflect: + v.ParentMapKey = nil + v.ParentMap = nil + w.valueReflect.free(v) + case *mapReflect: + w.mapReflect.free(v) + case *structReflect: + w.structReflect.free(v) + case *listReflect: + w.listReflect.free(v) + case *listReflectRange: + v.vr.ParentMapKey = nil + v.vr.ParentMap = nil + w.listReflectRange.free(v) + } +} + +func (w *freelistAllocator) allocValueUnstructured() *valueUnstructured { + return w.valueUnstructured.allocate().(*valueUnstructured) +} + +func (w *freelistAllocator) allocListUnstructuredRange() *listUnstructuredRange { + return w.listUnstructuredRange.allocate().(*listUnstructuredRange) +} + +func (w *freelistAllocator) allocValueReflect() *valueReflect { + return w.valueReflect.allocate().(*valueReflect) +} + +func (w *freelistAllocator) allocStructReflect() *structReflect { + return w.structReflect.allocate().(*structReflect) +} + +func (w *freelistAllocator) allocMapReflect() *mapReflect { + return w.mapReflect.allocate().(*mapReflect) +} + +func (w *freelistAllocator) allocListReflect() *listReflect { + return w.listReflect.allocate().(*listReflect) +} + +func (w *freelistAllocator) allocListReflectRange() *listReflectRange { + return w.listReflectRange.allocate().(*listReflectRange) +} diff --git a/camel/source/pkg/apis/sources/v1alpha1/doc.go b/vendor/sigs.k8s.io/structured-merge-diff/v3/value/doc.go similarity index 63% rename from camel/source/pkg/apis/sources/v1alpha1/doc.go rename to vendor/sigs.k8s.io/structured-merge-diff/v3/value/doc.go index d307e550e3..84d7f0f3fc 100644 --- a/camel/source/pkg/apis/sources/v1alpha1/doc.go +++ b/vendor/sigs.k8s.io/structured-merge-diff/v3/value/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2018 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,9 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Package v1alpha1 contains API Schema definitions for the sources v1alpha1 API group -// +k8s:openapi-gen=true -// +k8s:deepcopy-gen=package,register -// +k8s:defaulter-gen=TypeMeta -// +groupName=sources.knative.dev -package v1alpha1 +// Package value defines types for an in-memory representation of yaml or json +// objects, organized for convenient comparison with a schema (as defined by +// the sibling schema package). Functions for reading and writing the objects +// are also provided. +package value diff --git a/vendor/sigs.k8s.io/structured-merge-diff/v3/value/fields.go b/vendor/sigs.k8s.io/structured-merge-diff/v3/value/fields.go new file mode 100644 index 0000000000..be3c672494 --- /dev/null +++ b/vendor/sigs.k8s.io/structured-merge-diff/v3/value/fields.go @@ -0,0 +1,97 @@ +/* +Copyright 2019 The Kubernetes 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. +*/ + +package value + +import ( + "sort" + "strings" +) + +// Field is an individual key-value pair. +type Field struct { + Name string + Value Value +} + +// FieldList is a list of key-value pairs. Each field is expected to +// have a different name. +type FieldList []Field + +// Sort sorts the field list by Name. +func (f FieldList) Sort() { + if len(f) < 2 { + return + } + if len(f) == 2 { + if f[1].Name < f[0].Name { + f[0], f[1] = f[1], f[0] + } + return + } + sort.SliceStable(f, func(i, j int) bool { + return f[i].Name < f[j].Name + }) +} + +// Less compares two lists lexically. +func (f FieldList) Less(rhs FieldList) bool { + return f.Compare(rhs) == -1 +} + +// Compare compares two lists lexically. The result will be 0 if f==rhs, -1 +// if f < rhs, and +1 if f > rhs. +func (f FieldList) Compare(rhs FieldList) int { + i := 0 + for { + if i >= len(f) && i >= len(rhs) { + // Maps are the same length and all items are equal. + return 0 + } + if i >= len(f) { + // F is shorter. + return -1 + } + if i >= len(rhs) { + // RHS is shorter. + return 1 + } + if c := strings.Compare(f[i].Name, rhs[i].Name); c != 0 { + return c + } + if c := Compare(f[i].Value, rhs[i].Value); c != 0 { + return c + } + // The items are equal; continue. + i++ + } +} + +// Equals returns true if the two fieldslist are equals, false otherwise. +func (f FieldList) Equals(rhs FieldList) bool { + if len(f) != len(rhs) { + return false + } + for i := range f { + if f[i].Name != rhs[i].Name { + return false + } + if !Equals(f[i].Value, rhs[i].Value) { + return false + } + } + return true +} diff --git a/vendor/sigs.k8s.io/structured-merge-diff/v3/value/jsontagutil.go b/vendor/sigs.k8s.io/structured-merge-diff/v3/value/jsontagutil.go new file mode 100644 index 0000000000..d4adb8fc9d --- /dev/null +++ b/vendor/sigs.k8s.io/structured-merge-diff/v3/value/jsontagutil.go @@ -0,0 +1,91 @@ +/* +Copyright 2019 The Kubernetes 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. +*/ + +package value + +import ( + "fmt" + "reflect" + "strings" +) + +// TODO: This implements the same functionality as https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apimachinery/pkg/runtime/converter.go#L236 +// but is based on the highly efficient approach from https://golang.org/src/encoding/json/encode.go + +func lookupJsonTags(f reflect.StructField) (name string, omit bool, inline bool, omitempty bool) { + tag := f.Tag.Get("json") + if tag == "-" { + return "", true, false, false + } + name, opts := parseTag(tag) + if name == "" { + name = f.Name + } + return name, false, opts.Contains("inline"), opts.Contains("omitempty") +} + +func isZero(v reflect.Value) bool { + switch v.Kind() { + case reflect.Array, reflect.Map, reflect.Slice, reflect.String: + return v.Len() == 0 + case reflect.Bool: + return !v.Bool() + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: + return v.Int() == 0 + case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: + return v.Uint() == 0 + case reflect.Float32, reflect.Float64: + return v.Float() == 0 + case reflect.Interface, reflect.Ptr: + return v.IsNil() + case reflect.Chan, reflect.Func: + panic(fmt.Sprintf("unsupported type: %v", v.Type())) + } + return false +} + +type tagOptions string + +// parseTag splits a struct field's json tag into its name and +// comma-separated options. +func parseTag(tag string) (string, tagOptions) { + if idx := strings.Index(tag, ","); idx != -1 { + return tag[:idx], tagOptions(tag[idx+1:]) + } + return tag, tagOptions("") +} + +// Contains reports whether a comma-separated list of options +// contains a particular substr flag. substr must be surrounded by a +// string boundary or commas. +func (o tagOptions) Contains(optionName string) bool { + if len(o) == 0 { + return false + } + s := string(o) + for s != "" { + var next string + i := strings.Index(s, ",") + if i >= 0 { + s, next = s[:i], s[i+1:] + } + if s == optionName { + return true + } + s = next + } + return false +} diff --git a/vendor/sigs.k8s.io/structured-merge-diff/v3/value/list.go b/vendor/sigs.k8s.io/structured-merge-diff/v3/value/list.go new file mode 100644 index 0000000000..0748f18e82 --- /dev/null +++ b/vendor/sigs.k8s.io/structured-merge-diff/v3/value/list.go @@ -0,0 +1,139 @@ +/* +Copyright 2019 The Kubernetes 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. +*/ + +package value + +// List represents a list object. +type List interface { + // Length returns how many items can be found in the map. + Length() int + // At returns the item at the given position in the map. It will + // panic if the index is out of range. + At(int) Value + // AtUsing uses the provided allocator and returns the item at the given + // position in the map. It will panic if the index is out of range. + // The returned Value should be given back to the Allocator when no longer needed + // by calling Allocator.Free(Value). + AtUsing(Allocator, int) Value + // Range returns a ListRange for iterating over the items in the list. + Range() ListRange + // RangeUsing uses the provided allocator and returns a ListRange for + // iterating over the items in the list. + // The returned Range should be given back to the Allocator when no longer needed + // by calling Allocator.Free(Value). + RangeUsing(Allocator) ListRange + // Equals compares the two lists, and return true if they are the same, false otherwise. + // Implementations can use ListEquals as a general implementation for this methods. + Equals(List) bool + // EqualsUsing uses the provided allocator and compares the two lists, and return true if + // they are the same, false otherwise. Implementations can use ListEqualsUsing as a general + // implementation for this methods. + EqualsUsing(Allocator, List) bool +} + +// ListRange represents a single iteration across the items of a list. +type ListRange interface { + // Next increments to the next item in the range, if there is one, and returns true, or returns false if there are no more items. + Next() bool + // Item returns the index and value of the current item in the range. or panics if there is no current item. + // For efficiency, Item may reuse the values returned by previous Item calls. Callers should be careful avoid holding + // pointers to the value returned by Item() that escape the iteration loop since they become invalid once either + // Item() or Allocator.Free() is called. + Item() (index int, value Value) +} + +var EmptyRange = &emptyRange{} + +type emptyRange struct{} + +func (_ *emptyRange) Next() bool { + return false +} + +func (_ *emptyRange) Item() (index int, value Value) { + panic("Item called on empty ListRange") +} + +// ListEquals compares two lists lexically. +// WARN: This is a naive implementation, calling lhs.Equals(rhs) is typically the most efficient. +func ListEquals(lhs, rhs List) bool { + return ListEqualsUsing(HeapAllocator, lhs, rhs) +} + +// ListEqualsUsing uses the provided allocator and compares two lists lexically. +// WARN: This is a naive implementation, calling lhs.EqualsUsing(allocator, rhs) is typically the most efficient. +func ListEqualsUsing(a Allocator, lhs, rhs List) bool { + if lhs.Length() != rhs.Length() { + return false + } + + lhsRange := lhs.RangeUsing(a) + defer a.Free(lhsRange) + rhsRange := rhs.RangeUsing(a) + defer a.Free(rhsRange) + + for lhsRange.Next() && rhsRange.Next() { + _, lv := lhsRange.Item() + _, rv := rhsRange.Item() + if !EqualsUsing(a, lv, rv) { + return false + } + } + return true +} + +// ListLess compares two lists lexically. +func ListLess(lhs, rhs List) bool { + return ListCompare(lhs, rhs) == -1 +} + +// ListCompare compares two lists lexically. The result will be 0 if l==rhs, -1 +// if l < rhs, and +1 if l > rhs. +func ListCompare(lhs, rhs List) int { + return ListCompareUsing(HeapAllocator, lhs, rhs) +} + +// ListCompareUsing uses the provided allocator and compares two lists lexically. The result will be 0 if l==rhs, -1 +// if l < rhs, and +1 if l > rhs. +func ListCompareUsing(a Allocator, lhs, rhs List) int { + lhsRange := lhs.RangeUsing(a) + defer a.Free(lhsRange) + rhsRange := rhs.RangeUsing(a) + defer a.Free(rhsRange) + + for { + lhsOk := lhsRange.Next() + rhsOk := rhsRange.Next() + if !lhsOk && !rhsOk { + // Lists are the same length and all items are equal. + return 0 + } + if !lhsOk { + // LHS is shorter. + return -1 + } + if !rhsOk { + // RHS is shorter. + return 1 + } + _, lv := lhsRange.Item() + _, rv := rhsRange.Item() + if c := CompareUsing(a, lv, rv); c != 0 { + return c + } + // The items are equal; continue. + } +} diff --git a/vendor/sigs.k8s.io/structured-merge-diff/v3/value/listreflect.go b/vendor/sigs.k8s.io/structured-merge-diff/v3/value/listreflect.go new file mode 100644 index 0000000000..197d4c921d --- /dev/null +++ b/vendor/sigs.k8s.io/structured-merge-diff/v3/value/listreflect.go @@ -0,0 +1,98 @@ +/* +Copyright 2019 The Kubernetes 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. +*/ + +package value + +import ( + "reflect" +) + +type listReflect struct { + Value reflect.Value +} + +func (r listReflect) Length() int { + val := r.Value + return val.Len() +} + +func (r listReflect) At(i int) Value { + val := r.Value + return mustWrapValueReflect(val.Index(i), nil, nil) +} + +func (r listReflect) AtUsing(a Allocator, i int) Value { + val := r.Value + return a.allocValueReflect().mustReuse(val.Index(i), nil, nil, nil) +} + +func (r listReflect) Unstructured() interface{} { + l := r.Length() + result := make([]interface{}, l) + for i := 0; i < l; i++ { + result[i] = r.At(i).Unstructured() + } + return result +} + +func (r listReflect) Range() ListRange { + return r.RangeUsing(HeapAllocator) +} + +func (r listReflect) RangeUsing(a Allocator) ListRange { + length := r.Value.Len() + if length == 0 { + return EmptyRange + } + rr := a.allocListReflectRange() + rr.list = r.Value + rr.i = -1 + rr.entry = TypeReflectEntryOf(r.Value.Type().Elem()) + return rr +} + +func (r listReflect) Equals(other List) bool { + return r.EqualsUsing(HeapAllocator, other) +} +func (r listReflect) EqualsUsing(a Allocator, other List) bool { + if otherReflectList, ok := other.(*listReflect); ok { + return reflect.DeepEqual(r.Value.Interface(), otherReflectList.Value.Interface()) + } + return ListEqualsUsing(a, &r, other) +} + +type listReflectRange struct { + list reflect.Value + vr *valueReflect + i int + entry *TypeReflectCacheEntry +} + +func (r *listReflectRange) Next() bool { + r.i += 1 + return r.i < r.list.Len() +} + +func (r *listReflectRange) Item() (index int, value Value) { + if r.i < 0 { + panic("Item() called before first calling Next()") + } + if r.i >= r.list.Len() { + panic("Item() called on ListRange with no more items") + } + v := r.list.Index(r.i) + return r.i, r.vr.mustReuse(v, r.entry, nil, nil) +} diff --git a/vendor/sigs.k8s.io/structured-merge-diff/v3/value/listunstructured.go b/vendor/sigs.k8s.io/structured-merge-diff/v3/value/listunstructured.go new file mode 100644 index 0000000000..64cd8e7c0c --- /dev/null +++ b/vendor/sigs.k8s.io/structured-merge-diff/v3/value/listunstructured.go @@ -0,0 +1,74 @@ +/* +Copyright 2019 The Kubernetes 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. +*/ + +package value + +type listUnstructured []interface{} + +func (l listUnstructured) Length() int { + return len(l) +} + +func (l listUnstructured) At(i int) Value { + return NewValueInterface(l[i]) +} + +func (l listUnstructured) AtUsing(a Allocator, i int) Value { + return a.allocValueUnstructured().reuse(l[i]) +} + +func (l listUnstructured) Equals(other List) bool { + return l.EqualsUsing(HeapAllocator, other) +} + +func (l listUnstructured) EqualsUsing(a Allocator, other List) bool { + return ListEqualsUsing(a, &l, other) +} + +func (l listUnstructured) Range() ListRange { + return l.RangeUsing(HeapAllocator) +} + +func (l listUnstructured) RangeUsing(a Allocator) ListRange { + if len(l) == 0 { + return EmptyRange + } + r := a.allocListUnstructuredRange() + r.list = l + r.i = -1 + return r +} + +type listUnstructuredRange struct { + list listUnstructured + vv *valueUnstructured + i int +} + +func (r *listUnstructuredRange) Next() bool { + r.i += 1 + return r.i < len(r.list) +} + +func (r *listUnstructuredRange) Item() (index int, value Value) { + if r.i < 0 { + panic("Item() called before first calling Next()") + } + if r.i >= len(r.list) { + panic("Item() called on ListRange with no more items") + } + return r.i, r.vv.reuse(r.list[r.i]) +} diff --git a/vendor/sigs.k8s.io/structured-merge-diff/v3/value/map.go b/vendor/sigs.k8s.io/structured-merge-diff/v3/value/map.go new file mode 100644 index 0000000000..168b9fa082 --- /dev/null +++ b/vendor/sigs.k8s.io/structured-merge-diff/v3/value/map.go @@ -0,0 +1,270 @@ +/* +Copyright 2019 The Kubernetes 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. +*/ + +package value + +import ( + "sort" +) + +// Map represents a Map or go structure. +type Map interface { + // Set changes or set the value of the given key. + Set(key string, val Value) + // Get returns the value for the given key, if present, or (nil, false) otherwise. + Get(key string) (Value, bool) + // GetUsing uses the provided allocator and returns the value for the given key, + // if present, or (nil, false) otherwise. + // The returned Value should be given back to the Allocator when no longer needed + // by calling Allocator.Free(Value). + GetUsing(a Allocator, key string) (Value, bool) + // Has returns true if the key is present, or false otherwise. + Has(key string) bool + // Delete removes the key from the map. + Delete(key string) + // Equals compares the two maps, and return true if they are the same, false otherwise. + // Implementations can use MapEquals as a general implementation for this methods. + Equals(other Map) bool + // EqualsUsing uses the provided allocator and compares the two maps, and return true if + // they are the same, false otherwise. Implementations can use MapEqualsUsing as a general + // implementation for this methods. + EqualsUsing(a Allocator, other Map) bool + // Iterate runs the given function for each key/value in the + // map. Returning false in the closure prematurely stops the + // iteration. + Iterate(func(key string, value Value) bool) bool + // IterateUsing uses the provided allocator and runs the given function for each key/value + // in the map. Returning false in the closure prematurely stops the iteration. + IterateUsing(Allocator, func(key string, value Value) bool) bool + // Length returns the number of items in the map. + Length() int + // Empty returns true if the map is empty. + Empty() bool + // Zip iterates over the entries of two maps together. If both maps contain a value for a given key, fn is called + // with the values from both maps, otherwise it is called with the value of the map that contains the key and nil + // for the map that does not contain the key. Returning false in the closure prematurely stops the iteration. + Zip(other Map, order MapTraverseOrder, fn func(key string, lhs, rhs Value) bool) bool + // ZipUsing uses the provided allocator and iterates over the entries of two maps together. If both maps + // contain a value for a given key, fn is called with the values from both maps, otherwise it is called with + // the value of the map that contains the key and nil for the map that does not contain the key. Returning + // false in the closure prematurely stops the iteration. + ZipUsing(a Allocator, other Map, order MapTraverseOrder, fn func(key string, lhs, rhs Value) bool) bool +} + +// MapTraverseOrder defines the map traversal ordering available. +type MapTraverseOrder int + +const ( + // Unordered indicates that the map traversal has no ordering requirement. + Unordered = iota + // LexicalKeyOrder indicates that the map traversal is ordered by key, lexically. + LexicalKeyOrder +) + +// MapZip iterates over the entries of two maps together. If both maps contain a value for a given key, fn is called +// with the values from both maps, otherwise it is called with the value of the map that contains the key and nil +// for the other map. Returning false in the closure prematurely stops the iteration. +func MapZip(lhs, rhs Map, order MapTraverseOrder, fn func(key string, lhs, rhs Value) bool) bool { + return MapZipUsing(HeapAllocator, lhs, rhs, order, fn) +} + +// MapZipUsing uses the provided allocator and iterates over the entries of two maps together. If both maps +// contain a value for a given key, fn is called with the values from both maps, otherwise it is called with +// the value of the map that contains the key and nil for the other map. Returning false in the closure +// prematurely stops the iteration. +func MapZipUsing(a Allocator, lhs, rhs Map, order MapTraverseOrder, fn func(key string, lhs, rhs Value) bool) bool { + if lhs != nil { + return lhs.ZipUsing(a, rhs, order, fn) + } + if rhs != nil { + return rhs.ZipUsing(a, lhs, order, func(key string, rhs, lhs Value) bool { // arg positions of lhs and rhs deliberately swapped + return fn(key, lhs, rhs) + }) + } + return true +} + +// defaultMapZip provides a default implementation of Zip for implementations that do not need to provide +// their own optimized implementation. +func defaultMapZip(a Allocator, lhs, rhs Map, order MapTraverseOrder, fn func(key string, lhs, rhs Value) bool) bool { + switch order { + case Unordered: + return unorderedMapZip(a, lhs, rhs, fn) + case LexicalKeyOrder: + return lexicalKeyOrderedMapZip(a, lhs, rhs, fn) + default: + panic("Unsupported map order") + } +} + +func unorderedMapZip(a Allocator, lhs, rhs Map, fn func(key string, lhs, rhs Value) bool) bool { + if (lhs == nil || lhs.Empty()) && (rhs == nil || rhs.Empty()) { + return true + } + + if lhs != nil { + ok := lhs.IterateUsing(a, func(key string, lhsValue Value) bool { + var rhsValue Value + if rhs != nil { + if item, ok := rhs.GetUsing(a, key); ok { + rhsValue = item + defer a.Free(rhsValue) + } + } + return fn(key, lhsValue, rhsValue) + }) + if !ok { + return false + } + } + if rhs != nil { + return rhs.IterateUsing(a, func(key string, rhsValue Value) bool { + if lhs == nil || !lhs.Has(key) { + return fn(key, nil, rhsValue) + } + return true + }) + } + return true +} + +func lexicalKeyOrderedMapZip(a Allocator, lhs, rhs Map, fn func(key string, lhs, rhs Value) bool) bool { + var lhsLength, rhsLength int + var orderedLength int // rough estimate of length of union of map keys + if lhs != nil { + lhsLength = lhs.Length() + orderedLength = lhsLength + } + if rhs != nil { + rhsLength = rhs.Length() + if rhsLength > orderedLength { + orderedLength = rhsLength + } + } + if lhsLength == 0 && rhsLength == 0 { + return true + } + + ordered := make([]string, 0, orderedLength) + if lhs != nil { + lhs.IterateUsing(a, func(key string, _ Value) bool { + ordered = append(ordered, key) + return true + }) + } + if rhs != nil { + rhs.IterateUsing(a, func(key string, _ Value) bool { + if lhs == nil || !lhs.Has(key) { + ordered = append(ordered, key) + } + return true + }) + } + sort.Strings(ordered) + for _, key := range ordered { + var litem, ritem Value + if lhs != nil { + litem, _ = lhs.GetUsing(a, key) + } + if rhs != nil { + ritem, _ = rhs.GetUsing(a, key) + } + ok := fn(key, litem, ritem) + if litem != nil { + a.Free(litem) + } + if ritem != nil { + a.Free(ritem) + } + if !ok { + return false + } + } + return true +} + +// MapLess compares two maps lexically. +func MapLess(lhs, rhs Map) bool { + return MapCompare(lhs, rhs) == -1 +} + +// MapCompare compares two maps lexically. +func MapCompare(lhs, rhs Map) int { + return MapCompareUsing(HeapAllocator, lhs, rhs) +} + +// MapCompareUsing uses the provided allocator and compares two maps lexically. +func MapCompareUsing(a Allocator, lhs, rhs Map) int { + c := 0 + var llength, rlength int + if lhs != nil { + llength = lhs.Length() + } + if rhs != nil { + rlength = rhs.Length() + } + if llength == 0 && rlength == 0 { + return 0 + } + i := 0 + MapZipUsing(a, lhs, rhs, LexicalKeyOrder, func(key string, lhs, rhs Value) bool { + switch { + case i == llength: + c = -1 + case i == rlength: + c = 1 + case lhs == nil: + c = 1 + case rhs == nil: + c = -1 + default: + c = CompareUsing(a, lhs, rhs) + } + i++ + return c == 0 + }) + return c +} + +// MapEquals returns true if lhs == rhs, false otherwise. This function +// acts on generic types and should not be used by callers, but can help +// implement Map.Equals. +// WARN: This is a naive implementation, calling lhs.Equals(rhs) is typically the most efficient. +func MapEquals(lhs, rhs Map) bool { + return MapEqualsUsing(HeapAllocator, lhs, rhs) +} + +// MapEqualsUsing uses the provided allocator and returns true if lhs == rhs, +// false otherwise. This function acts on generic types and should not be used +// by callers, but can help implement Map.Equals. +// WARN: This is a naive implementation, calling lhs.EqualsUsing(allocator, rhs) is typically the most efficient. +func MapEqualsUsing(a Allocator, lhs, rhs Map) bool { + if lhs == nil && rhs == nil { + return true + } + if lhs == nil || rhs == nil { + return false + } + if lhs.Length() != rhs.Length() { + return false + } + return MapZipUsing(a, lhs, rhs, Unordered, func(key string, lhs, rhs Value) bool { + if lhs == nil || rhs == nil { + return false + } + return EqualsUsing(a, lhs, rhs) + }) +} diff --git a/vendor/sigs.k8s.io/structured-merge-diff/v3/value/mapreflect.go b/vendor/sigs.k8s.io/structured-merge-diff/v3/value/mapreflect.go new file mode 100644 index 0000000000..dc8b8c7200 --- /dev/null +++ b/vendor/sigs.k8s.io/structured-merge-diff/v3/value/mapreflect.go @@ -0,0 +1,209 @@ +/* +Copyright 2019 The Kubernetes 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. +*/ + +package value + +import ( + "reflect" +) + +type mapReflect struct { + valueReflect +} + +func (r mapReflect) Length() int { + val := r.Value + return val.Len() +} + +func (r mapReflect) Empty() bool { + val := r.Value + return val.Len() == 0 +} + +func (r mapReflect) Get(key string) (Value, bool) { + return r.GetUsing(HeapAllocator, key) +} + +func (r mapReflect) GetUsing(a Allocator, key string) (Value, bool) { + k, v, ok := r.get(key) + if !ok { + return nil, false + } + return a.allocValueReflect().mustReuse(v, nil, &r.Value, &k), true +} + +func (r mapReflect) get(k string) (key, value reflect.Value, ok bool) { + mapKey := r.toMapKey(k) + val := r.Value.MapIndex(mapKey) + return mapKey, val, val.IsValid() && val != reflect.Value{} +} + +func (r mapReflect) Has(key string) bool { + var val reflect.Value + val = r.Value.MapIndex(r.toMapKey(key)) + if !val.IsValid() { + return false + } + return val != reflect.Value{} +} + +func (r mapReflect) Set(key string, val Value) { + r.Value.SetMapIndex(r.toMapKey(key), reflect.ValueOf(val.Unstructured())) +} + +func (r mapReflect) Delete(key string) { + val := r.Value + val.SetMapIndex(r.toMapKey(key), reflect.Value{}) +} + +// TODO: Do we need to support types that implement json.Marshaler and are used as string keys? +func (r mapReflect) toMapKey(key string) reflect.Value { + val := r.Value + return reflect.ValueOf(key).Convert(val.Type().Key()) +} + +func (r mapReflect) Iterate(fn func(string, Value) bool) bool { + return r.IterateUsing(HeapAllocator, fn) +} + +func (r mapReflect) IterateUsing(a Allocator, fn func(string, Value) bool) bool { + if r.Value.Len() == 0 { + return true + } + v := a.allocValueReflect() + defer a.Free(v) + return eachMapEntry(r.Value, func(e *TypeReflectCacheEntry, key reflect.Value, value reflect.Value) bool { + return fn(key.String(), v.mustReuse(value, e, &r.Value, &key)) + }) +} + +func eachMapEntry(val reflect.Value, fn func(*TypeReflectCacheEntry, reflect.Value, reflect.Value) bool) bool { + iter := val.MapRange() + entry := TypeReflectEntryOf(val.Type().Elem()) + for iter.Next() { + next := iter.Value() + if !next.IsValid() { + continue + } + if !fn(entry, iter.Key(), next) { + return false + } + } + return true +} + +func (r mapReflect) Unstructured() interface{} { + result := make(map[string]interface{}, r.Length()) + r.Iterate(func(s string, value Value) bool { + result[s] = value.Unstructured() + return true + }) + return result +} + +func (r mapReflect) Equals(m Map) bool { + return r.EqualsUsing(HeapAllocator, m) +} + +func (r mapReflect) EqualsUsing(a Allocator, m Map) bool { + lhsLength := r.Length() + rhsLength := m.Length() + if lhsLength != rhsLength { + return false + } + if lhsLength == 0 { + return true + } + vr := a.allocValueReflect() + defer a.Free(vr) + entry := TypeReflectEntryOf(r.Value.Type().Elem()) + return m.Iterate(func(key string, value Value) bool { + _, lhsVal, ok := r.get(key) + if !ok { + return false + } + return Equals(vr.mustReuse(lhsVal, entry, nil, nil), value) + }) +} + +func (r mapReflect) Zip(other Map, order MapTraverseOrder, fn func(key string, lhs, rhs Value) bool) bool { + return r.ZipUsing(HeapAllocator, other, order, fn) +} + +func (r mapReflect) ZipUsing(a Allocator, other Map, order MapTraverseOrder, fn func(key string, lhs, rhs Value) bool) bool { + if otherMapReflect, ok := other.(*mapReflect); ok && order == Unordered { + return r.unorderedReflectZip(a, otherMapReflect, fn) + } + return defaultMapZip(a, &r, other, order, fn) +} + +// unorderedReflectZip provides an optimized unordered zip for mapReflect types. +func (r mapReflect) unorderedReflectZip(a Allocator, other *mapReflect, fn func(key string, lhs, rhs Value) bool) bool { + if r.Empty() && (other == nil || other.Empty()) { + return true + } + + lhs := r.Value + lhsEntry := TypeReflectEntryOf(lhs.Type().Elem()) + + // map lookup via reflection is expensive enough that it is better to keep track of visited keys + visited := map[string]struct{}{} + + vlhs, vrhs := a.allocValueReflect(), a.allocValueReflect() + defer a.Free(vlhs) + defer a.Free(vrhs) + + if other != nil { + rhs := other.Value + rhsEntry := TypeReflectEntryOf(rhs.Type().Elem()) + iter := rhs.MapRange() + + for iter.Next() { + key := iter.Key() + keyString := key.String() + next := iter.Value() + if !next.IsValid() { + continue + } + rhsVal := vrhs.mustReuse(next, rhsEntry, &rhs, &key) + visited[keyString] = struct{}{} + var lhsVal Value + if _, v, ok := r.get(keyString); ok { + lhsVal = vlhs.mustReuse(v, lhsEntry, &lhs, &key) + } + if !fn(keyString, lhsVal, rhsVal) { + return false + } + } + } + + iter := lhs.MapRange() + for iter.Next() { + key := iter.Key() + if _, ok := visited[key.String()]; ok { + continue + } + next := iter.Value() + if !next.IsValid() { + continue + } + if !fn(key.String(), vlhs.mustReuse(next, lhsEntry, &lhs, &key), nil) { + return false + } + } + return true +} diff --git a/vendor/sigs.k8s.io/structured-merge-diff/v3/value/mapunstructured.go b/vendor/sigs.k8s.io/structured-merge-diff/v3/value/mapunstructured.go new file mode 100644 index 0000000000..d8e208628d --- /dev/null +++ b/vendor/sigs.k8s.io/structured-merge-diff/v3/value/mapunstructured.go @@ -0,0 +1,190 @@ +/* +Copyright 2019 The Kubernetes 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. +*/ + +package value + +type mapUnstructuredInterface map[interface{}]interface{} + +func (m mapUnstructuredInterface) Set(key string, val Value) { + m[key] = val.Unstructured() +} + +func (m mapUnstructuredInterface) Get(key string) (Value, bool) { + return m.GetUsing(HeapAllocator, key) +} + +func (m mapUnstructuredInterface) GetUsing(a Allocator, key string) (Value, bool) { + if v, ok := m[key]; !ok { + return nil, false + } else { + return a.allocValueUnstructured().reuse(v), true + } +} + +func (m mapUnstructuredInterface) Has(key string) bool { + _, ok := m[key] + return ok +} + +func (m mapUnstructuredInterface) Delete(key string) { + delete(m, key) +} + +func (m mapUnstructuredInterface) Iterate(fn func(key string, value Value) bool) bool { + return m.IterateUsing(HeapAllocator, fn) +} + +func (m mapUnstructuredInterface) IterateUsing(a Allocator, fn func(key string, value Value) bool) bool { + if len(m) == 0 { + return true + } + vv := a.allocValueUnstructured() + defer a.Free(vv) + for k, v := range m { + if ks, ok := k.(string); !ok { + continue + } else { + if !fn(ks, vv.reuse(v)) { + return false + } + } + } + return true +} + +func (m mapUnstructuredInterface) Length() int { + return len(m) +} + +func (m mapUnstructuredInterface) Empty() bool { + return len(m) == 0 +} + +func (m mapUnstructuredInterface) Equals(other Map) bool { + return m.EqualsUsing(HeapAllocator, other) +} + +func (m mapUnstructuredInterface) EqualsUsing(a Allocator, other Map) bool { + lhsLength := m.Length() + rhsLength := other.Length() + if lhsLength != rhsLength { + return false + } + if lhsLength == 0 { + return true + } + vv := a.allocValueUnstructured() + defer a.Free(vv) + return other.Iterate(func(key string, value Value) bool { + lhsVal, ok := m[key] + if !ok { + return false + } + return Equals(vv.reuse(lhsVal), value) + }) +} + +func (m mapUnstructuredInterface) Zip(other Map, order MapTraverseOrder, fn func(key string, lhs, rhs Value) bool) bool { + return m.ZipUsing(HeapAllocator, other, order, fn) +} + +func (m mapUnstructuredInterface) ZipUsing(a Allocator, other Map, order MapTraverseOrder, fn func(key string, lhs, rhs Value) bool) bool { + return defaultMapZip(a, m, other, order, fn) +} + +type mapUnstructuredString map[string]interface{} + +func (m mapUnstructuredString) Set(key string, val Value) { + m[key] = val.Unstructured() +} + +func (m mapUnstructuredString) Get(key string) (Value, bool) { + return m.GetUsing(HeapAllocator, key) +} +func (m mapUnstructuredString) GetUsing(a Allocator, key string) (Value, bool) { + if v, ok := m[key]; !ok { + return nil, false + } else { + return a.allocValueUnstructured().reuse(v), true + } +} + +func (m mapUnstructuredString) Has(key string) bool { + _, ok := m[key] + return ok +} + +func (m mapUnstructuredString) Delete(key string) { + delete(m, key) +} + +func (m mapUnstructuredString) Iterate(fn func(key string, value Value) bool) bool { + return m.IterateUsing(HeapAllocator, fn) +} + +func (m mapUnstructuredString) IterateUsing(a Allocator, fn func(key string, value Value) bool) bool { + if len(m) == 0 { + return true + } + vv := a.allocValueUnstructured() + defer a.Free(vv) + for k, v := range m { + if !fn(k, vv.reuse(v)) { + return false + } + } + return true +} + +func (m mapUnstructuredString) Length() int { + return len(m) +} + +func (m mapUnstructuredString) Equals(other Map) bool { + return m.EqualsUsing(HeapAllocator, other) +} + +func (m mapUnstructuredString) EqualsUsing(a Allocator, other Map) bool { + lhsLength := m.Length() + rhsLength := other.Length() + if lhsLength != rhsLength { + return false + } + if lhsLength == 0 { + return true + } + vv := a.allocValueUnstructured() + defer a.Free(vv) + return other.Iterate(func(key string, value Value) bool { + lhsVal, ok := m[key] + if !ok { + return false + } + return Equals(vv.reuse(lhsVal), value) + }) +} + +func (m mapUnstructuredString) Zip(other Map, order MapTraverseOrder, fn func(key string, lhs, rhs Value) bool) bool { + return m.ZipUsing(HeapAllocator, other, order, fn) +} + +func (m mapUnstructuredString) ZipUsing(a Allocator, other Map, order MapTraverseOrder, fn func(key string, lhs, rhs Value) bool) bool { + return defaultMapZip(a, m, other, order, fn) +} + +func (m mapUnstructuredString) Empty() bool { + return len(m) == 0 +} diff --git a/vendor/sigs.k8s.io/structured-merge-diff/v3/value/reflectcache.go b/vendor/sigs.k8s.io/structured-merge-diff/v3/value/reflectcache.go new file mode 100644 index 0000000000..49e6dd1690 --- /dev/null +++ b/vendor/sigs.k8s.io/structured-merge-diff/v3/value/reflectcache.go @@ -0,0 +1,463 @@ +/* +Copyright 2020 The Kubernetes 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. +*/ + +package value + +import ( + "bytes" + "encoding/json" + "fmt" + "reflect" + "sort" + "sync" + "sync/atomic" +) + +// UnstructuredConverter defines how a type can be converted directly to unstructured. +// Types that implement json.Marshaler may also optionally implement this interface to provide a more +// direct and more efficient conversion. All types that choose to implement this interface must still +// implement this same conversion via json.Marshaler. +type UnstructuredConverter interface { + json.Marshaler // require that json.Marshaler is implemented + + // ToUnstructured returns the unstructured representation. + ToUnstructured() interface{} +} + +// TypeReflectCacheEntry keeps data gathered using reflection about how a type is converted to/from unstructured. +type TypeReflectCacheEntry struct { + isJsonMarshaler bool + ptrIsJsonMarshaler bool + isJsonUnmarshaler bool + ptrIsJsonUnmarshaler bool + isStringConvertable bool + ptrIsStringConvertable bool + + structFields map[string]*FieldCacheEntry + orderedStructFields []*FieldCacheEntry +} + +// FieldCacheEntry keeps data gathered using reflection about how the field of a struct is converted to/from +// unstructured. +type FieldCacheEntry struct { + // JsonName returns the name of the field according to the json tags on the struct field. + JsonName string + // isOmitEmpty is true if the field has the json 'omitempty' tag. + isOmitEmpty bool + // fieldPath is a list of field indices (see FieldByIndex) to lookup the value of + // a field in a reflect.Value struct. The field indices in the list form a path used + // to traverse through intermediary 'inline' fields. + fieldPath [][]int + + fieldType reflect.Type + TypeEntry *TypeReflectCacheEntry +} + +func (f *FieldCacheEntry) CanOmit(fieldVal reflect.Value) bool { + return f.isOmitEmpty && (safeIsNil(fieldVal) || isZero(fieldVal)) +} + +// GetUsing returns the field identified by this FieldCacheEntry from the provided struct. +func (f *FieldCacheEntry) GetFrom(structVal reflect.Value) reflect.Value { + // field might be nested within 'inline' structs + for _, elem := range f.fieldPath { + structVal = structVal.FieldByIndex(elem) + } + return structVal +} + +var marshalerType = reflect.TypeOf(new(json.Marshaler)).Elem() +var unmarshalerType = reflect.TypeOf(new(json.Unmarshaler)).Elem() +var unstructuredConvertableType = reflect.TypeOf(new(UnstructuredConverter)).Elem() +var defaultReflectCache = newReflectCache() + +// TypeReflectEntryOf returns the TypeReflectCacheEntry of the provided reflect.Type. +func TypeReflectEntryOf(t reflect.Type) *TypeReflectCacheEntry { + cm := defaultReflectCache.get() + if record, ok := cm[t]; ok { + return record + } + updates := reflectCacheMap{} + result := typeReflectEntryOf(cm, t, updates) + if len(updates) > 0 { + defaultReflectCache.update(updates) + } + return result +} + +// TypeReflectEntryOf returns all updates needed to add provided reflect.Type, and the types its fields transitively +// depend on, to the cache. +func typeReflectEntryOf(cm reflectCacheMap, t reflect.Type, updates reflectCacheMap) *TypeReflectCacheEntry { + if record, ok := cm[t]; ok { + return record + } + if record, ok := updates[t]; ok { + return record + } + typeEntry := &TypeReflectCacheEntry{ + isJsonMarshaler: t.Implements(marshalerType), + ptrIsJsonMarshaler: reflect.PtrTo(t).Implements(marshalerType), + isJsonUnmarshaler: reflect.PtrTo(t).Implements(unmarshalerType), + isStringConvertable: t.Implements(unstructuredConvertableType), + ptrIsStringConvertable: reflect.PtrTo(t).Implements(unstructuredConvertableType), + } + if t.Kind() == reflect.Struct { + fieldEntries := map[string]*FieldCacheEntry{} + buildStructCacheEntry(t, fieldEntries, nil) + typeEntry.structFields = fieldEntries + sortedByJsonName := make([]*FieldCacheEntry, len(fieldEntries)) + i := 0 + for _, entry := range fieldEntries { + sortedByJsonName[i] = entry + i++ + } + sort.Slice(sortedByJsonName, func(i, j int) bool { + return sortedByJsonName[i].JsonName < sortedByJsonName[j].JsonName + }) + typeEntry.orderedStructFields = sortedByJsonName + } + + // cyclic type references are allowed, so we must add the typeEntry to the updates map before resolving + // the field.typeEntry references, or creating them if they are not already in the cache + updates[t] = typeEntry + + for _, field := range typeEntry.structFields { + if field.TypeEntry == nil { + field.TypeEntry = typeReflectEntryOf(cm, field.fieldType, updates) + } + } + return typeEntry +} + +func buildStructCacheEntry(t reflect.Type, infos map[string]*FieldCacheEntry, fieldPath [][]int) { + for i := 0; i < t.NumField(); i++ { + field := t.Field(i) + jsonName, omit, isInline, isOmitempty := lookupJsonTags(field) + if omit { + continue + } + if isInline { + buildStructCacheEntry(field.Type, infos, append(fieldPath, field.Index)) + continue + } + info := &FieldCacheEntry{JsonName: jsonName, isOmitEmpty: isOmitempty, fieldPath: append(fieldPath, field.Index), fieldType: field.Type} + infos[jsonName] = info + } +} + +// Fields returns a map of JSON field name to FieldCacheEntry for structs, or nil for non-structs. +func (e TypeReflectCacheEntry) Fields() map[string]*FieldCacheEntry { + return e.structFields +} + +// Fields returns a map of JSON field name to FieldCacheEntry for structs, or nil for non-structs. +func (e TypeReflectCacheEntry) OrderedFields() []*FieldCacheEntry { + return e.orderedStructFields +} + +// CanConvertToUnstructured returns true if this TypeReflectCacheEntry can convert values of its type to unstructured. +func (e TypeReflectCacheEntry) CanConvertToUnstructured() bool { + return e.isJsonMarshaler || e.ptrIsJsonMarshaler || e.isStringConvertable || e.ptrIsStringConvertable +} + +// ToUnstructured converts the provided value to unstructured and returns it. +func (e TypeReflectCacheEntry) ToUnstructured(sv reflect.Value) (interface{}, error) { + // This is based on https://github.com/kubernetes/kubernetes/blob/82c9e5c814eb7acc6cc0a090c057294d0667ad66/staging/src/k8s.io/apimachinery/pkg/runtime/converter.go#L505 + // and is intended to replace it. + + // Check if the object has a custom string converter and use it if available, since it is much more efficient + // than round tripping through json. + if converter, ok := e.getUnstructuredConverter(sv); ok { + return converter.ToUnstructured(), nil + } + // Check if the object has a custom JSON marshaller/unmarshaller. + if marshaler, ok := e.getJsonMarshaler(sv); ok { + if sv.Kind() == reflect.Ptr && sv.IsNil() { + // We're done - we don't need to store anything. + return nil, nil + } + + data, err := marshaler.MarshalJSON() + if err != nil { + return nil, err + } + switch { + case len(data) == 0: + return nil, fmt.Errorf("error decoding from json: empty value") + + case bytes.Equal(data, nullBytes): + // We're done - we don't need to store anything. + return nil, nil + + case bytes.Equal(data, trueBytes): + return true, nil + + case bytes.Equal(data, falseBytes): + return false, nil + + case data[0] == '"': + var result string + err := unmarshal(data, &result) + if err != nil { + return nil, fmt.Errorf("error decoding string from json: %v", err) + } + return result, nil + + case data[0] == '{': + result := make(map[string]interface{}) + err := unmarshal(data, &result) + if err != nil { + return nil, fmt.Errorf("error decoding object from json: %v", err) + } + return result, nil + + case data[0] == '[': + result := make([]interface{}, 0) + err := unmarshal(data, &result) + if err != nil { + return nil, fmt.Errorf("error decoding array from json: %v", err) + } + return result, nil + + default: + var ( + resultInt int64 + resultFloat float64 + err error + ) + if err = unmarshal(data, &resultInt); err == nil { + return resultInt, nil + } else if err = unmarshal(data, &resultFloat); err == nil { + return resultFloat, nil + } else { + return nil, fmt.Errorf("error decoding number from json: %v", err) + } + } + } + + return nil, fmt.Errorf("provided type cannot be converted: %v", sv.Type()) +} + +// CanConvertFromUnstructured returns true if this TypeReflectCacheEntry can convert objects of the type from unstructured. +func (e TypeReflectCacheEntry) CanConvertFromUnstructured() bool { + return e.isJsonUnmarshaler +} + +// FromUnstructured converts the provided source value from unstructured into the provided destination value. +func (e TypeReflectCacheEntry) FromUnstructured(sv, dv reflect.Value) error { + // TODO: this could be made much more efficient using direct conversions like + // UnstructuredConverter.ToUnstructured provides. + st := dv.Type() + data, err := json.Marshal(sv.Interface()) + if err != nil { + return fmt.Errorf("error encoding %s to json: %v", st.String(), err) + } + if unmarshaler, ok := e.getJsonUnmarshaler(dv); ok { + return unmarshaler.UnmarshalJSON(data) + } + return fmt.Errorf("unable to unmarshal %v into %v", sv.Type(), dv.Type()) +} + +var ( + nullBytes = []byte("null") + trueBytes = []byte("true") + falseBytes = []byte("false") +) + +func (e TypeReflectCacheEntry) getJsonMarshaler(v reflect.Value) (json.Marshaler, bool) { + if e.isJsonMarshaler { + return v.Interface().(json.Marshaler), true + } + if e.ptrIsJsonMarshaler { + // Check pointer receivers if v is not a pointer + if v.Kind() != reflect.Ptr && v.CanAddr() { + v = v.Addr() + return v.Interface().(json.Marshaler), true + } + } + return nil, false +} + +func (e TypeReflectCacheEntry) getJsonUnmarshaler(v reflect.Value) (json.Unmarshaler, bool) { + if !e.isJsonUnmarshaler { + return nil, false + } + return v.Addr().Interface().(json.Unmarshaler), true +} + +func (e TypeReflectCacheEntry) getUnstructuredConverter(v reflect.Value) (UnstructuredConverter, bool) { + if e.isStringConvertable { + return v.Interface().(UnstructuredConverter), true + } + if e.ptrIsStringConvertable { + // Check pointer receivers if v is not a pointer + if v.CanAddr() { + v = v.Addr() + return v.Interface().(UnstructuredConverter), true + } + } + return nil, false +} + +type typeReflectCache struct { + // use an atomic and copy-on-write since there are a fixed (typically very small) number of structs compiled into any + // go program using this cache + value atomic.Value + // mu is held by writers when performing load/modify/store operations on the cache, readers do not need to hold a + // read-lock since the atomic value is always read-only + mu sync.Mutex +} + +func newReflectCache() *typeReflectCache { + cache := &typeReflectCache{} + cache.value.Store(make(reflectCacheMap)) + return cache +} + +type reflectCacheMap map[reflect.Type]*TypeReflectCacheEntry + +// get returns the reflectCacheMap. +func (c *typeReflectCache) get() reflectCacheMap { + return c.value.Load().(reflectCacheMap) +} + +// update merges the provided updates into the cache. +func (c *typeReflectCache) update(updates reflectCacheMap) { + c.mu.Lock() + defer c.mu.Unlock() + + currentCacheMap := c.value.Load().(reflectCacheMap) + + hasNewEntries := false + for t := range updates { + if _, ok := currentCacheMap[t]; !ok { + hasNewEntries = true + break + } + } + if !hasNewEntries { + // Bail if the updates have been set while waiting for lock acquisition. + // This is safe since setting entries is idempotent. + return + } + + newCacheMap := make(reflectCacheMap, len(currentCacheMap)+len(updates)) + for k, v := range currentCacheMap { + newCacheMap[k] = v + } + for t, update := range updates { + newCacheMap[t] = update + } + c.value.Store(newCacheMap) +} + +// Below json Unmarshal is fromk8s.io/apimachinery/pkg/util/json +// to handle number conversions as expected by Kubernetes + +// limit recursive depth to prevent stack overflow errors +const maxDepth = 10000 + +// unmarshal unmarshals the given data +// If v is a *map[string]interface{}, numbers are converted to int64 or float64 +func unmarshal(data []byte, v interface{}) error { + switch v := v.(type) { + case *map[string]interface{}: + // Build a decoder from the given data + decoder := json.NewDecoder(bytes.NewBuffer(data)) + // Preserve numbers, rather than casting to float64 automatically + decoder.UseNumber() + // Run the decode + if err := decoder.Decode(v); err != nil { + return err + } + // If the decode succeeds, post-process the map to convert json.Number objects to int64 or float64 + return convertMapNumbers(*v, 0) + + case *[]interface{}: + // Build a decoder from the given data + decoder := json.NewDecoder(bytes.NewBuffer(data)) + // Preserve numbers, rather than casting to float64 automatically + decoder.UseNumber() + // Run the decode + if err := decoder.Decode(v); err != nil { + return err + } + // If the decode succeeds, post-process the map to convert json.Number objects to int64 or float64 + return convertSliceNumbers(*v, 0) + + default: + return json.Unmarshal(data, v) + } +} + +// convertMapNumbers traverses the map, converting any json.Number values to int64 or float64. +// values which are map[string]interface{} or []interface{} are recursively visited +func convertMapNumbers(m map[string]interface{}, depth int) error { + if depth > maxDepth { + return fmt.Errorf("exceeded max depth of %d", maxDepth) + } + + var err error + for k, v := range m { + switch v := v.(type) { + case json.Number: + m[k], err = convertNumber(v) + case map[string]interface{}: + err = convertMapNumbers(v, depth+1) + case []interface{}: + err = convertSliceNumbers(v, depth+1) + } + if err != nil { + return err + } + } + return nil +} + +// convertSliceNumbers traverses the slice, converting any json.Number values to int64 or float64. +// values which are map[string]interface{} or []interface{} are recursively visited +func convertSliceNumbers(s []interface{}, depth int) error { + if depth > maxDepth { + return fmt.Errorf("exceeded max depth of %d", maxDepth) + } + + var err error + for i, v := range s { + switch v := v.(type) { + case json.Number: + s[i], err = convertNumber(v) + case map[string]interface{}: + err = convertMapNumbers(v, depth+1) + case []interface{}: + err = convertSliceNumbers(v, depth+1) + } + if err != nil { + return err + } + } + return nil +} + +// convertNumber converts a json.Number to an int64 or float64, or returns an error +func convertNumber(n json.Number) (interface{}, error) { + // Attempt to convert to an int64 first + if i, err := n.Int64(); err == nil { + return i, nil + } + // Return a float64 (default json.Decode() behavior) + // An overflow will return an error + return n.Float64() +} diff --git a/vendor/sigs.k8s.io/structured-merge-diff/v3/value/scalar.go b/vendor/sigs.k8s.io/structured-merge-diff/v3/value/scalar.go new file mode 100644 index 0000000000..c78a4c18d1 --- /dev/null +++ b/vendor/sigs.k8s.io/structured-merge-diff/v3/value/scalar.go @@ -0,0 +1,50 @@ +/* +Copyright 2019 The Kubernetes 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. +*/ + +package value + +// Compare compares floats. The result will be 0 if lhs==rhs, -1 if f < +// rhs, and +1 if f > rhs. +func FloatCompare(lhs, rhs float64) int { + if lhs > rhs { + return 1 + } else if lhs < rhs { + return -1 + } + return 0 +} + +// IntCompare compares integers. The result will be 0 if i==rhs, -1 if i < +// rhs, and +1 if i > rhs. +func IntCompare(lhs, rhs int64) int { + if lhs > rhs { + return 1 + } else if lhs < rhs { + return -1 + } + return 0 +} + +// Compare compares booleans. The result will be 0 if b==rhs, -1 if b < +// rhs, and +1 if b > rhs. +func BoolCompare(lhs, rhs bool) int { + if lhs == rhs { + return 0 + } else if lhs == false { + return -1 + } + return 1 +} diff --git a/vendor/sigs.k8s.io/structured-merge-diff/v3/value/structreflect.go b/vendor/sigs.k8s.io/structured-merge-diff/v3/value/structreflect.go new file mode 100644 index 0000000000..4a7bb5c6eb --- /dev/null +++ b/vendor/sigs.k8s.io/structured-merge-diff/v3/value/structreflect.go @@ -0,0 +1,208 @@ +/* +Copyright 2019 The Kubernetes 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. +*/ + +package value + +import ( + "fmt" + "reflect" +) + +type structReflect struct { + valueReflect +} + +func (r structReflect) Length() int { + i := 0 + eachStructField(r.Value, func(_ *TypeReflectCacheEntry, s string, value reflect.Value) bool { + i++ + return true + }) + return i +} + +func (r structReflect) Empty() bool { + return eachStructField(r.Value, func(_ *TypeReflectCacheEntry, s string, value reflect.Value) bool { + return false // exit early if the struct is non-empty + }) +} + +func (r structReflect) Get(key string) (Value, bool) { + return r.GetUsing(HeapAllocator, key) +} + +func (r structReflect) GetUsing(a Allocator, key string) (Value, bool) { + if val, ok := r.findJsonNameField(key); ok { + return a.allocValueReflect().mustReuse(val, nil, nil, nil), true + } + return nil, false +} + +func (r structReflect) Has(key string) bool { + _, ok := r.findJsonNameField(key) + return ok +} + +func (r structReflect) Set(key string, val Value) { + fieldEntry, ok := TypeReflectEntryOf(r.Value.Type()).Fields()[key] + if !ok { + panic(fmt.Sprintf("key %s may not be set on struct %T: field does not exist", key, r.Value.Interface())) + } + oldVal := fieldEntry.GetFrom(r.Value) + newVal := reflect.ValueOf(val.Unstructured()) + r.update(fieldEntry, key, oldVal, newVal) +} + +func (r structReflect) Delete(key string) { + fieldEntry, ok := TypeReflectEntryOf(r.Value.Type()).Fields()[key] + if !ok { + panic(fmt.Sprintf("key %s may not be deleted on struct %T: field does not exist", key, r.Value.Interface())) + } + oldVal := fieldEntry.GetFrom(r.Value) + if oldVal.Kind() != reflect.Ptr && !fieldEntry.isOmitEmpty { + panic(fmt.Sprintf("key %s may not be deleted on struct: %T: value is neither a pointer nor an omitempty field", key, r.Value.Interface())) + } + r.update(fieldEntry, key, oldVal, reflect.Zero(oldVal.Type())) +} + +func (r structReflect) update(fieldEntry *FieldCacheEntry, key string, oldVal, newVal reflect.Value) { + if oldVal.CanSet() { + oldVal.Set(newVal) + return + } + + // map items are not addressable, so if a struct is contained in a map, the only way to modify it is + // to write a replacement fieldEntry into the map. + if r.ParentMap != nil { + if r.ParentMapKey == nil { + panic("ParentMapKey must not be nil if ParentMap is not nil") + } + replacement := reflect.New(r.Value.Type()).Elem() + fieldEntry.GetFrom(replacement).Set(newVal) + r.ParentMap.SetMapIndex(*r.ParentMapKey, replacement) + return + } + + // This should never happen since NewValueReflect ensures that the root object reflected on is a pointer and map + // item replacement is handled above. + panic(fmt.Sprintf("key %s may not be modified on struct: %T: struct is not settable", key, r.Value.Interface())) +} + +func (r structReflect) Iterate(fn func(string, Value) bool) bool { + return r.IterateUsing(HeapAllocator, fn) +} + +func (r structReflect) IterateUsing(a Allocator, fn func(string, Value) bool) bool { + vr := a.allocValueReflect() + defer a.Free(vr) + return eachStructField(r.Value, func(e *TypeReflectCacheEntry, s string, value reflect.Value) bool { + return fn(s, vr.mustReuse(value, e, nil, nil)) + }) +} + +func eachStructField(structVal reflect.Value, fn func(*TypeReflectCacheEntry, string, reflect.Value) bool) bool { + for _, fieldCacheEntry := range TypeReflectEntryOf(structVal.Type()).OrderedFields() { + fieldVal := fieldCacheEntry.GetFrom(structVal) + if fieldCacheEntry.CanOmit(fieldVal) { + // omit it + continue + } + ok := fn(fieldCacheEntry.TypeEntry, fieldCacheEntry.JsonName, fieldVal) + if !ok { + return false + } + } + return true +} + +func (r structReflect) Unstructured() interface{} { + // Use number of struct fields as a cheap way to rough estimate map size + result := make(map[string]interface{}, r.Value.NumField()) + r.Iterate(func(s string, value Value) bool { + result[s] = value.Unstructured() + return true + }) + return result +} + +func (r structReflect) Equals(m Map) bool { + return r.EqualsUsing(HeapAllocator, m) +} + +func (r structReflect) EqualsUsing(a Allocator, m Map) bool { + // MapEquals uses zip and is fairly efficient for structReflect + return MapEqualsUsing(a, &r, m) +} + +func (r structReflect) findJsonNameFieldAndNotEmpty(jsonName string) (reflect.Value, bool) { + structCacheEntry, ok := TypeReflectEntryOf(r.Value.Type()).Fields()[jsonName] + if !ok { + return reflect.Value{}, false + } + fieldVal := structCacheEntry.GetFrom(r.Value) + return fieldVal, !structCacheEntry.CanOmit(fieldVal) +} + +func (r structReflect) findJsonNameField(jsonName string) (val reflect.Value, ok bool) { + structCacheEntry, ok := TypeReflectEntryOf(r.Value.Type()).Fields()[jsonName] + if !ok { + return reflect.Value{}, false + } + fieldVal := structCacheEntry.GetFrom(r.Value) + return fieldVal, !structCacheEntry.CanOmit(fieldVal) +} + +func (r structReflect) Zip(other Map, order MapTraverseOrder, fn func(key string, lhs, rhs Value) bool) bool { + return r.ZipUsing(HeapAllocator, other, order, fn) +} + +func (r structReflect) ZipUsing(a Allocator, other Map, order MapTraverseOrder, fn func(key string, lhs, rhs Value) bool) bool { + if otherStruct, ok := other.(*structReflect); ok && r.Value.Type() == otherStruct.Value.Type() { + lhsvr, rhsvr := a.allocValueReflect(), a.allocValueReflect() + defer a.Free(lhsvr) + defer a.Free(rhsvr) + return r.structZip(otherStruct, lhsvr, rhsvr, fn) + } + return defaultMapZip(a, &r, other, order, fn) +} + +// structZip provides an optimized zip for structReflect types. The zip is always lexical key ordered since there is +// no additional cost to ordering the zip for structured types. +func (r structReflect) structZip(other *structReflect, lhsvr, rhsvr *valueReflect, fn func(key string, lhs, rhs Value) bool) bool { + lhsVal := r.Value + rhsVal := other.Value + + for _, fieldCacheEntry := range TypeReflectEntryOf(lhsVal.Type()).OrderedFields() { + lhsFieldVal := fieldCacheEntry.GetFrom(lhsVal) + rhsFieldVal := fieldCacheEntry.GetFrom(rhsVal) + lhsOmit := fieldCacheEntry.CanOmit(lhsFieldVal) + rhsOmit := fieldCacheEntry.CanOmit(rhsFieldVal) + if lhsOmit && rhsOmit { + continue + } + var lhsVal, rhsVal Value + if !lhsOmit { + lhsVal = lhsvr.mustReuse(lhsFieldVal, fieldCacheEntry.TypeEntry, nil, nil) + } + if !rhsOmit { + rhsVal = rhsvr.mustReuse(rhsFieldVal, fieldCacheEntry.TypeEntry, nil, nil) + } + if !fn(fieldCacheEntry.JsonName, lhsVal, rhsVal) { + return false + } + } + return true +} diff --git a/vendor/sigs.k8s.io/structured-merge-diff/v3/value/value.go b/vendor/sigs.k8s.io/structured-merge-diff/v3/value/value.go new file mode 100644 index 0000000000..ea79e3a000 --- /dev/null +++ b/vendor/sigs.k8s.io/structured-merge-diff/v3/value/value.go @@ -0,0 +1,347 @@ +/* +Copyright 2018 The Kubernetes 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. +*/ + +package value + +import ( + "bytes" + "fmt" + "io" + "strings" + + jsoniter "github.com/json-iterator/go" + "gopkg.in/yaml.v2" +) + +var ( + readPool = jsoniter.NewIterator(jsoniter.ConfigCompatibleWithStandardLibrary).Pool() + writePool = jsoniter.NewStream(jsoniter.ConfigCompatibleWithStandardLibrary, nil, 1024).Pool() +) + +// A Value corresponds to an 'atom' in the schema. It should return true +// for at least one of the IsXXX methods below, or the value is +// considered "invalid" +type Value interface { + // IsMap returns true if the Value is a Map, false otherwise. + IsMap() bool + // IsList returns true if the Value is a List, false otherwise. + IsList() bool + // IsBool returns true if the Value is a bool, false otherwise. + IsBool() bool + // IsInt returns true if the Value is a int64, false otherwise. + IsInt() bool + // IsFloat returns true if the Value is a float64, false + // otherwise. + IsFloat() bool + // IsString returns true if the Value is a string, false + // otherwise. + IsString() bool + // IsMap returns true if the Value is null, false otherwise. + IsNull() bool + + // AsMap converts the Value into a Map (or panic if the type + // doesn't allow it). + AsMap() Map + // AsMapUsing uses the provided allocator and converts the Value + // into a Map (or panic if the type doesn't allow it). + AsMapUsing(Allocator) Map + // AsList converts the Value into a List (or panic if the type + // doesn't allow it). + AsList() List + // AsListUsing uses the provided allocator and converts the Value + // into a List (or panic if the type doesn't allow it). + AsListUsing(Allocator) List + // AsBool converts the Value into a bool (or panic if the type + // doesn't allow it). + AsBool() bool + // AsInt converts the Value into an int64 (or panic if the type + // doesn't allow it). + AsInt() int64 + // AsFloat converts the Value into a float64 (or panic if the type + // doesn't allow it). + AsFloat() float64 + // AsString converts the Value into a string (or panic if the type + // doesn't allow it). + AsString() string + + // Unstructured converts the Value into an Unstructured interface{}. + Unstructured() interface{} +} + +// FromJSON is a helper function for reading a JSON document. +func FromJSON(input []byte) (Value, error) { + return FromJSONFast(input) +} + +// FromJSONFast is a helper function for reading a JSON document. +func FromJSONFast(input []byte) (Value, error) { + iter := readPool.BorrowIterator(input) + defer readPool.ReturnIterator(iter) + return ReadJSONIter(iter) +} + +// ToJSON is a helper function for producing a JSon document. +func ToJSON(v Value) ([]byte, error) { + buf := bytes.Buffer{} + stream := writePool.BorrowStream(&buf) + defer writePool.ReturnStream(stream) + WriteJSONStream(v, stream) + b := stream.Buffer() + err := stream.Flush() + // Help jsoniter manage its buffers--without this, the next + // use of the stream is likely to require an allocation. Look + // at the jsoniter stream code to understand why. They were probably + // optimizing for folks using the buffer directly. + stream.SetBuffer(b[:0]) + return buf.Bytes(), err +} + +// ReadJSONIter reads a Value from a JSON iterator. +func ReadJSONIter(iter *jsoniter.Iterator) (Value, error) { + v := iter.Read() + if iter.Error != nil && iter.Error != io.EOF { + return nil, iter.Error + } + return NewValueInterface(v), nil +} + +// WriteJSONStream writes a value into a JSON stream. +func WriteJSONStream(v Value, stream *jsoniter.Stream) { + stream.WriteVal(v.Unstructured()) +} + +// ToYAML marshals a value as YAML. +func ToYAML(v Value) ([]byte, error) { + return yaml.Marshal(v.Unstructured()) +} + +// Equals returns true iff the two values are equal. +func Equals(lhs, rhs Value) bool { + return EqualsUsing(HeapAllocator, lhs, rhs) +} + +// EqualsUsing uses the provided allocator and returns true iff the two values are equal. +func EqualsUsing(a Allocator, lhs, rhs Value) bool { + if lhs.IsFloat() || rhs.IsFloat() { + var lf float64 + if lhs.IsFloat() { + lf = lhs.AsFloat() + } else if lhs.IsInt() { + lf = float64(lhs.AsInt()) + } else { + return false + } + var rf float64 + if rhs.IsFloat() { + rf = rhs.AsFloat() + } else if rhs.IsInt() { + rf = float64(rhs.AsInt()) + } else { + return false + } + return lf == rf + } + if lhs.IsInt() { + if rhs.IsInt() { + return lhs.AsInt() == rhs.AsInt() + } + return false + } else if rhs.IsInt() { + return false + } + if lhs.IsString() { + if rhs.IsString() { + return lhs.AsString() == rhs.AsString() + } + return false + } else if rhs.IsString() { + return false + } + if lhs.IsBool() { + if rhs.IsBool() { + return lhs.AsBool() == rhs.AsBool() + } + return false + } else if rhs.IsBool() { + return false + } + if lhs.IsList() { + if rhs.IsList() { + lhsList := lhs.AsListUsing(a) + defer a.Free(lhsList) + rhsList := rhs.AsListUsing(a) + defer a.Free(rhsList) + return lhsList.EqualsUsing(a, rhsList) + } + return false + } else if rhs.IsList() { + return false + } + if lhs.IsMap() { + if rhs.IsMap() { + lhsList := lhs.AsMapUsing(a) + defer a.Free(lhsList) + rhsList := rhs.AsMapUsing(a) + defer a.Free(rhsList) + return lhsList.EqualsUsing(a, rhsList) + } + return false + } else if rhs.IsMap() { + return false + } + if lhs.IsNull() { + if rhs.IsNull() { + return true + } + return false + } else if rhs.IsNull() { + return false + } + // No field is set, on either objects. + return true +} + +// ToString returns a human-readable representation of the value. +func ToString(v Value) string { + if v.IsNull() { + return "null" + } + switch { + case v.IsFloat(): + return fmt.Sprintf("%v", v.AsFloat()) + case v.IsInt(): + return fmt.Sprintf("%v", v.AsInt()) + case v.IsString(): + return fmt.Sprintf("%q", v.AsString()) + case v.IsBool(): + return fmt.Sprintf("%v", v.AsBool()) + case v.IsList(): + strs := []string{} + list := v.AsList() + for i := 0; i < list.Length(); i++ { + strs = append(strs, ToString(list.At(i))) + } + return "[" + strings.Join(strs, ",") + "]" + case v.IsMap(): + strs := []string{} + v.AsMap().Iterate(func(k string, v Value) bool { + strs = append(strs, fmt.Sprintf("%v=%v", k, ToString(v))) + return true + }) + return strings.Join(strs, "") + } + // No field is set, on either objects. + return "{{undefined}}" +} + +// Less provides a total ordering for Value (so that they can be sorted, even +// if they are of different types). +func Less(lhs, rhs Value) bool { + return Compare(lhs, rhs) == -1 +} + +// Compare provides a total ordering for Value (so that they can be +// sorted, even if they are of different types). The result will be 0 if +// v==rhs, -1 if v < rhs, and +1 if v > rhs. +func Compare(lhs, rhs Value) int { + return CompareUsing(HeapAllocator, lhs, rhs) +} + +// CompareUsing uses the provided allocator and provides a total +// ordering for Value (so that they can be sorted, even if they +// are of different types). The result will be 0 if v==rhs, -1 +// if v < rhs, and +1 if v > rhs. +func CompareUsing(a Allocator, lhs, rhs Value) int { + if lhs.IsFloat() { + if !rhs.IsFloat() { + // Extra: compare floats and ints numerically. + if rhs.IsInt() { + return FloatCompare(lhs.AsFloat(), float64(rhs.AsInt())) + } + return -1 + } + return FloatCompare(lhs.AsFloat(), rhs.AsFloat()) + } else if rhs.IsFloat() { + // Extra: compare floats and ints numerically. + if lhs.IsInt() { + return FloatCompare(float64(lhs.AsInt()), rhs.AsFloat()) + } + return 1 + } + + if lhs.IsInt() { + if !rhs.IsInt() { + return -1 + } + return IntCompare(lhs.AsInt(), rhs.AsInt()) + } else if rhs.IsInt() { + return 1 + } + + if lhs.IsString() { + if !rhs.IsString() { + return -1 + } + return strings.Compare(lhs.AsString(), rhs.AsString()) + } else if rhs.IsString() { + return 1 + } + + if lhs.IsBool() { + if !rhs.IsBool() { + return -1 + } + return BoolCompare(lhs.AsBool(), rhs.AsBool()) + } else if rhs.IsBool() { + return 1 + } + + if lhs.IsList() { + if !rhs.IsList() { + return -1 + } + lhsList := lhs.AsListUsing(a) + defer a.Free(lhsList) + rhsList := rhs.AsListUsing(a) + defer a.Free(rhsList) + return ListCompareUsing(a, lhsList, rhsList) + } else if rhs.IsList() { + return 1 + } + if lhs.IsMap() { + if !rhs.IsMap() { + return -1 + } + lhsMap := lhs.AsMapUsing(a) + defer a.Free(lhsMap) + rhsMap := rhs.AsMapUsing(a) + defer a.Free(rhsMap) + return MapCompareUsing(a, lhsMap, rhsMap) + } else if rhs.IsMap() { + return 1 + } + if lhs.IsNull() { + if !rhs.IsNull() { + return -1 + } + return 0 + } else if rhs.IsNull() { + return 1 + } + + // Invalid Value-- nothing is set. + return 0 +} diff --git a/vendor/sigs.k8s.io/structured-merge-diff/v3/value/valuereflect.go b/vendor/sigs.k8s.io/structured-merge-diff/v3/value/valuereflect.go new file mode 100644 index 0000000000..05e70debae --- /dev/null +++ b/vendor/sigs.k8s.io/structured-merge-diff/v3/value/valuereflect.go @@ -0,0 +1,294 @@ +/* +Copyright 2019 The Kubernetes 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. +*/ + +package value + +import ( + "encoding/base64" + "fmt" + "reflect" +) + +// NewValueReflect creates a Value backed by an "interface{}" type, +// typically an structured object in Kubernetes world that is uses reflection to expose. +// The provided "interface{}" value must be a pointer so that the value can be modified via reflection. +// The provided "interface{}" may contain structs and types that are converted to Values +// by the jsonMarshaler interface. +func NewValueReflect(value interface{}) (Value, error) { + if value == nil { + return NewValueInterface(nil), nil + } + v := reflect.ValueOf(value) + if v.Kind() != reflect.Ptr { + // The root value to reflect on must be a pointer so that map.Set() and map.Delete() operations are possible. + return nil, fmt.Errorf("value provided to NewValueReflect must be a pointer") + } + return wrapValueReflect(v, nil, nil) +} + +// wrapValueReflect wraps the provide reflect.Value as a value. If parent in the data tree is a map, parentMap +// and parentMapKey must be provided so that the returned value may be set and deleted. +func wrapValueReflect(value reflect.Value, parentMap, parentMapKey *reflect.Value) (Value, error) { + val := HeapAllocator.allocValueReflect() + return val.reuse(value, nil, parentMap, parentMapKey) +} + +// wrapValueReflect wraps the provide reflect.Value as a value, and panics if there is an error. If parent in the data +// tree is a map, parentMap and parentMapKey must be provided so that the returned value may be set and deleted. +func mustWrapValueReflect(value reflect.Value, parentMap, parentMapKey *reflect.Value) Value { + v, err := wrapValueReflect(value, parentMap, parentMapKey) + if err != nil { + panic(err) + } + return v +} + +// the value interface doesn't care about the type for value.IsNull, so we can use a constant +var nilType = reflect.TypeOf(&struct{}{}) + +// reuse replaces the value of the valueReflect. If parent in the data tree is a map, parentMap and parentMapKey +// must be provided so that the returned value may be set and deleted. +func (r *valueReflect) reuse(value reflect.Value, cacheEntry *TypeReflectCacheEntry, parentMap, parentMapKey *reflect.Value) (Value, error) { + if cacheEntry == nil { + cacheEntry = TypeReflectEntryOf(value.Type()) + } + if cacheEntry.CanConvertToUnstructured() { + u, err := cacheEntry.ToUnstructured(value) + if err != nil { + return nil, err + } + if u == nil { + value = reflect.Zero(nilType) + } else { + value = reflect.ValueOf(u) + } + } + r.Value = dereference(value) + r.ParentMap = parentMap + r.ParentMapKey = parentMapKey + r.kind = kind(r.Value) + return r, nil +} + +// mustReuse replaces the value of the valueReflect and panics if there is an error. If parent in the data tree is a +// map, parentMap and parentMapKey must be provided so that the returned value may be set and deleted. +func (r *valueReflect) mustReuse(value reflect.Value, cacheEntry *TypeReflectCacheEntry, parentMap, parentMapKey *reflect.Value) Value { + v, err := r.reuse(value, cacheEntry, parentMap, parentMapKey) + if err != nil { + panic(err) + } + return v +} + +func dereference(val reflect.Value) reflect.Value { + kind := val.Kind() + if (kind == reflect.Interface || kind == reflect.Ptr) && !safeIsNil(val) { + return val.Elem() + } + return val +} + +type valueReflect struct { + ParentMap *reflect.Value + ParentMapKey *reflect.Value + Value reflect.Value + kind reflectType +} + +func (r valueReflect) IsMap() bool { + return r.kind == mapType || r.kind == structMapType +} + +func (r valueReflect) IsList() bool { + return r.kind == listType +} + +func (r valueReflect) IsBool() bool { + return r.kind == boolType +} + +func (r valueReflect) IsInt() bool { + return r.kind == intType || r.kind == uintType +} + +func (r valueReflect) IsFloat() bool { + return r.kind == floatType +} + +func (r valueReflect) IsString() bool { + return r.kind == stringType || r.kind == byteStringType +} + +func (r valueReflect) IsNull() bool { + return r.kind == nullType +} + +type reflectType = int + +const ( + mapType = iota + structMapType + listType + intType + uintType + floatType + stringType + byteStringType + boolType + nullType +) + +func kind(v reflect.Value) reflectType { + typ := v.Type() + rk := typ.Kind() + switch rk { + case reflect.Map: + if v.IsNil() { + return nullType + } + return mapType + case reflect.Struct: + return structMapType + case reflect.Int, reflect.Int64, reflect.Int32, reflect.Int16, reflect.Int8: + return intType + case reflect.Uint, reflect.Uint32, reflect.Uint16, reflect.Uint8: + // Uint64 deliberately excluded, see valueUnstructured.Int. + return uintType + case reflect.Float64, reflect.Float32: + return floatType + case reflect.String: + return stringType + case reflect.Bool: + return boolType + case reflect.Slice: + if v.IsNil() { + return nullType + } + elemKind := typ.Elem().Kind() + if elemKind == reflect.Uint8 { + return byteStringType + } + return listType + case reflect.Chan, reflect.Func, reflect.Ptr, reflect.UnsafePointer, reflect.Interface: + if v.IsNil() { + return nullType + } + panic(fmt.Sprintf("unsupported type: %v", v.Type())) + default: + panic(fmt.Sprintf("unsupported type: %v", v.Type())) + } +} + +// TODO find a cleaner way to avoid panics from reflect.IsNil() +func safeIsNil(v reflect.Value) bool { + k := v.Kind() + switch k { + case reflect.Chan, reflect.Func, reflect.Map, reflect.Ptr, reflect.UnsafePointer, reflect.Interface, reflect.Slice: + return v.IsNil() + } + return false +} + +func (r valueReflect) AsMap() Map { + return r.AsMapUsing(HeapAllocator) +} + +func (r valueReflect) AsMapUsing(a Allocator) Map { + switch r.kind { + case structMapType: + v := a.allocStructReflect() + v.valueReflect = r + return v + case mapType: + v := a.allocMapReflect() + v.valueReflect = r + return v + default: + panic("value is not a map or struct") + } +} + +func (r valueReflect) AsList() List { + return r.AsListUsing(HeapAllocator) +} + +func (r valueReflect) AsListUsing(a Allocator) List { + if r.IsList() { + v := a.allocListReflect() + v.Value = r.Value + return v + } + panic("value is not a list") +} + +func (r valueReflect) AsBool() bool { + if r.IsBool() { + return r.Value.Bool() + } + panic("value is not a bool") +} + +func (r valueReflect) AsInt() int64 { + if r.kind == intType { + return r.Value.Int() + } + if r.kind == uintType { + return int64(r.Value.Uint()) + } + + panic("value is not an int") +} + +func (r valueReflect) AsFloat() float64 { + if r.IsFloat() { + return r.Value.Float() + } + panic("value is not a float") +} + +func (r valueReflect) AsString() string { + switch r.kind { + case stringType: + return r.Value.String() + case byteStringType: + return base64.StdEncoding.EncodeToString(r.Value.Bytes()) + } + panic("value is not a string") +} + +func (r valueReflect) Unstructured() interface{} { + val := r.Value + switch { + case r.IsNull(): + return nil + case val.Kind() == reflect.Struct: + return structReflect{r}.Unstructured() + case val.Kind() == reflect.Map: + return mapReflect{valueReflect: r}.Unstructured() + case r.IsList(): + return listReflect{r.Value}.Unstructured() + case r.IsString(): + return r.AsString() + case r.IsInt(): + return r.AsInt() + case r.IsBool(): + return r.AsBool() + case r.IsFloat(): + return r.AsFloat() + default: + panic(fmt.Sprintf("value of type %s is not a supported by value reflector", val.Type())) + } +} diff --git a/vendor/sigs.k8s.io/structured-merge-diff/v3/value/valueunstructured.go b/vendor/sigs.k8s.io/structured-merge-diff/v3/value/valueunstructured.go new file mode 100644 index 0000000000..ac5a926285 --- /dev/null +++ b/vendor/sigs.k8s.io/structured-merge-diff/v3/value/valueunstructured.go @@ -0,0 +1,178 @@ +/* +Copyright 2018 The Kubernetes 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. +*/ + +package value + +import ( + "fmt" +) + +// NewValueInterface creates a Value backed by an "interface{}" type, +// typically an unstructured object in Kubernetes world. +// interface{} must be one of: map[string]interface{}, map[interface{}]interface{}, []interface{}, int types, float types, +// string or boolean. Nested interface{} must also be one of these types. +func NewValueInterface(v interface{}) Value { + return Value(HeapAllocator.allocValueUnstructured().reuse(v)) +} + +type valueUnstructured struct { + Value interface{} +} + +// reuse replaces the value of the valueUnstructured. +func (vi *valueUnstructured) reuse(value interface{}) Value { + vi.Value = value + return vi +} + +func (v valueUnstructured) IsMap() bool { + if _, ok := v.Value.(map[string]interface{}); ok { + return true + } + if _, ok := v.Value.(map[interface{}]interface{}); ok { + return true + } + return false +} + +func (v valueUnstructured) AsMap() Map { + return v.AsMapUsing(HeapAllocator) +} + +func (v valueUnstructured) AsMapUsing(_ Allocator) Map { + if v.Value == nil { + panic("invalid nil") + } + switch t := v.Value.(type) { + case map[string]interface{}: + return mapUnstructuredString(t) + case map[interface{}]interface{}: + return mapUnstructuredInterface(t) + } + panic(fmt.Errorf("not a map: %#v", v)) +} + +func (v valueUnstructured) IsList() bool { + if v.Value == nil { + return false + } + _, ok := v.Value.([]interface{}) + return ok +} + +func (v valueUnstructured) AsList() List { + return v.AsListUsing(HeapAllocator) +} + +func (v valueUnstructured) AsListUsing(_ Allocator) List { + return listUnstructured(v.Value.([]interface{})) +} + +func (v valueUnstructured) IsFloat() bool { + if v.Value == nil { + return false + } else if _, ok := v.Value.(float64); ok { + return true + } else if _, ok := v.Value.(float32); ok { + return true + } + return false +} + +func (v valueUnstructured) AsFloat() float64 { + if f, ok := v.Value.(float32); ok { + return float64(f) + } + return v.Value.(float64) +} + +func (v valueUnstructured) IsInt() bool { + if v.Value == nil { + return false + } else if _, ok := v.Value.(int); ok { + return true + } else if _, ok := v.Value.(int8); ok { + return true + } else if _, ok := v.Value.(int16); ok { + return true + } else if _, ok := v.Value.(int32); ok { + return true + } else if _, ok := v.Value.(int64); ok { + return true + } else if _, ok := v.Value.(uint); ok { + return true + } else if _, ok := v.Value.(uint8); ok { + return true + } else if _, ok := v.Value.(uint16); ok { + return true + } else if _, ok := v.Value.(uint32); ok { + return true + } + return false +} + +func (v valueUnstructured) AsInt() int64 { + if i, ok := v.Value.(int); ok { + return int64(i) + } else if i, ok := v.Value.(int8); ok { + return int64(i) + } else if i, ok := v.Value.(int16); ok { + return int64(i) + } else if i, ok := v.Value.(int32); ok { + return int64(i) + } else if i, ok := v.Value.(uint); ok { + return int64(i) + } else if i, ok := v.Value.(uint8); ok { + return int64(i) + } else if i, ok := v.Value.(uint16); ok { + return int64(i) + } else if i, ok := v.Value.(uint32); ok { + return int64(i) + } + return v.Value.(int64) +} + +func (v valueUnstructured) IsString() bool { + if v.Value == nil { + return false + } + _, ok := v.Value.(string) + return ok +} + +func (v valueUnstructured) AsString() string { + return v.Value.(string) +} + +func (v valueUnstructured) IsBool() bool { + if v.Value == nil { + return false + } + _, ok := v.Value.(bool) + return ok +} + +func (v valueUnstructured) AsBool() bool { + return v.Value.(bool) +} + +func (v valueUnstructured) IsNull() bool { + return v.Value == nil +} + +func (v valueUnstructured) Unstructured() interface{} { + return v.Value +}