-
Notifications
You must be signed in to change notification settings - Fork 291
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* MOD healthChecker notifiers settings MOD extend bots and sinks with errorMsg * MOD Update report heartbeat mutation by sending also health status * MOD unify notificationKey * FIX lint * FIX CR
- Loading branch information
1 parent
af46051
commit 70803a4
Showing
18 changed files
with
234 additions
and
141 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,27 @@ | ||
package health | ||
|
||
// Failed represents failed platform. | ||
type Failed struct { | ||
status PlatformStatusMsg | ||
failureReason FailureReasonMsg | ||
errorMsg string | ||
} | ||
|
||
// NewFailed creates a new Failed instance. | ||
func NewFailed(failureReason FailureReasonMsg, errorMsg string) *Failed { | ||
return &Failed{ | ||
status: StatusUnHealthy, | ||
failureReason: failureReason, | ||
errorMsg: errorMsg, | ||
} | ||
} | ||
|
||
// GetStatus gets bot status. | ||
func (b *Failed) GetStatus() PlatformStatus { | ||
return PlatformStatus{ | ||
Status: b.status, | ||
Restarts: "0/0", | ||
Reason: b.failureReason, | ||
ErrorMsg: b.errorMsg, | ||
} | ||
} |
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
Oops, something went wrong.