G
G
Golem SDK
Search…
yapapi - Python high-level API
yajsapi - JavaScript high-level API
Yagna Contributor Guide
Powered By GitBook
Class: AgreementsPool
yajsapi / Exports / executor/agreements_pool / AgreementsPool

Class: AgreementsPool

executor/agreements_pool.AgreementsPool

Implements

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new AgreementsPool(emitter)
Parameters
Name
Type
emitter
any
Defined in

Properties

_agreements

Private _agreements: Map
Defined in

_confirmed

Private _confirmed: number = 0
Defined in

_lock

Private _lock: Lock
Defined in

_offer_buffer

Private _offer_buffer: Map
Defined in

_rejecting_providers

Private _rejecting_providers: Set
Defined in

cancellation_token

Optional cancellation_token: default
Defined in

emitter

Private emitter: any
Defined in

Methods

_get_agreement

Private _get_agreement(): Promise
Returns
Promise
Defined in

_set_worker

_set_worker(agreement_id, task): Promise
Parameters
Name
Type
agreement_id
string
task
any
Returns
Promise
Defined in

_terminate_agreement

Private _terminate_agreement(agreement_id, reason): Promise
Parameters
Name
Type
agreement_id
string
reason
object
Returns
Promise
Defined in

add_proposal

add_proposal(score, proposal): Promise
Parameters
Name
Type
score
number
proposal
Returns
Promise
Defined in

cycle

cycle(): Promise
Returns
Promise
Defined in

rejected_last_agreement

rejected_last_agreement(provider_id): boolean
Parameters
Name
Type
provider_id
string
Returns
boolean
Implementation of
ComputationHistory.rejected_last_agreement
Defined in

release_agreement

release_agreement(agreement_id, allow_reuse?): Promise
Parameters
Name
Type
Default value
agreement_id
string
undefined
allow_reuse
boolean
true
Returns
Promise
Defined in

terminate_all

terminate_all(reason): Promise
Parameters
Name
Type
reason
object
Returns
Promise
Defined in

use_agreement

use_agreement(cbk): Promise
Parameters
Name
Type
cbk
any
Returns
Promise
Defined in
Last modified 7d ago