Added container_name field to event API
This commit is contained in:
parent
45bae27bd3
commit
141b9f3809
@ -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
|
||||
}
|
||||
|
@ -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")
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user