Skip to content

Commit

Permalink
add pod_delete_events
Browse files Browse the repository at this point in the history
  • Loading branch information
harryge00 committed Dec 31, 2018
1 parent 680747d commit 1933fbe
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions events.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -93,6 +95,7 @@ func init() {
"deployment_step_success": EventIDDeploymentStepSuccess,
"deployment_step_failure": EventIDDeploymentStepFailed,
"app_terminated_event": EventIDAppTerminated,
"pod_deleted_event": EventIdPodDeleted,
}
}

Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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
}
Expand Down

0 comments on commit 1933fbe

Please sign in to comment.