Merge pull request #653 from kateknister/apiBranch
Added container_name field to event API
This commit is contained in:
commit
259f7465df
@ -241,6 +241,10 @@ func getEventRequest(r *http.Request) (*events.Request, bool, error) {
|
|||||||
query.EndTime = newTime
|
query.EndTime = newTime
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if val, ok := urlMap["container_name"]; ok {
|
||||||
|
containerName := strings.Trim(val[0], " /")
|
||||||
|
query.ContainerName = "/" + containerName
|
||||||
|
}
|
||||||
|
|
||||||
return query, stream, nil
|
return query, stream, nil
|
||||||
}
|
}
|
||||||
|
@ -61,5 +61,5 @@ func streamingClientExample(url string) {
|
|||||||
func main() {
|
func main() {
|
||||||
flag.Parse()
|
flag.Parse()
|
||||||
staticClientExample()
|
staticClientExample()
|
||||||
streamingClientExample("?creation_events=true&stream=true")
|
streamingClientExample("?creation_events=true&stream=true&oom_events=true&deletion_events=true")
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user