diff --git a/events.go b/events.go index 5814cad..82fc3ee 100644 --- a/events.go +++ b/events.go @@ -62,6 +62,8 @@ const ( EventIDDeploymentStepFailed // EventIDAppTerminated is the event listener ID for the corresponding event. EventIDAppTerminated + // EventPodDeleted is the event listener ID for the corresponding event. + EventIdPodDeleted //EventIDApplications comprises all listener IDs for application events. EventIDApplications = EventIDStatusUpdate | EventIDChangedHealthCheck | EventIDFailedHealthCheck | EventIDAppTerminated //EventIDSubscriptions comprises all listener IDs for subscription events. @@ -93,6 +95,7 @@ func init() { "deployment_step_success": EventIDDeploymentStepSuccess, "deployment_step_failure": EventIDDeploymentStepFailed, "app_terminated_event": EventIDAppTerminated, + "pod_deleted_event": EventIdPodDeleted, } } @@ -149,6 +152,14 @@ type EventAppTerminated struct { AppID string `json:"appId"` } +// EventPodDeleted describes an 'app_terminated_event' event. +type EventPodDeleted struct { + EventType string `json:"eventType"` + Timestamp string `json:"timestamp,omitempty"` + ClientIP string `json:"clientIp"` + URI string `json:"uri"` +} + /* --- Framework Message --- */ // EventFrameworkMessage describes a 'framework_message_event' event. @@ -358,6 +369,8 @@ func GetEvent(eventType string) (*Event, error) { event.Event = new(EventDeploymentStepFailure) case "app_terminated_event": event.Event = new(EventAppTerminated) + case "pod_deleted_event": + event.Event = new(EventPodDeleted) } return event, nil }