JS API Reference

Module: market/strategy

Table of contents

Type Aliases

Functions

Type Aliases

PriceLimits

Ƭ PriceLimits: Object

Type declaration

NameType
startnumber
cpuPerSecnumber
envPerSecnumber

Defined in

src/market/strategy.ts:30

Functions

acceptAll

acceptAll(): () => boolean

Default Proposal filter that accept all proposal coming from the market

Returns

fn

▸ (): boolean

Returns

boolean

Defined in

src/market/strategy.ts:4


disallowProvidersById

disallowProvidersById(providerIds): (proposal: OfferProposal) => boolean

Proposal filter blocking every offer coming from a provider whose id is in the array

Parameters

NameType
providerIdsstring[]

Returns

fn

▸ (proposal): boolean

Parameters
NameType
proposalOfferProposal
Returns

boolean

Defined in

src/market/strategy.ts:7


disallowProvidersByName

disallowProvidersByName(providerNames): (proposal: OfferProposal) => boolean

Proposal filter blocking every offer coming from a provider whose name is in the array

Parameters

NameType
providerNamesstring[]

Returns

fn

▸ (proposal): boolean

Parameters
NameType
proposalOfferProposal
Returns

boolean

Defined in

src/market/strategy.ts:11


disallowProvidersByNameRegex

disallowProvidersByNameRegex(regexp): (proposal: OfferProposal) => boolean

Proposal filter blocking every offer coming from a provider whose name match to the regexp

Parameters

NameType
regexpRegExp

Returns

fn

▸ (proposal): boolean

Parameters
NameType
proposalOfferProposal
Returns

boolean

Defined in

src/market/strategy.ts:15


allowProvidersById

allowProvidersById(providerIds): (proposal: OfferProposal) => boolean

Proposal filter that only allows offers from a provider whose id is in the array

Parameters

NameType
providerIdsstring[]

Returns

fn

▸ (proposal): boolean

Parameters
NameType
proposalOfferProposal
Returns

boolean

Defined in

src/market/strategy.ts:19


allowProvidersByName

allowProvidersByName(providerNames): (proposal: OfferProposal) => boolean

Proposal filter that only allows offers from a provider whose name is in the array

Parameters

NameType
providerNamesstring[]

Returns

fn

▸ (proposal): boolean

Parameters
NameType
proposalOfferProposal
Returns

boolean

Defined in

src/market/strategy.ts:23


allowProvidersByNameRegex

allowProvidersByNameRegex(regexp): (proposal: OfferProposal) => boolean

Proposal filter that only allows offers from a provider whose name match to the regexp

Parameters

NameType
regexpRegExp

Returns

fn

▸ (proposal): boolean

Parameters
NameType
proposalOfferProposal
Returns

boolean

Defined in

src/market/strategy.ts:27


limitPriceFilter

limitPriceFilter(priceLimits): (proposal: OfferProposal) => boolean

Proposal filter only allowing offers that do not exceed the defined usage

Parameters

NameType
priceLimitsPriceLimits

Returns

fn

▸ (proposal): boolean

Parameters
NameType
proposalOfferProposal
Returns

boolean

Defined in

src/market/strategy.ts:43

Was this helpful?