Documentation
¶
Index ¶
Constants ¶
const PostMortemAgentEmail = "agent-postmortem@system.internal"
Variables ¶
This section is empty.
Functions ¶
func DemoDataExists ¶
func DemoDataExists(incidentRepo repository.IncidentRepository) (bool, error)
DemoDataExists returns true if the demo dataset has already been seeded.
func SeedAgents ¶
func SeedAgents(userRepo repository.UserRepository) error
SeedAgents ensures all AI agent user accounts exist in the database. Safe to call on every startup — existing agents are left unchanged.
func SeedDemoData ¶
func SeedDemoData( scheduleRepo repository.ScheduleRepository, escalationRepo repository.EscalationPolicyRepository, routingRepo repository.RoutingRuleRepository, incidentRepo repository.IncidentRepository, timelineRepo repository.TimelineRepository, ) error
SeedDemoData creates a representative dataset so new installs feel populated. Safe to call only when DemoDataExists() returns false.
Types ¶
type AICoordinator ¶
type AICoordinator struct {
// contains filtered or unexported fields
}
AICoordinator subscribes to Redis and routes incident events to agents.
func New ¶
func New(redisClient *redis.Client, postMortemAgent Agent) *AICoordinator
New creates an AICoordinator wired to real Redis and the provided agents.
func NewTestCoordinator ¶
func NewTestCoordinator(postMortemAgent Agent) *AICoordinator
NewTestCoordinator creates an AICoordinator for unit tests (no Redis).
func (*AICoordinator) RoutePayload ¶
func (c *AICoordinator) RoutePayload(ctx context.Context, channel string, payload []byte)
RoutePayload parses a raw event payload and dispatches to the correct agent. Exported for testability (called from Start and unit tests).
func (*AICoordinator) Start ¶
func (c *AICoordinator) Start(ctx context.Context)
Start subscribes to the event stream and blocks until ctx is cancelled. Run this in a goroutine: go coordinator.Start(appCtx)