Skip to content

Commit b1507b9

Browse files
committed
SQUASH: provider Watch(ctx)
Signed-off-by: Dr. Stefan Schimanski <[email protected]>
1 parent 8f9e244 commit b1507b9

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

examples/fleet/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ func (k *KindClusterProvider) List(ctx context.Context) ([]string, error) {
126126
return res, nil
127127
}
128128

129-
func (k *KindClusterProvider) Watch() (cluster.Watcher, error) {
129+
func (k *KindClusterProvider) Watch(_ context.Context) (cluster.Watcher, error) {
130130
return &KindWatcher{ch: make(chan cluster.WatchEvent)}, nil
131131
}
132132

pkg/builder/controller_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -851,7 +851,7 @@ func (f *fakeClusterProvider) List(ctx context.Context) ([]string, error) {
851851
return f.clusterNameList, f.listErr
852852
}
853853

854-
func (f *fakeClusterProvider) Watch() (cluster.Watcher, error) {
854+
func (f *fakeClusterProvider) Watch(ctx context.Context) (cluster.Watcher, error) {
855855
return &fakeLogicalWatcher{ch: f.watch}, nil
856856
}
857857

pkg/cluster/provider.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ type Provider interface {
2727

2828
// Watch returns a Watcher that watches for changes to a list of known clusters
2929
// and react to potential changes.
30-
Watch() (Watcher, error)
30+
Watch(ctx context.Context) (Watcher, error)
3131
}
3232

3333
// Watcher watches for changes to clusters and provides events to a channel

pkg/manager/internal.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -612,7 +612,7 @@ func (cm *controllerManager) Start(ctx context.Context) (err error) { //nolint:g
612612
}
613613

614614
// Create a watcher and start watching for changes.
615-
watcher, err := cm.clusterProvider.Watch()
615+
watcher, err := cm.clusterProvider.Watch(ctx)
616616
if err != nil {
617617
return err
618618
}

pkg/manager/manager_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2031,7 +2031,7 @@ func (f *fakeClusterAdapter) List(ctx context.Context) ([]string, error) {
20312031
return f.clusterNameList, f.listErr
20322032
}
20332033

2034-
func (f *fakeClusterAdapter) Watch() (cluster.Watcher, error) {
2034+
func (f *fakeClusterAdapter) Watch(ctx context.Context) (cluster.Watcher, error) {
20352035
return &fakeLogicalClusterProvider{ch: f.watch}, nil
20362036
}
20372037

0 commit comments

Comments
 (0)