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

acceptAllProposalFilter

acceptAllProposalFilter(): () => Promise<boolean>

Default Proposal filter that accept all proposal coming from the market

Returns

fn

▸ (): Promise<boolean>

Returns

Promise<boolean>

Defined in

src/market/strategy.ts:4


blackListProposalIdsFilter

blackListProposalIdsFilter(blackListIds): (proposal: Proposal) => Promise<boolean>

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

Parameters

NameType
blackListIdsstring[]

Returns

fn

▸ (proposal): Promise<boolean>

Parameters
NameType
proposalProposal
Returns

Promise<boolean>

Defined in

src/market/strategy.ts:7


blackListProposalNamesFilter

blackListProposalNamesFilter(blackListNames): (proposal: Proposal) => Promise<boolean>

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

Parameters

NameType
blackListNamesstring[]

Returns

fn

▸ (proposal): Promise<boolean>

Parameters
NameType
proposalProposal
Returns

Promise<boolean>

Defined in

src/market/strategy.ts:11


blackListProposalRegexpFilter

blackListProposalRegexpFilter(regexp): (proposal: Proposal) => Promise<boolean>

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

Parameters

NameType
regexpRegExp

Returns

fn

▸ (proposal): Promise<boolean>

Parameters
NameType
proposalProposal
Returns

Promise<boolean>

Defined in

src/market/strategy.ts:15


whiteListProposalIdsFilter

whiteListProposalIdsFilter(whiteListIds): (proposal: Proposal) => Promise<boolean>

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

Parameters

NameType
whiteListIdsstring[]

Returns

fn

▸ (proposal): Promise<boolean>

Parameters
NameType
proposalProposal
Returns

Promise<boolean>

Defined in

src/market/strategy.ts:19


whiteListProposalNamesFilter

whiteListProposalNamesFilter(whiteListNames): (proposal: Proposal) => Promise<boolean>

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

Parameters

NameType
whiteListNamesstring[]

Returns

fn

▸ (proposal): Promise<boolean>

Parameters
NameType
proposalProposal
Returns

Promise<boolean>

Defined in

src/market/strategy.ts:23


whiteListProposalRegexpFilter

whiteListProposalRegexpFilter(regexp): (proposal: Proposal) => Promise<boolean>

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

Parameters

NameType
regexpRegExp

Returns

fn

▸ (proposal): Promise<boolean>

Parameters
NameType
proposalProposal
Returns

Promise<boolean>

Defined in

src/market/strategy.ts:27


limitPriceFilter

limitPriceFilter(priceLimits): (proposal: Proposal) => Promise<boolean>

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

Parameters

NameType
priceLimitsPriceLimits

Returns

fn

▸ (proposal): Promise<boolean>

Parameters
NameType
proposalProposal
Returns

Promise<boolean>

Defined in

src/market/strategy.ts:43