-
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
Showing
14 changed files
with
766 additions
and
296 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
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 |
---|---|---|
@@ -1,16 +1,27 @@ | ||
/* | ||
package trigger monitor the condition on when to fire a task | ||
there are 3 trigger types: | ||
Task Engine handles task storage and execution. We use badgerdb for all of our task storage. We like to make sure of Go cross compiling extensively and want to leverage pure-go as much as possible. badgerdb sastify that requirement. | ||
Interval: Repeated at certain interval | ||
Cron: trigger on time on cron | ||
Onchain Event: when an event is emiited from a contract | ||
Ev | ||
**Wallet Info** | ||
# Storage Layout | ||
w:<eoa>:<smart-wallet-address> = {factory_address: address, salt: salt} | ||
Task is store into 2 storage | ||
t:a:<task-id>: the raw json of task data | ||
u:<task-id>: the task status | ||
**Task Storage** | ||
w:<eoa>:<smart-wallet-address> -> {factory, salt} | ||
t:<task-status>:<task-id> -> task payload, the source of truth of task information | ||
u:<eoa>:<smart-wallet-address>:<task-id> -> task status | ||
h:<smart-wallet-address>:<task-id>:<execution-id> -> an execution history | ||
The task storage was designed for fast retrieve time at the cost of extra storage. | ||
The storage can also be easily back-up, sync due to simplicity of supported write operation. | ||
**Data console** | ||
Storage can also be inspect with telnet: | ||
telnet /tmp/ap.sock | ||
Then issue `get <ket>` or `list <prefix>` or `list *` to inspect current keys in the storage. | ||
*/ | ||
package taskengine |
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 @@ | ||
package taskengine |
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
Oops, something went wrong.