8 func waitCheck(ctx context.Context, timeout time.Duration, check func(ctx context.Context) error) error {
9 ctx, _ = context.WithTimeout(ctx, timeout)
11 for err = check(ctx); err != nil && ctx.Err() == nil; err = check(ctx) {
12 time.Sleep(time.Second)