Help us shape the future of Go! Take the 2026 Go Developer Survey

core

package
v1.3.4 Latest Latest
Warning

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

Go to latest
Published: May 6, 2025 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CreateOnCallProvider func(cfg *config.Config, awsClient *ssmincidents.Client) (OnCallProvider, error)

Function that will be implemented in the common package to avoid circular imports

Functions

func InitOnCallWorkflow

func InitOnCallWorkflow(awsClient *ssmincidents.Client, redisClient *redis.Client)

InitOnCallWorkflow initializes the global singleton instance This is called once from main.go with the Redis client and AWS client

Types

type Alert

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

func NewAlert

func NewAlert(providers ...AlertProvider) *Alert

func (*Alert) SendAlert

func (a *Alert) SendAlert(incident *m.Incident) error

type AlertProvider

type AlertProvider interface {
	SendAlert(incident *m.Incident) error
}

AlertProvider interface remains the same

type OnCallProvider added in v1.3.0

type OnCallProvider interface {
	TriggerOnCall(ctx context.Context, incidentID string) error
}

OnCallProvider defines the interface for on-call notification providers

type OnCallWorkflow

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

OnCallWorkflow coordinates on-call escalation with a single provider

func GetOnCallWorkflow

func GetOnCallWorkflow() *OnCallWorkflow

GetOnCallWorkflow returns the global singleton instance This maintains compatibility with existing code

func NewOnCallWorkflow added in v1.3.0

func NewOnCallWorkflow(redisClient *redis.Client, provider OnCallProvider) *OnCallWorkflow

NewOnCallWorkflow creates a new on-call workflow with the given provider

func (*OnCallWorkflow) Ack

func (w *OnCallWorkflow) Ack(incidentID string) error

Ack acknowledges an incident to prevent escalation

func (*OnCallWorkflow) Start

func (w *OnCallWorkflow) Start(incidentID string, oc config.OnCallConfig) error

Start initiates the on-call workflow for an incident

type QueueListener

type QueueListener interface {
	StartListening(handler func(content *map[string]interface{}) error) error
}

Jump to

Keyboard shortcuts

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