Documentation
¶
Index ¶
Constants ¶
View Source
const ( RetryAttempts = 4 RetryDelay = 2 * time.Second )
Variables ¶
This section is empty.
Functions ¶
func TryWithAttempts ¶
TryWithAttempts tries to get non-error result of calling function f with delay.
func TryWithAttemptsCtx ¶
func TryWithAttemptsCtx(ctx context.Context, f func(context.Context) error, attempts uint, delay time.Duration) (err error)
TryWithAttemptsCtx is helper function that calls TryWithAttempts with function f transformed to closure that does not require ctx as necessary argument.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewTest ¶
NewTest prepares test client.
If error occurred while creating connection then test will be skipped. Second argument cleanup function to close connection and rollback all changes.
Click to show internal directories.
Click to hide internal directories.