feat(worker)!: add cu_ids to worker create (#82)

* feat(worker): add cu_ids to worker create

* add docs

* add docs
This commit is contained in:
Nick 2024-02-19 18:35:02 +03:00 committed by GitHub
parent f2665b0292
commit 5414624156
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -4,9 +4,13 @@ import PeerId from "./builtin.aqua"
-- Available only on rust peers -- Available only on rust peers
service Worker("worker"): service Worker("worker"):
-- Creates new worker associated with `deal_id`. -- Creates new worker associated with `deal_id` and allows specifying custom `cu_ids`.
-- Throws an error if worker exists. -- Arguments:
create(deal_id: string) -> PeerId -- deal_id - ID of the deal
-- cu_ids an array of target compute unit IDs
-- Returns: PeerId - worker ID if creation was successful
-- Throws an error if a worker exists.
create(deal_id: string, cu_ids: []string) -> PeerId
-- Returns worker peer id associated with `deal_id`. -- Returns worker peer id associated with `deal_id`.
-- Returns nil if worker doesn't exist. -- Returns nil if worker doesn't exist.