-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9d9a6d7
commit 50f3849
Showing
2 changed files
with
157 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,144 @@ | ||
{ | ||
"openrpc": "1.2.6", | ||
"info": { | ||
"title": "Locking Actor", | ||
"version": "0.1.0" | ||
}, | ||
"methods": [ | ||
{ | ||
"name": "lock", | ||
"description": "Lock this Component or a resource of it, such that no other Component may use it.", | ||
"params": [ | ||
{ | ||
"name": "resource", | ||
"schema": { | ||
"type": "string" | ||
}, | ||
"required": false | ||
} | ||
], | ||
"result": { | ||
"name": "result", | ||
"schema": { | ||
"type": "boolean", | ||
"description": "Whether locking succeeded or not." | ||
}, | ||
"required": true | ||
}, | ||
"examples": [ | ||
{ | ||
"name": "Lock the 'channel1' resource of the Component", | ||
"params": [ | ||
{ | ||
"name": "resource", | ||
"value": "channel1" | ||
} | ||
], | ||
"result": { | ||
"name": "result", | ||
"value": true | ||
} | ||
}, | ||
{ | ||
"name": "Lock Component example", | ||
"params": [ | ||
], | ||
"result": { | ||
"name": "result", | ||
"value": true | ||
} | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "unlock", | ||
"description": "Unlock this Component or a resource of it, such that other Component may use it again. Only the locking Component may unlock.", | ||
"params": [ | ||
{ | ||
"name": "resource", | ||
"schema": { | ||
"type": "string" | ||
}, | ||
"required": false | ||
} | ||
], | ||
"result": { | ||
"name": "result", | ||
"schema": { | ||
"type": "boolean", | ||
"description": "Whether unlocking succeeded or not." | ||
}, | ||
"required": true | ||
}, | ||
"examples": [ | ||
{ | ||
"name": "Unock the 'channel1' resource of the Component", | ||
"params": [ | ||
{ | ||
"name": "resource", | ||
"value": "channel1" | ||
} | ||
], | ||
"result": { | ||
"name": "result", | ||
"value": true | ||
} | ||
}, | ||
{ | ||
"name": "Unlock Component example", | ||
"params": [ | ||
], | ||
"result": { | ||
"name": "result", | ||
"value": true | ||
} | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "force_unlock", | ||
"description": "Unock this Component or a resource of it, such that other Component may use it. This may be used even if someone else locked the resource.", | ||
"params": [ | ||
{ | ||
"name": "resource", | ||
"schema": { | ||
"type": "string" | ||
}, | ||
"required": false | ||
} | ||
], | ||
"result": { | ||
"name": "result", | ||
"schema": { | ||
"type": "boolean", | ||
"description": "Whether force unlocking succeeded or not." | ||
}, | ||
"required": true | ||
}, | ||
"examples": [ | ||
{ | ||
"name": "Force unlock the 'channel1' resource of the Component", | ||
"params": [ | ||
{ | ||
"name": "resource", | ||
"value": "channel1" | ||
} | ||
], | ||
"result": { | ||
"name": "result", | ||
"value": true | ||
} | ||
}, | ||
{ | ||
"name": "Force unlock Component example", | ||
"params": [ | ||
], | ||
"result": { | ||
"name": "result", | ||
"value": true | ||
} | ||
} | ||
] | ||
} | ||
] | ||
} |