alert

package
v0.1.0-alpha.10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 14, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AlertMockServer

type AlertMockServer struct {
	// contains filtered or unexported fields
}

func NewAlertMockServer

func NewAlertMockServer() *AlertMockServer

func (*AlertMockServer) GetAlerts

func (s *AlertMockServer) GetAlerts() []AlertRequest

func (*AlertMockServer) GetAlertsForDestination

func (s *AlertMockServer) GetAlertsForDestination(destinationID string) []AlertRequest

Helper methods for assertions

func (*AlertMockServer) GetCallbackURL

func (s *AlertMockServer) GetCallbackURL() string

func (*AlertMockServer) GetLastAlert

func (s *AlertMockServer) GetLastAlert() *AlertRequest

func (*AlertMockServer) Reset

func (s *AlertMockServer) Reset()

func (*AlertMockServer) Start

func (s *AlertMockServer) Start() error

func (*AlertMockServer) Stop

func (s *AlertMockServer) Stop() error

type AlertPayload

type AlertPayload struct {
	Topic     string                 `json:"topic"`
	Timestamp time.Time              `json:"timestamp"`
	Data      ConsecutiveFailureData `json:"data"`
}

type AlertRequest

type AlertRequest struct {
	Alert      AlertPayload
	AuthHeader string
}

type ConsecutiveFailureData

type ConsecutiveFailureData struct {
	MaxConsecutiveFailures int                    `json:"max_consecutive_failures"`
	ConsecutiveFailures    int                    `json:"consecutive_failures"`
	WillDisable            bool                   `json:"will_disable"`
	Destination            *models.Destination    `json:"destination"`
	Data                   map[string]interface{} `json:"data"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳