feat(workers): add activate/deactivate (#65)

This commit is contained in:
Aleksey Proshutinskiy 2023-11-27 20:34:22 +02:00 committed by GitHub
parent e0c0d953f6
commit 401621a389
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -17,3 +17,17 @@ service Worker("worker"):
-- Returns list of all workers. -- Returns list of all workers.
list() -> []PeerId list() -> []PeerId
-- Restarts worker installation spell.
-- Can be called only by system spells or peer manager,
-- Throws an error if worker doesn't exist.
activate(deal_id: string)
-- Stops all worker spells and drops all incoming particles until activation.
-- Can be called only by system spells or peer manager,
-- Throws an error if worker doesn't exist.
deactivate(deal_id: string)
-- Returns true if worker is active.
-- Throws an error if worker doesn't exist.
is_active(deal_id: string) -> bool