implemented gitops controller + drift detection
This commit is contained in:
@@ -79,6 +79,29 @@ type LogChunkEvent struct {
|
||||
Content string `json:"content"`
|
||||
}
|
||||
|
||||
// DeploymentEvent is published on deployment lifecycle transitions.
|
||||
// It matches the payload shape used by EnvironmentHandler.publishDeployEvent.
|
||||
type DeploymentEvent struct {
|
||||
DeploymentID int64 `json:"deploymentId"`
|
||||
EnvID int64 `json:"envId"`
|
||||
EnvName string `json:"envName"`
|
||||
RepoID int64 `json:"repoId"`
|
||||
SHA string `json:"sha"`
|
||||
Ref string `json:"ref"`
|
||||
Status string `json:"status"`
|
||||
TriggeredBy string `json:"triggeredBy"`
|
||||
}
|
||||
|
||||
// DriftEvent is published when an environment's actual state diverges from desired.
|
||||
type DriftEvent struct {
|
||||
EnvID int64 `json:"envId"`
|
||||
EnvName string `json:"envName"`
|
||||
RepoID int64 `json:"repoId"`
|
||||
DesiredSHA string `json:"desiredSha"`
|
||||
ActualSHA string `json:"actualSha"`
|
||||
At time.Time `json:"at"`
|
||||
}
|
||||
|
||||
// WSEnvelope wraps any event for delivery over the WebSocket connection.
|
||||
type WSEnvelope struct {
|
||||
Subject string `json:"subject"`
|
||||
|
||||
Reference in New Issue
Block a user