File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -346,9 +346,9 @@ var _ = Describe("controller", func() {
346
346
Expect (err .Error ()).To (Equal ("can not restart a stopped controller, you should create a new one" ))
347
347
})
348
348
349
- It ("should be possible to cancel the controller using NewCancelRunnable " , func () {
349
+ It ("should be possible to cancel the controller using RunnableWithCancel " , func () {
350
350
stoppedChan := make (chan struct {})
351
- cancellableController , cancel := manager .NewCancelRunnable (ctrl )
351
+ cancellableController , cancel := manager .RunnableWithCancel (ctrl )
352
352
353
353
go func () {
354
354
defer close (stoppedChan )
Original file line number Diff line number Diff line change @@ -342,8 +342,8 @@ type LeaderElectionRunnable interface {
342
342
NeedLeaderElection () bool
343
343
}
344
344
345
- // NewCancelRunnable returns a new Runnable and a function to cancel that runnable.
346
- func NewCancelRunnable (r Runnable ) (Runnable , context.CancelFunc ) {
345
+ // RunnableWithCancel returns a new Runnable and a function to cancel that runnable.
346
+ func RunnableWithCancel (r Runnable ) (Runnable , context.CancelFunc ) {
347
347
mu := sync.Mutex {}
348
348
var cancels []func ()
349
349
canceled := false
You can’t perform that action at this time.
0 commit comments