Class: ActivityApiAdapter
shared/yagna/adapters/activity-api-adapter.ActivityApiAdapter
Represents a set of use cases related to managing the lifetime of an activity
Implements
Table of contents
Constructors
Methods
- getActivity
- createActivity
- destroyActivity
- getActivityState
- executeScript
- getExecBatchResults
- getExecBatchEvents
Constructors
constructor
• new ActivityApiAdapter(state
, control
, exec
, activityRepo
): ActivityApiAdapter
Parameters
Name | Type |
---|---|
state | RequestorStateService |
control | RequestorControlService |
exec | YagnaExeScriptObserver |
activityRepo | IActivityRepository |
Returns
Defined in
src/shared/yagna/adapters/activity-api-adapter.ts:12
Methods
getActivity
▸ getActivity(id
): Promise
<Activity
>
Parameters
Name | Type |
---|---|
id | string |
Returns
Promise
<Activity
>
Implementation of
Defined in
src/shared/yagna/adapters/activity-api-adapter.ts:19
createActivity
▸ createActivity(agreement
): Promise
<Activity
>
Parameters
Name | Type |
---|---|
agreement | Agreement |
Returns
Promise
<Activity
>
Implementation of
Defined in
src/shared/yagna/adapters/activity-api-adapter.ts:23
destroyActivity
▸ destroyActivity(activity
): Promise
<Activity
>
Parameters
Name | Type |
---|---|
activity | Activity |
Returns
Promise
<Activity
>
Implementation of
Defined in
src/shared/yagna/adapters/activity-api-adapter.ts:47
getActivityState
▸ getActivityState(id
): Promise
<ActivityStateEnum
>
Parameters
Name | Type |
---|---|
id | string |
Returns
Promise
<ActivityStateEnum
>
Implementation of
Defined in
src/shared/yagna/adapters/activity-api-adapter.ts:63
executeScript
▸ executeScript(activity
, script
): Promise
<string
>
Parameters
Name | Type |
---|---|
activity | Activity |
script | ExeScriptRequest |
Returns
Promise
<string
>
Implementation of
Defined in
src/shared/yagna/adapters/activity-api-adapter.ts:67
getExecBatchResults
▸ getExecBatchResults(activity
, batchId
, commandIndex?
, timeout?
): Promise
<Result
<any
>[]>
Parameters
Name | Type |
---|---|
activity | Activity |
batchId | string |
commandIndex? | number |
timeout? | number |
Returns
Promise
<Result
<any
>[]>
Implementation of
IActivityApi.getExecBatchResults
Defined in
src/shared/yagna/adapters/activity-api-adapter.ts:82
getExecBatchEvents
▸ getExecBatchEvents(activity
, batchId
): Observable
<StreamingBatchEvent
>
Parameters
Name | Type |
---|---|
activity | Activity |
batchId | string |
Returns
Observable
<StreamingBatchEvent
>
Implementation of
IActivityApi.getExecBatchEvents