Documentation
¶
Overview ¶
Package docker provides a container-based provider for integration testing. It spawns Docker containers with SSH enabled, allowing realistic bootstrap testing.
Index ¶
- type Config
- type Provider
- func (p *Provider) Close() error
- func (p *Provider) EnsureImage(ctx context.Context) error
- func (p *Provider) List(ctx context.Context) ([]*provider.Node, error)
- func (p *Provider) Name() string
- func (p *Provider) Provision(ctx context.Context, req provider.ProvisionRequest) (*provider.Node, error)
- func (p *Provider) Terminate(ctx context.Context, nodeID string) error
- func (p *Provider) TerminateAll()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// Image is the Docker image to use. Must have SSH server installed.
// Default: "navarch-ssh-test" (built from embedded Dockerfile)
Image string
// SSHPublicKey is the public key to authorize for SSH access.
// If empty, reads from SSHPublicKeyPath.
SSHPublicKey string
// SSHPublicKeyPath is the path to the SSH public key file.
// Default: ~/.ssh/id_rsa.pub
SSHPublicKeyPath string
// Network is the Docker network to attach containers to.
// Default: "bridge"
Network string
// Logger for provider operations.
Logger *slog.Logger
}
Config configures the Docker provider.
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider manages Docker containers as fake GPU nodes.
func (*Provider) EnsureImage ¶
EnsureImage builds or pulls the SSH test image if not present.
func (*Provider) TerminateAll ¶
func (p *Provider) TerminateAll()
TerminateAll stops all containers managed by this provider.
Click to show internal directories.
Click to hide internal directories.