Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CallOnce ¶
func CallOnce(f func()) func()
CallOnce function decorator returns new function which can be called only once and is thread safe
func HardKiller ¶
func HardKiller(kill Killer) func()
HardKiller invokes provided kill method and forces process to exit
func SoftKiller ¶
func SoftKiller(kill Killer) func()
SoftKiller invokes killer and gives a chance for process to cleanup itself
Types ¶
type SettableClock ¶
type SettableClock struct {
// contains filtered or unexported fields
}
SettableClock allows settings and getting time, which is convenient for testing
func (*SettableClock) AddTime ¶
func (clock *SettableClock) AddTime(duration time.Duration)
AddTime adds given duration to current clock time
func (*SettableClock) GetTime ¶
func (clock *SettableClock) GetTime() time.Time
GetTime returns set time
func (*SettableClock) SetTime ¶
func (clock *SettableClock) SetTime(time time.Time)
SetTime sets time to be returned from GetTime
Click to show internal directories.
Click to hide internal directories.