From c4ad9809684190fe551f02a27600a4c13ebb878a Mon Sep 17 00:00:00 2001 From: Dmitriy Matrenichev Date: Mon, 30 Oct 2023 21:34:11 +0300 Subject: [PATCH] chore: replace State with CoreState in StateWatch and safe.StateWatchKind Somehow I missed those during the last update. Signed-off-by: Dmitriy Matrenichev --- pkg/safe/state.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/safe/state.go b/pkg/safe/state.go index 934c5e91..6116cb3e 100644 --- a/pkg/safe/state.go +++ b/pkg/safe/state.go @@ -160,7 +160,7 @@ func watch[T resource.Resource](ctx context.Context, eventCh chan<- WrappedState } // StateWatch is a type safe wrapper around State.Watch. -func StateWatch[T resource.Resource](ctx context.Context, st state.State, ptr resource.Pointer, eventCh chan<- WrappedStateEvent[T], opts ...state.WatchOption) error { +func StateWatch[T resource.Resource](ctx context.Context, st state.CoreState, ptr resource.Pointer, eventCh chan<- WrappedStateEvent[T], opts ...state.WatchOption) error { untypedEventCh := make(chan state.Event) err := st.Watch(ctx, ptr, untypedEventCh, opts...) @@ -181,7 +181,7 @@ func StateWatchFor[T resource.Resource](ctx context.Context, st state.State, ptr } // StateWatchKind is a type safe wrapper around State.WatchKind. -func StateWatchKind[T resource.Resource](ctx context.Context, st state.State, kind resource.Kind, eventCh chan<- WrappedStateEvent[T], opts ...state.WatchKindOption) error { +func StateWatchKind[T resource.Resource](ctx context.Context, st state.CoreState, kind resource.Kind, eventCh chan<- WrappedStateEvent[T], opts ...state.WatchKindOption) error { untypedEventCh := make(chan state.Event) err := st.WatchKind(ctx, kind, untypedEventCh, opts...)