Skip to content
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

feat: Implement push-based external endpoints #724

Merged
merged 9 commits into from
Apr 9, 2024
Prev Previous commit
Next Next commit
refactor: Use pointers for Alert receivers
  • Loading branch information
TwiN committed Apr 7, 2024

Unverified

The committer email address is not verified.
commit df5248c54592ecfc36039c056b7f70c999660634
6 changes: 3 additions & 3 deletions alerting/alert/alert.go
Original file line number Diff line number Diff line change
@@ -71,7 +71,7 @@ func (alert *Alert) ValidateAndSetDefaults() error {
}

// GetDescription retrieves the description of the alert
func (alert Alert) GetDescription() string {
func (alert *Alert) GetDescription() string {
if alert.Description == nil {
return ""
}
@@ -80,15 +80,15 @@ func (alert Alert) GetDescription() string {

// IsEnabled returns whether an alert is enabled or not
// Returns true if not set
func (alert Alert) IsEnabled() bool {
func (alert *Alert) IsEnabled() bool {
if alert.Enabled == nil {
return true
}
return *alert.Enabled
}

// IsSendingOnResolved returns whether an alert is sending on resolve or not
func (alert Alert) IsSendingOnResolved() bool {
func (alert *Alert) IsSendingOnResolved() bool {
if alert.SendOnResolved == nil {
return false
}