mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
feat: sync branches
This commit is contained in:
@@ -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 $deploymentId,
|
||||
string $projectId,
|
||||
@@ -74,6 +93,14 @@ class Executor
|
||||
return $response['body'];
|
||||
}
|
||||
|
||||
/**
|
||||
* 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";
|
||||
@@ -95,6 +122,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 $deploymentId,
|
||||
@@ -106,7 +149,6 @@ class Executor
|
||||
string $baseImage,
|
||||
$timeout
|
||||
) {
|
||||
|
||||
$route = "/execution";
|
||||
$headers = [
|
||||
'content-type' => 'application/json',
|
||||
|
||||
Reference in New Issue
Block a user