Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
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
type AlertProvider ¶
AlertProvider interface remains the same
type OnCallProvider ¶ added in v1.3.0
type OnCallProvider interface {
TriggerOnCall(ctx context.Context, incidentID string, cfg *config.OnCallConfig) 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