Documentation ¶ Index ¶ type Sleeper func NewSleeper() Sleeper Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type Sleeper ¶ type Sleeper interface { // Wakeup wakeup the sleeper Wakeup() // Sleep sleep duration time unless wakeup // NOTE: can not sleep multiple times Sleep(duration time.Duration) } Sleeper not concurrency safe func NewSleeper ¶ func NewSleeper() Sleeper Source Files ¶ View all Source files sleepter.go Click to show internal directories. Click to hide internal directories.