Documentation
¶
Index ¶
- func AddNetworkAlias(req *testcontainers.GenericContainerRequest, network, alias string)
- func GetAliasForNetwork(ctx context.Context, req testcontainers.GenericContainerRequest, ...) (string, error)
- func GetHostAndPort(ctx context.Context, c testcontainers.Container, exposedPort nat.Port) (host string, port nat.Port, err error)
- func GetLogs(ctx context.Context, c testcontainers.Container) (string, error)
- func NewTestingLogger(logger LoggerWithLog) *testcontainers.LogConsumer
- type Container
- type LoggerWithLog
- type Shutdownable
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddNetworkAlias ¶
func AddNetworkAlias(req *testcontainers.GenericContainerRequest, network, alias string)
AddNetworkAlias adds a network alias to a generic container request
func GetAliasForNetwork ¶
func GetAliasForNetwork(ctx context.Context, req testcontainers.GenericContainerRequest, network string) (string, error)
GetAliasForNetwork retrieves the container alias in the specified network
func GetHostAndPort ¶
func GetHostAndPort(ctx context.Context, c testcontainers.Container, exposedPort nat.Port) (host string, port nat.Port, err error)
GetHostAndPort retrieves the container host and port
func NewTestingLogger ¶ added in v0.0.8
func NewTestingLogger(logger LoggerWithLog) *testcontainers.LogConsumer
Types ¶
type Container ¶ added in v0.0.17
type Container interface {
Shutdownable
GetLogs(context.Context) (string, error)
HostAndPort(context.Context) (string, nat.Port, error)
}
Container represents a container
type LoggerWithLog ¶ added in v0.0.8
type LoggerWithLog interface {
Log(v ...interface{})
}
type Shutdownable ¶ added in v0.0.10
Shutdownable represents something that can be shut down
Click to show internal directories.
Click to hide internal directories.