Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update vendor #212

Merged
merged 2 commits into from
Oct 30, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions pkg/changeset/changeset.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package changeset

import (
"context"
"strings"

"github.com/rancher/norman/controller"
Expand All @@ -20,17 +21,17 @@ type Enqueuer func(namespace, name string)

type Resolver func(namespace, name string, obj runtime.Object) ([]Key, error)

func Watch(name string, resolve Resolver, enq Enqueuer, controllers ...ControllerProvider) {
func Watch(ctx context.Context, name string, resolve Resolver, enq Enqueuer, controllers ...ControllerProvider) {
for _, c := range controllers {
watch(name, enq, resolve, c.Generic())
watch(ctx, name, enq, resolve, c.Generic())
}
}

func watch(name string, enq Enqueuer, resolve Resolver, genericController controller.GenericController) {
genericController.AddHandler(name, func(key string) error {
func watch(ctx context.Context, name string, enq Enqueuer, resolve Resolver, genericController controller.GenericController) {
genericController.AddHandler(ctx, name, func(key string, obj interface{}) (interface{}, error) {
obj, exists, err := genericController.Informer().GetStore().GetByKey(key)
if err != nil {
return err
return nil, err
}

if !exists {
Expand All @@ -57,7 +58,7 @@ func watch(name string, enq Enqueuer, resolve Resolver, genericController contro

keys, err := resolve(ns, name, ro)
if err != nil {
return err
return nil, err
}

for _, key := range keys {
Expand All @@ -66,6 +67,6 @@ func watch(name string, enq Enqueuer, resolve Resolver, genericController contro
}
}

return nil
return nil, nil
})
}
10 changes: 5 additions & 5 deletions vendor.conf
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# package
github.com/rancher/norman

k8s.io/kubernetes v1.12.1-lite7 https://github.com/ibuildthecloud/k3s.git transitive=true,staging=true
github.com/maruel/panicparse c0182c169410cfa80c7e8f046dad208eaef91338
bitbucket.org/ww/goautoneg a547fc61f48d567d5b4ec6f8aee5573d8efce11d https://github.com/rancher/goautoneg.git
golang.org/x/sync fd80eb99c8f653c847d294a001bdf2a3a6f768f5
github.com/gorilla/mux v1.6.1
k8s.io/kubernetes v1.12.2-lite1 https://github.com/ibuildthecloud/k3s.git transitive=true,staging=true
github.com/maruel/panicparse c0182c169410cfa80c7e8f046dad208eaef91338
bitbucket.org/ww/goautoneg a547fc61f48d567d5b4ec6f8aee5573d8efce11d https://github.com/rancher/goautoneg.git
golang.org/x/sync fd80eb99c8f653c847d294a001bdf2a3a6f768f5
github.com/gorilla/mux v1.6.1

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 0 additions & 5 deletions vendor/github.com/rancher/norman/.dockerignore

This file was deleted.

9 changes: 0 additions & 9 deletions vendor/github.com/rancher/norman/.drone.yml

This file was deleted.

7 changes: 0 additions & 7 deletions vendor/github.com/rancher/norman/.gitignore

This file was deleted.

16 changes: 0 additions & 16 deletions vendor/github.com/rancher/norman/Dockerfile.dapper

This file was deleted.

177 changes: 0 additions & 177 deletions vendor/github.com/rancher/norman/LICENSE

This file was deleted.

15 changes: 0 additions & 15 deletions vendor/github.com/rancher/norman/Makefile

This file was deleted.

78 changes: 0 additions & 78 deletions vendor/github.com/rancher/norman/README.md

This file was deleted.

Loading