This repository has been archived on 2023-08-14. You can view files and clone it, but cannot push or open issues or pull requests.
dex/vendor/github.com/testcontainers/testcontainers-go/wait/wait.go

25 lines
479 B
Go
Raw Normal View History

2020-01-31 09:32:00 +00:00
package wait
import (
"context"
"io"
"time"
"github.com/docker/go-connections/nat"
)
type Strategy interface {
WaitUntilReady(context.Context, StrategyTarget) error
}
type StrategyTarget interface {
Host(context.Context) (string, error)
MappedPort(context.Context, nat.Port) (nat.Port, error)
Logs(context.Context) (io.ReadCloser, error)
Exec(ctx context.Context, cmd []string) (int, error)
}
func defaultStartupTimeout() time.Duration {
return 60 * time.Second
}