Documentation ¶
Index ¶
- Constants
- type ContainerDetails
- type ContainerManager
- func (cm *ContainerManager) Close() error
- func (cm *ContainerManager) IsDockerInstalled() bool
- func (cm *ContainerManager) ListRunningContainer(ctx context.Context) error
- func (cm *ContainerManager) PullRequiredImages(ctx context.Context, requiredImages []string) (bool, error)
- func (cm *ContainerManager) RunContainerInTheBackground(ctx context.Context, image string, hostPort string) (bool, error)
- func (cm *ContainerManager) StopAndRemoveRunningContainers(ctx context.Context) (bool, error)
Constants ¶
View Source
const BundlerNodeBeneficiaryAddressPlaceHolder = "$BENEFICIARY"
View Source
const BundlerNodeEPAddressPlaceHolder = "$ENTRYPOINT_ADDRESS"
View Source
const BundlerNodeMnemonicPlaceHolder = "$MNEMONIC"
View Source
const BundlerNodeWalletDetails = "bundlerNodeWalletDetails"
View Source
const EthNodePortPlaceHolder = "$ETH_PORT"
View Source
const EthNodeReady = "ethNodeReady"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContainerDetails ¶
type ContainerDetails struct { ContainerID string IsRunning bool Cmd []string Env []string ExposedPorts nat.PortSet NodeType string // contains filtered or unexported fields }
ContainerDetails contains details of a container
type ContainerManager ¶
type ContainerManager struct { EthNodePort string CoinbaseKeystoreFile string // contains filtered or unexported fields }
ContainerManager manages containers
func NewContainerManager ¶
func NewContainerManager() (*ContainerManager, error)
NewContainerManager creates a new container manager
func (*ContainerManager) Close ¶
func (cm *ContainerManager) Close() error
Close closes the Docker client
func (*ContainerManager) IsDockerInstalled ¶
func (cm *ContainerManager) IsDockerInstalled() bool
IsDockerInstalled checks if docker is installed
func (*ContainerManager) ListRunningContainer ¶
func (cm *ContainerManager) ListRunningContainer(ctx context.Context) error
ListAllImages lists all images available in the Docker environment
func (*ContainerManager) PullRequiredImages ¶
func (cm *ContainerManager) PullRequiredImages(ctx context.Context, requiredImages []string) (bool, error)
PullRequiredImages checks if required images are available and pulls them if not
func (*ContainerManager) RunContainerInTheBackground ¶
func (cm *ContainerManager) RunContainerInTheBackground(ctx context.Context, image string, hostPort string) (bool, error)
RunContainerInTheBackground runs a Docker container in the background given its image and host port to bind
func (*ContainerManager) StopAndRemoveRunningContainers ¶
func (cm *ContainerManager) StopAndRemoveRunningContainers(ctx context.Context) (bool, error)
StopAndRemoveRunningContainers stops all running containers that are supported
Click to show internal directories.
Click to hide internal directories.