Module: agreement/strategy
Table of contents
Functions
Functions
randomAgreementSelector
▸ randomAgreementSelector(): (candidates
: AgreementCandidate
[]) => Promise
<AgreementCandidate
>
Default selector that selects a random provider from the pool
Returns
fn
▸ (candidates
): Promise
<AgreementCandidate
>
Parameters
Name | Type |
---|---|
candidates | AgreementCandidate [] |
Returns
Promise
<AgreementCandidate
>
Defined in
randomAgreementSelectorWithPriorityForExistingOnes
▸ randomAgreementSelectorWithPriorityForExistingOnes(): (candidates
: AgreementCandidate
[]) => Promise
<AgreementCandidate
>
Selector selecting a random provider from the pool, but giving priority to those who already have a confirmed agreement and deployed activity
Returns
fn
▸ (candidates
): Promise
<AgreementCandidate
>
Parameters
Name | Type |
---|---|
candidates | AgreementCandidate [] |
Returns
Promise
<AgreementCandidate
>
Defined in
bestAgreementSelector
▸ bestAgreementSelector(scores
): (candidates
: AgreementCandidate
[]) => Promise
<AgreementCandidate
>
Selector selecting the provider according to the provided list of scores
Parameters
Name | Type |
---|---|
scores | Object |
Returns
fn
▸ (candidates
): Promise
<AgreementCandidate
>
Parameters
Name | Type |
---|---|
candidates | AgreementCandidate [] |
Returns
Promise
<AgreementCandidate
>