Proxy that enables a CA to deploy other applications.
- Source:
Extends
Methods
changeImage(id, image) → {string}
- Source:
Changes the docker image of an app.
Parameters:
Name | Type | Description |
---|---|---|
id |
string | An instance identifier. |
image |
string | The new image. |
Returns:
A request identifier.
- Type
- string
createApp(appLocalName, image, isUntrusted, plan, {{cdnType|null}, timestamp, propsopt) → {string}
- Source:
Creates a new app.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
appLocalName |
string | A name for this app that will be qualified by the owner of this CA, i.e., 'owner-appLocalName'. |
|
image |
string | A Docker image containing the app. |
|
isUntrusted |
boolean | Whether it is not a core app, i.e., not trusted by the system. |
|
plan |
string | The strategy for flexing resources. |
|
{{cdnType|null} |
cdn An override for the image CDN settings. |
||
timestamp |
string | null | An optional tag to recover state from a previous service instance. |
|
props |
Object.<string, string> |
<optional> |
An optional object with
application properties to set. Keys need to be valid bash variables,
i.e., alphanumeric or |
Returns:
An id to identify this app instance.
- Type
- string
deleteApp(id, keepData) → {string}
- Source:
Deletes the deployed app.
Parameters:
Name | Type | Description |
---|---|---|
id |
string | An instance identifier. |
keepData |
boolean | Whether to keep the app state. |
Returns:
A request identifier.
- Type
- string
flexApp(id, plan, numberOfCAs) → {string}
- Source:
Changes the number of instances for this app.
Parameters:
Name | Type | Description |
---|---|---|
id |
string | An instance identifier. |
plan |
string | The strategy for flexing resources. |
numberOfCAs |
number | The number of active CAs. |
Returns:
A request identifier.
- Type
- string
restartApp(id) → {string}
- Source:
Restarts the app, using a newer image if available.
Parameters:
Name | Type | Description |
---|---|---|
id |
string | An instance identifier. |
Returns:
A request identifier.
- Type
- string
setHandleReplyMethod(methodName)
- Source:
Sets the name of the method in this CA that will process reply messages.
To ignore replies, just set it to null
.
The type of the method should be async function(requestId, error, data)
where:
requestId
: is an unique identifier to match the request.error
: a deployment error.data
: a deployment response.
Parameters:
Name | Type | Description |
---|---|---|
methodName |
string | null | The name of this CA's method that process reply messages. |
statApps(ids) → {Array.<statType>}
- Source:
Returns the most recent, locally-cached information about a collection of apps.
Parameters:
Name | Type | Description |
---|---|---|
ids |
Array.<string> | An array of app identifiers. |
Returns:
Status info for these apps. null
element
in the array means missing app.
- Type
- Array.<statType>