yajsapi / Exports / executor/agreements_pool / AgreementsPool
executor/agreements_pool.AgreementsPool
- _get_agreement
- _set_worker
- _terminate_agreement
- add_proposal
- cycle
- rejected_last_agreement
- release_agreement
- terminate_all
- use_agreement
• new AgreementsPool(emitter
)
Parameters
Name | Type |
---|---|
emitter |
any |
Defined in
yajsapi/executor/agreements_pool.ts:38
• Private
_agreements: Map
Defined in
yajsapi/executor/agreements_pool.ts:34
• Private
_confirmed: number
= 0
Defined in
yajsapi/executor/agreements_pool.ts:37
• Private
_lock: Lock
Defined in
yajsapi/executor/agreements_pool.ts:35
• Private
_offer_buffer: Map
Defined in
yajsapi/executor/agreements_pool.ts:33
• Private
_rejecting_providers: Set
Defined in
yajsapi/executor/agreements_pool.ts:36
• Optional
cancellation_token: default
Defined in
yajsapi/executor/agreements_pool.ts:38
• Private
emitter: any
Defined in
yajsapi/executor/agreements_pool.ts:32
▸ Private
_get_agreement(): Promise
Returns
Promise
Defined in
yajsapi/executor/agreements_pool.ts:75
▸ _set_worker(agreement_id
, task
): Promise
Parameters
Name | Type |
---|---|
agreement_id |
string |
task |
any |
Returns
Promise
Defined in
yajsapi/executor/agreements_pool.ts:69
▸ Private
_terminate_agreement(agreement_id
, reason
): Promise
Parameters
Name | Type |
---|---|
agreement_id |
string |
reason |
object |
Returns
Promise
Defined in
yajsapi/executor/agreements_pool.ts:156
▸ add_proposal(score
, proposal
): Promise
Parameters
Name | Type |
---|---|
score |
number |
proposal |
OfferProposal |
Returns
Promise
Defined in
yajsapi/executor/agreements_pool.ts:53
▸ cycle(): Promise
Returns
Promise
Defined in
yajsapi/executor/agreements_pool.ts:42
▸ rejected_last_agreement(provider_id
): boolean
Parameters
Name | Type |
---|---|
provider_id |
string |
Returns
boolean
Implementation of
ComputationHistory.rejected_last_agreement
Defined in
yajsapi/executor/agreements_pool.ts:187
▸ release_agreement(agreement_id
, allow_reuse?
): Promise
Parameters
Name | Type | Default value |
---|---|---|
agreement_id |
string |
undefined |
allow_reuse |
boolean |
true |
Returns
Promise
Defined in
yajsapi/executor/agreements_pool.ts:144
▸ terminate_all(reason
): Promise
Parameters
Name | Type |
---|---|
reason |
object |
Returns
Promise
Defined in
yajsapi/executor/agreements_pool.ts:180
▸ use_agreement(cbk
): Promise
Parameters
Name | Type |
---|---|
cbk |
any |
Returns
Promise
Defined in