Package dev.galasa.cloud
Interface ICloudContainer
public interface ICloudContainer
Cloud Container
-
Method Summary
Modifier and TypeMethodDescriptiongetContainerExposedPort
(int portNumber) Retrieve the port number for an exposed portgetContainerExposedPort
(String portName) Retrieve the port number for an exposed portgetLog()
Retrieve the stdout/stderr log of the containerretrieveFileAsString
(String path) Retrieve the contents of a file within the containervoid
start()
Start of the container, depending on the provider, this may result in the container being defined and startedvoid
stop()
Stop the container, depending on the provider, this may result in the container being deleted.
-
Method Details
-
getContainerExposedPort
Retrieve the port number for an exposed port- Parameters:
portName
- - The name of the port- Returns:
- the hostname/port
- Throws:
CloudManagerException
-
getContainerExposedPort
Retrieve the port number for an exposed port- Parameters:
portNumber
- - The number of the port- Returns:
- the hostname/port
- Throws:
CloudManagerException
-
getLog
Retrieve the stdout/stderr log of the container- Returns:
- The log
- Throws:
CloudManagerException
-
retrieveFileAsString
Retrieve the contents of a file within the container- Parameters:
path
- - The absolute path of the file- Returns:
- The contents of the file
- Throws:
CloudManagerException
-
stop
Stop the container, depending on the provider, this may result in the container being deleted.- Throws:
CloudManagerException
-
start
Start of the container, depending on the provider, this may result in the container being defined and started- Throws:
CloudManagerException
-
getPlatform
String getPlatform()- Returns:
- The platform the container was provisioned on
-