-
Notifications
You must be signed in to change notification settings - Fork 12
feat: Added option for configuring number of retries for http event sender, as well as additional logging #465
Conversation
…ender, as well as additional logging Signed-off-by: Florian Bacher <[email protected]>
@@ -41,16 +41,26 @@ const keptnSpecVersionCEExtension = "shkeptnspecversion" | |||
const triggeredIDCEExtension = "triggeredid" | |||
const keptnGitCommitIDCEExtension = "gitcommitid" | |||
|
|||
type HTTPSenderOption func(httpSender *HTTPEventSender) |
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.
[golint] reported by reviewdog 🐶
exported type HTTPSenderOption should have comment or be unexported
@@ -41,16 +41,26 @@ const keptnSpecVersionCEExtension = "shkeptnspecversion" | |||
const triggeredIDCEExtension = "triggeredid" | |||
const keptnGitCommitIDCEExtension = "gitcommitid" | |||
|
|||
type HTTPSenderOption func(httpSender *HTTPEventSender) | |||
|
|||
func WithSendRetries(retries int) HTTPSenderOption { |
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.
[golint] reported by reviewdog 🐶
exported function WithSendRetries should have comment or be unexported
Signed-off-by: Florian Bacher <[email protected]>
pkg/lib/v0_2_0/events.go
Outdated
} | ||
} | ||
|
||
func WithRetryCallback(cb func()) HTTPSenderOption { |
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.
[golint] reported by reviewdog 🐶
exported function WithRetryCallback should have comment or be unexported
Signed-off-by: Florian Bacher <[email protected]>
Signed-off-by: Florian Bacher <[email protected]>
Signed-off-by: Florian Bacher <[email protected]>
Signed-off-by: Florian Bacher <[email protected]>
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
…ender, as well as additional logging (#465) * feat: Added option for configuring number of retries for http event sender, as well as additional logging Signed-off-by: Florian Bacher <[email protected]> * added option for injecting retry callback Signed-off-by: Florian Bacher <[email protected]> * added option for injecting retry callback Signed-off-by: Florian Bacher <[email protected]> * remove retry callback option Signed-off-by: Florian Bacher <[email protected]> * remove retry callback option unit test Signed-off-by: Florian Bacher <[email protected]> * added comment Signed-off-by: Florian Bacher <[email protected]> (cherry picked from commit 2052e14)
…ender, as well as additional logging (#465) (#467) * feat: Added option for configuring number of retries for http event sender, as well as additional logging Signed-off-by: Florian Bacher <[email protected]> * added option for injecting retry callback Signed-off-by: Florian Bacher <[email protected]> * added option for injecting retry callback Signed-off-by: Florian Bacher <[email protected]> * remove retry callback option Signed-off-by: Florian Bacher <[email protected]> * remove retry callback option unit test Signed-off-by: Florian Bacher <[email protected]> * added comment Signed-off-by: Florian Bacher <[email protected]> (cherry picked from commit 2052e14)
This PR provides an option to configure the number of retries that are performed when trying to send a cloud event. Also, the error message has been adapted to give more insights on why an event could not be sent successfully