Added container_name field to event API

This commit is contained in:
Katie Knister 2015-04-15 16:51:10 -07:00
parent 45bae27bd3
commit 141b9f3809
2 changed files with 5 additions and 1 deletions

View File

@ -241,6 +241,10 @@ func getEventRequest(r *http.Request) (*events.Request, bool, error) {
query.EndTime = newTime
}
}
if val, ok := urlMap["container_name"]; ok {
containerName := strings.Trim(val[0], " /")
query.ContainerName = "/" + containerName
}
return query, stream, nil
}

View File

@ -61,5 +61,5 @@ func streamingClientExample(url string) {
func main() {
flag.Parse()
staticClientExample()
streamingClientExample("?creation_events=true&stream=true")
streamingClientExample("?creation_events=true&stream=true&oom_events=true&deletion_events=true")
}