-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update
eventbridge
to kernel v0.20.1
- Loading branch information
Showing
13 changed files
with
51 additions
and
16 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# AWS EventBridge Broker | ||
|
||
The sub-module implements swarm broker for AWS EventBridge. See [the library documentation](../../README.md) for details. | ||
|
||
|
||
## Serverless | ||
|
||
|
||
**AWS Event Bridge** has a feature that allows to [match execution of consumer to the pattern](https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/CloudWatchEventsandEventPatterns.html#CloudWatchEventsPatterns) of JSON object. Use it to build reliable matching of incoming events: | ||
|
||
```go | ||
/* | ||
enq <- &swarm.Event[User]{ | ||
Meta: &swarm.Meta{Agent: "swarm:example", Participant: "user"}, | ||
Data: &User{ID: "user", Text: "some text"}, | ||
} | ||
*/ | ||
|
||
stack.NewSink( | ||
&eventbridge.SinkProps{ | ||
Pattern: map[string]interface{}{ | ||
"@type": []string{"[User]"}, | ||
"agent": []string{"[swarm:example]"}, | ||
"participant": []string{"[user]"}, | ||
}, | ||
/* ... */ | ||
}, | ||
) | ||
``` | ||
|
||
|
||
## Limitation | ||
|
||
AWS EventBridge cannot transmit bytes. They have to be enveloped as JSON object. | ||
The library implements automatic encapsulation using built-in `kernel/encoding/CodecPacket`. Use these codec (`WithPacketCodec`) if you automatically source events from EventBridge to SQS. |
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
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
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 |
---|---|---|
|
@@ -8,4 +8,4 @@ | |
|
||
package eventbridge | ||
|
||
const Version = "broker/eventbridge/v0.20.0" | ||
const Version = "broker/eventbridge/v0.20.1" |