Skip to content

Commit

Permalink
chore: replace State with CoreState in StateWatch and safe.StateWatch…
Browse files Browse the repository at this point in the history
…Kind

Somehow I missed those during the last update.

Signed-off-by: Dmitriy Matrenichev <[email protected]>
  • Loading branch information
DmitriyMV committed Oct 30, 2023
1 parent c6658ca commit c4ad980
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/safe/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -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...)
Expand All @@ -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...)
Expand Down

0 comments on commit c4ad980

Please sign in to comment.