Documentation
¶
Index ¶
- Constants
- func WithIPv6Disabled(conf *dc.CreateNetworkOptions)
- type Docker
- func (d *Docker) Finish(cancel context.CancelFunc)
- func (d *Docker) GoNode() *NodeContainer
- func (d *Docker) ScalaNode() *NodeContainer
- func (d *Docker) StartGoNode(ctx context.Context, cfg config.DockerConfigurator) error
- func (d *Docker) StartNodes(ctx context.Context, goCfg, scalaCfg config.DockerConfigurator) error
- func (d *Docker) StartScalaNode(ctx context.Context, cfg config.DockerConfigurator) error
- type NodeContainer
- type PortConfig
Constants ¶
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 ¶
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
StartGoNode starts a Go node container with the given configuration.
func (*Docker) StartNodes ¶ added in v0.11.0
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
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