G
G
Golem SDK
Search
K

Class: Executor

yajsapi / Exports / executor / Executor

Class: Executor

executor.Executor
Task executor
description Used to run tasks using the specified application package within providers' execution units.

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new Executor(__namedParameters)
Create new executor
Parameters
Name
Type
__namedParameters
Defined in

Properties

_active_computations

Private _active_computations: any
Defined in

_activity_api

Private _activity_api: any
Defined in

_api_config

Private _api_config: any
Defined in

_budget_allocations

Private _budget_allocations: Allocation[]
Defined in

_budget_amount

Private _budget_amount: any
Defined in

_cancellation_token

Private _cancellation_token: default
Defined in

_chan_computation_done

Private _chan_computation_done: any
Defined in

_conf

Private _conf: any
Defined in

_driver

Private _driver: any
Defined in

_expires

Private _expires: any
Defined in

_market_api

Private _market_api: any
Defined in

_network

Private _network: any
Defined in

_payment_api

Private _payment_api: any
Defined in

_stack

Private _stack: any
Defined in

_strategy

Private _strategy: any
Defined in

_stream_output

Private _stream_output: any
Defined in

_subnet

Private _subnet: any
Defined in

_task_package

Private _task_package: any
Defined in

_wrapped_consumer

Private _wrapped_consumer: any
Defined in

state

Private Optional state: SubmissionState
Defined in

Methods

_create_allocations

_create_allocations(): Promise
Returns
Promise
Defined in

_get_allocation

_get_allocation(item): Allocation
Parameters
Name
Type
item
Returns
Defined in

_get_common_payment_platforms

_get_common_payment_platforms(proposal): string[]
Parameters
Name
Type
proposal
Returns
string[]
Defined in

_handle_proposal

_handle_proposal(state, proposal): Promise<ProposalEvent>
Parameters
Name
Type
state
proposal
Returns
Promise<ProposalEvent>
Defined in

_submit

_submit(worker, data): AsyncGenerator<Task<"D", "R">, any, unknown>
Parameters
Name
Type
worker
default<[WorkContext, AsyncIterable<Task<"D", "R">>], AsyncGenerator>
data
Iterable<Task<"D", "R">>
Returns
AsyncGenerator<Task<"D", "R">, any, unknown>
Defined in

done

done(): Promise
Returns
Promise
Defined in

find_offers

find_offers(state, emit): Promise
Parameters
Name
Type
state
emit
default<[YaEvent], void>
Returns
Promise
Defined in

find_offers_for_subscription

find_offers_for_subscription(state, subscription, emit): Promise
Parameters
Name
Type
state
subscription
emit
default<[YaEvent], void>
Returns
Promise
Defined in

ready

ready(): Promise<Executor>
Returns
Promise<Executor>
Defined in

submit

submit(worker, data): AsyncGenerator<Task<"D", "R">, any, unknown>
Submit a computation to be executed on providers.
Parameters
Name
Type
Description
worker
default<[WorkContext, AsyncIterable<Task<"D", "R">>], AsyncGenerator>
a callable that takes a WorkContext object and a list o tasks, adds commands to the context object and yields committed commands
data
Iterable<Task<"D", "R">>
an iterator of Task objects to be computed on providers
Returns
AsyncGenerator<Task<"D", "R">, any, unknown>
yields computation progress events
Defined in