Auto-update dependencies (#42)

Produced via:
  `dep ensure -update github.com/knative/test-infra knative.dev/pkg`
/assign @mattmoor
This commit is contained in:
mattmoor-sockpuppet 2019-07-03 22:04:33 -07:00 committed by Knative Prow Robot
parent 55b45efbc4
commit 207d4e297f
6 changed files with 184 additions and 4 deletions

6
Gopkg.lock generated
View File

@ -261,7 +261,7 @@
"tools/dep-collector",
]
pruneopts = "UT"
revision = "118e4f2cafc2df70d391b1259512a92d7add18f5"
revision = "6b7f382de253483a37481f729146f98d97f4ea2d"
[[projects]]
digest = "1:5985ef4caf91ece5d54817c11ea25f182697534f8ae6521eadcd628c142ac4b6"
@ -930,7 +930,7 @@
[[projects]]
branch = "master"
digest = "1:df8dd286355037777c67f3cf8a4b287d018df3fd98b76cf31c21eba955933664"
digest = "1:7f6435d3ef37758b1f0004b6541b6152d016b840bb912640c5bf6be0628d5cc4"
name = "knative.dev/pkg"
packages = [
"apis",
@ -949,7 +949,7 @@
"metrics/metricskey",
]
pruneopts = "T"
revision = "1864f499dcaa98b9de0e46faa40861591b678f03"
revision = "db778775199deb67bb12f74758ab468aa7047eb4"
[solve-meta]
analyzer-name = "dep"

2
vendor/knative.dev/pkg/Gopkg.lock generated vendored
View File

@ -307,7 +307,7 @@
"tools/dep-collector",
]
pruneopts = "UT"
revision = "3f359626cb5e4f29001a1b6d9b4c38a0954f2069"
revision = "91d37e4abc3047fc32ff6c0adcdea4fd29d47602"
[[projects]]
digest = "1:56dbf15e091bf7926cb33a57cb6bdfc658fc6d3498d2f76f10a97ce7856f1fde"

View File

@ -0,0 +1,38 @@
/*
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 fake
import (
"context"
"knative.dev/pkg/controller"
"knative.dev/pkg/injection"
"knative.dev/pkg/injection/informers/kubeinformers/corev1/limitrange"
"knative.dev/pkg/injection/informers/kubeinformers/factory/fake"
)
var Get = limitrange.Get
func init() {
injection.Fake.RegisterInformer(withInformer)
}
func withInformer(ctx context.Context) (context.Context, controller.Informer) {
f := fake.Get(ctx)
inf := f.Core().V1().LimitRanges()
return context.WithValue(ctx, limitrange.Key{}, inf), inf.Informer()
}

View File

@ -0,0 +1,52 @@
/*
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 limitrange
import (
"context"
corev1 "k8s.io/client-go/informers/core/v1"
"knative.dev/pkg/controller"
"knative.dev/pkg/injection"
"knative.dev/pkg/injection/informers/kubeinformers/factory"
"knative.dev/pkg/logging"
)
func init() {
injection.Default.RegisterInformer(withInformer)
}
// Key is used as the key for associating information
// with a context.Context.
type Key struct{}
func withInformer(ctx context.Context) (context.Context, controller.Informer) {
f := factory.Get(ctx)
inf := f.Core().V1().LimitRanges()
return context.WithValue(ctx, Key{}, inf), inf.Informer()
}
// Get extracts the Kubernetes ConfigMap informer from the context.
func Get(ctx context.Context) corev1.LimitRangeInformer {
untyped := ctx.Value(Key{})
if untyped == nil {
logging.FromContext(ctx).Panicf(
"Unable to fetch %T from context.", (corev1.LimitRangeInformer)(nil))
}
return untyped.(corev1.LimitRangeInformer)
}

View File

@ -0,0 +1,38 @@
/*
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 fake
import (
"context"
"knative.dev/pkg/controller"
"knative.dev/pkg/injection"
"knative.dev/pkg/injection/informers/kubeinformers/corev1/resourcequota"
"knative.dev/pkg/injection/informers/kubeinformers/factory/fake"
)
var Get = resourcequota.Get
func init() {
injection.Fake.RegisterInformer(withInformer)
}
func withInformer(ctx context.Context) (context.Context, controller.Informer) {
f := fake.Get(ctx)
inf := f.Core().V1().ResourceQuotas()
return context.WithValue(ctx, resourcequota.Key{}, inf), inf.Informer()
}

View File

@ -0,0 +1,52 @@
/*
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 resourcequota
import (
"context"
corev1 "k8s.io/client-go/informers/core/v1"
"knative.dev/pkg/controller"
"knative.dev/pkg/injection"
"knative.dev/pkg/injection/informers/kubeinformers/factory"
"knative.dev/pkg/logging"
)
func init() {
injection.Default.RegisterInformer(withInformer)
}
// Key is used as the key for associating information
// with a context.Context.
type Key struct{}
func withInformer(ctx context.Context) (context.Context, controller.Informer) {
f := factory.Get(ctx)
inf := f.Core().V1().ResourceQuotas()
return context.WithValue(ctx, Key{}, inf), inf.Informer()
}
// Get extracts the Kubernetes ResourceQuota informer from the context.
func Get(ctx context.Context) corev1.ResourceQuotaInformer {
untyped := ctx.Value(Key{})
if untyped == nil {
logging.FromContext(ctx).Panicf(
"Unable to fetch %T from context.", (corev1.ResourceQuotaInformer)(nil))
}
return untyped.(corev1.ResourceQuotaInformer)
}