-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
move docs to reactr repo, add deprecation warnings, fix links (#283)
* move docs to reactr repo, add deprecation warnings, fix links * update readme * add deprecation warnings and fix links (again) * fix typo * change intra-GitHub links to relative links * chore: Rename .runnable.yamls to .module.yaml * empty commit to trigger CI * Revert "chore: Rename .runnable.yamls to .module.yaml" This reverts commit d7262d8. * fix link * fix link fr fr * fix another link Co-authored-by: Jagger De Leo <jagger@suborbital.dev>
- Loading branch information
1 parent
9aea8b5
commit 8616f35
Showing
4 changed files
with
384 additions
and
24 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,17 @@ | ||
## Reactr has been deprecated. You can use the new [scheduler](https://github.com/suborbital/e2core/tree/main/scheduler) and [engine](https://github.com/suborbital/sat/tree/vmain/engine) packages, which are a drop-in replacements for this project. | ||
|
||
# Reactr ➕ Grav | ||
|
||
Reactr is designed to integrate with the other [Suborbital](https://suborbital.dev) projects such as [Grav](https://github.com/suborbital/grav). Grav is a decentralized message bus which allows for your application code to communicate in a scalable, resilient way. | ||
|
||
## Handle Messages | ||
Reactr can respond to messages by connecting to a `grav.Pod` using `HandleMsg`: | ||
```go | ||
reactr := rt.New() | ||
g := grav.New() | ||
|
||
reactr.HandleMsg(g.Connect(), msgTypeLogin, &loginEmailRunner{}) | ||
``` | ||
Whenever a message with the given type is received from the bus, a `Job` will be queued to be handled by the provided Runnable. The `Job` will contain the message data. | ||
|
||
The result returned by the Runnable's `Run` function may be a `grav.Message`. If so, it will be sent back out over the message bus. Anything else will be put into a message (by converting it into bytes) and sent back over the bus. If `Run` returns an error, a message with type `reactr.runerr` will be sent. If `Run` returns `nil, nil`, then a message of type `reactr.nil` will be sent. All messages sent will be a reply to the message that triggered the job. |
Oops, something went wrong.