chore: upgrade go dependencies (#3657)

This commit is contained in:
Kevin Wan
2023-10-28 00:19:22 +08:00
committed by GitHub
parent 9394e59597
commit a1fca3a1da
8 changed files with 126 additions and 503 deletions

View File

@@ -6,8 +6,11 @@ import (
"github.com/zeromicro/go-zero/core/lang"
"github.com/zeromicro/go-zero/core/logx"
v1 "k8s.io/api/core/v1"
"k8s.io/client-go/tools/cache"
)
var _ cache.ResourceEventHandler = (*EventHandler)(nil)
// EventHandler is ResourceEventHandler implementation.
type EventHandler struct {
update func([]string)
@@ -24,7 +27,7 @@ func NewEventHandler(update func([]string)) *EventHandler {
}
// OnAdd handles the endpoints add events.
func (h *EventHandler) OnAdd(obj any) {
func (h *EventHandler) OnAdd(obj any, _ bool) {
endpoints, ok := obj.(*v1.Endpoints)
if !ok {
logx.Errorf("%v is not an object with type *v1.Endpoints", obj)