Documentation ¶
Index ¶
Constants ¶
View Source
const ( ModeServer = "server" ModeClient = "client" DefaultIOTimeout = 1 * time.Second )
Variables ¶
Functions ¶
func AttemptRepeatedly ¶
func AttemptRepeatedly(name string, attempt AttemptFunc) int
AttemptRepeatedly runs attempt until it returns true or more than Attempts were executed. Between two attempts at least RetryTimeout time has to pass. Returns 0 on success, 1 on failure.
Types ¶
type AttemptFunc ¶
AttemptFunc attempts a request repeatedly, receives the attempt number
Click to show internal directories.
Click to hide internal directories.