Class: Activity
activity/activity.Activity
Activity module - an object representing the runtime environment on the provider in accordance with the Package
specification. As part of a given activity, it is possible to execute exe script commands and capture their results.
Table of contents
Constructors
Properties
Accessors
Methods
Constructors
constructor
• new Activity(id
, agreement
, currentState?
, previousState?
, usage
): Activity
Parameters
Name | Type | Default value | Description |
---|---|---|---|
id | string | undefined | The ID of the activity in Yagna |
agreement | Agreement | undefined | The agreement that's related to this activity |
currentState | ActivityStateEnum | ActivityStateEnum.New | The current state as it was obtained from yagna |
previousState | ActivityStateEnum | ActivityStateEnum.Unknown | The previous state (or New if this is the first time we're creating the activity) |
usage | ActivityUsageInfo | undefined | Current resource usage vector information |
Returns
Defined in
Properties
id
• Readonly
id: string
The ID of the activity in Yagna
Defined in
agreement
• Readonly
agreement: Agreement
The agreement that's related to this activity
Defined in
currentState
• Protected
Readonly
currentState: ActivityStateEnum
= ActivityStateEnum.New
The current state as it was obtained from yagna
Defined in
previousState
• Protected
Readonly
previousState: ActivityStateEnum
= ActivityStateEnum.Unknown
The previous state (or New if this is the first time we're creating the activity)
Defined in
usage
• Protected
Readonly
usage: ActivityUsageInfo
Current resource usage vector information
Defined in
Accessors
provider
• get
provider(): ProviderInfo
Returns
Defined in
Methods
getState
▸ getState(): ActivityStateEnum
Returns
Defined in
getPreviousState
▸ getPreviousState(): ActivityStateEnum