Module: market/strategy
Table of contents
Type Aliases
Functions
- acceptAll
- disallowProvidersById
- disallowProvidersByName
- disallowProvidersByNameRegex
- allowProvidersById
- allowProvidersByName
- allowProvidersByNameRegex
- limitPriceFilter
Type Aliases
PriceLimits
Ƭ PriceLimits: Object
Type declaration
Name | Type |
---|---|
start | number |
cpuPerSec | number |
envPerSec | number |
Defined in
Functions
acceptAll
▸ acceptAll(): () => boolean
Default Proposal filter that accept all proposal coming from the market
Returns
fn
▸ (): boolean
Returns
boolean
Defined in
disallowProvidersById
▸ disallowProvidersById(providerIds
): (proposal
: Proposal
) => boolean
Proposal filter blocking every offer coming from a provider whose id is in the array
Parameters
Name | Type |
---|---|
providerIds | string [] |
Returns
fn
▸ (proposal
): boolean
Parameters
Name | Type |
---|---|
proposal | Proposal |
Returns
boolean
Defined in
disallowProvidersByName
▸ disallowProvidersByName(providerNames
): (proposal
: Proposal
) => boolean
Proposal filter blocking every offer coming from a provider whose name is in the array
Parameters
Name | Type |
---|---|
providerNames | string [] |
Returns
fn
▸ (proposal
): boolean
Parameters
Name | Type |
---|---|
proposal | Proposal |
Returns
boolean
Defined in
disallowProvidersByNameRegex
▸ disallowProvidersByNameRegex(regexp
): (proposal
: Proposal
) => boolean
Proposal filter blocking every offer coming from a provider whose name match to the regexp
Parameters
Name | Type |
---|---|
regexp | RegExp |
Returns
fn
▸ (proposal
): boolean
Parameters
Name | Type |
---|---|
proposal | Proposal |
Returns
boolean
Defined in
allowProvidersById
▸ allowProvidersById(providerIds
): (proposal
: Proposal
) => boolean
Proposal filter that only allows offers from a provider whose id is in the array
Parameters
Name | Type |
---|---|
providerIds | string [] |
Returns
fn
▸ (proposal
): boolean
Parameters
Name | Type |
---|---|
proposal | Proposal |
Returns
boolean
Defined in
allowProvidersByName
▸ allowProvidersByName(providerNames
): (proposal
: Proposal
) => boolean
Proposal filter that only allows offers from a provider whose name is in the array
Parameters
Name | Type |
---|---|
providerNames | string [] |
Returns
fn
▸ (proposal
): boolean
Parameters
Name | Type |
---|---|
proposal | Proposal |
Returns
boolean
Defined in
allowProvidersByNameRegex
▸ allowProvidersByNameRegex(regexp
): (proposal
: Proposal
) => boolean
Proposal filter that only allows offers from a provider whose name match to the regexp
Parameters
Name | Type |
---|---|
regexp | RegExp |
Returns
fn
▸ (proposal
): boolean
Parameters
Name | Type |
---|---|
proposal | Proposal |
Returns
boolean
Defined in
limitPriceFilter
▸ limitPriceFilter(priceLimits
): (proposal
: Proposal
) => boolean
Proposal filter only allowing offers that do not exceed the defined usage
Parameters
Name | Type |
---|---|
priceLimits | PriceLimits |
Returns
fn
▸ (proposal
): boolean
Parameters
Name | Type |
---|---|
proposal | Proposal |
Returns
boolean