mirror of
https://github.com/docker/compose.git
synced 2026-02-09 10:09:26 +08:00
feat: add since & until flags to events command
Signed-off-by: MohammadHasan Akbari <jarqvi.jarqvi@gmail.com> Co-authored-by: Amin Ehterami <A.Ehterami@proton.me>
This commit is contained in:
committed by
Nicolas De loof
parent
9e17a091be
commit
35efa97b7d
@@ -398,6 +398,8 @@ type AttachOptions struct {
|
||||
type EventsOptions struct {
|
||||
Services []string
|
||||
Consumer func(event Event) error
|
||||
Since string
|
||||
Until string
|
||||
}
|
||||
|
||||
// Event is a container runtime event served by Events API
|
||||
|
||||
@@ -32,6 +32,8 @@ func (s *composeService) Events(ctx context.Context, projectName string, options
|
||||
projectName = strings.ToLower(projectName)
|
||||
evts, errors := s.apiClient().Events(ctx, events.ListOptions{
|
||||
Filters: filters.NewArgs(projectFilter(projectName)),
|
||||
Since: options.Since,
|
||||
Until: options.Until,
|
||||
})
|
||||
for {
|
||||
select {
|
||||
|
||||
Reference in New Issue
Block a user