Versions in this module Expand all Collapse all v0 v0.12.1 Feb 13, 2022 Changes in this version + func ForSQL(port nat.Port, driver string, url func(nat.Port) string) *waitForSql + type ExecStrategy struct + ExitCodeMatcher func(exitCode int) bool + PollInterval time.Duration + func ForExec(cmd []string) *ExecStrategy + func NewExecStrategy(cmd []string) *ExecStrategy + func (ws *ExecStrategy) WithExitCodeMatcher(exitCodeMatcher func(exitCode int) bool) *ExecStrategy + func (ws *ExecStrategy) WithPollInterval(pollInterval time.Duration) *ExecStrategy + func (ws *ExecStrategy) WithStartupTimeout(startupTimeout time.Duration) *ExecStrategy + func (ws ExecStrategy) WaitUntilReady(ctx context.Context, target StrategyTarget) error + type ExitStrategy struct + PollInterval time.Duration + func ForExit() *ExitStrategy + func NewExitStrategy() *ExitStrategy + func (ws *ExitStrategy) WaitUntilReady(ctx context.Context, target StrategyTarget) (err error) + func (ws *ExitStrategy) WithExitTimeout(exitTimeout time.Duration) *ExitStrategy + func (ws *ExitStrategy) WithPollInterval(pollInterval time.Duration) *ExitStrategy + type HTTPStrategy struct + AllowInsecure bool + Body io.Reader + Method string + Path string + PollInterval time.Duration + Port nat.Port + ResponseMatcher func(body io.Reader) bool + StatusCodeMatcher func(status int) bool + TLSConfig *tls.Config + UseTLS bool + func ForHTTP(path string) *HTTPStrategy + func NewHTTPStrategy(path string) *HTTPStrategy + func (ws *HTTPStrategy) WaitUntilReady(ctx context.Context, target StrategyTarget) (err error) + func (ws *HTTPStrategy) WithAllowInsecure(allowInsecure bool) *HTTPStrategy + func (ws *HTTPStrategy) WithBody(reqdata io.Reader) *HTTPStrategy + func (ws *HTTPStrategy) WithMethod(method string) *HTTPStrategy + func (ws *HTTPStrategy) WithPollInterval(pollInterval time.Duration) *HTTPStrategy + func (ws *HTTPStrategy) WithPort(port nat.Port) *HTTPStrategy + func (ws *HTTPStrategy) WithResponseMatcher(matcher func(body io.Reader) bool) *HTTPStrategy + func (ws *HTTPStrategy) WithStartupTimeout(startupTimeout time.Duration) *HTTPStrategy + func (ws *HTTPStrategy) WithStatusCodeMatcher(statusCodeMatcher func(status int) bool) *HTTPStrategy + func (ws *HTTPStrategy) WithTLS(useTLS bool, tlsconf ...*tls.Config) *HTTPStrategy + type HealthStrategy struct + PollInterval time.Duration + func ForHealthCheck() *HealthStrategy + func NewHealthStrategy() *HealthStrategy + func (ws *HealthStrategy) WaitUntilReady(ctx context.Context, target StrategyTarget) (err error) + func (ws *HealthStrategy) WithPollInterval(pollInterval time.Duration) *HealthStrategy + func (ws *HealthStrategy) WithStartupTimeout(startupTimeout time.Duration) *HealthStrategy + type HostPortStrategy struct + Port nat.Port + func ForListeningPort(port nat.Port) *HostPortStrategy + func NewHostPortStrategy(port nat.Port) *HostPortStrategy + func (hp *HostPortStrategy) WaitUntilReady(ctx context.Context, target StrategyTarget) (err error) + func (hp *HostPortStrategy) WithStartupTimeout(startupTimeout time.Duration) *HostPortStrategy + type LogStrategy struct + Log string + Occurrence int + PollInterval time.Duration + func ForLog(log string) *LogStrategy + func NewLogStrategy(log string) *LogStrategy + func (ws *LogStrategy) WaitUntilReady(ctx context.Context, target StrategyTarget) (err error) + func (ws *LogStrategy) WithOccurrence(o int) *LogStrategy + func (ws *LogStrategy) WithPollInterval(pollInterval time.Duration) *LogStrategy + func (ws *LogStrategy) WithStartupTimeout(startupTimeout time.Duration) *LogStrategy + type MultiStrategy struct + Strategies []Strategy + func ForAll(strategies ...Strategy) *MultiStrategy + func (ms *MultiStrategy) WaitUntilReady(ctx context.Context, target StrategyTarget) (err error) + func (ms *MultiStrategy) WithStartupTimeout(startupTimeout time.Duration) *MultiStrategy + type Strategy interface + WaitUntilReady func(context.Context, StrategyTarget) error + type StrategyTarget interface + Exec func(ctx context.Context, cmd []string) (int, error) + Host func(context.Context) (string, error) + Logs func(context.Context) (io.ReadCloser, error) + MappedPort func(context.Context, nat.Port) (nat.Port, error) + State func(context.Context) (*types.ContainerState, error)