Implement various suggestions

+ Fix Docblocks
+ Remove unused variable from deleteRuntime in executor
+ Added build status explanation to description
+ Sync composer.phtml to composer.json
This commit is contained in:
Bradley Schofield
2022-02-24 14:18:46 +00:00
parent 55a4bf3dcc
commit b1acc028c9
6 changed files with 59 additions and 26 deletions
+44 -2
View File
@@ -31,6 +31,25 @@ class Executor
$this->endpoint = $endpoint;
}
/**
* Create runtime
*
* Launches a runtime container for a deployment ready for execution
*
* @param string $functionId
* @param string $deploymentId
* @param string $projectId
* @param string $source
* @param string $runtime
* @param string $baseImage
* @param bool $remove
* @param string $entrypoint
* @param string $workdir
* @param string $destinaction
* @param string $network
* @param array $vars
* @param array $commands
*/
public function createRuntime(
string $functionId,
string $deploymentId,
@@ -75,7 +94,15 @@ class Executor
return $response['body'];
}
public function deleteRuntime(string $projectId, string $functionId, string $deploymentId)
/**
* Delete Runtime
*
* Deletes a runtime and cleans up any containers remaining.
*
* @param string $projectId
* @param string $deploymentId
*/
public function deleteRuntime(string $projectId, string $deploymentId)
{
$runtimeId = "$projectId-$deploymentId";
$route = "/runtimes/$runtimeId";
@@ -96,6 +123,22 @@ class Executor
return $response['body'];
}
/**
* Create an execution
*
* @param string $projectId
* @param string $functionId
* @param string $deploymentId
* @param string $path
* @param array $vars
* @param string $entrypoint
* @param string $data
* @param string runtime
* @param string $baseImage
* @param int $timeout
*
* @return array
*/
public function createExecution(
string $projectId,
string $functionId,
@@ -108,7 +151,6 @@ class Executor
string $baseImage,
$timeout
) {
$route = "/execution";
$headers = [
'content-type' => 'application/json',