-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Senderwrapper #436
Merged
Merged
Senderwrapper #436
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
86f03d6
updated sender wrapper to remove interface and factory and use fx ins…
maurafortino aa19bde
added back in comments that were deleted when senderwrapperfactory wa…
maurafortino bcdf00c
Merge branch 'denopink/feat/rewrite' into senderwrapper
maurafortino dfaf61d
updated senderWrapper metrics
maurafortino e19e6f6
updated the caduceus outbound sender
maurafortino 12cc863
replaced handlerModule and senderWrapper module with provide funcs - …
maurafortino 234c7de
gokit is no longer imported directly
maurafortino File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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,56 @@ | ||
package main | ||
|
||
import "time" | ||
|
||
//This is a stub for the ancla listener. This will be removed once we can add ancla back into caduceus | ||
|
||
type ListenerStub struct { | ||
PartnerIds []string | ||
Webhook Webhook | ||
} | ||
|
||
type Webhook struct { | ||
// Address is the subscription request origin HTTP Address. | ||
Address string `json:"registered_from_address"` | ||
|
||
// Config contains data to inform how events are delivered. | ||
Config DeliveryConfig `json:"config"` | ||
|
||
// FailureURL is the URL used to notify subscribers when they've been cut off due to event overflow. | ||
// Optional, set to "" to disable notifications. | ||
FailureURL string `json:"failure_url"` | ||
|
||
// Events is the list of regular expressions to match an event type against. | ||
Events []string `json:"events"` | ||
|
||
// Matcher type contains values to match against the metadata. | ||
Matcher MetadataMatcherConfig `json:"matcher,omitempty"` | ||
|
||
// Duration describes how long the subscription lasts once added. | ||
Duration time.Duration `json:"duration"` | ||
|
||
// Until describes the time this subscription expires. | ||
Until time.Time `json:"until"` | ||
} | ||
|
||
// DeliveryConfig is a Webhook substructure with data related to event delivery. | ||
type DeliveryConfig struct { | ||
// URL is the HTTP URL to deliver messages to. | ||
URL string `json:"url"` | ||
|
||
// ContentType is content type value to set WRP messages to (unless already specified in the WRP). | ||
ContentType string `json:"content_type"` | ||
|
||
// Secret is the string value for the SHA1 HMAC. | ||
// (Optional, set to "" to disable behavior). | ||
Secret string `json:"secret,omitempty"` | ||
|
||
// AlternativeURLs is a list of explicit URLs that should be round robin through on failure cases to the main URL. | ||
AlternativeURLs []string `json:"alt_urls,omitempty"` | ||
} | ||
|
||
// MetadataMatcherConfig is Webhook substructure with config to match event metadata. | ||
type MetadataMatcherConfig struct { | ||
// DeviceID is the list of regular expressions to match device id type against. | ||
DeviceID []string `json:"device_id"` | ||
} |
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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice!