- Add operation event store schema and migrations - Implement event persistence in storage layer - Update event domain models for outbox pattern - Add contract notes for control plane event flow - Complete milestone documentation
31 lines
891 B
Go
31 lines
891 B
Go
package events
|
|
|
|
import "time"
|
|
|
|
type Event struct {
|
|
ID string
|
|
Type string
|
|
Subject string
|
|
// Payload is stored as a JSON object in the durable outbox.
|
|
Payload []byte
|
|
CreatedAt time.Time
|
|
}
|
|
|
|
const (
|
|
RepoChanged = "repo.changed"
|
|
BranchUpdated = "branch.updated"
|
|
WorkspaceLeased = "workspace.leased"
|
|
WorkspaceReleased = "workspace.released"
|
|
WorkspaceDirty = "workspace.dirty"
|
|
OperationStarted = "operation.started"
|
|
OperationCompleted = "operation.completed"
|
|
OperationFailed = "operation.failed"
|
|
AgentRunStarted = "agent.run.started"
|
|
AgentRunCompleted = "agent.run.completed"
|
|
ChangeRequestOpened = "change_request.opened"
|
|
ChangeRequestUpdated = "change_request.updated"
|
|
ChangeRequestMerged = "change_request.merged"
|
|
ProviderWebhook = "provider.webhook.received"
|
|
)
|
|
|
|
const PayloadEncodingJSON = "application/json"
|