Documentation
¶
Index ¶
- Constants
- type ActiveMQContainer
- func (a *ActiveMQContainer) GetBrokerURL() string
- func (a *ActiveMQContainer) GetCredentials() (string, string)
- func (a *ActiveMQContainer) GetJMXPort() (string, error)
- func (a *ActiveMQContainer) GetTCPBrokerURL() string
- func (a *ActiveMQContainer) GetWebConsoleURL() string
- func (a *ActiveMQContainer) HealthCheck() error
- func (a *ActiveMQContainer) Start(ctx context.Context) error
- type Config
- type Container
- func (c *Container) Cleanup(ctx context.Context) error
- func (c *Container) Errorf(format string, args ...interface{})
- func (c *Container) Exec(ctx context.Context, cmd []string) (string, error)
- func (c *Container) GetID() string
- func (c *Container) GetPort(port string) (string, error)
- func (c *Container) Infof(format string, args ...interface{})
- func (c *Container) IsRunning(ctx context.Context) (bool, error)
- func (c *Container) Logs(ctx context.Context, follow bool) (io.ReadCloser, error)
- func (c *Container) PrintLogsOnFailure(ctx context.Context, reason string)
- func (c *Container) Start(ctx context.Context) error
- func (c *Container) Stop(ctx context.Context) error
- type ContainerInfo
- type ExecResult
- type Manager
- type Mount
- type SQLServerContainer
- type WaitStrategy
Constants ¶
const (
DefaultTimeout = 5 * time.Minute
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActiveMQContainer ¶
type ActiveMQContainer struct {
*Container
// contains filtered or unexported fields
}
ActiveMQContainer provides specialized ActiveMQ container management
func NewActiveMQ ¶
func NewActiveMQ(name, username, password string, reuse bool) (*ActiveMQContainer, error)
NewActiveMQ creates a new ActiveMQ container
func (*ActiveMQContainer) GetBrokerURL ¶
func (a *ActiveMQContainer) GetBrokerURL() string
GetBrokerURL returns the broker URL for client connections
func (*ActiveMQContainer) GetCredentials ¶
func (a *ActiveMQContainer) GetCredentials() (string, string)
GetCredentials returns the username and password
func (*ActiveMQContainer) GetJMXPort ¶
func (a *ActiveMQContainer) GetJMXPort() (string, error)
GetJMXPort returns the JMX monitoring port
func (*ActiveMQContainer) GetTCPBrokerURL ¶
func (a *ActiveMQContainer) GetTCPBrokerURL() string
GetTCPBrokerURL returns the TCP broker URL for OpenWire connections
func (*ActiveMQContainer) GetWebConsoleURL ¶
func (a *ActiveMQContainer) GetWebConsoleURL() string
GetWebConsoleURL returns the web console URL
func (*ActiveMQContainer) HealthCheck ¶
func (a *ActiveMQContainer) HealthCheck() error
HealthCheck performs a comprehensive health check
type Config ¶
type Config struct {
Image string
Name string
Ports map[string]string // container_port:host_port
Env []string
Mounts []Mount
WaitStrategy WaitStrategy
Reuse bool
}
Config holds container configuration
type Container ¶
Container manages Docker containers with transparent reuse
func (*Container) PrintLogsOnFailure ¶
PrintLogsOnFailure prints container logs when startup fails
type ContainerInfo ¶
ContainerInfo holds information about an existing container
type ExecResult ¶
ExecResult holds the result of a container execution
type Manager ¶
type Manager interface {
Start(ctx context.Context) error
Stop(ctx context.Context) error
Logs(ctx context.Context, follow bool) (io.ReadCloser, error)
Exec(ctx context.Context, cmd []string) (string, error)
IsRunning(ctx context.Context) (bool, error)
GetPort(port string) (string, error)
GetID() string
Cleanup(ctx context.Context) error
}
Manager provides container management capabilities
type Mount ¶
type Mount struct {
Source string // Host path or volume name
Target string // Container path
Type string // "bind" or "volume"
ReadOnly bool
}
Mount represents a volume mount
type SQLServerContainer ¶
type SQLServerContainer struct {
*Container
// contains filtered or unexported fields
}
SQLServerContainer provides specialized SQL Server container management
func NewSQLServer ¶
func NewSQLServer(name, password string, reuse bool) (*SQLServerContainer, error)
NewSQLServer creates a new SQL Server container
func (*SQLServerContainer) GetConnectionString ¶
func (s *SQLServerContainer) GetConnectionString() string
GetConnectionString returns the JDBC connection string
func (*SQLServerContainer) HealthCheck ¶
func (s *SQLServerContainer) HealthCheck() error
HealthCheck performs a comprehensive health check
type WaitStrategy ¶
WaitStrategy defines how to wait for container readiness