alerts

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2026 License: AGPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Input

type Input struct {
	Kind      string
	Severity  string
	DedupeKey string
	Message   string
	Details   any
}

type Service

type Service struct {
	App core.App
	Now func() time.Time

	WebhookURL    string
	WebhookSecret string
	HTTPClient    *http.Client
	Logger        *slog.Logger
	// contains filtered or unexported fields
}

func NewService

func NewService(app core.App) *Service

func (*Service) CheckCapacity

func (s *Service) CheckCapacity(snapshot payments.CapacitySnapshot) error

func (*Service) CheckConnector

func (s *Service) CheckConnector(status gmessages.Status) error

func (*Service) CheckWebhookExhaustion

func (s *Service) CheckWebhookExhaustion() error

func (*Service) ConfigureWebhook

func (s *Service) ConfigureWebhook(url, secret string)

func (*Service) NotificationsEnabled

func (s *Service) NotificationsEnabled() bool

func (*Service) Open

func (s *Service) Open(input Input) (string, bool, error)

func (*Service) OpenCount

func (s *Service) OpenCount() (int64, error)

func (*Service) Resolve

func (s *Service) Resolve(dedupeKey string) error

func (*Service) Run

func (s *Service) Run(ctx context.Context)

func (*Service) SendPending

func (s *Service) SendPending(ctx context.Context) (int, error)

func (*Service) Wake

func (s *Service) Wake()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL