Documentation
¶
Index ¶
Constants ¶
View Source
const DefaultWaitDuration = 60 * time.Second
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PostMortemAgent ¶
type PostMortemAgent struct {
// contains filtered or unexported fields
}
PostMortemAgent auto-drafts a post-mortem when an incident resolves.
func NewPostMortemAgent ¶
func NewPostMortemAgent(deps PostMortemAgentDeps) *PostMortemAgent
NewPostMortemAgent creates a PostMortemAgent. WaitDuration == 0 means skip the wait entirely (test/no-wait mode). Production code passes DefaultWaitDuration explicitly.
type PostMortemAgentDeps ¶
type PostMortemAgentDeps struct {
AgentUserID uuid.UUID
AISvc interface{ IsEnabled() bool }
IncidentRepo interface {
GetByID(uuid.UUID) (*models.Incident, error)
}
PostMortemSvc interface {
GetPostMortem(uuid.UUID) (*models.PostMortem, error)
GeneratePostMortem(*models.Incident, *uuid.UUID, string) (*models.PostMortem, error)
}
TimelineRepo repository.TimelineRepository // nil in tests
SlackSvc services.ChatService // nil if not configured
TeamsSvc interface {
PostToConversation(conversationID string, msg services.Message) (string, error)
}
MultiChat services.ChatService // for DM to commander; nil if not configured
UserRepo repository.UserRepository // for commander lookup; nil in tests
FrontendURL string
WaitDuration time.Duration
}
PostMortemAgentDeps holds all dependencies for the Post-Mortem Agent. WaitDuration is configurable so tests can set it to 0 (skip the wait). Production callers pass DefaultWaitDuration explicitly.
Click to show internal directories.
Click to hide internal directories.