-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* update k8s client to 0.22.12 * Refactored kubehandler to contain context * changes to mark a new module of kubehandler since changes are backward incompatible * removed use of stop channel and replaced it with context * updated README.md to reflect new interface Mentioned note about K8s compatibility and v0 branch
- Loading branch information
1 parent
0bd438f
commit 486a6ac
Showing
10 changed files
with
554 additions
and
151 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,17 @@ | ||
package kubehandler | ||
|
||
import "k8s.io/client-go/tools/cache" | ||
import ( | ||
"context" | ||
|
||
"k8s.io/client-go/tools/cache" | ||
) | ||
|
||
//EventHandler represents Event Handling for a Resource | ||
type EventHandler interface { | ||
GetName() string | ||
GetSynced() cache.InformerSynced | ||
GetInformer() cache.SharedInformer | ||
AddFunc(namespace, name string) error | ||
UpdateFunc(namespace, name string) error | ||
DeleteFunc(namespace, name string) error | ||
AddFunc(ctx context.Context, namespace, name string) error | ||
UpdateFunc(ctx context.Context, namespace, name string) error | ||
DeleteFunc(ctx context.Context, namespace, name string) error | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,42 @@ | ||
module github.com/gojektech/kubehandler | ||
module github.com/gojektech/kubehandler/v2 | ||
|
||
go 1.12 | ||
go 1.18 | ||
|
||
require ( | ||
github.com/davecgh/go-spew v1.1.0 // indirect | ||
github.com/gogo/protobuf v1.0.0 // indirect | ||
github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef // indirect | ||
github.com/google/btree v0.0.0-20180124185431-e89373fe6b4a // indirect | ||
github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf // indirect | ||
github.com/googleapis/gnostic v0.1.0 // indirect | ||
github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7 // indirect | ||
github.com/hashicorp/golang-lru v0.0.0-20180201235237-0fb14efe8c47 // indirect | ||
github.com/imdario/mergo v0.3.4 // indirect | ||
github.com/json-iterator/go v1.1.5 // indirect | ||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect | ||
github.com/modern-go/reflect2 v0.0.0-20180228065516-1df9eeb2bb81 // indirect | ||
github.com/openshift/api v3.9.0+incompatible | ||
github.com/peterbourgon/diskv v2.0.1+incompatible // indirect | ||
github.com/stretchr/testify v1.7.0 | ||
k8s.io/api v0.22.12 | ||
k8s.io/apimachinery v0.22.12 | ||
k8s.io/client-go v0.22.12 | ||
) | ||
|
||
require ( | ||
github.com/davecgh/go-spew v1.1.1 // indirect | ||
github.com/go-logr/logr v0.4.0 // indirect | ||
github.com/gogo/protobuf v1.3.2 // indirect | ||
github.com/golang/protobuf v1.5.2 // indirect | ||
github.com/google/go-cmp v0.5.5 // indirect | ||
github.com/google/gofuzz v1.1.0 // indirect | ||
github.com/googleapis/gnostic v0.5.5 // indirect | ||
github.com/imdario/mergo v0.3.5 // indirect | ||
github.com/json-iterator/go v1.1.11 // indirect | ||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect | ||
github.com/modern-go/reflect2 v1.0.1 // indirect | ||
github.com/pmezard/go-difflib v1.0.0 // indirect | ||
github.com/spf13/pflag v1.0.1 // indirect | ||
github.com/stretchr/testify v1.2.1 | ||
golang.org/x/crypto v0.0.0-20180411161317-d6449816ce06 // indirect | ||
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421 // indirect | ||
golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6 // indirect | ||
golang.org/x/sys v0.0.0-20180406135729-3b87a42e500a // indirect | ||
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4 // indirect | ||
github.com/spf13/pflag v1.0.5 // indirect | ||
golang.org/x/net v0.0.0-20211209124913-491a49abca63 // indirect | ||
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d // indirect | ||
golang.org/x/sys v0.0.0-20210616094352-59db8d763f22 // indirect | ||
golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d // indirect | ||
golang.org/x/text v0.3.6 // indirect | ||
golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac // indirect | ||
google.golang.org/appengine v1.6.5 // indirect | ||
google.golang.org/protobuf v1.26.0 // indirect | ||
gopkg.in/inf.v0 v0.9.1 // indirect | ||
gopkg.in/yaml.v2 v2.2.1 // indirect | ||
k8s.io/api v0.0.0-20190222213804-5cb15d344471 | ||
k8s.io/apimachinery v0.0.0-20190221213512-86fb29eff628 | ||
k8s.io/client-go v10.0.0+incompatible | ||
k8s.io/klog v0.2.0 // indirect | ||
sigs.k8s.io/yaml v1.1.0 // indirect | ||
gopkg.in/yaml.v2 v2.4.0 // indirect | ||
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect | ||
k8s.io/klog/v2 v2.9.0 // indirect | ||
k8s.io/utils v0.0.0-20211116205334-6203023598ed // indirect | ||
sigs.k8s.io/structured-merge-diff/v4 v4.2.1 // indirect | ||
sigs.k8s.io/yaml v1.2.0 // indirect | ||
) |
Oops, something went wrong.