Module: market/strategy
Table of contents
Type Aliases
Functions
- acceptAllProposalFilter
- blackListProposalIdsFilter
- blackListProposalNamesFilter
- blackListProposalRegexpFilter
- whiteListProposalIdsFilter
- whiteListProposalNamesFilter
- whiteListProposalRegexpFilter
- limitPriceFilter
Type Aliases
PriceLimits
Ƭ PriceLimits: Object
Type declaration
Name | Type |
---|---|
start | number |
cpuPerSec | number |
envPerSec | number |
Defined in
Functions
acceptAllProposalFilter
▸ acceptAllProposalFilter(): () => Promise
<boolean
>
Default Proposal filter that accept all proposal coming from the market
Returns
fn
▸ (): Promise
<boolean
>
Returns
Promise
<boolean
>
Defined in
blackListProposalIdsFilter
▸ blackListProposalIdsFilter(blackListIds
): (proposal
: Proposal
) => Promise
<boolean
>
Proposal filter blocking every offer coming from a provider whose id is in the array
Parameters
Name | Type |
---|---|
blackListIds | string [] |
Returns
fn
▸ (proposal
): Promise
<boolean
>
Parameters
Name | Type |
---|---|
proposal | Proposal |
Returns
Promise
<boolean
>
Defined in
blackListProposalNamesFilter
▸ blackListProposalNamesFilter(blackListNames
): (proposal
: Proposal
) => Promise
<boolean
>
Proposal filter blocking every offer coming from a provider whose name is in the array
Parameters
Name | Type |
---|---|
blackListNames | string [] |
Returns
fn
▸ (proposal
): Promise
<boolean
>
Parameters
Name | Type |
---|---|
proposal | Proposal |
Returns
Promise
<boolean
>
Defined in
blackListProposalRegexpFilter
▸ blackListProposalRegexpFilter(regexp
): (proposal
: Proposal
) => Promise
<boolean
>
Proposal filter blocking every offer coming from a provider whose name match to the regexp
Parameters
Name | Type |
---|---|
regexp | RegExp |
Returns
fn
▸ (proposal
): Promise
<boolean
>
Parameters
Name | Type |
---|---|
proposal | Proposal |
Returns
Promise
<boolean
>
Defined in
whiteListProposalIdsFilter
▸ whiteListProposalIdsFilter(whiteListIds
): (proposal
: Proposal
) => Promise
<boolean
>
Proposal filter that only allows offers from a provider whose id is in the array
Parameters
Name | Type |
---|---|
whiteListIds | string [] |
Returns
fn
▸ (proposal
): Promise
<boolean
>
Parameters
Name | Type |
---|---|
proposal | Proposal |
Returns
Promise
<boolean
>
Defined in
whiteListProposalNamesFilter
▸ whiteListProposalNamesFilter(whiteListNames
): (proposal
: Proposal
) => Promise
<boolean
>
Proposal filter that only allows offers from a provider whose name is in the array
Parameters
Name | Type |
---|---|
whiteListNames | string [] |
Returns
fn
▸ (proposal
): Promise
<boolean
>
Parameters
Name | Type |
---|---|
proposal | Proposal |
Returns
Promise
<boolean
>
Defined in
whiteListProposalRegexpFilter
▸ whiteListProposalRegexpFilter(regexp
): (proposal
: Proposal
) => Promise
<boolean
>
Proposal filter that only allows offers from a provider whose name match to the regexp
Parameters
Name | Type |
---|---|
regexp | RegExp |
Returns
fn
▸ (proposal
): Promise
<boolean
>
Parameters
Name | Type |
---|---|
proposal | Proposal |
Returns
Promise
<boolean
>
Defined in
limitPriceFilter
▸ limitPriceFilter(priceLimits
): (proposal
: Proposal
) => Promise
<boolean
>
Proposal filter only allowing offers that do not exceed the defined usage
Parameters
Name | Type |
---|---|
priceLimits | PriceLimits |
Returns
fn
▸ (proposal
): Promise
<boolean
>
Parameters
Name | Type |
---|---|
proposal | Proposal |
Returns
Promise
<boolean
>