docker

package
v0.11.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 24, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultTimeout   = 16 * time.Second
	PoolRetryTimeout = 2 * time.Minute

	DefaultAPIKey = "itest-api-key"
)

Variables

This section is empty.

Functions

func WithIPv6Disabled added in v0.11.0

func WithIPv6Disabled(conf *dc.CreateNetworkOptions)

Types

type Docker

type Docker struct {
	// contains filtered or unexported fields
}

func NewDocker

func NewDocker(suiteName string) (*Docker, error)

NewDocker creates a new Docker handler for a given suite name. It removes any existing containers or networks for the suite and creates a new suite network.

func (*Docker) Finish added in v0.10.1

func (d *Docker) Finish(cancel context.CancelFunc)

func (*Docker) GoNode added in v0.11.0

func (d *Docker) GoNode() *NodeContainer

func (*Docker) ScalaNode added in v0.11.0

func (d *Docker) ScalaNode() *NodeContainer

func (*Docker) StartGoNode added in v0.11.0

func (d *Docker) StartGoNode(ctx context.Context, cfg config.DockerConfigurator) error

StartGoNode starts a Go node container with the given configuration.

func (*Docker) StartNodes added in v0.11.0

func (d *Docker) StartNodes(ctx context.Context, goCfg, scalaCfg config.DockerConfigurator) error

StartNodes start both Go and Scala nodes with the given configurations. Note that while starting nodes in parallel it is impossible to retrieve the IP address of the other node in prior. So this method is heavily dependent on Docker DNS resolution and Go-node's domain name should be passed to the configuration of Scala node before calling this method:

scalaConfigurator.WithGoNode("go-node")

func (*Docker) StartScalaNode added in v0.11.0

func (d *Docker) StartScalaNode(ctx context.Context, cfg config.DockerConfigurator) error

StartScalaNode starts a Scala node container with the given configuration.

type NodeContainer added in v0.11.0

type NodeContainer struct {
	// contains filtered or unexported fields
}

func (*NodeContainer) Close added in v0.11.0

func (c *NodeContainer) Close() error

Close purges container and closes log files.

func (*NodeContainer) ContainerNetworkIP added in v0.11.0

func (c *NodeContainer) ContainerNetworkIP() string

func (*NodeContainer) IP added in v0.11.0

func (c *NodeContainer) IP() string

IP returns the IP address of the container in the Docker network. This is the address that can be used to connect to the container from other containers in the same network. This address should be used only for PeerInfo creation, not for REST API or gRPC connections.

func (*NodeContainer) Ports added in v0.11.0

func (c *NodeContainer) Ports() *PortConfig

func (*NodeContainer) RestAPIURL added in v0.11.0

func (c *NodeContainer) RestAPIURL() string

type PortConfig added in v0.10.2

type PortConfig struct {
	RESTAPIPort string
	GRPCPort    string
	BindPort    string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL