-
Notifications
You must be signed in to change notification settings - Fork 290
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
006edaa
commit 8466704
Showing
10 changed files
with
93 additions
and
171 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
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 was deleted.
Oops, something went wrong.
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,12 @@ | ||
package notifier | ||
|
||
import ( | ||
"github.com/kubeshop/botkube/internal/health" | ||
"github.com/kubeshop/botkube/pkg/config" | ||
) | ||
|
||
// Platform represents platform notifier | ||
type Platform interface { | ||
GetStatus() health.PlatformStatus | ||
IntegrationName() config.CommPlatformIntegration | ||
} |
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