File size: 425 Bytes
1e92f2d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
package lifecycle

// Pausable is able to indicate if a pause operation is on-going.
//
// It is used in cases to initiate a graceful/safe abort of long-running operations
// when IsPausing returns true.
type Pausable interface {
	IsPausing() bool

	// PauseWait will block until a pause operation begins.
	//
	// It should only be used once, it will not block again
	// once resume is called.
	PauseWait() <-chan struct{}
}